yuantianjiao 6 年前
父节点
当前提交
0bcd2987a5

+ 4
- 0
src/components/myCard/myCard.vue 查看文件

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

+ 2
- 2
src/pages/user/bindMobile/bindMobile.vue 查看文件

202
             this.submitData(this.postData).then((res) => {
202
             this.submitData(this.postData).then((res) => {
203
               if (this.$route.query.isLottery) {
203
               if (this.$route.query.isLottery) {
204
                 setTimeout(() => {
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
                   window.location.href = `${window.location.origin}/game/luckdraw/${from}`
206
                   window.location.href = `${window.location.origin}/game/luckdraw/${from}`
207
                 }, 2000)
207
                 }, 2000)
208
               } else {
208
               } else {
225
         this.submitData(this.postData).then((res) => {
225
         this.submitData(this.postData).then((res) => {
226
           if (this.$route.query.isLottery) {
226
           if (this.$route.query.isLottery) {
227
             setTimeout(() => {
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
               window.location.href = `${window.location.origin}/game/luckdraw/${from}`
229
               window.location.href = `${window.location.origin}/game/luckdraw/${from}`
230
             }, 2000)
230
             }, 2000)
231
           } else {
231
           } else {

+ 1
- 3
src/pages/user/receive/index.vue 查看文件

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

+ 17
- 5
src/pages/user/rush/index.vue 查看文件

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-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
     <div class="submit">
34
     <div class="submit">
35
       <div :class="{light:timeStatus === 1}" @click="submit()" v-if="!used">{{btnText[timeStatus]}}</div>
35
       <div :class="{light:timeStatus === 1}" @click="submit()" v-if="!used">{{btnText[timeStatus]}}</div>
36
       <div v-else>已抢购</div>
36
       <div v-else>已抢购</div>
51
 import { mapState, createNamespacedHelpers } from 'vuex'
51
 import { mapState, createNamespacedHelpers } from 'vuex'
52
 const { mapActions: actions } = createNamespacedHelpers('app')
52
 const { mapActions: actions } = createNamespacedHelpers('app')
53
 const { mapState: mapRushState, mapActions: mapRushActions } = createNamespacedHelpers('rush')
53
 const { mapState: mapRushState, mapActions: mapRushActions } = createNamespacedHelpers('rush')
54
+const { mapState: mapUserState } = createNamespacedHelpers('userCenter')
54
 export default {
55
 export default {
55
   data () {
56
   data () {
56
     return {
57
     return {
70
     }
71
     }
71
   },
72
   },
72
   created () {
73
   created () {
74
+    console.log(1)
75
+    console.log(this.userInfo)
73
     this.AddNewFlashBuyCustomer({ flashBuyId: this.$route.query.flashBuyId }).then(() => {
76
     this.AddNewFlashBuyCustomer({ flashBuyId: this.$route.query.flashBuyId }).then(() => {
74
       this.getRush({ flashBuyId: this.$route.query.flashBuyId }).then((res) => {
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
         let start = new Date(this.detail.StartDate).getTime()
80
         let start = new Date(this.detail.StartDate).getTime()
78
         let end = new Date(this.detail.EndDate).getTime()
81
         let end = new Date(this.detail.EndDate).getTime()
79
         this.timing(start, end)
82
         this.timing(start, end)
83
   computed: {
86
   computed: {
84
     ...mapRushState({
87
     ...mapRushState({
85
       detail: item => item.rushDetail
88
       detail: item => item.rushDetail
89
+    }),
90
+    ...mapUserState({
91
+      userInfo: x => x.userInfo
86
     })
92
     })
87
   },
93
   },
88
   methods: {
94
   methods: {
119
       this.day = day < 10 ? '0' + day : day
125
       this.day = day < 10 ? '0' + day : day
120
     },
126
     },
121
     submit () {
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
         this.signIn()
133
         this.signIn()
124
         return
134
         return
125
       }
135
       }
126
-      if (this.timeStatus !== 1) {
136
+      if (!this.newCustomer && this.detail.AttendantType !== 'no') {
137
+        this.$toast('此活动仅限新用户参与')
127
         return
138
         return
128
       }
139
       }
129
       this.setRush({ id: this.detail.FlashBuyId }).then(() => {
140
       this.setRush({ id: this.detail.FlashBuyId }).then(() => {
130
         this.UpdateFlashBuyCustomer({ flashBuyId: this.$route.query.flashBuyId })
141
         this.UpdateFlashBuyCustomer({ flashBuyId: this.$route.query.flashBuyId })
142
+        this.used = true
131
         this.showDialog = true
143
         this.showDialog = true
132
       })
144
       })
133
     },
145
     },

+ 2
- 0
src/pages/user/rush/page.scss 查看文件

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