许成详 6 anos atrás
pai
commit
fb860c92aa
41 arquivos alterados com 350 adições e 233 exclusões
  1. 2
    1
      package.json
  2. BIN
      src/common/icon/Group 3@3x.png
  3. BIN
      src/common/icon/bg.jpg
  4. 3
    2
      src/components/caseTableItem/index.vue
  5. 15
    2
      src/components/caseTableItem/page.scss
  6. 1
    1
      src/components/courseItem/index.vue
  7. 10
    3
      src/components/myCard/myCard.vue
  8. 1
    1
      src/components/orderItem/index.vue
  9. 3
    0
      src/components/orderListItem/index.vue
  10. 12
    10
      src/pages/bodyCheck/index/index.vue
  11. 34
    8
      src/pages/sales/login/index.vue
  12. 4
    1
      src/pages/sales/login/page.scss
  13. 0
    2
      src/pages/user/App.vue
  14. 17
    17
      src/pages/user/bindMobile/bindMobile.vue
  15. 3
    0
      src/pages/user/bindMobile/page.scss
  16. 3
    1
      src/pages/user/card/index.vue
  17. 18
    25
      src/pages/user/coupons/index.vue
  18. 4
    4
      src/pages/user/fiveA/index.vue
  19. 51
    53
      src/pages/user/mainPage/coffeeIndex/index.vue
  20. 8
    3
      src/pages/user/mainPage/coffeeIndex/page.scss
  21. 9
    4
      src/pages/user/mainPage/index.vue
  22. 6
    2
      src/pages/user/mainPage/indexPage/index.vue
  23. 13
    10
      src/pages/user/mainPage/userCenter/index.vue
  24. 2
    2
      src/pages/user/majorProjects/index.vue
  25. 3
    0
      src/pages/user/majorProjects/page.scss
  26. 14
    1
      src/pages/user/majorProjectsDetail/index.vue
  27. 11
    11
      src/pages/user/placeOrder/index.vue
  28. 36
    37
      src/pages/user/placeOrderForCourse/index.vue
  29. 11
    4
      src/pages/user/receive/index.vue
  30. 11
    4
      src/pages/user/receiveChannel/index.vue
  31. 2
    2
      src/pages/user/receiveResults/index.vue
  32. 1
    0
      src/pages/user/receiveResults/page.scss
  33. 3
    3
      src/store/bodyCheck/index.js
  34. 3
    3
      src/store/fiveA/fiveA.js
  35. 5
    1
      src/store/index/index.js
  36. 15
    1
      src/store/userCenter/userCenter.js
  37. 3
    1
      src/util/ajax.js
  38. 5
    2
      src/util/api.js
  39. 4
    2
      src/util/share.js
  40. 2
    5
      src/util/util.js
  41. 2
    4
      vue.config.js

+ 2
- 1
package.json Ver arquivo

@@ -9,7 +9,8 @@
9 9
   },
10 10
   "dependencies": {
11 11
     "element-ui": "^2.4.6",
12
-    "vue": "^2.5.17"
12
+    "vue": "^2.5.17",
13
+    "weixin-js-sdk": "^1.3.3"
13 14
   },
