yuantianjiao 6 年之前
父節點
當前提交
fe6069e6c8

+ 1
- 1
src/pages/user/App.vue 查看文件

@@ -1,6 +1,6 @@
1 1
 <template>
2 2
   <div id="app" v-if="showPage">
3
-    <router-view ></router-view>
3
+    <router-view></router-view>
4 4
   </div>
5 5
 </template>
6 6
 

+ 2
- 0
src/pages/user/app.js 查看文件

@@ -8,11 +8,13 @@ import Vuex from 'vuex'
8 8
 import Ajax from '../../util/ajax'
9 9
 import api from '../../util/api'
10 10
 import toolClass from '../../util/util'
11
+const Base64 = require('js-base64').Base64
11 12
 
12 13
 Vue.use(Vant)
13 14
 Vue.use(Vuex)
14 15
 Vue.prototype.$api = api
15 16
 Vue.prototype.$ajax = Ajax
17
+Vue.prototype.Base64 = Base64
16 18
 Vue.prototype.toolClass = toolClass
17 19
 /* eslint-disable no-new */
18 20
 new Vue({

+ 19
- 10
src/pages/user/fiveA/index.vue 查看文件

@@ -83,6 +83,15 @@ export default {
83 83
     const _that = this
84 84
     this.getLocationDetails().then(res => {
85 85
       _that.locations = res
86
+      let id = _that.$route.query.id
87
+      let index = 0
88
+      for (let i = 0; i < _that.locations.length; i++) {
89
+        if (_that.locations[i].LocationId === id) {
90
+          index = i
91
+        }
92
+      }
93
+      console.log(index)
94
+      _that.changeLocation(id, index)
86 95
     })
87 96
   },
88 97
   methods: {
@@ -94,16 +103,16 @@ export default {
94 103
     },
95 104
     courseInfo (course) {
96 105
       return {
97
-          id: course.CourseId,
98
-          title: course.CourseName,
99
-          img: course.CourseImg,
100
-          remark: course.Remark,
101
-          address: course.CaseAddress,
102
-          tag: course.CourseTags || [],
103
-          courseType: '',
104
-          defaultPrice: course.Price + '/节',
105
-          getWay: 'ticket'
106
-        }
106
+        id: course.CourseId,
107
+        title: course.CourseName,
108
+        img: course.CourseImg,
109
+        remark: course.Remark,
110
+        address: course.CaseAddress,
111
+        tag: course.CourseTags || [],
112
+        courseType: '',
113
+        defaultPrice: course.Price + '/节',
114
+        getWay: 'ticket'
115
+      }
107 116
     },
108 117
     // returnCourseList (arr) { // 转换课程列表格式
109 118
     //   for (var n = 0; n < arr.length; n++) {

+ 1
- 0
src/pages/user/lessonDetail/index.vue 查看文件

@@ -46,6 +46,7 @@
46 46
       </div>
47 47
       <div class="qr-code" v-if="courseOrderDetail.IsDone === 0">
48 48
         <qrCode v-if="showQrCode" :msg="courseOrderDetail.QrCodeString"></qrCode>
49
+        <div>{{courseOrderDetail.QrCodeString}}</div>
49 50
       </div>
50 51
     </div>
51 52
     <div class="useType">

+ 5
- 0
src/pages/user/lessonDetail/page.scss 查看文件

@@ -75,4 +75,9 @@
75 75
     font-size: .12rem;
76 76
     color: #FC6243 !important;
77 77
   }
78
+  .qr-code{
79
+    div{
80
+      text-align: center;
81
+    }
82
+  }
78 83
 }

+ 1
- 1
src/pages/user/mainPage/userCenter/index.vue 查看文件

@@ -117,7 +117,7 @@ export default {
117 117
       let userid = this.userInfo.customer.CustomerId
118 118
       let num = Math.floor(Math.random() * 10 + 1) * 100 + Math.floor(Math.random() * 10 + 1) * 10 + Math.floor(Math.random() * 10 + 1)
119 119
       num = num >= 1000 ? 999 : num
120
-      userid = parseInt(`${userid}${num}`) ^ 97
120
+      userid = `${userid}${num}`
121 121
       window.location.href = `${window.location.origin}/game/luckdraw/#/lotteryList?from=${userid}`
122 122
     }
123 123
   }

+ 1
- 0
src/pages/user/placeOrder/index.vue 查看文件

