Commit a0a43b4f12087c10ae33bf3b8112d10d6e706619
1 parent
73187f3e
feat: 新增公司角色推荐
Showing
2 changed files
with
40 additions
and
4 deletions
garbage-removal/src/pages/login/code.vue
| @@ -73,10 +73,8 @@ const checkVerifyNum = (code) => { | @@ -73,10 +73,8 @@ const checkVerifyNum = (code) => { | ||
| 73 | // 登录成功 | 73 | // 登录成功 |
| 74 | if (res.data.success) { | 74 | if (res.data.success) { |
| 75 | verifyFlag.value = false; | 75 | verifyFlag.value = false; |
| 76 | - store.tempToken = res.data.data | ||
| 77 | - proxy.$u.route({ | ||
| 78 | - url: `pages/wode/choose/index`, | ||
| 79 | - }) | 76 | + store.tempToken = res.data.data.token |
| 77 | + proxy.$u.route(`pages/wode/choose/index`, res.data.data) | ||
| 80 | } else { | 78 | } else { |
| 81 | verifyFlag.value = true; | 79 | verifyFlag.value = true; |
| 82 | } | 80 | } |
garbage-removal/src/pages/wode/choose/index.vue
| @@ -5,6 +5,16 @@ | @@ -5,6 +5,16 @@ | ||
| 5 | <u-radio :customStyle="{ marginBottom: '8px' }" size="28" labelSize="28" :key="index" :label="item.name" | 5 | <u-radio :customStyle="{ marginBottom: '8px' }" size="28" labelSize="28" :key="index" :label="item.name" |
| 6 | :name="item.name" @change="radioChange"> | 6 | :name="item.name" @change="radioChange"> |
| 7 | </u-radio> | 7 | </u-radio> |
| 8 | + <view class="manager-info" v-if="item.name === '管理负责人' && unitInfo.companyFlag"> | ||
| 9 | + <view class="manager-info-parent-company-name"> | ||
| 10 | + <text style="margin-right: 20rpx;">经营公司:</text> | ||
| 11 | + <text>{{ unitInfo.parentCompanyName }}</text> | ||
| 12 | + </view> | ||
| 13 | + <view class="manager-info-transport-company-name"> | ||
| 14 | + <text style="margin-right: 20rpx;">运输公司:</text> | ||
| 15 | + <text>{{ unitInfo.transportCompanyName }}</text> | ||
| 16 | + </view> | ||
| 17 | + </view> | ||
| 8 | </view> | 18 | </view> |
| 9 | </u-radio-group> | 19 | </u-radio-group> |
| 10 | <view class="choose-button"> | 20 | <view class="choose-button"> |
| @@ -17,10 +27,12 @@ | @@ -17,10 +27,12 @@ | ||
| 17 | import { updateUserInfo } from "@/apis/user.js"; | 27 | import { updateUserInfo } from "@/apis/user.js"; |
| 18 | import { useMainStore } from '@/stores/index.js'; | 28 | import { useMainStore } from '@/stores/index.js'; |
| 19 | import { setRequestToken } from '@/utils/request/request.js'; | 29 | import { setRequestToken } from '@/utils/request/request.js'; |
| 30 | +import { onLoad } from "@dcloudio/uni-app"; | ||
| 20 | import { ref } from 'vue'; | 31 | import { ref } from 'vue'; |
| 21 | const store = useMainStore(); | 32 | const store = useMainStore(); |
| 22 | const userType = ref("居民用户") | 33 | const userType = ref("居民用户") |
| 23 | const typeList = ref([{ name: "居民用户" }, { name: "管理负责人" }]) | 34 | const typeList = ref([{ name: "居民用户" }, { name: "管理负责人" }]) |
| 35 | +const unitInfo = ref({}) | ||
| 24 | const radioChange = (e) => { | 36 | const radioChange = (e) => { |
| 25 | } | 37 | } |
| 26 | const groupChange = (e) => { | 38 | const groupChange = (e) => { |
| @@ -40,6 +52,13 @@ const submit = (userType) => { | @@ -40,6 +52,13 @@ const submit = (userType) => { | ||
| 40 | }) | 52 | }) |
| 41 | 53 | ||
| 42 | } | 54 | } |
| 55 | +onLoad((options) => { | ||
| 56 | + unitInfo.value = options | ||
| 57 | + unitInfo.value.companyFlag = JSON.parse(options.companyFlag) | ||
| 58 | + if (unitInfo.value.companyFlag) { | ||
| 59 | + userType.value = "管理负责人" | ||
| 60 | + } | ||
| 61 | +}) | ||
| 43 | </script> | 62 | </script> |
| 44 | 63 | ||
| 45 | <style lang="scss" scoped> | 64 | <style lang="scss" scoped> |
| @@ -60,6 +79,25 @@ const submit = (userType) => { | @@ -60,6 +79,25 @@ const submit = (userType) => { | ||
| 60 | &:first-child { | 79 | &:first-child { |
| 61 | margin-right: 20rpx; | 80 | margin-right: 20rpx; |
| 62 | } | 81 | } |
| 82 | + | ||
| 83 | + .manager-info { | ||
| 84 | + font-size: 25rpx; | ||
| 85 | + color: $u-main-color; | ||
| 86 | + box-sizing: border-box; | ||
| 87 | + | ||
| 88 | + .manager-info-parent-company-name { | ||
| 89 | + | ||
| 90 | + text { | ||
| 91 | + color: $u-info; | ||
| 92 | + } | ||
| 93 | + } | ||
| 94 | + | ||
| 95 | + .manager-info-transport-company-name { | ||
| 96 | + text { | ||
| 97 | + color: $u-info; | ||
| 98 | + } | ||
| 99 | + } | ||
| 100 | + } | ||
| 63 | } | 101 | } |
| 64 | 102 | ||
| 65 | .choose-button { | 103 | .choose-button { |