Browse Source

Merge branch 'dev' of http://git.ycjcjy.com/SpaceOfCheng/wechat into dev

wangfei 6 years ago
parent
commit
361cad4be9

BIN
src/common/icon/Group 3@3x.png View File


BIN
src/common/icon/bottomMsg.png View File


+ 1
- 1
src/components/courseItem/index.vue View File

24
         </div>
24
         </div>
25
       </div>
25
       </div>
26
       <ul v-if="data.getWay=='ticket'">
26
       <ul v-if="data.getWay=='ticket'">
27
-        <li v-for="(item,index) in data.tag" :key="index">{{item}}</li>
27
+        <li v-for="(item,index) in data.tag" :key="index">{{item.TagName}}</li>
28
       </ul>
28
       </ul>
29
       <div v-if="data.getWay=='free'" class="flex-h">
29
       <div v-if="data.getWay=='free'" class="flex-h">
30
         <div class="flex-item">
30
         <div class="flex-item">

+ 1
- 1
src/components/discounts/discounts.vue View File

11
       </div>
11
       </div>
12
       <div class="card-right">
12
       <div class="card-right">
13
         <img :src="logo" alt="" width="100%" height="100%">
13
         <img :src="logo" alt="" width="100%" height="100%">
14
-        <div class="btn" @click.stop="toUse" v-if="data.useType == '未使用'">去使用</div>
14
+        <div class="btn" @click.stop="toUse" v-if="data.useType == '未使用' && !data.hideBtn">去使用</div>
15
       </div>
15
       </div>
16
       <div class="tag" :class="{'gray-location' : data.useType == '已使用'}">
16
       <div class="tag" :class="{'gray-location' : data.useType == '已使用'}">
17
         <span>{{data.tag}}</span>
17
         <span>{{data.tag}}</span>

+ 13
- 5
src/components/myCard/myCard.vue View File

1
 <template>
1
 <template>
2
-  <div class="card-content flex-l" :class="{invalid: data.invalid}">
2
+  <div class="card-content flex-l" :class="{invalid: data.invalid || isgrey}">
3
     <div class="card-top flex-h">
3
     <div class="card-top flex-h">
4
       <div>
4
       <div>
5
         <img :src="logo" class="logo">
5
         <img :src="logo" class="logo">
54
     data: {
54
     data: {
55
       type: Object,
55
       type: Object,
56
       default: () => { }
56
       default: () => { }
57
+    },
58
+    isgrey: {
59
+      type: Boolean,
60
+      default: false
57
     }
61
     }
58
   },
62
   },
59
   methods: {
63
   methods: {
60
     share () {
64
     share () {
61
       if (!this.data.invalid) {
65
       if (!this.data.invalid) {
62
-        this.$emit('share', this.data)
66
+        if (this.isgrey) {
67
+          this.$toast('您的卡券分享功能已被关闭,请联系主管')
68
+        } else {
69
+          this.$emit('share', this.data)
70
+        }
63
       }
71
       }
64
     }
72
     }
65
   }
73
   }
86
       display: -webkit-box;
94
       display: -webkit-box;
87
       -webkit-line-clamp: 2;
95
       -webkit-line-clamp: 2;
88
       -webkit-box-orient: vertical;
96
       -webkit-box-orient: vertical;
89
-      height: .32rem;
90
-      line-height: .16rem;
97
+      height: 0.32rem;
98
+      line-height: 0.16rem;
91
     }
99
     }
92
     div:nth-of-type(1) {
100
     div:nth-of-type(1) {
93
       width: 1.15rem;
101
       width: 1.15rem;
124
       }
132
       }
125
       span {
133
       span {
126
         color: #323645;
134
         color: #323645;
127
-        font-size: 12px;      
135
+        font-size: 12px;
128
         padding-top: 0.05rem;
136
         padding-top: 0.05rem;
129
       }
137
       }
130
     }
138
     }

+ 6
- 5
src/components/noMore/noMore.vue View File

16
 </script>
16
 </script>
17
 
17
 
18
 <style lang="scss" scoped>
18
 <style lang="scss" scoped>
19
-.nomore{
20
-  img{
21
-    width: 100%;
19
+.nomore {
20
+  img {
21
+    width: 40%;
22
     position: absolute;
22
     position: absolute;
23
-    top: 40%;
24
-    transform: translateX(-50%);
23
+    top: 50%;
24
+    left: 50%;
25
+    transform: translate(-50%, -50%);
25
   }
26
   }
26
 }
27
 }
27
 </style>
28
 </style>

+ 1
- 1
src/components/orderItem/index.vue View File

18
           </div>
18
           </div>
19
         </div>
19
         </div>
20
         <i class="iconfont icon-jian" :class="{'active': defaultNum > 0}" @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
-        <input v-if="!data.spec.length && data.status === 1" type="tel" @input="input" v-model="defaultNum">
21
+        <input v-if="!data.spec.length && data.status === 1" type="tel" @input="input" v-model="defaultNum" readonly style="color:#000;">
22
         <i class="iconfont icon-jia" :class="{'active': defaultNum > 0}" @click="add" v-if="!data.spec.length && data.status === 1"></i>
22
         <i class="iconfont icon-jia" :class="{'active': defaultNum > 0}" @click="add" v-if="!data.spec.length && data.status === 1"></i>
23
         <a v-if="data.spec.length && data.status === 1" @click="selectSpec">选规格</a>
23
         <a v-if="data.spec.length && data.status === 1" @click="selectSpec">选规格</a>
24
         <span v-if="data.status !== 1">已售罄</span>
24
         <span v-if="data.status !== 1">已售罄</span>

+ 1
- 1
src/components/orderPopup/index.vue View File

22
           </div>
22
           </div>
23
         </div>
23
         </div>
24
         <i class="iconfont icon-jian" @click="subtract"></i>
24
         <i class="iconfont icon-jian" @click="subtract"></i>
25
-        <input type="tel" v-model="num">
25
+        <input type="tel" v-model="num" readonly style="color:#000;">
26
         <i class="iconfont icon-jia" @click="add"></i>
26
         <i class="iconfont icon-jia" @click="add"></i>
27
         <a @click="sure">确定</a>
27
         <a @click="sure">确定</a>
28
       </div>
28
       </div>

+ 3
- 2
src/pages/sales/customerSearch/page.scss View File

89
         height: .3rem;
89
         height: .3rem;
90
         background: #eee;
90
         background: #eee;
91
         border-radius: .08rem;
91
         border-radius: .08rem;
92
-        padding-left: .2rem;
92
+        padding-left: .3rem;
93
         line-height: .3rem;
93
         line-height: .3rem;
94
+        padding-top: .03rem;
94
       }
95
       }
95
       i{
96
       i{
96
         font-size: .16rem;
97
         font-size: .16rem;
97
         position: absolute;
98
         position: absolute;
98
-        top: .16rem;
99
+        top: .18rem;
99
         left: .23rem;
100
         left: .23rem;
100
         color: #aaa;
101
         color: #aaa;
101
       }
102
       }

+ 7
- 1
src/pages/user/bindMobile/bindMobile.vue View File

110
           }
110
           }
111
         }
111
         }
112
       }
112
       }
113
+      if (this.caseInfo.manager) {
114
+        for (let i = 0; i < this.caseInfo.manager.length; i++) {
115
+          if (this.caseInfo.manager[i].CaseId === this.postData.case) {
116
+            this.columnsS.push(this.caseInfo.manager[i])
117
+          }
118
+        }
119
+      }
113
       this.showCase = false
120
       this.showCase = false
114
     },
121
     },