@@ -303,6 +303,7 @@ export default {
303 303
         detail: JSON.stringify(this.postData.detail),
304 304
         coupon: JSON.stringify(this.postData.coupon)
305 305
       }).then((res) => {
306
+        this.showCalcMenu = false
306 307
         this.showSuccessPopup = true
307 308
         // this.$dialog.alert({
308 309
         //   message: '下单成功!',

+ 3
- 3
src/pages/user/placeOrder/page.scss 查看文件

@@ -244,8 +244,8 @@
244 244
     position: fixed;
245 245
     top: 0;
246 246
     left: 0;
247
-    z-index: 999;
248
-    background: rgba(0, 0, 0, .05);
247
+    z-index: 2;
248
+    background: rgba(0, 0, 0, .35);
249 249
     >div{
250 250
       position: absolute;
251 251
       top: 50%;
@@ -262,7 +262,7 @@
262 262
       align-items: center;
263 263
       padding: .2rem;
264 264
       i{
265
-        color: #fc6243;
265
+        color: #000;
266 266
         font-size: .36rem;
267 267
         margin-bottom: .2rem;
268 268
       }

+ 19
- 5
src/pages/user/placeOrderDetail/index.vue 查看文件

@@ -65,6 +65,13 @@
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>
68 75
   </div>
69 76
 </template>
70 77
 
@@ -81,6 +88,7 @@ export default {
81 88
       showSelectCouponLayer: false,
82 89
       getCouponOff: false,
83 90
       couponList: [], // 优惠券列表
91
+      showSuccessPopup: false,
84 92
       postData: {
85 93
         info: {
86 94
           CaseId: decodeURI(_self.$route.query.caseid),
@@ -225,13 +233,19 @@ export default {
225 233
         detail: JSON.stringify(this.postData.detail),
226 234
         customercouponid: this.postData.customercouponid
227 235
       }).then((res) => {
228
-        this.$dialog.alert({
229
-          message: '下单成功!'
230
-        }).then(() => {
231
-          window.history.go(-2)
232
-        })
236
+        this.showSuccessPopup = true
237
+        // this.$dialog.alert({
238
+        //   message: '下单成功!'
239
+        // }).then(() => {
240
+        //   window.history.go(-2)
241
+        // })
233 242
       })
234 243
     },
244
+    
245
+    popBack () {
246
+      this.showSuccessPopup = false
247
+      window.history.go(-2)
248
+    },
235 249
     cancel () {
236 250
       window.history.go(-1)
237 251
     },

+ 3
- 3
src/pages/user/placeOrderDetail/page.scss 查看文件

@@ -305,8 +305,8 @@
305 305
     position: fixed;
306 306
     top: 0;
307 307
     left: 0;
308
-    z-index: 999;
309
-    background: rgba(0, 0, 0, .05);
308
+    z-index: 2;
309
+    background: rgba(0, 0, 0, .35);
310 310
     >div{
311 311
       position: absolute;
312 312
       top: 50%;
@@ -323,7 +323,7 @@
323 323
       align-items: center;
324 324
       padding: .2rem;
325 325
       i{
326
-        color: #fc6243;
326
+        color: #000;
327 327
         font-size: .36rem;
328 328
         margin-bottom: .2rem;
329 329
       }

+ 10
- 3
src/pages/user/placeOrderForCourse/index.vue 查看文件

@@ -28,7 +28,8 @@
28 28
                     <span>时间描述</span>
29 29
                   </div>
30 30
                 </div>
31
-                <span v-if="courseTimeList.length">{{returnCourseTime(courseTimeList[0].BeginDate,courseTimeList[0].EndDate)}}</span>
31
+                <!-- <span v-if="courseTimeList.length">{{returnCourseTime(courseTimeList[0].BeginDate,courseTimeList[0].EndDate)}}</span> -->
32
+                <span v-if="courseTimeList.length">{{toolClass.dateFormat(courseTimeList[0].BeginDate,'yyyy-MM-dd') + ' ~ ' + toolClass.dateFormat(courseTimeList[0].EndDate, 'yyyy-MM-dd')}}</span>
32 33
               </li>
33 34
               <li class="flex-h">
34 35
                 <div class="flex-item">
@@ -182,7 +183,7 @@ export default {
182 183
               })
183 184
             } else {
184 185
               for (var a = 0; a < res[n].Coupon.Targets.length; a++) {
185
-                if (res[n].Coupon.Targets[a].TargetId === id && nowDate < new Date(res[n].EndDate).getTime() && res[n].CaseId === caseid) {
186
+                if (res[n].Coupon.Targets[a].TargetId === id && nowDate > new Date(res[n].StartDate).getTime() && nowDate < new Date(res[n].EndDate).getTime() && res[n].CaseId === caseid) {
186 187
                   this.couponList.push({
187 188
                     title: res[n].Coupon.CouponName,
188 189
                     desc: res[n].Coupon.Share.UseInstruction,
@@ -250,7 +251,7 @@ export default {
250 251
       }).then((res) => {
251 252
         // console.log(JSON.stringify(res))
252 253
         this.$dialog.alert({
253
-          message: '下单成功!'
254
+          title: '下单成功!'
254 255
         }).then(() => {
255 256
           // this.$router.push({name: 'majorProjects'})
256 257
           window.history.go(-2)
@@ -292,3 +293,9 @@ export default {
292 293
 <style lang="scss" scoped>
293 294
 @import 'page.scss';
294 295
 </style>
296
+
297
+<style lang="scss">
298
+.van-dialog{
299
+  width: 60% !important;
300
+}
301
+</style>

+ 1
- 1
src/util/ajax.js 查看文件

@@ -5,7 +5,7 @@ import router from '../pages/user/router'
5 5
 import { Toast } from '../../node_modules/vant';
6 6
 
7 7
 const token = function (headers) {
8
-  let JWT
8
+  let JWT = ''
9 9
   if (headers) {
10 10
     localStorage.setItem('JWT', headers.authorization)
11 11
     JWT = headers.authorization

+ 2
- 2
src/util/api.js 查看文件

@@ -1,5 +1,5 @@
1
-const baseUrl = '/api-v2'
2
-// const baseUrl = '/api'
1
+// const baseUrl = '/api-v2'
2
+const baseUrl = '/api'
3 3
 const wechat = '/wechat/:org'
4 4
 const guest = '/guest/:org'
5 5