Commit f654f8b4af701087bc1b50c6e9a60fcf7d5de434

Authored by guzijian
1 parent 653fd743

feat: 小程序包

Showing 34 changed files with 374 additions and 276 deletions
garbage-removal/src/components/address-popup/address-popup.vue
... ... @@ -125,10 +125,10 @@ const handlerAddressChange = (val) => {
125 125 currentAddressChange();
126 126 }
127 127 const handlerAddAddress = () => {
128   - uni.$u.route('pages/home/address/addSite')
  128 + uni.$u.route('pages/home-info/address/addSite')
129 129 }
130 130 const handlerUpdateAddress = (val) => {
131   - uni.$u.route(`pages/home/address/addSite?addressObj=${JSON.stringify(val)}`)
  131 + uni.$u.route(`pages/home-info/address/addSite?addressObj=${JSON.stringify(val)}`)
132 132 }
133 133 const handlerDeleteAddress = async (val) => {
134 134 if (addressList.value.length > 1) {
... ...
garbage-removal/src/manifest.json
... ... @@ -50,6 +50,7 @@
50 50 "quickapp" : {},
51 51 /* 小程序特有相关 */
52 52 "mp-weixin" : {
  53 + "optimization":{"subPackages":true},
53 54 "lazyCodeLoading" : "requiredComponents",
54 55 "requiredPrivateInfos": ["getLocation", "chooseLocation"],
55 56 "appid" : "wxc3f60667dc9d6cea",
... ...
garbage-removal/src/pages.json
... ... @@ -11,18 +11,8 @@
11 11 "path": "pages/home/index",
12 12 "style": {
13 13 "navigationBarTitleText": "",
14   - /** h5*/
15   - // "navigationBarBackgroundColor": "transparent",
16   - /** 小程序*/
17 14 "navigationStyle":"custom",
18   - "navigationBarBackgroundColorr":"#ffffff00"
19   - /** App */
20   - // "app-plus": {
21   - // "titleNView": {
22   - // "type": "float",
23   - // "titleText": ""
24   - // }
25   - // }
  15 + "navigationBarBackgroundColor":"#ffffff00"
26 16 }
27 17 },
28 18 {
... ... @@ -32,45 +22,101 @@
32 22 }
33 23 },
34 24 {
35   - "path": "pages/order/handler-home/transport-detail/index",
  25 + "path": "pages/login/index",
36 26 "style": {
37   - "navigationBarTitleText": "收运单详情",
38   - "enablePullDownRefresh": false,
  27 + "navigationBarTitleText": "装饰装修垃圾智慧功能模块登录",
  28 + "enablePullDownRefresh": false
  29 + }
  30 + },{
  31 + "path": "pages/login/code",
  32 + "style": {
  33 + "navigationBarTitleText": "输入验证码",
  34 + "enablePullDownRefresh": false
  35 + }
  36 + },{
  37 + "path": "pages/order/index",
  38 + "style": {
  39 + "navigationBarTitleText": "",
  40 + "navigationStyle":"custom",
  41 + "enablePullDownRefresh": false
  42 + }
  43 + },{
  44 + "path": "pages/wode/index",
  45 + "style": {
  46 + "navigationBarTitleText": "个人信息",
  47 + "navigationBarTextStyle":"white",
39 48 "navigationBarBackgroundColor":"#19a97c",
40   - "navigationBarTextStyle": "white"
  49 + "enablePullDownRefresh": false
  50 + }
  51 + }
  52 + ],
  53 + "subPackages":[{
  54 + "root":"pages/home-info",
  55 + "pages":[
  56 + {
  57 + "path": "clean/company-detail/index",
  58 + "style": {
  59 + "navigationBarTitleText": "公司信息",
  60 + "enablePullDownRefresh": false
41 61 }
42 62 },
43 63 {
44   - "path": "pages/order/handler-home/scan-detail/index",
  64 + "path": "clean/index",
45 65 "style": {
46   - "navigationBarTitleText": "收运单扫描",
47   - "enablePullDownRefresh": false,
48   - "navigationBarBackgroundColor":"#19a97c",
49   - "navigationBarTextStyle": "white"
  66 + "navigationBarTitleText": "装修垃圾",
  67 + "enablePullDownRefresh": false
50 68 }
51 69 },
52 70 {
53   - "path": "pages/login/index",
  71 + "path": "address/index",
54 72 "style": {
55   - "navigationBarTitleText": "装饰装修垃圾智慧功能模块登录",
  73 + "navigationBarTitleText": "清运地址",
  74 + "navigationBarTextStyle":"white",
  75 + "navigationBarBackgroundColor":"#19a97c",
56 76 "enablePullDownRefresh": false
57 77 }
58   - },{
59   - "path": "pages/login/code",
  78 + },
  79 + {
  80 + "path": "address/addSite",
60 81 "style": {
61   - "navigationBarTitleText": "输入验证码",
  82 + "navigationBarTitleText": "清运地址",
  83 + "navigationBarTextStyle":"white",
  84 + "navigationBarBackgroundColor":"#19a97c",
62 85 "enablePullDownRefresh": false
63 86 }
64 87 },{
65   - "path": "pages/order/other-home/detail/index",
  88 + "path": "user-guide/index",
66 89 "style": {
67   - "navigationBarTitleText": "订单详情",
  90 + "navigationBarTitleText": "用户指南",
68 91 "navigationBarTextStyle": "white",
69 92 "navigationBarBackgroundColor": "#19a97c",
70 93 "enablePullDownRefresh": false
71 94 }
  95 + }
  96 + ]
  97 + },{
  98 + "root":"pages/order-info",
  99 + "pages":[
  100 +
  101 + {
  102 + "path": "order-handler/transport-detail/index",
  103 + "style": {
  104 + "navigationBarTitleText": "收运单详情",
  105 + "enablePullDownRefresh": false,
  106 + "navigationBarBackgroundColor":"#19a97c",
  107 + "navigationBarTextStyle": "white"
  108 + }
  109 + },
  110 + {
  111 + "path": "order-handler/scan-detail/index",
  112 + "style": {
  113 + "navigationBarTitleText": "收运单扫描",
  114 + "enablePullDownRefresh": false,
  115 + "navigationBarBackgroundColor":"#19a97c",
  116 + "navigationBarTextStyle": "white"
  117 + }
72 118 },{
73   - "path": "pages/order/driver-home/detail/index",
  119 + "path": "order-other/detail/index",
74 120 "style": {
75 121 "navigationBarTitleText": "订单详情",
76 122 "navigationBarTextStyle": "white",
... ... @@ -78,31 +124,31 @@
78 124 "enablePullDownRefresh": false
79 125 }
80 126 },{
81   - "path": "pages/order/other-home/success/index",
  127 + "path": "order-driver/detail/index",
82 128 "style": {
83   - "navigationBarTitleText": "完成订单",
  129 + "navigationBarTitleText": "订单详情",
84 130 "navigationBarTextStyle": "white",
85 131 "navigationBarBackgroundColor": "#19a97c",
86 132 "enablePullDownRefresh": false
87 133 }
88 134 },{
89   - "path": "pages/order/other-home/guest/index",
  135 + "path": "order-other/success/index",
90 136 "style": {
91   - "navigationBarTitleText": "详情",
  137 + "navigationBarTitleText": "完成订单",
92 138 "navigationBarTextStyle": "white",
93 139 "navigationBarBackgroundColor": "#19a97c",
94 140 "enablePullDownRefresh": false
95 141 }
96 142 },{
97   - "path": "pages/home/user-guide/index",
  143 + "path": "order-other/guest/index",
98 144 "style": {
99   - "navigationBarTitleText": "用户指南",
  145 + "navigationBarTitleText": "详情",
100 146 "navigationBarTextStyle": "white",
101 147 "navigationBarBackgroundColor": "#19a97c",
102 148 "enablePullDownRefresh": false
103 149 }
104 150 },{
105   - "path": "pages/order/driver-home/upload/index",
  151 + "path": "order-driver/upload/index",
106 152 "style": {
107 153 "navigationBarTitleText": "上传照片",
108 154 "navigationBarTextStyle": "white",
... ... @@ -110,7 +156,7 @@
110 156 "enablePullDownRefresh": false
111 157 }
112 158 },{
113   - "path": "pages/order/other-home/evaluate-info/index",
  159 + "path": "order-other/evaluate-info/index",
114 160 "style": {
115 161 "navigationBarTitleText": "评价详情",
116 162 "navigationBarTextStyle": "white",
... ... @@ -118,7 +164,7 @@
118 164 "enablePullDownRefresh": false
119 165 }
120 166 },{
121   - "path": "pages/order/other-home/evaluate/index",
  167 + "path": "order-other/evaluate/index",
122 168 "style": {
123 169 "navigationBarTitleText": "写评价",
124 170 "navigationBarTextStyle": "white",
... ... @@ -126,62 +172,16 @@
126 172 "enablePullDownRefresh": false
127 173 }
128 174 },{
129   - "path": "pages/order/other-home/user-message/index",
  175 + "path": "order-other/user-message/index",
130 176 "style": {
131 177 "navigationBarTitleText": "消息列表",
132 178 "navigationBarTextStyle": "white",
133 179 "navigationBarBackgroundColor": "#19a97c",
134 180 "enablePullDownRefresh": false
135 181 }
136   - },
137   - {
138   - "path": "pages/home/clean/company-detail/index",
139   - "style": {
140   - "navigationBarTitleText": "公司信息",
141   - "enablePullDownRefresh": false
142   - }
143   - },
144   - {
145   - "path": "pages/home/clean/index",
146   - "style": {
147   - "navigationBarTitleText": "装修垃圾",
148   - "enablePullDownRefresh": false
149   - }
150   - },
151   - {
152   - "path": "pages/home/address/index",
153   - "style": {
154   - "navigationBarTitleText": "清运地址",
155   - "navigationBarTextStyle":"white",
156   - "navigationBarBackgroundColor":"#19a97c",
157   - "enablePullDownRefresh": false
158   - }
159   - },
160   - {
161   - "path": "pages/home/address/addSite",
162   - "style": {
163   - "navigationBarTitleText": "清运地址",
164   - "navigationBarTextStyle":"white",
165   - "navigationBarBackgroundColor":"#19a97c",
166   - "enablePullDownRefresh": false
167   - }
168   - },{
169   - "path": "pages/order/index",
170   - "style": {
171   - "navigationBarTitleText": "",
172   - "navigationStyle":"custom",
173   - "enablePullDownRefresh": false
174   - }
175   - },{
176   - "path": "pages/wode/index",
177   - "style": {
178   - "navigationBarTitleText": "个人信息",
179   - "navigationBarTextStyle":"white",
180   - "navigationBarBackgroundColor":"#19a97c",
181   - "enablePullDownRefresh": false
182   - }
183 182 }
184   - ],
  183 + ]
  184 + }],
