yuantianjiao 6 years ago
parent
commit
f3ccf3b24e

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

36
             <img src="../../../../common/icon/userCenter-icon-3.png" width="100%" height="100%" alt="">
36
             <img src="../../../../common/icon/userCenter-icon-3.png" width="100%" height="100%" alt="">
37
           </div>
37
           </div>
38
           <span>VIP卡</span>
38
           <span>VIP卡</span>
39
-          <span>¥{{(Nums.account || {}).Amount || 0}} <i class="iconfont icon-jiantou-right" style="font-size: 0.1rem;"></i></span>
39
+          <span>¥{{Nums.vipbalance}} <i class="iconfont icon-jiantou-right" style="font-size: 0.1rem;"></i></span>
40
         </div>
40
         </div>
41
       </div>
41
       </div>
42
 
42
 

+ 15
- 7
src/pages/user/rush/index.vue View File

1
 <template>
1
 <template>
2
-  <div class="mainPage">
2
+  <div class="mainPage" v-if="showPage">
3
     <div class="top-time" v-if="timeStatus<2">
3
     <div class="top-time" v-if="timeStatus<2">
4
       <span v-if="timeStatus === 0">距抢购开始</span>
4
       <span v-if="timeStatus === 0">距抢购开始</span>
5
       <span v-if="timeStatus === 1">距抢购结束</span>
5
       <span v-if="timeStatus === 1">距抢购结束</span>
24
         </video>
24
         </video>
25
         <img v-else src="" width="100%" height="100%">
25
         <img v-else src="" width="100%" height="100%">
26
       </div> -->
26
       </div> -->
27
-      <pre class="rule">{{detail.FlashBuyInfo}}</pre>
27
+      <pre class="rule" v-html="detail.FlashBuyInfo"></pre>
28
       <div class="scope-of-time">
28
       <div class="scope-of-time">
29
         <div>活动时间</div>
29
         <div>活动时间</div>
30
         <div>{{toolClass.dateFormat(detail.StartDate)}} ~ {{toolClass.dateFormat(detail.EndDate)}}</div>
30
         <div>{{toolClass.dateFormat(detail.StartDate)}} ~ {{toolClass.dateFormat(detail.EndDate)}}</div>
31
       </div>
31
       </div>
32
     </div>
32
     </div>
33
+    <div class="sign-in" v-show="timeStatus !== 1" @click="signIn">立即注册</div>
33
     <div class="submit">
34
     <div class="submit">
34
-      <div :class="{light:timeStatus === 1}" @click="submit()">{{btnText[timeStatus]}}</div>
35
+      <div :class="{light:timeStatus === 1}" @click="submit()" v-if="!used">{{btnText[timeStatus]}}</div>
36
+      <div v-else>已抢购</div>
35
     </div>
37
     </div>
36
     <div class="success-box" v-if="showDialog">
38
     <div class="success-box" v-if="showDialog">
37
       <div class="success">
39
       <div class="success">
61
       timeStatus: 0, // 0、未开始 1、进行中 2、已结束 3、已抢购
63
       timeStatus: 0, // 0、未开始 1、进行中 2、已结束 3、已抢购
62
       btnText: ['立即抢购', '立即抢购', '已结束', '已抢购'],
64
       btnText: ['立即抢购', '立即抢购', '已结束', '已抢购'],
63
       Interval: null,
65
       Interval: null,
64
-      showDialog: false
66
+      showDialog: false,
67
+      used: false,
68
+      showPage: false
65
     }
69
     }
66
   },
70
   },
67
   created () {
71
   created () {
69
       let start = new Date(this.detail.StartDate).getTime()
73
       let start = new Date(this.detail.StartDate).getTime()
70
       let end = new Date(this.detail.EndDate).getTime()
74
       let end = new Date(this.detail.EndDate).getTime()
71
       this.timing(start, end)
75
       this.timing(start, end)
76
+      this.showPage = true
72
     })
77
     })
73
 
78
 
74
   },
79
   },
