Commit b917e9606009308db5006b4914bb23863ed15ff5
1 parent
1380bd41
提交优化
Showing
13 changed files
with
182 additions
and
49 deletions
garbage-removal/src/apis/company.js
| @@ -15,7 +15,7 @@ export async function queryDisposalSiteList() { | @@ -15,7 +15,7 @@ export async function queryDisposalSiteList() { | ||
| 15 | */ | 15 | */ |
| 16 | export async function queryEnterpriseList(params) { | 16 | export async function queryEnterpriseList(params) { |
| 17 | return await request.get( | 17 | return await request.get( |
| 18 | - `/order/company`, | 18 | + `/order/docking/up/company`, |
| 19 | {params:params} | 19 | {params:params} |
| 20 | ); | 20 | ); |
| 21 | } | 21 | } |
garbage-removal/src/components/liu-delivery-time/liu-delivery-time.vue
| @@ -125,39 +125,139 @@ const getFutureDays = () => { | @@ -125,39 +125,139 @@ const getFutureDays = () => { | ||
| 125 | 125 | ||
| 126 | const getTimeList = () => { | 126 | const getTimeList = () => { |
| 127 | const timeList = [{ | 127 | const timeList = [{ |
| 128 | + time: '00:00-01:00', | ||
| 129 | + start: '00:00', | ||
| 130 | + end: '01:00', | ||
| 131 | + timeStr:'22-07' | ||
| 132 | + },{ | ||
| 133 | + time: '01:00-02:00', | ||
| 134 | + start: '01:00', | ||
| 135 | + end: '02:00', | ||
| 136 | + timeStr:'22-07' | ||
| 137 | + },{ | ||
| 138 | + time: '02:00-03:00', | ||
| 139 | + start: '02:00', | ||
| 140 | + end: '03:00', | ||
| 141 | + timeStr:'22-07' | ||
| 142 | + },{ | ||
| 143 | + time: '03:00-04:00', | ||
| 144 | + start: '03:00', | ||
| 145 | + end: '04:00', | ||
| 146 | + timeStr:'22-07' | ||
| 147 | + },{ | ||
| 148 | + time: '04:00-05:00', | ||
| 149 | + start: '04:00', | ||
| 150 | + end: '05:00', | ||
| 151 | + timeStr:'22-07' | ||
| 152 | + },{ | ||
| 153 | + time: '05:00-06:00', | ||
| 154 | + start: '05:00', | ||
| 155 | + end: '06:00', | ||
| 156 | + timeStr:'22-07' | ||
| 157 | + },{ | ||
| 158 | + time: '06:00-07:00', | ||
| 159 | + start: '06:00', | ||
| 160 | + end: '07:00', | ||
| 161 | + timeStr:'22-07' | ||
| 162 | + },{ | ||
| 163 | + time: '07:00-08:00', | ||
| 164 | + start: '07:00', | ||
| 165 | + end: '08:00', | ||
| 166 | + timeStr:'07-08' | ||
| 167 | + },{ | ||
| 168 | + time: '08:00-09:00', | ||
| 169 | + start: '08:00', | ||
| 170 | + end: '09:00', | ||
| 171 | + timeStr:'08-09' | ||
| 172 | + },{ | ||
| 128 | time: '09:00-10:00', | 173 | time: '09:00-10:00', |
| 129 | start: '09:00', | 174 | start: '09:00', |
| 130 | - end: '10:00' | 175 | + end: '10:00', |
| 176 | + timeStr:'09-10' | ||
| 131 | }, | 177 | }, |
| 132 | { | 178 | { |
| 133 | time: '10:00-11:00', | 179 | time: '10:00-11:00', |
| 134 | start: '10:00', | 180 | start: '10:00', |
| 135 | - end: '11:00' | 181 | + end: '11:00', |
| 182 | + timeStr:'10-11' | ||
| 136 | }, | 183 | }, |
| 137 | { | 184 | { |
| 138 | time: '11:00-12:00', | 185 | time: '11:00-12:00', |
| 139 | start: '11:00', | 186 | start: '11:00', |
| 140 | - end: '12:00' | 187 | + end: '12:00', |
| 188 | + timeStr:'11-12' | ||
| 141 | }, | 189 | }, |
| 142 | { | 190 | { |
| 143 | time: '12:00-13:00', | 191 | time: '12:00-13:00', |
| 144 | start: '12:00', | 192 | start: '12:00', |
| 145 | - end: '13:00' | 193 | + end: '13:00', |
| 194 | + timeStr:'12-13' | ||
| 146 | }, | 195 | }, |
| 147 | { | 196 | { |
| 148 | time: '13:00-14:00', | 197 | time: '13:00-14:00', |
| 149 | start: '13:00', | 198 | start: '13:00', |
| 150 | - end: '14:00' | 199 | + end: '14:00', |
| 200 | + timeStr:'13-14' | ||
| 151 | }, | 201 | }, |
| 152 | { | 202 | { |
| 153 | time: '14:00-15:00', | 203 | time: '14:00-15:00', |
| 154 | start: '14:00', | 204 | start: '14:00', |
| 155 | - end: '15:00' | 205 | + end: '15:00', |
| 206 | + timeStr:'14-15' | ||
| 156 | }, | 207 | }, |
| 157 | { | 208 | { |
| 158 | time: '15:00-16:00', | 209 | time: '15:00-16:00', |
| 159 | start: '15:00', | 210 | start: '15:00', |
| 160 | - end: '16:00' | 211 | + end: '16:00', |
| 212 | + timeStr:'15-16' | ||
| 213 | + }, | ||
| 214 | + { | ||
| 215 | + time: '16:00-17:00', | ||
| 216 | + start: '16:00', | ||
| 217 | + end: '17:00', | ||
| 218 | + timeStr:'16-17' | ||
| 219 | + }, | ||
| 220 | + { | ||
| 221 | + time: '17:00-18:00', | ||
| 222 | + start: '17:00', | ||
| 223 | + end: '18:00', | ||
| 224 | + timeStr:'17-18' | ||
| 225 | + }, | ||
| 226 | + { | ||
| 227 | + time: '18:00-19:00', | ||
| 228 | + start: '18:00', | ||
| 229 | + end: '19:00', | ||
| 230 | + timeStr:'18-19' | ||
| 231 | + }, | ||
| 232 | + { | ||
| 233 | + time: '19:00-20:00', | ||
| 234 | + start: '19:00', | ||
| 235 | + end: '20:00', | ||
| 236 | + timeStr:'19-20' | ||
| 237 | + }, | ||
| 238 | + { | ||
| 239 | + time: '20:00-21:00', | ||
| 240 | + start: '20:00', | ||
| 241 | + end: '21:00', | ||
| 242 | + timeStr:'20-21' | ||
| 243 | + }, | ||
| 244 | + { | ||
| 245 | + time: '21:00-22:00', | ||
| 246 | + start: '21:00', | ||
| 247 | + end: '22:00', | ||
| 248 | + timeStr:'21-22' | ||
| 249 | + }, | ||
| 250 | + { | ||
| 251 | + time: '22:00-23:00', | ||
| 252 | + start: '22:00', | ||
| 253 | + end: '23:00', | ||
| 254 | + timeStr:'22-07' | ||
| 255 | + }, | ||
| 256 | + { | ||
| 257 | + time: '23:00-24:00', | ||
| 258 | + start: '23:00', | ||
| 259 | + end: '24:00', | ||
| 260 | + timeStr:'22-07' | ||
| 161 | } | 261 | } |
| 162 | ]; | 262 | ]; |
| 163 | return timeList | 263 | return timeList |
garbage-removal/src/manifest.json
| @@ -50,16 +50,18 @@ | @@ -50,16 +50,18 @@ | ||
| 50 | "quickapp" : {}, | 50 | "quickapp" : {}, |
| 51 | /* 小程序特有相关 */ | 51 | /* 小程序特有相关 */ |
| 52 | "mp-weixin" : { | 52 | "mp-weixin" : { |
| 53 | - "optimization":{"subPackages":true}, | 53 | + "optimization" : { |
| 54 | + "subPackages" : true | ||
| 55 | + }, | ||
| 54 | "lazyCodeLoading" : "requiredComponents", | 56 | "lazyCodeLoading" : "requiredComponents", |
| 55 | - "requiredPrivateInfos": ["getLocation", "chooseLocation"], | ||
| 56 | - "appid" : "wxc3f60667dc9d6cea", | ||
| 57 | - "permission":{ | ||
| 58 | - "scope.userLocation":{ | ||
| 59 | - "desc":"你的位置信息将用于小程序位置接口的" | ||
| 60 | - } | 57 | + "requiredPrivateInfos" : [ "getLocation", "chooseLocation" ], |
| 58 | + "appid" : "wx6c12c068d07c46f8", | ||
| 59 | + "permission" : { | ||
| 60 | + "scope.userLocation" : { | ||
| 61 | + "desc" : "你的位置信息将用于小程序位置接口的" | ||
| 62 | + } | ||
| 61 | }, | 63 | }, |
| 62 | - "libVersion": "latest", | 64 | + "libVersion" : "latest", |
| 63 | "setting" : { | 65 | "setting" : { |
| 64 | "urlCheck" : false | 66 | "urlCheck" : false |
| 65 | }, | 67 | }, |
| @@ -72,8 +74,8 @@ | @@ -72,8 +74,8 @@ | ||
| 72 | "sdkConfigs" : { | 74 | "sdkConfigs" : { |
| 73 | "maps" : { | 75 | "maps" : { |
| 74 | "amap" : { | 76 | "amap" : { |
| 75 | - "key" : "b1824190654be63b3111c33127a120ca", | ||
| 76 | - "securityJsCode" : "63ff81bc91c64d3f044d7788bfa8e693", | 77 | + "key" : "d459b6535916a23c05ade96744cf5d31", |
| 78 | + "securityJsCode" : "22356e0e06fbedc6667519e170f232ae", | ||
| 77 | "serviceHost" : "" | 79 | "serviceHost" : "" |
| 78 | } | 80 | } |
| 79 | } | 81 | } |
garbage-removal/src/pages/home-info/address/addSite.vue
| @@ -167,6 +167,7 @@ const submit = () => { | @@ -167,6 +167,7 @@ const submit = () => { | ||
| 167 | const chooseAddressDetail = () => { | 167 | const chooseAddressDetail = () => { |
| 168 | console.log('打开地图选择地址'); | 168 | console.log('打开地图选择地址'); |
| 169 | let coordinate = 'gcj02'; | 169 | let coordinate = 'gcj02'; |
| 170 | + // #ifdef MP-WEIXIN | ||
| 170 | uni.chooseLocation({ | 171 | uni.chooseLocation({ |
| 171 | type: coordinate, | 172 | type: coordinate, |
| 172 | success: function (res) { | 173 | success: function (res) { |
| @@ -175,7 +176,6 @@ const chooseAddressDetail = () => { | @@ -175,7 +176,6 @@ const chooseAddressDetail = () => { | ||
| 175 | addressInfo.garLongitude = res.longitude | 176 | addressInfo.garLongitude = res.longitude |
| 176 | addressInfo.garLatitude = res.latitude | 177 | addressInfo.garLatitude = res.latitude |
| 177 | addressInfo.garCoordinate = coordinate | 178 | addressInfo.garCoordinate = coordinate |
| 178 | - // #ifdef MP-WEIXIN | ||
| 179 | let SecretKey = "DsNi4Hug4POlYLJ8AaloKB6Uob5fvL8l"; | 179 | let SecretKey = "DsNi4Hug4POlYLJ8AaloKB6Uob5fvL8l"; |
| 180 | let key = "HNEBZ-PWHLR-M5AWP-WMRT3-XEOHJ-Y2BHY"; | 180 | let key = "HNEBZ-PWHLR-M5AWP-WMRT3-XEOHJ-Y2BHY"; |
| 181 | let md5Param = `/ws/geocoder/v1/?key=${key}&location=${res.latitude},${res.longitude}`; | 181 | let md5Param = `/ws/geocoder/v1/?key=${key}&location=${res.latitude},${res.longitude}`; |
| @@ -192,13 +192,33 @@ const chooseAddressDetail = () => { | @@ -192,13 +192,33 @@ const chooseAddressDetail = () => { | ||
| 192 | } | 192 | } |
| 193 | } | 193 | } |
| 194 | }); | 194 | }); |
| 195 | - // #endif | 195 | + |
| 196 | } | 196 | } |
| 197 | }, | 197 | }, |
| 198 | fail: function (res) { | 198 | fail: function (res) { |
| 199 | console.log(res); | 199 | console.log(res); |
| 200 | } | 200 | } |
| 201 | }); | 201 | }); |
| 202 | + // #endif | ||
| 203 | + | ||
| 204 | + // #ifdef H5 | ||
| 205 | + uni.chooseLocation({ | ||
| 206 | + type: coordinate, | ||
| 207 | + latitude:113.081000, | ||
| 208 | + longitude:28.246000, | ||
| 209 | + success: function (res) { | ||
| 210 | + if (res.address) { | ||
| 211 | + addressInfo.addressDetail = res.address + res.name; | ||
| 212 | + addressInfo.garLongitude = res.longitude | ||
| 213 | + addressInfo.garLatitude = res.latitude | ||
| 214 | + addressInfo.garCoordinate = coordinate | ||
| 215 | + } | ||
| 216 | + }, | ||
| 217 | + fail: function (res) { | ||
| 218 | + console.log(res); | ||
| 219 | + } | ||
| 220 | + }); | ||
| 221 | + // #endif | ||
| 202 | } | 222 | } |
| 203 | 223 | ||
| 204 | onMounted(() => { | 224 | onMounted(() => { |
garbage-removal/src/pages/home-info/clean/index.vue
| @@ -89,15 +89,6 @@ | @@ -89,15 +89,6 @@ | ||
| 89 | </view> | 89 | </view> |
| 90 | </view> | 90 | </view> |
| 91 | 91 | ||
| 92 | - | ||
| 93 | - <view class="company-clean-container-car-main-content-type"> | ||
| 94 | - <view class="company-clean-container-car-main-content-type-price-area"> | ||
| 95 | - <text style="color: red;">*</text>预估费用: | ||
| 96 | - </view> | ||
| 97 | - <view style=" width:100%;display:flex; color:#909399; align-items: center;"> | ||
| 98 | - <u-number-box :min="0" :max="9999999" integer buttonSize="46" :inputWidth="100" v-model="paramFrom.garEstimatedCost" ></u-number-box> | ||
| 99 | - </view> | ||
| 100 | - </view> | ||
| 101 | 92 | ||
| 102 | <view class="company-clean-container-car-main-content-type"> | 93 | <view class="company-clean-container-car-main-content-type"> |
| 103 | <view class="company-clean-container-car-main-content-type-price-area"> | 94 | <view class="company-clean-container-car-main-content-type-price-area"> |
| @@ -430,6 +421,19 @@ const orderClick = ref(true) | @@ -430,6 +421,19 @@ const orderClick = ref(true) | ||
| 430 | * 处理下单 | 421 | * 处理下单 |
| 431 | */ | 422 | */ |
| 432 | const handleOderSure = async () => { | 423 | const handleOderSure = async () => { |
| 424 | + console.log("paramFrom.value.garEstimatedCost=======================>"+paramFrom.value.garEstimatedCost); | ||
| 425 | + | ||
| 426 | + if(null == paramFrom.value.garEstimatedCost|| "" == paramFrom.value.garEstimatedCost || undefined == paramFrom.value.garEstimatedCost){ | ||
| 427 | + jumpPrompt("预估费用不能为空"); | ||
| 428 | + console.log("----------------------->2"); | ||
| 429 | + | ||
| 430 | + return; | ||
| 431 | + } | ||
| 432 | + if(paramFrom.value.garEstimatedCost<=0){ | ||
| 433 | + jumpPrompt("预估费用必须大于0"); | ||
| 434 | + return; | ||
| 435 | + } | ||
| 436 | + | ||
| 433 | let garCarInfos = []; | 437 | let garCarInfos = []; |
| 434 | for (const key in garCarInfoList.value) { | 438 | for (const key in garCarInfoList.value) { |
| 435 | if(garCarInfoList.value[key]&& garCarInfoList.value[key].garOrderCarNumber && garCarInfoList.value[key].garOrderCarNumber>0){ | 439 | if(garCarInfoList.value[key]&& garCarInfoList.value[key].garOrderCarNumber && garCarInfoList.value[key].garOrderCarNumber>0){ |
| @@ -452,10 +456,7 @@ const handleOderSure = async () => { | @@ -452,10 +456,7 @@ const handleOderSure = async () => { | ||
| 452 | } | 456 | } |
| 453 | } | 457 | } |
| 454 | 458 | ||
| 455 | - if(paramFrom.value.garEstimatedCost<0){ | ||
| 456 | - jumpPrompt("预估费用必须大于0"); | ||
| 457 | - return; | ||
| 458 | - } | 459 | + |
| 459 | 460 | ||
| 460 | 461 | ||
| 461 | let params = { | 462 | let params = { |
| @@ -588,6 +589,9 @@ const validateParams = (params) => { | @@ -588,6 +589,9 @@ const validateParams = (params) => { | ||
| 588 | case "garOrderAgreementTime": | 589 | case "garOrderAgreementTime": |
| 589 | jumpPrompt('请选择预约时间') | 590 | jumpPrompt('请选择预约时间') |
| 590 | break; | 591 | break; |
| 592 | + case "garEstimatedCost": | ||
| 593 | + jumpPrompt('请输入预估费用') | ||
| 594 | + break; | ||
| 591 | 595 | ||
| 592 | } | 596 | } |
| 593 | return false; | 597 | return false; |
garbage-removal/src/pages/wode-info/wode-info-choose/index.vue
| @@ -41,14 +41,6 @@ | @@ -41,14 +41,6 @@ | ||
| 41 | 41 | ||
| 42 | <script setup> | 42 | <script setup> |
| 43 | import { updateUserInfo } from "@/apis/user.js"; | 43 | import { updateUserInfo } from "@/apis/user.js"; |
| 44 | -import driverImage from "@/static/image/driver.png"; | ||
| 45 | -import handleImage from "@/static/image/handler.png"; | ||
| 46 | -import managerImage from "@/static/image/manager.png"; | ||
| 47 | -import companyPngUrl from '@/static/image/role/company.png'; | ||
| 48 | -import disposalPngUrl from '@/static/image/role/disposal.png'; | ||
| 49 | -import handlerPngUrl from '@/static/image/role/handler.png'; | ||
| 50 | -import userPngUrl from '@/static/image/role/user.png'; | ||
| 51 | -import userImage from "@/static/image/user.png"; | ||
| 52 | import { useMainStore } from '@/stores/index.js'; | 44 | import { useMainStore } from '@/stores/index.js'; |
| 53 | import { setRequestToken } from '@/utils/request/request.js'; | 45 | import { setRequestToken } from '@/utils/request/request.js'; |
| 54 | import { onLoad } from "@dcloudio/uni-app"; | 46 | import { onLoad } from "@dcloudio/uni-app"; |
| @@ -58,42 +50,42 @@ const store = useMainStore(); | @@ -58,42 +50,42 @@ const store = useMainStore(); | ||
| 58 | const typeList = ref([{ | 50 | const typeList = ref([{ |
| 59 | label: "用户", | 51 | label: "用户", |
| 60 | info: '下单清运', | 52 | info: '下单清运', |
| 61 | - image: userImage, | 53 | + image: "userImage", |
| 62 | order: 999, | 54 | order: 999, |
| 63 | classStyle: 'choose-type-item-top-back-sky', | 55 | classStyle: 'choose-type-item-top-back-sky', |
| 64 | isNow: false, | 56 | isNow: false, |
| 65 | isExit: true, | 57 | isExit: true, |
| 66 | - imageUrl: userPngUrl | 58 | + imageUrl: "userPngUrl" |
| 67 | }, { | 59 | }, { |
| 68 | label: "运输企业负责人", | 60 | label: "运输企业负责人", |
| 69 | info: '负责订单处理', | 61 | info: '负责订单处理', |
| 70 | company: '', | 62 | company: '', |
| 71 | - image: managerImage, | 63 | + image: "managerImage", |
| 72 | isExit: false, | 64 | isExit: false, |
| 73 | classStyle: 'choose-type-item-top-back-sun', | 65 | classStyle: 'choose-type-item-top-back-sun', |
| 74 | order: 1, | 66 | order: 1, |
| 75 | isNow: false, | 67 | isNow: false, |
| 76 | - imageUrl: companyPngUrl | 68 | + imageUrl: "companyPngUrl" |
| 77 | }, { | 69 | }, { |
| 78 | label: "清运车辆驾驶员", | 70 | label: "清运车辆驾驶员", |
| 79 | info: '负责垃圾清运', | 71 | info: '负责垃圾清运', |
| 80 | company: '', | 72 | company: '', |
| 81 | - image: driverImage, | 73 | + image: "driverImage", |
| 82 | isExit: false, | 74 | isExit: false, |
| 83 | classStyle: 'choose-type-item-top-back-blue', | 75 | classStyle: 'choose-type-item-top-back-blue', |
| 84 | order: 2, | 76 | order: 2, |
| 85 | isNow: false, | 77 | isNow: false, |
| 86 | - imageUrl: handlerPngUrl | 78 | + imageUrl: "handlerPngUrl" |
| 87 | }, { | 79 | }, { |
| 88 | label: "处置场所负责人", | 80 | label: "处置场所负责人", |
| 89 | info: '负责现场指导', | 81 | info: '负责现场指导', |
| 90 | company: '', | 82 | company: '', |
| 91 | - image: handleImage, | 83 | + image: "handleImage", |
| 92 | isExit: false, | 84 | isExit: false, |
| 93 | classStyle: 'choose-type-item-top-back-pink', | 85 | classStyle: 'choose-type-item-top-back-pink', |
| 94 | order: 3, | 86 | order: 3, |
| 95 | isNow: false, | 87 | isNow: false, |
| 96 | - imageUrl: disposalPngUrl | 88 | + imageUrl: "disposalPngUrl" |
| 97 | }]) | 89 | }]) |
| 98 | const unitInfo = ref([]) | 90 | const unitInfo = ref([]) |
| 99 | const handlerClick = (val) => { | 91 | const handlerClick = (val) => { |
| @@ -155,6 +147,10 @@ const submit = (userType) => { | @@ -155,6 +147,10 @@ const submit = (userType) => { | ||
| 155 | }) | 147 | }) |
| 156 | 148 | ||
| 157 | } | 149 | } |
| 150 | + | ||
| 151 | +const combinationImagePath=(url)=>{ | ||
| 152 | + return import.meta.env.VITE_BASE_URL+"/"+url; | ||
| 153 | +} | ||
| 158 | onLoad((options) => { | 154 | onLoad((options) => { |
| 159 | // let loginInfo = JSON.parse(options) | 155 | // let loginInfo = JSON.parse(options) |
| 160 | let loginInfo = JSON.parse(decodeURIComponent(options.ruleVos)) | 156 | let loginInfo = JSON.parse(decodeURIComponent(options.ruleVos)) |
| @@ -184,6 +180,17 @@ onLoad((options) => { | @@ -184,6 +180,17 @@ onLoad((options) => { | ||
| 184 | typeList.value[index].isNow = true | 180 | typeList.value[index].isNow = true |
| 185 | userType.value = typeList.value[index].label | 181 | userType.value = typeList.value[index].label |
| 186 | } | 182 | } |
| 183 | + | ||
| 184 | + typeList.value[0].imageUrl = combinationImagePath('role/user.png'); | ||
| 185 | + typeList.value[1].imageUrl = combinationImagePath('role/company.png'); | ||
| 186 | + typeList.value[2].imageUrl = combinationImagePath('role/company.png'); | ||
| 187 | + typeList.value[3].imageUrl = combinationImagePath('role/disposal.png'); | ||
| 188 | + | ||
| 189 | + | ||
| 190 | + typeList.value[0].image = combinationImagePath('user.png'); | ||
| 191 | + typeList.value[1].image = combinationImagePath('manager.png'); | ||
| 192 | + typeList.value[2].image = combinationImagePath('driver.png'); | ||
| 193 | + typeList.value[3].image = combinationImagePath('handler.png'); | ||
| 187 | }) | 194 | }) |
| 188 | </script> | 195 | </script> |
| 189 | 196 |
garbage-removal/src/static/image/driver.png deleted
100644 → 0
29.9 KB
garbage-removal/src/static/image/handler.png deleted
100644 → 0
12.6 KB
garbage-removal/src/static/image/role/company.png deleted
100644 → 0
9.72 KB
garbage-removal/src/static/image/role/disposal.png deleted
100644 → 0
14.5 KB
garbage-removal/src/static/image/role/handler.png deleted
100644 → 0
14.8 KB
garbage-removal/src/static/image/role/user.png deleted
100644 → 0
10 KB
garbage-removal/src/static/image/user.png deleted
100644 → 0
10.1 KB