diff --git a/components/list/job.vue b/components/list/job.vue index c74a303..97ea397 100644 --- a/components/list/job.vue +++ b/components/list/job.vue @@ -90,9 +90,7 @@ - 登录查看 - {{ item.fuWuFei || "详询客服" }} - {{ "仅代理可见" }} + {{ (recordStatus == 3 || recordStatus == 4 || recordStatus == 5) && !isSelf ? "关注查看" : item.policyClassify == 1 ? item.fuWuFei : "总价" }} @@ -218,6 +216,12 @@ export default { return "default"; }, }, + isSelf: { + type: Boolean, + default: () => { + return false; + }, + }, isuse: { type: String, default: () => { diff --git a/pages/login/index.vue b/pages/login/index.vue index 6402ec5..c2e1c92 100644 --- a/pages/login/index.vue +++ b/pages/login/index.vue @@ -156,6 +156,10 @@ export default { wxCode: "", }; } + uni.showLoading({ + title: "登录中...", + mask: true, + }); // #ifdef MP-WEIXIN uni.checkSession({ success() { @@ -254,6 +258,7 @@ export default { setToken($data) { let that = this; console.log("获取登录用户信息:", $data); + uni.hideLoading(); uni.setStorageSync("apply-userinfo", $data); // 获取用户信息, 参与实际逻辑 uni.setStorageSync("apply-userinfo-copy", JSON.stringify($data)); // 仅用于查看数据,不参与实际逻辑 uni.setStorageSync("apply-avatar", $data.imgSrc); // 单独存储 -- 头像,方便修改 @@ -277,16 +282,16 @@ export default { 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是普通成员 + // 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); - }); - } + // 登录跳转到首页的判断 + uni.setStorageSync("SHOW_INVITE", 1); + }); + // } }, // 发送验证码 diff --git a/pages/person/index.vue b/pages/person/index.vue index 2d6acd9..4f7babb 100644 --- a/pages/person/index.vue +++ b/pages/person/index.vue @@ -4,9 +4,9 @@ 我的发单账号 - {{ userinfo.agencyName }} + {{ userInfo.agencyName }} @@ -25,7 +25,7 @@ --> - + - + @@ -197,7 +199,7 @@ export default { path: "/root/bind/search?active=1", }, ], - userinfo: { + userInfo: { all: {}, avatar: "", name: "请登录", @@ -252,11 +254,11 @@ export default { that.waitNum_ups = 0; that.pageSpeed = 1; that.isLogin = false; - that.userinfo.avatar = that.G.store().localBaseImg + "fadanzhushou.png"; - that.userinfo.name = "请登录"; - that.userinfo.tel = "-"; - that.userinfo.agencyName = ""; - that.userinfo.teamType = 0; + that.userInfo.avatar = that.G.store().localBaseImg + "fadanzhushou.png"; + that.userInfo.name = "请登录"; + that.userInfo.tel = "-"; + that.userInfo.agencyName = ""; + that.userInfo.teamType = 0; that.speed = 0; } }, @@ -302,7 +304,7 @@ export default { pRow: 12, }, ]; - if (uni.getStorageSync("apply-supplierAccount") == 1) { + // if (uni.getStorageSync("apply-supplierAccount") == 1) { // 有 that.isHaveOrder = true; if (that.isCreator) { @@ -326,19 +328,17 @@ export default { }, ]; } - } + // } let userInfo = uni.getStorageSync("apply-userinfo"); that.isLogin = true; + that.userInfo = { ...userInfo }; + console.log(that.userInfo,'that.userInfo'); + that.userInfo.avatar = uni.getStorageSync("apply-avatar"); + that.userInfo.name = userInfo.userName || userInfo.aliasName; + that.userInfo.tel = uni.getStorageSync("apply-tel"); - that.userinfo.agencyName = userInfo.agencyName; - that.userinfo.user = userInfo.user; - - that.userinfo.avatar = uni.getStorageSync("apply-avatar"); - that.userinfo.name = userInfo.userName || userInfo.aliasName; - that.userinfo.tel = uni.getStorageSync("apply-tel"); - - if (that.userinfo.num[0].name == "-") { - that.userinfo.num = [ + if (that.userInfo.num[0].name == "-") { + that.userInfo.num = [ { name: "-", num: "-", @@ -346,11 +346,11 @@ export default { ]; } - that.userinfo.agencyName = userInfo.agencyName; - that.userinfo.teamType = userInfo.teamType; - that.getWaitNum(); - that.checkInvite(); - that.getTeamList(); + that.userInfo.agencyName = userInfo.agencyName; + that.userInfo.teamType = userInfo.teamType; + // that.getWaitNum(); + // that.checkInvite(); + // that.getTeamList(); if (uni.getStorageSync("watch_invite")) { if (uni.getStorageSync("watch_invite") == 1) { @@ -390,16 +390,16 @@ export default { type: 2, }, (res) => { - if (res.total > 0) { - uni.setTabBarBadge({ - index: 2, - text: String(res.total), - }); - } else { - uni.removeTabBarBadge({ - index: 2, - }); - } + // if (res.total > 0) { + // uni.setTabBarBadge({ + // index: 2, + // text: String(res.total), + // }); + // } else { + // uni.removeTabBarBadge({ + // index: 2, + // }); + // } that.waitNum_ups = res.total; that.getDetail(); } @@ -420,7 +420,7 @@ export default { that.pageSpeed = 1; if (uni.getStorageSync("apply-supplierAccount") == 1) { // 有 - that.userinfo.num = [ + that.userInfo.num = [ { name: "全部职位", num: res.jobNum, @@ -442,7 +442,7 @@ export default { ]; } else { // 无 - that.userinfo.num = [ + that.userInfo.num = [ { name: "关注", num: res.upNum, @@ -521,7 +521,7 @@ export default { that.G.Get(that.api.user_getTeamList, {}, (res) => { console.log("res", res); res.forEach((item) => { - if (item.id == that.userinfo.user.agencyId) { + if (item.id == that.userInfo.user.agencyId) { item.checked = true; } }); diff --git a/pages/workBench/index.vue b/pages/workBench/index.vue index 614e5d9..5006b18 100644 --- a/pages/workBench/index.vue +++ b/pages/workBench/index.vue @@ -1,6 +1,6 @@