82
     timing (startTime, endTime) {
87
     timing (startTime, endTime) {
83
       this.Interval = setInterval(() => {
88
       this.Interval = setInterval(() => {
84
         let nowTime = new Date().getTime()
89
         let nowTime = new Date().getTime()
85
-        if (nowTime > endTime) {
90
+        if (nowTime >= endTime) {
86
           clearInterval(this.Interval)
91
           clearInterval(this.Interval)
87
           this.timeStatus = 2
92
           this.timeStatus = 2
88
           return
93
           return
89
-        } else if (nowTime < startTime) {
94
+        } else if (nowTime <= startTime) {
90
           let time = Math.floor((startTime - nowTime) / 1000)
95
           let time = Math.floor((startTime - nowTime) / 1000)
91
           this.getTime(time)
96
           this.getTime(time)
92
           this.timeStatus = 0
97
           this.timeStatus = 0
93
-        } else if (nowTime > startTime && nowTime < endTime) {
98
+        } else if (nowTime >= startTime && nowTime <= endTime) {
94
           let time = Math.floor((endTime - nowTime) / 1000)
99
           let time = Math.floor((endTime - nowTime) / 1000)
95
           this.getTime(time)
100
           this.getTime(time)
96
           this.timeStatus = 1
101
           this.timeStatus = 1
114
       this.setRush({ id: this.detail.FlashBuyId }).then(() => {
119
       this.setRush({ id: this.detail.FlashBuyId }).then(() => {
115
         this.showDialog = true
120
         this.showDialog = true
116
       })
121
       })
122
+    },
123
+    signIn () {
124
+      this.$router.push({ name: 'bindMobile' })
117
     }
125
     }
118
   }
126
   }
119
 }
127
 }

+ 14
- 0
src/pages/user/rush/page.scss View File

123
     }
123
     }
124
   }
124
   }
125
 }
125
 }
126
+.sign-in{
127
+  position: fixed;
128
+  bottom: .8rem;
129
+  right: .4rem;
130
+  width: .5rem;
131
+  height: .5rem;
132
+  background: #BAE0F6;
133
+  color: #fff;
134
+  font-size: .12rem;
135
+  display: flex;
136
+  justify-content: center;
137
+  align-items: center;
138
+  border-radius: 50%;
139
+}

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

1
 <template>
1
 <template>
2
   <div class="mainPage">
2
   <div class="mainPage">
3
-    <swiper :options="swiperOption" ref="mySwiper" class="inner">
3
+    <swiper :options="swiperOption" ref="mySwiper" class="inner" v-if="detail">
4
       <swiper-slide class="swiper-slide" v-for="(item,index) in detail" :key="index">
4
       <swiper-slide class="swiper-slide" v-for="(item,index) in detail" :key="index">
5
         <div class="vip-box">
5
         <div class="vip-box">
6
           <div class="vip-header">
6
           <div class="vip-header">
23
         </div>
23
         </div>
24
       </swiper-slide>
24
       </swiper-slide>
25
     </swiper>
25
     </swiper>
26
-    <div class="swiper-pagination"></div>
26
+    <div class="swiper-pagination" v-if="detail"></div>
27
+    <noMore v-if='!detail'></noMore>
27
   </div>
28
   </div>
28
 </template>
29
 </template>
29
 
30
 
31
 import vipBg from '../../../common/icon/vipBg.jpg'
32
 import vipBg from '../../../common/icon/vipBg.jpg'
32
 import { swiper, swiperSlide } from 'vue-awesome-swiper'
33
 import { swiper, swiperSlide } from 'vue-awesome-swiper'
33
 import 'swiper/dist/css/swiper.css'
34
 import 'swiper/dist/css/swiper.css'
35
+import noMore from '../../../components/noMore/noMore'
34
 import { createNamespacedHelpers } from 'vuex'
36
 import { createNamespacedHelpers } from 'vuex'
35
 const { mapState: mapVipState, mapActions: mapVipActions } = createNamespacedHelpers('vip')
37
 const { mapState: mapVipState, mapActions: mapVipActions } = createNamespacedHelpers('vip')
36
 export default {
38
 export default {
53
   components: {
55
   components: {
54
     swiper,
56
     swiper,
55
     swiperSlide,
57
     swiperSlide,
58
+    noMore
56
   },
59
   },
57
   created () {
60
   created () {
58
     this.getVipDetail().then((res) => {
61
     this.getVipDetail().then((res) => {
78
 </style>
81
 </style>
79
 
82
 
80
 <style>
83
 <style>
81
-.swiper-pagination > span{
84
+.swiper-pagination > span {
82
   margin: 0 0.025rem;
85
   margin: 0 0.025rem;
83
 }
86
 }
84
 </style>
87
 </style>

+ 4
- 0
src/pages/user/vipDetail/page.scss View File

65
         border-bottom: 1px solid rgba(242,242,242,1);
65
         border-bottom: 1px solid rgba(242,242,242,1);
66
         span{
66
         span{
67
           width: 30%;
67
           width: 30%;
68
+          overflow: hidden;
69
+          text-overflow: ellipsis;
70
+          white-space: nowrap;
71
+          margin-right: .05rem;
68
         }
72
         }
69
         .date{
73
         .date{
70
           color: #999;
74
           color: #999;