Commit c125194fa836ddd000f63f960c2e579d80ecef1e

Authored by guzijian
1 parent 20917ce1

feat: 超时取消,封装picker组件

garbage-removal/src/apis/order.js
@@ -106,6 +106,11 @@ export async function queryOrderMessageCount() { @@ -106,6 +106,11 @@ export async function queryOrderMessageCount() {
106 export async function queryOrderMessageList(pageNo,pageSize) { 106 export async function queryOrderMessageList(pageNo,pageSize) {
107 return await request.get(`/order/query/message/list/${pageNo}/${pageSize}`); 107 return await request.get(`/order/query/message/list/${pageNo}/${pageSize}`);
108 } 108 }
  109 +
109 export async function readMessage(data) { 110 export async function readMessage(data) {
110 return await request.put(`/order/read/message`,data); 111 return await request.put(`/order/read/message`,data);
111 } 112 }
  113 +
  114 +export async function successOrder(data) {
  115 + return await request.put(`/order/update`,data);
  116 +}
garbage-removal/src/components/my-piker/index.vue 0 → 100644
  1 +<template>
  2 + <view style="width: 100%;">
  3 + <view @click="openUnit" style="width: 100%;" hover-class="hoverClickStyle">
  4 + {{ parentValue }}
  5 + </view>
  6 + <!-- 弹框 -->
  7 + <u-popup :show="visible" :round="10" mode="bottom" :closeable="true" @close="closeUnit" @open="openUnit">
  8 + <view style="height: 700rpx">
  9 + <h4 style="text-align: center; margin-top: 56rpx; letter-spacing: 5rpx">{{ title }}</h4>
  10 + <picker-view :indicator-style="'height: 50px;'" :value="unitValue" @change="bindPickerChange"
  11 + class="picker-view">
  12 + <picker-view-column>
  13 + <view class="item" v-for="(item, index) in array" :key="index">{{ item }}</view>
  14 + </picker-view-column>
  15 + </picker-view>
  16 + </view>
  17 + </u-popup>
  18 + </view>
  19 +</template>
  20 +<script setup>
  21 +import { ref } from 'vue';
  22 +const emit = defineEmits(['change'])
  23 +const props = defineProps({
  24 + parentValue: {
  25 + type: String,
  26 + required: true,
  27 + },
  28 + title: {
  29 + type: String,
  30 + default: '请选择',
  31 + },
  32 + array: {
  33 + type: Array,
  34 + default: [],
  35 + },
  36 +})
  37 +const visible = ref(false)
  38 +const index = ref(0);
  39 +// 摆设 不能没有
  40 +const unitValue = ref([])
  41 +const closeUnit = () => {
  42 + visible.value = false
  43 +}
  44 +const openUnit = () => {
  45 + visible.value = true
  46 + console.log('open');
  47 +}
  48 +const bindPickerChange = (e) => {
  49 + console.log('picker发送选择改变,携带值为', e.detail.value)
  50 + index.value = e.detail.value
  51 + emit('change', props.array[index.value])
  52 +}
  53 +</script>
  54 +<style lang="scss" scoped>
  55 +.picker-view {
  56 + width: 750rpx;
  57 + height: 600rpx;
  58 + margin-top: 20rpx;
  59 +}
  60 +
  61 +.item {
  62 + line-height: 100rpx;
  63 + text-align: center;
  64 +}
  65 +
  66 +.hoverClickStyle {
  67 + @include handleClick;
  68 +}
  69 +</style>
garbage-removal/src/pages.json
@@ -158,13 +158,6 @@ @@ -158,13 +158,6 @@
158 "navigationBarBackgroundColor":"#19a97c", 158 "navigationBarBackgroundColor":"#19a97c",
159 "enablePullDownRefresh": false 159 "enablePullDownRefresh": false
160 } 160 }
161 - },  
162 - {  
163 - "path": "pages/home/search/index",  
164 - "style": {  
165 - "navigationBarTitleText": "公司搜索",  
166 - "enablePullDownRefresh": false  
167 - }  
168 },{ 161 },{
169 "path": "pages/order/index", 162 "path": "pages/order/index",
170 "style": { 163 "style": {
garbage-removal/src/pages/home/clean/company-detail/index.vue
@@ -3,8 +3,9 @@ @@ -3,8 +3,9 @@
3 <view class="company-content-box"> 3 <view class="company-content-box">
4 <view class="company-content-header"> 4 <view class="company-content-header">
5 <view class="company-content-left"> 5 <view class="company-content-left">
6 - <image class="company-content-left-image"  
7 - :src="headerData.carParkPanorama ? headerData.carParkPanorama : 'https://ijry.github.io/uview-plus/h5/assets/logo-8d54bbeb.png'" /> 6 + <up-image :show-loading="true"
  7 + :src="headerData.companyLogo ? headerData.companyLogo : '../../../../static/image/freecompress-swiper-2.jpg'"
  8 + width="150rpx" height="150rpx"></up-image>
8 </view> 9 </view>
9 <view class="company-content-right"> 10 <view class="company-content-right">
10 <view class="company-content-right-name"> 11 <view class="company-content-right-name">
@@ -84,8 +85,9 @@ @@ -84,8 +85,9 @@
84 </view> 85 </view>
85 </view> 86 </view>
86 <view class="company-bottom-button-right"> 87 <view class="company-bottom-button-right">
87 - <u-button icon="car-fill" :custom-style="customStyle" @click="handleCleanGarbage(companyInfo, tel, userAddress)"  
88 - type="success" :hairline="true" size="normal" shape="circle" text="垃圾清运"></u-button> 88 + <u-button v-if="userType == '用户'" icon="car-fill" :custom-style="customStyle"
  89 + @click="handleCleanGarbage(companyInfo, tel, userAddress)" type="success" :hairline="true" size="normal"
  90 + shape="circle" text="垃圾清运"></u-button>
89 </view> 91 </view>
90 </view> 92 </view>
91 </view> 93 </view>
@@ -94,8 +96,11 @@ @@ -94,8 +96,11 @@
94 <script setup> 96 <script setup>
95 import { queryCarList } from '@/apis/carinfo.js'; 97 import { queryCarList } from '@/apis/carinfo.js';
96 import { queryEnterpriseById } from '@/apis/company.js'; 98 import { queryEnterpriseById } from '@/apis/company.js';
  99 +import { useMainStore } from "@/stores/index.js";
97 import { onLoad } from '@dcloudio/uni-app'; 100 import { onLoad } from '@dcloudio/uni-app';
98 -import { ref } from 'vue'; 101 +import { computed, ref } from 'vue';
  102 +const mainStore = useMainStore()
  103 +const userType = computed(() => mainStore.userType)
99 const baseDataList = ref([{ label: '法人' }, { label: '负责人' }, { label: '业务联系电话' }, { label: '道路运输许可证' }, { label: '核准有效期' }, { label: '注册地址' }]); 104 const baseDataList = ref([{ label: '法人' }, { label: '负责人' }, { label: '业务联系电话' }, { label: '道路运输许可证' }, { label: '核准有效期' }, { label: '注册地址' }]);
100 const customStyle = ref({ 105 const customStyle = ref({
101 fontSize: '30rpx', 106 fontSize: '30rpx',
@@ -108,7 +113,7 @@ const userAddress = ref() @@ -108,7 +113,7 @@ const userAddress = ref()
108 const headerData = ref({ 113 const headerData = ref({
109 name: "", 114 name: "",
110 registrationArea: "", 115 registrationArea: "",
111 - carParkPanorama: "" 116 + companyLogo: ""
112 }) 117 })
113 const serverData = ref([ 118 const serverData = ref([
114 { 119 {
@@ -185,7 +190,7 @@ const initData = (baseData) =&gt; { @@ -185,7 +190,7 @@ const initData = (baseData) =&gt; {
185 baseDataList.value[5].value = baseData.officeAddress 190 baseDataList.value[5].value = baseData.officeAddress
186 headerData.value.name = baseData.name; 191 headerData.value.name = baseData.name;
187 headerData.value.registrationArea = baseData.registrationArea; 192 headerData.value.registrationArea = baseData.registrationArea;
188 - headerData.value.carParkPanorama = baseData.carParkPanorama; 193 + headerData.value.companyLogo = baseData.companyLogo;
189 } 194 }
190 </script> 195 </script>
191 196
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 <liu-delivery-time :isMask="true" :change="changeTime" ref="chooseTime" title="请选择预约时间"></liu-delivery-time>
4 - <u-picker closeOnClickOverlay :show="carTypeShowFlag" :columns="candidates" :itemHeight="100"  
5 - @confirm="handlePickerCarInfoConfirm" @cancel="handleCarInfoClick(false)"  
6 - @close="handleCarInfoClick(false)"></u-picker>  
7 <u-picker closeOnClickOverlay :show="garbageTypeShowFlag" :columns="garbageTypeList" :itemHeight="100" 4 <u-picker closeOnClickOverlay :show="garbageTypeShowFlag" :columns="garbageTypeList" :itemHeight="100"
8 @confirm="handlePickerGarbageTypeConfirm" @close="handleGarbageTypeClick(false)" 5 @confirm="handlePickerGarbageTypeConfirm" @close="handleGarbageTypeClick(false)"
9 @cancel="handleGarbageTypeClick(false)"></u-picker> 6 @cancel="handleGarbageTypeClick(false)"></u-picker>
10 - <!-- <u-popup :zIndex="10074" closeOnClickOverlay :show="carPopupShowFlag" :round="10" @close="handlePopupClick(false)"  
11 - @open="handlePopupClick(true)">  
12 - <view class="company-clean-container-car-popup">  
13 - <view class="company-clean-container-car-popup-content">  
14 - <view class="company-clean-container-car-popup-content-title">  
15 - <view style="text-align: center;">  
16 - 车辆类型  
17 - </view>  
18 - </view>  
19 - <view class="company-clean-container-car-popup-content-box">  
20 - <view class="company-clean-container-car-popup-content-box-item" v-for="(item, index) in garCarInfoList"  
21 - :key="index">  
22 - <view class="company-clean-container-car-popup-content-box-item-text">  
23 - {{ item.garOrderCarType }}  
24 - </view>  
25 - <view class="company-clean-container-car-popup-content-box-item-number" hover-class="hoverClickStyle">  
26 - <u-number-box :min="0" :max="9999" integer buttonSize="46" :inputWidth="100"  
27 - v-model="garCarInfoList[item.garOrderCarType].garOrderCarNumber" :disabledInput="true"></u-number-box>  
28 - </view>  
29 - </view>  
30 - </view>  
31 - </view>  
32 - <view class="company-clean-container-car-popup-button-safe">  
33 - &nbsp;  
34 - </view>  
35 - </view>  
36 - </u-popup> -->  
37 </view> 7 </view>
38 <view class="company-clean-container"> 8 <view class="company-clean-container">
39 <view class="company-clean-container-box"> 9 <view class="company-clean-container-box">
@@ -56,7 +26,23 @@ @@ -56,7 +26,23 @@
56 </view> 26 </view>
57 <view class="company-clean-container-car-main"> 27 <view class="company-clean-container-car-main">
58 <view class="company-clean-container-car-main-content"> 28 <view class="company-clean-container-car-main-content">
59 - <view class="company-clean-container-car-main-content"> 29 + <view v-if="paramFrom.carType" class="company-clean-container-car-main-content-type">
  30 + <view class="company-clean-container-car-main-content-type-price-area">
  31 + <text style="color: red;">*</text>车辆信息:
  32 + </view>
  33 + <view style=" width:100%;display:flex; color:#909399; align-items: center;">
  34 + <myPiker :parentValue="paramFrom.carType" @change="handlePickerCarInfoConfirm"
  35 + :modelValue="paramFrom.carType" :array="candidates" :title="'车辆信息'">
  36 + </myPiker>
  37 + </view>
  38 + </view>
  39 + <view class="company-clean-container-car-main-content-img">
  40 + <image class="company-clean-container-car-main-content-img" :src="carFront" />
  41 + </view>
  42 + <view class="company-clean-container-car-main-content-remark" style="margin: 20rpx 0; font-size: 23rpx;">
  43 + {{ garCarTransportInfo }}
  44 + </view>
  45 + <view class=" company-clean-container-car-main-content">
60 <view class="company-clean-container-car-popup"> 46 <view class="company-clean-container-car-popup">
61 <!-- 主要内容 --> 47 <!-- 主要内容 -->
62 <view class="company-clean-container-car-popup-content"> 48 <view class="company-clean-container-car-popup-content">
@@ -82,22 +68,22 @@ @@ -82,22 +68,22 @@
82 </view> 68 </view>
83 </view> 69 </view>
84 </view> 70 </view>
85 -  
86 <view class="company-clean-container-car-main-content-type"> 71 <view class="company-clean-container-car-main-content-type">
87 <view class="company-clean-container-car-main-content-type-price-area"> 72 <view class="company-clean-container-car-main-content-type-price-area">
88 <text style="color: red;">*</text>垃圾类型: 73 <text style="color: red;">*</text>垃圾类型:
89 </view> 74 </view>
90 - <view hover-class="hoverClickStyle" @click.stop="handleGarbageTypeClick(true)">  
91 - <u--input color="#909399" border="none" style="pointer-events:none" :modelValue="paramFrom.garbageType"  
92 - type="text" placeholder-class="line" readonly /> 75 + <view style=" width:100%;display:flex; color:#909399; align-items: center;">
  76 + <myPiker :parentValue="paramFrom.garbageType" :title="'垃圾类型'" @change="handlePickerGarbageTypeConfirm"
  77 + :array="garbageTypeList">
  78 + </myPiker>
93 </view> 79 </view>
94 </view> 80 </view>
95 <view class="company-clean-container-car-main-content-type"> 81 <view class="company-clean-container-car-main-content-type">
96 <view class="company-clean-container-car-main-content-type-price-area"> 82 <view class="company-clean-container-car-main-content-type-price-area">
97 <text style="color: red;">*</text>是否进入车库: 83 <text style="color: red;">*</text>是否进入车库:
98 </view> 84 </view>
99 - <view style="width:100%;display: flex;justify-content: center;align-items: center; ">  
100 - <view style="display: flex;"> 85 + <view style="width:100%;display: flex;justify-content: flex-start;align-items: center; ">
  86 + <view style="display: flex; align-items: center;">
101 <up-radio-group shape="square" size="30" v-model="paramFrom.garInCarStore" placement="row" 87 <up-radio-group shape="square" size="30" v-model="paramFrom.garInCarStore" placement="row"
102 @change="handleInCarClick"> 88 @change="handleInCarClick">
103 <up-radio activeColor="#19a97c" labelSize="30" 89 <up-radio activeColor="#19a97c" labelSize="30"
@@ -118,23 +104,6 @@ @@ -118,23 +104,6 @@
118 提示:需要进入车库需要写车辆限高,部门车库限高2.3m,如果装修垃圾在车库,要考虑车辆是否能进入。 104 提示:需要进入车库需要写车辆限高,部门车库限高2.3m,如果装修垃圾在车库,要考虑车辆是否能进入。
119 </view> 105 </view>
120 </view> 106 </view>
121 - <view v-if="paramFrom.carType" class="company-clean-container-car-main-content-type">  
122 - <view class="company-clean-container-car-main-content-type-price-area">  
123 - <text style="color: red;">*</text>车辆信息:  
124 - </view>  
125 - <!-- <scrollText :candidates="candidates" /> -->  
126 - <view style="display:flex; align-items: center;" hover-class="hoverClickStyle"  
127 - @click.stop="handleCarInfoClick(true)">  
128 - <u--input color="#909399" border="none" style="pointer-events:none" :modelValue="paramFrom.carType"  
129 - type="text" placeholder-class="line" readonly />  
130 - </view>  
131 - </view>  
132 - <view class="company-clean-container-car-main-content-img">  
133 - <image class="company-clean-container-car-main-content-img" :src="carFront" />  
134 - </view>  
135 - <view class="company-clean-container-car-main-content-remark">  
136 - {{ garCarTransportInfo }}  
137 - </view>  
138 <view class="company-clean-container-car-main-content-prompt"> 107 <view class="company-clean-container-car-main-content-prompt">
139 温馨提示:垃圾类型不符合,企业有权拒绝清运。 108 温馨提示:垃圾类型不符合,企业有权拒绝清运。
140 </view> 109 </view>
@@ -195,6 +164,7 @@ import { queryCarList } from &#39;@/apis/carinfo.js&#39;; @@ -195,6 +164,7 @@ import { queryCarList } from &#39;@/apis/carinfo.js&#39;;
195 import { uploadFilePromise } from '@/apis/common.js'; 164 import { uploadFilePromise } from '@/apis/common.js';
196 import { saveOrder } from '@/apis/order.js'; 165 import { saveOrder } from '@/apis/order.js';
197 import liuDeliveryTime from "@/components/liu-delivery-time/liu-delivery-time.vue"; 166 import liuDeliveryTime from "@/components/liu-delivery-time/liu-delivery-time.vue";
  167 +import myPiker from '@/components/my-piker/index.vue';
198 import garbageUrl from '@/static/image/garbage.png'; 168 import garbageUrl from '@/static/image/garbage.png';
199 import { useMainStore } from '@/stores/index.js'; 169 import { useMainStore } from '@/stores/index.js';
200 import { onLoad } from '@dcloudio/uni-app'; 170 import { onLoad } from '@dcloudio/uni-app';
@@ -260,14 +230,14 @@ const garCarNumberCount = computed(() =&gt; { @@ -260,14 +230,14 @@ const garCarNumberCount = computed(() =&gt; {
260 console.log(count); 230 console.log(count);
261 return count; 231 return count;
262 }) 232 })
263 -const garbageTypeList = ref([["装修垃圾", "建筑垃圾"]]) 233 +const garbageTypeList = ref(["装修垃圾", "建筑垃圾"])
264 const paramFrom = ref({ 234 const paramFrom = ref({
265 carNumber: 0, 235 carNumber: 0,
266 remark: "", 236 remark: "",
267 sureReadFlag: [], 237 sureReadFlag: [],
268 carType: "", 238 carType: "",
269 - garbageType: ["装修垃圾"],  
270 - garInCarStore: false 239 + garbageType: "装修垃圾",
  240 + garInCarStore: false,
271 }) 241 })
272 const dayTime = ref() 242 const dayTime = ref()
273 243
@@ -334,22 +304,22 @@ const initOptions = async (options) =&gt; { @@ -334,22 +304,22 @@ const initOptions = async (options) =&gt; {
334 } 304 }
335 queryCarList({ companyId: companyObj.value.id }).then(res => { 305 queryCarList({ companyId: companyObj.value.id }).then(res => {
336 // 设置车辆类型 306 // 设置车辆类型
337 - candidates.value = [[...new Set(res.data.rows 307 + candidates.value = [...new Set(res.data.rows
338 .filter(item => item.containerVolume) 308 .filter(item => item.containerVolume)
339 .map(item => { 309 .map(item => {
340 garCarLabelInfoList.value[item.containerVolume + "方车"] = item 310 garCarLabelInfoList.value[item.containerVolume + "方车"] = item
341 return item.containerVolume + "方车" 311 return item.containerVolume + "方车"
342 })) 312 }))
343 - ]]; 313 + ];
344 // 设置初始车辆数量 314 // 设置初始车辆数量
345 - candidates.value[0].forEach((item, index) => { 315 + candidates.value.forEach((item, index) => {
346 garCarInfoList.value[item] = { 316 garCarInfoList.value[item] = {
347 garOrderCarNumber: 0, 317 garOrderCarNumber: 0,
348 garOrderCarType: item 318 garOrderCarType: item
349 } 319 }
350 }) 320 })
351 // 设置默认车辆 321 // 设置默认车辆
352 - paramFrom.value.carType = candidates.value[0][0]; 322 + paramFrom.value.carType = candidates.value[0];
353 garCarLabelInfoNow.value = garCarLabelInfoList.value[paramFrom.value.carType] 323 garCarLabelInfoNow.value = garCarLabelInfoList.value[paramFrom.value.carType]
354 }) 324 })
355 } 325 }
@@ -411,11 +381,12 @@ const afterRead = async (event) =&gt; { @@ -411,11 +381,12 @@ const afterRead = async (event) =&gt; {
411 381
412 382
413 const handlePickerGarbageTypeConfirm = (e) => { 383 const handlePickerGarbageTypeConfirm = (e) => {
414 - paramFrom.value.garbageType = e.value 384 + paramFrom.value.garbageType = e
415 garbageTypeShowFlag.value = false 385 garbageTypeShowFlag.value = false
416 } 386 }
417 const handlePickerCarInfoConfirm = (e) => { 387 const handlePickerCarInfoConfirm = (e) => {
418 - paramFrom.value.carType = e.value 388 + console.log(e);
  389 + paramFrom.value.carType = e
419 garCarLabelInfoNow.value = garCarLabelInfoList.value[paramFrom.value.carType] 390 garCarLabelInfoNow.value = garCarLabelInfoList.value[paramFrom.value.carType]
420 carTypeShowFlag.value = false 391 carTypeShowFlag.value = false
421 console.log(garCarLabelInfoNow.value); 392 console.log(garCarLabelInfoNow.value);
@@ -450,7 +421,7 @@ const handleOderSure = () =&gt; { @@ -450,7 +421,7 @@ const handleOderSure = () =&gt; {
450 /** 421 /**
451 * 垃圾类型 422 * 垃圾类型
452 */ 423 */
453 - garOrderTrashType: paramFrom.value.garbageType[0], 424 + garOrderTrashType: paramFrom.value.garbageType,
454 425
455 /** 426 /**
456 * 订单人电话 427 * 订单人电话
@@ -527,6 +498,11 @@ const handleOderSure = () =&gt; { @@ -527,6 +498,11 @@ const handleOderSure = () =&gt; {
527 */ 498 */
528 const validateParams = (params) => { 499 const validateParams = (params) => {
529 500
  501 + if (params.garInCarStore && !params.garRemark) {
  502 + jumpPrompt('请输入限高')
  503 + return false;
  504 + }
  505 +
530 if (!paramFrom.value.sureReadFlag[0]) { 506 if (!paramFrom.value.sureReadFlag[0]) {
531 jumpPrompt('请勾选"本人已确认信息真实有效,并将上诉信息告知市容环境卫生主管部门"') 507 jumpPrompt('请勾选"本人已确认信息真实有效,并将上诉信息告知市容环境卫生主管部门"')
532 return false; 508 return false;
@@ -736,6 +712,7 @@ $custom-bottom-height: 200rpx; @@ -736,6 +712,7 @@ $custom-bottom-height: 200rpx;
736 align-items: center; 712 align-items: center;
737 color: $u-info; 713 color: $u-info;
738 white-space: nowrap; 714 white-space: nowrap;
  715 + width: 100%;
739 } 716 }
740 } 717 }
741 718
garbage-removal/src/pages/home/index.vue
@@ -25,7 +25,7 @@ @@ -25,7 +25,7 @@
25 </view> 25 </view>
26 </view> 26 </view>
27 <view class="company-container"> 27 <view class="company-container">
28 - <view class="company-list-box" v-if="addressInfo"> 28 + <view class="company-list-box" v-if="addressInfo && userType == '用户'">
29 <view class="company-list-header"> 29 <view class="company-list-header">
30 <view class="company-list-header-left"> 30 <view class="company-list-header-left">
31 <u-dropdown active-color="#19a97c"> 31 <u-dropdown active-color="#19a97c">
@@ -37,12 +37,6 @@ @@ -37,12 +37,6 @@
37 :title="dropdownOptions[2][sortValue].label" :options="dropdownOptions[2]"></u-dropdown-item> 37 :title="dropdownOptions[2][sortValue].label" :options="dropdownOptions[2]"></u-dropdown-item>
38 </u-dropdown> 38 </u-dropdown>
39 </view> 39 </view>
40 - <view class="company-list-header-right" @tap.stop="handleSearchClick">  
41 - <view  
42 - style="display: inline-block; width: 100%;pointer-events: none;margin: 10rpx 0rpx; box-sizing: border-box;">  
43 - <u-search :searchIconSize="40" :disabled="true" :placeholder="'搜索'" :showAction="false"></u-search>  
44 - </view>  
45 - </view>  
46 </view> 40 </view>
47 <view class="company-list-content"> 41 <view class="company-list-content">
48 <view class="company-list-content-box"> 42 <view class="company-list-content-box">
@@ -84,7 +78,7 @@ @@ -84,7 +78,7 @@
84 </view> 78 </view>
85 <view class="company-list-item-main-right-price-number"> 79 <view class="company-list-item-main-right-price-number">
86 <view class="company-list-item-main-right-price"> 80 <view class="company-list-item-main-right-price">
87 - 报价:<text style="color: #fd5d00;">¥400起&nbsp;&nbsp;</text> 81 + 报价:<text style="color: #fd5d00;">¥{{ item.offer }}起&nbsp;&nbsp;</text>
88 </view> 82 </view>
89 <view class="company-list-item-main-right-number"> 83 <view class="company-list-item-main-right-number">
90 清运数:<text class="company-list-item-main-right-number-text">{{ item.cleanNumber }}</text> 84 清运数:<text class="company-list-item-main-right-number-text">{{ item.cleanNumber }}</text>
@@ -107,9 +101,6 @@ @@ -107,9 +101,6 @@
107 </view> 101 </view>
108 </view> 102 </view>
109 </view> 103 </view>
110 - <!-- <view class="company-list-item-main-right-remark">  
111 - {{ item.remark }}  
112 - </view> -->  
113 </view> 104 </view>
114 </view> 105 </view>
115 <view class="company-list-item-bottom"> 106 <view class="company-list-item-bottom">
@@ -121,7 +112,7 @@ @@ -121,7 +112,7 @@
121 </view> 112 </view>
122 <view class="company-empty" v-else @click="handleCleanClick"> 113 <view class="company-empty" v-else @click="handleCleanClick">
123 <view class="empty-text-title"> 114 <view class="empty-text-title">
124 - 请先添加地址 115 + {{ prompt }}
125 </view> 116 </view>
126 <view class="empty-text-content"> 117 <view class="empty-text-content">
127 房屋装饰装修过程中产生的砖瓦、木材、熟料等废弃物 118 房屋装饰装修过程中产生的砖瓦、木材、熟料等废弃物
@@ -140,8 +131,14 @@ @@ -140,8 +131,14 @@
140 <script setup> 131 <script setup>
141 import { queryAddress } from '@/apis/address.js'; 132 import { queryAddress } from '@/apis/address.js';
142 import { queryEnterpriseList } from '@/apis/company.js'; 133 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 { useMainStore } from "@/stores/index.js";
143 import { onLoad, onShow } from '@dcloudio/uni-app'; 137 import { onLoad, onShow } from '@dcloudio/uni-app';
144 -import { ref } from 'vue'; 138 +import { computed, ref } from 'vue';
  139 +const mainStore = useMainStore()
  140 +const userType = computed(() => mainStore.userType)
  141 +const prompt = computed(() => userType.value == '用户' ? "请先添加地址" : '非用户无法下单')
145 // 定义最大积分 142 // 定义最大积分
146 let maxScore = 5 143 let maxScore = 5
147 const maxStar = ref([]) 144 const maxStar = ref([])
@@ -150,9 +147,9 @@ const topMargin = ref(null);//状态栏高度 @@ -150,9 +147,9 @@ const topMargin = ref(null);//状态栏高度
150 const musicheadHeight = ref(); 147 const musicheadHeight = ref();
151 const paging = ref(null) 148 const paging = ref(null)
152 const swiperImageList = ref([{ 149 const swiperImageList = ref([{
153 - image: 'https://tse2-mm.cn.bing.net/th/id/OIP-C.o6VdtT8EY8mHjzoX7qAlrQAAAA?w=261&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7' 150 + image: swiperImage1
154 }, { 151 }, {
155 - image: 'https://tse3-mm.cn.bing.net/th/id/OIP-C.LwNUQLX3A3PIJ0Rzm4ATOwHaEQ?w=304&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7', 152 + image: swiperImage2
156 }]) 153 }])
157 154
158 const userAddress = ref({}) 155 const userAddress = ref({})
@@ -310,19 +307,21 @@ const handleCleanClick = () =&gt; { @@ -310,19 +307,21 @@ const handleCleanClick = () =&gt; {
310 }); 307 });
311 } else { 308 } else {
312 // 用户已登录但是没有清运地址的情况 309 // 用户已登录但是没有清运地址的情况
313 - uni.showModal({  
314 - title: '',  
315 - content: '请先添加清运地址',  
316 - success: function (res) {  
317 - if (res.confirm) {  
318 - uni.$u.route({  
319 - url: `pages/home/address/index`,  
320 - })  
321 - } else if (res.cancel) {  
322 - console.log('用户点击取消'); 310 + if (userType.value == '用户') {
  311 + uni.showModal({
  312 + title: '',
  313 + content: prompt.value,
  314 + success: function (res) {
  315 + if (res.confirm) {
  316 + uni.$u.route({
  317 + url: `pages/home/address/index`,
  318 + })
  319 + } else if (res.cancel) {
  320 + console.log('用户点击取消');
  321 + }
323 } 322 }
324 - }  
325 - }); 323 + });
  324 + }
326 } 325 }
327 return 326 return
328 327
garbage-removal/src/pages/home/search/index.vue deleted 100644 → 0
1 -<template>  
2 - <view class="search-container">  
3 - <view class="search-box">  
4 - <u-search placeholder="请输入" :searchIconSize="40" :disabled="true" @click="handleSearchClick"  
5 - :showAction="false"></u-search>  
6 - </view>  
7 - </view>  
8 -</template>  
9 -  
10 -<script setup>  
11 -  
12 -</script>  
13 -  
14 -<style lang="scss" scoped></style>  
garbage-removal/src/pages/login/index.vue
@@ -44,7 +44,7 @@ import { userLogin } from &quot;@/apis/user.js&quot;; @@ -44,7 +44,7 @@ import { userLogin } from &quot;@/apis/user.js&quot;;
44 export default { 44 export default {
45 data() { 45 data() {
46 return { 46 return {
47 - tel: '18966667777', 47 + tel: '13222222222',
48 agree: [] 48 agree: []
49 } 49 }
50 }, 50 },
garbage-removal/src/pages/order/driver-home/detail/index.vue
@@ -120,12 +120,6 @@ @@ -120,12 +120,6 @@
120 处理信息 120 处理信息
121 </view> 121 </view>
122 <view v-if="putDownImages.length || putOnImages.length" style="width: 100%;"> 122 <view v-if="putDownImages.length || putOnImages.length" style="width: 100%;">
123 - <!-- <view class="order-detail-container-header-item">  
124 - <text class="order-detail-container-header-title">负责人:</text>  
125 - <view class="order-detail-container-header-content">  
126 - {{ dataGram.garOrderHandleName }}  
127 - </view>  
128 - </view> -->  
129 <view class="order-detail-container-header-item"> 123 <view class="order-detail-container-header-item">
130 <text class="order-detail-container-header-title">服务电话:</text> 124 <text class="order-detail-container-header-title">服务电话:</text>
131 <view class="order-detail-container-header-content"> 125 <view class="order-detail-container-header-content">
@@ -189,9 +183,6 @@ @@ -189,9 +183,6 @@
189 </view> 183 </view>
190 </view> 184 </view>
191 </view> 185 </view>
192 - <u-action-sheet :closeOnClickOverlay="true" :closeOnClickAction="false" @actionSheetClose="handleClose"  
193 - @submitFunction="submitFunction" @select="selectClick" :actions="list" round="15" title="取消订单" :show="cancelShow">  
194 - </u-action-sheet>  
195 </view> 186 </view>
196 <view v-if="showUQRcode" class="mask-container" @click="showUQRcode = false"> 187 <view v-if="showUQRcode" class="mask-container" @click="showUQRcode = false">
197 <uqrcode :h5SaveIsDownload="true" ref="qrCodeRef" canvas-id="qrcode" :value="qrCodeText" 188 <uqrcode :h5SaveIsDownload="true" ref="qrCodeRef" canvas-id="qrcode" :value="qrCodeText"
@@ -223,35 +214,6 @@ const cancelShow = ref(false) @@ -223,35 +214,6 @@ const cancelShow = ref(false)
223 const currentCancelName = ref("") 214 const currentCancelName = ref("")
224 const qrCodeRef = ref() 215 const qrCodeRef = ref()
225 const qrCodeText = ref() 216 const qrCodeText = ref()
226 -const list = computed(() => {  
227 - let reason = [  
228 - {  
229 - name: '订单信息填写有误',  
230 - },  
231 - {  
232 - name: '线下协商有问题',  
233 - },  
234 - {  
235 - name: '不需要清运了',  
236 - },  
237 - {  
238 - name: '其他',  
239 - },  
240 - {  
241 - name: '提交',  
242 - }  
243 - ]  
244 - if (userType.value === '用户') {  
245 - reason.unshift({  
246 - name: '长时间无人接单',  
247 - })  
248 - } else {  
249 - reason.unshift({  
250 - name: '无修改权限'  
251 - })  
252 - }  
253 - return reason  
254 -})  
255 217
256 // 创建二维码 218 // 创建二维码
257 const createQrCodeLocal = (orderId) => { 219 const createQrCodeLocal = (orderId) => {
@@ -345,35 +307,6 @@ const handlerJumpOtherApp = (latitude, longitude, garCoordinate) =&gt; { @@ -345,35 +307,6 @@ const handlerJumpOtherApp = (latitude, longitude, garCoordinate) =&gt; {
345 }) 307 })
346 } 308 }
347 309
348 -/**  
349 - * 提交取消订单  
350 - */  
351 -const submitFunction = (otherReason) => {  
352 - let reason = otherReason  
353 - if (currentCancelName.value != "其他") {  
354 - reason = currentCancelName.value  
355 - }  
356 - if (!reason) {  
357 - uni.$u.toast("请提供取消订单的原因")  
358 - return  
359 - }  
360 - let params = {  
361 - garOrderId: orderId.value,  
362 - garCancelFlag: 1,  
363 - garReason: reason  
364 - }  
365 - updateOrder(params).then(res => {  
366 - if (res.data.success) {  
367 - cancelShow.value = false  
368 - uni.$u.toast(res.data.data)  
369 - uni.$u.route({  
370 - type: "reLaunch",  
371 - url: `pages/order/index`,  
372 - })  
373 - }  
374 - })  
375 -}  
376 -  
377 const handleEvaluate = (orderId, userType) => { 310 const handleEvaluate = (orderId, userType) => {
378 uni.$u.route(`pages/order/other-home/evaluate/index?orderId=${orderId}&userType=${userType}`) 311 uni.$u.route(`pages/order/other-home/evaluate/index?orderId=${orderId}&userType=${userType}`)
379 } 312 }
@@ -400,16 +333,11 @@ const handleOrder = (orderId) =&gt; { @@ -400,16 +333,11 @@ const handleOrder = (orderId) =&gt; {
400 const driverHandleOrder = (orderId) => { 333 const driverHandleOrder = (orderId) => {
401 updateOrder({ garOrderId: orderId, handleType: 0 }).then(res => { 334 updateOrder({ garOrderId: orderId, handleType: 0 }).then(res => {
402 if (res.data.success) { 335 if (res.data.success) {
403 - if (res.data.data === "订单已经被别人接受啦") {  
404 - uni.$u.toast(res.data.data)  
405 - uni.$u.route({  
406 - type: "reLaunch",  
407 - url: `pages/order/index`,  
408 - })  
409 - } else {  
410 - uni.$u.toast(res.data.data)  
411 - handleOrderDetail(orderId)  
412 - } 336 + uni.$u.toast(res.data.data)
  337 + uni.$u.route({
  338 + type: "reLaunch",
  339 + url: `pages/order/index`,
  340 + })
413 } 341 }
414 }) 342 })
415 } 343 }
garbage-removal/src/pages/order/driver-home/swiper-list-item/index.vue
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 style="font-size: small;color: #f56c6c;">订单已经完成了。</text> --> 15 style="font-size: small;color: #f56c6c;">订单已经完成了。</text> -->
16 <view v-if="item.garOrderHandlerStatus === 0 && item.garCancelFlag === 0" class="right">待清运 </view> 16 <view v-if="item.garOrderHandlerStatus === 0 && item.garCancelFlag === 0" class="right">待清运 </view>
17 <view v-if="item.garOrderHandlerStatus === 1 && item.garCancelFlag === 0" class="right">清运中 </view> 17 <view v-if="item.garOrderHandlerStatus === 1 && item.garCancelFlag === 0" class="right">清运中 </view>
18 - <view v-if="item.garOrderHandlerStatus === 3 && userType === '清运车辆驾驶员'" class="right">已完成 </view> 18 + <view v-if="item.garOrderHandlerStatus === 3" class="right">已完成 </view>
19 </view> 19 </view>
20 </view> 20 </view>
21 <view class="item" @click="handleClick(item.garOrderId)"> 21 <view class="item" @click="handleClick(item.garOrderId)">
@@ -28,18 +28,9 @@ @@ -28,18 +28,9 @@
28 <view class="delivery-time">预约时间 {{ item.garOrderAgreementTime }}</view> 28 <view class="delivery-time">预约时间 {{ item.garOrderAgreementTime }}</view>
29 </view> 29 </view>
30 </view> 30 </view>
31 - <view class="bottom"  
32 - v-if="item.garOrderHandlerStatus === 0 && item.garCancelFlag === 0 && userType != '清运车辆驾驶员'">  
33 - <view class="more">  
34 - <!-- <u-icon name="more-dot-fill" color="rgb(203,203,203)"></u-icon> -->  
35 - </view>  
36 - </view>  
37 </view> 31 </view>
38 </view> 32 </view>
39 </z-paging> 33 </z-paging>
40 - <u-action-sheet :closeOnClickOverlay="true" :closeOnClickAction="false" @actionSheetClose="handleClose"  
41 - @submitFunction="submitFunction" @select="selectClick" :actions="list" round="15" title="取消订单" :show="cancelShow">  
42 - </u-action-sheet>  
43 </view> 34 </view>
44 </template> 35 </template>
45 36
@@ -62,40 +53,9 @@ const userType = computed(() =&gt; store.userType) @@ -62,40 +53,9 @@ const userType = computed(() =&gt; store.userType)
62 const currentCancelOrderId = ref(""); 53 const currentCancelOrderId = ref("");
63 const currentCancelName = ref(""); 54 const currentCancelName = ref("");
64 const cancelShow = ref(false) 55 const cancelShow = ref(false)
65 -const list = ref([  
66 - {  
67 - name: '长时间无人接单',  
68 - },  
69 - {  
70 - name: '订单信息填写有误',  
71 - },  
72 - {  
73 - name: '线下协商有问题',  
74 - },  
75 - {  
76 - name: '不需要清运了',  
77 - },  
78 - {  
79 - name: '其他',  
80 - },  
81 - {  
82 - name: '提交',  
83 - }  
84 -])  
85 const dataList = ref([]); 56 const dataList = ref([]);
86 const paging = ref(null); 57 const paging = ref(null);
87 const firstLoaded = ref(false) 58 const firstLoaded = ref(false)
88 -/**  
89 - * 取消订单  
90 - * @param {string} orderId  
91 - */  
92 -const handleCancelOrder = (orderId) => {  
93 - currentCancelOrderId.value = orderId  
94 - cancelShow.value = true  
95 -}  
96 -const handleClose = (e) => {  
97 - cancelShow.value = false  
98 -}  
99 59
100 /** 60 /**
101 * 跳转公司详情 61 * 跳转公司详情
garbage-removal/src/pages/order/handler-home/transport-detail/index.vue
@@ -100,17 +100,16 @@ @@ -100,17 +100,16 @@
100 <view class="space-box">{{ spaceStr }}</view> 100 <view class="space-box">{{ spaceStr }}</view>
101 </view> 101 </view>
102 <!-- 占位符 --> 102 <!-- 占位符 -->
103 - <view class="order-detail-bottom"> 103 + <view class="order-detail-bottom" v-if="dataGram.garOrderDisposalStatus === 1">
104 <view class="order-detail-bottom-box"> 104 <view class="order-detail-bottom-box">
105 - <view class=" order-detail-bottom-left">  
106 - </view> 105 + <u-button @click="handlerOrderSuccess(orderId)" shape="square" color="#19a97c" text="完成订单"></u-button>
107 </view> 106 </view>
108 </view> 107 </view>
109 </view> 108 </view>
110 </template> 109 </template>
111 110
112 <script setup> 111 <script setup>
113 -import { queryOrderTransportDetail } from '@/apis/order.js'; 112 +import { queryOrderTransportDetail, successOrder } from '@/apis/order.js';
114 import zStatic from '@/components/z-paging/js/z-paging-static'; 113 import zStatic from '@/components/z-paging/js/z-paging-static';
115 import { onLoad, onShow } from '@dcloudio/uni-app'; 114 import { onLoad, onShow } from '@dcloudio/uni-app';
116 import { ref } from 'vue'; 115 import { ref } from 'vue';
@@ -132,6 +131,27 @@ const goTransportDetail = (val) =&gt; { @@ -132,6 +131,27 @@ const goTransportDetail = (val) =&gt; {
132 }) 131 })
133 } 132 }
134 133
  134 +const handlerOrderSuccess = (orderId) => {
  135 + // 提示
  136 + uni.showModal({
  137 + title: '提示',
  138 + content: '是否确认完成订单?',
  139 + success: function (res) {
  140 + if (res.confirm) {
  141 + // 确认
  142 + handlerOrderSuccessIn(orderId)
  143 + }
  144 + }
  145 + })
  146 +}
  147 +const handlerOrderSuccessIn = (orderId) => {
  148 + successOrder({ garOrderId: orderId }).then(res => {
  149 + //返回上一个页面
  150 + uni.navigateBack({
  151 + delta: 1
  152 + })
  153 + })
  154 +}
135 const handleOrderDetail = (orderId) => { 155 const handleOrderDetail = (orderId) => {
136 queryOrderTransportDetail(orderId).then(res => { 156 queryOrderTransportDetail(orderId).then(res => {
137 dataGram.value = res.data.data; 157 dataGram.value = res.data.data;
@@ -340,4 +360,47 @@ $custom-bottom-height: 200rpx; @@ -340,4 +360,47 @@ $custom-bottom-height: 200rpx;
340 align-items: center; 360 align-items: center;
341 justify-content: center; 361 justify-content: center;
342 } 362 }
  363 +
  364 +.order-detail-bottom {
  365 + position: absolute;
  366 + width: 100%;
  367 + // height: 100%;
  368 + bottom: 0;
  369 + left: 0;
  370 +
  371 + .movableAreaDetail {
  372 + pointer-events: none;
  373 + position: fixed;
  374 + left: 0;
  375 + top: 0;
  376 + width: 100%;
  377 + height: calc(100% - $custom-bottom-height);
  378 + z-index: 999;
  379 +
  380 + .movableView {
  381 + pointer-events: auto;
  382 + min-height: 60rpx;
  383 + min-width: 60rpx;
  384 +
  385 + .order-detail-call-box-container {
  386 + min-height: 60rpx;
  387 + min-width: 60rpx;
  388 + display: flex;
  389 + align-items: center;
  390 + justify-content: center;
  391 + background-color: #19a97c;
  392 + border-radius: 100%;
  393 + }
  394 + }
  395 + }
  396 +
  397 + .order-detail-bottom-box {
  398 + height: $custom-bottom-height;
  399 + padding: 50rpx;
  400 + box-sizing: border-box;
  401 + display: flex;
  402 + justify-content: space-between;
  403 + align-items: center;
  404 + }
  405 +}
343 </style> 406 </style>
garbage-removal/src/pages/order/other-home/detail/index.vue
@@ -193,7 +193,8 @@ @@ -193,7 +193,8 @@
193 <view class=" order-detail-bottom-left"> 193 <view class=" order-detail-bottom-left">
194 <u-button v-if="dataGram.garOrderHandlerStatus === 0 && userType == '运输企业负责人' && dataGram.garCancelFlag === 0" 194 <u-button v-if="dataGram.garOrderHandlerStatus === 0 && userType == '运输企业负责人' && dataGram.garCancelFlag === 0"
195 @click="handleOderCancelClick()" shape="square" color="#19a97c" text="取消订单"></u-button> 195 @click="handleOderCancelClick()" shape="square" color="#19a97c" text="取消订单"></u-button>
196 - <u-button v-if="dataGram.garOrderScanHandlerFlag === 0 && userType == '用户' && dataGram.garCancelFlag === 0" 196 + <u-button
  197 + v-if="dataGram.garOrderScanHandlerFlag === 0 && userType == '用户' && dataGram.garOrderHandlerStatus != 3"
197 @click="handlerUpdateOrderClick()" shape="square" color="#19a97c" text="修改车辆信息"></u-button> 198 @click="handlerUpdateOrderClick()" shape="square" color="#19a97c" text="修改车辆信息"></u-button>
198 <u-button v-if="dataGram.garOrderHandlerStatus === 1 && userType == '运输企业负责人'" 199 <u-button v-if="dataGram.garOrderHandlerStatus === 1 && userType == '运输企业负责人'"
199 @click="handleOrderDispatchClick(orderId)" shape="square" color="#19a97c" text="分配驾驶员"></u-button> 200 @click="handleOrderDispatchClick(orderId)" shape="square" color="#19a97c" text="分配驾驶员"></u-button>
@@ -292,10 +293,6 @@ const list = computed(() =&gt; { @@ -292,10 +293,6 @@ const list = computed(() =&gt; {
292 reason.unshift({ 293 reason.unshift({
293 name: '长时间无人接单', 294 name: '长时间无人接单',
294 }) 295 })
295 - } else {  
296 - reason.unshift({  
297 - name: '无修改权限'  
298 - })  
299 } 296 }
300 return reason 297 return reason
301 }) 298 })
garbage-removal/src/pages/order/other-home/swiper-list-item/index.vue
@@ -17,6 +17,8 @@ @@ -17,6 +17,8 @@
17 </view> 17 </view>
18 <view v-if="item.garEvaluateFlag === 0 && userType === '用户'" class="right">待评价 18 <view v-if="item.garEvaluateFlag === 0 && userType === '用户'" class="right">待评价
19 </view> 19 </view>
  20 + <view v-if="item.garTimeOutFlag === 1" class="right" style="color: red;">超时取消
  21 + </view>
20 <view v-if="item.garHandlerEvaluateFlag === 0 && userType === '运输企业负责人'" class="right">待评价 22 <view v-if="item.garHandlerEvaluateFlag === 0 && userType === '运输企业负责人'" class="right">待评价
21 </view> 23 </view>
22 <view v-if="item.garEvaluateFlag === 1 && userType === '用户'" class="right">已评价 24 <view v-if="item.garEvaluateFlag === 1 && userType === '用户'" class="right">已评价
@@ -88,26 +90,31 @@ const userType = computed(() =&gt; store.userType) @@ -88,26 +90,31 @@ const userType = computed(() =&gt; store.userType)
88 const currentCancelOrderId = ref(""); 90 const currentCancelOrderId = ref("");
89 const currentCancelName = ref(""); 91 const currentCancelName = ref("");
90 const cancelShow = ref(false) 92 const cancelShow = ref(false)
91 -const list = ref([  
92 - {  
93 - name: '长时间无人接单',  
94 - },  
95 - {  
96 - name: '订单信息填写有误',  
97 - },  
98 - {  
99 - name: '线下协商有问题',  
100 - },  
101 - {  
102 - name: '不需要清运了',  
103 - },  
104 - {  
105 - name: '其他',  
106 - },  
107 - {  
108 - name: '提交', 93 +const list = computed(() => {
  94 + let reason = [
  95 + {
  96 + name: '订单信息填写有误',
  97 + },
  98 + {
  99 + name: '线下协商有问题',
  100 + },
  101 + {
  102 + name: '不需要清运了',
  103 + },
  104 + {
  105 + name: '其他',
  106 + },
  107 + {
  108 + name: '提交',
  109 + }
  110 + ]
  111 + if (userType.value === '用户') {
  112 + reason.unshift({
  113 + name: '长时间无人接单',
  114 + })
109 } 115 }
110 -]) 116 + return reason
  117 +})
111 const dataList = ref([]); 118 const dataList = ref([]);
112 const paging = ref(null); 119 const paging = ref(null);
113 const firstLoaded = ref(false) 120 const firstLoaded = ref(false)
garbage-removal/src/pages/order/other-home/user-message/index.vue
@@ -5,12 +5,12 @@ @@ -5,12 +5,12 @@
5 <u-button color="#19a97c" size="mini" @click="handlerReadAllClick">全部删除</u-button> 5 <u-button color="#19a97c" size="mini" @click="handlerReadAllClick">全部删除</u-button>
6 </view> 6 </view>
7 </view> 7 </view>
8 - <z-paging ref="paging" v-model="messageList" :fixed="false" @query="queryList"> 8 + <z-paging ref="paging" v-model="messageList" :scrollable="false" :fixed="false" @query="queryList">
9 <empty-view slot:empty></empty-view> 9 <empty-view slot:empty></empty-view>
10 <view class="message-list-item" v-for="(item, index) in messageList" :key="item.id"> 10 <view class="message-list-item" v-for="(item, index) in messageList" :key="item.id">
11 <view class="message-list-item-main"> 11 <view class="message-list-item-main">
12 <view class="message-list-item-main-content"> 12 <view class="message-list-item-main-content">
13 - {{ item.garContent }} 13 + <text selectable='true'>{{ item.garContent }}</text>
14 </view> 14 </view>
15 <u-icon name="close-circle" @click="handlerReadClick(item.garId)" color="red"></u-icon> 15 <u-icon name="close-circle" @click="handlerReadClick(item.garId)" color="red"></u-icon>
16 </view> 16 </view>
@@ -83,14 +83,18 @@ onLoad(() =&gt; { @@ -83,14 +83,18 @@ onLoad(() =&gt; {
83 .message-container { 83 .message-container {
84 width: 100%; 84 width: 100%;
85 height: 100%; 85 height: 100%;
  86 + background-color: white;
86 box-sizing: border-box; 87 box-sizing: border-box;
87 - background: linear-gradient(to bottom, #19a97c, $u-bg-color, $u-bg-color, $u-bg-color, $u-bg-color, $u-bg-color, $u-bg-color);  
88 88
89 .message-list-item { 89 .message-list-item {
90 - line-height: 80rpx; 90 + margin: 20rpx 0;
91 padding: 20rpx; 91 padding: 20rpx;
92 box-sizing: border-box; 92 box-sizing: border-box;
93 - 93 + color: $u-tips-color;
  94 + font-size: 23rpx;
  95 + line-height: 30rpx;
  96 + padding: 15rpx;
  97 + word-break: break-all;
94 98
95 .message-list-item-main { 99 .message-list-item-main {
96 display: flex; 100 display: flex;
garbage-removal/src/static/image/freecompress-swiper-1.png 0 → 100644

8.79 KB

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

15 KB

garbage-removal/src/uview-plus/components/u-picker-column/u-picker-column.vue
@@ -7,23 +7,23 @@ @@ -7,23 +7,23 @@
7 </template> 7 </template>
8 8
9 <script> 9 <script>
10 - import props from './props.js';  
11 - import mpMixin from '../../libs/mixin/mpMixin.js';  
12 - import mixin from '../../libs/mixin/mixin.js';  
13 - /**  
14 - * PickerColumn  
15 - * @description  
16 - * @tutorial url  
17 - * @property {String}  
18 - * @event {Function}  
19 - * @example  
20 - */  
21 - export default {  
22 - name: 'u-picker-column',  
23 - mixins: [mpMixin, mixin, props],  
24 - } 10 +import mixin from '../../libs/mixin/mixin.js';
  11 +import mpMixin from '../../libs/mixin/mpMixin.js';
  12 +import props from './props.js';
  13 +/**
  14 + * PickerColumn
  15 + * @description
  16 + * @tutorial url
  17 + * @property {String}
  18 + * @event {Function}
  19 + * @example
  20 + */
  21 +export default {
  22 + name: 'u-picker-column',
  23 + mixins: [mpMixin, mixin, props],
  24 +}
25 </script> 25 </script>
26 26
27 <style lang="scss" scoped> 27 <style lang="scss" scoped>
28 - @import "../../libs/css/components.scss"; 28 +@import "../../libs/css/components.scss";
29 </style> 29 </style>
garbage-removal/src/uview-plus/components/u-picker/u-picker.vue
@@ -5,15 +5,15 @@ @@ -5,15 +5,15 @@
5 :confirmText="confirmText" :title="title" @cancel="cancel" @confirm="confirm"></u-toolbar> 5 :confirmText="confirmText" :title="title" @cancel="cancel" @confirm="confirm"></u-toolbar>
6 <picker-view class="u-picker__view" :indicatorStyle="`height: ${$u.addUnit(itemHeight)}`" :value="innerIndex" 6 <picker-view class="u-picker__view" :indicatorStyle="`height: ${$u.addUnit(itemHeight)}`" :value="innerIndex"
7 :immediateChange="immediateChange" :style="{ 7 :immediateChange="immediateChange" :style="{
8 - height: `${$u.addUnit(visibleItemCount * itemHeight)}`  
9 - }" @change="changeHandler"> 8 + height: `${$u.addUnit(visibleItemCount * itemHeight)}`
  9 + }" @change="changeHandler">
10 <picker-view-column v-for="(item, index) in innerColumns" :key="index" class="u-picker__view__column"> 10 <picker-view-column v-for="(item, index) in innerColumns" :key="index" class="u-picker__view__column">
11 <text v-if="$u.test.array(item)" class="u-picker__view__column__item u-line-1" v-for="(item1, index1) in item" 11 <text v-if="$u.test.array(item)" class="u-picker__view__column__item u-line-1" v-for="(item1, index1) in item"
12 :key="index1" :style="{ 12 :key="index1" :style="{
13 - height: $u.addUnit(itemHeight),  
14 - lineHeight: $u.addUnit(itemHeight),  
15 - fontWeight: index1 === innerIndex[index] ? 'bold' : 'normal'  
16 - }">{{ getItemText(item1) }}</text> 13 + height: $u.addUnit(itemHeight),
  14 + lineHeight: $u.addUnit(itemHeight),
  15 + fontWeight: index1 === innerIndex[index] ? 'bold' : 'normal'
  16 + }">{{ getItemText(item1) }}</text>
17 </picker-view-column> 17 </picker-view-column>
18 </picker-view> 18 </picker-view>
19 <view v-if="loading" class="u-picker--loading"> 19 <view v-if="loading" class="u-picker--loading">