青蛙卖大米小程序2024-11-24
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

39 lines
576 B

export default {
data() {
return {
}
},
computed: {
},
methods: {
toPayOrder(item){
let api = ''
if([0, 1].includes(item.shopState)){
api = 'createOrderTwo'
}else{
api = 'createSumOrderAgain'
}
this.$api(api, {
orderId : item.id,
addressId : item.addressId
}, res => {
if(res.code == 200){
uni.requestPaymentWxPay(res)
.then(res => {
uni.showToast({
title: '支付成功',
icon: 'none'
})
this.getData()
}).catch(n => {
this.getData()
})
}
})
},
}
}