优化w
This commit is contained in:
@@ -333,6 +333,28 @@
|
|||||||
orderId: this.listinfoid
|
orderId: this.listinfoid
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
creactorder(){
|
||||||
|
let data = { //定义socket数据传参
|
||||||
|
"skuId": '',
|
||||||
|
"num": '', //数量
|
||||||
|
"type": "createOrder", //“addcart:添加购物车,create0rder:生成订单,clearCart:庆康购物车”,
|
||||||
|
"couponsId": this.emitorderfoodform.id ? this.emitorderfoodform.id : '', //优惠券ID,
|
||||||
|
"isYhq": this.emitorderfoodform.id ? 1 : 0, // 是否使用优惠券( 1: 使用, 0: 不使用),
|
||||||
|
"isBuyYhq": this.emitorderfoodform.clickiconone == 1 ? 1 : 0, // 是否购买优惠券( 1: 购买, 0: 不够买)
|
||||||
|
"productId": '', //商品id
|
||||||
|
"shopId": uni.cache.get('shopUser'),
|
||||||
|
"userId": uni.cache.get('userInfo').id,
|
||||||
|
// tableId:uni.cache.get('tableCode')
|
||||||
|
}
|
||||||
|
let res = 0
|
||||||
|
if(res.code==0){
|
||||||
|
this.listinfoid = msg.data.id //下单需要的id
|
||||||
|
this.orderInfo = msg.data
|
||||||
|
if (this.radiovalue1 == 1) {
|
||||||
|
this.showpopupclickdds() //微信支付
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
// 去结算
|
// 去结算
|
||||||
showpopupclick() {
|
showpopupclick() {
|
||||||
let data = { //定义socket数据传参
|
let data = { //定义socket数据传参
|
||||||
@@ -359,7 +381,8 @@
|
|||||||
showpopupclickdd() {
|
showpopupclickdd() {
|
||||||
console.log(this.radiovalue1, 'radiovalue1的值')
|
console.log(this.radiovalue1, 'radiovalue1的值')
|
||||||
if (this.radiovalue1 == 1) {
|
if (this.radiovalue1 == 1) {
|
||||||
this.showpopupclick() //生成订单
|
// this.showpopupclick() //生成订单
|
||||||
|
this.creactorder()
|
||||||
} else {
|
} else {
|
||||||
// 判断是否有绑定支付密码
|
// 判断是否有绑定支付密码
|
||||||
// 先判断是否设置支付密码。0是没设置。没设置的情况下跳转到设置页面。有的话输入支付密码
|
// 先判断是否设置支付密码。0是没设置。没设置的情况下跳转到设置页面。有的话输入支付密码
|
||||||
@@ -370,7 +393,8 @@
|
|||||||
} else {
|
} else {
|
||||||
if (this.amountVIP.amount > this.listinfo.amount) {
|
if (this.amountVIP.amount > this.listinfo.amount) {
|
||||||
this.ispws = true
|
this.ispws = true
|
||||||
this.showpopupclick() //生成订单
|
// this.showpopupclick() //生成订单
|
||||||
|
this.creactorder()
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.payPwd.onPayUp();
|
this.$refs.payPwd.onPayUp();
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user