Commit 34f76d7173f83fcaf724e2b293c8b0141ea05196
1 parent
279cf9b5
装修垃圾清运 取消普通用户,只让投放点管理员登录;新增接收量字段
Showing
3 changed files
with
12 additions
and
4 deletions
garbage-removal/src/pages/login/code.vue
| ... | ... | @@ -70,14 +70,20 @@ const noCaptcha = () => { |
| 70 | 70 | // 校验验证码 |
| 71 | 71 | const checkVerifyNum = (code) => { |
| 72 | 72 | userLogin({ loginType: 0, tel: iphoneNumber.value, code: code }).then(res => { |
| 73 | + console.log(res); | |
| 73 | 74 | // 登录成功 |
| 74 | 75 | if (res.data.code===200) { |
| 75 | 76 | verifyFlag.value = false; |
| 76 | 77 | store.tempToken = res.data.data.token |
| 77 | 78 | store.userName = res.data.data.name; |
| 78 | - uni.navigateTo({ | |
| 79 | - url: `/pages/wode-info/wode-info-choose/index?ruleVos= ${encodeURIComponent(JSON.stringify(res.data.data.ruleVos))}&userName=${encodeURIComponent(res.data.data.name)}` | |
| 80 | - }); | |
| 79 | + if(res.data.data.testUser){ | |
| 80 | + uni.navigateTo({ | |
| 81 | + url: `/pages/wode-info/wode-info-choose/index?ruleVos= ${encodeURIComponent(JSON.stringify(res.data.data.ruleVos))}&userName=${encodeURIComponent(res.data.data.name)}` | |
| 82 | + }); | |
| 83 | + }else{ | |
| 84 | + uni.$u.toast("该手机无法登录,不是投放点管理员"); | |
| 85 | + } | |
| 86 | + | |
| 81 | 87 | } else { |
| 82 | 88 | verifyFlag.value = true; |
| 83 | 89 | uni.$u.toast(res.data.message); | ... | ... |
garbage-removal/src/pages/login/index.vue
garbage-removal/vite.config.js
| ... | ... | @@ -7,6 +7,7 @@ import { defineConfig } from 'vite'; |
| 7 | 7 | export default defineConfig({ |
| 8 | 8 | plugins: [ |
| 9 | 9 | uni(), |
| 10 | + //本地环境开启https | |
| 10 | 11 | // basicSsl() |
| 11 | 12 | ], |
| 12 | 13 | resolve: { |
| ... | ... | @@ -17,6 +18,7 @@ export default defineConfig({ |
| 17 | 18 | }, |
| 18 | 19 | server: { |
| 19 | 20 | port: 9000, |
| 21 | + //本地环境开启https | |
| 20 | 22 | // https: true |
| 21 | 23 | } |
| 22 | 24 | }) | ... | ... |