diff --git a/compoment/tiplist/tiplist.vue b/compoment/tiplist/tiplist.vue index 792012b..2f483ec 100644 --- a/compoment/tiplist/tiplist.vue +++ b/compoment/tiplist/tiplist.vue @@ -32,7 +32,7 @@ + :class="{'tpstitl': true,'start': ImagesRequiredFields.find(val => val.key === item.dictKey), 'showTitle': ImagesRequiredFields.find(val => val.key === item.dictKey) && item.imgList.length < 1}"> {{item.dictValue}} diff --git a/pages/login/login.vue b/pages/login/login.vue index 9fca79a..4b956b7 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -180,7 +180,21 @@ title: '登录中' }) let response = await oauthtoken(data) - console.log(response); + console.log('>>>>>>>', response); + // #ifdef MP-WEIXIN + const { role_id } = response + const loginReg = /1712375201964077058/ + if (!loginReg.test(role_id)) { + uni.showToast({ + title: '非司机权限, 暂时无法登录', + icon: 'none' + }) + return + } + // #endif + + /** 验证是否为司机 */ + if (response?.refresh_token) { setloctuser(response) uni.setStorageSync('checkname', { diff --git a/pagesHome/pages/CustomerSign/CustomerSign.vue b/pagesHome/pages/CustomerSign/CustomerSign.vue index c1c61c4..5ffd60e 100644 --- a/pagesHome/pages/CustomerSign/CustomerSign.vue +++ b/pagesHome/pages/CustomerSign/CustomerSign.vue @@ -302,7 +302,7 @@ const filterMap = detail.imglist.filter(item => details.changeImageList.includes(item.dictKey)) isSubmit = filterMap.every(item => { data.map[item.dictKey] = item.imgList - if (details.ImagesRequiredFields.find(val => val.key === item.dictKey) && item.imgList.length < 3) return false; + if (details.ImagesRequiredFields.find(val => val.key === item.dictKey) && item.imgList.length < 1) return false; return true }) if (!isSubmit) { @@ -320,7 +320,7 @@ data.map[item.dictKey] = item.imgList console.log(2) console.log('item.imgList :>> ', item.imgList); - if (details.ImagesRequiredFields.find(val => val.key === item.dictKey) && item.imgList.length < 3) isSubmit = false + if (details.ImagesRequiredFields.find(val => val.key === item.dictKey) && item.imgList.length < 1) isSubmit = false else isSubmit = true }) if (!isSubmit) { diff --git a/unpackage/dist/dev/mp-weixin/compoment/tiplist/tiplist.js b/unpackage/dist/dev/mp-weixin/compoment/tiplist/tiplist.js index d2ed9d7..aa773d7 100644 --- a/unpackage/dist/dev/mp-weixin/compoment/tiplist/tiplist.js +++ b/unpackage/dist/dev/mp-weixin/compoment/tiplist/tiplist.js @@ -261,7 +261,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({ return common_vendor.e({ a: common_vendor.t(item.dictValue), b: common_vendor.unref(ImagesRequiredFields).find((val) => val.key === item.dictKey) ? 1 : "", - c: common_vendor.unref(ImagesRequiredFields).find((val) => val.key === item.dictKey) && item.imgList.length < 3 ? 1 : "", + c: common_vendor.unref(ImagesRequiredFields).find((val) => val.key === item.dictKey) && item.imgList.length < 1 ? 1 : "", d: Object.keys(common_vendor.unref(details).templatePhotos).includes(item.dictValue) }, Object.keys(common_vendor.unref(details).templatePhotos).includes(item.dictValue) ? { e: common_vendor.o(($event) => handleShowImage(common_vendor.unref(details).templatePhotos[item.dictValue]), item.dictKey) diff --git a/unpackage/dist/dev/mp-weixin/pages/login/login.js b/unpackage/dist/dev/mp-weixin/pages/login/login.js index fc54dac..e257aaa 100644 --- a/unpackage/dist/dev/mp-weixin/pages/login/login.js +++ b/unpackage/dist/dev/mp-weixin/pages/login/login.js @@ -91,7 +91,16 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({ title: "登录中" }); let response = await api_user.oauthtoken(data); - console.log(response); + console.log(">>>>>>>", response); + const { role_id } = response; + const loginReg = /1712375201964077058/; + if (!loginReg.test(role_id)) { + common_vendor.index.showToast({ + title: "非司机权限, 暂时无法登录", + icon: "none" + }); + return; + } if (response == null ? void 0 : response.refresh_token) { setloctuser(response); common_vendor.index.setStorageSync("checkname", { diff --git a/unpackage/dist/dev/mp-weixin/pagesHome/pages/CustomerSign/CustomerSign.js b/unpackage/dist/dev/mp-weixin/pagesHome/pages/CustomerSign/CustomerSign.js index 9ae860f..48ab916 100644 --- a/unpackage/dist/dev/mp-weixin/pagesHome/pages/CustomerSign/CustomerSign.js +++ b/unpackage/dist/dev/mp-weixin/pagesHome/pages/CustomerSign/CustomerSign.js @@ -182,7 +182,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({ const filterMap = detail.imglist.filter((item2) => details.changeImageList.includes(item2.dictKey)); isSubmit = filterMap.every((item2) => { data2.map[item2.dictKey] = item2.imgList; - if (details.ImagesRequiredFields.find((val) => val.key === item2.dictKey) && item2.imgList.length < 3) + if (details.ImagesRequiredFields.find((val) => val.key === item2.dictKey) && item2.imgList.length < 1) return false; return true; }); @@ -201,7 +201,7 @@ const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({ data2.map[item2.dictKey] = item2.imgList; console.log(2); console.log("item.imgList :>> ", item2.imgList); - if (details.ImagesRequiredFields.find((val) => val.key === item2.dictKey) && item2.imgList.length < 3) + if (details.ImagesRequiredFields.find((val) => val.key === item2.dictKey) && item2.imgList.length < 1) isSubmit = false; else isSubmit = true; diff --git a/unpackage/dist/dev/mp-weixin/project.config.json b/unpackage/dist/dev/mp-weixin/project.config.json index 1aa93e0..274fd96 100644 --- a/unpackage/dist/dev/mp-weixin/project.config.json +++ b/unpackage/dist/dev/mp-weixin/project.config.json @@ -14,6 +14,7 @@ "ignoreDevUnusedFiles": false, "lazyCodeLoading": "requiredComponents", "enhance": false, + "packNpmRelationList": [], "babelSetting": { "ignore": [], "disablePlugins": [], @@ -22,7 +23,7 @@ }, "compileType": "miniprogram", "libVersion": "3.1.2", - "appid": "wx35c7fb77840097de", + "appid": "wxedb0d10ea46a0113", "projectname": "货无忧", "condition": { "search": {