115
     onCancelC () {
122
     onCancelC () {
169
       //   return
176
       //   return
170
       // }
177
       // }
171
       this.submitData(this.postData).then((res) => {
178
       this.submitData(this.postData).then((res) => {
172
-        this.$toast(res)
173
         if (this.$route.query.isLottery) {
179
         if (this.$route.query.isLottery) {
174
           setTimeout(() => {
180
           setTimeout(() => {
175
             const from = this.$route.query.luckshare ? `#/from/${this.$route.query.luckshare}` : ''
181
             const from = this.$route.query.luckshare ? `#/from/${this.$route.query.luckshare}` : ''

+ 25
- 19
src/pages/user/card/index.vue View File

3
     <nav class="flex-h" v-if='false'>
3
     <nav class="flex-h" v-if='false'>
4
       <a class="flex-item" v-for="(item,index) in nav" :key="index" :class="{'active':index==active}" @click="change(item,index)">{{item}}</a>
4
       <a class="flex-item" v-for="(item,index) in nav" :key="index" :class="{'active':index==active}" @click="change(item,index)">{{item}}</a>
5
     </nav>
5
     </nav>
6
-    <scroll ref='scroll' :isloading='isloading' class='wrapper' :data='data[active].list' :pullUpLoad='pullUpLoadObj' :startY='parseInt(startY)' @pullingUp='getList'>
6
+    <div style="background:#fff;">
7
+    <!-- <scroll ref='scroll' :isloading='isloading' class='wrapper' :data='data[active].list' :pullUpLoad='pullUpLoadObj' :startY='parseInt(startY)' @pullingUp='getList'> -->
7
       <div class="box">
8
       <div class="box">
8
         <div v-if="active == 0">
9
         <div v-if="active == 0">
9
           <discounts v-for="(item,index) in data[0].list" :key='index' @toUse='toUse' :data='item' @toDetail="toCardDetail(item)"></discounts>
10
           <discounts v-for="(item,index) in data[0].list" :key='index' @toUse='toUse' :data='item' @toDetail="toCardDetail(item)"></discounts>
29
               </div>
30
               </div>
30
               <div class="card-bottom">
31
               <div class="card-bottom">
31
                 <img :src="line" alt="">
32
                 <img :src="line" alt="">
32
-                <div class="time">有效期:{{toolClass.dateFormat(item.EndDate)}}</div>
33
+                <div class="time">有效期:{{toolClass.dateFormat(item.EndDate,'yyyy-MM-dd')}}</div>
33
                 <div class="status" :class="{'gray-location' : item.CardStatus == 'used'}">
34
                 <div class="status" :class="{'gray-location' : item.CardStatus == 'used'}">
34
                   <span v-if="item.GymType == 'year'">年卡</span>
35
                   <span v-if="item.GymType == 'year'">年卡</span>
35
                   <span v-if="item.GymType == 'quarter'">季卡</span>
36
                   <span v-if="item.GymType == 'quarter'">季卡</span>
46
           <noMore v-if="data[active].hasPic"></noMore>
47
           <noMore v-if="data[active].hasPic"></noMore>
47
         </div>
48
         </div>
48
       </div>
49
       </div>
49
-    </scroll>
50
+    </div>
51
+    <!-- </scroll> -->
50
   </div>
52
   </div>
51
 </template>
53
 </template>
52
 
54
 
80
           hasPic: false,
82
           hasPic: false,
81
           hasMore: true,
83
           hasMore: true,
82
           page: 1,
84
           page: 1,
83
-          pageSize: 1,
85
+          pagesize: 1,
84
           list: []
86
           list: []
85
         },
87
         },
86
         {
88
         {
87
           hasPic: false,
89
           hasPic: false,
88
           hasMore: true,
90
           hasMore: true,
89
           page: 0,
91
           page: 0,
90
-          pageSize: 10,
92
+          pagesize: 10000,
91
           list: []
93
           list: []
92
         }
94
         }
93
       ],
95
       ],
118
   created () {
120
   created () {
119
     this.change('', 0)
121
     this.change('', 0)
120
     this.getCardList().then((res) => {
122
     this.getCardList().then((res) => {
121
-      for (var n = 0; n < res.length; n++) {
122
-        this.data[0].list.push({
123
-          title: res[n].CardName,
124
-          desc: res[n].Share.CardUseRule,
125
-          time: this.toolClass.dateFormat(res[n].EndDate),
126
-          useType: res[n].Status === 1 ? '未使用' : '已使用',
127
-          tag: '共享',
128
-          cardid: res[n].CardId
129
-        })
123
+      if (res) {
124
+        for (var n = 0; n < res.length; n++) {
125
+          this.data[0].list.push({
126
+            title: res[n].CustomerCardName,
127
+            desc: res[n].Share.CardUseRule,
128
+            time: this.toolClass.dateFormat(res[n].EndDate, 'yyyy-MM-dd'),
129
+            useType: res[n].Status === 1 ? '未使用' : '已使用',
130
+            tag: '共享',
131
+            CustomerCourseId: res[n].CustomerCourseId,
132
+            CustomerCardId: res[n].CustomerCardId
133
+          })
134
+        }
135
+      } else {
136
+        this.data[this.active].hasPic
130
       }
137
       }
131
     })
138
     })
132
   },
139
   },
141
     },
148
     },
142
     toUse (item) {
149
     toUse (item) {
143
       console.log(item)
150
       console.log(item)
144
-      this.$router.push({ name: 'lessonDetail', query: {id: item.CustomerCourseId} })
145
-      // this.$router.push({ name: 'lessonOrder' })
151
+      this.$router.push({ name: 'lessonDetail', query: { id: item.CustomerCourseId } })
146
     },
152
     },
147
     getList (param) {
153
     getList (param) {
148
       if (this.active === 0) {
154
       if (this.active === 0) {
152
           this.data[this.active].page = 0
158
           this.data[this.active].page = 0
153
         }
159
         }
154
         if (this.data[this.active].hasMore) {
160
         if (this.data[this.active].hasMore) {
155
-          this.getgymCardList({ page: this.data[this.active].page, pageSize: this.data[this.active].pageSize }).then((res) => {
161
+          this.getgymCardList({ page: this.data[this.active].page, pagesize: this.data[this.active].pagesize }).then((res) => {
156
             this.data[this.active].list = this.data[this.active].list.concat(this.gymCardList)
162
             this.data[this.active].list = this.data[this.active].list.concat(this.gymCardList)
157
             this.data[this.active].page++
163
             this.data[this.active].page++
158
-            if (this.gymCardList.length < this.data[this.active].pageSize) {
164
+            if (this.gymCardList.length < this.data[this.active].pagesize) {
159
               this.data[this.active].hasMore = false
165
               this.data[this.active].hasMore = false
160
             }
166
             }
161
             if (this.data[this.active].list.length <= 0) {
167
             if (this.data[this.active].list.length <= 0) {
171
       this.$router.push({ name: 'gymCardDetail', query: { CustomerGymId: item.CustomerGymId } })
177
       this.$router.push({ name: 'gymCardDetail', query: { CustomerGymId: item.CustomerGymId } })
172
     },
178
     },
173
     toCardDetail (item) {
179
     toCardDetail (item) {
174
-      this.$router.push({ name: 'cardDetail', query: { id: item.cardid } })
180
+      this.$router.push({ name: 'cardDetail', query: { id: item.CustomerCardId } })
175
     }
181
     }
176
   }
182
   }
177
 }
183
 }

+ 1
- 1
src/pages/user/card/page.scss View File

28
     }
28
     }
29
   }
29
   }
30
   .box{
30
   .box{
31
-    padding: .25rem;
31
+    padding: .25rem .25rem 0;
32
     box-sizing: border-box;
32
     box-sizing: border-box;
33
     .fitness-card{
33
     .fitness-card{
34
       overflow: hidden;
34
       overflow: hidden;

+ 3
- 3
src/pages/user/cardDetail/index.vue View File

4
     <div class="content" v-if="info !== null">
4
     <div class="content" v-if="info !== null">
5
       <div class="message">
5
       <div class="message">
6
         <div>
6
         <div>
7
-          <span>{{info.CardName}}</span>
8
-          <span class="sub">(可在银城会所健身房和游泳池使用)</span>
7
+          <span>{{info.CustomerCardName}}</span>
8
+          <!-- <span class="sub">(可在银城会所健身房和游泳池使用)</span> -->
9
         </div>
9
         </div>
10
         <div>
10
         <div>
11
           <span>有效时间</span>
11
           <span>有效时间</span>
12
-          <span>{{toolClass.dateFormat(info.EndDate)}}</span>
12
+          <span>{{toolClass.dateFormat(info.StartDate,'yyyy-MM-dd') + '~' + toolClass.dateFormat(info.EndDate,'yyyy-MM-dd')}}</span>
13
         </div>
13
         </div>
14
       </div>
14
       </div>
15
       <div class="rule">
15
       <div class="rule">

+ 22
- 12
src/pages/user/coupons/index.vue View File

46
     this.getCouponList().then((res) => {
46
     this.getCouponList().then((res) => {
47
       // console.log(JSON.stringify(res))
47
       // console.log(JSON.stringify(res))
48
       // console.log(JSON.stringify(this.couponList))
48
       // console.log(JSON.stringify(this.couponList))
49
-      for (var n = 0; n < res.length; n++) {
50
-        this.list.push({
51
-          title: res[n].Coupon.CouponName,
52
-          desc: res[n].Coupon.Share.UseInstruction,
53
-          time: this.toolClass.dateFormat(res[n].EndDate),
54
-          useType: res[n].Status === 1 ? '未使用' : '已使用',
55
-          tag: res[n].Coupon.CouponType === 'course' ? '课程' : '商品',
56
-          customercouponid: res[n].CustomerCouponId,
57
-          couponid: res[n].Coupon.CouponId,
58
-          Coupon: res[n].Coupon
59
-        })
49
+      if (res) {
50
+        for (var n = 0; n < res.length; n++) {
51
+          this.list.push({
52
+            title: res[n].Coupon.CouponName,
53
+            desc: res[n].Coupon.Share.UseInstruction,
54
+            time: this.toolClass.dateFormat(res[n].EndDate),
55
+            useType: res[n].Status === 1 ? '未使用' : '已使用',
56
+            tag: res[n].Coupon.CouponType === 'course' ? '课程' : '商品',
57
+            customercouponid: res[n].CustomerCouponId,
58
+            couponid: res[n].Coupon.CouponId,
59
+            Coupon: res[n].Coupon
60
+          })
61
+        }
62
+      } else {
63
+        this.hasPic = true
60
       }
64
       }
65
+
61
     })
66
     })
62
   },
67
   },
63
   methods: {
68
   methods: {
69
     },
74
     },
70
     toUse (item) {
75
     toUse (item) {
71
       console.log(item)
76
       console.log(item)
77
+      item.Coupon.Targets = item.Coupon.Targets || []
72
       if (item.Coupon.Targets.length > 1) {
78
       if (item.Coupon.Targets.length > 1) {
73
         this.$router.push({ name: 'indexPage' })
79
         this.$router.push({ name: 'indexPage' })
74
       } else {
80
       } else {
75
         if (item.tag === '商品') {
81
         if (item.tag === '商品') {
76
           this.$router.push({ name: 'coffeeIndex' })
82
           this.$router.push({ name: 'coffeeIndex' })
77
         } else {
83
         } else {
78
-          this.$router.push({ name: 'majorProjectsDetail', query: { id: item.Coupon.Targets[0].TargetId } })
84
+          if (item.Coupon.Targets && item.Coupon.Targets.length === 1) {
85
+            this.$router.push({ name: 'majorProjectsDetail', query: { id: item.Coupon.Targets[0].TargetId } })
86
+          } else {
87
+            this.$router.push({ name: 'indexPage' })
88
+          }
79
         }
89
         }
80
       }
90
       }
81
     },
91
     },

+ 1
- 2
src/pages/user/fiveA/index.vue View File

22
                 <courseItem :data="courseInfo(course)"></courseItem>
22
                 <courseItem :data="courseInfo(course)"></courseItem>
23
               </router-link>
23
               </router-link>
24
             </ul>
24
             </ul>
25
-            <span v-if="fiveANoData" style="width:100%;line-height:.3rem;display:block;text-align:center;color:#ccc;margin-bottom:.1rem;">暂无数据</span>
25
+            <!-- <span v-if="fiveANoData" style="width:100%;line-height:.3rem;display:block;text-align:center;color:#ccc;margin-bottom:.1rem;">暂无数据</span> -->
26
           </div>
26
           </div>
27
-          <router-link :to="{name:'',query:{}}" class="more">查看更多</router-link>
28
           <div style="width:100%;height:.1rem;background:#f8f8f8;margin:0 auto;"></div>
27
           <div style="width:100%;height:.1rem;background:#f8f8f8;margin:0 auto;"></div>
29
           <h5>{{item.Consult}}</h5>
28
           <h5>{{item.Consult}}</h5>
30
           <div class="newsList flex-h">
29
           <div class="newsList flex-h">

+ 12
- 6
src/pages/user/lessonDetail/index.vue View File

1
 <template>
1
 <template>
2
-  <div class="mainPage">
2
+  <div class="mainPage" v-if="showPage">
3
     <div class="title">课程详情</div>
3
     <div class="title">课程详情</div>
4
     <div class="content" :class="{'opacity' : courseOrderDetail.IsDone === 1, 'gray': courseOrderDetail.IsDone === 1}">
4
     <div class="content" :class="{'opacity' : courseOrderDetail.IsDone === 1, 'gray': courseOrderDetail.IsDone === 1}">
5
       <div class="list-item flex-h">
5
       <div class="list-item flex-h">
26
         <span>下单时间</span>
26
         <span>下单时间</span>
27
         <span class="flex-item">{{toolClass.dateFormat(courseOrderDetail.CreateDate)}}</span>
27
         <span class="flex-item">{{toolClass.dateFormat(courseOrderDetail.CreateDate)}}</span>
28
       </div>
28
       </div>
29
-      <!-- <div class="list-item">
29
+      <div class="list-item flex-h">
30
+        <span>课程时间</span>
31
+        <span class="flex-item">{{toolClass.dateFormat(courseOrderDetail.BeginDate) + ' ~ ' + toolClass.dateFormat(courseOrderDetail.EndDate)}}<span class="remark">计划备注({{courseOrderDetail.Remark}})</span> </span>
32
+      </div>
33
+      <div class="list-item">
30
         <span>地点</span>
34
         <span>地点</span>
31
         <span>{{returnCaseName(courseOrderDetail.CaseId)}}</span>
35
         <span>{{returnCaseName(courseOrderDetail.CaseId)}}</span>
32
-      </div> -->
36
+      </div>
33
       <div class="list-item">
37
       <div class="list-item">
34
         <span>付款方式</span>
38
         <span>付款方式</span>
35
-        <span>{{courseOrderDetail.CourseObtaimType === 'cheng-coin' ? '城币支付' : '优惠券抵用'}}</span>
36
-        <!-- <span>优惠券抵用 <div class="coupon-name">小拉伸柔韧度体验券</div></span> -->
39
+        <span v-if="courseOrderDetail.CourseObtaimType === 'cheng-coin'">城币支付</span>
40
+        <span v-if="courseOrderDetail.CourseObtaimType === 'card'">卡券抵用</span>
41
+        <span v-if="courseOrderDetail.CourseObtaimType === 'coupon'">优惠券抵用</span>
37
       </div>
42
       </div>
38
       <div class="half-cic">
43
       <div class="half-cic">
39
         <span></span>
44
         <span></span>
41
       </div>
46
       </div>
42
       <div class="qr-code" v-if="courseOrderDetail.IsDone === 0">
47
       <div class="qr-code" v-if="courseOrderDetail.IsDone === 0">
43
         <qrCode v-if="showQrCode" :msg="courseOrderDetail.QrCodeString"></qrCode>
48
         <qrCode v-if="showQrCode" :msg="courseOrderDetail.QrCodeString"></qrCode>
44
-        <!-- <div class="number">32237489123</div> -->
45
       </div>
49
       </div>
46
     </div>
50
     </div>
47
     <div class="useType">
51
     <div class="useType">
69
       used,
73
       used,
70
       failure,
74
       failure,
71
       showQrCode: false,
75
       showQrCode: false,
76
+      showPage: false
72
     }
77
     }
73
   },
78
   },
74
   created () {
79
   created () {
78
           id: this.$route.query.id
83
           id: this.$route.query.id
79
         }).then((res) => {
84
         }).then((res) => {
80
           this.showQrCode = true
85
           this.showQrCode = true
86
+          this.showPage = true
81
           // console.log(JSON.stringify(res))
87
           // console.log(JSON.stringify(res))
82
         })
88
         })
83
       })
