Merge branch 'wwz_x' of e.coding.net:g-cphe0354/xiaochengxusaomadiancan/cashier_weapp into wwz_d
This commit is contained in:
@@ -171,7 +171,7 @@
|
|||||||
以优惠¥{{emitorderfoodform.couponsPrice}}
|
以优惠¥{{emitorderfoodform.couponsPrice}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="fixedview_tow" @tap="$u.debounce(showpopupclick, 1000)">
|
<view class="fixedview_tow" @tap="$u.debounce(showpopupclick, 500)">
|
||||||
立即付款
|
立即付款
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -210,7 +210,6 @@
|
|||||||
// 输入支付密码 123
|
// 输入支付密码 123
|
||||||
passwordArr: [],
|
passwordArr: [],
|
||||||
ispws: false,
|
ispws: false,
|
||||||
numValue: 0
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -255,11 +254,11 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fangdouevent() {
|
// fangdouevent() {
|
||||||
this.$u.debounce(() => {
|
// this.$u.debounce(() => {
|
||||||
this.showpopupclick()
|
// this.showpopupclick()
|
||||||
}, 1000)
|
// }, 1000)
|
||||||
},
|
// },
|
||||||
async getcoupon() {
|
async getcoupon() {
|
||||||
let res = await this.api.userCoupon({
|
let res = await this.api.userCoupon({
|
||||||
"orderNum": this.listinfo.amount,
|
"orderNum": this.listinfo.amount,
|
||||||
@@ -320,7 +319,7 @@
|
|||||||
orderfoodindex() {
|
orderfoodindex() {
|
||||||
uni.pro.navigateTo('index/coupons/index', {
|
uni.pro.navigateTo('index/coupons/index', {
|
||||||
orderfood: 0,
|
orderfood: 0,
|
||||||
orderId :this.listinfoid,
|
orderId: this.listinfoid,
|
||||||
amount: this.listinfo.amounts
|
amount: this.listinfo.amounts
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -342,7 +341,6 @@
|
|||||||
},
|
},
|
||||||
// 去结算
|
// 去结算
|
||||||
showpopupclick() {
|
showpopupclick() {
|
||||||
if (this.numValue == 0) {
|
|
||||||
let data = { //定义socket数据传参
|
let data = { //定义socket数据传参
|
||||||
"skuId": '',
|
"skuId": '',
|
||||||
"num": '', //数量
|
"num": '', //数量
|
||||||
@@ -355,11 +353,7 @@
|
|||||||
"userId": uni.cache.get('userInfo').id,
|
"userId": uni.cache.get('userInfo').id,
|
||||||
// tableId:uni.cache.get('tableCode')
|
// tableId:uni.cache.get('tableCode')
|
||||||
}
|
}
|
||||||
this.numValue = 1
|
this.socketSendMsg(data)
|
||||||
uni.$u.debounce(this.socketSendMsg(data), 500)
|
|
||||||
} else {
|
|
||||||
this.showpopupclickdd()
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 去充值
|
// 去充值
|
||||||
goRecharge() {
|
goRecharge() {
|
||||||
@@ -369,7 +363,6 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
async showpopupclickdd(i) {
|
async showpopupclickdd(i) {
|
||||||
|
|
||||||
if (this.radiovalue1 == 1) {
|
if (this.radiovalue1 == 1) {
|
||||||
let res = await this.api.payorderPay({
|
let res = await this.api.payorderPay({
|
||||||
orderId: this.listinfoid
|
orderId: this.listinfoid
|
||||||
@@ -399,7 +392,8 @@
|
|||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pages/order/successful?orderId=' + this
|
url: '/pages/order/successful?orderId=' + this
|
||||||
.listinfoid + '&orderInfo=' + JSON.stringify(
|
.listinfoid + '&orderInfo=' + JSON.stringify(
|
||||||
this.orderInfo) + '&payType' + this.radiovalue1
|
this.orderInfo) + '&payType' + this
|
||||||
|
.radiovalue1
|
||||||
});
|
});
|
||||||
}, 1000)
|
}, 1000)
|
||||||
// uni.redirectTo({
|
// uni.redirectTo({
|
||||||
@@ -456,7 +450,8 @@
|
|||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pages/order/successful?orderId=' + this
|
url: '/pages/order/successful?orderId=' + this
|
||||||
.listinfoid + '&orderInfo=' + JSON.stringify(
|
.listinfoid + '&orderInfo=' + JSON.stringify(
|
||||||
this.orderInfo)+ '&radiovalue1=' + this.radiovalue1
|
this.orderInfo) + '&radiovalue1=' + this
|
||||||
|
.radiovalue1
|
||||||
});
|
});
|
||||||
}, 1000)
|
}, 1000)
|
||||||
|
|
||||||
|
|||||||
@@ -282,9 +282,6 @@
|
|||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/login/login?type=' + 0
|
url: '/pages/login/login?type=' + 0
|
||||||
});
|
});
|
||||||
// uni.pro.navigateTo('login/login', {
|
|
||||||
// type: 0
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
uni.$on('message', this.getMessage)
|
uni.$on('message', this.getMessage)
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@@ -292,13 +289,18 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
onUnload() {
|
onUnload() {
|
||||||
|
this.socketSendMsg({ //定义socket数据传参
|
||||||
|
"type": "close", //“addcart:添加购物车,create0rder:生成订单,clearCart:庆康购物车”,
|
||||||
|
})
|
||||||
this.socketTicket.Close()
|
this.socketTicket.Close()
|
||||||
uni.$off('message')
|
uni.$off('message')
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
|
setTimeout(() => {
|
||||||
if (uni.cache.get('token') && uni.cache.get('tableCode')) {
|
if (uni.cache.get('token') && uni.cache.get('tableCode')) {
|
||||||
this.productqueryShopIdByTableCode() //获取shop User id
|
this.productqueryShopIdByTableCode() //获取shop User id
|
||||||
}
|
}
|
||||||
|
}, 500)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 单独获取他的shopUserid
|
// 单独获取他的shopUserid
|
||||||
@@ -322,6 +324,9 @@
|
|||||||
icon: "none",
|
icon: "none",
|
||||||
})
|
})
|
||||||
if (msg.msg == '桌码不存在') { //卓码不存在直接退出
|
if (msg.msg == '桌码不存在') { //卓码不存在直接退出
|
||||||
|
this.socketSendMsg({ //定义socket数据传参
|
||||||
|
"type": "close", //“addcart:添加购物车,create0rder:生成订单,clearCart:庆康购物车”,
|
||||||
|
})
|
||||||
this.socketTicket.Close()
|
this.socketTicket.Close()
|
||||||
uni.$off('message')
|
uni.$off('message')
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
|
|||||||
Reference in New Issue
Block a user