浏览代码

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,13 +65,6 @@
65 65
         <a @click="sureSelectCoupon">确定</a>
66 66
       </div>
67 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 68
   </div>
76 69
 </template>
77 70
 
@@ -112,8 +105,7 @@ export default {
112 105
         value: '优惠券3',
113 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 111
   components: {
@@ -126,10 +118,10 @@ export default {
126 118
     })
127 119
   },
128 120
   created () {
121
+    console.log(this.$route.query)
129 122
     this.getCouponList().then((res) => {
130 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 125
       for (var n = 0; n < res.length; n++) {
134 126
         if (res[n].Coupon.CouponType === 'goods' && res[n].Status === 1) {
135 127
           if (res[n].Coupon.IsAll) {
@@ -234,18 +226,13 @@ export default {
234 226
         detail: JSON.stringify(this.postData.detail),
235 227
         customercouponid: this.postData.customercouponid
236 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 236
     cancel () {
250 237
       window.history.go(-1)
251 238
     },