Commit 653fd74334b7a4208583e43263a31b14116a0c04

Authored by guzijian
1 parent 52aa052b

feat: 地址管理

garbage-removal/src/App.vue
@@ -19,6 +19,10 @@ onLaunch(async () => { @@ -19,6 +19,10 @@ onLaunch(async () => {
19 @import "./uview-plus/index.scss"; 19 @import "./uview-plus/index.scss";
20 @import "./static/icon/iconfont/iconfont.css"; 20 @import "./static/icon/iconfont/iconfont.css";
21 21
  22 +uni-modal {
  23 + z-index: 999999 !important;
  24 +}
  25 +
22 page { 26 page {
23 box-sizing: border-box; 27 box-sizing: border-box;
24 min-height: 100%; 28 min-height: 100%;
garbage-removal/src/apis/user.js
@@ -49,3 +49,10 @@ export async function updateUserInfo(params,config) { @@ -49,3 +49,10 @@ export async function updateUserInfo(params,config) {
49 `${prefix}/update`,params,config 49 `${prefix}/update`,params,config
50 ); 50 );
51 } 51 }
  52 +
  53 +
  54 +export async function queryRole() {
  55 + return await request.get(
  56 + `${prefix}/queryRole`
  57 + );
  58 +}
garbage-removal/src/components/address-popup/address-popup.vue 0 → 100644
  1 +<template>
  2 + <view>
  3 + <!-- 弹框 -->
  4 + <u-popup :show="visible" :round="10" mode="bottom" :closeable="true" @close="close">
  5 + <view class="popup-container">
  6 + <h4 style="text-align: center; margin: 23rpx 0; letter-spacing: 5rpx;color:#19a97c">{{ title }}</h4>
  7 + <view class="address-header">
  8 + <view class="address-header-left">地址列表</view>
  9 + <view class="address-header-right-box">
  10 + <view class="address-header-right-box-manager">
  11 + <view class="address-header-right-box-manager-button" @click="changeManager">
  12 + <up-icon name="edit-pen-fill" color="#ffffff" size="28"></up-icon>
  13 + <text style="margin-left: 15rpx;">管理</text>
  14 + </view>
  15 + </view>
  16 + <view class="address-header-right-box-add">
  17 + <view class="address-header-right-box-add-button" @click="handlerAddAddress">
  18 + <up-icon name="plus" color="#ffffff" size="28"></up-icon>
  19 + <text style="margin-left: 15rpx;">新增</text>
  20 + </view>
  21 + </view>
  22 + </view>
  23 + </view>
  24 + <view class="scroll-Y">
  25 + <view class="address-container" v-for="item in addressList" :key="item.garAddressId">
  26 + <view class="address-container-top" @click="handlerAddressChange(item)">
  27 + <view class="address-center-box">
  28 + <view class="address-center-box-header">
  29 + <view class="address-center-box-header-name">{{ item.garUserContactName }}</view>
  30 + <view class="address-center-box-header-phone">{{ item.garUserContactTel }}</view>
  31 + </view>
  32 + <view class="address-center-box-address">
  33 + {{ item.garUserAddress }}
  34 + <text class="address-center-box-address-remark">{{ item.garRemark }}</text>
  35 + </view>
  36 + </view>
  37 + <view class="address-right-box">
  38 + <view class="address-right-choose">
  39 + <up-icon v-if="item.currentAddress" name="checkmark-circle-fill" size="40" color="#19a97c"></up-icon>
  40 + <view v-else style="width: 35rpx;height: 35rpx;border-radius: 50%; border: 2rpx solid #c4c6c9;">
  41 + </view>
  42 + </view>
  43 + </view>
  44 + </view>
  45 + <view class="address-container-bottom" v-if="isManager">
  46 + <view class="address-container-bottom-left">
  47 + <view class="address-container-bottom-left-default" @click="handlerChooseDefaultAddress(item)"
  48 + hover-class="handler-click">
  49 + <u-icon name="checkmark-circle-fill" v-if="item.garUserDefault === 1" size="30"
  50 + color="#19a97c"></u-icon>
  51 + <view v-else style="width: 25rpx;height: 25rpx;border-radius: 50%; border: 2rpx solid #c4c6c9;">
  52 + </view>
  53 + <view class="address-container-bottom-left-default-text">默认地址</view>
  54 + </view>
  55 + </view>
  56 + <view class="address-container-bottom-right">
  57 + <view class="address-container-bottom-right-del" hover-class="handler-click"
  58 + v-if="addressList.length > 1" @click="handlerDeleteAddress(item)">
  59 + 删除
  60 + </view>
  61 + <view class="address-container-bottom-right-copy" hover-class="handler-click"
  62 + @click="handlerCopyAddress(item)">
  63 + 复制
  64 + </view>
  65 + <view class="address-container-bottom-right-update" hover-class="handler-click"
  66 + @click="handlerUpdateAddress(item)">
  67 + 修改
  68 + </view>
  69 + </view>
  70 + </view>
  71 + </view>
  72 + </view>
  73 + </view>
  74 + </u-popup>
  75 + </view>
  76 +</template>
  77 +
  78 +<script setup>
  79 +import { deleteAddress, queryAddress, updateAddress } from '@/apis/address.js';
  80 +import { onHide, onShow } from '@dcloudio/uni-app';
  81 +import { ref, watch } from 'vue';
  82 +
  83 +const emit = defineEmits(['currentChange'])
  84 +const props = defineProps({
  85 + title: {
  86 + type: String,
  87 + default: '地址管理'
  88 + },
  89 +})
  90 +const isShow = ref(false);
  91 +const isManager = ref(false)
  92 +const addressList = ref([])
  93 +const visible = ref(false);
  94 +const currentId = ref()
  95 +const close = async () => {
  96 + visible.value = false;
  97 + let currentAddress = addressList.value.filter(item => item.currentAddress === true);
  98 + emit('currentChange', currentAddress[0]);
  99 +}
  100 +const changeManager = () => {
  101 + isManager.value = !isManager.value
  102 +}
  103 +const currentAddressChange = () => {
  104 + addressList.value.forEach(item => {
  105 + if (item.garAddressId === currentId.value) {
  106 + item.currentAddress = true;
  107 + } else {
  108 + item.currentAddress = false;
  109 + }
  110 + })
  111 +}
  112 +const open = async (val) => {
  113 + visible.value = true;
  114 + currentId.value = val.garAddressId;
  115 + await getAddressList();
  116 +}
  117 +const getAddressList = async () => {
  118 + await queryAddress("ALL").then(res => {
  119 + addressList.value = res.data.data;
  120 + currentAddressChange();
  121 + })
  122 +}
  123 +const handlerAddressChange = (val) => {
  124 + currentId.value = val.garAddressId;
  125 + currentAddressChange();
  126 +}
  127 +const handlerAddAddress = () => {
  128 + uni.$u.route('pages/home/address/addSite')
  129 +}
  130 +const handlerUpdateAddress = (val) => {
  131 + uni.$u.route(`pages/home/address/addSite?addressObj=${JSON.stringify(val)}`)
  132 +}
  133 +const handlerDeleteAddress = async (val) => {
  134 + if (addressList.value.length > 1) {
  135 + uni.showModal({
  136 + title: '',
  137 + content: '是否确认删除这个地址',
  138 + success: function (res) {
  139 + if (res.confirm) {
  140 + deleteAddress(val.garAddressId).then(res => {
  141 + if (res.data.success) {
  142 + for (let index = 0; index < addressList.value.length; index++) {
  143 + const element = addressList.value[index];
  144 + if (currentId.value != element.garAddressId) {
  145 + currentId.value = element.garAddressId;
  146 + break;
  147 + }
  148 + }
  149 + addressList.value.splice(addressList.value.findIndex(item => item.garAddressId == val.garAddressId), 1);
  150 + // 删除的是默认地址 默认地址第一顺位
  151 + if (val.garUserDefault == 1) {
  152 + handlerChooseDefaultAddress(addressList.value[0])
  153 + }
  154 + currentAddressChange();
  155 + }
  156 + })
  157 + }
  158 + }
  159 + });
  160 + } else {
  161 + uni.$u.toast('至少保留一个地址')
  162 + }
  163 +
  164 +}
  165 +const handlerChooseDefaultAddress = async (val) => {
  166 + if (val.garUserDefault == 1) {
  167 + return
  168 + }
  169 + await updateAddress({
  170 + addressArea: val.garUserAddress,
  171 + contactPerson: val.garUserContactName,
  172 + contactIphoneNumber: val.garUserContactTel,
  173 + defaultFlag: true,
  174 + addressDetail: val.garRemark,
  175 + garAddressId: val.garAddressId,
  176 + garLongitude: val.garLongitude,
  177 + garLatitude: val.garLatitude,
  178 + garCoordinate: val.garCoordinate
  179 + }).then(res => {
  180 + addressList.value.map(item => {
  181 + if (item.garAddressId == val.garAddressId) {
  182 + item.garUserDefault = 1;
  183 + } else {
  184 + item.garUserDefault = 0;
  185 + }
  186 + });
  187 + })
  188 +}
  189 +const handlerCopyAddress = (val) => {
  190 + const varStr = "姓名:" + val.garUserContactName + ", 电话:" + val.garUserContactTel + ", 地址:" + val.garUserAddress + ", 详细地址:" + val.garRemark;
  191 + uni.setClipboardData({
  192 + data: varStr,
  193 + success: function () {
  194 + console.log('复制成功');
  195 + // 可以添加用户友好的提示,例如使用uni.showToast提示复制成功
  196 + uni.showToast({
  197 + title: '复制成功',
  198 + icon: 'success',
  199 + duration: 2000
  200 + });
  201 + },
  202 + fail: function () {
  203 + console.log('复制失败');
  204 + // 可以添加错误处理或用户友好的提示
  205 + }
  206 + });
  207 +}
  208 +
  209 +
  210 +onHide(() => {
  211 + isShow.value = false;
  212 + console.log("离开了");
  213 +})
  214 +
  215 +onShow(() => {
  216 + isShow.value = true;
  217 +})
  218 +
  219 +watch(isShow, (newVal, oldVal) => {
  220 + if (newVal) {
  221 + getAddressList();
  222 + }
  223 +})
  224 +defineExpose({
  225 + open
  226 +})
  227 +
  228 +
  229 +</script>
  230 +
  231 +<style lang="scss" scoped>
  232 +.popup-container {
  233 + height: 80vh;
  234 + background: rgb(234 240 243);
  235 + border-radius: 15rpx 15rpx 0 0;
  236 + box-sizing: border-box;
  237 + padding-bottom: 50rpx;
  238 +
  239 + .address-header {
  240 + display: flex;
  241 + height: 60rpx;
  242 + font-size: 28rpx;
  243 + color: $u-main-color;
  244 + align-items: center;
  245 + box-sizing: border-box;
  246 +
  247 + .address-header-left {
  248 + width: 100%;
  249 + padding-left: 15rpx;
  250 + color: #19a97c;
  251 + }
  252 +
  253 + .address-header-right-box {
  254 + width: 340rpx;
  255 + display: flex;
  256 + color: #19a97c;
  257 +
  258 + .address-header-right-box-manager {
  259 + display: flex;
  260 + align-items: center;
  261 + justify-content: flex-end;
  262 + padding-right: 20rpx;
  263 + // 不换行
  264 + white-space: nowrap;
  265 +
  266 + .address-header-right-box-manager-button {
  267 + padding: 10rpx 20rpx;
  268 + background-color: #19a97c;
  269 + color: white;
  270 + display: flex;
  271 + font-size: 25rpx;
  272 + border-radius: 5rpx;
  273 + @include handleClick;
  274 +
  275 + text {
  276 + white-space: nowrap;
  277 + }
  278 + }
  279 + }
  280 +
  281 + .address-header-right-box-add {
  282 + display: flex;
  283 + align-items: center;
  284 + padding-right: 20rpx;
  285 + // 不换行
  286 + white-space: nowrap;
  287 + box-sizing: border-box;
  288 +
  289 + .address-header-right-box-add-button {
  290 + padding: 10rpx 20rpx;
  291 + background-color: #19a97c;
  292 + color: white;
  293 + display: flex;
  294 + font-size: 25rpx;
  295 + border-radius: 5rpx;
  296 + @include handleClick;
  297 +
  298 + text {
  299 + white-space: nowrap;
  300 + }
  301 + }
  302 + }
  303 + }
  304 + }
  305 +
  306 + .scroll-Y {
  307 + height: calc(100% - 60rpx - 56rpx);
  308 + width: 100%;
  309 + overflow-y: auto;
  310 + box-sizing: border-box;
  311 + padding-left: 20rpx;
  312 + padding-right: 20rpx;
  313 +
  314 + .address-container {
  315 + box-sizing: border-box;
  316 + min-height: 100rpx;
  317 + width: 100%;
  318 + display: flex;
  319 + align-items: center;
  320 + flex-direction: column;
  321 + padding: 20rpx 25rpx;
  322 + background: white;
  323 + margin: 20rpx 0;
  324 + border-radius: 15rpx;
  325 +
  326 + .address-container-top {
  327 + width: 100%;
  328 + display: flex;
  329 + align-items: center;
  330 + box-sizing: border-box;
  331 +
  332 + .address-center-box {
  333 + width: 100%;
  334 + color: $u-main-color;
  335 +
  336 + .address-center-box-header {
  337 + display: flex;
  338 + margin-bottom: 10rpx;
  339 + align-items: center;
  340 +
  341 + .address-center-box-header-name {
  342 + font-size: 29rpx;
  343 + font-weight: bold;
  344 + margin-right: 10rpx;
  345 + // 不换行
  346 + white-space: nowrap;
  347 + }
  348 +
  349 + .address-center-box-header-phone {
  350 + font-size: 26rpx;
  351 + color: #999; // 不换行
  352 + white-space: nowrap;
  353 + }
  354 + }
  355 +
  356 + .address-center-box-address {
  357 + font-size: 26rpx;
  358 +
  359 + .address-center-box-address-remark {
  360 + margin-left: 20rpx;
  361 + }
  362 + }
  363 + }
  364 +
  365 + .address-right-box {
  366 + width: 100rpx;
  367 + height: 100%;
  368 + display: flex;
  369 + justify-content: center;
  370 + align-items: center;
  371 +
  372 + .address-right-choose {
  373 +
  374 + up-icon {}
  375 + }
  376 +
  377 + .address-right-box-edit {
  378 + u-icon {}
  379 + }
  380 + }
  381 + }
  382 +
  383 + .address-container-bottom {
  384 + box-sizing: border-box;
  385 + margin-top: 20rpx;
  386 + border-top: 2rpx solid #c4c6c9;
  387 + line-height: 60rpx;
  388 + width: 100%;
  389 + display: flex;
  390 + justify-content: flex-end;
  391 +
  392 + .address-container-bottom-left {
  393 + font-size: 26rpx;
  394 + color: #999;
  395 + display: flex;
  396 + align-items: center;
  397 + justify-content: flex-start;
  398 + flex: 1;
  399 +
  400 + .address-container-bottom-left-default {
  401 + display: flex;
  402 + align-items: center;
  403 +
  404 + u-icon {}
  405 +
  406 + .address-container-bottom-left-default-text {
  407 + display: flex;
  408 + align-items: center;
  409 + margin-left: 10rpx
  410 + }
  411 + }
  412 +
  413 + .address-container-bottom-left-edit {
  414 + u-icon {}
  415 + }
  416 + }
  417 +
  418 + .address-container-bottom-right {
  419 + flex: 1;
  420 + display: flex;
  421 + justify-content: flex-end;
  422 + align-items: center;
  423 + color: #999;
  424 +
  425 + .address-container-bottom-right-del {
  426 + margin-right: 40rpx;
  427 + @include handleClick;
  428 + }
  429 +
  430 + .address-container-bottom-right-copy {
  431 + margin-right: 40rpx;
  432 + @include handleClick;
  433 + }
  434 +
  435 + .address-container-bottom-right-update {
  436 + margin-right: 20rpx;
  437 + @include handleClick;
  438 + }
  439 + }
  440 +
  441 + }
  442 + }
  443 + }
  444 +
  445 +}
  446 +
  447 +.handler-click {
  448 + @include handleClick;
  449 +}
  450 +</style>
garbage-removal/src/components/liu-delivery-time/liu-delivery-time.vue
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <view class="time-title" :style="{ borderRadius: getRadius }"> 5 <view class="time-title" :style="{ borderRadius: getRadius }">
6 <span @click.stop="close">取消</span> 6 <span @click.stop="close">取消</span>
7 {{ title }} 7 {{ title }}
8 - <text @click.stop="confirm" :style="selectedTimeIndex ? 'color:#007aff;' : ''">确定</text> 8 + <text @click.stop="confirm" :style="selectedTimeIndex ? 'color:#19a97c;' : ''">确定</text>
9 </view> 9 </view>
10 <view class="time-picker" :style="{ height: height }"> 10 <view class="time-picker" :style="{ height: height }">
11 <scroll-view class="date-scroll" scroll-y> 11 <scroll-view class="date-scroll" scroll-y>
garbage-removal/src/components/my-piker/index.vue
@@ -43,10 +43,8 @@ const closeUnit = () =&gt; { @@ -43,10 +43,8 @@ const closeUnit = () =&gt; {
43 } 43 }
44 const openUnit = () => { 44 const openUnit = () => {
45 visible.value = true 45 visible.value = true
46 - console.log('open');  
47 } 46 }
48 const bindPickerChange = (e) => { 47 const bindPickerChange = (e) => {
49 - console.log('picker发送选择改变,携带值为', e.detail.value)  
50 index.value = e.detail.value 48 index.value = e.detail.value
51 emit('change', props.array[index.value]) 49 emit('change', props.array[index.value])
52 } 50 }
garbage-removal/src/pages.json
@@ -28,8 +28,7 @@ @@ -28,8 +28,7 @@
28 { 28 {
29 "path": "pages/wode/choose/index", 29 "path": "pages/wode/choose/index",
30 "style": { 30 "style": {
31 - "navigationBarTitleText": "账户类型",  
32 - "enablePullDownRefresh": false 31 + "navigationBarTitleText": "身份选择"
33 } 32 }
34 }, 33 },
35 { 34 {
@@ -95,6 +94,14 @@ @@ -95,6 +94,14 @@
95 "enablePullDownRefresh": false 94 "enablePullDownRefresh": false
96 } 95 }
97 },{ 96 },{
  97 + "path": "pages/home/user-guide/index",
  98 + "style": {
  99 + "navigationBarTitleText": "用户指南",
  100 + "navigationBarTextStyle": "white",
  101 + "navigationBarBackgroundColor": "#19a97c",
  102 + "enablePullDownRefresh": false
  103 + }
  104 + },{
98 "path": "pages/order/driver-home/upload/index", 105 "path": "pages/order/driver-home/upload/index",
99 "style": { 106 "style": {
100 "navigationBarTitleText": "上传照片", 107 "navigationBarTitleText": "上传照片",
@@ -169,7 +176,8 @@ @@ -169,7 +176,8 @@
169 "path": "pages/wode/index", 176 "path": "pages/wode/index",
170 "style": { 177 "style": {
171 "navigationBarTitleText": "个人信息", 178 "navigationBarTitleText": "个人信息",
172 - "navigationBarBackgroundColor":"#ffffff", 179 + "navigationBarTextStyle":"white",
  180 + "navigationBarBackgroundColor":"#19a97c",
173 "enablePullDownRefresh": false 181 "enablePullDownRefresh": false
174 } 182 }
175 } 183 }
garbage-removal/src/pages/home/address/addSite.vue
@@ -32,7 +32,7 @@ @@ -32,7 +32,7 @@
32 <view class="bottom"> 32 <view class="bottom">
33 <view class="default"> 33 <view class="default">
34 <view class="left"> 34 <view class="left">
35 - <view class="set">当前选中地址</view> 35 + <view class="set">设置成默认地址</view>
36 </view> 36 </view>
37 <view class="right"> 37 <view class="right">
38 <u-switch v-model="addressInfo.defaultFlag" size="40" activeColor="#19a97c"></u-switch> 38 <u-switch v-model="addressInfo.defaultFlag" size="40" activeColor="#19a97c"></u-switch>
garbage-removal/src/pages/home/address/index.vue
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 <view class="phone">{{ res.garUserContactTel }}</view> 7 <view class="phone">{{ res.garUserContactTel }}</view>
8 <view class="tag"> 8 <view class="tag">
9 <text v-if="res.garUserDefault == 1" :class="{ red: res.garUserDefault == 1 }"> 9 <text v-if="res.garUserDefault == 1" :class="{ red: res.garUserDefault == 1 }">
10 - {{ res.garUserDefault == 1 ? "当前选中" : "" }} 10 + {{ res.garUserDefault == 1 ? "默认地址" : "" }}
11 </text> 11 </text>
12 </view> 12 </view>
13 </view> 13 </view>
garbage-removal/src/pages/home/clean/index.vue
1 <template> 1 <template>
2 <view class="mask-box"> 2 <view class="mask-box">
3 - <liu-delivery-time :isMask="true" :change="changeTime" ref="chooseTime" title="请选择预约时间"></liu-delivery-time> 3 + <address-popup ref="addressPopupRef" @currentChange="currentChange"></address-popup>
  4 + <liu-delivery-time :isMask="true" :change="changeTime" ref="chooseTime" title="请选择预约时间">
  5 + </liu-delivery-time>
4 <u-picker closeOnClickOverlay :show="garbageTypeShowFlag" :columns="garbageTypeList" :itemHeight="100" 6 <u-picker closeOnClickOverlay :show="garbageTypeShowFlag" :columns="garbageTypeList" :itemHeight="100"
5 @confirm="handlePickerGarbageTypeConfirm" @close="handleGarbageTypeClick(false)" 7 @confirm="handlePickerGarbageTypeConfirm" @close="handleGarbageTypeClick(false)"
6 @cancel="handleGarbageTypeClick(false)"></u-picker> 8 @cancel="handleGarbageTypeClick(false)"></u-picker>
@@ -12,7 +14,14 @@ @@ -12,7 +14,14 @@
12 {{ userAddress.garUserAddress }}{{ userAddress.garRemark }} 14 {{ userAddress.garUserAddress }}{{ userAddress.garRemark }}
13 </view> 15 </view>
14 <view class="company-clean-container-header-base-info"> 16 <view class="company-clean-container-header-base-info">
15 - {{ userAddress.garUserContactName }} {{ userAddress.garUserContactTel }} 17 + <view class="company-clean-container-header-base-info-left">
  18 + {{ userAddress.garUserContactName }} {{ userAddress.garUserContactTel }}
  19 + </view>
  20 + <view class="company-clean-container-header-base-info-right">
  21 + <view class="company-clean-container-header-base-info-right-icon">
  22 + <image width="35" height="35" :src="changeAddressUrl" @click="handlerChooseAddress"></image>
  23 + </view>
  24 + </view>
16 </view> 25 </view>
17 <view @click.stop="handleTimeChoose" class="company-clean-container-header-reservation"> 26 <view @click.stop="handleTimeChoose" class="company-clean-container-header-reservation">
18 <view class="company-clean-container-header-reservation-left"> 27 <view class="company-clean-container-header-reservation-left">
@@ -80,17 +89,17 @@ @@ -80,17 +89,17 @@
80 </view> 89 </view>
81 <view class="company-clean-container-car-main-content-type"> 90 <view class="company-clean-container-car-main-content-type">
82 <view class="company-clean-container-car-main-content-type-price-area"> 91 <view class="company-clean-container-car-main-content-type-price-area">
83 - <text style="color: red;">*</text>是否进入车库: 92 + <text style="color: red;">*</text>进入地下车库:
84 </view> 93 </view>
85 <view style="width:100%;display: flex;justify-content: flex-start;align-items: center; "> 94 <view style="width:100%;display: flex;justify-content: flex-start;align-items: center; ">
86 <view style="display: flex; align-items: center;"> 95 <view style="display: flex; align-items: center;">
87 <up-radio-group shape="square" size="30" v-model="paramFrom.garInCarStore" placement="row" 96 <up-radio-group shape="square" size="30" v-model="paramFrom.garInCarStore" placement="row"
88 @change="handleInCarClick"> 97 @change="handleInCarClick">
89 - <up-radio activeColor="#19a97c" labelSize="30"  
90 - :customStyle="{ marginBottom: '8px', marginRight: '30rpx' }" label="是" :name="true"> 98 + <up-radio activeColor="#19a97c" labelSize="30" :customStyle="{ marginRight: '30rpx' }" label="需要"
  99 + :name="true">
91 </up-radio> 100 </up-radio>
92 - <up-radio activeColor="#19a97c" labelSize="30"  
93 - :customStyle="{ marginBottom: '8px', marginRight: '30rp' }" label="否" :name="false"> 101 + <up-radio activeColor="#19a97c" labelSize="30" :customStyle="{ marginRight: '30rp' }" label="不需要"
  102 + :name="false">
94 </up-radio> 103 </up-radio>
95 </up-radio-group> 104 </up-radio-group>
96 </view> 105 </view>
@@ -98,11 +107,11 @@ @@ -98,11 +107,11 @@
98 </view> 107 </view>
99 <view v-if="paramFrom.garInCarStore" class="company-in-car-store-box-info"> 108 <view v-if="paramFrom.garInCarStore" class="company-in-car-store-box-info">
100 <view class="company-clean-container-site-image-info-input-remark-box"> 109 <view class="company-clean-container-site-image-info-input-remark-box">
101 - <u--textarea v-model="paramFrom.remark" placeholder="请输入备注 示例:限高2、3米,需要进入车库..."></u--textarea> 110 + <u--textarea v-model="paramFrom.remark" placeholder="请填写限制高度(米)"></u--textarea>
102 </view> 111 </view>
103 - <view class="company-clean-container-car-main-content-remark" style="margin-top: 20rpx; font-size: 23rpx;"> 112 + <!-- <view class="company-clean-container-car-main-content-remark" style="margin-top: 20rpx; font-size: 23rpx;">
104 提示:需要进入车库需要写车辆限高,部门车库限高2.3m,如果装修垃圾在车库,要考虑车辆是否能进入。 113 提示:需要进入车库需要写车辆限高,部门车库限高2.3m,如果装修垃圾在车库,要考虑车辆是否能进入。
105 - </view> 114 + </view> -->
106 </view> 115 </view>
107 <view class="company-clean-container-car-main-content-prompt"> 116 <view class="company-clean-container-car-main-content-prompt">
108 温馨提示:垃圾类型不符合,企业有权拒绝清运。 117 温馨提示:垃圾类型不符合,企业有权拒绝清运。
@@ -111,11 +120,11 @@ @@ -111,11 +120,11 @@
111 </view> 120 </view>
112 <view class="company-clean-container-site-image-info"> 121 <view class="company-clean-container-site-image-info">
113 <view class="company-clean-container-site-image-info-remark"> 122 <view class="company-clean-container-site-image-info-remark">
114 - <text style="color: red;">*</text>要求装车完成后需现场照片(最少1张,最多上传10张),照片须看清全貌。 123 + <text style="color: red;">*</text>请上传垃圾量照片(至少1张,最多5张),照片须看清全貌。
115 </view> 124 </view>
116 <view class="company-clean-container-site-image-info-img"> 125 <view class="company-clean-container-site-image-info-img">
117 <u-upload width="200" height="150" :fileList="fileList" @afterRead="afterRead" :deletable="deletable" 126 <u-upload width="200" height="150" :fileList="fileList" @afterRead="afterRead" :deletable="deletable"
118 - @delete="deletePic" name="10" multiple :maxCount="10" :previewFullImage="true"></u-upload> 127 + @delete="deletePic" name="5" multiple :maxCount="5" :previewFullImage="true"></u-upload>
119 </view> 128 </view>
120 </view> 129 </view>
121 <view class="company-clean-container-site-image-info-sure-button"> 130 <view class="company-clean-container-site-image-info-sure-button">
@@ -163,8 +172,10 @@ import { queryAddress } from &#39;@/apis/address.js&#39;; @@ -163,8 +172,10 @@ import { queryAddress } from &#39;@/apis/address.js&#39;;
163 import { queryCarList } from '@/apis/carinfo.js'; 172 import { queryCarList } from '@/apis/carinfo.js';
164 import { uploadFilePromise } from '@/apis/common.js'; 173 import { uploadFilePromise } from '@/apis/common.js';
165 import { saveOrder } from '@/apis/order.js'; 174 import { saveOrder } from '@/apis/order.js';
  175 +import addressPopup from '@/components/address-popup/address-popup.vue';
166 import liuDeliveryTime from "@/components/liu-delivery-time/liu-delivery-time.vue"; 176 import liuDeliveryTime from "@/components/liu-delivery-time/liu-delivery-time.vue";
167 import myPiker from '@/components/my-piker/index.vue'; 177 import myPiker from '@/components/my-piker/index.vue';
  178 +import changeAddressUrl from '@/static/image/change-address.png';
168 import garbageUrl from '@/static/image/garbage.png'; 179 import garbageUrl from '@/static/image/garbage.png';
169 import { useMainStore } from '@/stores/index.js'; 180 import { useMainStore } from '@/stores/index.js';
170 import { onLoad } from '@dcloudio/uni-app'; 181 import { onLoad } from '@dcloudio/uni-app';
@@ -172,8 +183,8 @@ import { computed, getCurrentInstance, nextTick, ref, watch } from &#39;vue&#39;; @@ -172,8 +183,8 @@ import { computed, getCurrentInstance, nextTick, ref, watch } from &#39;vue&#39;;
172 const { proxy } = getCurrentInstance(); 183 const { proxy } = getCurrentInstance();
173 const store = useMainStore(); 184 const store = useMainStore();
174 const userType = computed(() => store.userType) 185 const userType = computed(() => store.userType)
175 -const x = ref(5)  
176 -const y = ref() 186 +const x = ref(360)
  187 +const y = ref(650)
177 const movableAreaElement = ref() 188 const movableAreaElement = ref()
178 const deletable = ref(false) 189 const deletable = ref(false)
179 const companyObj = ref() 190 const companyObj = ref()
@@ -181,6 +192,7 @@ const tel = ref() @@ -181,6 +192,7 @@ const tel = ref()
181 const carTypeShowFlag = ref(false) 192 const carTypeShowFlag = ref(false)
182 const garbageTypeShowFlag = ref(false) 193 const garbageTypeShowFlag = ref(false)
183 const carPopupShowFlag = ref(false) 194 const carPopupShowFlag = ref(false)
  195 +const addressPopupRef = ref(null);
184 const userAddress = ref({ 196 const userAddress = ref({
185 garUserContactName: "", 197 garUserContactName: "",
186 garUserContactTel: "", 198 garUserContactTel: "",
@@ -201,21 +213,20 @@ const garCarTransportInfo = computed(() =&gt; { @@ -201,21 +213,20 @@ const garCarTransportInfo = computed(() =&gt; {
201 let boxLength = lengthWidthHeight[0]; // 箱子的长度(单位:米) 213 let boxLength = lengthWidthHeight[0]; // 箱子的长度(单位:米)
202 let boxWidth = lengthWidthHeight[1]; // 箱子的宽度(单位:米) 214 let boxWidth = lengthWidthHeight[1]; // 箱子的宽度(单位:米)
203 let boxHeight = lengthWidthHeight[2]; // 箱子的高度(单位:米) 215 let boxHeight = lengthWidthHeight[2]; // 箱子的高度(单位:米)
204 - 216 + console.log(boxLength, boxWidth, boxHeight);
205 let bagLength = 0.75; // 袋子的长度(单位:米) 217 let bagLength = 0.75; // 袋子的长度(单位:米)
206 let bagWidth = 0.45; // 袋子的宽度(单位:米) 218 let bagWidth = 0.45; // 袋子的宽度(单位:米)
207 - let bagHeight = 0.22; // 袋子的高度(单位:米) 219 + let bagHeight = 0.16; // 袋子的高度(单位:米)
208 220
209 let boxVolume = boxLength * boxWidth * boxHeight; // 箱子的体积(单位:立方米) 221 let boxVolume = boxLength * boxWidth * boxHeight; // 箱子的体积(单位:立方米)
210 let bagVolume = bagLength * bagWidth * bagHeight; // 袋子的体积(单位:立方米) 222 let bagVolume = bagLength * bagWidth * bagHeight; // 袋子的体积(单位:立方米)
211 223
212 let bagCount = Math.floor(boxVolume / bagVolume); // 箱子可以容纳的袋子数量(向下取整) 224 let bagCount = Math.floor(boxVolume / bagVolume); // 箱子可以容纳的袋子数量(向下取整)
213 console.log(bagCount, boxVolume, bagVolume); 225 console.log(bagCount, boxVolume, bagVolume);
214 - return `箱体长${boxLength}m宽${boxWidth}m高${boxHeight}m,最多课容纳约${bagCount}袋袋装修垃圾(75cm * 45cm每袋)。` 226 + return `箱体长${boxLength}m宽${boxWidth}m高${boxHeight}m,最多课容纳约${bagCount}袋袋装修垃圾(${bagLength * 100}cm * ${bagWidth * 100}cm每袋)。`
215 } catch (error) { 227 } catch (error) {
216 - return "符合装修垃圾运输管理规范的新型环保智能装修垃圾运输车。" 228 + return "符合装修垃圾运输管理规范的专用运输车辆。"
217 } 229 }
218 -  
219 }) 230 })
220 // 车辆数量 231 // 车辆数量
221 const garCarNumberCount = computed(() => { 232 const garCarNumberCount = computed(() => {
@@ -389,7 +400,6 @@ const handlePickerCarInfoConfirm = (e) =&gt; { @@ -389,7 +400,6 @@ const handlePickerCarInfoConfirm = (e) =&gt; {
389 paramFrom.value.carType = e 400 paramFrom.value.carType = e
390 garCarLabelInfoNow.value = garCarLabelInfoList.value[paramFrom.value.carType] 401 garCarLabelInfoNow.value = garCarLabelInfoList.value[paramFrom.value.carType]
391 carTypeShowFlag.value = false 402 carTypeShowFlag.value = false
392 - console.log(garCarLabelInfoNow.value);  
393 } 403 }
394 404
395 /** 405 /**
@@ -491,7 +501,12 @@ const handleOderSure = () =&gt; { @@ -491,7 +501,12 @@ const handleOderSure = () =&gt; {
491 }) 501 })
492 } 502 }
493 503
494 - 504 +const handlerChooseAddress = () => {
  505 + addressPopupRef.value.open(userAddress.value)
  506 +}
  507 +const currentChange = (val) => {
  508 + userAddress.value = val
  509 +}
495 /** 510 /**
496 * 校验参数 511 * 校验参数
497 * @param {Object} params 512 * @param {Object} params
@@ -577,12 +592,15 @@ watch(carPopupShowFlag, (val) =&gt; { @@ -577,12 +592,15 @@ watch(carPopupShowFlag, (val) =&gt; {
577 setTimeout(() => { 592 setTimeout(() => {
578 nextTick(() => { 593 nextTick(() => {
579 let areaHeight; 594 let areaHeight;
  595 + let areaWeight;
580 // select中的参数就如css选择器一样选择元素 596 // select中的参数就如css选择器一样选择元素
581 let movableArea = uni.createSelectorQuery().in(proxy).select(".movableArea"); 597 let movableArea = uni.createSelectorQuery().in(proxy).select(".movableArea");
582 movableArea.boundingClientRect(function (data) { 598 movableArea.boundingClientRect(function (data) {
583 // data - 包含元素的高度等信息 599 // data - 包含元素的高度等信息
584 areaHeight = data.height; 600 areaHeight = data.height;
585 - y.value = areaHeight > 40 ? (areaHeight - 40) : areaHeight; 601 + areaWeight = data.width;
  602 + x.value = areaWeight > 300 ? (areaWeight - 50) : areaWeight;
  603 + y.value = areaHeight > 80 ? (areaHeight - 80) : areaHeight;
586 }).exec(function (res) { 604 }).exec(function (res) {
587 // 注意:exec方法必须执行,即便什么也不做,否则不会获取到任何数据 605 // 注意:exec方法必须执行,即便什么也不做,否则不会获取到任何数据
588 }) 606 })
@@ -633,12 +651,39 @@ $custom-bottom-height: 200rpx; @@ -633,12 +651,39 @@ $custom-bottom-height: 200rpx;
633 font-size: 25rpx; 651 font-size: 25rpx;
634 color: $u-info; 652 color: $u-info;
635 line-height: 80rpx; 653 line-height: 80rpx;
  654 + display: flex;
  655 +
  656 + .company-clean-container-header-base-info-left {
  657 + flex: 2;
  658 + }
  659 +
  660 + .company-clean-container-header-base-info-right {
  661 + flex: 1;
  662 + display: flex;
  663 + align-items: center;
  664 + justify-content: flex-end;
  665 +
  666 + .company-clean-container-header-base-info-right-icon {
  667 + width: 37rpx;
  668 + height: 37rpx;
  669 + @include handleClick;
  670 + display: flex;
  671 + align-items: center;
  672 +
  673 + image {
  674 + height: 100%;
  675 + width: 100%;
  676 + background-size: 100% 100;
  677 + }
  678 + }
  679 + }
636 } 680 }
637 681
638 .company-clean-container-header-reservation { 682 .company-clean-container-header-reservation {
  683 + line-height: 80rpx;
639 display: flex; 684 display: flex;
640 justify-content: space-between; 685 justify-content: space-between;
641 - font-size: 25rpx; 686 + font-size: 28rpx;
642 @include handleClick; 687 @include handleClick;
643 688
644 .company-clean-container-header-reservation-left { 689 .company-clean-container-header-reservation-left {
garbage-removal/src/pages/home/index.vue
@@ -18,7 +18,8 @@ @@ -18,7 +18,8 @@
18 <!-- 公司容器 --> 18 <!-- 公司容器 -->
19 <view class="company-box"> 19 <view class="company-box">
20 <view class="info-box"> 20 <view class="info-box">
21 - <view class="info-box-item" hover-class="click-box" v-for="(item, index) in infoBoxList" :key="index"> 21 + <view class="info-box-item" hover-class="click-box" v-for="(item, index) in infoBoxList" :key="index"
  22 + @click.stop="handlerCLickInfoBox(item.text)">
22 <view class="info-box-item-icon" :class="item.icon"> 23 <view class="info-box-item-icon" :class="item.icon">
23 </view> 24 </view>
24 <view class="info-box-item-text">{{ item.text }}</view> 25 <view class="info-box-item-text">{{ item.text }}</view>
@@ -85,19 +86,20 @@ @@ -85,19 +86,20 @@
85 </view> 86 </view>
86 </view> 87 </view>
87 </view> 88 </view>
88 - <view class="company-list-item-bottom-contact-company" style="display: flex;">  
89 - <up-icon name="phone" color="#19a97c"></up-icon> 89 + <view class="company-list-item-bottom-contact-company"
  90 + style="display: flex; align-items: center;">
  91 + <up-icon name="phone" size="34" color="#19a97c"></up-icon>
90 <view @click="handleContactClick(item.servicePhone)" 92 <view @click="handleContactClick(item.servicePhone)"
91 - style="display: flex; justify-content: center; align-items: center" color="#a9e08f"> 93 + style="display: flex; justify-content: center; align-items: center;font-size: 28rpx; color:'#a9e08f'">
92 {{ item.servicePhone }} 94 {{ item.servicePhone }}
93 </view> 95 </view>
94 </view> 96 </view>
95 </view> 97 </view>
96 <view class="company-list-item-main-right-box" 98 <view class="company-list-item-main-right-box"
97 - style="display: flex; justify-content: flex-end; align-items: flex-end;color:#458B74;font-weight: bold;"> 99 + style="display: flex;font-size: 28rpx; justify-content: flex-end; align-items: flex-end;color:#458B74;font-weight: bold;">
98 <view class="company-list-item-main-right-box-text" 100 <view class="company-list-item-main-right-box-text"
99 - @click="handleCleanGarbage(item, item.servicePhone, userAddress)">  
100 - 垃圾清运 -> 101 + @tap.stop="handleCleanGarbage(item, item.servicePhone, userAddress)">
  102 + 预约清运 ->
101 </view> 103 </view>
102 </view> 104 </view>
103 </view> 105 </view>
@@ -119,7 +121,7 @@ @@ -119,7 +121,7 @@
119 </view> 121 </view>
120 <view class="empty-text-box"> 122 <view class="empty-text-box">
121 <view class=" empty-text-box-button"> 123 <view class=" empty-text-box-button">
122 - {{ userType == '用户' ? '立即清运' : '角色切换' }} 124 + {{ userType == '用户' ? '立即清运' : '身份切换' }}
123 </view> 125 </view>
124 </view> 126 </view>
125 </view> 127 </view>
@@ -131,8 +133,7 @@ @@ -131,8 +133,7 @@
131 <script setup> 133 <script setup>
132 import { queryAddress } from '@/apis/address.js'; 134 import { queryAddress } from '@/apis/address.js';
133 import { queryEnterpriseList } from '@/apis/company.js'; 135 import { queryEnterpriseList } from '@/apis/company.js';
134 -import swiperImage1 from '@/static/image/freecompress-swiper-1.png';  
135 -import swiperImage2 from '@/static/image/freecompress-swiper-2.jpg'; 136 +import { queryRole } from "@/apis/user";
136 import { useMainStore } from "@/stores/index.js"; 137 import { useMainStore } from "@/stores/index.js";
137 import { onLoad, onShow } from '@dcloudio/uni-app'; 138 import { onLoad, onShow } from '@dcloudio/uni-app';
138 import { computed, ref } from 'vue'; 139 import { computed, ref } from 'vue';
@@ -147,9 +148,9 @@ const topMargin = ref(null);//状态栏高度 @@ -147,9 +148,9 @@ const topMargin = ref(null);//状态栏高度
147 const musicheadHeight = ref(); 148 const musicheadHeight = ref();
148 const paging = ref(null) 149 const paging = ref(null)
149 const swiperImageList = ref([{ 150 const swiperImageList = ref([{
150 - image: swiperImage1 151 + image: import.meta.env.VITE_BASE_URL + "/swiper-1.jpg"
151 }, { 152 }, {
152 - image: swiperImage2 153 + image: import.meta.env.VITE_BASE_URL + "/swiper-2.jpg"
153 }]) 154 }])
154 155
155 const userAddress = ref({}) 156 const userAddress = ref({})
@@ -233,6 +234,16 @@ const infoBoxList = ref([{ @@ -233,6 +234,16 @@ const infoBoxList = ref([{
233 const companyList = ref([]) 234 const companyList = ref([])
234 235
235 236
  237 +const handlerCLickInfoBox = (val) => {
  238 + switch (val) {
  239 + case '用户指南':
  240 + uni.$u.route('/pages/home/user-guide/index')
  241 + break;
  242 +
  243 + default:
  244 + break;
  245 + }
  246 +}
236 /** 247 /**
237 * 拨打电话回调 248 * 拨打电话回调
238 */ 249 */
@@ -327,8 +338,10 @@ const handleCleanClick = () =&gt; { @@ -327,8 +338,10 @@ const handleCleanClick = () =&gt; {
327 content: '是否进行身份切换?', 338 content: '是否进行身份切换?',
328 success: function (res) { 339 success: function (res) {
329 if (res.confirm) { 340 if (res.confirm) {
330 - uni.$u.route({  
331 - url: `pages/wode/choose/index?ruleVos= ${encodeURIComponent(JSON.stringify([{ userType: '用户' }, mainStore.userInfo]))}`, 341 + queryRole().then(res => {
  342 + uni.$u.route({
  343 + url: `pages/wode/choose/index?ruleVos= ${encodeURIComponent(JSON.stringify(res.data.data.ruleVos))}`,
  344 + })
332 }) 345 })
333 } else if (res.cancel) { 346 } else if (res.cancel) {
334 console.log('用户点击取消'); 347 console.log('用户点击取消');
@@ -338,7 +351,6 @@ const handleCleanClick = () =&gt; { @@ -338,7 +351,6 @@ const handleCleanClick = () =&gt; {
338 } 351 }
339 } 352 }
340 return 353 return
341 -  
342 } 354 }
343 /** 355 /**
344 * 公司详情 356 * 公司详情
@@ -401,7 +413,7 @@ const initData = () =&gt; { @@ -401,7 +413,7 @@ const initData = () =&gt; {
401 queryAddress('CURRENT').then(res => { 413 queryAddress('CURRENT').then(res => {
402 try { 414 try {
403 if (res.data.data && res.data.data[0]) { 415 if (res.data.data && res.data.data[0]) {
404 - addressInfo.value = res.data.data[0].garUserAddress + res.data.data[0].garRemark 416 + addressInfo.value = res.data.data[0].garRemark
405 userAddress.value = JSON.stringify(res.data.data[0] ? res.data.data[0] : {}); 417 userAddress.value = JSON.stringify(res.data.data[0] ? res.data.data[0] : {});
406 } else { 418 } else {
407 addressInfo.value = ''; 419 addressInfo.value = '';
@@ -567,7 +579,6 @@ const queryList = (pageNo, pageSize) =&gt; { @@ -567,7 +579,6 @@ const queryList = (pageNo, pageSize) =&gt; {
567 box-sizing: border-box; 579 box-sizing: border-box;
568 border-radius: 20rpx; 580 border-radius: 20rpx;
569 background: linear-gradient(to bottom, $u-primary, $u-primary-disabled); 581 background: linear-gradient(to bottom, $u-primary, $u-primary-disabled);
570 - // background-image: url("https://cdn.uviewui.com/uview/swiper/swiper2.png");  
571 color: #ffffff; 582 color: #ffffff;
572 background-size: 100% 100%; 583 background-size: 100% 100%;
573 padding: 20rpx; 584 padding: 20rpx;
@@ -594,7 +605,7 @@ const queryList = (pageNo, pageSize) =&gt; { @@ -594,7 +605,7 @@ const queryList = (pageNo, pageSize) =&gt; {
594 box-sizing: border-box; 605 box-sizing: border-box;
595 border-radius: 50rpx; 606 border-radius: 50rpx;
596 background-color: orange; 607 background-color: orange;
597 - font-size: 25rpx; 608 + font-size: 28rpx;
598 } 609 }
599 } 610 }
600 } 611 }
@@ -676,7 +687,7 @@ const queryList = (pageNo, pageSize) =&gt; { @@ -676,7 +687,7 @@ const queryList = (pageNo, pageSize) =&gt; {
676 687
677 .company-list-item-main-right-name-label-recently { 688 .company-list-item-main-right-name-label-recently {
678 margin-right: 10rpx; 689 margin-right: 10rpx;
679 - font-size: 16rpx; 690 + font-size: 18rpx;
680 display: flex; 691 display: flex;
681 align-items: center; 692 align-items: center;
682 justify-content: center; 693 justify-content: center;
@@ -689,7 +700,7 @@ const queryList = (pageNo, pageSize) =&gt; { @@ -689,7 +700,7 @@ const queryList = (pageNo, pageSize) =&gt; {
689 700
690 .company-list-item-main-right-name-label-distance { 701 .company-list-item-main-right-name-label-distance {
691 margin-right: 10rpx; 702 margin-right: 10rpx;
692 - font-size: 16rpx; 703 + font-size: 18rpx;
693 display: flex; 704 display: flex;
694 align-items: center; 705 align-items: center;
695 justify-content: center; 706 justify-content: center;
@@ -704,13 +715,14 @@ const queryList = (pageNo, pageSize) =&gt; { @@ -704,13 +715,14 @@ const queryList = (pageNo, pageSize) =&gt; {
704 align-items: center; 715 align-items: center;
705 justify-content: center; 716 justify-content: center;
706 font-size: 30rpx; 717 font-size: 30rpx;
  718 + overflow-x: visible;
707 } 719 }
708 } 720 }
709 721
710 .company-list-item-main-right-score { 722 .company-list-item-main-right-score {
711 display: flex; 723 display: flex;
712 font-size: small; 724 font-size: small;
713 - font-size: 24rpx; 725 + font-size: 28rpx;
714 726
715 .company-list-item-main-right-text { 727 .company-list-item-main-right-text {
716 text-align: center; 728 text-align: center;
@@ -730,12 +742,12 @@ const queryList = (pageNo, pageSize) =&gt; { @@ -730,12 +742,12 @@ const queryList = (pageNo, pageSize) =&gt; {
730 display: flex; 742 display: flex;
731 justify-content: space-between; 743 justify-content: space-between;
732 align-items: center; 744 align-items: center;
  745 + font-size: 28rpx;
733 746
734 .company-list-item-main-right-price {} 747 .company-list-item-main-right-price {}
735 748
736 .company-list-item-main-right-number { 749 .company-list-item-main-right-number {
737 flex: auto; 750 flex: auto;
738 - font-size: small;  
739 751
740 752
741 .company-list-item-main-right-number-text { 753 .company-list-item-main-right-number-text {
@@ -744,17 +756,13 @@ const queryList = (pageNo, pageSize) =&gt; { @@ -744,17 +756,13 @@ const queryList = (pageNo, pageSize) =&gt; {
744 } 756 }
745 } 757 }
746 758
747 - .company-list-item-main-right-remark {  
748 - font-size: 25rpx;  
749 - line-height: 40rpx;  
750 - }  
751 } 759 }
752 } 760 }
753 761
754 .company-list-item-bottom { 762 .company-list-item-bottom {
755 display: flex; 763 display: flex;
756 justify-content: space-around; 764 justify-content: space-around;
757 - font-size: 25rpx; 765 + font-size: 28rpx;
758 color: #909399; 766 color: #909399;
759 margin-bottom: 50rpx; 767 margin-bottom: 50rpx;
760 768
garbage-removal/src/pages/home/user-guide/index.vue 0 → 100644
  1 +<template>
  2 + <view class="user-guide">
  3 + <image :src="imageUrl"></image>
  4 + </view>
  5 +</template>
  6 +
  7 +<script setup>
  8 +const imageUrl = import.meta.env.VITE_BASE_URL + "/user-guide.png";
  9 +</script>
  10 +
  11 +<style lang="scss" scoped>
  12 +.user-guide {
  13 + width: 100%;
  14 + height: 100%;
  15 + box-sizing: border-box;
  16 + background-color: white;
  17 + padding-top: 20rpx;
  18 +
  19 + image {
  20 + background-size: 100% 100%;
  21 + width: 100%;
  22 + height: 4000rpx;
  23 + }
  24 +}
  25 +</style>
garbage-removal/src/pages/order/other-home/detail/index.vue
@@ -343,6 +343,8 @@ const handleOrderDispatchClick = (orderId) =&gt; { @@ -343,6 +343,8 @@ const handleOrderDispatchClick = (orderId) =&gt; {
343 // 获取驾驶员人员 343 // 获取驾驶员人员
344 queryOrderDispatch(orderId).then(res => { 344 queryOrderDispatch(orderId).then(res => {
345 if (res.data.success) { 345 if (res.data.success) {
  346 + // 过滤车辆 非用户选择的车辆无法选中
  347 +
346 driverPersonnelList.value = res.data.data 348 driverPersonnelList.value = res.data.data
347 clashDriverDispatchRef.value.open(res.data.data) 349 clashDriverDispatchRef.value.open(res.data.data)
348 } else { 350 } else {
garbage-removal/src/pages/wode/choose/index.vue
@@ -3,14 +3,14 @@ @@ -3,14 +3,14 @@
3 <view class="choose-type-box"> 3 <view class="choose-type-box">
4 <view class="choose-type-item" :class="item.isNow ? 'itemActive' : ''" v-for=" (item, index) in typeList" 4 <view class="choose-type-item" :class="item.isNow ? 'itemActive' : ''" v-for=" (item, index) in typeList"
5 :key="index" @click="handlerClick(item)"> 5 :key="index" @click="handlerClick(item)">
6 - <view class="choose-type-item-top" :class="item.classStyle"> 6 + <!-- <view class="choose-type-item-top" :class="item.classStyle">
7 <view class="choose-type-item-image" width="100%" height="100%"> 7 <view class="choose-type-item-image" width="100%" height="100%">
8 <image :src="item.image" shape="circle" mode="aspectFill"> 8 <image :src="item.image" shape="circle" mode="aspectFill">
9 </image> 9 </image>
10 </view> 10 </view>
11 <view class="choose-type-item-text"> 11 <view class="choose-type-item-text">
12 <view class="choose-type-item-text-right"> 12 <view class="choose-type-item-text-right">
13 - <view v-if="item.company" class="choose-tyep-item-text-right-compay"> 13 + <view v-if="item.company" class="choose-type-item-text-right-company">
14 {{ item.company }} 14 {{ item.company }}
15 </view> 15 </view>
16 <view class="choose-type-item-text-right-label"> 16 <view class="choose-type-item-text-right-label">
@@ -25,6 +25,9 @@ @@ -25,6 +25,9 @@
25 {{ item.isNow ? '当前身份' : '切换此身份' }} 25 {{ item.isNow ? '当前身份' : '切换此身份' }}
26 <up-icon name="checkmark-circle-fill" :color="item.isNow ? '#19a97c' : ''" size="28"></up-icon> 26 <up-icon name="checkmark-circle-fill" :color="item.isNow ? '#19a97c' : ''" size="28"></up-icon>
27 </view> 27 </view>
  28 + </view> -->
  29 + <view class="choose-type-item-img">
  30 + <image :src="item.imageUrl" mode="aspectFill"></image>
28 </view> 31 </view>
29 </view> 32 </view>
30 </view> 33 </view>
@@ -34,8 +37,6 @@ @@ -34,8 +37,6 @@
34 </view> 37 </view>
35 </view> 38 </view>
36 </view> 39 </view>
37 -  
38 -  
39 </template> 40 </template>
40 41
41 <script setup> 42 <script setup>
@@ -58,6 +59,7 @@ const typeList = ref([{ @@ -58,6 +59,7 @@ const typeList = ref([{
58 classStyle: 'choose-type-item-top-back-sky', 59 classStyle: 'choose-type-item-top-back-sky',
59 isNow: false, 60 isNow: false,
60 isExit: true, 61 isExit: true,
  62 + imageUrl: import.meta.env.VITE_BASE_URL + "/role/user.png"
61 }, { 63 }, {
62 label: "运输企业负责人", 64 label: "运输企业负责人",
63 info: '负责订单处理', 65 info: '负责订单处理',
@@ -67,6 +69,7 @@ const typeList = ref([{ @@ -67,6 +69,7 @@ const typeList = ref([{
67 classStyle: 'choose-type-item-top-back-sun', 69 classStyle: 'choose-type-item-top-back-sun',
68 order: 1, 70 order: 1,
69 isNow: false, 71 isNow: false,
  72 + imageUrl: import.meta.env.VITE_BASE_URL + "/role/company.png"
70 }, { 73 }, {
71 label: "清运车辆驾驶员", 74 label: "清运车辆驾驶员",
72 info: '负责垃圾清运', 75 info: '负责垃圾清运',
@@ -76,6 +79,7 @@ const typeList = ref([{ @@ -76,6 +79,7 @@ const typeList = ref([{
76 classStyle: 'choose-type-item-top-back-blue', 79 classStyle: 'choose-type-item-top-back-blue',
77 order: 2, 80 order: 2,
78 isNow: false, 81 isNow: false,
  82 + imageUrl: import.meta.env.VITE_BASE_URL + "/role/handler.png"
79 }, { 83 }, {
80 label: "处置场所负责人", 84 label: "处置场所负责人",
81 info: '负责现场指导', 85 info: '负责现场指导',
@@ -85,6 +89,7 @@ const typeList = ref([{ @@ -85,6 +89,7 @@ const typeList = ref([{
85 classStyle: 'choose-type-item-top-back-pink', 89 classStyle: 'choose-type-item-top-back-pink',
86 order: 3, 90 order: 3,
87 isNow: false, 91 isNow: false,
  92 + imageUrl: import.meta.env.VITE_BASE_URL + "/role/disposal.png"
88 }]) 93 }])
89 const unitInfo = ref([]) 94 const unitInfo = ref([])
90 const handlerClick = (val) => { 95 const handlerClick = (val) => {
@@ -165,7 +170,8 @@ onLoad((options) =&gt; { @@ -165,7 +170,8 @@ onLoad((options) =&gt; {
165 box-sizing: border-box; 170 box-sizing: border-box;
166 // padding: 20rpx; 171 // padding: 20rpx;
167 background-color: $u-info-light; 172 background-color: $u-info-light;
168 - 173 + background-color: white;
  174 + padding-top: 100rpx;
169 175
170 .choose-type-box { 176 .choose-type-box {
171 width: 750rpx; 177 width: 750rpx;
@@ -178,10 +184,10 @@ onLoad((options) =&gt; { @@ -178,10 +184,10 @@ onLoad((options) =&gt; {
178 184
179 .choose-type-item { 185 .choose-type-item {
180 width: 100%; 186 width: 100%;
181 - height: 270rpx;  
182 - box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1); 187 + height: 230rpx;
  188 + // box-shadow: 0px 2px 10px 0px rgba(0, 0, 0, 0.1);
183 margin-bottom: 40rpx; 189 margin-bottom: 40rpx;
184 - border-radius: 15rpx 15rpx 0rpx 0rpx; 190 + // border-radius: 15rpx 15rpx 0rpx 0rpx;
185 191
186 192
187 .choose-type-item-top-back-blue { 193 .choose-type-item-top-back-blue {
@@ -238,7 +244,7 @@ onLoad((options) =&gt; { @@ -238,7 +244,7 @@ onLoad((options) =&gt; {
238 justify-content: space-around; 244 justify-content: space-around;
239 color: white; 245 color: white;
240 246
241 - .choose-tyep-item-text-right-compay { 247 + .choose-type-item-text-right-company {
242 font-weight: bolder; 248 font-weight: bolder;
243 font-size: 32rpx; 249 font-size: 32rpx;
244 } 250 }
@@ -277,6 +283,17 @@ onLoad((options) =&gt; { @@ -277,6 +283,17 @@ onLoad((options) =&gt; {
277 color: #19a97c !important; 283 color: #19a97c !important;
278 } 284 }
279 } 285 }
  286 +
  287 + .choose-type-item-img {
  288 + width: 100%;
  289 + height: 200rpx;
  290 +
  291 + image {
  292 + width: 100%;
  293 + height: 200rpx;
  294 + }
  295 +
  296 + }
280 } 297 }
281 298
282 .itemActive { 299 .itemActive {
@@ -311,6 +328,7 @@ onLoad((options) =&gt; { @@ -311,6 +328,7 @@ onLoad((options) =&gt; {
311 } 328 }
312 329
313 .choose-user-bottom-button-box { 330 .choose-user-bottom-button-box {
  331 + margin-top: 80rpx;
314 width: 100%; 332 width: 100%;
315 height: 80rpx; 333 height: 80rpx;
316 display: flex; 334 display: flex;
garbage-removal/src/pages/wode/index.vue
@@ -7,40 +7,46 @@ @@ -7,40 +7,46 @@
7 <view style="display: flex; flex-direction: column; width: 100%;"> 7 <view style="display: flex; flex-direction: column; width: 100%;">
8 <view class="manager-info"> 8 <view class="manager-info">
9 <view class="manager-info-transport-company-name"> 9 <view class="manager-info-transport-company-name">
10 - <view class="">  
11 - <text>{{ userInfo.transportCompanyName }}</text>  
12 - </view> 10 + <text>{{ userInfo.transportCompanyName }}</text>
13 </view> 11 </view>
14 <view class="choose-type-item-text-right-label">{{ userInfo.userType }}</view> 12 <view class="choose-type-item-text-right-label">{{ userInfo.userType }}</view>
15 </view> 13 </view>
16 </view> 14 </view>
17 </view> 15 </view>
18 - <view class="u-m-t-20" style="background-color: white;">  
19 - <u-cell-group>  
20 - <u-cell icon="map" iconStyle="font-size:28rpx" @click="handleAddressManager" title="地 址 管 理"></u-cell>  
21 - </u-cell-group>  
22 - </view>  
23 -  
24 - <view class="u-m-t-20">  
25 - <!-- <u-cell-group>  
26 - <u-cell icon="star" title="收藏"></u-cell>  
27 - <u-cell icon="photo" title="相册"></u-cell>  
28 - <u-cell icon="coupon" title="卡券"></u-cell>  
29 - <u-cell icon="heart" title="关注"></u-cell>  
30 - </u-cell-group> -->  
31 - </view>  
32 -  
33 - <view class="u-m-t-40" style="background-color: white;">  
34 - <u-cell-group>  
35 - <u-cell class="logout-cell" icon="setting" iconStyle="font-size:28rpx" @click="handleLoginOut"  
36 - title="退 出 登 录"></u-cell>  
37 - </u-cell-group> 16 + <view class="more-setting-box">
  17 + <view class="more-setting-title">
  18 + 更多设置
  19 + </view>
  20 + <view class="cell-box" @click="handleAddressManager" hover-class="handlerClick">
  21 + <view class="cell-icon">
  22 + <image width="35rpx" height="35rpx" src="../../static/image/address-manager.png"></image>
  23 + </view>
  24 + <view class="cell-label">
  25 + <text>地 址 管 理</text>
  26 + </view>
  27 + </view>
  28 + <view class="cell-box" @click="handlerChangeRole" hover-class="handlerClick">
  29 + <view class="cell-icon">
  30 + <image src="../../static/image/role-change.png"></image>
  31 + </view>
  32 + <view class="cell-label">
  33 + <text>角 色 切 换</text>
  34 + </view>
  35 + </view>
  36 + <view class="cell-box" @click="handleLoginOut" hover-class="handlerClick">
  37 + <view class="cell-icon">
  38 + <image src="../../static/image/quit-login.png"></image>
  39 + </view>
  40 + <view class="cell-label">
  41 + <text>退 出 登 录</text>
  42 + </view>
  43 + </view>
38 </view> 44 </view>
39 </view> 45 </view>
40 </template> 46 </template>
41 47
42 <script setup> 48 <script setup>
43 -import { loginOut } from "@/apis/user"; 49 +import { loginOut, queryRole } from "@/apis/user";
44 import headImg from "@/static/image/st_pic.png"; 50 import headImg from "@/static/image/st_pic.png";
45 import { useMainStore } from "@/stores/index"; 51 import { useMainStore } from "@/stores/index";
46 import { setRequestToken } from '@/utils/request/request.js'; 52 import { setRequestToken } from '@/utils/request/request.js';
@@ -54,6 +60,26 @@ const handleAddressManager = () =&gt; { @@ -54,6 +60,26 @@ const handleAddressManager = () =&gt; {
54 url: `pages/home/address/index`, 60 url: `pages/home/address/index`,
55 }) 61 })
56 } 62 }
  63 +const handlerChangeRole = () => {
  64 + uni.showModal({
  65 + title: '提示',
  66 + content: '是否进行身份切换?',
  67 + success: function (res) {
  68 + if (res.confirm) {
  69 + queryRole().then(res => {
  70 + if (res.data.success) {
  71 + uni.$u.route({
  72 + url: `pages/wode/choose/index?ruleVos= ${encodeURIComponent(JSON.stringify(res.data.data.ruleVos))}`,
  73 + })
  74 + }
  75 + })
  76 +
  77 + } else if (res.cancel) {
  78 + console.log('用户点击取消');
  79 + }
  80 + }
  81 + });
  82 +}
57 const handleLoginOut = () => { 83 const handleLoginOut = () => {
58 uni.showModal({ 84 uni.showModal({
59 title: '提示', 85 title: '提示',
@@ -87,14 +113,63 @@ const handleLoginOut = () =&gt; { @@ -87,14 +113,63 @@ const handleLoginOut = () =&gt; {
87 .head-top-box { 113 .head-top-box {
88 display: flex; 114 display: flex;
89 align-items: center; 115 align-items: center;
90 - background: white; 116 + background: #19a97c;
  117 + padding: 20rpx 30rpx;
  118 + box-sizing: border-box;
  119 + border-radius: 0 0 30rpx 30rpx;
  120 + height: 300rpx;
91 121
92 .head-image-box { 122 .head-image-box {
93 display: flex; 123 display: flex;
94 align-items: center; 124 align-items: center;
95 justify-content: center; 125 justify-content: center;
96 - width: 200rpx;  
97 - height: 200rpx; 126 + width: 180rpx;
  127 + height: 180rpx;
  128 + margin-right: 30rpx;
  129 + }
  130 + }
  131 +
  132 + .more-setting-box {
  133 + margin-top: 60rpx;
  134 + margin-bottom: 20rpx;
  135 + padding: 20rpx;
  136 + box-sizing: border-box;
  137 + align-items: center;
  138 +
  139 + .more-setting-title {
  140 + color: $u-info;
  141 + }
  142 +
  143 + .cell-box {
  144 + display: flex;
  145 + align-items: center;
  146 + line-height: 80rpx;
  147 + font-size: 35rpx;
  148 + background-color: white;
  149 + border-radius: 15rpx;
  150 + margin: 40rpx 0;
  151 +
  152 + .cell-icon {
  153 + margin: 0 20rpx;
  154 + display: flex;
  155 + align-items: center;
  156 +
  157 + image {
  158 + background-size: 100% 100%;
  159 + width: 40rpx;
  160 + height: 40rpx;
  161 + }
  162 +
  163 + u-icon {}
  164 + }
  165 +
  166 + .cell-label {
  167 + text {}
  168 + }
  169 + }
  170 +
  171 + .handlerClick {
  172 + @include handleClick;
98 } 173 }
99 } 174 }
100 } 175 }
@@ -107,9 +182,6 @@ const handleLoginOut = () =&gt; { @@ -107,9 +182,6 @@ const handleLoginOut = () =&gt; {
107 background-color: #fff; 182 background-color: #fff;
108 } 183 }
109 184
110 -.logout-cell {  
111 - @include handleClick;  
112 -}  
113 185
114 .manager-info { 186 .manager-info {
115 width: 100%; 187 width: 100%;
@@ -121,37 +193,38 @@ const handleLoginOut = () =&gt; { @@ -121,37 +193,38 @@ const handleLoginOut = () =&gt; {
121 color: white; 193 color: white;
122 194
123 .choose-tyep-item-text-right-info { 195 .choose-tyep-item-text-right-info {
124 - font-size: 28rpx; 196 + font-size: 40rpx;
125 } 197 }
126 198
127 - .choose-tyep-item-text-right-compay { 199 + .manager-info-transport-company-name {
  200 + display: flex;
  201 + color: white;
  202 + line-height: 80rpx;
  203 + font-size: 40rpx;
  204 + }
  205 +
  206 + .choose-tyep-item-text-right-company {
128 font-weight: bolder; 207 font-weight: bolder;
129 - line-height: 35rpx;  
130 - font-size: 32rpx; 208 + line-height: 40rpx;
  209 + font-size: 40rpx;
131 } 210 }
132 211
133 .choose-type-item-text-right-label { 212 .choose-type-item-text-right-label {
134 - font-size: 23rpx; 213 + font-size: 30rpx;
135 padding: 8rpx 15rpx; 214 padding: 8rpx 15rpx;
136 border-radius: 5rpx; 215 border-radius: 5rpx;
137 - color: $u-info-dark; 216 + color: $u-main-color;
138 font-weight: 600; 217 font-weight: 600;
139 margin-bottom: 10rpx; 218 margin-bottom: 10rpx;
140 - background: #e7e7e7ad;  
141 - border: 3rpx solid white; 219 + background: #f3a200;
142 } 220 }
143 } 221 }
144 222
145 .manager-info-parent-company-name { 223 .manager-info-parent-company-name {
  224 + color: white;
146 225
147 text { 226 text {
148 - color: $u-info; 227 + color: white;
149 } 228 }
150 } 229 }
151 -  
152 -.manager-info-transport-company-name {  
153 - display: flex;  
154 - color: $u-main-color;  
155 - line-height: 80rpx;  
156 -}  
157 </style> 230 </style>
garbage-removal/src/static/image/address-manager.png 0 → 100644

5.21 KB

garbage-removal/src/static/image/change-address.png 0 → 100644

3.65 KB

garbage-removal/src/static/image/freecompress-swiper-1.png deleted 100644 → 0

8.79 KB

garbage-removal/src/static/image/freecompress-swiper-2.jpg deleted 100644 → 0

15 KB

garbage-removal/src/static/image/quit-login.png 0 → 100644

4.68 KB

garbage-removal/src/static/image/role-change.png 0 → 100644

5.58 KB

garbage-removal/src/static/image/st_pic.png

551 Bytes | W: | H:

7.97 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
garbage-removal/src/uni.scss
@@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
18 18
19 @mixin handleClick { 19 @mixin handleClick {
20 &:active { 20 &:active {
21 - background-color: #f3f4f6; 21 + background-color: #f3f4f6 !important;
22 opacity: 0.8; 22 opacity: 0.8;
23 transition: opacity 0.3s; 23 transition: opacity 0.3s;
24 -webkit-transition: opacity 0.3s; 24 -webkit-transition: opacity 0.3s;