Browse Source

no message

DESKTOP-70VPDLK\Administrator 5 months ago
parent
commit
b5643a3766
2 changed files with 15 additions and 10 deletions
  1. 3 2
      src/views/Forestage/Tourism/index.vue
  2. 12 8
      src/views/Forestage/Tourism/order-sett.vue

+ 3 - 2
src/views/Forestage/Tourism/index.vue

@@ -228,10 +228,11 @@ export default {
 					if (res.code == 1) {
 						this.isAJAX = false;
 						// tools.success(res.msg)
-						this.$refs.orderSett.setOpen(true)
+            this.orderId = res.data.order_id
+						this.$refs.orderSett.setOpen(true,res.data.order_id)
 						console.log('res', res)
 
-						this.orderId = res.data.order_id
+
             /* this.getInfo(); */
 					} else {
 						this.isAJAX = false;

+ 12 - 8
src/views/Forestage/Tourism/order-sett.vue

@@ -27,22 +27,30 @@ export default {
   name: 'order-sett',
   components: { Bounced, OrderDetail, BalanceTip},
   props: {
-    orderId: ``
+
   },
   data() {
     return {
       dialogVisible:false,
       timeServe:undefined,
       time:0,
-      orderDetail: {}
+      orderDetail: {},
+      orderId: ``
     }
   },
   mounted() {
 
   },
   methods: {
-    setOpen(dialogVisible){
+    async   setOpen(dialogVisible,orderId){
       this.dialogVisible=dialogVisible===true;
+      if(dialogVisible){
+        this.orderId=orderId
+      }
+      //  调用订单详情接口
+      const result = await orderDetail({ orderId: this.orderId })
+
+      this.orderDetail = result.data
       if( this.dialogVisible){
         this.time=3
         this.timeServe=setInterval(async ()=>{
@@ -53,19 +61,15 @@ export default {
             this.timeServe=undefined
             this.dialogVisible=false
 
-            //  调用订单详情接口
-            const result = await orderDetail({ orderId: this.orderId })
 
-            this.orderDetail = result.data
 
-                
             //  支付成功了
             if (this.orderDetail.status >= 1) {
               /* openGoodsDetailPopup() */
               this.$emit('order-success', this.orderDetail)
               this.$refs.orderDetail.setOpen(true)
             }
-          
+
             //  支付失败了
             if (this.orderDetail.status == 0) {
               this.$refs.balanceTip.setOpen(true)