diff --git a/App.vue b/App.vue index 46bb291..e6df8ae 100644 --- a/App.vue +++ b/App.vue @@ -2,7 +2,10 @@ export default { onShow: function (options) { console.log("show 项目init:", options, decodeURIComponent(options.query.scene)); + // 清除扫码获取的id信息 uni.removeStorageSync("scene"); + uni.removeStorageSync("user_scene"); + uni.removeStorageSync("user_options", options); if (options.query.id) { uni.setStorageSync("apply-jobdetail-id", options.query.id); diff --git a/pages/home/index.vue b/pages/home/index.vue index 6986a05..7923c53 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -19,7 +19,7 @@
-
+
@@ -30,7 +30,7 @@
-
+
diff --git a/pages/login/index.vue b/pages/login/index.vue index a0409b1..6402ec5 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -262,29 +262,31 @@ export default { uni.setStorageSync("apply-token", $data.token); // 单独存储 -- token,方便获取 uni.setStorageSync("apply-agencyId", $data.user.agencyId); // 单独存储 -- 代理id,方便获取 uni.setStorageSync("apply-supplierAccount", $data.supplierAccount); // 单独存储 -- 是否是发单号,方便获取 0.不是发单号 1.是发单号 - that.G.Get(that.api.login_agencyInfo, {}, (aRes) => { - console.log("获取团队信息:", aRes); - uni.setStorageSync("IS_CREATOR", aRes.agency.userId == $data.user.id || $data.admin == true ? 1 : 2); // 1是创建者 2是普通成员 - if (that.fromPageType == "detail") { - uni.navigateBack({ - delta: 1, - }); - return; - } - // 登录跳转到首页的判断 - uni.setStorageSync("SHOW_INVITE", 1); - console.log("that.path", that.path); - if (!that.path) { - uni.switchTab({ - url: "/pages/home/index", - }); - } else { - // 固定跳首页 - uni.reLaunch({ - url: that.path, - }); - } - }); + if (!that.path) { + uni.switchTab({ + url: "/pages/home/index", + }); + } else if (that.fromPageType == "detail") { + uni.navigateBack({ + delta: 1, + }); + return; + } else { + // 固定跳首页 + uni.reLaunch({ + url: that.path, + }); + } + if ($data.agencyStatus == 1) { + that.G.Get(that.api.login_agencyInfo, {}, (aRes) => { + console.log("获取团队信息:", aRes); + uni.setStorageSync("agencyInfo", aRes.agency); // 1是创建者 2是普通成员 + uni.setStorageSync("IS_CREATOR", aRes.agency.userId == $data.user.id || $data.admin == true ? 1 : 2); // 1是创建者 2是普通成员 + + // 登录跳转到首页的判断 + uni.setStorageSync("SHOW_INVITE", 1); + }); + } }, // 发送验证码 diff --git a/pages/workBench/index.vue b/pages/workBench/index.vue index 52719a8..614e5d9 100644 --- a/pages/workBench/index.vue +++ b/pages/workBench/index.vue @@ -11,7 +11,8 @@ {{ upNum }} 关注发单号 - + + diff --git a/root/bind/myMain.vue b/root/bind/myMain.vue index 58d36c6..9c87868 100644 --- a/root/bind/myMain.vue +++ b/root/bind/myMain.vue @@ -2,7 +2,7 @@ 邀请粉丝(代理)关注我的发单号 - + { + console.log("info11", info); + if (!info.msg) { + if (uni.getStorageSync("user_scene") || options.scene) { + this.scene = uni.getStorageSync("user_scene") ? decodeURIComponent(uni.getStorageSync("user_scene")) : decodeURIComponent(options.scene); + this.uid = this.scene.split("=")[1]; + + console.log("this.uid", this.uid); + uni.removeStorageSync("user_scene"); + } else { + if (uni.getStorageSync("user_options")) { + options = uni.getStorageSync("user_options"); + } + this.type = options.type ? options.type : ""; + this.isShowMore = options.isShowMore ? options.isShowMore : ""; + this.isShowJob = options.isShowJob ? options.isShowJob : ""; + this.jobDetailShow = options.jobDetailShow || true; + this.from = options.shareForm; + this.uid = options.id; + uni.removeStorageSync("user_options", options); + } + this.getDetail(); + } else { + if (options.scene) { + uni.setStorageSync("user_scene", options.scene); + } else { + uni.setStorageSync("user_options", options); + } + } + }); + if (options.bindid) { this.bindid = options.bindid; } @@ -193,43 +212,46 @@ export default { // this.G.isLogin(); // if (this.G.isLogin()) { that.pageSpeed = 0; - that.G.Get( - that.api.bind_enterpriseDetail + "/" + that.uid, - { - agencyId: that.uid, - type: that.type, - }, - (res) => { - console.log("获取详情:", res, " -- ", that.uid); - that.pageSpeed = 1; - that.info = res; - if (!that.uid) { - if (that.loginInfo.agencyId == that.info.agencyId) { - that.isSelf = true; + if (that.uid) { + that.G.Get( + that.api.bind_enterpriseDetail + "/" + that.uid, + { + agencyId: that.uid, + type: that.type, + }, + (res) => { + console.log("获取详情:", res, " -- ", that.uid); + that.pageSpeed = 1; + that.info = res; + if (!that.uid) { + if (that.loginInfo.agencyId == that.info.agencyId) { + that.isSelf = true; + } } + if (that.info.supplierAccount == 0) { + that.isShowMore = false; + } + that.agencyId = res.agencyId; + that.mLook = that.info.himSee == 1 ? false : true; + that.numSlot = [ + { + name: "职位数", + num: that.info.himSee == 0 ? 0 : that.info.jobNum, + }, + { + name: "今日更新", + num: that.info.jobUpdateNum, + }, + { + name: "粉丝数", + num: that.info.downNum, + }, + ]; + that.getList(); } - if (that.info.supplierAccount == 0) { - that.isShowMore = false; - } - that.agencyId = res.agencyId; - that.mLook = that.info.himSee == 1 ? false : true; - that.numSlot = [ - { - name: "职位数", - num: that.info.himSee == 0 ? 0 : that.info.jobNum, - }, - { - name: "今日更新", - num: that.info.jobUpdateNum, - }, - { - name: "粉丝数", - num: that.info.downNum, - }, - ]; - that.getList(); - } - ); + ); + } + // } }, goDetailUser() { diff --git a/root/person/applyManage.vue b/root/person/applyManage.vue index 2747712..b8e8b6a 100644 --- a/root/person/applyManage.vue +++ b/root/person/applyManage.vue @@ -1,7 +1,7 @@