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,14 +70,20 @@ const noCaptcha = () => { | ||
| 70 | // 校验验证码 | 70 | // 校验验证码 |
| 71 | const checkVerifyNum = (code) => { | 71 | const checkVerifyNum = (code) => { |
| 72 | userLogin({ loginType: 0, tel: iphoneNumber.value, code: code }).then(res => { | 72 | userLogin({ loginType: 0, tel: iphoneNumber.value, code: code }).then(res => { |
| 73 | + console.log(res); | ||
| 73 | // 登录成功 | 74 | // 登录成功 |
| 74 | if (res.data.code===200) { | 75 | if (res.data.code===200) { |
| 75 | verifyFlag.value = false; | 76 | verifyFlag.value = false; |
| 76 | store.tempToken = res.data.data.token | 77 | store.tempToken = res.data.data.token |
| 77 | store.userName = res.data.data.name; | 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 | } else { | 87 | } else { |
| 82 | verifyFlag.value = true; | 88 | verifyFlag.value = true; |
| 83 | uni.$u.toast(res.data.message); | 89 | uni.$u.toast(res.data.message); |
garbage-removal/src/pages/login/index.vue
| @@ -44,7 +44,7 @@ import { userLogin } from "@/apis/user.js"; | @@ -44,7 +44,7 @@ import { userLogin } from "@/apis/user.js"; | ||
| 44 | export default { | 44 | export default { |
| 45 | data() { | 45 | data() { |
| 46 | return { | 46 | return { |
| 47 | - tel: '13222222222', | 47 | + tel: '', |
| 48 | agree: [] | 48 | agree: [] |
| 49 | } | 49 | } |
| 50 | }, | 50 | }, |
garbage-removal/vite.config.js
| @@ -7,6 +7,7 @@ import { defineConfig } from 'vite'; | @@ -7,6 +7,7 @@ import { defineConfig } from 'vite'; | ||
| 7 | export default defineConfig({ | 7 | export default defineConfig({ |
| 8 | plugins: [ | 8 | plugins: [ |
| 9 | uni(), | 9 | uni(), |
| 10 | + //本地环境开启https | ||
| 10 | // basicSsl() | 11 | // basicSsl() |
| 11 | ], | 12 | ], |
| 12 | resolve: { | 13 | resolve: { |
| @@ -17,6 +18,7 @@ export default defineConfig({ | @@ -17,6 +18,7 @@ export default defineConfig({ | ||
| 17 | }, | 18 | }, |
| 18 | server: { | 19 | server: { |
| 19 | port: 9000, | 20 | port: 9000, |
| 21 | + //本地环境开启https | ||
| 20 | // https: true | 22 | // https: true |
| 21 | } | 23 | } |
| 22 | }) | 24 | }) |