yuantianjiao 6 years ago
parent
commit
77273712f7
2 changed files with 6 additions and 3 deletions
  1. 5
    2
      src/pages/user/rush/index.vue
  2. 1
    1
      src/store/rush/index.js

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

@@ -30,7 +30,7 @@
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
+    <div class="sign-in" v-if="timeStatus !== 1 && !used" @click="signIn">立即注册</div>
34 34
     <div class="submit">
35 35
       <div :class="{light:timeStatus === 1}" @click="submit()" v-if="!used">{{btnText[timeStatus]}}</div>
36 36
       <div v-else>已抢购</div>
@@ -69,7 +69,10 @@ export default {
69 69
     }
70 70
   },
71 71
   created () {
72
-    this.getRush({ flashBuyId: this.$route.query.flashBuyId }).then(() => {
72
+    this.getRush({ flashBuyId: this.$route.query.flashBuyId }).then((res) => {
73
+      if (res.userInfo){
74
+        this.used = true
75
+      }
73 76
       let start = new Date(this.detail.StartDate).getTime()
74 77
       let end = new Date(this.detail.EndDate).getTime()
75 78
       this.timing(start, end)

+ 1
- 1
src/store/rush/index.js View File

@@ -9,7 +9,7 @@ export default {
9 9
   },
10 10
   mutations: {
11 11
     setDetail (state, data) {
12
-      state.rushDetail = data || []
12
+      state.rushDetail = data.flashBuy || {}
13 13
     }
14 14
   },
15 15
   actions: {