yuantianjiao 6 years ago
parent
commit
035316b3ec

BIN
src/common/icon/bg.jpg View File


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

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

+ 10
- 3
src/components/myCard/myCard.vue View File

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

+ 4
- 1
src/components/orderListItem/index.vue View File

1
 <template>
1
 <template>
2
   <div class="orderListItem">
2
   <div class="orderListItem">
3
     <div class="title flex-h">
3
     <div class="title flex-h">
4
-      <div class="orange" v-if="returnStatus(data.MakeStatus) === '制作中'">
4
+      <div class="orange" v-if="returnStatus(data.MakeStatus) === '已下单'">
5
         <i class="iconfont icon-dengdai"></i><br>
5
         <i class="iconfont icon-dengdai"></i><br>
6
         <span>{{returnStatus(data.MakeStatus)}}</span>
6
         <span>{{returnStatus(data.MakeStatus)}}</span>
7
       </div>
7
       </div>
66
     returnStatus (val) {
66
     returnStatus (val) {
67
       for (var n = 0; n < dict.orderStatus.length; n++) {
67
       for (var n = 0; n < dict.orderStatus.length; n++) {
68
         if(val === dict.orderStatus[n].key){
68
         if(val === dict.orderStatus[n].key){
69
+          if (dict.orderStatus[n].value === '已下单'){
70
+            dict.orderStatus[n].value = '制作中'
71
+          }
69
           return dict.orderStatus[n].value
72
           return dict.orderStatus[n].value
70
         }
73
         }
71
       }
74
       }

+ 2
- 2
src/pages/sales/login/index.vue View File

1
 <template>
1
 <template>
2
   <div class="mainPage" v-if="showPage">
2
   <div class="mainPage" v-if="showPage">
3
     <div class="mask">
3
     <div class="mask">
4
-      <img :src="logo" class="logo" alt="">
4
+      <!-- <img :src="logo" class="logo" alt=""> -->
5
       <div class="centerLabel" style="width:100%;">
5
       <div class="centerLabel" style="width:100%;">
6
         <div class="box" style="margin:0 auto;">
6
         <div class="box" style="margin:0 auto;">
7
           <div class="title">登录</div>
7
           <div class="title">登录</div>
109
     },
109
     },
110
     submit () {
110
     submit () {
111
       if (!this.postData.captcha) {
111
       if (!this.postData.captcha) {
112
-        this.$toast('请先获取验证码')
112
+        this.$toast('请填写验证码')
113
         return
113
         return
114
       }
114
       }
115
       let reg = /^[0-9]{6}$/
115
       let reg = /^[0-9]{6}$/

+ 3
- 0
src/pages/sales/login/page.scss View File

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

+ 10
- 10
src/pages/user/bindMobile/bindMobile.vue View File

1
 <template>
1
 <template>
2
   <div class="mainPage">
2
   <div class="mainPage">
3
     <div class="mask">
3
     <div class="mask">
4
-      <img :src="logo" class="logo" alt="">
4
+      <!-- <img :src="logo" class="logo" alt=""> -->
5
       <div class="box">
5
       <div class="box">
6
         <div class="title">绑定</div>
6
         <div class="title">绑定</div>
7
 
7
 
157
     },
157
     },
158
     submit () {
158
     submit () {
159
       if (!this.postData.captcha) {
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
         return
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
       this.submitData(this.postData).then((res) => {
171
       this.submitData(this.postData).then((res) => {
172
         this.$toast(res)
172
         this.$toast(res)
173
         if (this.$route.query.isLottery) {
173
         if (this.$route.query.isLottery) {

+ 3
- 0
src/pages/user/bindMobile/page.scss View File

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

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

1
 <template>
1
 <template>
2
   <div class="mainPage">
2
   <div class="mainPage">
3
     <div class="box">
3
     <div class="box">
4
-      <discounts @toUse='toUse' :data='item' @toDetail="toDetail"></discounts>
4
+      <discounts @toUse='toUse' :data='item' @toDetail="toDetail" v-for="(item,index) in list" :key="index"></discounts>
5
       <noMore v-if="hasPic"></noMore>
5
       <noMore v-if="hasPic"></noMore>
6
     </div>
6
     </div>
7
   </div>
7
   </div>
54
           useType: res[n].Status === 1 ? '未使用' : '已使用',
54
           useType: res[n].Status === 1 ? '未使用' : '已使用',
55
           tag: res[n].Coupon.CouponType === 'coupon' ? '课程' : '商品',
55
           tag: res[n].Coupon.CouponType === 'coupon' ? '课程' : '商品',
56
           customercouponid: res[n].CustomerCouponId,
56
           customercouponid: res[n].CustomerCouponId,
57
-          couponid: res[n].Coupon.CouponId
57
+          couponid: res[n].Coupon.CouponId,
58
+          Coupon: res[n].Coupon
58
         })
59
         })
59
       }
60
       }
60
     })
61
     })
71
       if (item.Coupon.Targets.length > 1) {
72
       if (item.Coupon.Targets.length > 1) {
72
         this.$router.push({ name: 'indexPage' })
73
         this.$router.push({ name: 'indexPage' })
73
       } else {
74
       } else {
74
-        this.$router.push({ name: 'majorProjectsDetail', query: { id: item.TargetId } })
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
+        }
75
       }
80
       }
76
     },
81
     },
