yuantianjiao 6 vuotta sitten
vanhempi
commit
035316b3ec

BIN
src/common/icon/bg.jpg Näytä tiedosto


+ 1
- 1
src/components/courseItem/index.vue Näytä tiedosto

@@ -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 Näytä tiedosto

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

+ 4
- 1
src/components/orderListItem/index.vue Näytä tiedosto

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

+ 2
- 2
src/pages/sales/login/index.vue Näytä tiedosto

@@ -1,7 +1,7 @@
1 1
 <template>
2 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>
@@ -109,7 +109,7 @@ export default {
109 109
     },
110 110
     submit () {
111 111
       if (!this.postData.captcha) {
112
-        this.$toast('请先获取验证码')
112
+        this.$toast('请填写验证码')
113 113
         return
114 114
       }
115 115
       let reg = /^[0-9]{6}$/

+ 3
- 0
src/pages/sales/login/page.scss Näytä tiedosto

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

+ 10
- 10
src/pages/user/bindMobile/bindMobile.vue Näytä tiedosto

@@ -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
 
@@ -157,17 +157,17 @@ export default {
157 157
     },
158 158
     submit () {
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) {

+ 3
- 0
src/pages/user/bindMobile/page.scss Näytä tiedosto

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

+ 8
- 3
src/pages/user/coupons/index.vue Näytä tiedosto

@@ -1,7 +1,7 @@
1 1
 <template>
2 2
   <div class="mainPage">
3 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 5
       <noMore v-if="hasPic"></noMore>
6 6
     </div>
7 7
   </div>
@@ -54,7 +54,8 @@ export default {
54 54
           useType: res[n].Status === 1 ? '未使用' : '已使用',
55 55
           tag: res[n].Coupon.CouponType === 'coupon' ? '课程' : '商品',
56 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,7 +72,11 @@ export default {
71 72
       if (item.Coupon.Targets.length > 1) {
72 73
         this.$router.push({ name: 'indexPage' })
73 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 82
     toDetail (item) {

+ 1
- 1
src/pages/user/fiveA/index.vue Näytä tiedosto

@@ -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: '',

+ 1
- 1
src/pages/user/mainPage/coffeeIndex/index.vue Näytä tiedosto

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

+ 13
- 1
src/pages/user/majorProjectsDetail/index.vue Näytä tiedosto

@@ -64,12 +64,14 @@
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'
@@ -80,6 +82,7 @@ export default {
80 82
   name: '',
81 83
   data () {
82 84
     return {
85
+      logo,
83 86
       swiperOption: {
84 87
         observer: true,
85 88
         autoplay: {
@@ -157,6 +160,15 @@ export default {
157 160
     triggerCourseTime () { // 显隐更多课程时间
158 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 174
 </script>

+ 29
- 33
src/pages/user/placeOrderForCourse/index.vue Näytä tiedosto

@@ -162,43 +162,39 @@ export default {
162 162
       this.getCourseDetailInfo({ id: this.$route.query.id }).then((res) => {
163 163
         var arr = res.CourseDetail
164 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 200
   methods: {

+ 10
- 3
src/pages/user/receive/index.vue Näytä tiedosto

@@ -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 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 Näytä tiedosto

@@ -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 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 Näytä tiedosto

@@ -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 Näytä tiedosto

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