89
       })

+ 6
- 2
src/pages/user/lessonDetail/page.scss View File

66
   }
66
   }
67
   .useType{
67
   .useType{
68
     position: absolute;
68
     position: absolute;
69
-    bottom: 1.6rem;
70
-    right: .8rem;
69
+    bottom: 3.2rem;
70
+    right: .5rem;
71
     width: .76rem;
71
     width: .76rem;
72
     height: .76rem;
72
     height: .76rem;
73
   }
73
   }
74
+  .remark{
75
+    font-size: .12rem;
76
+    color: #FC6243 !important;
77
+  }
74
 }
78
 }

+ 5
- 3
src/pages/user/lessonOrder/index.vue View File

9
           </div>
9
           </div>
10
           <div class="card-msg">
10
           <div class="card-msg">
11
             <div class="title">{{item.CourseName}}</div>
11
             <div class="title">{{item.CourseName}}</div>
12
-            <div class="text">付款方式:{{item.CourseObtaimType === 'cheng-coin' ? '城币支付' : '优惠券抵用'}}</div>
12
+            <div class="text" v-if="item.CourseObtaimType === 'cheng-coin'">付款方式:城币支付</div>
13
+            <div class="text" v-if="item.CourseObtaimType === 'card'">付款方式:卡券抵用</div>
14
+            <div class="text" v-if="item.CourseObtaimType === 'coupon'">付款方式:优惠券抵用</div>
13
             <div class="text">下单时间:{{toolClass.dateFormat(item.CreateDate)}}</div>
