Commit 34629d95 authored by wildfirecode13's avatar wildfirecode13

1

parent aeb8e765
......@@ -158,13 +158,23 @@ Page({
//是分享落地页,可以助力
//todo 需要判断是不是会员
commonToast('准备5秒后给邀请者助力~');
setTimeout(() => {
API.doHelp({activityId: app.activityId,inviteId:this.inviteId}).then(res=>{
commonToast('助力成功~');
}).catch(err=>{
commonToast(JSON.stringify(err));
});
}, 5000);
this.showCommonModal({
content: '活动还未开始\n请稍后',
btnText: '我知道了',
commonModalVisibleT1: true,
confirmCallback: () => {
this.closeCommonModal();
}
});
// setTimeout(() => {
// API.doHelp({activityId: app.activityId,inviteId:this.inviteId}).then(res=>{
// commonToast('助力成功~');
// }).catch(err=>{
// commonToast(JSON.stringify(err));
// });
// }, 5000);
}else{
commonToast('不是分享落地页,不需要走助力~')
}
......@@ -434,6 +444,18 @@ Page({
}
},
/**
* 显示通用弹层
* @param {object} options content: 通用弹层内容 btnText:按钮文案 confirmCallback: 按钮确认回调
*/
showCommonModal({ content, btnText, confirmCallback }) {
this.setData({
commonModalConfirm: confirmCallback || null,
commonModalVisible: true,
commonModalData: { content, btnText }
});
},
changeURLArg(url, arg, arg_val) {
var pattern = arg + '=([^&]*)';
var replaceText = arg + '=' + arg_val;
......
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