parent
3f4b19fcf6
commit
77ced33f14
@ -281,7 +281,7 @@
|
||||
public_name: '',
|
||||
},
|
||||
server_user_id: 0,
|
||||
|
||||
order_id: 0,//订单id
|
||||
address_string: '',
|
||||
banquetType: this.getBanquetType(),
|
||||
propShowOrder: false,
|
||||
@ -348,6 +348,7 @@
|
||||
addOrder() {
|
||||
CommonApi.commonPost('/api/banquet/order/createOrder', this.orderInfo).catch((res) => {
|
||||
if (res.code === 1) {
|
||||
this.order_id = res.data.order_id;
|
||||
this.propShowOrder = true;
|
||||
} else {
|
||||
uni.$u.toast(res.msg);
|
||||
@ -356,10 +357,10 @@
|
||||
},
|
||||
|
||||
// 微信支付
|
||||
payOrder(order_id) {
|
||||
payOrder() {
|
||||
|
||||
CommonApi.commonPost('/api/banquet/order/pay', {
|
||||
order_id: order_id
|
||||
order_id: this.order_id
|
||||
}).catch((res) => {
|
||||
if (res.code === 1) {
|
||||
wx.requestPayment({
|
||||
|
@ -192,6 +192,7 @@
|
||||
<wd-textarea readonly auto-height label="备注" v-model="orderInfo.remark" placeholder="请填写备注" /> -->
|
||||
<view class="pb-4" />
|
||||
<wd-button plain hairline custom-style="width: calc(100vw - 100rpx);" @click="payOrder(1)">确定支付</wd-button>
|
||||
<view class="pb-2" />
|
||||
<wd-button hairline custom-style="width: calc(100vw - 100rpx);" @click="payOrder(2)">取消订单</wd-button>
|
||||
</wd-cell-group>
|
||||
</wd-form>
|
||||
@ -273,19 +274,7 @@ export default defineComponent({
|
||||
|
||||
// },
|
||||
|
||||
// //提交订单
|
||||
// addOrder () {
|
||||
// CommonApi.commonPost('/api/banquet/order/createOrder', this.orderInfo).catch((res) => {
|
||||
// if (res.code === 1) {
|
||||
// this.payOrder(res.data.order_id);
|
||||
|
||||
// this.propShowOrder = true;
|
||||
// } else {
|
||||
// uni.$u.toast(res.msg);
|
||||
// }
|
||||
// });
|
||||
// },
|
||||
|
||||
|
||||
// 微信支付
|
||||
payOrder (type) {
|
||||
if (type === 1) {
|
||||
@ -293,9 +282,7 @@ export default defineComponent({
|
||||
CommonApi.commonPost('/api/banquet/order/pay', { order_id: this.order_id }).catch((res) => {
|
||||
if (res.code === 1) {
|
||||
// this.payOrder(res.data.order_id);
|
||||
|
||||
// this.propShowOrder = true;
|
||||
|
||||
console.log(res.data);
|
||||
wx.requestPayment({
|
||||
"timeStamp": res.data.timeStamp,
|
||||
@ -322,10 +309,7 @@ export default defineComponent({
|
||||
//取消订单
|
||||
CommonApi.commonPost('/api/banquet/order/cancel', { order_id: this.order_id }).catch((res) => {
|
||||
if (res.code === 1) {
|
||||
// this.payOrder(res.data.order_id);
|
||||
// this.propShowOrder = true;
|
||||
console.log(res.data);
|
||||
// this.close();
|
||||
uni.$u.toast(res.msg);
|
||||
} else {
|
||||
uni.$u.toast(res.msg);
|
||||
}
|
||||
|
@ -53,10 +53,10 @@ body {
|
||||
</view>
|
||||
</z-paging>
|
||||
|
||||
<up-button class="" style="" text="返回首页" type="primary" color="#59CB56" shape="circle" size="normal"
|
||||
<!-- <up-button class="" style="" text="返回首页" type="primary" color="#59CB56" shape="circle" size="normal"
|
||||
custom-style="width:calc(100vw - 50rpx)" @click="goBackHome">
|
||||
</up-button>
|
||||
<!-- </view> -->
|
||||
</up-button> -->
|
||||
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
Loading…
x
Reference in New Issue
Block a user