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 | 73 | // 登录成功 |
| 74 | 74 | if (res.data.success) { |
| 75 | 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 | 78 | } else { |
| 81 | 79 | verifyFlag.value = true; |
| 82 | 80 | } | ... | ... |
garbage-removal/src/pages/wode/choose/index.vue
| ... | ... | @@ -5,6 +5,16 @@ |
| 5 | 5 | <u-radio :customStyle="{ marginBottom: '8px' }" size="28" labelSize="28" :key="index" :label="item.name" |
| 6 | 6 | :name="item.name" @change="radioChange"> |
| 7 | 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 | 18 | </view> |
| 9 | 19 | </u-radio-group> |
| 10 | 20 | <view class="choose-button"> |
| ... | ... | @@ -17,10 +27,12 @@ |
| 17 | 27 | import { updateUserInfo } from "@/apis/user.js"; |
| 18 | 28 | import { useMainStore } from '@/stores/index.js'; |
| 19 | 29 | import { setRequestToken } from '@/utils/request/request.js'; |
| 30 | +import { onLoad } from "@dcloudio/uni-app"; | |
| 20 | 31 | import { ref } from 'vue'; |
| 21 | 32 | const store = useMainStore(); |
| 22 | 33 | const userType = ref("居民用户") |
| 23 | 34 | const typeList = ref([{ name: "居民用户" }, { name: "管理负责人" }]) |
| 35 | +const unitInfo = ref({}) | |
| 24 | 36 | const radioChange = (e) => { |
| 25 | 37 | } |
| 26 | 38 | const groupChange = (e) => { |
| ... | ... | @@ -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 | 62 | </script> |
| 44 | 63 | |
| 45 | 64 | <style lang="scss" scoped> |
| ... | ... | @@ -60,6 +79,25 @@ const submit = (userType) => { |
| 60 | 79 | &:first-child { |
| 61 | 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 | 103 | .choose-button { | ... | ... |