|
@@ -29,19 +29,23 @@ Page({
|
|
|
}
|
|
|
};
|
|
|
const res = isToken ? await _Http.basic(params) : await _Http.base(params);
|
|
|
- if (res.msg != '成功') await _Http.base(params);
|
|
|
+ if (res.msg != '成功') res = await _Http.base(params);
|
|
|
if (res.msg == '成功') {
|
|
|
if (res.data.attinfos.length) res.data.attinfos = MFT.fileList(res.data.attinfos);
|
|
|
this.setData({
|
|
|
detailsData: res.data
|
|
|
});
|
|
|
- //无状态弹窗
|
|
|
- if (!isToken) Dialog.confirm({
|
|
|
+
|
|
|
+ //分享进入
|
|
|
+ if (wx.getLaunchOptionsSync().scene == 1154) {
|
|
|
+ this.addNew(false)
|
|
|
+ } else if ([1007, 1008].includes(wx.getLaunchOptionsSync().scene)) Dialog.confirm({
|
|
|
title: '提示',
|
|
|
- message: '帮助完善信息',
|
|
|
+ message: '请帮助完善信息',
|
|
|
})
|
|
|
.then(this.addNew)
|
|
|
.catch(this.addNew)
|
|
|
+
|
|
|
} else {
|
|
|
wx.showToast({
|
|
|
title: res.msg,
|
|
@@ -50,8 +54,9 @@ Page({
|
|
|
}
|
|
|
},
|
|
|
/* 新增拉新用户 */
|
|
|
- async addNew(id) {
|
|
|
- let name = await new Promise((res, rej) => {
|
|
|
+ async addNew(gain = true) {
|
|
|
+ let name = '微信用户';
|
|
|
+ if (gain) name = await new Promise((res, rej) => {
|
|
|
wx.getUserProfile({
|
|
|
desc: '用于完善用户资料',
|
|
|
success: ({
|
|
@@ -64,6 +69,7 @@ Page({
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
+
|
|
|
let channel = null,
|
|
|
that = this;
|
|
|
switch (wx.getLaunchOptionsSync().scene) {
|
|
@@ -80,6 +86,7 @@ Page({
|
|
|
channel = '其他方式'
|
|
|
break;
|
|
|
}
|
|
|
+
|
|
|
wx.login({
|
|
|
success(res) {
|
|
|
_Http.base({
|