185 185 "tabBar": {
186 186 "color": "#7A7E83",
187 187 "selectedColor": "#19a97c",
... ...
garbage-removal/src/pages/home/address/addSite.vue renamed to garbage-removal/src/pages/home-info/address/addSite.vue
... ... @@ -142,7 +142,7 @@ const jumpAddressList = () => {
142 142 reset();
143 143 uni.$u.route({
144 144 type: 'navigateBack',
145   - url: `pages/home/address/index`,
  145 + url: `pages/home-info/address/index`,
146 146 })
147 147 }
148 148  
... ...
garbage-removal/src/pages/home/address/citySelect/u-city-select.vue renamed to garbage-removal/src/pages/home-info/address/citySelect/u-city-select.vue
garbage-removal/src/pages/home/address/index.vue renamed to garbage-removal/src/pages/home-info/address/index.vue
... ... @@ -44,7 +44,7 @@ const getData = () => {
44 44 const handleUpdateAddress = (res) => {
45 45 let addressObj = JSON.stringify(res);
46 46 uni.navigateTo({
47   - url: `/pages/home/address/addSite?addressObj=${addressObj}`
  47 + url: `/pages/home-info/address/addSite?addressObj=${addressObj}`
48 48 });
49 49 }
50 50  
... ... @@ -70,7 +70,7 @@ const handleClickChangeCurrentAddress = (res) => {
70 70  
71 71 const toAddSite = () => {
72 72 uni.navigateTo({
73   - url: '/pages/home/address/addSite'
  73 + url: '/pages/home-info/address/addSite'
74 74 });
75 75 }
76 76 onShow(() => {
... ...
garbage-removal/src/pages/home/clean/company-detail/index.vue renamed to garbage-removal/src/pages/home-info/clean/company-detail/index.vue
... ... @@ -87,7 +87,7 @@
87 87 <view class="company-bottom-button-right">
88 88 <u-button v-if="userType == '用户'" icon="car-fill" :custom-style="customStyle"
89 89 @click="handleCleanGarbage(companyInfo, tel, userAddress)" type="success" :hairline="true" size="normal"
90   - shape="circle" text="垃圾清运"></u-button>
  90 + shape="circle" text="预约清运"></u-button>
91 91 </view>
92 92 </view>
93 93 </view>
... ... @@ -99,7 +99,7 @@ import { queryEnterpriseById } from &#39;@/apis/company.js&#39;;
99 99 import { useMainStore } from "@/stores/index.js";
100 100 import { onLoad } from '@dcloudio/uni-app';
101 101 import { computed, ref } from 'vue';
102   -const mainStore = useMainStore()
  102 +const mainStore = useMainStore();
103 103 const userType = computed(() => mainStore.userType)
104 104 const baseDataList = ref([{ label: '法人' }, { label: '负责人' }, { label: '业务联系电话' }, { label: '道路运输许可证' }, { label: '核准有效期' }, { label: '注册地址' }]);
105 105 const customStyle = ref({
... ... @@ -159,7 +159,7 @@ onLoad((options) =&gt; {
159 159  
160 160 const handleCleanGarbage = (companyObj, tel, userAddress) => {
161 161 uni.$u.route({
162   - url: `pages/home/clean/index?companyObj=${JSON.stringify(companyObj)}&tel=${tel}&userAddress=${JSON.stringify(userAddress)}`,
  162 + url: `pages/home-info/clean/index?companyObj=${JSON.stringify(companyObj)}&tel=${tel}&userAddress=${JSON.stringify(userAddress)}`,
163 163 })
164 164 }
165 165 const handlerClickJumpMap = () => {
... ...
garbage-removal/src/pages/home/clean/index.vue renamed to garbage-removal/src/pages/home-info/clean/index.vue
... ... @@ -3,9 +3,6 @@
3 3 <address-popup ref="addressPopupRef" @currentChange="currentChange"></address-popup>
4 4 <liu-delivery-time :isMask="true" :change="changeTime" ref="chooseTime" title="请选择预约时间">
5 5 </liu-delivery-time>
6   - <u-picker closeOnClickOverlay :show="garbageTypeShowFlag" :columns="garbageTypeList" :itemHeight="100"
7   - @confirm="handlePickerGarbageTypeConfirm" @close="handleGarbageTypeClick(false)"
8   - @cancel="handleGarbageTypeClick(false)"></u-picker>
9 6 </view>
10 7 <view class="company-clean-container">
11 8 <view class="company-clean-container-box">
... ... @@ -143,13 +140,6 @@
143 140 </view>
144 141 </view>
145 142 <view class="company-clean-bottom" style="z-index: 10074;">
146   - <movable-area v-if="!carPopupShowFlag" ref="movableAreaElement" class="movableArea">
147   - <movable-view class="movableView" :x="x" :y="y" direction="all" @change="onChange">
148   - <view class="company-clean-call-box-container">
149   - <u-icon @click="handleContactClick(tel)" name="phone-fill" color="#ffffff" size="50"></u-icon>
150   - </view>
151   - </movable-view>
152   - </movable-area>
153 143 <view class="company-clean-bottom-box">
154 144 <view class="company-clean-bottom-left">
155 145 <view class="company-clean-bottom-left-icon">
... ... @@ -164,6 +154,13 @@
164 154 </view>
165 155 </view>
166 156 </view>
  157 + <view v-if="!carPopupShowFlag" ref="movableAreaElement" class="movableArea">
  158 + <view class="movableView" direction="all" @change="onChange">
  159 + <view class="company-clean-call-box-container">
  160 + <u-icon @click.stop="handleContactClick(tel)" name="phone-fill" color="#ffffff" size="50"></u-icon>
  161 + </view>
  162 + </view>
  163 + </view>
167 164 </view>
168 165 </template>
169 166  
... ... @@ -179,7 +176,7 @@ import changeAddressUrl from &#39;@/static/image/change-address.png&#39;;
179 176 import garbageUrl from '@/static/image/garbage.png';
180 177 import { useMainStore } from '@/stores/index.js';
181 178 import { onLoad } from '@dcloudio/uni-app';
182   -import { computed, getCurrentInstance, nextTick, ref, watch } from 'vue';
  179 +import { computed, getCurrentInstance, ref, watch } from 'vue';
183 180 const { proxy } = getCurrentInstance();
184 181 const store = useMainStore();
185 182 const userType = computed(() => store.userType)
... ... @@ -202,6 +199,7 @@ const userAddress = ref({
202 199 garLongitude: "",
203 200 garLatitude: "",
204 201 })
  202 +const isCallBtn = ref(false);
205 203 // 车辆信息
206 204 const garCarInfoList = ref({})
207 205 const garCarLabelInfoList = ref({})
... ... @@ -213,7 +211,6 @@ const garCarTransportInfo = computed(() =&gt; {
213 211 let boxLength = lengthWidthHeight[0]; // 箱子的长度(单位:米)
214 212 let boxWidth = lengthWidthHeight[1]; // 箱子的宽度(单位:米)
215 213 let boxHeight = lengthWidthHeight[2]; // 箱子的高度(单位:米)
216   - console.log(boxLength, boxWidth, boxHeight);
217 214 let bagLength = 0.75; // 袋子的长度(单位:米)
218 215 let bagWidth = 0.45; // 袋子的宽度(单位:米)
219 216 let bagHeight = 0.16; // 袋子的高度(单位:米)
... ... @@ -222,7 +219,6 @@ const garCarTransportInfo = computed(() =&gt; {
222 219 let bagVolume = bagLength * bagWidth * bagHeight; // 袋子的体积(单位:立方米)
223 220  
224 221 let bagCount = Math.floor(boxVolume / bagVolume); // 箱子可以容纳的袋子数量(向下取整)
225   - console.log(bagCount, boxVolume, bagVolume);
226 222 return `箱体长${boxLength}m宽${boxWidth}m高${boxHeight}m,最多课容纳约${bagCount}袋袋装修垃圾(${bagLength * 100}cm * ${bagWidth * 100}cm每袋)。`
227 223 } catch (error) {
228 224 return "符合装修垃圾运输管理规范的专用运输车辆。"
... ... @@ -235,10 +231,8 @@ const garCarNumberCount = computed(() =&gt; {
235 231 for (const key in garCarInfoList.value) {
236 232 const element = garCarInfoList.value[key];
237 233 count = typeof element.garOrderCarNumber === 'number' ? count + element.garOrderCarNumber : count;
238   - console.log(element.garOrderCarNumber instanceof Number);
239 234 }
240 235 }
241   - console.log(count);
242 236 return count;
243 237 })
244 238 const garbageTypeList = ref(["装修垃圾", "建筑垃圾"])
... ... @@ -272,11 +266,6 @@ const changeAgree = (e) =&gt; {
272 266 paramFrom.value.sureReadFlag[0] = !paramFrom.value.sureReadFlag[0]
273 267 }
274 268 const onChange = (e) => {
275   - // console.log(e);
276   -}
277   -
278   -const handlePopupClick = (val) => {
279   - carPopupShowFlag.value = val
280 269 }
281 270  
282 271 /**
... ... @@ -289,22 +278,17 @@ onLoad((options) =&gt; {
289 278 const initOptions = async (options) => {
290 279 companyObj.value = JSON.parse(options.companyObj);
291 280 tel.value = options.tel;
292   - if (options.userAddress == 'undefined') {
293   - await queryAddress('CURRENT').then(res => {
294   - try {
295   - if (res.data.data && res.data.data[0]) {
296   - console.log(res);
297   - userAddress.value = res.data.data[0] ? res.data.data[0] : {}
298   - } else {
299   - userAddress.value = {};
300   - }
301   - } catch (error) {
  281 + await queryAddress('CURRENT').then(res => {
  282 + try {
  283 + if (res.data.data && res.data.data[0]) {
  284 + userAddress.value = res.data.data[0] ? res.data.data[0] : {}
  285 + } else {
302 286 userAddress.value = {};
303 287 }
304   - })
305   - } else {
306   - userAddress.value = JSON.parse(options.userAddress);
307   - }
  288 + } catch (error) {
  289 + userAddress.value = {};
  290 + }
  291 + })
308 292 if (!userAddress.value.garLongitude) {
309 293 uni.$u.toast("请设置清运地址!")
310 294 // 返回上级
... ... @@ -336,23 +320,17 @@ const initOptions = async (options) =&gt; {
336 320 }
337 321  
338 322 const handleInCarClick = (val) => {
339   - // console.log(val);
340   - // console.log(paramFrom.value.garInCarStore);
341 323 // paramFrom.value.garInCarStore = !paramFrom.value.garInCarStore
342 324 }
343   -
344   -const handleCarInfoClick = (val) => {
345   - carTypeShowFlag.value = val
346   -}
347   -const handleGarbageTypeClick = (val) => {
348   - garbageTypeShowFlag.value = val
349   -}
350 325 /**
351 326 * 拨打电话回调
352 327 */
353 328 const handleContactClick = (val) => {
354   - uni.makePhoneCall({ phoneNumber: val }).then(res => {
355   - }).catch(err => { });
  329 + console.log("点击了电话");
  330 + if (isCallBtn.value) {
  331 + uni.makePhoneCall({ phoneNumber: val }).then(res => {
  332 + }).catch(err => { });
  333 + }
356 334 }
357 335  
358 336 // 删除图片
... ... @@ -396,16 +374,16 @@ const handlePickerGarbageTypeConfirm = (e) =&gt; {
396 374 garbageTypeShowFlag.value = false
397 375 }
398 376 const handlePickerCarInfoConfirm = (e) => {
399   - console.log(e);
400 377 paramFrom.value.carType = e
401 378 garCarLabelInfoNow.value = garCarLabelInfoList.value[paramFrom.value.carType]
402 379 carTypeShowFlag.value = false
403 380 }
404 381  
  382 +const orderClick = ref(true)
405 383 /**
406 384 * 处理下单
407 385 */
408   -const handleOderSure = () => {
  386 +const handleOderSure = async () => {
409 387 let garCarInfos = [];
410 388 for (const key in garCarInfoList.value) {
411 389 garCarInfos.push(garCarInfoList.value[key])
... ... @@ -475,28 +453,36 @@ const handleOderSure = () =&gt; {
475 453 return;
476 454 }
477 455  
478   - saveOrder(params).then(res => {
479   - // TODO 订单详情
  456 + // 请求防抖
  457 + if (orderClick.value) {
  458 + orderClick.value = false
  459 + setTimeout(async () => {
  460 + orderClick.value = true
  461 + await handlerSaveOrder(params);
  462 + }, 800);
  463 + } else {
  464 + uni.$u.toast("请勿频繁操作")
  465 + }
  466 +}
  467 +const handlerSaveOrder = async (params) => {
  468 + await saveOrder(params).then(res => {
480 469 if (res.data.success) {
481   - if (userType.value === "清运车辆驾驶员") {
482   - uni.$u.toast("订单成功,请切换成且角色查看订单详情")
483   - setTimeout(() => {
484   - uni.$u.route({
485   - type: 'navigateBack',
486   - url: `pages/home/index`,
487   - })
488   - }, 300)
  470 + if (userType.value != "用户") {
  471 + uni.$u.toast("下单成功,请切换成且角色查看订单详情")
  472 + uni.$u.route({
  473 + type: 'navigateBack',
  474 + url: `pages/home/index`,
  475 + })
489 476 } else {
  477 + uni.$u.toast('下单成功')
490 478 uni.$u.route({
491 479 type: "redirect",
492   - url: `pages/order/other-home/detail/index`,
  480 + url: `pages/order-info/order-other/detail/index`,
493 481 params: {
494 482 orderId: res.data.data
495 483 }
496 484 })
497   - uni.$u.toast(res.data.msg)
498 485 }
499   -
500 486 }
501 487 })
502 488 }
... ... @@ -586,26 +572,11 @@ const validateImage = (fileList) =&gt; {
586 572  
587 573 // 开始执行一次
588 574 watch(carPopupShowFlag, (val) => {
589   - // console.log(val);
590 575 // carPopupShowFlag.value = val
591 576 if (!val) {
592 577 setTimeout(() => {
593   - nextTick(() => {
594   - let areaHeight;
595   - let areaWeight;
596   - // select中的参数就如css选择器一样选择元素
597   - let movableArea = uni.createSelectorQuery().in(proxy).select(".movableArea");
598   - movableArea.boundingClientRect(function (data) {
599   - // data - 包含元素的高度等信息
600   - areaHeight = data.height;
601   - areaWeight = data.width;
602   - x.value = areaWeight > 300 ? (areaWeight - 50) : areaWeight;
603   - y.value = areaHeight > 80 ? (areaHeight - 80) : areaHeight;
604   - }).exec(function (res) {
605   - // 注意:exec方法必须执行,即便什么也不做,否则不会获取到任何数据
606   - })
607   - })
608   - }, 0);
  578 + isCallBtn.value = true;
  579 + }, 1500)
609 580 }
610 581 }, {
611 582 immediate: true
... ... @@ -829,38 +800,10 @@ $custom-bottom-height: 200rpx;
829 800 .company-clean-bottom {
830 801 position: absolute;
831 802 width: 100%;
832   - // height: 100%;
833 803 bottom: 0;
834 804 left: 0;
835   - // 阴影
836 805 box-shadow: 0 0 10rpx 0 rgba(0, 0, 0, 0.1);
837 806  
838   - .movableArea {
839   - pointer-events: none;
840   - position: fixed;
841   - left: 0;
842   - top: 0;
843   - width: 100%;
844   - height: calc(100% - $custom-bottom-height);
845   - // z-index: 99;
846   -
847   - .movableView {
848   - pointer-events: auto;
849   - min-height: 60rpx;
850   - min-width: 60rpx;
851   -
852   - .company-clean-call-box-container {
853   - min-height: 60rpx;
854   - min-width: 60rpx;
855   - display: flex;
856   - align-items: center;
857   - justify-content: center;
858   - background-color: #19a97c;
859   - border-radius: 100%;
860   - }
861   - }
862   - }
863   -
864 807 .company-clean-bottom-box {
865 808 height: $custom-bottom-height;
866 809 background-color: #ffffff;
... ... @@ -886,6 +829,34 @@ $custom-bottom-height: 200rpx;
886 829  
887 830 }
888 831  
  832 + .movableArea {
  833 + pointer-events: none;
  834 + position: absolute;
  835 + left: 0;
  836 + bottom: 240rpx;
  837 + width: 100%;
  838 + z-index: 99;
  839 +
  840 + .movableView {
  841 + box-sizing: border-box;
  842 + pointer-events: auto;
  843 + display: flex;
  844 + justify-content: flex-end;
  845 + margin-right: 50rpx;
  846 +
  847 + .company-clean-call-box-container {
  848 + max-height: 60rpx;
  849 + max-width: 60rpx;
  850 + display: flex;
  851 + align-items: center;
  852 + justify-content: center;
  853 + background-color: #19a97c;
  854 + border-radius: 100%;
  855 + padding: 5rpx;
  856 + }
  857 + }
  858 + }
  859 +
889 860  
890 861  
891 862 }
... ...
garbage-removal/src/pages/home/user-guide/index.vue renamed to garbage-removal/src/pages/home-info/user-guide/index.vue
garbage-removal/src/pages/home/index.vue
... ... @@ -65,8 +65,6 @@
65 65 <view class="company-list-item-main-right-score">
66 66 <text class="company-list-item-main-right-text">评分:</text>
67 67 <view v-if="item.score != 0" class="company-list-item-main-right-score-start">
68   - <!-- <u-icon v-for="todo in maxStar" :name="item.score > todo ? 'star-fill' : 'star'" :key="todo"
69   - color="#f9ae3d" size="28"></u-icon> -->
70 68 <u-rate activeColor="#f9ae3d" inactive-color="#f9ae3d" size="28"
71 69 :modelValue="item.score" allowHalf readonly></u-rate>
72 70 </view>
... ... @@ -89,7 +87,7 @@
89 87 <view class="company-list-item-bottom-contact-company"
90 88 style="display: flex; align-items: center;">
91 89 <up-icon name="phone" size="34" color="#19a97c"></up-icon>
92   - <view @click="handleContactClick(item.servicePhone)"
  90 + <view @click.stop="handleContactClick(item.servicePhone)"
93 91 style="display: flex; justify-content: center; align-items: center;font-size: 28rpx; color:'#a9e08f'">
94 92 {{ item.servicePhone }}
95 93 </view>
... ... @@ -98,7 +96,7 @@
98 96 <view class="company-list-item-main-right-box"
99 97 style="display: flex;font-size: 28rpx; justify-content: flex-end; align-items: flex-end;color:#458B74;font-weight: bold;">
100 98 <view class="company-list-item-main-right-box-text"
101   - @tap.stop="handleCleanGarbage(item, item.servicePhone, userAddress)">
  99 + @click.stop="handleCleanGarbage(item, item.servicePhone, userAddress)">
102 100 预约清运 ->
103 101 </view>
104 102 </view>
... ... @@ -237,7 +235,7 @@ const companyList = ref([])
237 235 const handlerCLickInfoBox = (val) => {
238 236 switch (val) {
239 237 case '用户指南':
240   - uni.$u.route('/pages/home/user-guide/index')
  238 + uni.$u.route('/pages/home-info/user-guide/index')
241 239 break;
242 240  
243 241 default:
... ... @@ -292,7 +290,7 @@ const handleDropdownCarChange = (val) =&gt; {
292 290 */
293 291 function handleAddressInfo() {
294 292 uni.$u.route({
295   - url: `pages/home/address/index`,
  293 + url: `pages/home-info/address/index`,
296 294 })
297 295 }
298 296 const handleCleanClick = () => {
... ... @@ -325,7 +323,7 @@ const handleCleanClick = () =&gt; {
325 323 success: function (res) {
326 324 if (res.confirm) {
327 325 uni.$u.route({
328   - url: `pages/home/address/index`,
  326 + url: `pages/home-info/address/index`,
329 327 })
330 328 } else if (res.cancel) {
331 329 console.log('用户点击取消');
... ... @@ -357,7 +355,7 @@ const handleCleanClick = () =&gt; {
357 355 */
358 356 function handleDetailClick(company, tel, userAddress) {
359 357 uni.$u.route({
360   - url: `pages/home/clean/company-detail/index?companyObj=${JSON.stringify(company)}&tel=${tel}&userAddress=${userAddress}`,
  358 + url: `pages/home-info/clean/company-detail/index?companyObj=${JSON.stringify(company)}&tel=${tel}&userAddress=${userAddress}`,
361 359 })
362 360 }
363 361  
... ... @@ -366,7 +364,7 @@ function handleDetailClick(company, tel, userAddress) {
366 364 */
367 365 const handleCleanGarbage = (companyObj, tel, userAddress) => {
368 366 uni.$u.route({
369   - url: `pages/home/clean/index?companyObj=${JSON.stringify(companyObj)}&tel=${tel}&userAddress=${userAddress}`,
  367 + url: `pages/home-info/clean/index?companyObj=${JSON.stringify(companyObj)}&tel=${tel}&userAddress=${userAddress}`,
370 368 })
371 369 }
372 370  
... ... @@ -375,7 +373,7 @@ const handleCleanGarbage = (companyObj, tel, userAddress) =&gt; {
375 373 */
376 374 const handleSearchClick = (e) => {
377 375 uni.$u.route({
378   - url: `pages/home/search/index`,
  376 + url: `pages/home-info/search/index`,
379 377 })
380 378 }
381 379  
... ... @@ -780,7 +778,6 @@ const queryList = (pageNo, pageSize) =&gt; {
780 778 }
781 779 }
782 780 }
783   -
784 781 }
785 782 }
786 783 }
... ... @@ -789,7 +786,6 @@ const queryList = (pageNo, pageSize) =&gt; {
789 786  
790 787 .click-box {
791 788 @include handleClick;
792   - transform: all 0.5s;
793 789 }
794 790  
795 791 .company-label-title-box {
... ...
garbage-removal/src/pages/order/driver-home/detail/index.vue renamed to garbage-removal/src/pages/order-info/order-driver/detail/index.vue
... ... @@ -224,7 +224,7 @@ const createQrCodeLocal = (orderId) =&gt; {
224 224 const protocol = window.location.protocol;
225 225 const localAddress = `${protocol}//${hostname}:${port}`;
226 226 // const localAddress = `http://localhost:5173`;
227   - qrCodeText.value = localAddress + "/pages/order/other-home/guest/index?orderId=" + orderId;
  227 + qrCodeText.value = localAddress + "/pages/order-info/order-other/guest/index?orderId=" + orderId;
228 228 console.log(qrCodeRef.value);
229 229 }
230 230 // 获取二维码
... ... @@ -259,7 +259,7 @@ const handleClose = (e) =&gt; {
259 259 cancelShow.value = false
260 260 }
261 261 const handleEvaluateDetail = (orderId, userType) => {
262   - uni.$u.route(`pages/order/other-home/evaluate-info/index`,
  262 + uni.$u.route(`pages/order-info/order-other/evaluate-info/index`,
263 263 { orderId: orderId, userType: userType })
264 264 }
265 265 const selectClick = (index) => {
... ... @@ -308,23 +308,15 @@ const handlerJumpOtherApp = (latitude, longitude, garCoordinate) =&gt; {
308 308 }
309 309  
310 310 const handleEvaluate = (orderId, userType) => {
311   - uni.$u.route(`pages/order/other-home/evaluate/index?orderId=${orderId}&userType=${userType}`)
  311 + uni.$u.route(`pages/order-info/order-other/evaluate/index?orderId=${orderId}&userType=${userType}`)
312 312 }
313 313  
314 314 // 接收订单
315 315 const handleOrder = (orderId) => {
316 316 updateOrder({ garOrderId: orderId, handleType: 0 }).then(res => {
317 317 if (res.data.success) {
318   - if (res.data.data === "订单已经被别人接受啦") {
319   - uni.$u.toast(res.data.data)
320   - uni.$u.route({
321   - type: "reLaunch",
322   - url: `pages/order/index`,
323   - })
324   - } else {
325   - uni.$u.toast(res.data.data)
326   - handleOrderDetail(orderId)
327   - }
  318 + uni.$u.toast(res.data.data)
  319 + handleOrderDetail(orderId)
328 320 }
329 321 })
330 322 }
... ... @@ -334,10 +326,7 @@ const driverHandleOrder = (orderId) =&gt; {
334 326 updateOrder({ garOrderId: orderId, handleType: 0 }).then(res => {
335 327 if (res.data.success) {
336 328 uni.$u.toast(res.data.data)
337   - uni.$u.route({
338   - type: "reLaunch",
339   - url: `pages/order/index`,
340   - })
  329 + handleOrderDetail(orderId)
341 330 }
342 331 })
343 332 }
... ... @@ -381,7 +370,7 @@ const createQrCodeValid = (val) =&gt; {
381 370 * @param {string} putType
382 371 */
383 372 const handleUploadImage = (orderId, putType) => {
384   - uni.$u.route(`pages/order/driver-home/upload/index?orderId=${orderId}`)
  373 + uni.$u.route(`pages/order-info/order-driver/upload/index?orderId=${orderId}`)
385 374 }
386 375  
387 376 /**
... ...
garbage-removal/src/pages/order/driver-home/upload/index.vue renamed to garbage-removal/src/pages/order-info/order-driver/upload/index.vue
... ... @@ -83,7 +83,7 @@ const handleSubmit = (id, type) =&gt; {
83 83 setTimeout(() => {
84 84 uni.$u.route({
85 85 type: 'navigateBack',
86   - url: `pages/order/other-home/detail/index`,
  86 + url: `pages/order-info/order-other/detail/index`,
87 87 })
88 88 }, 300)
89 89 }
... ...
garbage-removal/src/pages/order/handler-home/scan-detail/index.vue renamed to garbage-removal/src/pages/order-info/order-handler/scan-detail/index.vue
garbage-removal/src/pages/order/handler-home/transport-detail/index.vue renamed to garbage-removal/src/pages/order-info/order-handler/transport-detail/index.vue
... ... @@ -124,7 +124,7 @@ const spaceStr = ref(&quot;&quot;)
124 124 const transportWeightCount = ref();
125 125 const goTransportDetail = (val) => {
126 126 uni.$u.route({
127   - url: `pages/order/handler-home/scan-detail/index`
  127 + url: `pages/order-info/order-handler/scan-detail/index`
128 128 , params: {
129 129 garAskId: val.garAskId
130 130 }
... ...
garbage-removal/src/pages/order/other-home/detail/index.vue renamed to garbage-removal/src/pages/order-info/order-other/detail/index.vue
... ... @@ -309,7 +309,7 @@ const createQrCodeLocal = (orderId) =&gt; {
309 309 const protocol = window.location.protocol;
310 310 const localAddress = `${protocol}//${hostname}:${port}`;
311 311 // const localAddress = `http://localhost:5173`;
312   - qrCodeText.value = localAddress + "/pages/order/other-home/guest/index?orderId=" + orderId;
  312 + qrCodeText.value = localAddress + "/pages/order-info/order-other/guest/index?orderId=" + orderId;
313 313 console.log(qrCodeRef.value);
314 314 }
315 315 // 获取二维码
... ... @@ -348,7 +348,7 @@ const handleOrderDispatchClick = (orderId) =&gt; {
348 348 driverPersonnelList.value = res.data.data
349 349 clashDriverDispatchRef.value.open(res.data.data)
350 350 } else {
351   - uni.$u.toast(res.data.message)
  351 + uni.$u.toast("驾驶员分配成功!")
352 352 }
353 353 })
354 354 }
... ... @@ -359,7 +359,7 @@ const handleDisposalDispatchClick = (orderId) =&gt; {
359 359 disposalPersonnelList.value = res.data.data
360 360 clashDisposalDispatchRef.value.open(res.data.data)
361 361 } else {
362   - uni.$u.toast(res.data.message)
  362 + uni.$u.toast("处理场所分配成功!")
363 363 }
364 364 })
365 365 }
... ... @@ -370,7 +370,7 @@ const handleClose = (e) =&gt; {
370 370 cancelShow.value = false
371 371 }
372 372 const handleEvaluateDetail = (orderId, userType) => {
373   - uni.$u.route(`pages/order/other-home/evaluate-info/index`,
  373 + uni.$u.route(`pages/order-info/order-other/evaluate-info/index`,
374 374 { orderId: orderId, userType: userType })
375 375 }
376 376 const selectClick = (index) => {
... ... @@ -474,7 +474,7 @@ const handleSubmitSuccess = (orderId) =&gt; {
474 474  
475 475 }
476 476 const handleEvaluate = (orderId, userType) => {
477   - uni.$u.route(`pages/order/other-home/evaluate/index?orderId=${orderId}&userType=${userType}`)
  477 + uni.$u.route(`pages/order-info/order-other/evaluate/index?orderId=${orderId}&userType=${userType}`)
478 478 }
479 479  
480 480 // 接收订单
... ...
garbage-removal/src/pages/order/other-home/evaluate-info/index.vue renamed to garbage-removal/src/pages/order-info/order-other/evaluate-info/index.vue
garbage-removal/src/pages/order/other-home/evaluate/index.vue renamed to garbage-removal/src/pages/order-info/order-other/evaluate/index.vue
garbage-removal/src/pages/order/other-home/guest/index.vue renamed to garbage-removal/src/pages/order-info/order-other/guest/index.vue
garbage-removal/src/pages/order/other-home/success/index.vue renamed to garbage-removal/src/pages/order-info/order-other/success/index.vue
garbage-removal/src/pages/order/other-home/upload/index.vue renamed to garbage-removal/src/pages/order-info/order-other/upload/index.vue
... ... @@ -83,7 +83,7 @@ const handleSubmit = (id, type) =&gt; {
83 83 setTimeout(() => {
84 84 uni.$u.route({
85 85 type: 'navigateBack',
86   - url: `pages/order/other-home/detail/index`,
  86 + url: `pages/order-info/order-other/detail/index`,
87 87 })
88 88 }, 300)
89 89 }
... ...
garbage-removal/src/pages/order/other-home/user-message/index.vue renamed to garbage-removal/src/pages/order-info/order-other/user-message/index.vue
garbage-removal/src/pages/order/index.vue
1 1 <template>
2 2 <view class="container" style="width: 100%;height: 100%;">
3   - <driver-home v-if="userType == '清运车辆驾驶员'"></driver-home>
4   - <handler-home v-else-if="userType == '处置场所负责人'"></handler-home>
5   - <other-home v-else></other-home>
  3 + <order-driver v-if="userType == '清运车辆驾驶员'"></order-driver>
  4 + <order-handler v-else-if="userType == '处置场所负责人'"></order-handler>
  5 + <order-other v-else></order-other>
6 6 </view>
7 7 </template>
8 8 <script setup>
9 9 import { useMainStore } from "@/stores/index.js";
10 10 import { computed } from 'vue';
11   -import driverHome from "./driver-home/index.vue";
12   -import handlerHome from "./handler-home/index.vue";
13   -import otherHome from "./other-home/index.vue";
  11 +import OrderDriver from './order-driver/index.vue';
  12 +import OrderHandler from './order-handler/index.vue';
  13 +import OrderOther from './order-other/index.vue';
14 14 const mainStore = useMainStore()
15 15 const userType = computed(() => mainStore.userType)
16 16 console.log(userType.value);
... ...
garbage-removal/src/pages/order/driver-home/index.vue renamed to garbage-removal/src/pages/order/order-driver/index.vue
... ... @@ -5,12 +5,16 @@
5 5 <view class="header-box" :style="{
6 6 'height': lightHeight, 'line-height': lightHeight,
7 7 'padding-top': topMargin
8   - }">
  8 + }
  9 + ">
  10 + <view class="header-box-left-message">
  11 + &nbsp;
  12 + </view>
9 13 <view class="header-box-title">
10 14 {{ title }}
11 15 </view>
12 16 </view>
13   - <u-tabs lineWidth="40" lineColor="#ffffff" lineHeight="6"
  17 + <u-tabs lineWidth=" 40" lineColor="#ffffff" lineHeight="6"
14 18 :activeStyle="{ 'color': '#ffffff', 'font-weight': 'bolder' }" :inactiveStyle="{ color: '#ffffff' }"
15 19 ref="uTabsElement" :list="list" :current="current" @change="tabsChange" :scrollable="false"></u-tabs>
16 20 </template>
... ... @@ -23,7 +27,7 @@
23 27 </view>
24 28 </template>
25 29 <script setup>
26   -import { onLoad } from '@dcloudio/uni-app';
  30 +import { onShow } from '@dcloudio/uni-app';
27 31 import { ref } from 'vue';
28 32 import swiperListItem from './swiper-list-item/index.vue';
29 33 const list = ref([{ name: '待清运' }, { name: '清运中' }, { name: '全部' }, { name: '已完成' }])
... ... @@ -43,7 +47,7 @@ const animationfinish = (e) =&gt; {
43 47 const translation = (e) => {
44 48 uTabsElement.value.setDx(e.detail.dx)
45 49 }
46   -onLoad(() => {
  50 +onShow(() => {
47 51 try {
48 52 const { height, top } = uni.getMenuButtonBoundingClientRect();
49 53 topMargin.value = top + 'px';
... ... @@ -68,14 +72,24 @@ onLoad(() =&gt; {
68 72 width: 100%;
69 73 color: white;
70 74 display: flex;
71   - justify-content: center;
  75 + justify-content: flex-start;
72 76 align-items: center;
73 77 /* 分散对齐,自动调整间距 */
74 78  
  79 + .header-box-left-message {
  80 + width: 150rpx;
  81 + display: flex;
  82 + justify-content: center;
  83 + align-items: center;
  84 + }
  85 +
75 86 .header-box-title {
76 87 font-size: 35rpx;
77 88 font-weight: bold;
  89 + width: 600rpx;
78 90 text-align: center;
  91 + // 向左偏移75rpx
  92 + margin-left: -75rpx;
79 93 }
80 94  
81 95 }
... ...
garbage-removal/src/pages/order/driver-home/swiper-list-item/index.vue renamed to garbage-removal/src/pages/order/order-driver/swiper-list-item/index.vue
... ... @@ -60,7 +60,7 @@ const firstLoaded = ref(false)
60 60 */
61 61 const goDetail = (val) => {
62 62 uni.$u.route({
63   - url: `pages/home/clean/company-detail/index?companyId=${val.garOrderCompanyId}`,
  63 + url: `pages/home-info/clean/company-detail/index?companyId=${val.garOrderCompanyId}`,
64 64 })
65 65 }
66 66  
... ... @@ -94,7 +94,7 @@ const submitFunction = (otherReason) =&gt; {
94 94 }
95 95 const handleClick = (orderId) => {
96 96 uni.$u.route({
97   - url: `pages/order/driver-home/detail/index`,
  97 + url: `pages/order-info/order-driver/detail/index`,
98 98 params: {
99 99 orderId: orderId
100 100 }
... ... @@ -106,7 +106,7 @@ const handleClick = (orderId) =&gt; {
106 106 * @param {*} orderId
107 107 */
108 108 const handleUserEvaluate = (orderId, userType) => {
109   - uni.$u.route(`pages/order/other-home/evaluate/index?orderId=${orderId}&userType=${userType}`)
  109 + uni.$u.route(`pages/order-info/order-other/evaluate/index?orderId=${orderId}&userType=${userType}`)
110 110 }
111 111 // list集合
112 112 const queryList = (pageNo, pageSize) => {
... ...
garbage-removal/src/pages/order/handler-home/index.vue renamed to garbage-removal/src/pages/order/order-handler/index.vue
... ... @@ -7,11 +7,14 @@
7 7 'padding-top': topMargin
8 8 }
9 9 ">
  10 + <view class="header-box-left-message">
  11 + &nbsp;
  12 + </view>
10 13 <view class="header-box-title">
11 14 {{ title }}
12 15 </view>
13 16 </view>
14   - <u-tabs lineWidth="40" lineColor="#ffffff" lineHeight="6"
  17 + <u-tabs lineWidth=" 40" lineColor="#ffffff" lineHeight="6"
15 18 :activeStyle="{ 'color': '#ffffff', 'font-weight': 'bolder' }" :inactiveStyle="{ color: '#ffffff' }"
16 19 ref="uTabsElement" :list="list" :current="current" @change="tabsChange" :scrollable="false"></u-tabs>
17 20 </template>
... ... @@ -34,7 +37,7 @@
34 37  
35 38 <script setup>
36 39 import { checkCode } from '@/apis/order.js';
37   -import { onLoad } from '@dcloudio/uni-app';
  40 +import { onShow } from '@dcloudio/uni-app';
38 41 import { ref } from 'vue';
39 42 import swiperListItem from './swiper-list-item/index.vue';
40 43 const list = ref([{ name: '处理中' }, { name: '已完成' }])
... ... @@ -68,7 +71,7 @@ const handleScan = () =&gt; {
68 71 console.log(res);
69 72 if (res.data.code == 200) {
70 73 uni.$u.route({
71   - url: `pages/order/handler-home/scan-detail/index`,
  74 + url: `pages/order-info/order-handler/scan-detail/index`,
72 75 params: {
73 76 data: encodeURIComponent(JSON.stringify(res.data.data))
74 77 }
... ... @@ -86,7 +89,7 @@ const handleScan = () =&gt; {
86 89 }
87 90  
88 91  
89   -onLoad(() => {
  92 +onShow(() => {
90 93 try {
91 94 const { height, top } = uni.getMenuButtonBoundingClientRect();
92 95 topMargin.value = top + 'px';
... ... @@ -111,17 +114,27 @@ onLoad(() =&gt; {
111 114 width: 100%;
112 115 color: white;
113 116 display: flex;
114   - justify-content: center;
  117 + justify-content: flex-start;
115 118 align-items: center;
  119 + /* 分散对齐,自动调整间距 */
116 120  
117   - .header-box-title {
118   - font-size: 35rpx;
119   - font-weight: bold;
  121 + .header-box-left-message {
  122 + width: 150rpx;
120 123 display: flex;
121 124 justify-content: center;
122 125 align-items: center;
123 126 }
124 127  
  128 + .header-box-title {
  129 + font-size: 35rpx;
  130 + font-weight: bold;
  131 + width: 600rpx;
  132 + text-align: center;
  133 + // 向左偏移75rpx
  134 + margin-left: -75rpx;
  135 +
  136 + }
  137 +
125 138 }
126 139  
127 140  
... ...
garbage-removal/src/pages/order/handler-home/swiper-list-item/index.vue renamed to garbage-removal/src/pages/order/order-handler/swiper-list-item/index.vue
... ... @@ -47,7 +47,7 @@ const firstLoaded = ref(false)
47 47  
48 48 const handleClick = (garOrderId) => {
49 49 uni.$u.route({
50   - url: `pages/order/handler-home/transport-detail/index`,
  50 + url: `pages/order-info/order-handler/transport-detail/index`,
51 51 params: {
52 52 garOrderId
53 53 }
... ... @@ -78,7 +78,7 @@ const queryList = (pageNo, pageSize) =&gt; {
78 78 */
79 79 const goDetail = (val) => {
80 80 uni.$u.route({
81   - url: `pages/home/clean/company-detail/index?companyId=${val.garOrderCompanyId}`,
  81 + url: `pages/home-info/clean/company-detail/index?companyId=${val.garOrderCompanyId}`,
82 82 })
83 83 }
84 84 onShow(() => {
... ...
garbage-removal/src/pages/order/other-home/index.vue renamed to garbage-removal/src/pages/order/order-other/index.vue
... ... @@ -34,7 +34,7 @@
34 34 <script setup>
35 35 import { queryOrderMessageCount } from '@/apis/order.js';
36 36 import { useMainStore } from '@/stores/index.js';
37   -import { onLoad, onShow } from '@dcloudio/uni-app';
  37 +import { onShow } from '@dcloudio/uni-app';
38 38 import { computed, ref } from 'vue';
39 39 import swiperListItem from './swiper-list-item/index.vue';
40 40 const store = useMainStore();
... ... @@ -58,9 +58,9 @@ const translation = (e) =&gt; {
58 58 uTabsElement.value.setDx(e.detail.dx)
59 59 }
60 60 const handlerMessageClick = () => {
61   - uni.$u.route("pages/order/other-home/user-message/index")
  61 + uni.$u.route("pages/order-info/order-other/user-message/index")
62 62 }
63   -onLoad(() => {
  63 +onShow(() => {
64 64 try {
65 65 const { height, top } = uni.getMenuButtonBoundingClientRect();
66 66 topMargin.value = top + "px";
... ...
garbage-removal/src/pages/order/other-home/swiper-list-item/index.vue renamed to garbage-removal/src/pages/order/order-other/swiper-list-item/index.vue
... ... @@ -81,7 +81,6 @@ const props = defineProps({
81 81 type: Number
82 82 }
83 83 })
84   -
85 84 const store = useMainStore();
86 85 const userType = computed(() => store.userType)
87 86 const currentCancelOrderId = ref("");
... ... @@ -133,7 +132,7 @@ const handleClose = (e) =&gt; {
133 132 */
134 133 const goDetail = (val) => {
135 134 uni.$u.route({
136   - url: `pages/home/clean/company-detail/index?companyId=${val.garOrderCompanyId}`,
  135 + url: `pages/home-info/clean/company-detail/index?companyId=${val.garOrderCompanyId}`,
137 136 })
138 137 }
139 138  
... ... @@ -160,14 +159,14 @@ const submitFunction = (otherReason) =&gt; {
160 159 updateOrder(params).then(res => {
161 160 if (res.data.success) {
162 161 cancelShow.value = false
163   - uni.$u.toast(res.data.data)
  162 + uni.$u.toast("取消成功")
164 163 paging.value.reload();
165 164 }
166 165 })
167 166 }
168 167 const handleClick = (orderId) => {
169 168 uni.$u.route({
170   - url: `pages/order/other-home/detail/index`,
  169 + url: `pages/order-info/order-other/detail/index`,
171 170 params: {
172 171 orderId: orderId
173 172 }
... ... @@ -179,7 +178,7 @@ const handleClick = (orderId) =&gt; {
179 178 * @param {*} orderId
180 179 */
181 180 const handleUserEvaluate = (orderId, userType) => {
182   - uni.$u.route(`pages/order/other-home/evaluate/index?orderId=${orderId}&userType=${userType}`)
  181 + uni.$u.route(`pages/order-info/order-other/evaluate/index?orderId=${orderId}&userType=${userType}`)
183 182 }
184 183 // list集合
185 184 const queryList = (pageNo, pageSize) => {
... ... @@ -197,7 +196,6 @@ const queryList = (pageNo, pageSize) =&gt; {
197 196 paging.value.complete(false);
198 197 })
199 198 }
200   -
201 199 onShow(() => {
202 200 if (props.currentIndex == props.tabIndex) {
203 201 if (firstLoaded.value) {
... ... @@ -223,6 +221,7 @@ watch(() =&gt; props.currentIndex, (val1, val2) =&gt; {
223 221 <style lang="scss" scoped>
224 222 .content-container {
225 223 height: 100%;
  224 + width: 100%;
226 225  
227 226 .order {
228 227 width: 90%;
... ...
garbage-removal/src/pages/wode/index.vue
... ... @@ -13,6 +13,54 @@
13 13 </view>
14 14 </view>
15 15 </view>
  16 + <view class="order-icon-container">
  17 + <view class="order-icon-btn">
  18 + <view class="order-icon-btn-box" @click="queryMyOrderList()">
  19 + <view class="order-icon-btn-box-img">
  20 + <image :src="orderUrl"></image>
  21 + <view class="order-icon-btn-box-img-badge">
  22 + <up-badge max="99" bgColor="#f3a200" :value="messageCount"></up-badge>
  23 + </view>
  24 + </view>
  25 + <view class="order-icon-btn-box-label">
  26 + 我的订单
  27 + </view>
  28 + </view>
  29 + <view class="order-icon-btn-box" @click="queryNoCleanOrderList">
  30 + <view class="order-icon-btn-box-img">
  31 + <image :src="cleanWaitUrl"></image>
  32 + <view class="order-icon-btn-box-img-badge">
  33 + <up-badge max="99" bgColor="#f3a200" :value="messageCount"></up-badge>
  34 + </view>
  35 + </view>
  36 + <view class="order-icon-btn-box-label">
  37 + 待清运
  38 + </view>
  39 + </view>
  40 + <view class="order-icon-btn-box" @click="queryCleanOrderList">
  41 + <view class="order-icon-btn-box-img">
  42 + <image :src="cleanActiveUrl"></image>
  43 + <view class="order-icon-btn-box-img-badge">
  44 + <up-badge max="99" bgColor="#f3a200" :value="messageCount"></up-badge>
  45 + </view>
  46 + </view>
  47 + <view class="order-icon-btn-box-label">
  48 + 清运中
  49 + </view>
  50 + </view>
  51 + <view class="order-icon-btn-box" @click="queryEvaluateOrderList">
  52 + <view class="order-icon-btn-box-img">
  53 + <image :src="evaluateUrl"></image>
  54 + <view class="order-icon-btn-box-img-badge">
  55 + <up-badge max="99" bgColor="#f3a200" :value="messageCount"></up-badge>
  56 + </view>
  57 + </view>
  58 + <view class="order-icon-btn-box-label">
  59 + 待评价
  60 + </view>
  61 + </view>
  62 + </view>
  63 + </view>
16 64 <view class="more-setting-box">
17 65 <view class="more-setting-title">
18 66 更多设置
... ... @@ -30,7 +78,7 @@
30 78 <image src="../../static/image/role-change.png"></image>
31 79 </view>
32 80 <view class="cell-label">
33   - <text>角 色 切 换</text>
  81 + <text>身 份 切 换</text>
34 82 </view>
35 83 </view>
36 84 <view class="cell-box" @click="handleLoginOut" hover-class="handlerClick">
... ... @@ -47,19 +95,40 @@
47 95  
48 96 <script setup>
49 97 import { loginOut, queryRole } from "@/apis/user";
  98 +import cleanActiveUrl from '@/static/image/clean-active.png';
  99 +import cleanWaitUrl from '@/static/image/clean-wait.png';
  100 +import evaluateUrl from '@/static/image/evaluate.png';
  101 +import orderUrl from '@/static/image/order.png';
50 102 import headImg from "@/static/image/st_pic.png";
51 103 import { useMainStore } from "@/stores/index";
52 104 import { setRequestToken } from '@/utils/request/request.js';
53 105 import { computed, ref } from "vue";
54 106 const store = useMainStore();
55 107 const pic = ref(headImg)
56   -const show = ref(true)
  108 +const messageCount = ref(9);
57 109 const userInfo = computed(() => store.userInfo)
58 110 const handleAddressManager = () => {
59 111 uni.$u.route({
60   - url: `pages/home/address/index`,
  112 + url: `pages/home-info/address/index`,
61 113 })
62 114 }
  115 +
  116 +const queryMyOrderList = () => {
  117 + // TODO 查询我的订单
  118 + // uni.$u.route({
  119 + // url: `pages/order-info/order-other/swiper-list-item/index`,
  120 + // })
  121 +}
  122 +const queryNoCleanOrderList = () => {
  123 + // TODO 查询待清运订单
  124 +}
  125 +const queryCleanOrderList = () => {
  126 + // TODO 查询清运中订单
  127 +}
  128 +const queryEvaluateOrderList = () => {
  129 + console.log("queryEvaluateOrderList");
  130 + // TODO 查询待评价订单
  131 +}
63 132 const handlerChangeRole = () => {
64 133 uni.showModal({
65 134 title: '提示',
... ... @@ -117,7 +186,7 @@ const handleLoginOut = () =&gt; {
117 186 padding: 20rpx 30rpx;
118 187 box-sizing: border-box;
119 188 border-radius: 0 0 30rpx 30rpx;
120   - height: 300rpx;
  189 + height: 200rpx;
121 190  
122 191 .head-image-box {
123 192 display: flex;
... ... @@ -129,8 +198,54 @@ const handleLoginOut = () =&gt; {
129 198 }
130 199 }
131 200  
132   - .more-setting-box {
  201 + .order-icon-container {
133 202 margin-top: 60rpx;
  203 + padding: 0 30rpx;
  204 + box-sizing: border-box;
  205 +
  206 + .order-icon-btn {
  207 + display: flex;
  208 + align-items: center;
  209 + justify-content: space-between;
  210 + width: 100%;
  211 + height: 150rpx;
  212 + box-sizing: border-box;
  213 + padding: 0 30rpx;
  214 + background-color: white;
  215 + border-radius: 15rpx;
  216 + margin-top: 20rpx;
  217 +
  218 + .order-icon-btn-box {
  219 + display: flex;
  220 + flex-direction: column;
  221 + align-items: center;
  222 + justify-content: center;
  223 + color: $u-main-color;
  224 + @include handleClick;
  225 +
  226 + .order-icon-btn-box-img {
  227 + margin-bottom: 10rpx;
  228 + display: flex;
  229 +
  230 + image {
  231 + width: 35rpx;
  232 + height: 35rpx;
  233 + background-size: 100% 100%;
  234 + transform: translate(9rpx, 8rpx)
  235 + }
  236 +
  237 + .order-icon-btn-box-img-badge {
  238 + z-index: 9999;
  239 + }
  240 + }
  241 +
  242 + .order-icon-btn-box-label {}
  243 + }
  244 + }
  245 + }
  246 +
  247 + .more-setting-box {
  248 + margin-top: 30rpx;
134 249 margin-bottom: 20rpx;
135 250 padding: 20rpx;
136 251 box-sizing: border-box;
... ...
garbage-removal/src/static/image/clean-active.png 0 → 100644

11.2 KB

garbage-removal/src/static/image/clean-wait.png 0 → 100644

6.44 KB

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

4.33 KB

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

3.29 KB

garbage-removal/src/utils/request/request.js
... ... @@ -152,7 +152,7 @@ const handleGet = (config) =&gt; {
152 152 }
153 153 config.url += strUrl;
154 154 config.params = "";
155   - if (config.url.startsWith("/order/other-home/webDetail/")) {
  155 + if (config.url.startsWith("/order-info/order-other/webDetail/")) {
156 156 config.headers["Authorization"] = "";
157 157 }
158 158 }
... ...