15
             <div class="text">下单时间:{{toolClass.dateFormat(item.CreateDate)}}</div>
14
           </div>
16
           </div>
15
           <div class="card-price">
17
           <div class="card-price">
17
             <div class="type" :class="{'un-use' : item.IsDone === 0}">{{item.IsDone === 0 ? '未使用' : '已使用'}}</div>
19
             <div class="type" :class="{'un-use' : item.IsDone === 0}">{{item.IsDone === 0 ? '未使用' : '已使用'}}</div>
18
           </div>
20
           </div>
19
         </div>
21
         </div>
20
-        <span v-if="noData" style="width:100%;display:block;text-align:center;font-size:.11rem;color:#ccc;">暂无数据</span>
21
-        <!-- <noMore v-if="hasPic"></noMore> -->
22
+        <noMore v-if="noData"></noMore>
23
+        <!-- <span v-if="noData" style="width:100%;display:block;text-align:center;font-size:.11rem;color:#ccc;">暂无数据</span> -->
22
       </div>
24
       </div>
23
     </scroll>
25
     </scroll>
24
   </div>
26
   </div>

+ 75
- 55
src/pages/user/mainPage/coffeeIndex/index.vue View File

59
                   </div>
59
                   </div>
60
                   <a @click="toSalesHistory" v-if="userInfo.customer.UserTypeId == 'manager'">销售记录</a>
60
                   <a @click="toSalesHistory" v-if="userInfo.customer.UserTypeId == 'manager'">销售记录</a>
61
                 </div>
61
                 </div>
62
-                <myCard v-for="(item,index) in data[1].list" :key="index" :data='item' @share='shareCard'></myCard>
62
+                <myCard v-for="(item,index) in data[1].list" :isgrey="checkCanDo()" :key="index" :data='item' @share='shareCard'></myCard>
63
+                <noMore v-if="data[1].hasPic"></noMore>
63
               </div>
64
               </div>
64
             </li>
65
             </li>
65
             <li :hidden="navActive !== 2" class="my-card">
66
             <li :hidden="navActive !== 2" class="my-card">
73
                   </div>
74
                   </div>
74
                   <a @click="toSalesHistory" v-if="userInfo.customer.UserTypeId == 'manager'">销售记录</a>
75
                   <a @click="toSalesHistory" v-if="userInfo.customer.UserTypeId == 'manager'">销售记录</a>
75
                 </div>
76
                 </div>
76
-                <myCard v-for="(item,index) in data[2].list" :key="index" :data='item' @share='shareCoupon'></myCard>
77
+                <myCard v-for="(item,index) in data[2].list" :isgrey="checkCanDo()" :key="index" :data='item' @share='shareCoupon'></myCard>
78
+                <noMore v-if="data[2].hasPic"></noMore>
77
               </div>
79
               </div>
78
             </li>
80
             </li>
79
             <li :hidden="navActive !== 3" class="customer-card">
81
             <li :hidden="navActive !== 3" class="customer-card">
92
                   <i class="iconfont icon-sousuo search-icon" @click="searchMask"></i>
94
                   <i class="iconfont icon-sousuo search-icon" @click="searchMask"></i>
93
                 </div>
95
                 </div>
94
                 <customerCard v-for="(item,index) in postCustomerData.isrecommend ? myRecommendUserList : data[3].list" :key="index" :data='item' @record='record'></customerCard>
96
                 <customerCard v-for="(item,index) in postCustomerData.isrecommend ? myRecommendUserList : data[3].list" :key="index" :data='item' @record='record'></customerCard>
97
+                <noMore v-if="data[3].hasPic"></noMore>
95
               </div>
98
               </div>
96
             </li>
99
             </li>
97
           </ul>
100
           </ul>
130
 import normal from '../../../../common/icon/check-box-empty.png'
133
 import normal from '../../../../common/icon/check-box-empty.png'
131
 import logo from '../../../../common/icon/indexlogo.jpg'
134
 import logo from '../../../../common/icon/indexlogo.jpg'
132
 import wxsdk from '../../../../util/share'
135
 import wxsdk from '../../../../util/share'
136
+import noMore from '../../../../components/noMore/noMore'
133
 import { mapState, createNamespacedHelpers } from 'vuex'
137
 import { mapState, createNamespacedHelpers } from 'vuex'
134
 const { mapActions: actions } = createNamespacedHelpers('app')
138
 const { mapActions: actions } = createNamespacedHelpers('app')
135
 const { mapActions: caseTableActions } = createNamespacedHelpers('placeOrderForCoffee')
139
 const { mapActions: caseTableActions } = createNamespacedHelpers('placeOrderForCoffee')
153
       cardTotalCount: 0,
157
       cardTotalCount: 0,
154
       postCouponData: {
158
       postCouponData: {
155
         page: 1,
159
         page: 1,
156
-        pageSize: 10000
160
+        pagesize: 10000
157
       },
161
       },
158
       postCardData: {
162
       postCardData: {
159
         page: 1,
163
         page: 1,
160
-        pageSize: 10000
164
+        pagesize: 10000
161
       },
165
       },
162
       pullUpLoad: true,
