|
|
@@ -25,7 +25,7 @@
|
|
|
|
|
|
<!-- 扫码付款 -->
|
|
|
<uni-popup ref="toPayRef" background-color="#fff" type="center" :animation="false" :is-mask-click="false">
|
|
|
- <toPayWay @cancelPay="cancelPay()" @selectPayWayBack="selectPayWayBack"></toPayWay>
|
|
|
+ <toPayWay @cancelPay="cancelPay()" @selectPayWayBack="selectPayWayBack" :orderId.sync="orderId"></toPayWay>
|
|
|
</uni-popup>
|
|
|
|
|
|
</view>
|
|
|
@@ -47,14 +47,16 @@ export default {
|
|
|
},
|
|
|
data(){
|
|
|
return {
|
|
|
- totalShop:{ bigUnit: 0, smallUnit:0, totalPrice: 0 }
|
|
|
+ totalShop:{ bigUnit: 0, smallUnit:0, totalPrice: 0 },
|
|
|
+ orderId:0
|
|
|
}
|
|
|
},
|
|
|
- created(){
|
|
|
-
|
|
|
- },
|
|
|
- watch:{
|
|
|
-
|
|
|
+ created(){
|
|
|
+ //避免重复,每次进来先移除全局自定义事件监听器
|
|
|
+ uni.$off('listenGetScanCode')
|
|
|
+ uni.$on('listenGetScanCode',function(data){
|
|
|
+ console.log(data.code)
|
|
|
+ })
|
|
|
},
|
|
|
methods:{
|
|
|
changeProperty(property){
|
|
|
@@ -74,7 +76,9 @@ export default {
|
|
|
createCreateOrder({...params,product:JSON.stringify(product)}).then(res=>{
|
|
|
uni.hideLoading()
|
|
|
if(res.code == 1){
|
|
|
+ console.log(res.data)
|
|
|
this.$refs.settlePopRef.close()
|
|
|
+ this.orderId = res.data.id
|
|
|
this.$refs.toPayRef.open('center')
|
|
|
}
|
|
|
})
|