14 15
   "devDependencies": {
15 16
     "@vue/cli-plugin-babel": "^3.0.1",

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


BIN
src/common/icon/bg.jpg Ver arquivo


+ 3
- 2
src/components/caseTableItem/index.vue Ver arquivo

@@ -1,6 +1,7 @@
1 1
 <template>
2 2
   <div class="caseTableItem flex-h">
3
-    <i class="iconfont icon-yinchenglogo"></i>
3
+    <!-- <i class="iconfont icon-yinchenglogo"></i> -->
4
+    <img :src="icon" class="iconfont icon-yinchenglogo">
4 5
     <div class="itemNo">
5 6
       <a>
6 7
         <div class="centerLabel">
@@ -22,7 +23,7 @@
22 23
 
23 24
 export default {
24 25
   name: '',
25
-  props: ['item','index'],
26
+  props: ['item','index','icon'],
26 27
   data () {
27 28
     return {
28 29
       

+ 15
- 2
src/components/caseTableItem/page.scss Ver arquivo

@@ -3,12 +3,25 @@
3 3
   position: relative;
4 4
   overflow: hidden;
5 5
   align-items: center;
6
-  &>i{
6
+  &>img{
7
+    display: inline-block;
8
+    position: absolute;
9
+    right: .06rem;
10
+    top: 50%;
11
+    transform: translateY(-50%);
12
+    -webkit-transform: translateY(-50%);
13
+    width: .36rem;
14
+    z-index: 1;
15
+    opacity: .3;
16
+  }
17
+  &>img{
7 18
     display: inline-block;
8 19
     position: absolute;
9 20
     right: .1rem;
10 21
     top: .05rem;
11
-    font-size: .36rem;
22
+    // font-size: .36rem;
23
+    width: .4rem;
24
+    height: .4rem;
12 25
     z-index: 1;
13 26
     color: rgba(255, 0, 0, .1);
14 27
   }

+ 1
- 1
src/components/courseItem/index.vue Ver arquivo

@@ -19,8 +19,8 @@
19 19
               <span>优惠券体验</span>
20 20
             </div>
21 21
           </div>
22
-          <span>时间:{{data.time}}</span>
23 22
           <span>地点:{{data.address}}</span>
23
+          <span>备注:{{data.remark}}</span>
24 24
         </div>
25 25
       </div>
26 26
       <ul v-if="data.getWay=='ticket'">

+ 10
- 3
src/components/myCard/myCard.vue Ver arquivo

@@ -8,7 +8,7 @@
8 8
       </div>
9 9
       <div>
10 10
         <h2>{{data.title}}</h2>
11
-        <span>{{data.desc}}</span>
11
+        <span class="descs">{{data.desc}}</span>
12 12
         <span>{{data.startDate}}-{{data.endDate}}</span>
13 13
       </div>
14 14
     </div>
@@ -58,7 +58,7 @@ export default {
58 58
   },
59 59
   methods: {
60 60
     share () {
61
-      if(!this.data.invalid){
61
+      if (!this.data.invalid) {
62 62
         this.$emit('share', this.data)
63 63
       }
64 64
     }
@@ -79,6 +79,13 @@ export default {
79 79
     height: 0.88rem;
80 80
     padding: 0.1rem;
81 81
     box-sizing: border-box;
82
+    .descs {
83
+      overflow: hidden;
84
+      text-overflow: ellipsis;
85
+      display: -webkit-box;
86
+      -webkit-line-clamp: 2;
87
+      -webkit-box-orient: vertical;
88
+    }
82 89
     div:nth-of-type(1) {
83 90
       width: 1.2rem;
84 91
       position: relative;
@@ -151,7 +158,7 @@ export default {
151 158
     background-color: #fc6243;
152 159
     text-align: center;
153 160
     color: #fff;
154
-    border-radius: 0 0 .08rem .08rem;
161
+    border-radius: 0 0 0.08rem 0.08rem;
155 162
   }
156 163
 }
157 164
 </style>

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

@@ -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>

+ 3
- 0
src/components/orderListItem/index.vue Ver arquivo

@@ -66,6 +66,9 @@ export default {
66 66
     returnStatus (val) {
67 67
       for (var n = 0; n < dict.orderStatus.length; n++) {
68 68
         if(val === dict.orderStatus[n].key){
69
+          if (dict.orderStatus[n].value === '已下单'){
70
+            dict.orderStatus[n].value = '制作中'
71
+          }
69 72
           return dict.orderStatus[n].value
70 73
         }
71 74
       }

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

@@ -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;

+ 34
- 8
src/pages/sales/login/index.vue Ver arquivo

@@ -1,7 +1,7 @@
1 1
 <template>
2
-  <div class="mainPage">
2
+  <div class="mainPage" v-if="showPage">
3 3
     <div class="mask">
4
-      <img :src="logo" class="logo" alt="">
4
+      <!-- <img :src="logo" class="logo" alt=""> -->
5 5
       <div class="centerLabel" style="width:100%;">
6 6
         <div class="box" style="margin:0 auto;">
7 7
           <div class="title">登录</div>
@@ -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,17 +99,22 @@ 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
-        this.$toast('请先获取验证码')
112
+        this.$toast('请填写验证码')
113
+        return
114
+      }
115
+      let reg = /^[0-9]{6}$/
116
+      if (!reg.test(this.postData.captcha)) {
117
+        this.$toast('验证码格式不正确')
100 118
         return
101 119
       }
102 120
       // console.log(this.postData)
@@ -105,10 +123,18 @@ export default {
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>

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

@@ -2,6 +2,9 @@
2 2
   background: url("../../../common/icon/bg.jpg") no-repeat 0 -0.8rem;
3 3
   background-size: 100% calc(100% + 90px);
4 4
   position: relative;
5
+  input::-webkit-input-placeholder {
6
+    color: rgba(168,182,200,1);
7
+  }
5 8
   .mask{
6 9
     width: 100%;
7 10
     height: 100%;
@@ -50,8 +53,8 @@
50 53
           font-size: .18rem;
51 54
         }
52 55
         input{
53
-          flex: 1;
54 56
           height: 100%;
57
+          width: 1.4rem;
55 58
         }
56 59
         .sand{
57 60
           padding: 0 .1rem;

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

@@ -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'])

+ 17
- 17
src/pages/user/bindMobile/bindMobile.vue Ver arquivo

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <div class="mainPage">
3 3
     <div class="mask">
4
-      <img :src="logo" class="logo" alt="">
4
+      <!-- <img :src="logo" class="logo" alt=""> -->
5 5
       <div class="box">
6 6
         <div class="title">绑定</div>
7 7
 
@@ -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,34 +151,33 @@ 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
-        this.$toast('请先获取验证码')
161
-        return
162
-      }
163
-      if (!this.postData.case) {
164
-        this.$toast('请选择案场')
165
-        return
166
-      }
167
-      if (!this.postData.sales) {
168
-        this.$toast('请选择销售')
160
+        this.$toast('请填写验证码')
169 161
         return
170 162
       }
163
+      // if (!this.postData.case) {
164
+      //   this.$toast('请选择案场')
165
+      //   return
166
+      // }
167
+      // if (!this.postData.sales) {
168
+      //   this.$toast('请选择销售')
169
+      //   return
170
+      // }
171 171
       this.submitData(this.postData).then((res) => {
172 172
         this.$toast(res)
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 = `/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
- 0
src/pages/user/bindMobile/page.scss Ver arquivo

@@ -2,6 +2,9 @@
2 2
   background: url("../../../common/icon/bg.jpg") no-repeat 0 -0.8rem;
3 3
   background-size: 100% calc(100% + 90px);
4 4
   position: relative;
5
+  input::-webkit-input-placeholder {
6
+    color: rgba(168,182,200,1);
7
+  }
5 8
   .mask{
6 9
     width: 100%;
7 10
     height: 100%;

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

@@ -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) {

+ 18
- 25
src/pages/user/coupons/index.vue Ver arquivo

@@ -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" v-for="(item,index) in list" :key="index"></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))
@@ -71,7 +54,8 @@ export default {
71 54
           useType: res[n].Status === 1 ? '未使用' : '已使用',
72 55
           tag: res[n].Coupon.CouponType === 'coupon' ? '课程' : '商品',
73 56
           customercouponid: res[n].CustomerCouponId,
74
-          couponid: res[n].Coupon.CouponId
57
+          couponid: res[n].Coupon.CouponId,
58
+          Coupon: res[n].Coupon
75 59
         })
76 60
       }
77 61
     })
@@ -84,10 +68,19 @@ export default {
84 68
       this.active = index
85 69
     },
86 70
     toUse (item) {
87
-      // console.log(item)
71
+      console.log(item)
72
+      if (item.Coupon.Targets.length > 1) {
73
+        this.$router.push({ name: 'indexPage' })
74
+      } else {
75
+        if (item.tag === '商品') {
76
+          this.$router.push({ name: 'coffeeIndex' })
77
+        } else {
78
+          this.$router.push({ name: 'majorProjectsDetail', query: { id: item.Coupon.Targets[0].TargetId } })
79
+        }
80
+      }
88 81
     },
89
-    getList () {
90
-      // console.log(111)
82
+    toDetail (item) {
83
+      this.$router.push({ name: 'couponsDetail', query: { id: item.customercouponid } })
91 84
     }
92 85
   }
93 86
 }

+ 4
- 4
src/pages/user/fiveA/index.vue Ver arquivo

@@ -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">
@@ -150,7 +150,7 @@ export default {
150 150
           id: arr[n].CourseId,
151 151
           title: arr[n].CourseName,
152 152
           img: arr[n].CourseImg,
153
-          time: this.toolClass.dateFormat(arr[n].BeginDate),
153
+          remark: arr[n].Remark,
154 154
           address: arr[n].CaseInfo.CaseAddress,
155 155
           tag: arr[n].CourseTags || [],
156 156
           courseType: '',
@@ -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
   }

+ 51
- 53
src/pages/user/mainPage/coffeeIndex/index.vue Ver arquivo

@@ -29,12 +29,13 @@
29 29
                     <ul class="areaList">
30 30
                       <li v-for="(item,index) in CaseTableList" :key="index">
31 31
                         <div class="title">
32
-                          <i class="iconfont icon-yinchenglogo"></i>
32
+                          <!-- <i class="iconfont icon-yinchenglogo"></i> -->
33
+                          <img :src="item.AreaIcon" class="iconfont icon-yinchenglogo">
33 34
                           <span>{{item.AreaName}}</span>
34 35
                         </div>
35 36
                         <ul class="subAreaList flex-h">
36 37
                           <router-link tag="li" class="flex-item flex-h" v-for="(subItem,subIndex) in item.Tables" :key="subIndex" :to="{name: 'placeOrder', query: { tableid: encodeURI(subItem.TableId), tableno: encodeURI(subItem.TableNo), caseid: encodeURI(subItem.CaseId), casename: encodeURI(topCaseInfoData.caseName), areaid: encodeURI(subItem.AreaId), areaname: encodeURI(item.AreaName)}}">
37
-                            <caseTableItem :item="subItem" :index="subIndex"></caseTableItem>
38
+                            <caseTableItem :icon="item.AreaIcon" :item="subItem" :index="subIndex"></caseTableItem>
38 39
                           </router-link>
39 40
                           <li class="flex-item noData" v-if="(item.Tables || []).length % 2 != 0"></li>
40 41
                         </ul>
@@ -53,7 +54,7 @@
53 54
                       <span>¥{{cardTotalCount}}</span>
54 55
                     </div>
55 56
                   </div>
56
-                  <a @click="toSalesHistory">销售记录</a>
57
+                  <a @click="toSalesHistory" v-if="userInfo.customer.UserTypeId == 'manager'">销售记录</a>
57 58
                 </div>
58 59
                 <myCard v-for="(item,index) in data[1].list" :key="index" :data='item' @share='shareCard'></myCard>
59 60
               </div>
@@ -132,6 +133,7 @@ const { mapActions: caseTableActions } = createNamespacedHelpers('placeOrderForC
132 133
 const { mapState: mapCaseState, mapActions: mapCaseActions } = createNamespacedHelpers('case')
133 134
 const { mapState: mapCardState, mapActions: mapCardActions } = createNamespacedHelpers('myCard')
134 135
 const { mapActions: mapUserCenterActions } = createNamespacedHelpers('userCenter')
136
+const wx = require('weixin-js-sdk')
135 137
 
136 138
 export default {
137 139
   name: '',
@@ -184,7 +186,7 @@ export default {
184 186
       topCaseInfoData: {
185 187
         caseName: '',
186 188
         caseId: '',
187
-        ShowSelect: true,
189
+        ShowSelect: false,
188 190
       },
189 191
       caseInfo: {
190 192
         value: '',
@@ -231,17 +233,6 @@ export default {
231 233
     }
232 234
   },
233 235
   computed: {
234
-    pullUpLoadObj: function () {
235
-      return this.pullUpLoad
236
-        ? {
237
-          threshold: parseInt(this.pullUpLoadThreshold),
238
-          txt: {
239
-            more: this.pullUpLoadMoreTxt,
240
-            noMore: this.pullUpLoadNoMoreTxt
241
-          }
242
-        }
243
-        : false
244
-    },
245 236
     ...mapState({
246 237
       userInfo: x => x.userCenter.userInfo,
247 238
       CaseList: x => x.app.CaseList,
@@ -327,6 +318,8 @@ export default {
327 318
           this.cardTotalCount = count.toFixed(2)
328 319
         })
329 320
       })
321
+    } else {
322
+
330 323
     }
331 324
     this.getCaseList().then((res) => {
332 325
       this.locationMapping()
@@ -427,45 +420,50 @@ export default {
427 420
       window.location.href = this.getUrl('customerSearch')
428 421
     },
429 422
     locationMapping () {
430
-      // wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
431
-      //   title: '城的空间',
432
-      //   desc: '城的空间',
433
-      //   link: `${window.location.origin}${window.location.pathname}/user.html#/mainPage/indexPage`,
434
-      //   thu_image: `${window.location.origin}${window.location.pathname}${logo}`
435
-      // }).then(() => {
436
-      //   wx.getLocation({
437
-      //     type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
438
-      //     success: function (res) {
439
-      //       let latitude1 = res.latitude // 纬度,浮点数,范围为90 ~ -90
440
-      //       let longitude1 = res.longitude // 经度,浮点数,范围为180 ~ -180。
441
-      //       for (let i = 0; i < this.CaseList.length; i++) {
442
-      //         let result = this.CaseList[i].Coordinate.split(",")
443
-      //         let latitude2 = parseFloat(result[0])
444
-      //         let longitude2 = parseFloat(result[1])
445
-      //         if (this.toolClass.getGreatCircleDistance(latitude1, longitude1, latitude2, longitude2) < 500) {
446
-      //           this.topCaseInfoData.caseName = this.CaseList[i].CaseName
447
-      //           this.topCaseInfoData.caseId = this.CaseList[i].CaseId
448
-      //           this.getCaseTableList({
449
-      //             caseid: this.topCaseInfoData.caseId
450
-      //           })
451
-      //           this.getCaseTotal({
452
-      //             caseid: this.topCaseInfoData.caseId
453
-      //           })
454
-      //         }
455
-      //       }
456
-      //       if (!this.topCaseInfoData.caseId || !this.topCaseInfoData.caseName){
457
-      //         this.topCaseInfoData.caseName = '当前位置无案场'
458
-      //       }
459
-      //     }
460
-      //   })
461
-      // })
462
-      this.topCaseInfoData.caseName = this.CaseList[0].CaseName
463
-      this.topCaseInfoData.caseId = this.CaseList[0].CaseId
464
-      this.getCaseTableList({
465
-        caseid: this.topCaseInfoData.caseId
423
+      let that = this
424
+      that.topCaseInfoData.caseName = that.CaseList[0].CaseName
425
+      that.topCaseInfoData.caseId = that.CaseList[0].CaseId
426
+      that.getCaseTableList({
427
+        caseid: that.topCaseInfoData.caseId
466 428
       })
467
-      this.getCaseTotal({
468
-        caseid: this.topCaseInfoData.caseId
429
+      if (this.userInfo.customer.MapUser !== '') {
430
+        that.getCaseTotal({
431
+          caseid: that.topCaseInfoData.caseId
432
+        })
433
+      }
434
+      wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
435
+        title: '城的空间',
436
+        desc: '城的空间',
437
+        link: `${window.location.origin}${window.location.pathname}/user.html#/mainPage/indexPage`,
438
+        thu_image: `${window.location.origin}${window.location.pathname}${logo}`
439
+      }).then(() => {
440
+        wx.getLocation({
441
+          type: 'gcj02', // 默认为wgs84的gps坐标,如果要返回直接给openLocation用的火星坐标,可传入'gcj02'
442
+          success: function (res) {
443
+            let latitude1 = res.latitude // 纬度,浮点数,范围为90 ~ -90
444
+            let longitude1 = res.longitude // 经度,浮点数,范围为180 ~ -180。
445
+            for (let i = 0; i < that.CaseList.length; i++) {
446
+              let result = that.CaseList[i].Coordinate.split(",")
447
+              let latitude2 = parseFloat(result[0])
448
+              let longitude2 = parseFloat(result[1])
449
+              if (that.toolClass.getGreatCircleDistance(latitude1, longitude1, latitude2, longitude2) < 500) {
450
+                that.topCaseInfoData.caseName = that.CaseList[i].CaseName
451
+                that.topCaseInfoData.caseId = that.CaseList[i].CaseId
452
+                that.getCaseTableList({
453
+                  caseid: that.topCaseInfoData.caseId
454
+                })
455
+                if (this.userInfo.customer.MapUser !== '') {
456
+                  that.getCaseTotal({
457
+                    caseid: that.topCaseInfoData.caseId
458
+                  })
459
+                }
460
+              }
461
+            }
462
+            if (!that.topCaseInfoData.caseId || !that.topCaseInfoData.caseName) {
463
+              that.topCaseInfoData.caseName = '当前位置无案场'
464
+            }
465
+          }
466
+        })
469 467
       })
470 468
     },
471 469
     beforeClose (action, done) {

+ 8
- 3
src/pages/user/mainPage/coffeeIndex/page.scss Ver arquivo

@@ -105,12 +105,17 @@
105 105
                       margin-top: .22rem;
106 106
                       *{
107 107
                         line-height: .26rem;
108
+                        display: inline-block;
109
+                        vertical-align: middle;
108 110
                         font-size: .14rem;
109 111
                       }
110
-                      i{
111
-                        color: red;
112
-                        margin-right: .05rem;
112
+                      img{
113
+                        width: .2rem;
113 114
                       }
115
+                      // i{
116
+                      //   color: red;
117
+                      //   margin-right: .05rem;
118
+                      // }
114 119
                     }
115 120
                     .subAreaList{
116 121
                       position: relative;

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

@@ -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
 

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

@@ -73,6 +73,7 @@ import { swiper, swiperSlide } from 'vue-awesome-swiper'
73 73
 import 'swiper/dist/css/swiper.css'
74 74
 import { mapState, createNamespacedHelpers } from 'vuex'
75 75
 const { mapActions: mapIndexActions } = createNamespacedHelpers('index')
76
+const { mapState: mapUserState } = createNamespacedHelpers('userCenter')
76 77
 export default {
77 78
   name: '',
78 79
   data () {
@@ -99,6 +100,9 @@ export default {
99 100
     }
100 101
   },
101 102
   computed: {
103
+    ...mapUserState({
104
+      userInfo: x => x.userInfo
105
+    }),
102 106
     ...mapState({
103 107
       orgid: x => x.app.orgId,
104 108
       fiveA: x => x.index.fiveA,
@@ -145,11 +149,11 @@ export default {
145 149
     jump (item) {
146 150
       item.ForwardType = item.ForwardType || ''
147 151
       if (item.ForwardType === 'url') {
148
-        window.location.href = '//' + item.ForwardUrl
152
+        window.location.href = item.ForwardUrl
149 153
       } else if (item.ForwardType === 'course') {
150 154
         this.$router.push({ name: '', query: { id: item.ForwardResourceId } }) // 此处去课程详情
151 155
       } else {
152
-        window.location.href = '//' + item.InfoUrl
156
+        window.location.href = item.InfoUrl
153 157
       }
154 158
     }
155 159
   }

+ 13
- 10
src/pages/user/mainPage/userCenter/index.vue Ver arquivo

@@ -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">
@@ -23,21 +24,21 @@
23 24
             <img src="../../../../common/icon/userCenter-icon-1.png" width="100%" height="100%" alt="">
24 25
           </div>
25 26
           <span>优惠券</span>
26
-          <span>2张未使用</span>
27
+          <span>{{Nums.couponnum || 0}}张未使用</span>
27 28
         </div>
28 29
         <div class="flex-item privilege-item" @click="toCard">
29 30
           <div class="img-box">
30 31
             <img src="../../../../common/icon/userCenter-icon-2.png" width="100%" height="100%" alt="">
31 32
           </div>
32 33
           <span>卡券</span>
33
-          <span>2张未使用</span>
34
+          <span>{{Nums.cardsnum || 0}}张未使用</span>
34 35
         </div>
35 36
         <div class="flex-item privilege-item" @click="toVip">
36 37
           <div class="img-box">
37 38
             <img src="../../../../common/icon/userCenter-icon-3.png" width="100%" height="100%" alt="">
38 39
           </div>
39 40
           <span>VIP卡</span>
40
-          <span>¥200 <i class="iconfont icon-jiantou-right" style="font-size: 0.1rem;"></i></span>
41
+          <span>¥{{(Nums.account || {}).Amount || 0}} <i class="iconfont icon-jiantou-right" style="font-size: 0.1rem;"></i></span>
41 42
         </div>
42 43
       </div>
43 44
 
@@ -77,7 +78,8 @@ export default {
77 78
   computed: {
78 79
     ...mapState({
79 80
       userInfo: x => x.userCenter.userInfo,
80
-      org: x => x.app.orgId
81
+      org: x => x.app.orgId,
82
+      Nums: x => x.userCenter.Nums
81 83
     })
82 84
   },
83 85
   components: {
@@ -85,16 +87,17 @@ export default {
85 87
   },
86 88
   mounted () {
87 89
     this.getUserInfo({ org: this.org }).then(() => {
88
-      if (this.userInfo != 406) {
90
+      if (this.userInfo) {
89 91
         this.user = this.userInfo.customer
90 92
         this.AccountInfo = JSON.parse(this.user.AccountInfo)
91 93
         this.headimgurl = this.AccountInfo.headimgurl
92 94
         this.isLoading = false
93 95
       }
94 96
     })
97
+    this.getNum()
95 98
   },
96 99
   methods: {
97
-    ...actions(['getUserInfo']),
100
+    ...actions(['getUserInfo', 'getNum']),
98 101
     toLessonOrder () {
99 102
       this.$router.push({ name: 'lessonOrder' })
100 103
     },
@@ -114,7 +117,7 @@ export default {
114 117
       this.$router.push({ name: 'orderList' })
115 118
     },
116 119
     toBodyCheck () {
117
-      window.location.href = `/bodyCheck.html#/`
120
+      window.location.href = `${window.location.origin}/c-v2/bodyCheck.html#/`
118 121
     },
119 122
     toLuckdraw () {
120 123
       // ^参数约定为97
@@ -122,7 +125,7 @@ export default {
122 125
       let num = Math.floor(Math.random() * 10 + 1) * 100 + Math.floor(Math.random() * 10 + 1) * 10 + Math.floor(Math.random() * 10 + 1)
123 126
       num = num >= 1000 ? 999 : num
124 127
       userid = parseInt(`${userid}${num}`) ^ 97
125
-      window.location.href = `/game/luckdraw/#/lotteryList?from=${userid}`
128
+      window.location.href = `${window.location.origin}/game/luckdraw/#/lotteryList?from=${userid}`
126 129
     }
127 130
   }
128 131
 }

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

@@ -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 arquivo

@@ -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;

+ 14
- 1
src/pages/user/majorProjectsDetail/index.vue Ver arquivo

@@ -64,21 +64,25 @@
64 64
           <span>优惠券体验</span>
65 65
         </div>
66 66
       </div>
67
-      <router-link :to="{name: 'placeOrderForCourse', query: {id: courseDetail.CourseId}}">去购买</router-link>
67
+      <a @click="toBuy">去购买</a>
68 68
     </div>
69 69
   </div>
70 70
 </template>
71 71
 
72 72
 <script>
73
+import wxsdk from '../../../util/share'
74
+import logo from '../../../common/icon/indexlogo.jpg'
73 75
 import { swiper, swiperSlide } from 'vue-awesome-swiper'
74 76
 import 'swiper/dist/css/swiper.css'
75 77
 import { mapState, createNamespacedHelpers } from 'vuex'
76 78
 const { mapActions: mapProjectActions, mapState: mapProjectState } = createNamespacedHelpers('majorProjects')
79
+const wx = require('weixin-js-sdk')
77 80
 
78 81
 export default {
79 82
   name: '',
80 83
   data () {
81 84
     return {
85
+      logo,
82 86
       swiperOption: {
83 87
         observer: true,
84 88
         autoplay: {
@@ -156,6 +160,15 @@ export default {
156 160
     triggerCourseTime () { // 显隐更多课程时间
157 161
       this.showMoreCourse = !this.showMoreCourse
158 162
     },
163
+    toBuy () {
164
+      let nowDate = Date.now()
165
+      let endData = new Date(this.courseDetail.EndDate).getTime()
166
+      if (nowDate > endData) {
167
+        this.$toast('该课程已过期')
168
+      } else {
169
+        this.$router.push({ name: 'placeOrderForCourse', query: { id: this.courseDetail.CourseId } })
170
+      }
171
+    }
159 172
   }
160 173
 }
161 174
 </script>

+ 11
- 11
src/pages/user/placeOrder/index.vue Ver arquivo

@@ -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,13 +206,13 @@ 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
       }
215 213
     },
216 214
     mapArr () { // 匹配商品规格
217
-      var aArr = this.goodsTypeList, bArr = this.goodsList
215
+      var aArr = (this.goodsTypeList || []), bArr = (this.goodsList || [])
218 216
       for (var n = 0; n < aArr.length; n++) {
219 217
         aArr[n].list = []
220 218
         for (var a = 0; a < bArr.length; a++) {
@@ -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
     },
@@ -337,7 +335,9 @@ export default {
337 335
           specname: (val.specname || ''),
338 336
         })
339 337
       } else {
340
-        this.selGoods.splice(this.selGoods.findIndex(item => item.id === val.id && item.spec === (val.spec || '')), 1)
338
+        if (val.defaultNum === 0) {
339
+          this.selGoods.splice(this.selGoods.findIndex(item => item.id === val.id && item.spec === (val.spec || '')), 1)
340
+        }
341 341
       }
342 342
     },
343 343
     calcTotalNum () { // 计算总数量、价格

+ 36
- 37
src/pages/user/placeOrderForCourse/index.vue Ver arquivo

@@ -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: '',
@@ -163,39 +162,39 @@ export default {
163 162
       this.getCourseDetailInfo({ id: this.$route.query.id }).then((res) => {
164 163
         var arr = res.CourseDetail
165 164
         this.courseTimeList = arr.sort(function (a, b) { return new Date(a.BeginDate).getTime() > new Date(b.BeginDate).getTime() ? 1 : -1 })
166
-      })
167
-      var id = this.$route.query.id, arr = [], nowDate = Date.now()
168
-      for (var n = 0; n < res.length; n++) {
169
-        if (res[n].Coupon.CouponType === 'coupon' && res[n].Status === 1) {
170
-          if (res[n].Coupon.IsAll) {
171
-            this.couponList.push({
172
-              title: res[n].Coupon.CouponName,
173
-              desc: res[n].Coupon.Share.UseInstruction,
174
-              time: this.toolClass.dateFormat(res[n].EndDate),
175
-              useType: '未使用',
176
-              tag: '课程',
177
-              id: res[n].CustomerCouponId,
178
-              select: false,
179
-            })
180
-          } else {
181
-            for (var a = 0; a < res[n].Coupon.Targets.length; a++) {
182
-              if (res[n].Coupon.Targets[a].TargetId === id && nowDate >= new Date(res[n].StartDate).getTime() && nowDate < new Date(res[n].EndDate).getTime()) {
183
-                this.couponList.push({
184
-                  title: res[n].Coupon.CouponName,
185
-                  desc: res[n].Coupon.Share.UseInstruction,
186
-                  time: this.toolClass.dateFormat(res[n].EndDate),
187
-                  useType: '未使用',
188
-                  tag: '课程',
189
-                  id: res[n].CustomerCouponId,
190
-                  select: false,
191
-                })
165
+        var id = this.$route.query.id, arr = [], nowDate = Date.now()
166
+        for (var n = 0; n < res.length; n++) {
167
+          if (res[n].Coupon.CouponType === 'coupon' && res[n].Status === 1) {
168
+            if (res[n].Coupon.IsAll) {
169
+              this.couponList.push({
170
+                title: res[n].Coupon.CouponName,
171
+                desc: res[n].Coupon.Share.UseInstruction,
172
+                time: this.toolClass.dateFormat(res[n].EndDate),
173
+                useType: '未使用',
174
+                tag: '课程',
175
+                id: res[n].CustomerCouponId,
176
+                select: false,
177
+              })
178
+            } else {
179
+              for (var a = 0; a < res[n].Coupon.Targets.length; a++) {
180
+                if (res[n].Coupon.Targets[a].TargetId === id && nowDate >= new Date(res[n].StartDate).getTime() && nowDate < new Date(res[n].EndDate).getTime()) {
181
+                  this.couponList.push({
182
+                    title: res[n].Coupon.CouponName,
183
+                    desc: res[n].Coupon.Share.UseInstruction,
184
+                    time: this.toolClass.dateFormat(res[n].EndDate),
185
+                    useType: '未使用',
186
+                    tag: '课程',
187
+                    id: res[n].CustomerCouponId,
188
+                    select: false,
189
+                  })
190
+                }
192 191
               }
193 192
             }
194 193
           }
195 194
         }
196
-      }
197
-      this.getCouponOff = true
198
-      // console.log(JSON.stringify(this.couponList))
195
+        this.getCouponOff = true
196
+        // console.log(JSON.stringify(this.couponList))
197
+      })
199 198
     })
200 199
   },
201 200
   methods: {

+ 11
- 4
src/pages/user/receive/index.vue Ver arquivo

@@ -140,12 +140,19 @@ export default {
140 140
       return `${rnd}${timestamp}`
141 141
     },
142 142
     sdk (info) {
143
-      let logo = this.data.Images[0].CouponImageUrl ? this.data.Images[0].CouponImageUrl : this.data.Images[0].CardImageUrl
143
+      let logo, title
144
+      if ($route.query.type === 'card') {
145
+        logo = this.data.Images[0].CardImageUrl
146
+        title = this.data.CardName
147
+      } else {
148
+        logo = this.data.Images[0].CouponImageUrl
149
+        title = this.data.CouponName
150
+      }
144 151
       wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
145
-        title: '领取卡券',
152
+        title: title,
146 153
         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`,
148
-        thu_image: `${window.location.origin}${window.location.pathname}${logo}`
154
+        link: `${window.location.origin}${window.location.pathname}#/receiveShared/${this.$route.query.id}/${this.$route.query.salesid}/${this.$route.query.type}/receive`,
155
+        thu_image: logo
149 156
       })
150 157
     }
151 158
   }

+ 11
- 4
src/pages/user/receiveChannel/index.vue Ver arquivo

@@ -131,12 +131,19 @@ export default {
131 131
       }
132 132
     },
133 133
     sdk (info) {
134
-      let logo = this.data.Images[0].CouponImageUrl ? this.data.Images[0].CouponImageUrl : this.data.Images[0].CardImageUrl
134
+      let logo, title
135
+      if ($route.query.type === 'card') {
136
+        logo = this.data.Images[0].CardImageUrl
137
+        title = this.data.CardName
138
+      } else {
139
+        logo = this.data.Images[0].CouponImageUrl
140
+        title = this.data.CouponName
141
+      }
135 142
       wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
136
-        title: '领取卡券',
143
+        title: title,
137 144
         desc: info,
138
-        link: `${window.location.origin}${window.location.pathname}/user.html#/receiveChannelShared/${this.$route.query.id}/${this.$route.query.type}/receive`,
139
-        thu_image: `${window.location.origin}${window.location.pathname}${logo}`
145
+        link: `${window.location.origin}${window.location.pathname}#/receiveChannelShared/${this.$route.query.id}/${this.$route.query.type}/receive`,
146
+        thu_image: logo
140 147
       })
141 148
     }
142 149
   }

+ 2
- 2
src/pages/user/receiveResults/index.vue Ver arquivo

@@ -9,7 +9,7 @@
9 9
       <span v-else>{{msg}}</span>
10 10
       <div class="back" v-if="status === 'success'" @click="back">查看我的体验券</div>
11 11
       <div v-else></div>
12
-      <img :src="logo">
12
+      <img :src="logo" class="bottomLogo">
13 13
     </div>
14 14
   </div>
15 15
 </template>
@@ -35,7 +35,7 @@ export default {
35 35
   },
36 36
   methods: {
37 37
     back () {
38
-      this, $router.push({ name: 'userCenter' })
38
+      this.$router.push({ name: 'userCenter' })
39 39
     }
40 40
   }
41 41
 }

+ 1
- 0
src/pages/user/receiveResults/page.scss Ver arquivo

@@ -32,5 +32,6 @@
32 32
   img{
33 33
     width: 1rem;
34 34
     margin-top: 1rem;
35
+    opacity: .5;
35 36
   }
36 37
 }

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

@@ -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 arquivo

@@ -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 arquivo

@@ -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

+ 15
- 1
src/store/userCenter/userCenter.js Ver arquivo

@@ -73,6 +73,7 @@ http.submitData = (data) => { // 绑定手机号
73 73
 export default {
74 74
   namespaced: true,
75 75
   state: {
76
+    Nums: {},
76 77
     userInfo: {},
77 78
     caseInfo: {},
78 79
     courseOrderList: {},
@@ -80,6 +81,9 @@ export default {
80 81
     courseOrderDetail: {},
81 82
   },
82 83
   mutations: {
84
+    setNums (state, data) {
85
+      state.Nums = data || {}
86
+    },
83 87
     setUserInfo (state, data) {
84 88
       state.userInfo = data
85 89
     },
@@ -96,11 +100,21 @@ export default {
96 100
       if (page <= 1) {
97 101
         state.courseOrderList = res
98 102
       } else {
99
-        state.courseOrderList = {...res, list: [...state.courseOrderList.list, ...res.list]}
103
+        state.courseOrderList = { ...res, list: [...state.courseOrderList.list, ...res.list] }
100 104
       }
101 105
     }
102 106
   },
103 107
   actions: {
108
+    getNum (context) { // 获取我的用户领取卡信息
109
+      return new Promise((resolve) => {
110
+        Ajax({
111
+          ...api.user.getNum
112
+        }).then(res => {
113
+          context.commit('setNums', res)
114
+          resolve(res)
115
+        })
116
+      })
117
+    },
104 118
     getCustomerCardList (context, { id, payload }) { // 获取我的用户领取卡信息
105 119
       return new Promise((resolve) => {
106 120
         Ajax(api.sales.getCustomerCardList.url, {

+ 3
- 1
src/util/ajax.js Ver arquivo

@@ -10,7 +10,9 @@ const token = function (headers) {
10 10
     localStorage.setItem('JWT', headers.authorization)
11 11
     JWT = headers.authorization
12 12
   }
13
-  return JWT ? JWT : localStorage.getItem('JWT')
13
+  const token = JWT ? JWT : localStorage.getItem('JWT')
14
+
15
+  return !token ? '' : token
14 16
 }
15 17
 
16 18
 const Axios = axios.create({

+ 5
- 2
src/util/api.js Ver arquivo

@@ -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: { // 首页
@@ -126,6 +125,10 @@ const $api = {
126 125
       method: 'get',
127 126
       url: `${baseUrl}${wechat}/gymcard/:customerGymId`
128 127
     },
128
+    getNum: { // 获取卡券数
129
+      method: 'get',
130
+      url: `${baseUrl}${wechat}/customer/info`
131
+    }
129 132
   },
130 133
   director: {
131 134
     getSales: { // 获取销售列表
@@ -204,7 +207,7 @@ const $api = {
204 207
   share: {
205 208
     share: {
206 209
       method: 'get',
207
-      url: `${baseUrl}${guest}/wechat/jssdk/signature/:url`
210
+      url: `${baseUrl}${guest}/wechat/jssdk/signature`
208 211
     },
209 212
     card: {
210 213
       method: 'get',

+ 4
- 2
src/util/share.js Ver arquivo

@@ -14,14 +14,16 @@ function wxsdk (params, config) {
14 14
   return new Promise(function (resolve, reject) {
15 15
     Ajax(api.share.share.url, {
16 16
       method: api.share.share.method,
17
-      urlData: {
17
+      queryData: {
18 18
         ...params
19 19
       }
20 20
     }).then(result => {
21
+      console.log(result)
22
+      let time = parseInt(result.timestamp)
21 23
       wx.config({
22 24
         debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
23 25
         appId: result.appId, // 必填,公众号的唯一标识
24
-        timestamp: result.timestamp, // 必填,生成签名的时间戳
26
+        timestamp: time, // 必填,生成签名的时间戳
25 27
         nonceStr: result.noncestr, // 必填,生成签名的随机串
26 28
         signature: result.signature, // 必填,签名,见附录1
27 29
         jsApiList: [

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

@@ -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
 }

+ 2
- 4
vue.config.js Ver arquivo

@@ -20,14 +20,12 @@ 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
-        // target: 'http://192.168.0.62:8080', // wf
26
+        target: 'http://192.168.0.62:8080', // wf
29 27
         // target: 'http://192.168.0.125:8080', // hyq
30
-        target: 'http://192.168.0.11', // ys
28
+        // target: 'http://192.168.0.11', // ys
31 29
         // target: 'http://dev.ycjcjy.com', // frp
32 30
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
33 31
         // pathRewrite: {