166
       pullUpLoad: true,
163
       pullUpLoadThreshold: 40,
167
       pullUpLoadThreshold: 40,
208
           hasPic: false,
212
           hasPic: false,
209
           hasMore: true,
213
           hasMore: true,
210
           page: 1,
214
           page: 1,
211
-          pageSize: 1,
215
+          pagesize: 1,
212
           list: []
216
           list: []
213
         },
217
         },
214
         {
218
         {
215
           hasPic: false,
219
           hasPic: false,
216
           hasMore: true,
220
           hasMore: true,
217
           page: 1,
221
           page: 1,
218
-          pageSize: 1,
222
+          pagesize: 1,
219
           list: []
223
           list: []
220
         },
224
         },
221
         {
225
         {
222
           hasPic: false,
226
           hasPic: false,
223
           hasMore: true,
227
           hasMore: true,
224
           page: 1,
228
           page: 1,
225
-          pageSize: 1,
229
+          pagesize: 1,
226
           list: []
230
           list: []
227
         },
231
         },
228
         {
232
         {
229
           hasPic: false,
233
           hasPic: false,
230
           hasMore: true,
234
           hasMore: true,
231
           page: 1,
235
           page: 1,
232
-          pageSize: 1,
236
+          pagesize: 1,
233
           list: []
237
           list: []
234
         }
238
         }
235
       ]
239
       ]
252
     topCaseInfo,
256
     topCaseInfo,
253
     caseTableItem,
257
     caseTableItem,
254
     myCard,
258
     myCard,
255
-    customerCard
259
+    customerCard,
260
+    noMore
256
   },
261
   },
257
   created () {
262
   created () {
258
     if (!this.userInfo.customer.MapUser) {
263
     if (!this.userInfo.customer.MapUser) {
264
         this.getCustomerList({
269
         this.getCustomerList({
265
           ...this.postCustomerData
270
           ...this.postCustomerData
266
         }).then((res) => {
271
         }).then((res) => {
267
-          // console.log(JSON.stringify(res))
268
-          for (var n = 0; n < res.length; n++) {
269
-            if (res[n].RecommendId === this.userInfo.customer.MapUser) {
270
-              this.myRecommendUserList.push(res[n])
271
-              res[n].showTag = true
272
-            } else {
273
-              res[n].showTag = false
272
+          if (res) {
273
+            for (var n = 0; n < res.length; n++) {
274
+              if (res[n].RecommendId === this.userInfo.customer.MapUser) {
275
+                this.myRecommendUserList.push(res[n])
276
+                res[n].showTag = true
277
+              } else {
278
+                res[n].showTag = false
279
+              }
280
+              this.data[3].list.push(res[n])
274
             }
281
             }
275
-            this.data[3].list.push(res[n])
282
+          } else {
283
+            this.data[3].hasPic = true
276
           }
284
           }
277
         })
285
         })
278
         this.getMyCouponList({
286
         this.getMyCouponList({
279
           ...this.postCouponData
287
           ...this.postCouponData
280
         }).then((res) => {
288
         }).then((res) => {
281
           res.list = res.list || []
289
           res.list = res.list || []
282
-          for (var n = 0; n < res.list.length; n++) {
283
-            this.data[2].list.push({
284
-              invalid: this.returnInvalid(res.list[n], 'coupon'),
285
-              price: parseInt(res.list[n].Price),
286
-              title: res.list[n].CouponName,
287
-              desc: res.list[n].Share.UseRule,
288
-              startDate: this.toolClass.dateFormat(res.list[n].StartDate, 'yyyy年MM月dd日'),
289
-              endDate: this.toolClass.dateFormat(res.list[n].EndDate, 'yyyy年MM月dd日'),
290
-              totalCount: res.list[n].TotalCount,
291
-              SentCount: res.list[n].SentCount,
292
-              usedCount: res.list[n].UsedCount,
293
-              CardId: res.list[n].CouponId,
294
-            })
295
-          }
296
-          var count = 0
297
-          for (var n = 0; n < this.data[2].list.length; n++) {
298
-            count += this.data[2].list[n].price * this.data[2].list[n].totalCount - 0
290
+          if (res.list.length > 0) {
291
+            for (var n = 0; n < res.list.length; n++) {
292
+              this.data[2].list.push({
293
+                invalid: this.returnInvalid(res.list[n], 'coupon'),
294
+                price: parseInt(res.list[n].Price),
295
+                title: res.list[n].CouponName,
296
+                desc: res.list[n].Share.UseRule,
297
+                startDate: this.toolClass.dateFormat(res.list[n].StartDate, 'yyyy年MM月dd日'),
298
+                endDate: this.toolClass.dateFormat(res.list[n].EndDate, 'yyyy年MM月dd日'),
299
+                totalCount: res.list[n].TotalCount,
300
+                SentCount: res.list[n].SentCount,
301
+                usedCount: res.list[n].UsedCount,
302
+                CardId: res.list[n].CouponId,
303
+              })
304
+            }
305
+            var count = 0
306
+            for (var n = 0; n < this.data[2].list.length; n++) {
307
+              count += this.data[2].list[n].price * this.data[2].list[n].totalCount - 0
308
+            }
309
+            this.couponTotalCount = count.toFixed(2)
310
+          } else {
311
+            this.data[2].hasPic = true
299
           }
312
           }
300
-          this.couponTotalCount = count.toFixed(2)
301
         })
313
         })
302
         this.getMyCardList({
314
         this.getMyCardList({
303
           ...this.postCardData
315
           ...this.postCardData
304
         }).then((res) => {
316
         }).then((res) => {
305
           res.list = res.list || []
317
           res.list = res.list || []
306
-          for (var n = 0; n < res.list.length; n++) {
307
-            this.data[1].list.push({
308
-              invalid: this.returnInvalid(res.list[n], 'card'),
309
-              price: parseInt(res.list[n].Price),
310
-              title: res.list[n].CardName,
311
-              desc: res.list[n].Share.CardUseRule,
312
-              startDate: this.toolClass.dateFormat(res.list[n].StartDate, 'yyyy年MM月dd日'),
313
-              endDate: this.toolClass.dateFormat(res.list[n].EndDate, 'yyyy年MM月dd日'),
314
-              totalCount: res.list[n].TotalCount,
315
-              SentCount: res.list[n].SentCount,
316
-              usedCount: res.list[n].UsedCount,
317
-              CardId: res.list[n].CardId
318
-            })
319
-          }
320
-          var count = 0
321
-          for (var n = 0; n < this.data[1].list.length; n++) {
322
-            count += this.data[1].list[n].price * this.data[1].list[n].totalCount - 0
318
+          if (res.list.length > 0) {
319
+            for (var n = 0; n < res.list.length; n++) {
320
+              this.data[1].list.push({
321
+                invalid: this.returnInvalid(res.list[n], 'card'),
322
+                price: parseInt(res.list[n].Price),
323
+                title: res.list[n].CardName,
324
+                desc: res.list[n].Share.CardUseRule,
325
+                startDate: this.toolClass.dateFormat(res.list[n].StartDate, 'yyyy年MM月dd日'),
326
+                endDate: this.toolClass.dateFormat(res.list[n].EndDate, 'yyyy年MM月dd日'),
327
+                totalCount: res.list[n].TotalCount,
328
+                SentCount: res.list[n].SentCount,
329
+                usedCount: res.list[n].UsedCount,
330
+                CardId: res.list[n].CardId
331
+              })
332
+            }
333
+            var count = 0
334
+            for (var n = 0; n < this.data[1].list.length; n++) {
335
+              count += this.data[1].list[n].price * this.data[1].list[n].totalCount - 0
336
+            }
337
+            this.cardTotalCount = count.toFixed(2)
338
+          } else {
339
+            this.data[1].hasPic = true
323
           }
340
           }
324
-          this.cardTotalCount = count.toFixed(2)
325
         })
341
         })
326
       })
342
       })
