Commit 2e09eb2cfdc017377d9ea34984e5f9a2e73a5ca6
1 parent
cc9d3bdc
修改企业负责人和司机的首页显示
Showing
2 changed files
with
30 additions
and
9 deletions
garbage-removal/src/pages/home/index.vue
| ... | ... | @@ -26,9 +26,9 @@ |
| 26 | 26 | </view> |
| 27 | 27 | </view> |
| 28 | 28 | <view class="company-container"> |
| 29 | - <view class="company-list-box" v-if="addressInfo && userType == '用户'"> | |
| 29 | + <view class="company-list-box" v-if="(addressInfo && userType == '用户')||userType == '运输企业负责人'||userType == '清运车辆驾驶员'"> | |
| 30 | 30 | <view class="company-list-header"> |
| 31 | - <view class="company-list-header-left"> | |
| 31 | + <view class="company-list-header-left" v-if="(addressInfo && userType == '用户')"> | |
| 32 | 32 | <u-dropdown active-color="#19a97c"> |
| 33 | 33 | <u-dropdown-item :height="'240rpx'" :placement="'left'" v-model="registrationAreaValue" |
| 34 | 34 | @change="handleDropdownAreaChange" :title="'所属区域'" :options="dropdownOptions[0]"></u-dropdown-item> |
| ... | ... | @@ -93,7 +93,7 @@ |
| 93 | 93 | </view> |
| 94 | 94 | </view> |
| 95 | 95 | </view> |
| 96 | - <view class="company-list-item-main-right-box" | |
| 96 | + <view class="company-list-item-main-right-box" v-if="(addressInfo && userType == '用户')" | |
| 97 | 97 | style="display: flex;font-size: 28rpx; justify-content: flex-end; align-items: flex-end;color:#458B74;font-weight: bold;"> |
| 98 | 98 | <view class="company-list-item-main-right-box-text" |
| 99 | 99 | @click.stop="handleCleanGarbage(item, item.servicePhone, userAddress)"> |
| ... | ... | @@ -421,13 +421,23 @@ const initData = () => { |
| 421 | 421 | }) |
| 422 | 422 | } |
| 423 | 423 | const queryList = (pageNo, pageSize) => { |
| 424 | + let userTypeValue=0; | |
| 425 | + if(userType == '用户'){ | |
| 426 | + userTypeValue=1; | |
| 427 | + }else if(userType.value == '清运车辆驾驶员'){ | |
| 428 | + userTypeValue=2; | |
| 429 | + }else if(userType.value == '运输企业负责人'){ | |
| 430 | + userTypeValue=3; | |
| 431 | + } | |
| 424 | 432 | let query = { |
| 425 | 433 | companyType: 1, |
| 426 | 434 | pageNum: pageNo, |
| 427 | 435 | pageSize, |
| 428 | 436 | orderByColumn: sortValue.value, |
| 429 | 437 | registrationArea: registrationAreaValue.value, |
| 430 | - searchValue: carTypeValue.value | |
| 438 | + searchValue: carTypeValue.value, | |
| 439 | + userTypeValue:userTypeValue, | |
| 440 | + userType:userType.value | |
| 431 | 441 | } |
| 432 | 442 | // 查询公司信息 |
| 433 | 443 | queryEnterpriseList(query).then(res => { | ... | ... |
garbage-removal/src/pages/wode-info/wode-info-choose/index.vue
| ... | ... | @@ -127,11 +127,22 @@ const submit = (userType) => { |
| 127 | 127 | } |
| 128 | 128 | store.userType = userType; |
| 129 | 129 | store.userInfo = unitInfo.value[userType] |
| 130 | - // #ifdef H5 | |
| 131 | - uni.$u.route({ | |
| 132 | - type: "switchTab", | |
| 133 | - url: `pages/order/index`, | |
| 134 | - }) | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + // #ifdef H5 | |
| 134 | + if("处置场所负责人" == userType){ | |
| 135 | + uni.$u.route({ | |
| 136 | + type: "switchTab", | |
| 137 | + url: `pages/order/index`, | |
| 138 | + }) | |
| 139 | + }else{ | |
| 140 | + uni.$u.route({ | |
| 141 | + type: "switchTab", | |
| 142 | + url: `/pages/home/index`, | |
| 143 | + }) | |
| 144 | + } | |
| 145 | + | |
| 135 | 146 | // #endif |
| 136 | 147 | // #ifdef MP-WEIXIN |
| 137 | 148 | uni.switchTab({ | ... | ... |