yuantianjiao hace 6 años
padre
commit
6120c6e64a

BIN
src/common/icon/Group 3@3x.png Ver fichero


+ 2
- 1
src/components/caseTableItem/index.vue Ver fichero

@@ -1,6 +1,7 @@
1 1
 <template>
2 2
   <div class="caseTableItem flex-h">
3
-    <i class="iconfont icon-yinchenglogo"></i>
3
+    <img :src="item.caseIcon" alt="" v-if="item.caseIcon">
4
+    <i class="iconfont icon-yinchenglogo" v-else></i>
4 5
     <div class="itemNo">
5 6
       <a>
6 7
         <div class="centerLabel">

+ 11
- 0
src/components/caseTableItem/page.scss Ver fichero

@@ -12,6 +12,17 @@
12 12
     z-index: 1;
13 13
     color: rgba(255, 0, 0, .1);
14 14
   }
15
+  &>img{
16
+    display: inline-block;
17
+    position: absolute;
18
+    right: .1rem;
19
+    top: .05rem;
20
+    // font-size: .36rem;
21
+    width: .4rem;
22
+    height: .4rem;
23
+    z-index: 1;
24
+    color: rgba(255, 0, 0, .1);
25
+  }
15 26
   .itemNo{
16 27
     width: .44rem;
17 28
     position: relative;

+ 1
- 1
src/components/orderItem/index.vue Ver fichero

@@ -17,7 +17,7 @@
17 17
             <span>¥{{data.price}}</span>
18 18
           </div>
19 19
         </div>
20
-        <i class="iconfont icon-jian" @click="subtract" v-if="!data.spec.length && data.status === 1"></i>
20
+        <i class="iconfont icon-jian" :class="{'active': defaultNum > 0}" @click="subtract" v-if="!data.spec.length && data.status === 1"></i>
21 21
         <input v-if="!data.spec.length && data.status === 1" type="tel" @input="input" v-model="defaultNum">
22 22
         <i class="iconfont icon-jia" :class="{'active': defaultNum > 0}" @click="add" v-if="!data.spec.length && data.status === 1"></i>
23 23
         <a v-if="data.spec.length && data.status === 1" @click="selectSpec">选规格</a>

+ 1
- 1
src/components/orderListItem/index.vue Ver fichero

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <div class="orderListItem">
3 3
     <div class="title flex-h">
4
-      <div class="orange" v-if="returnStatus(data.MakeStatus) === '已下单'">
4
+      <div class="orange" v-if="returnStatus(data.MakeStatus) === '制作中'">
5 5
         <i class="iconfont icon-dengdai"></i><br>
6 6
         <span>{{returnStatus(data.MakeStatus)}}</span>
7 7
       </div>

+ 12
- 10
src/pages/bodyCheck/index/index.vue Ver fichero

@@ -5,7 +5,7 @@
5 5
       <div class="userInfo flex-h">
6 6
         <div class="flex-item">
7 7
           <span>{{user.Name}}</span>
8
-          <span>{{user.Sex=='0' ? '先生' : '女士'}}</span>
8
+          <!-- <span>{{user.Sex=='0' ? '先生' : '女士'}}</span> -->
9 9
         </div>
10 10
         <div>
11 11
           <span>体检时间</span>
@@ -40,7 +40,7 @@ import title from '../../../common/icon/title.png'
40 40
 import { createNamespacedHelpers } from 'vuex'
41 41
 const { mapState: mapBodyCheckState, mapActions: mapBodyCheckActions } = createNamespacedHelpers('bodyCheck')
42 42
 export default {
43
-  data() {
43
+  data () {
44 44
     return {
45 45
       title,
46 46
       ishidden: true,
@@ -54,12 +54,12 @@ export default {
54 54
       user: x => x.user
55 55
     })
56 56
   },
57
-  methods:{
57
+  methods: {
58 58
     ...mapBodyCheckActions(['getBodyCheck']),
59
-    linkTo(url){
60
-      window.location.href=url
59
+    linkTo (url) {
60
+      window.location.href = url
61 61
     },
62
-    loaded() {
62
+    loaded () {
63 63
       var _that = this
64 64
       setTimeout(() => {
65 65
         // Indicator.close()
@@ -67,21 +67,23 @@ export default {
67 67
       }, 500)
68 68
     },
69 69
   },
70
-  beforeMount() {
70
+  beforeMount () {
71 71
     // Indicator.open()
72 72
   },
73
-  created() {
73
+  created () {
74 74
     this.getBodyCheck().then(() => {
75 75
       this.showPage = true
76
+    }).catch(() => {
77
+      this.showPage = true
76 78
     })
77 79
   }
78 80
 }
79 81
 </script>
80 82
 
81 83
 <style lang="scss" scoped>
82
-@import "page.scss";
84
+@import 'page.scss';
83 85
 
84
-.bg-white{
86
+.bg-white {
85 87
   width: 100%;
86 88
   height: 100%;
87 89
   position: absolute;

+ 32
- 6
src/pages/sales/login/index.vue Ver fichero

@@ -1,5 +1,5 @@
1 1
 <template>
2
-  <div class="mainPage">
2
+  <div class="mainPage" v-if="showPage">
3 3
     <div class="mask">
4 4
       <img :src="logo" class="logo" alt="">
5 5
       <div class="centerLabel" style="width:100%;">
@@ -14,7 +14,7 @@
14 14
           <div class="sms" style="margin-top:.2rem;">
15 15
             <i class="iconfont icon-mima"></i>
16 16
             <input type="number" maxlength="6" placeholder="验证码" v-model="postData.captcha">
17
-            <div class="sand" v-if="seconds === 60" @click="sandMsg">发送验证码</div>
17
+            <div class="sand" v-if="seconds === 61" @click="sandMsg">发送验证码</div>
18 18
             <div class="sand" v-else>{{seconds}}后可重发</div>
19 19
           </div>
20 20
         </div>
@@ -56,19 +56,26 @@ import logo from '../../../common/icon/logo.png'
56 56
 import { createNamespacedHelpers } from 'vuex'
57 57
 const { mapActions: actions } = createNamespacedHelpers('userCenter')
58 58
 const { mapActions: mapLoginActions } = createNamespacedHelpers('login')
59
+const { mapState: mapUserState } = createNamespacedHelpers('userCenter')
59 60
 export default {
60 61
   data () {
61 62
     return {
62 63
       logo,
64
+      showPage: false,
63 65
       showCase: false,
64 66
       showSales: false,
65
-      seconds: 60,
67
+      seconds: 61,
66 68
       postData: {
67 69
         phone: '',
68 70
         captcha: ''
69 71
       }
70 72
     }
71 73
   },
74
+  computed: {
75
+    ...mapUserState({
76
+      userInfo: x => x.userInfo
77
+    }),
78
+  },
72 79
   methods: {
73 80
     ...actions(['getCaptcha']),
74 81
     ...mapLoginActions(['submitData']),
@@ -77,7 +84,13 @@ export default {
77 84
         this.$toast('请先填写手机号')
78 85
         return
79 86
       }
87
+      let reg = /^1[0-9]{10}$/
88
+      if (!reg.test(this.postData.phone)) {
89
+        this.$toast('请填写正确的手机号')
90
+        return
91
+      }
80 92
       this.getCaptcha(this.postData.phone)
93
+      this.seconds = 60
81 94
       this.runTime()
82 95
     },
83 96
     runTime () {
@@ -86,29 +99,42 @@ export default {
86 99
         if (this.seconds < 60 && this.seconds >= 1) {
87 100
           this.runTime()
88 101
         } else if (this.seconds < 1) {
89
-          this.seconds = 59
102
+          this.seconds = 61
90 103
         }
91 104
       }, 1000)
92 105
     },
93 106
     getUrl (val) {
94 107
       var url = window.location.pathname
95
-      return url.replace('sales.html', 'user.html') + '#/' + val
108
+      return url.replace('sales.html', 'user.html') + '#/' + val + '?hideTabbar=1'
96 109
     },
97 110
     submit () {
98 111
       if (!this.postData.captcha) {
99 112
         this.$toast('请先获取验证码')
100 113
         return
101 114
       }
115
+      let reg = /^[0-9]{6}$/
116
+      if (!reg.test(this.postData.captcha)) {
117
+        this.$toast('验证码格式不正确')
118
+        return
119
+      }
102 120
       // console.log(this.postData)
103 121
       this.submitData(this.postData).then((res) => {
104 122
         // this.$toast(res)
105 123
         window.location.href = this.getUrl('mainPage/coffeeIndex')
106 124
       })
107 125
     }
126
+  },
127
+  created () {
128
+    if (this.userInfo.customer.MapUser) {
129
+      window.location.href = this.getUrl('mainPage/coffeeIndex')
130
+      return
131
+    } else {
132
+      this.showPage = true
133
+    }
108 134
   }
109 135
 }
110 136
 </script>
111 137
 
112 138
 <style lang="scss" scoped>
113
-@import "page.scss";
139
+@import 'page.scss';
114 140
 </style>

+ 1
- 1
src/pages/sales/login/page.scss Ver fichero

@@ -50,8 +50,8 @@
50 50
           font-size: .18rem;
51 51
         }
52 52
         input{
53
-          flex: 1;
54 53
           height: 100%;
54
+          width: 1.4rem;
55 55
         }
56 56
         .sand{
57 57
           padding: 0 .1rem;

+ 0
- 2
src/pages/user/App.vue Ver fichero

@@ -40,8 +40,6 @@ export default {
40 40
       link: `${window.location.origin}${window.location.pathname}/user.html#/mainPage/indexPage`,
41 41
       thu_image: `${window.location.origin}${window.location.pathname}${logo}`
42 42
     })
43
-    // 计算距离方法
44
-    console.log(this.toolClass.getGreatCircleDistance(117.225495, 39.133713, 117.225962, 39.132573))
45 43
   },
46 44
   methods: {
47 45
     ...actions(['getUserInfo'])

+ 7
- 7
src/pages/user/bindMobile/bindMobile.vue Ver fichero

@@ -25,7 +25,7 @@
25 25
         <div class="sms">
26 26
           <i class="iconfont icon-mima"></i>
27 27
           <input type="number" maxlength="6" placeholder="验证码" v-model="postData.captcha">
28
-          <div class="sand" v-if="seconds === 60" @click="sandMsg">发送验证码</div>
28
+          <div class="sand" v-if="seconds === 61" @click="sandMsg">发送验证码</div>
29 29
           <div class="sand" v-else>{{seconds}}后可重发</div>
30 30
         </div>
31 31
 
@@ -75,7 +75,7 @@ export default {
75 75
       columnsS: [],
76 76
       caseName: '选择案场',
77 77
       salesName: '选择销售',
78
-      seconds: 60,
78
+      seconds: 61,
79 79
       postData: {
80 80
         phone: '',
81 81
         case: '',
@@ -142,6 +142,7 @@ export default {
142 142
         return
143 143
       }
144 144
       this.getCaptcha(this.postData.phone)
145
+      this.seconds = 60
145 146
       this.runTime()
146 147
     },
147 148
     runTime () {
@@ -150,12 +151,11 @@ export default {
150 151
         if (this.seconds < 60 && this.seconds >= 1) {
151 152
           this.runTime()
152 153
         } else if (this.seconds < 1) {
153
-          this.seconds = 60
154
+          this.seconds = 61
154 155
         }
155 156
       }, 1000)
156 157
     },
157 158
     submit () {
158
-      var _that = this
159 159
       if (!this.postData.captcha) {
160 160
         this.$toast('请先获取验证码')
161 161
         return
@@ -173,11 +173,11 @@ export default {
173 173
         if (this.$route.query.isLottery) {
174 174
           setTimeout(() => {
175 175
             const from = this.$route.query.luckshare ? `#/from/${this.$route.query.luckshare}` : ''
176
-            window.location.href = `${window.location.origin}/c-v2/game/luckdraw/${from}`
176
+            window.location.href = `${window.location.origin}/game/luckdraw/${from}`
177 177
           }, 2000)
178 178
         } else {
179
-          setTimeout(function () {
180
-            // _that.$router.push({name: 'userCenter'})
179
+          setTimeout(() => {
180
+            // this.$router.push({name: 'userCenter'})
181 181
             window.history.go(-1)
182 182
           }, 300)
183 183
         }

+ 3
- 1
src/pages/user/card/index.vue Ver fichero

@@ -140,7 +140,9 @@ export default {
140 140
       this.getList('change')
141 141
     },
142 142
     toUse (item) {
143
-      // console.log(item)
143
+      console.log(item)
144
+      this.$router.push({ name: 'lessonDetail', query: {id: item.CustomerCourseId} })
145
+      // this.$router.push({ name: 'lessonOrder' })
144 146
     },
145 147
     getList (param) {
146 148
       if (this.active === 0) {

+ 12
- 24
src/pages/user/coupons/index.vue Ver fichero

@@ -1,13 +1,9 @@
1 1
 <template>
2 2
   <div class="mainPage">
3
-    <scroll ref='scroll' :isloading='isloading' class='wrapper' :data='list' :pullUpLoad='pullUpLoadObj' :startY='parseInt(startY)' @pullingUp='getList'>
4
-      <div class="box">
5
-        <router-link tag="div" v-for="(item,index) in list" :key='index' :to="{name: 'couponsDetail', query: {id: item.customercouponid}}">
6
-          <discounts @toUse='toUse' :data='item'></discounts>
7
-        </router-link>
8
-        <noMore v-if="hasPic"></noMore>
9
-      </div>
10
-    </scroll>
3
+    <div class="box">
4
+      <discounts @toUse='toUse' :data='item' @toDetail="toDetail"></discounts>
5
+      <noMore v-if="hasPic"></noMore>
6
+    </div>
11 7
   </div>
12 8
 </template>
13 9
 
@@ -46,19 +42,6 @@ export default {
46 42
     noMore,
47 43
     discounts
48 44
   },
49
-  computed: {
50
-    pullUpLoadObj: function () {
51
-      return this.pullUpLoad
52
-        ? {
53
-          threshold: parseInt(this.pullUpLoadThreshold),
54
-          txt: {
55
-            more: this.pullUpLoadMoreTxt,
56
-            noMore: this.pullUpLoadNoMoreTxt
57
-          }
58
-        }
59
-        : false
60
-    }
61
-  },
62 45
   created () {
63 46
     this.getCouponList().then((res) => {
64 47
       // console.log(JSON.stringify(res))
@@ -84,10 +67,15 @@ export default {
84 67
       this.active = index
85 68
     },
86 69
     toUse (item) {
87
-      // console.log(item)
70
+      console.log(item)
71
+      if (item.Coupon.Targets.length > 1) {
72
+        this.$router.push({ name: 'indexPage' })
73
+      } else {
74
+        this.$router.push({ name: 'majorProjectsDetail', query: { id: item.TargetId } })
75
+      }
88 76
     },
89
-    getList () {
90
-      // console.log(111)
77
+    toDetail (item) {
78
+      this.$router.push({ name: 'couponsDetail', query: { id: item.customercouponid } })
91 79
     }
92 80
   }
93 81
 }

+ 3
- 3
src/pages/user/fiveA/index.vue Ver fichero

@@ -24,7 +24,7 @@
24 24
             </ul>
25 25
             <span v-if="fiveANoData" style="width:100%;line-height:.3rem;display:block;text-align:center;color:#ccc;margin-bottom:.1rem;">暂无数据</span>
26 26
           </div>
27
-          <router-link :to="{name:'',query:{}}" class="more" v-if="!fiveANoData">查看更多</router-link>
27
+          <router-link :to="{name:'',query:{}}" class="more">查看更多</router-link>
28 28
           <div style="width:100%;height:.1rem;background:#f8f8f8;margin:0 auto;"></div>
29 29
           <h5>资讯</h5>
30 30
           <div class="newsList flex-h">
@@ -163,11 +163,11 @@ export default {
163 163
       // console.log(item)
164 164
       item.ForwardType = item.ForwardType || ''
165 165
       if (item.ForwardType === 'url') {
166
-        window.location.href = '//' + item.ForwardUrl
166
+        window.location.href = item.ForwardUrl
167 167
       } else if (item.ForwardType === 'course') {
168 168
         this.$router.push({ name: '', query: { id: item.ForwardResourceId } }) // 此处去课程详情
169 169
       } else {
170
-        window.location.href = '//' + item.InfoUrl
170
+        window.location.href = item.InfoUrl
171 171
       }
172 172
     }
173 173
   }

+ 41
- 46
src/pages/user/mainPage/coffeeIndex/index.vue Ver fichero

@@ -185,7 +185,7 @@ export default {
185 185
       topCaseInfoData: {
186 186
         caseName: '',
187 187
         caseId: '',
188
-        ShowSelect: true,
188
+        ShowSelect: false,
189 189
       },
190 190
       caseInfo: {
191 191
         value: '',
@@ -232,17 +232,6 @@ export default {
232 232
     }
233 233
   },
234 234
   computed: {
235
-    pullUpLoadObj: function () {
236
-      return this.pullUpLoad
237
-        ? {
238
-          threshold: parseInt(this.pullUpLoadThreshold),
239
-          txt: {
240
-            more: this.pullUpLoadMoreTxt,
241
-            noMore: this.pullUpLoadNoMoreTxt
242
-          }
243
-        }
244
-        : false
245
-    },
246 235
     ...mapState({
247 236
       userInfo: x => x.userCenter.userInfo,
248 237
       CaseList: x => x.app.CaseList,
@@ -328,6 +317,8 @@ export default {
328 317
           this.cardTotalCount = count.toFixed(2)
329 318
         })
330 319
       })
320
+    } else {
321
+
331 322
     }
332 323
     this.getCaseList().then((res) => {
333 324
       this.locationMapping()
@@ -429,45 +420,49 @@ export default {
429 420
     },
430 421
     locationMapping () {
431 422
       let that = this
432
-      // wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
433
-      //   title: '城的空间',
434
-      //   desc: '城的空间',
435
-      //   link: `${window.location.origin}${window.location.pathname}/user.html#/mainPage/indexPage`,
436
-      //   thu_image: `${window.location.origin}${window.location.pathname}${logo}`
437
-      // }).then(() => {
438
-      //   wx.getLocation({
439
-      //     type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
440
-      //     success: function (res) {
441
-      //       let latitude1 = res.latitude // 纬度,浮点数,范围为90 ~ -90
442
-      //       let longitude1 = res.longitude // 经度,浮点数,范围为180 ~ -180。
443
-      //       for (let i = 0; i < that.CaseList.length; i++) {
444
-      //         let result = that.CaseList[i].Coordinate.split(",")
445
-      //         let latitude2 = parseFloat(result[0])
446
-      //         let longitude2 = parseFloat(result[1])
447
-      //         if (that.toolClass.getGreatCircleDistance(latitude1, longitude1, latitude2, longitude2) < 500) {
448
-      //           that.topCaseInfoData.caseName = that.CaseList[i].CaseName
449
-      //           that.topCaseInfoData.caseId = that.CaseList[i].CaseId
450
-      //           that.getCaseTableList({
451
-      //             caseid: that.topCaseInfoData.caseId
452
-      //           })
453
-      //           that.getCaseTotal({
454
-      //             caseid: that.topCaseInfoData.caseId
455
-      //           })
456
-      //         }
457
-      //       }
458
-      //       if (!that.topCaseInfoData.caseId || !that.topCaseInfoData.caseName){
459
-      //         that.topCaseInfoData.caseName = '当前位置无案场'
460
-      //       }
461
-      //     }
462
-      //   })
463
-      // })
464 423
       that.topCaseInfoData.caseName = that.CaseList[0].CaseName
465 424
       that.topCaseInfoData.caseId = that.CaseList[0].CaseId
466 425
       that.getCaseTableList({
467 426
         caseid: that.topCaseInfoData.caseId
468 427
       })
469
-      that.getCaseTotal({
470
-        caseid: that.topCaseInfoData.caseId
428
+      if (this.userInfo.customer.MapUser !== '') {
429
+        that.getCaseTotal({
430
+          caseid: that.topCaseInfoData.caseId
431
+        })
432
+      }
433
+      wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
434
+        title: '城的空间',
435
+        desc: '城的空间',
436
+        link: `${window.location.origin}${window.location.pathname}/user.html#/mainPage/indexPage`,
437
+        thu_image: `${window.location.origin}${window.location.pathname}${logo}`
438
+      }).then(() => {
439
+        wx.getLocation({
440
+          type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
441
+          success: function (res) {
442
+            let latitude1 = res.latitude // 纬度,浮点数,范围为90 ~ -90
443
+            let longitude1 = res.longitude // 经度,浮点数,范围为180 ~ -180。
444
+            for (let i = 0; i < that.CaseList.length; i++) {
445
+              let result = that.CaseList[i].Coordinate.split(",")
446
+              let latitude2 = parseFloat(result[0])
447
+              let longitude2 = parseFloat(result[1])
448
+              if (that.toolClass.getGreatCircleDistance(latitude1, longitude1, latitude2, longitude2) < 500) {
449
+                that.topCaseInfoData.caseName = that.CaseList[i].CaseName
450
+                that.topCaseInfoData.caseId = that.CaseList[i].CaseId
451
+                that.getCaseTableList({
452
+                  caseid: that.topCaseInfoData.caseId
453
+                })
454
+                if (this.userInfo.customer.MapUser !== '') {
455
+                  that.getCaseTotal({
456
+                    caseid: that.topCaseInfoData.caseId
457
+                  })
458
+                }
459
+              }
460
+            }
461
+            if (!that.topCaseInfoData.caseId || !that.topCaseInfoData.caseName) {
462
+              that.topCaseInfoData.caseName = '当前位置无案场'
463
+            }
464
+          }
465
+        })
471 466
       })
472 467
     },
473 468
     beforeClose (action, done) {

+ 9
- 4
src/pages/user/mainPage/index.vue Ver fichero

@@ -5,8 +5,8 @@
5 5
         <router-view></router-view>
6 6
       </div>
7 7
     </div>
8
-    <nav class="flex-h" v-if="!userInfo.customer.MapUser">
9
-      <router-link :to="{name:item.pathName,query:{}}" class="flex-item" active-class="active" v-for="(item, index) in tabBar" :key="index">
8
+    <nav class="flex-h">
9
+      <router-link :to="{name:item.pathName,query:{}}" v-if="showTabBar" class="flex-item" active-class="active" v-for="(item, index) in tabBar" :key="index">
10 10
         <div>
11 11
           <img v-if="index==0" class="centerLabel" src="../../../common/icon/tabBar-icon-1.png" alt="">
12 12
           <img v-if="index==1" class="centerLabel" src="../../../common/icon/tabBar-icon-2.png" alt="">
@@ -33,7 +33,8 @@ export default {
33 33
       }, {
34 34
         pathName: 'userCenter',
35 35
         name: '会员'
36
-      }]
36
+      }],
37
+      showTabBar: false
37 38
     }
38 39
   },
39 40
   computed: {
@@ -45,7 +46,11 @@ export default {
45 46
 
46 47
   },
47 48
   created () {
48
-
49
+    console.log(this.$route.query)
50
+    console.log(this.userInfo)
51
+    if (!this.userInfo.customer.MapUser || !this.$route.query.hideTabbar) {
52
+      this.showTabBar = true
53
+    }
49 54
   },
50 55
   methods: {
51 56
 

+ 2
- 6
src/pages/user/mainPage/indexPage/index.vue Ver fichero

@@ -124,10 +124,6 @@ export default {
124 124
     swiperSlide,
125 125
   },
126 126
   created () {
127
-    if (this.userInfo.customer.MapUser) {
128
-      this.$router.push({ name: 'coffeeIndex' })
129
-      return
130
-    }
131 127
     this.getIndexLocation({ orgid: this.orgid, issys: '0' }).then((res) => {
132 128
       this.data.fiveA = this.fiveA
133 129
       this.locationId = 'index'
@@ -153,11 +149,11 @@ export default {
153 149
     jump (item) {
154 150
       item.ForwardType = item.ForwardType || ''
155 151
       if (item.ForwardType === 'url') {
156
-        window.location.href = '//' + item.ForwardUrl
152
+        window.location.href = item.ForwardUrl
157 153
       } else if (item.ForwardType === 'course') {
158 154
         this.$router.push({ name: '', query: { id: item.ForwardResourceId } }) // 此处去课程详情
159 155
       } else {
160
-        window.location.href = '//' + item.InfoUrl
156
+        window.location.href = item.InfoUrl
161 157
       }
162 158
     }
163 159
   }

+ 5
- 4
src/pages/user/mainPage/userCenter/index.vue Ver fichero

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <div class="mainPage">
3 3
     <div class="loading" v-if="isLoading">
4
-      <div @click="bindMobile">请绑定手机号</div>
4
+      <!-- <div @click="bindMobile">请绑定手机号</div> -->
5 5
     </div>
6 6
     <div v-else>
7 7
       <div class="userTop_view" >
@@ -14,7 +14,8 @@
14 14
         </div>
15 15
         <div class="uesr-info">
16 16
           <div class="user-name">{{user.Name}}</div>
17
-          <div class="mobile">{{user.Phone}}</div>
17
+          <div class="mobile" v-if="user.Phone">{{user.Phone}}</div>
18
+          <div class="mobile" v-else @click="bindMobile">绑定手机号</div>
18 19
         </div>
19 20
       </div>
20 21
       <div class="vip-privilege flex-h">
@@ -86,7 +87,7 @@ export default {
86 87
   },
87 88
   mounted () {
88 89
     this.getUserInfo({ org: this.org }).then(() => {
89
-      if (this.userInfo != 406) {
90
+      if (this.userInfo) {
90 91
         this.user = this.userInfo.customer
91 92
         this.AccountInfo = JSON.parse(this.user.AccountInfo)
92 93
         this.headimgurl = this.AccountInfo.headimgurl
@@ -124,7 +125,7 @@ export default {
124 125
       let num = Math.floor(Math.random() * 10 + 1) * 100 + Math.floor(Math.random() * 10 + 1) * 10 + Math.floor(Math.random() * 10 + 1)
125 126
       num = num >= 1000 ? 999 : num
126 127
       userid = parseInt(`${userid}${num}`) ^ 97
127
-      window.location.href = `${window.location.origin}/c-v2/game/luckdraw/#/lotteryList?from=${userid}`
128
+      window.location.href = `${window.location.origin}/game/luckdraw/#/lotteryList?from=${userid}`
128 129
     }
129 130
   }
130 131
 }

+ 2
- 2
src/pages/user/majorProjects/index.vue Ver fichero

@@ -14,7 +14,7 @@
14 14
       <div class="flex-item">
15 15
         <div v-for="(item,index) in courseList" :key="index">
16 16
           <span>{{item.month+1}}月</span>
17
-          <ul>
17
+          <ul class="items">
18 18
             <router-link tag="li" v-for="(subItem,subIndex) in item.list" :key="subIndex" :to="{name: 'majorProjectsDetail', query: {id: subItem.id}}" class="flex-h">
19 19
               <div class="flex-item">
20 20
                 <div>
@@ -27,7 +27,7 @@
27 27
         <div class="cutLine"></div>
28 28
         <div>
29 29
           <span>关注我们</span>
30
-          <ul>
30
+          <ul class="items">
31 31
             <li class="flex-h">
32 32
               <div class="bottom flex-item flex-h">
33 33
                 <div class="flex-item flex-h">

+ 3
- 0
src/pages/user/majorProjects/page.scss Ver fichero

@@ -26,6 +26,9 @@
26 26
       }
27 27
     }
28 28
   }
29
+  .items{
30
+    width: 3.33rem;
31
+  }
29 32
   p{
30 33
     width: 100%;
31 34
     box-sizing: border-box;

+ 7
- 9
src/pages/user/placeOrder/index.vue Ver fichero

@@ -20,7 +20,6 @@
20 20
           </div>
21 21
         </div>
22 22
         <a @click="reback">返回选择桌号</a>
23
-        <!-- <router-link :to="{name: 'coffeeIndex', query: {}}">返回选择桌号</router-link> -->
24 23
       </div>
25 24
       <div class="content flex-item flex-h">
26 25
         <div class="slideMenus">
@@ -67,7 +66,6 @@
67 66
           <!-- <i class="iconfont" :class="{'icon-jiantou-up': !showCalcMenu,'icon-jiantou-down': showCalcMenu}" @click="showCalcMenu = true"></i> -->
68 67
         </div>
69 68
       </div>
70
-      <!-- <router-link :to="{name: 'placeOrderDetail', query: {info: JSON.stringify(settlementList), caseid: encodeURI(caseId), areaid: encodeURI(areaId), areaname: encodeURI(areaName), areaid: encodeURI(areaId), tableid: encodeURI(tableId), tableno: encodeURI(tableNo)}}">下单</router-link> -->
71 69
       <a @click="toPlaceOrder">下单</a>
72 70
     </div>
73 71
     <orderPopup :show="showPopup" :data="currentSpec" @closePopup="closePopup" @returnData="calcMenus"></orderPopup>
@@ -208,7 +206,7 @@ export default {
208 206
           this.$router.push({ name: 'placeOrderDetail', query: { info: JSON.stringify(this.selGoods), caseid: encodeURI(this.caseId), areaid: encodeURI(this.areaId), areaname: encodeURI(this.areaName), areaid: encodeURI(this.areaId), tableid: encodeURI(this.tableId), tableno: encodeURI(this.tableNo) } })
209 207
         } else {
210 208
           this.showCalcMenu = true
211
-        } 
209
+        }
212 210
       } else {
213 211
         this.$toast('您还没有选择商品哦~')
214 212
       }
@@ -261,11 +259,11 @@ export default {
261 259
         title: '提示',
262 260
         message: '返回页面将清空当前选择的商品,确定要返回吗?'
263 261
       }).then(() => {
264
-        this.$router.push({ name: 'coffeeIndex' })
262
+        // this.$router.push({ name: 'coffeeIndex' })
263
+        window.history.go(-1)
265 264
       })
266 265
     },
267 266
     placeOrder () { // 下单
268
-      // this.$router.push({ name: 'orderList', query: {} })
269 267
       this.postData.info.OrgId = this.orgId
270 268
       this.postData.info.UserId = this.userInfo.CustomerId
271 269
       this.postData.info.UserName = this.userInfo.customer.CustomerName
@@ -281,10 +279,10 @@ export default {
281 279
           SpecId: orderInfo[n].spec,
282 280
           SpecName: orderInfo[n].specname,
283 281
           Number: orderInfo[n].num - 0,
284
-          Price: String(orderInfo[n].price-0),
282
+          Price: String(orderInfo[n].price - 0),
285 283
         })
286
-        amount += (orderInfo[n].price-0) * orderInfo[n].num
287
-        num += orderInfo[n].num-0
284
+        amount += (orderInfo[n].price - 0) * orderInfo[n].num
285
+        num += orderInfo[n].num - 0
288 286
       }
289 287
       this.postData.info.Amount = String(amount)
290 288
       this.postData.info.OrdersNum = num
@@ -297,7 +295,7 @@ export default {
297 295
         this.$dialog.alert({
298 296
           message: '下单成功!'
299 297
         }).then(() => {
300
-          this.$router.push({name: 'orderList'})
298
+          this.$router.push({ name: 'orderList' })
301 299
         })
302 300
       })
303 301
     },

+ 11
- 8
src/pages/user/placeOrderForCourse/index.vue Ver fichero

@@ -48,14 +48,14 @@
48 48
               </li>
49 49
             </ul>
50 50
             <div class="selectTicket">
51
-              <div class="flex-h" @click="showLayer = true">
51
+              <div class="flex-h" @click="couponList.length ? showLayer = true : showLayer = false">
52 52
                 <div class="flex-item">
53 53
                   <div>
54 54
                     <span>优惠信息</span>
55 55
                   </div>
56 56
                 </div>
57 57
                 <span>{{postData.customercouponid == '' ? '暂未选择优惠券' : '已选择优惠券'}}</span>
58
-                <i class="iconfont icon-jiantou-right"></i>
58
+                <i class="iconfont icon-jiantou-right" v-if="couponList.length"></i>
59 59
               </div>
60 60
               <div class="flex-h">
61 61
                 <div class="flex-item">
@@ -78,11 +78,10 @@
78 78
               </div>
79 79
             </div>
80 80
             <div class="protocol">
81
-              <div>1、协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容</div>
82
-              <div>2、协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容</div>
83
-              <div>3、协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容</div>
84
-              <div>4、协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容</div>
85
-              <div>5、协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容协议内容</div>
81
+              <div>1. 甲方具有为乙方更换教练的权利及责任。(当甲方为乙方安排的教练因故离职或乙方认 为甲方的教练无法胜任对其的指导工作时,甲方应为乙方另行安排教练)。</div>
82
+              <div>2. 甲方必须保证乙方享有与教练一对多的指导,甲方教练上课中出现违规时乙方有权投诉。</div>
83
+              <div>3. 乙方承诺其身体状况已被医疗机构确认良好,适宜接受本协议约定的训练课程,即身体 状况完全正常,不存在运动风险及潜在运动风险。如若隐瞒,出现后果由乙方自负。</div>
84
+              <div>4. 乙方承诺其身体状况完全符合使用甲方器械以及完成课程内容的条件和能力。若因乙方 未提供既往病史或谎报病史而引起的运动伤害,后果由乙方自负。</div>
86 85
             </div>
87 86
           </div>
88 87
         </div>
@@ -131,7 +130,7 @@ export default {
131 130
     return {
132 131
       couponList: [],
133 132
       getCouponOff: false,
134
-      agreementOff: false, // 是否同意协议
133
+      agreementOff: true, // 是否同意协议
135 134
       courseTimeList: [],
136 135
       postData: {
137 136
         CouponId: '',
@@ -178,6 +177,10 @@ export default {
178 177
               select: false,
179 178
             })
180 179
           } else {
180
+            console.log(res[n].Coupon.Targets[a].TargetId)
181
+            console.log(new Date(res[n].StartDate).getTime())
182
+            console.log(nowDate)
183
+            console.log(new Date(res[n].EndDate).getTime())
181 184
             for (var a = 0; a < res[n].Coupon.Targets.length; a++) {
182 185
               if (res[n].Coupon.Targets[a].TargetId === id && nowDate >= new Date(res[n].StartDate).getTime() && nowDate < new Date(res[n].EndDate).getTime()) {
183 186
                 this.couponList.push({

+ 1
- 1
src/pages/user/receive/index.vue Ver fichero

@@ -144,7 +144,7 @@ export default {
144 144
       wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
145 145
         title: '领取卡券',
146 146
         desc: info,
147
-        link: `${window.location.origin}${window.location.pathname}/user.html#/receiveShared/${this.$route.query.id}/${this.$route.query.salesid}/${this.$route.query.type}/receive`,
147
+        link: `${window.location.origin}${window.location.pathname}#/receiveShared/${this.$route.query.id}/${this.$route.query.salesid}/${this.$route.query.type}/receive`,
148 148
         thu_image: `${window.location.origin}${window.location.pathname}${logo}`
149 149
       })
150 150
     }

+ 1
- 1
src/pages/user/receiveChannel/index.vue Ver fichero

@@ -135,7 +135,7 @@ export default {
135 135
       wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
136 136
         title: '领取卡券',
137 137
         desc: info,
138
-        link: `${window.location.origin}${window.location.pathname}/user.html#/receiveChannelShared/${this.$route.query.id}/${this.$route.query.type}/receive`,
138
+        link: `${window.location.origin}${window.location.pathname}#/receiveChannelShared/${this.$route.query.id}/${this.$route.query.type}/receive`,
139 139
         thu_image: `${window.location.origin}${window.location.pathname}${logo}`
140 140
       })
141 141
     }

+ 3
- 3
src/store/bodyCheck/index.js Ver fichero

@@ -9,15 +9,15 @@ export default {
9 9
     mainInfo: {}
10 10
   },
11 11
   mutations: {
12
-    updateState(state, payload) {
12
+    updateState (state, payload) {
13 13
       state.result = payload.Message
14 14
       state.user = payload.UserInfo
15 15
       state.mainInfo = payload.Info[0]
16 16
     }
17 17
   },
18 18
   actions: {
19
-    getBodyCheck (context, data) {
20
-      return new Promise((resolve) => {
19
+    getBodyCheck (context) {
20
+      return new Promise((resolve, reject) => {
21 21
         Ajax({
22 22
           ...api.bodyCheck.bodyCheck
23 23
         }).then(res => {

+ 3
- 3
src/store/fiveA/fiveA.js Ver fichero

@@ -116,9 +116,9 @@ export default {
116 116
     },
117 117
     getFiveAInfo (context, data) {
118 118
       // console.log(data)
119
-      http.getBanner(data).then((res) => {
120
-        context.commit('setBanner', res)
121
-      })
119
+      // http.getBanner(data).then((res) => {
120
+      //   context.commit('setBanner', res)
121
+      // })
122 122
       // http.getList(data).then((res) => {
123 123
       //   context.commit('setList', res)
124 124
       // })

+ 5
- 1
src/store/index/index.js Ver fichero

@@ -100,7 +100,11 @@ export default {
100 100
       state.fiveA = data
101 101
     },
102 102
     setMessage (state, data) { // 获取首页消息
103
-      state.message = data
103
+      if (data.length > 3) {
104
+        state.message = data.slice(0,3)
105
+      } else {
106
+        state.message = data
107
+      }
104 108
     },
105 109
     setProject (state, data) { // 获取项目专题
106 110
       state.project = data

+ 0
- 1
src/util/api.js Ver fichero

@@ -2,7 +2,6 @@
2 2
 const baseUrl = '/api'
3 3
 const wechat = '/wechat/:org'
4 4
 const guest = '/guest/:org'
5
-const common = '/common/:org'
6 5
 
7 6
 const $api = {
8 7
   index: { // 首页

+ 2
- 5
src/util/util.js Ver fichero

@@ -41,15 +41,11 @@ const toolClass = {
41 41
     let url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${wechatConfig.redirect_uri}&response_type=${wechatConfig.response_type}&scope=${wechatConfig.scope}&state=${wechatConfig.state}#wechat_redirect`
42 42
     window.location.href = url
43 43
   },
44
+
44 45
   /**
45 46
    * caculate the great circle distance
46 47
    * 经纬度计算距离
47
-   * @param {Object} lat1 纬度1
48
-   * @param {Object} lng1 精度1
49
-   * @param {Object} lat2 纬度2
50
-   * @param {Object} lng2 精度2
51 48
    */
52
-
53 49
   getGreatCircleDistance: (lat1, lng1, lat2, lng2) => {
54 50
     if (lat1 === lat2 && lng1 === lng2) {
55 51
       return 0
@@ -63,6 +59,7 @@ const toolClass = {
63 59
     var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)))
64 60
     s = s * EARTH_RADIUS
65 61
     s = Math.round(s * 10000) / 10000.0
62
+    console.log(s)
66 63
     return s
67 64
   }
68 65
 }

+ 0
- 2
vue.config.js Ver fichero

@@ -20,9 +20,7 @@ module.exports = {
20 20
   productionSourceMap: true,
21 21
   chainWebpack: config => config.plugins.delete('named-chunks'),
22 22
   devServer: {
23
-    // publicPath: '/c-v2/',
24 23
     proxy: {
25
-      // '/api-v2': {
26 24
       '/api': {
27 25
         // target: 'https://dp.huiju360.com.cn/hj_operations',
28 26
         target: 'http://192.168.0.62:8080', // wf