Commit 6829b712 authored by Edwise's avatar Edwise 🍷

助力弹窗防连点

parent e1512fb6
......@@ -13,6 +13,7 @@ const {
getSystemInfo
} = tbcc.tb
Component({
canDoHelp:true,
props: {},
data: {
resList: resList
......@@ -33,6 +34,8 @@ Component({
},
/**助力 */
async doHelp() {
if(!this.canDoHelp) return;
this.canDoHelp = false;
my.showLoading();
const {
success,
......@@ -45,13 +48,16 @@ Component({
if (r.data && !r.data.isVip) {
my.hideLoading();
commonToast("3s入会,即可为好友助力", 1500, () => {
this.canDoHelp = true;
app.isGoVip = true;
navigateToOutside(r.data.url);
})
} else if (r.data && r.data.isVip) {
this.canDoHelp = true;
my.hideLoading();
this.openInviteFailedModal();
} else {
this.canDoHelp = true;
my.hideLoading();
const {
onCloseModal
......@@ -62,6 +68,7 @@ Component({
}) || {};
console.log("hhahahha")
if (success) {
this.canDoHelp = true;
this.openInviteSuccessModal();
}
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