diff --git a/App.vue b/App.vue index 860e559..2774ed1 100644 --- a/App.vue +++ b/App.vue @@ -55,7 +55,7 @@ export default { if (uni.getStorageSync("apply-token")) { that.checkNum(); } - }, 1 * 30 * 1000); + }, 30 * 1000); } uni.$on("isGlogin", function (data) { @@ -69,7 +69,13 @@ export default { // that.initWyyx() } }, - onHide: function () {}, + onHide: function () { + if (this.globalData.timer) { + clearInterval(this.globalData.timer); + this.globalData.timer = null; + console.log("定时任务已清除"); + } + }, methods: { initWyyx() { let that = this; diff --git a/README.md b/README.md new file mode 100644 index 0000000..2acbaa0 --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# 报名助手 + +``` +段后注释文本 +上8,#999,左对齐,14px +``` \ No newline at end of file diff --git a/components/list/job.vue b/components/list/job.vue index e3080aa..9371da0 100644 --- a/components/list/job.vue +++ b/components/list/job.vue @@ -21,8 +21,10 @@ - - + + diff --git a/components/list/jobChild/top.vue b/components/list/jobChild/top.vue index 5a815c8..d33a064 100644 --- a/components/list/jobChild/top.vue +++ b/components/list/jobChild/top.vue @@ -47,7 +47,9 @@ - + {{ info.jobInfo || "-" }} diff --git a/components/quickLogin.vue b/components/quickLogin.vue index f1ba52b..f421b41 100644 --- a/components/quickLogin.vue +++ b/components/quickLogin.vue @@ -32,6 +32,7 @@ export default { openId: wxRes.openId, tel: wxRes.phoneNumber, unionid: wxRes.unionid, + createFakerAgency: 1, }, (res) => { console.log("res", res); @@ -82,6 +83,7 @@ export default { openId: wxRes.openId, tel: wxRes.phoneNumber, unionid: wxRes.unionid, + createFakerAgency: 1, }, (res) => { that.setToken(res); diff --git a/main.js b/main.js index 26b595e..9858219 100644 --- a/main.js +++ b/main.js @@ -65,14 +65,17 @@ export function createApp () { uni.setStorageSync('apply-userinfo-copy', JSON.stringify(res)); uni.setStorageSync("apply-agencyId", res.user.agencyId); // 单独存储 -- 代理id,方便获取 uni.setStorageSync("apply-supplierAccount", res.supplierAccount); // 单独存储 -- 是否是发单号,方便获取 0.不是发单号 1.是发单号 - G.Get(apiInfo.login_agencyInfo, {}, (aRes) => { - uni.setStorageSync("agencyInfo", aRes.agency); // 1是创建者 2是普通成员 - uni.setStorageSync("IS_CREATOR", aRes.agency.userId == res.user.id || res.admin == true ? 1 : 2); // 1是创建者 2是普通成员 + if (res.agencyStatus == 1) { + G.Get(apiInfo.login_agencyInfo, {}, (aRes) => { + 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("SHOW_INVITE", 1); + resolve(res) + }); + } - // 登录跳转到首页的判断 - uni.setStorageSync("SHOW_INVITE", 1); - resolve(res) - }); }, function fail (err) { console.log(err); @@ -91,13 +94,16 @@ export function createApp () { uni.setStorageSync('apply-userinfo-copy', JSON.stringify(res)); uni.setStorageSync("apply-agencyId", res.user.agencyId); // 单独存储 -- 代理id,方便获取 uni.setStorageSync("apply-supplierAccount", res.supplierAccount); // 单独存储 -- 是否是发单号,方便获取 0.不是发单号 1.是发单号 - G.Get(apiInfo.login_agencyInfo, {}, (aRes) => { - 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("SHOW_INVITE", 1); - resolve(res) - }); + if (res.agencyStatus == 1) { + G.Get(apiInfo.login_agencyInfo, {}, (aRes) => { + 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("SHOW_INVITE", 1); + resolve(res) + }); + } }) }) }, @@ -188,7 +194,7 @@ export function createApp () { }, fail: function (res) { }, }); - } + } }, $sourceType); }, /* 上传图片 @@ -326,7 +332,7 @@ export function createApp () { }); } }); - app.config.globalProperties.F = wyyx; + app.config.globalProperties.F = wyyx; app.use(uView) return { app diff --git a/pages/home/child/filter.vue b/pages/home/child/filter.vue index 89c5e2c..a89fbf5 100644 --- a/pages/home/child/filter.vue +++ b/pages/home/child/filter.vue @@ -1,13 +1,13 @@