修改订单列表,调试订单支付
This commit is contained in:
parent
01886bf729
commit
f412faeeab
@ -186,7 +186,7 @@
|
||||
]" />
|
||||
<wd-input label="联系电话" prop="phone" clearable v-model="orderInfo.phone" placeholder="请填写联系电话"
|
||||
:rules="[{ required: false, pattern: /^1[3-9]\d{9}$/, message: '请输入有效手机号码' }]" />
|
||||
|
||||
|
||||
<wd-select-picker label="宴席类型" prop="banquet_type" v-model="orderInfo.banquet_type" :columns="banquetType"
|
||||
type="radio"
|
||||
:rules="[
|
||||
@ -257,7 +257,7 @@ export default defineComponent({
|
||||
public_name: '',
|
||||
},
|
||||
server_user_id: 0,
|
||||
|
||||
|
||||
address_string: '',
|
||||
banquetType: this.getBanquetType(),
|
||||
propShowOrder: false,
|
||||
@ -316,7 +316,10 @@ export default defineComponent({
|
||||
addOrder () {
|
||||
CommonApi.commonPost('/api/banquet/order/createOrder', this.orderInfo).catch((res) => {
|
||||
if (res.code === 1) {
|
||||
this.propShowOrder = true;
|
||||
// this.propShowOrder = true;
|
||||
uni.navigateTo({
|
||||
url: `/pages/banquet/order/detail?id=${res.data.order_id}`
|
||||
});
|
||||
} else {
|
||||
uni.$u.toast(res.msg);
|
||||
}
|
||||
@ -340,7 +343,7 @@ export default defineComponent({
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
//获取地址
|
||||
getArea () {
|
||||
|
@ -159,7 +159,7 @@ export default defineComponent({
|
||||
//加入购物车
|
||||
addCart (id) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/banquet/combo/index??id=${id}`
|
||||
url: `/pages/banquet/combo/index?id=${id}`
|
||||
});
|
||||
// CommonApi.commonPost('/api/cart/add', {
|
||||
// buy_now: false,
|
||||
@ -182,4 +182,4 @@ export default defineComponent({
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
@ -170,7 +170,7 @@
|
||||
<view class="pt-2">宴席地址:{{ orderInfo.address }}</view>
|
||||
<view class="pt-2">备注:{{ orderInfo.remark }}</view>
|
||||
<view class="pt-4" />
|
||||
|
||||
|
||||
<template #title>
|
||||
</template>
|
||||
<view>1.(不交定金)如若厨师接到更高价订单,可能会将您的订单取消。</view>
|
||||
@ -180,7 +180,7 @@
|
||||
|
||||
<wd-form ref="form" :model="orderInfo" errorType="message">
|
||||
<wd-cell-group border>
|
||||
<!--
|
||||
<!--
|
||||
<view class="pb-4" />
|
||||
<wd-input readonly label="联系姓名" prop="customer_name" clearable v-model="orderInfo.customer_name"
|
||||
placeholder="请填写联系姓名" />
|
||||
@ -297,6 +297,22 @@ export default defineComponent({
|
||||
// this.propShowOrder = true;
|
||||
|
||||
console.log(res.data);
|
||||
wx.requestPayment({
|
||||
"timeStamp": res.data.timeStamp,
|
||||
"nonceStr": res.data.nonceStr,
|
||||
"package": res.data.package,
|
||||
"signType": res.data.signType,
|
||||
"paySign": res.data.paySign,
|
||||
"success": function (res) {
|
||||
console.log('success:' + JSON.stringify(res));
|
||||
},
|
||||
"fail": function (err) {
|
||||
console.log('fail:' + JSON.stringify(err));
|
||||
},
|
||||
"complete": function (res) {
|
||||
console.log('complete:' + JSON.stringify(res));
|
||||
}
|
||||
})
|
||||
// this.close();
|
||||
} else {
|
||||
uni.$u.toast(res.msg);
|
||||
|
@ -137,7 +137,7 @@ export default defineComponent({
|
||||
console.log('列表分页',pageNo);
|
||||
this.search_sp.page = pageNo;
|
||||
console.log('列表分页',this.search_sp);
|
||||
CommonApi.commonGet('/api/order/list', this.search_sp).catch((res) => {
|
||||
CommonApi.commonGet('/api/banquet/order/list', this.search_sp).catch((res) => {
|
||||
if (res.code === 1) {
|
||||
this.$refs.pagingRefSP?.complete(res.data);
|
||||
// console.log('刷新页面');
|
||||
@ -147,7 +147,7 @@ export default defineComponent({
|
||||
// this.createOrderData.cart_ids.push(item.id);
|
||||
// }
|
||||
// });
|
||||
|
||||
|
||||
} else {
|
||||
uni.$u.toast(res.msg);
|
||||
}
|
||||
@ -156,7 +156,7 @@ export default defineComponent({
|
||||
|
||||
// 打开地图
|
||||
getopenLocation (res) {
|
||||
useLocation().openLocation(res.latitude, res.longitude,res.address,res.address)
|
||||
useLocation().openLocation(res.latitude, res.longitude,res.address,res.address)
|
||||
},
|
||||
//点击详情
|
||||
orderDetail (id: number) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user