327
     } else {
343
     } else {
349
       'getCaseConf',
365
       'getCaseConf',
350
     ]),
366
     ]),
351
     ...mapCardActions(['getCardList']),
367
     ...mapCardActions(['getCardList']),
368
+    checkCanDo () {
369
+      const _that = this
370
+      return this.forbidList.filter(x => x.UserId === _that.userInfo.customer.MapUser && x.ForbidType === 'coupon').length > 0
371
+    },
352
     returnInvalid (item, type) {
372
     returnInvalid (item, type) {
353
       for (var n = 0; n < this.forbidList.length; n++) {
373
       for (var n = 0; n < this.forbidList.length; n++) {
354
         if (this.forbidList[n].UserId === this.userInfo.customer.CustomerId && this.forbidList[n].ForbidType === type) {
374
         if (this.forbidList[n].UserId === this.userInfo.customer.CustomerId && this.forbidList[n].ForbidType === type) {
501
     },
521
     },
502
     toOrders (subItem, item) {
522
     toOrders (subItem, item) {
503
       const _that = this
523
       const _that = this
504
-      this.getCaseConf({caseid: subItem.CaseId}).then(res => {
524
+      this.getCaseConf({ caseid: subItem.CaseId }).then(res => {
505
         if (res.Status === 1) {
525
         if (res.Status === 1) {
506
-          this.$router.push({name: 'placeOrder', query: { tableid: encodeURI(subItem.TableId), tableno: encodeURI(subItem.TableNo), caseid: encodeURI(subItem.CaseId), casename: encodeURI(_that.topCaseInfoData.caseName), areaid: encodeURI(subItem.AreaId), areaname: encodeURI(item.AreaName)}})
526
+          this.$router.push({ name: 'placeOrder', query: { tableid: encodeURI(subItem.TableId), tableno: encodeURI(subItem.TableNo), caseid: encodeURI(subItem.CaseId), casename: encodeURI(_that.topCaseInfoData.caseName), areaid: encodeURI(subItem.AreaId), areaname: encodeURI(item.AreaName) } })
507
         } else {
527
         } else {
508
           _that.$toast('当前案场已歇业!')
528
           _that.$toast('当前案场已歇业!')
509
           return
529
           return

+ 1
- 1
src/pages/user/mainPage/userCenter/index.vue View File

41
 
41
 
42
       <div class="userCenter-menu">
42
       <div class="userCenter-menu">
43
         <div class="menu-item flex-h" @click="toLessonOrder">
43
         <div class="menu-item flex-h" @click="toLessonOrder">
44
-          <span>课程订单</span>
44
+          <span>我的课程</span>
45
           <i class="iconfont icon-jiantou-right"></i>
45
           <i class="iconfont icon-jiantou-right"></i>
46
         </div>
46
         </div>
47
         <div class="menu-item flex-h" @click="toGoodsOrder">
47
         <div class="menu-item flex-h" @click="toGoodsOrder">

+ 29
- 5
src/pages/user/majorProjectsDetail/index.vue View File

1
 <template>
1
 <template>
2
-  <div class="mainPage flex-v">
2
+  <div class="mainPage flex-v" v-if="showPage">
3
     <div class="flex-item">
3
     <div class="flex-item">
4
       <div class="content">
4
       <div class="content">
5
         <div class="banner">
5
         <div class="banner">
6
           <div class="scrollImg">
6
           <div class="scrollImg">
7
-            <swiper :options="swiperOption" ref="mySwiper">
7
+            <img :src='topImage' class="cover" alt="">
8
+            <!-- <swiper :options="swiperOption" ref="mySwiper">
8
               <swiper-slide class="swiper-slide" v-for="(item,index) in courseDetail.CourseImgs" :key="index">
9
               <swiper-slide class="swiper-slide" v-for="(item,index) in courseDetail.CourseImgs" :key="index">
9
                 <img :src='item.ImgUrl' class="cover" alt="">
10
                 <img :src='item.ImgUrl' class="cover" alt="">
10
               </swiper-slide>
11
               </swiper-slide>
11
-            </swiper>
12
+            </swiper> -->
12
           </div>
13
           </div>
13
           <div>
14
           <div>
14
             <span>{{courseDetail.CourseName}}</span>
15
             <span>{{courseDetail.CourseName}}</span>
26
               <ul :class="{'show':showMoreCourse}">
27
               <ul :class="{'show':showMoreCourse}">
27
                 <li v-for="(item,index) in courseTimeList" :key="index">{{returnCourseTime(item.BeginDate,item.EndDate)}}</li>
28
                 <li v-for="(item,index) in courseTimeList" :key="index">{{returnCourseTime(item.BeginDate,item.EndDate)}}</li>
28
               </ul>
29
               </ul>
29
-              <a class="moreCourse" @click="triggerCourseTime">
30
+              <a class="moreCourse" @click="triggerCourseTime" v-if="courseTimeList.length>4">
30
                 {{showMoreCourse ? '收起' : '更多'}}
31
                 {{showMoreCourse ? '收起' : '更多'}}
31
                 <i v-if="!showMoreCourse" class="iconfont icon-jiantou-down"></i>
32
                 <i v-if="!showMoreCourse" class="iconfont icon-jiantou-down"></i>
32
                 <i v-if="showMoreCourse" class="iconfont icon-jiantou-up"></i>
33
                 <i v-if="showMoreCourse" class="iconfont icon-jiantou-up"></i>
55
             </div>
56
             </div>
56
           </div>
57
           </div>
57
         </div>
58
         </div>
59
+        <div class="subContent address">
60
+          <h5 style="padding-bottom:.1rem">课程详情</h5>
61
+          <div class="flex-l" style="margin: 0 .26rem">
62
+            <img :src="item.ImgUrl" alt="" width="100%" v-for="(item,index) in detailImage" :key="index">
63
+          </div>
64
+        </div>
58
       </div>
65
       </div>
59
     </div>
66
     </div>
60
     <div class="flex-h">
67
     <div class="flex-h">
64
           <span>优惠券体验</span>
71
           <span>优惠券体验</span>
65
         </div>
72
         </div>
66
       </div>
73
       </div>
67
-      <a @click="toBuy" :class="{gray:gray}">去购买</a>
74
+      <a @click="toBuy" :class="{gray: gray}">去购买</a>
68
     </div>
75
     </div>
69
   </div>
76
   </div>
70
 </template>
77
 </template>
92
       },
99
       },
93
       showMoreCourse: false, // 显隐更多课程时间
100
       showMoreCourse: false, // 显隐更多课程时间
94
       courseTimeList: [], // 课程时间
101
       courseTimeList: [], // 课程时间
102
+      detailImage: [],
103
+      showPage: false,
104
+      topImage: ''
95
     }
105
     }
96
   },
106
   },
97
   computed: {
107
   computed: {
120
       if (arr === null) {
130
       if (arr === null) {
121
         arr = []
131
         arr = []
122
       }
132
       }
133
+      this.courseDetail.CourseImgs = this.courseDetail.CourseImgs || []
134
+      this.topImage = this.courseDetail.CourseImgs.length > 0 ? this.courseDetail.CourseImgs[0].ImgUrl : ""
135
+      if (this.courseDetail.CourseImgs.length > 0) {
136
+        this.detailImage = this.courseDetail.CourseImgs.slice(1)
137
+      }
138
+      console.log(this.detailImage)
123
       this.courseTimeList = arr.sort(function (a, b) { return new Date(a.BeginDate).getTime() > new Date(b.BeginDate).getTime() ? 1 : -1 })
139
       this.courseTimeList = arr.sort(function (a, b) { return new Date(a.BeginDate).getTime() > new Date(b.BeginDate).getTime() ? 1 : -1 })
124
       let nowDate = Date.now()
140
       let nowDate = Date.now()
125
       let endData = new Date(this.courseDetail.EndDate).getTime()
141
       let endData = new Date(this.courseDetail.EndDate).getTime()
126
       if (nowDate > endData) {
142
       if (nowDate > endData) {
127
         this.gray = true
143
         this.gray = true
128
       }
144
       }
145
+      if (this.courseDetail.SignupNum >= this.courseDetail.MaxNum) {
146
+        this.gray = true
147
+      }
129
       // console.log(JSON.stringify(res))
148
       // console.log(JSON.stringify(res))
149
+      this.showPage = true
130
     })
150
     })
131
   },
151
   },
132
   methods: {
152
   methods: {
149
       this.showMoreCourse = !this.showMoreCourse
169
       this.showMoreCourse = !this.showMoreCourse
150
     },
170
     },
151
     toBuy () {
171
     toBuy () {
172
+      if (this.gray) {
173
+        this.$toast('该课程已过期或参与人数已满')
174
+        return
175
+      }
152
       let nowDate = Date.now()
176
       let nowDate = Date.now()
153
       let endData = new Date(this.courseDetail.EndDate).getTime()
177
       let endData = new Date(this.courseDetail.EndDate).getTime()
154
       if (nowDate > endData) {
178
       if (nowDate > endData) {

+ 2
- 1
src/pages/user/orderList/index.vue View File

17
                 <orderListItem :data="item"></orderListItem>
17
                 <orderListItem :data="item"></orderListItem>
18
               </li>
18
               </li>
19
             </ul>
19
             </ul>
20
-            <span v-if="noData" style="width:100%;display:block;text-align:center;font-size:.11rem;color:#ccc;">暂无数据</span>
20
+            <noMore v-if="noData"></noMore>
21
+            <!-- <span v-if="noData" style="width:100%;display:block;text-align:center;font-size:.11rem;color:#ccc;">暂无数据</span> -->
21
           </scroll>
22
           </scroll>
22
         </div>
23
         </div>
23
       </div>
24
       </div>

+ 2
- 2
src/pages/user/placeOrder/index.vue View File

69
       <a @click="toPlaceOrder">下单</a>
69
       <a @click="toPlaceOrder">下单</a>
70
     </div>
70
     </div>
71
     <orderPopup :show="showPopup" :data="currentSpec" @closePopup="closePopup" @returnData="calcMenus"></orderPopup>
71
     <orderPopup :show="showPopup" :data="currentSpec" @closePopup="closePopup" @returnData="calcMenus"></orderPopup>
72
-    <calcMenu :show="showCalcMenu" :totalNum="sumNum" :data="selGoods" @returnData="calcMenus" @emptyMenus="emptyMenus" @closeCalcMenu="closeCalcMenu" @placeOrder="placeOrder"></calcMenu>
72
+    <calcMenu :show="showCalcMenu" :totalNum="sumNum + caseTotal.total" :data="selGoods" @returnData="calcMenus" @emptyMenus="emptyMenus" @closeCalcMenu="closeCalcMenu" @placeOrder="placeOrder"></calcMenu>
73
   </div>
73
   </div>
74
 </template>
74
 </template>
75
 
75
 
165
       this.selGoods.map(x => {
165
       this.selGoods.map(x => {
166
         price += x.price * x.num - 0
166
         price += x.price * x.num - 0
167
       })
167
       })
168
-      return price
168
+      return Math.ceil((price) * 100) / 100
169
     }
169
     }
170
   },
170
   },
171
   components: {
171
   components: {

+ 15
- 6
src/pages/user/placeOrderForCourse/index.vue View File

54
                     <span>优惠信息</span>
54
                     <span>优惠信息</span>
55
                   </div>
55
                   </div>
56
                 </div>
56
                 </div>
57
-                <span>{{postData.customercouponid == '' ? '暂未选择优惠券' : '已选择优惠券'}}</span>
58
-                <i class="iconfont icon-jiantou-right" v-if="couponList.length"></i>
57
+                <span></span>
58
+                <i class="iconfont icon-jiantou-right"></i>
59
               </div>
59
               </div>
60
               <div class="flex-h">
60
               <div class="flex-h">
61
                 <div class="flex-item">
61
                 <div class="flex-item">
63
                     <span>优惠券</span>
63
                     <span>优惠券</span>
64
                   </div>
64
                   </div>
65
                 </div>
65
                 </div>
66
-                <span>{{couponList.length ? couponList.length + '张可用优惠券' : '暂无优惠券'}}</span>
66
+                <span v-if='couponList.length <= 0 && !showCoupon'>暂无优惠券</span>
67
+                <span v-if='couponList.length > 0 && !showCoupon' style="color:#fc6243">{{couponList.length + '张可用优惠券'}}</span>
68
+                <span v-if='showCoupon' style="color:#fc6243">{{showCoupon}}</span>
67
               </div>
69
               </div>
68
             </div>
70
             </div>
69
             <div class="agreement">
71
             <div class="agreement">
98
     <div class="layer" :class="{'show': showLayer}"> 
100
     <div class="layer" :class="{'show': showLayer}"> 
99
       <div>
101
       <div>
100
         <div class="top">
102
         <div class="top">
101
-          <i class="iconfont icon-guanbi"></i>
103
+          <i class="iconfont icon-guanbi" @click="closeChoose"></i>
102
         </div>
104
         </div>
103
         <div class="body flex-h">
105
         <div class="body flex-h">
104
           <div class="flex-item">
106
           <div class="flex-item">
159
   },
161
   },
160
   created () {
162
   created () {
161
     this.getCouponList().then((res) => {
163
     this.getCouponList().then((res) => {
162
-      this.getCourseDetailInfo({ id: this.$route.query.id }).then((res) => {
163
-        var arr = res.CourseDetail
164
+      this.getCourseDetailInfo({ id: this.$route.query.id }).then((result) => {
165
+        var arr = result.CourseDetail
166
+        console.log(arr)
164
         this.courseTimeList = arr.sort(function (a, b) { return new Date(a.BeginDate).getTime() > new Date(b.BeginDate).getTime() ? 1 : -1 })
167
         this.courseTimeList = arr.sort(function (a, b) { return new Date(a.BeginDate).getTime() > new Date(b.BeginDate).getTime() ? 1 : -1 })
165
         var id = this.$route.query.id, arr = [], nowDate = Date.now()
168
         var id = this.$route.query.id, arr = [], nowDate = Date.now()
166
         for (var n = 0; n < res.length; n++) {
169
         for (var n = 0; n < res.length; n++) {
175
                 tag: '课程',
178
                 tag: '课程',
176
                 id: res[n].CustomerCouponId,
179
                 id: res[n].CustomerCouponId,
177
                 select: false,
180
                 select: false,
181
+                hideBtn: true
178
               })
182
               })
179
             } else {
183
             } else {
180
               for (var a = 0; a < res[n].Coupon.Targets.length; a++) {
184
               for (var a = 0; a < res[n].Coupon.Targets.length; a++) {
187
                     tag: '课程',
191
                     tag: '课程',
188
                     id: res[n].CustomerCouponId,
192
                     id: res[n].CustomerCouponId,
189
                     select: false,
193
                     select: false,
194
+                    hideBtn: true
190
                   })
195
                   })
191
                 }
196
                 }
192
               }
197
               }
208
         if (this.couponList[n].select) {
213
         if (this.couponList[n].select) {
209
           bool = true
214
           bool = true
210
           this.postData.customercouponid = this.couponList[n].id
215
           this.postData.customercouponid = this.couponList[n].id
216
+          this.showCoupon = this.couponList[n].title
211
         }
217
         }
212
       }
218
       }
213
       if (!bool) {
219
       if (!bool) {
214
         this.postData.customercouponid = ''
220
         this.postData.customercouponid = ''
215
       }
221
       }
222
+      this.closeChoose()
223
+    },
224
+    closeChoose () {
216
       this.showLayer = false
225
       this.showLayer = false
217
     },
226
     },
