|
|
|
@ -65,6 +65,7 @@ export function createApp () {
|
|
|
|
uni.setStorageSync('apply-userinfo-copy', JSON.stringify(res));
|
|
|
|
uni.setStorageSync('apply-userinfo-copy', JSON.stringify(res));
|
|
|
|
uni.setStorageSync("apply-agencyId", res.user.agencyId); // 单独存储 -- 代理id,方便获取
|
|
|
|
uni.setStorageSync("apply-agencyId", res.user.agencyId); // 单独存储 -- 代理id,方便获取
|
|
|
|
uni.setStorageSync("apply-supplierAccount", res.supplierAccount); // 单独存储 -- 是否是发单号,方便获取 0.不是发单号 1.是发单号
|
|
|
|
uni.setStorageSync("apply-supplierAccount", res.supplierAccount); // 单独存储 -- 是否是发单号,方便获取 0.不是发单号 1.是发单号
|
|
|
|
|
|
|
|
if (res.agencyStatus == 1) {
|
|
|
|
G.Get(apiInfo.login_agencyInfo, {}, (aRes) => {
|
|
|
|
G.Get(apiInfo.login_agencyInfo, {}, (aRes) => {
|
|
|
|
uni.setStorageSync("agencyInfo", aRes.agency); // 1是创建者 2是普通成员
|
|
|
|
uni.setStorageSync("agencyInfo", aRes.agency); // 1是创建者 2是普通成员
|
|
|
|
uni.setStorageSync("IS_CREATOR", aRes.agency.userId == res.user.id || res.admin == true ? 1 : 2); // 1是创建者 2是普通成员
|
|
|
|
uni.setStorageSync("IS_CREATOR", aRes.agency.userId == res.user.id || res.admin == true ? 1 : 2); // 1是创建者 2是普通成员
|
|
|
|
@ -73,6 +74,8 @@ export function createApp () {
|
|
|
|
uni.setStorageSync("SHOW_INVITE", 1);
|
|
|
|
uni.setStorageSync("SHOW_INVITE", 1);
|
|
|
|
resolve(res)
|
|
|
|
resolve(res)
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
function fail (err) {
|
|
|
|
function fail (err) {
|
|
|
|
console.log(err);
|
|
|
|
console.log(err);
|
|
|
|
@ -91,13 +94,16 @@ export function createApp () {
|
|
|
|
uni.setStorageSync('apply-userinfo-copy', JSON.stringify(res));
|
|
|
|
uni.setStorageSync('apply-userinfo-copy', JSON.stringify(res));
|
|
|
|
uni.setStorageSync("apply-agencyId", res.user.agencyId); // 单独存储 -- 代理id,方便获取
|
|
|
|
uni.setStorageSync("apply-agencyId", res.user.agencyId); // 单独存储 -- 代理id,方便获取
|
|
|
|
uni.setStorageSync("apply-supplierAccount", res.supplierAccount); // 单独存储 -- 是否是发单号,方便获取 0.不是发单号 1.是发单号
|
|
|
|
uni.setStorageSync("apply-supplierAccount", res.supplierAccount); // 单独存储 -- 是否是发单号,方便获取 0.不是发单号 1.是发单号
|
|
|
|
|
|
|
|
if (res.agencyStatus == 1) {
|
|
|
|
G.Get(apiInfo.login_agencyInfo, {}, (aRes) => {
|
|
|
|
G.Get(apiInfo.login_agencyInfo, {}, (aRes) => {
|
|
|
|
uni.setStorageSync("agencyInfo", aRes.agency); // 1是创建者 2是普通成员
|
|
|
|
uni.setStorageSync("agencyInfo", aRes.agency); // 1是创建者 2是普通成员
|
|
|
|
uni.setStorageSync("IS_CREATOR", aRes.agency.userId == res.user.id || res.admin == true ? 1 : 2); // 1是创建者 2是普通成员
|
|
|
|
uni.setStorageSync("IS_CREATOR", aRes.agency.userId == res.user.id || res.admin == true ? 1 : 2); // 1是创建者 2是普通成员
|
|
|
|
|
|
|
|
|
|
|
|
// 登录跳转到首页的判断
|
|
|
|
// 登录跳转到首页的判断
|
|
|
|
uni.setStorageSync("SHOW_INVITE", 1);
|
|
|
|
uni.setStorageSync("SHOW_INVITE", 1);
|
|
|
|
resolve(res)
|
|
|
|
resolve(res)
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|