...
|
...
|
@@ -58,8 +58,6 @@ export default { |
|
|
this.$refs.popup.show(() => {
|
|
|
this.$refs.couponListScroll.refresh();
|
|
|
});
|
|
|
|
|
|
this.checkLogin();
|
|
|
},
|
|
|
methods: {
|
|
|
...mapActions(['getCoupon']),
|
...
|
...
|
@@ -69,21 +67,16 @@ export default { |
|
|
onHide() {
|
|
|
this.$emit('hide');
|
|
|
},
|
|
|
async checkLogin() {
|
|
|
const user = await this.$yoho.auth();
|
|
|
|
|
|
if (user.uid) {
|
|
|
this.isLogin = true;
|
|
|
}
|
|
|
},
|
|
|
clickButton(item) {
|
|
|
async clickButton(item) {
|
|
|
let couponToken = item.couponToken;
|
|
|
|
|
|
if (item.receive === 'N') { // 是否可以领取 N:否,Y:是
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (this.isLogin) {
|
|
|
const user = await this.$yoho.auth();
|
|
|
|
|
|
if (user && user.uid) {
|
|
|
this.getCoupon({couponToken: couponToken}).then(result => {
|
|
|
console.log(result);
|
|
|
this.$createDialog({
|
...
|
...
|
@@ -96,8 +89,6 @@ export default { |
|
|
this.$emit('updateCoupon');
|
|
|
}
|
|
|
});
|
|
|
} else if (!this.isLogin) {
|
|
|
this.checkLogin();
|
|
|
}
|
|
|
}
|
|
|
},
|
...
|
...
|
@@ -143,7 +134,7 @@ export default { |
|
|
|
|
|
.item-button {
|
|
|
width: 180px;
|
|
|
height: 90px;
|
|
|
height: 80px;
|
|
|
border-radius: 40px;
|
|
|
background: #002B47;
|
|
|
color: #fff;
|
...
|
...
|
|