218
     selectCouponItem (item) { // 选择优惠券
227
     selectCouponItem (item) { // 选择优惠券

+ 3
- 3
src/pages/user/receive/index.vue View File

30
           <i class="icon-kaquan iconfont"></i>
30
           <i class="icon-kaquan iconfont"></i>
31
           <span>卡券有效期</span>
31
           <span>卡券有效期</span>
32
         </div>
32
         </div>
33
-        <pre>有效期至{{toolClass.dateFormat(data.EndDate)}},请在有效期结束前使用, 过期作废;</pre>
33
+        <pre>有效期至{{toolClass.dateFormat(data.EndDate,'yyyy-MM-dd')}},请在有效期结束前使用, 过期作废;</pre>
34
       </div>
34
       </div>
35
       <div class="text">
35
       <div class="text">
36
         <div>
36
         <div>
119
     receive () {
119
     receive () {
120
       if (this.$route.query.type === 'card') {
120
       if (this.$route.query.type === 'card') {
121
         this.setCardShare({ id: this.$route.query.id, salesid: this.$route.query.salesid, serialcode: this.$route.query.random }).then(() => {
121
         this.setCardShare({ id: this.$route.query.id, salesid: this.$route.query.salesid, serialcode: this.$route.query.random }).then(() => {
122
-          this.$router.push({ name: 'receiveResults', query: { type: 'success' } })
122
+          this.$router.push({ name: 'receiveResults', query: { type: 'success', text: '卡券' } })
123
         }).catch((err) => {
123
         }).catch((err) => {
124
           this.$router.push({ name: 'receiveResults', query: { type: 'fail' } })
124
           this.$router.push({ name: 'receiveResults', query: { type: 'fail' } })
125
           console.log(err)
125
           console.log(err)
126
         })
126
         })
127
       } else {
127
       } else {
128
         this.setCouponShare({ id: this.$route.query.id, salesid: this.$route.query.salesid, serialcode: this.$route.query.random }).then(() => {
128
         this.setCouponShare({ id: this.$route.query.id, salesid: this.$route.query.salesid, serialcode: this.$route.query.random }).then(() => {
129
-          this.$router.push({ name: 'receiveResults', query: { type: 'success' } })
129
+          this.$router.push({ name: 'receiveResults', query: { type: 'success', text: '优惠券' } })
130
         }).catch((err) => {
130
         }).catch((err) => {
131
           this.$router.push({ name: 'receiveResults', query: { type: 'fail' } })
131
           this.$router.push({ name: 'receiveResults', query: { type: 'fail' } })
132
           console.log(err)
132
           console.log(err)

+ 5
- 5
src/pages/user/receiveChannel/index.vue View File

30
           <i class="icon-kaquan iconfont"></i>
30
           <i class="icon-kaquan iconfont"></i>
31
           <span>卡券有效期</span>
31
           <span>卡券有效期</span>
32
         </div>
32
         </div>
33
-        <pre>有效期至{{toolClass.dateFormat(data.EndDate)}},请在有效期结束前使用, 过期作废;</pre>
33
+        <pre>有效期至{{toolClass.dateFormat(data.EndDate,'yyyy-MM-dd')}},请在有效期结束前使用, 过期作废;</pre>
34
       </div>
34
       </div>
35
       <div class="text">
35
       <div class="text">
36
         <div>
36
         <div>
59
       video: true,
59
       video: true,
60
       button: true,
60
       button: true,
61
       show: false,
61
       show: false,
62
-      type:'',
62
+      type: '',
63
       data: {}
63
       data: {}
64
     }
64
     }
65
   },
65
   },
85
     }
85
     }
86
 
86
 
87
     this.type = this.$route.query.type
87
     this.type = this.$route.query.type
88
-    
88
+
89
     this.getCaseList().then(() => {
89
     this.getCaseList().then(() => {
90
       this.init()
90
       this.init()
91
     })
91
     })
119
     receive () {
119
     receive () {
120
       if (this.$route.query.type === 'card') {
120
       if (this.$route.query.type === 'card') {
121
         this.setChannelCardShare({ id: this.$route.query.id }).then(() => {
121
         this.setChannelCardShare({ id: this.$route.query.id }).then(() => {
122
-          this.$router.push({ name: 'receiveResults', query: { type: 'success' } })
122
+          this.$router.push({ name: 'receiveResults', query: { type: 'success', text: '卡券' } })
123
         }).catch((err) => {
123
         }).catch((err) => {
124
           this.$router.push({ name: 'receiveResults', query: { type: 'fail' } })
124
           this.$router.push({ name: 'receiveResults', query: { type: 'fail' } })
125
           console.log(err)
125
           console.log(err)
126
         })
126
         })
127
       } else {
127
       } else {
128
         this.setChannelCouponShare({ id: this.$route.query.id }).then(() => {
128
         this.setChannelCouponShare({ id: this.$route.query.id }).then(() => {
129
-          this.$router.push({ name: 'receiveResults', query: { type: 'success' } })
129
+          this.$router.push({ name: 'receiveResults', query: { type: 'success', text: '优惠券' } })
130
         }).catch((err) => {
130
         }).catch((err) => {
131
           this.$router.push({ name: 'receiveResults', query: { type: 'fail' } })
131
           this.$router.push({ name: 'receiveResults', query: { type: 'fail' } })
132
           console.log(err)
132
           console.log(err)

+ 6
- 3
src/pages/user/receiveResults/index.vue View File

5
       <i class="iconfont icon-shibai fail" v-else></i>
5
       <i class="iconfont icon-shibai fail" v-else></i>
6
       <span v-if="status === 'success'">领取成功</span>
6
       <span v-if="status === 'success'">领取成功</span>
7
       <span v-else>领取失败</span>
7
       <span v-else>领取失败</span>
8
-      <span v-if="status === 'success'">快去个人中心查看我的体验券</span>
9
-      <span v-else>{{msg}}</span>
10
-      <div class="back" v-if="status === 'success'" @click="back">查看我的体验券</div>
8
+      <span v-if="status === 'success'">快去个人中心查看我的{{$route.query.text}}</span>
9
+      <span v-else>{{fli(msg)}}</span>
10
+      <div class="back" v-if="status === 'success'" @click="back">查看我的{{$route.query.text}}</div>
11
       <div v-else></div>
11
       <div v-else></div>
12
       <img :src="logo" class="bottomLogo">
12
       <img :src="logo" class="bottomLogo">
13
     </div>
13
     </div>
36
   methods: {
36
   methods: {
37
     back () {
37
     back () {
38
       this.$router.push({ name: 'userCenter' })
38
       this.$router.push({ name: 'userCenter' })
39
+    },
40
+    fli (msg) {
41
+      return msg.substring(10, msg.length)
39
     }
42
     }
40
   }
43
   }
41
 }
44
 }

+ 5
- 0
src/util/ajax.js View File

76
         if (router.history.current.name !== 'bindMobile') {
76
         if (router.history.current.name !== 'bindMobile') {
77
           router.push({ name: 'bindMobile' })
77
           router.push({ name: 'bindMobile' })
78
         }
78
         }
79
+      } else if (code === 405) {
80
+        // console.log(router.history.current.name)
81
+        // if (router.history.current.name !== 'bindMobile') {
82
+          router.push({ name: 'login' })
83
+        // }
79
       } else {
84
       } else {
80
         if (message.indexOf("log-error") != -1) {
85
         if (message.indexOf("log-error") != -1) {
81
           console.log(message)
86
           console.log(message)

+ 2
- 2
src/util/api.js View File

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