yuantianjiao 6 lat temu
rodzic
commit
0bcd2987a5

+ 4
- 0
src/components/myCard/myCard.vue Wyświetl plik

@@ -137,6 +137,10 @@ export default {
137 137
       flex: 1;
138 138
       h2 {
139 139
         font-size: 0.16rem;
140
+        overflow: hidden;
141
+        text-overflow: ellipsis;
142
+        white-space: nowrap;
143
+        width: 2rem;
140 144
       }
141 145
       span {
142 146
         color: #323645;

+ 2
- 2
src/pages/user/bindMobile/bindMobile.vue Wyświetl plik

@@ -202,7 +202,7 @@ export default {
202 202
             this.submitData(this.postData).then((res) => {
203 203
               if (this.$route.query.isLottery) {
204 204
                 setTimeout(() => {
205
-                  const from = this.$route.query.luckshare ? `#/from/${this.$route.query.luckshare}?lotteryId=${this.$route.query.lotteryId}&isnew=1` : `?lotteryId=${this.$route.query.lotteryId}&isnew=1`
205
+                  const from = this.$route.query.luckshare ? `#/from/${this.$route.query.luckshare}?lotteryId=${this.$route.query.lotteryId}&isnew=1` : `#/?lotteryId=${this.$route.query.lotteryId}&isnew=1`
206 206
                   window.location.href = `${window.location.origin}/game/luckdraw/${from}`
207 207
                 }, 2000)
208 208
               } else {
@@ -225,7 +225,7 @@ export default {
225 225
         this.submitData(this.postData).then((res) => {
226 226
           if (this.$route.query.isLottery) {
227 227
             setTimeout(() => {
228
-              const from = this.$route.query.luckshare ? `#/from/${this.$route.query.luckshare}?lotteryId=${this.$route.query.lotteryId}&isnew=1` : `?lotteryId=${this.$route.query.lotteryId}&isnew=1`
228
+              const from = this.$route.query.luckshare ? `#/from/${this.$route.query.luckshare}?lotteryId=${this.$route.query.lotteryId}&isnew=1` : `#/?lotteryId=${this.$route.query.lotteryId}&isnew=1`
229 229
               window.location.href = `${window.location.origin}/game/luckdraw/${from}`
230 230
             }, 2000)
231 231
           } else {

+ 1
- 3
src/pages/user/receive/index.vue Wyświetl plik

@@ -116,9 +116,7 @@ export default {
116 116
         })
117 117
       }
118 118
       if (this.$route.query.isAuto === 'auto') {
119
-        setTimeout(() => {
120
-          this.receive()
121
-        }, 1000)
119
+        this.receive()
122 120
       }
123 121
     },
124 122
     receive () {

+ 17
- 5
src/pages/user/rush/index.vue Wyświetl plik

@@ -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-if="timeStatus !== 2 && newCustomer && detail.AttendantType === 'no'" @click="signIn">立即注册</div>
33
+    <div class="sign-in" v-if="timeStatus !== 2 && detail.AttendantType === 'no' && !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>
@@ -51,6 +51,7 @@ import logo from '../../../common/icon/qrCode.jpg'
51 51
 import { mapState, createNamespacedHelpers } from 'vuex'
52 52
 const { mapActions: actions } = createNamespacedHelpers('app')
53 53
 const { mapState: mapRushState, mapActions: mapRushActions } = createNamespacedHelpers('rush')
54
+const { mapState: mapUserState } = createNamespacedHelpers('userCenter')
54 55
 export default {
55 56
   data () {
56 57
     return {
@@ -70,10 +71,12 @@ export default {
70 71
     }
71 72
   },
72 73
   created () {
74
+    console.log(1)
75
+    console.log(this.userInfo)
73 76
     this.AddNewFlashBuyCustomer({ flashBuyId: this.$route.query.flashBuyId }).then(() => {
74 77
       this.getRush({ flashBuyId: this.$route.query.flashBuyId }).then((res) => {
75
-        this.used = res.IsAttend
76
-        this.newCustomer = res.IsNew ? true : false
78
+        this.used = res.flashCustomer.IsAttend === 1 ? false : true
79
+        this.newCustomer = res.flashCustomer.IsNew === 1 ? true : false
77 80
         let start = new Date(this.detail.StartDate).getTime()
78 81
         let end = new Date(this.detail.EndDate).getTime()
79 82
         this.timing(start, end)
@@ -83,6 +86,9 @@ export default {
83 86
   computed: {
84 87
     ...mapRushState({
85 88
       detail: item => item.rushDetail
89
+    }),
90
+    ...mapUserState({
91
+      userInfo: x => x.userInfo
86 92
     })
87 93
   },
88 94
   methods: {
@@ -119,15 +125,21 @@ export default {
119 125
       this.day = day < 10 ? '0' + day : day
120 126
     },
121 127
     submit () {
122
-      if (this.newCustomer && this.detail.AttendantType !== 'no') {
128
+      if (this.timeStatus !== 1) {
129
+        this.$toast('活动未开始,敬请期待')
130
+        return
131
+      }
132
+      if (this.newCustomer && !this.userInfo.customer.Phone) {
123 133
         this.signIn()
124 134
         return
125 135
       }
126
-      if (this.timeStatus !== 1) {
136
+      if (!this.newCustomer && this.detail.AttendantType !== 'no') {
137
+        this.$toast('此活动仅限新用户参与')
127 138
         return
128 139
       }
129 140
       this.setRush({ id: this.detail.FlashBuyId }).then(() => {
130 141
         this.UpdateFlashBuyCustomer({ flashBuyId: this.$route.query.flashBuyId })
142
+        this.used = true
131 143
         this.showDialog = true
132 144
       })
133 145
     },

+ 2
- 0
src/pages/user/rush/page.scss Wyświetl plik

@@ -20,6 +20,7 @@
20 20
 .content{
21 21
   padding: .24rem .2rem .6rem;
22 22
   box-sizing: border-box;
23
+  background-color: #fff;
23 24
   .title{
24 25
     text-align: center;
25 26
     font-size: .16rem;
@@ -73,6 +74,7 @@
73 74
   z-index: 2;
74 75
   width: 100%;
75 76
   height: .6rem;
77
+  background-color: #fff;
76 78
   div{
77 79
     width: 3.35rem;
78 80
     height: .4rem;