yuantianjiao 6 年之前
父節點
當前提交
f3ccf3b24e

+ 1
- 1
src/pages/user/mainPage/userCenter/index.vue 查看文件

@@ -36,7 +36,7 @@
36 36
             <img src="../../../../common/icon/userCenter-icon-3.png" width="100%" height="100%" alt="">
37 37
           </div>
38 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 40
         </div>
41 41
       </div>
42 42
 

+ 15
- 7
src/pages/user/rush/index.vue 查看文件

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

@@ -123,3 +123,17 @@
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 查看文件

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

+ 4
- 0
src/pages/user/vipDetail/page.scss 查看文件

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