yuantianjiao 6 lat temu
rodzic
commit
29aa777faa

+ 4
- 1
src/pages/sales/login/index.vue Wyświetl plik

@@ -112,11 +112,13 @@ export default {
112 112
       canSubmit = false
113 113
       if (!this.postData.captcha) {
114 114
         this.$toast('请填写验证码')
115
+        canSubmit = true
115 116
         return
116 117
       }
117 118
       let reg = /^[0-9]{6}$/
118 119
       if (!reg.test(this.postData.captcha)) {
119 120
         this.$toast('验证码格式不正确')
121
+        canSubmit = true
120 122
         return
121 123
       }
122 124
       this.submitData(this.postData).then((res) => {
@@ -124,12 +126,13 @@ export default {
124 126
           window.location.replace(this.getUrl('mainPage/coffeeIndex'))
125 127
         }, 2000)
126 128
       }).catch(() => {
129
+        console.log(111)
127 130
         canSubmit = true
128 131
       })
129 132
     }
130 133
   },
131 134
   created () {
132
-    canSubmit = true 
135
+    canSubmit = true
133 136
     if (this.userInfo.customer.MapUser) {
134 137
       // this.showPage = true
135 138
       window.location.replace(this.getUrl('mainPage/coffeeIndex'))

+ 2
- 0
src/pages/user/bindMobile/bindMobile.vue Wyświetl plik

@@ -171,6 +171,7 @@ export default {
171 171
       canSubmit = false
172 172
       if (!this.postData.captcha) {
173 173
         this.$toast('请填写验证码')
174
+        canSubmit = true
174 175
         return
175 176
       }
176 177
       // if (!this.postData.case) {
@@ -194,6 +195,7 @@ export default {
194 195
           }, 2000)
195 196
         }
196 197
       }).catch(() => {
198
+        console.log(111)
197 199
         canSubmit = true
198 200
       })
199 201
     }

+ 2
- 2
src/pages/user/lessonDetail/index.vue Wyświetl plik

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <div class="mainPage" v-if="showPage">
3 3
     <div class="title">课程详情</div>
4
-    <div class="content" :class="{'opacity' : courseOrderDetail.IsDone === 1, 'gray': courseOrderDetail.IsDone === 1}">
4
+    <div class="content" :class="{'opacity' : courseOrderDetail.IsDone === 1 || (courseOrderDetail.IsDone === 0 && now > time(item.EndDate)), 'gray': courseOrderDetail.IsDone === 1 || (courseOrderDetail.IsDone === 0 && now > time(item.EndDate))}">
5 5
       <div class="list-item flex-h">
6 6
         <span>订单编号</span>
7 7
         <span class="flex-item" style="font-size:.11rem;">{{courseOrderDetail.OrdersNo !== undefined ? courseOrderDetail.OrdersNo : ''}}</span>
@@ -51,7 +51,7 @@
51 51
     </div>
52 52
     <div class="useType">
53 53
       <img :src="used" alt="已使用" v-if="courseOrderDetail.IsDone === 1" width="100%" height="100%">
54
-      <!-- <img :src="failure" alt="已失效" v-if="useType == '已失效'" width="100%" height="100%"> -->
54
+      <img :src="failure" alt="已失效" v-if="courseOrderDetail.IsDone === 0 && now > time(item.EndDate)" width="100%" height="100%">
55 55
     </div>
56 56
   </div>
57 57
 </template>

+ 1
- 1
src/pages/user/receive/index.vue Wyświetl plik

@@ -8,7 +8,7 @@
8 8
       <div class="title" v-if="$route.query.type === 'card'">{{data.CardName}}</div>
9 9
       <div class="title" v-else>{{data.CouponName}}</div>
10 10
       <div class="video" v-if='video'>
11
-        <video width="100%" height="100%" preload="auto" controls="controls" x5-playsinline="true">
11
+        <video width="100%" height="100%" preload="auto" controls="controls" x5-playsinline="true" :poster="type === 'card' ? data.Images[0].CardImageUrl : data.Images[0].CouponImageUrl">
12 12
           <source :src="data.VideoUrl" type="video/mp4">
13 13
           <source :src="data.VideoUrl" type="video/avi">
14 14
           <source :src="data.VideoUrl" type="video/wma">

+ 2
- 1
src/pages/user/receiveChannel/index.vue Wyświetl plik

@@ -16,7 +16,8 @@
16 16
       <div class="title" v-if="$route.query.type === 'card'">{{data.CardName}}</div>
17 17
       <div class="title" v-else>{{data.CouponName}}</div>
18 18
       <div class="video" v-if='video'>
19
-        <video width="100%" height="100%" preload="auto" x5-playsinline="true" controls="controls">
19
+
20
+        <video width="100%" height="100%" preload="auto" x5-playsinline="true" controls="controls" :poster="type === 'card' ? data.Images[0].CardImageUrl : data.Images[0].CouponImageUrl">
20 21
           <source :src="data.VideoUrl" type="video/mp4">
21 22
           <source :src="data.VideoUrl" type="video/avi">
22 23
           <source :src="data.VideoUrl" type="video/wma">

+ 3
- 1
src/store/userCenter/userCenter.js Wyświetl plik

@@ -240,9 +240,11 @@ export default {
240 240
       })
241 241
     },
242 242
     submitData (context, data) {
243
-      return new Promise((resolve) => {
243
+      return new Promise((resolve,reject) => {
244 244
         http.submitData(data).then((res) => {
245 245
           resolve(res)
246
+        }).catch(() => {
247
+          reject()
246 248
         })
247 249
       })
248 250
     }