|
@@ -49,9 +49,8 @@
|
49
|
49
|
<script>
|
50
|
50
|
import logo from '../../../common/icon/qrCode.jpg'
|
51
|
51
|
import { mapState, createNamespacedHelpers } from 'vuex'
|
52
|
|
-const { mapActions: actions } = createNamespacedHelpers('app')
|
53
|
52
|
const { mapState: mapRushState, mapActions: mapRushActions } = createNamespacedHelpers('rush')
|
54
|
|
-const { mapState: mapUserState } = createNamespacedHelpers('userCenter')
|
|
53
|
+const { mapState: mapUserState, mapActions: mapUserActions } = createNamespacedHelpers('userCenter')
|
55
|
54
|
export default {
|
56
|
55
|
data () {
|
57
|
56
|
return {
|
|
@@ -71,10 +70,19 @@ export default {
|
71
|
70
|
}
|
72
|
71
|
},
|
73
|
72
|
created () {
|
74
|
|
- console.log(1)
|
75
|
|
- console.log(this.userInfo)
|
|
73
|
+ if (location.search && this.toolClass.UrlSearch(location.search).code) {
|
|
74
|
+ this.code = this.toolClass.UrlSearch(location.search).code
|
|
75
|
+ } else {
|
|
76
|
+ this.code = null
|
|
77
|
+ }
|
|
78
|
+ this.getUserInfo({ org: this.org, code: this.code }).then(() => {
|
|
79
|
+ console.log(this.userInfo)
|
|
80
|
+ })
|
76
|
81
|
this.AddNewFlashBuyCustomer({ flashBuyId: this.$route.query.flashBuyId }).then(() => {
|
77
|
82
|
this.getRush({ flashBuyId: this.$route.query.flashBuyId }).then((res) => {
|
|
83
|
+ if (!res.flashBuy) {
|
|
84
|
+ this.$toast('活动已不存在')
|
|
85
|
+ }
|
78
|
86
|
this.used = res.flashCustomer.IsAttend === 1 ? false : true
|
79
|
87
|
this.newCustomer = res.flashCustomer.IsNew === 1 ? true : false
|
80
|
88
|
let start = new Date(this.detail.StartDate).getTime()
|
|
@@ -89,10 +97,14 @@ export default {
|
89
|
97
|
}),
|
90
|
98
|
...mapUserState({
|
91
|
99
|
userInfo: x => x.userInfo
|
|
100
|
+ }),
|
|
101
|
+ ...mapState({
|
|
102
|
+ org: x => x.app.orgId
|
92
|
103
|
})
|
93
|
104
|
},
|
94
|
105
|
methods: {
|
95
|
106
|
...mapRushActions(['setRush', 'getRush', 'AddNewFlashBuyCustomer', 'IsNewCustomer', 'UpdateFlashBuyCustomer']),
|
|
107
|
+ ...mapUserActions(['getUserInfo']),
|
96
|
108
|
timing (startTime, endTime) {
|
97
|
109
|
this.Interval = setInterval(() => {
|
98
|
110
|
let nowTime = new Date().getTime()
|
|
@@ -158,4 +170,7 @@ export default {
|
158
|
170
|
.rule img {
|
159
|
171
|
width: 100%;
|
160
|
172
|
}
|
|
173
|
+.rule p {
|
|
174
|
+ color: #9d876d;
|
|
175
|
+}
|
161
|
176
|
</style>
|