77
     toDetail (item) {
82
     toDetail (item) {

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

150
           id: arr[n].CourseId,
150
           id: arr[n].CourseId,
151
           title: arr[n].CourseName,
151
           title: arr[n].CourseName,
152
           img: arr[n].CourseImg,
152
           img: arr[n].CourseImg,
153
-          time: this.toolClass.dateFormat(arr[n].BeginDate),
153
+          remark: arr[n].Remark,
154
           address: arr[n].CaseInfo.CaseAddress,
154
           address: arr[n].CaseInfo.CaseAddress,
155
           tag: arr[n].CourseTags || [],
155
           tag: arr[n].CourseTags || [],
156
           courseType: '',
156
           courseType: '',

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

53
                       <span>¥{{cardTotalCount}}</span>
53
                       <span>¥{{cardTotalCount}}</span>
54
                     </div>
54
                     </div>
55
                   </div>
55
                   </div>
56
-                  <a @click="toSalesHistory">销售记录</a>
56
+                  <a @click="toSalesHistory" v-if="userInfo.customer.UserTypeId == 'manager'">销售记录</a>
57
                 </div>
57
                 </div>
58
                 <myCard v-for="(item,index) in data[1].list" :key="index" :data='item' @share='shareCard'></myCard>
58
                 <myCard v-for="(item,index) in data[1].list" :key="index" :data='item' @share='shareCard'></myCard>
59
               </div>
59
               </div>

+ 13
- 1
src/pages/user/majorProjectsDetail/index.vue View File

64
           <span>优惠券体验</span>
64
           <span>优惠券体验</span>
65
         </div>
65
         </div>
66
       </div>
66
       </div>
67
-      <router-link :to="{name: 'placeOrderForCourse', query: {id: courseDetail.CourseId}}">去购买</router-link>
67
+      <a @click="toBuy">去购买</a>
68
     </div>
68
     </div>
69
   </div>
69
   </div>
70
 </template>
70
 </template>
71
 
71
 
72
 <script>
72
 <script>
73
+import wxsdk from '../../../util/share'
74
+import logo from '../../../common/icon/indexlogo.jpg'
73
 import { swiper, swiperSlide } from 'vue-awesome-swiper'
75
 import { swiper, swiperSlide } from 'vue-awesome-swiper'
74
 import 'swiper/dist/css/swiper.css'
76
 import 'swiper/dist/css/swiper.css'
75
 import { mapState, createNamespacedHelpers } from 'vuex'
77
 import { mapState, createNamespacedHelpers } from 'vuex'
80
   name: '',
82
   name: '',
81
   data () {
83
   data () {
82
     return {
84
     return {
85
+      logo,
83
       swiperOption: {
86
       swiperOption: {
84
         observer: true,
87
         observer: true,
85
         autoplay: {
88
         autoplay: {
157
     triggerCourseTime () { // 显隐更多课程时间
160
     triggerCourseTime () { // 显隐更多课程时间
158
       this.showMoreCourse = !this.showMoreCourse
161
       this.showMoreCourse = !this.showMoreCourse
159
     },
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
+    }
160
   }
172
   }
161
 }
173
 }
162
 </script>
174
 </script>

+ 29
- 33
src/pages/user/placeOrderForCourse/index.vue View File

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

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

140
       return `${rnd}${timestamp}`
140
       return `${rnd}${timestamp}`
141
     },
141
     },
142
     sdk (info) {
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
       wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
151
       wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
145
-        title: '领取卡券',
152
+        title: title,
146
         desc: info,
153
         desc: info,
147
         link: `${window.location.origin}${window.location.pathname}#/receiveShared/${this.$route.query.id}/${this.$route.query.salesid}/${this.$route.query.type}/receive`,
154
         link: `${window.location.origin}${window.location.pathname}#/receiveShared/${this.$route.query.id}/${this.$route.query.salesid}/${this.$route.query.type}/receive`,
148
-        thu_image: `${window.location.origin}${window.location.pathname}${logo}`
155
+        thu_image: logo
149
       })
156
       })
150
     }
157
     }
151
   }
158
   }

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

131
       }
131
       }
132
     },
132
     },
133
     sdk (info) {
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
       wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
142
       wxsdk({ url: encodeURIComponent(window.location.href.split('#')[0]) }, {
136
-        title: '领取卡券',
143
+        title: title,
137
         desc: info,
144
         desc: info,
138
         link: `${window.location.origin}${window.location.pathname}#/receiveChannelShared/${this.$route.query.id}/${this.$route.query.type}/receive`,
145
         link: `${window.location.origin}${window.location.pathname}#/receiveChannelShared/${this.$route.query.id}/${this.$route.query.type}/receive`,
139
-        thu_image: `${window.location.origin}${window.location.pathname}${logo}`
146
+        thu_image: logo
140
       })
147
       })
141
     }
148
     }
142
   }
149
   }

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

9
       <span v-else>{{msg}}</span>
9
       <span v-else>{{msg}}</span>
10
       <div class="back" v-if="status === 'success'" @click="back">查看我的体验券</div>
10
       <div class="back" v-if="status === 'success'" @click="back">查看我的体验券</div>
11
       <div v-else></div>
11
       <div v-else></div>
12
-      <img :src="logo">
12
+      <img :src="logo" class="bottomLogo">
13
     </div>
13
     </div>
14
   </div>
14
   </div>
15
 </template>
15
 </template>
35
   },
35
   },
36
   methods: {
36
   methods: {
37
     back () {
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 View File

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