Commit bb89a9be authored by Edwise's avatar Edwise 🍷

111

parent cb7976e8
...@@ -9,7 +9,7 @@ cloud.init({ ...@@ -9,7 +9,7 @@ cloud.init({
App({ App({
env, env,
requestType: 'cloud', // yapi,cloud: 云函数 requestType: 'cloud', // yapi,cloud: 云函数
// requestType: 'local', // yapi,cloud: 云函数 // requestType: 'local', // yapi,cloud: 云函数
cloudName: 'jn', // 主云函数项目名 tmallCat cloudName: 'jn', // 主云函数项目名 tmallCat
// cloudName: 'bubbleSurviva', // 主云函数项目名 tmallCat // cloudName: 'bubbleSurviva', // 主云函数项目名 tmallCat
cloud, cloud,
......
...@@ -33,6 +33,7 @@ Component({ ...@@ -33,6 +33,7 @@ Component({
}, },
/**助力 */ /**助力 */
async doHelp() { async doHelp() {
my.showLoading();
const { const {
success, success,
data, data,
...@@ -42,13 +43,20 @@ Component({ ...@@ -42,13 +43,20 @@ Component({
inviteStep: app.step inviteStep: app.step
}).catch(r => { }).catch(r => {
if (r.data && !r.data.isVip) { if (r.data && !r.data.isVip) {
my.hideLoading();
commonToast("3s入会,即可为好友助力", 1500, () => { commonToast("3s入会,即可为好友助力", 1500, () => {
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) {
my.hideLoading();
this.openInviteFailedModal(); this.openInviteFailedModal();
} else { } else {
my.hideLoading();
const {
onCloseModal
} = this.props;
onCloseModal && onCloseModal();
commonToast(r&&r.message); commonToast(r&&r.message);
} }
}) || {}; }) || {};
...@@ -56,6 +64,7 @@ Component({ ...@@ -56,6 +64,7 @@ Component({
if (success) { if (success) {
this.openInviteSuccessModal(); 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