浏览代码

bug修改

wangfei 6 年前
父节点
当前提交
a36b0ff9e4
共有 1 个文件被更改,包括 8 次插入21 次删除
  1. 8
    21
      src/pages/user/placeOrderDetail/index.vue

+ 8
- 21
src/pages/user/placeOrderDetail/index.vue 查看文件

65
         <a @click="sureSelectCoupon">确定</a>
65
         <a @click="sureSelectCoupon">确定</a>
66
       </div>
66
       </div>
67
     </div>
67
     </div>
68
-    <div class="successPopup" v-if="showSuccessPopup">
69
-      <div>
70
-        <i class="iconfont icon-gou"></i>
71
-        <div class="text">出单成功</div>
72
-        <div class="back" @click="popBack>返回等待</div>
73
-      </div>
74
-    </div>
75
   </div>
68
   </div>
76
 </template>
69
 </template>
77
 
70
 
112
         value: '优惠券3',
105
         value: '优惠券3',
113
         id: '3',
106
         id: '3',
114
       }],
107
       }],
115
-      orderInfo: JSON.parse(_self.$route.query.info) || [],
116
-      showSuccessPopup: false
108
+      orderInfo: JSON.parse(_self.$route.query.info) || []
117
     }
109
     }
118
   },
110
   },
119
   components: {
111
   components: {
126
     })
118
     })
127
   },
119
   },
128
   created () {
120
   created () {
121
+    console.log(this.$route.query)
129
     this.getCouponList().then((res) => {
122
     this.getCouponList().then((res) => {
130
       // console.log(JSON.stringify(res))
123
       // console.log(JSON.stringify(res))
131
-      console.log(this.$route.query)
132
-      var id = JSON.parse(this.$route.query.info || '{}')[0].id, arr = [], nowDate = Date.now()
124
+      var id = JSON.parse(this.$route.query.info)[0].id, arr = [], nowDate = Date.now()
133
       for (var n = 0; n < res.length; n++) {
125
       for (var n = 0; n < res.length; n++) {
134
         if (res[n].Coupon.CouponType === 'goods' && res[n].Status === 1) {
126
         if (res[n].Coupon.CouponType === 'goods' && res[n].Status === 1) {
135
           if (res[n].Coupon.IsAll) {
127
           if (res[n].Coupon.IsAll) {
234
         detail: JSON.stringify(this.postData.detail),
226
         detail: JSON.stringify(this.postData.detail),
235
         customercouponid: this.postData.customercouponid
227
         customercouponid: this.postData.customercouponid
236
       }).then((res) => {
228
       }).then((res) => {
237
-        this.showSuccessPopup = true
238
-        // this.$dialog.alert({
239
-        //   message: '下单成功!'
240
-        // }).then(() => {
241
-        //   window.history.go(-2)
242
-        // })
229
+        this.$dialog.alert({
230
+          message: '下单成功!'
231
+        }).then(() => {
232
+          window.history.go(-2)
233
+        })
243
       })
234
       })
244
     },
235
     },
245
-    popBack () {
246
-      this.showSuccessPopup = false
247
-      window.history.go(-2)
248
-    },
249
     cancel () {
236
     cancel () {
250
       window.history.go(-1)
237
       window.history.go(-1)
251
     },
238
     },