Commit 6829b712 authored by Edwise's avatar Edwise 🍷

助力弹窗防连点

parent e1512fb6
...@@ -13,6 +13,7 @@ const { ...@@ -13,6 +13,7 @@ const {
getSystemInfo getSystemInfo
} = tbcc.tb } = tbcc.tb
Component({ Component({
canDoHelp:true,
props: {}, props: {},
data: { data: {
resList: resList resList: resList
...@@ -33,6 +34,8 @@ Component({ ...@@ -33,6 +34,8 @@ Component({
}, },
/**助力 */ /**助力 */
async doHelp() { async doHelp() {
if(!this.canDoHelp) return;
this.canDoHelp = false;
my.showLoading(); my.showLoading();
const { const {
success, success,
...@@ -45,13 +48,16 @@ Component({ ...@@ -45,13 +48,16 @@ Component({
if (r.data && !r.data.isVip) { if (r.data && !r.data.isVip) {
my.hideLoading(); my.hideLoading();
commonToast("3s入会,即可为好友助力", 1500, () => { commonToast("3s入会,即可为好友助力", 1500, () => {
this.canDoHelp = true;
app.isGoVip = true; app.isGoVip = true;
navigateToOutside(r.data.url); navigateToOutside(r.data.url);
}) })
} else if (r.data && r.data.isVip) { } else if (r.data && r.data.isVip) {
this.canDoHelp = true;
my.hideLoading(); my.hideLoading();
this.openInviteFailedModal(); this.openInviteFailedModal();
} else { } else {
this.canDoHelp = true;
my.hideLoading(); my.hideLoading();
const { const {
onCloseModal onCloseModal
...@@ -62,6 +68,7 @@ Component({ ...@@ -62,6 +68,7 @@ Component({
}) || {}; }) || {};
console.log("hhahahha") console.log("hhahahha")
if (success) { if (success) {
this.canDoHelp = true;
this.openInviteSuccessModal(); this.openInviteSuccessModal();
} }
my.hideLoading(); my.hideLoading();
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment