This commit is contained in:
ylj20011123 2025-06-30 19:51:44 +08:00
parent 8f55c2e695
commit 3cd150cc9d
71 changed files with 173 additions and 98 deletions

View File

@ -396,7 +396,10 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
comeForm: {
type: String,
default: "",
}
}, },
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
onReady() { onReady() {
@ -463,6 +466,10 @@ export default {
}, },
// //
handleOpenDetail(item) { handleOpenDetail(item) {
if (this.comeForm === 'scanCode') {
this.$emit("handleGetNowService", item)
return
}
console.log('this.noChargeDetail', this.noChargeDetail); console.log('this.noChargeDetail', this.noChargeDetail);
if (this.noChargeDetail) { if (this.noChargeDetail) {
@ -800,6 +807,10 @@ export default {
}, },
// //
handleGoServiceDetail(id, obj) { handleGoServiceDetail(id, obj) {
if (this.comeForm === 'scanCode') {
this.$emit("handleGetNowService", obj)
return
}
if (this.pageType === "newMap") { if (this.pageType === "newMap") {
let res = this.handleChangeServiceInfo(obj); let res = this.handleChangeServiceInfo(obj);
@ -825,6 +836,12 @@ export default {
}, },
// //
handleGoDetail(id, obj) { handleGoDetail(id, obj) {
if (this.comeForm === 'scanCode') {
this.$emit("handleGetNowService", obj)
return
}
if (this.pageType === "newMap") { if (this.pageType === "newMap") {
let res = this.handleChangeServiceInfo(obj); let res = this.handleChangeServiceInfo(obj);
uni.setStorageSync("currentService", res); // uni.setStorageSync("currentService", res); //

View File

@ -2,8 +2,8 @@
"name" : "驿佳", "name" : "驿佳",
"appid" : "__UNI__F870657", "appid" : "__UNI__F870657",
"description" : "", "description" : "",
"versionName" : "1.0.33", "versionName" : "1.0.34",
"versionCode" : 1033, "versionCode" : 1034,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

View File

@ -219,8 +219,8 @@
<view class="pageBottomTop"> <view class="pageBottomTop">
<view class="leftSearchBox"> <view class="leftSearchBox">
<image class="searchIcon" src="https://eshangtech.com/wanmeiyizhanImg/app/chargeSearch.png" /> <image class="searchIcon" src="https://eshangtech.com/wanmeiyizhanImg/app/chargeSearch.png" />
<input style="margin-left: 16rpx; font-size: 28rpx" placeholder="请输入服务区" v-model="searchText" <input style="margin-left: 16rpx; font-size: 28rpx;width: calc(100% - 44rpx);" placeholder="请输入服务区"
@confirm="handleConfirm" /> v-model="searchText" @confirm="handleConfirm" />
</view> </view>
<view class="rightBox" @click="handleChangePageType"> <view class="rightBox" @click="handleChangePageType">
@ -290,8 +290,8 @@
<view class="pageBottomTop"> <view class="pageBottomTop">
<view class="leftSearchBox"> <view class="leftSearchBox">
<image class="searchIcon" src="https://eshangtech.com/wanmeiyizhanImg/app/chargeSearch.png" /> <image class="searchIcon" src="https://eshangtech.com/wanmeiyizhanImg/app/chargeSearch.png" />
<input style="margin-left: 16rpx; font-size: 28rpx" placeholder="请输入服务区" v-model="searchText" <input style="margin-left: 16rpx; font-size: 28rpx;width: calc(100% - 44rpx)" placeholder="请输入服务区"
@confirm="handleConfirm" /> v-model="searchText" @confirm="handleConfirm" />
</view> </view>
<view class="rightBox" @click="handleChangePageType"> <view class="rightBox" @click="handleChangePageType">
@ -303,7 +303,8 @@
<view v-if="showChargeList"> <view v-if="showChargeList">
<!-- <charge-box ref="chargeBoxRef" :serviceAreaList="allServiceNameList" :pageStyleType="1" <!-- <charge-box ref="chargeBoxRef" :serviceAreaList="allServiceNameList" :pageStyleType="1"
:pageType="'mapList'" /> --> :pageType="'mapList'" /> -->
<chargeBoxStyle :dataList="allDataList" :pageType="'mapList'" /> <chargeBoxStyle :dataList="allDataList" :pageType="'mapList'" :comeForm="'scanCode'"
@handleGetNowService="handleGetNowService" />
</view> </view>
</scroll-view> </scroll-view>
</view> </view>
@ -406,6 +407,13 @@ export default {
}), }),
}, },
methods: { methods: {
//
handleGetNowService(obj) {
console.log('objobjobjobj', obj);
this.searchText = obj.SERVERPART_NAME
this.handleChangePageType()
this.handleConfirm()
},
extractDirection(stationName) { extractDirection(stationName) {
if (!stationName) return ''; if (!stationName) return '';
// //
@ -1183,7 +1191,6 @@ export default {
this.allDataList = this.allDataList.concat(list) this.allDataList = this.allDataList.concat(list)
console.log('djasijdaskjdaslkdj', this.allDataList); console.log('djasijdaskjdaslkdj', this.allDataList);
}, },
handleChangeShow(e) { handleChangeShow(e) {
this.showMap = !e this.showMap = !e
this.$forceUpdate(); this.$forceUpdate();
@ -2331,7 +2338,7 @@ export default {
.funItemText { .funItemText {
font-family: Source Han Sans SC, Source Han Sans SC; font-family: Source Han Sans SC, Source Han Sans SC;
font-weight: 400; font-weight: 400;
font-size: 26rpx; font-size: 28rpx;
color: #FFFFFF; color: #FFFFFF;
text-align: left; text-align: left;
font-style: normal; font-style: normal;

View File

@ -1,15 +1,15 @@
<template> <template>
<view class="main"> <view class="main">
<view :class="showListPage ? 'mapBox moveLeft' : 'mapBox'" v-if="!showListPage"> <view :class="showListPage ? 'mapBox moveLeft' : 'mapBox'" v-if="!showListPage">
<movable-area style="width: 100vw; height: 100vh"> <view style="width: 100vw; height: 100vh">
<map id="myMap" :longitude="longitude" :latitude="latitude" class="map" :scale="17" :show-location="true" <map id="myMap" :longitude="longitude" :latitude="latitude" class="map" :show-location="true" :markers="markers"
:markers="markers" :enable-scroll="!isDragging" @markertap="handleClickMarker"></map> @markertap="handleClickMarker"></map>
<view class="topBox"> <view class="topBox">
<view class="topRight"> <view class="topRight">
<image class="searchIcon" src="https://eshangtech.com/wanmeiyizhanImg/home/searchIcon.png" /> <image class="searchIcon" src="https://eshangtech.com/wanmeiyizhanImg/home/searchIcon.png" />
<input style="margin-left: 16rpx; font-size: 28rpx" placeholder="请输入服务区" v-model="searchText" <input style="margin-left: 16rpx; font-size: 28rpx;width: calc(100% - 32rpx);" placeholder="请输入服务区"
@confirm="handleConfirm" /> v-model="searchText" @confirm="handleConfirm" />
<!-- <span class="searchText">请输入服务区</span> --> <!-- <span class="searchText">请输入服务区</span> -->
</view> </view>
@ -94,7 +94,7 @@
</view> </view>
</view> </view>
</view> </view>
</movable-area> </view>
</view> </view>
<view :class="showListPage ? 'listPage moveRight' : 'listPage '" v-if="showListPage"> <view :class="showListPage ? 'listPage moveRight' : 'listPage '" v-if="showListPage">
@ -102,7 +102,7 @@
<view class="searchBox"> <view class="searchBox">
<view class="topRight"> <view class="topRight">
<image class="searchIcon" src="https://eshangtech.com/wanmeiyizhanImg/home/searchIcon.png" /> <image class="searchIcon" src="https://eshangtech.com/wanmeiyizhanImg/home/searchIcon.png" />
<input style="margin-left: 16rpx; font-size: 28rpx" placeholder="请输入服务区" v-model="searchText" <input style="margin-left: 16rpx; font-size: 28rpx;width: calc(100% - 32rpx)" placeholder="请输入服务区" v-model="searchText"
@confirm="handleConfirm" /> @confirm="handleConfirm" />
<!-- <span class="searchText">请输入服务区</span> --> <!-- <span class="searchText">请输入服务区</span> -->
</view> </view>
@ -773,7 +773,8 @@ export default {
justify-content: space-between; justify-content: space-between;
.topRight { .topRight {
width: calc(100% - 240rpx); // width: calc(100% - 240rpx);
width: 100%;
height: 72rpx; height: 72rpx;
background: #fff; background: #fff;
border-radius: 36rpx; border-radius: 36rpx;
@ -1170,7 +1171,8 @@ export default {
justify-content: space-between; justify-content: space-between;
.topRight { .topRight {
width: calc(100% - 240rpx); // width: calc(100% - 240rpx);
width: 100%;
height: 72rpx; height: 72rpx;
background: #fff; background: #fff;
border-radius: 36rpx; border-radius: 36rpx;

View File

@ -11,9 +11,9 @@
startObj.name || "" startObj.name || ""
}}</view> }}</view>
<view class="positionBox" v-if="startEndType !== 1"> <view class="positionBox" v-if="startEndType !== 1">
<textarea style="width: 100%;" placeholder="请输入目的地" auto-height placeholder-style="font-size: 30rpx" <input style="width: 100%;" placeholder="请输入目的地" auto-height placeholder-style="font-size: 30rpx"
v-model="searchPoint" confirm-type="search" @focus="handleEndPlaceFocus" @input="searchPOI" v-model="searchPoint" confirm-type="search" @focus="handleEndPlaceFocus" @input="searchPOI"
@confirm="handleConfirmToSearch"></textarea> @confirm="handleConfirmToSearch"></input>
<!-- @blur="handleEndPlaceBlur" --> <!-- @blur="handleEndPlaceBlur" -->
<!-- @confirm="searchPOI" --> <!-- @confirm="searchPOI" -->
@ -24,9 +24,9 @@
<view class="itemLeftItem"> <view class="itemLeftItem">
<view class="positionIcon endObj"></view> <view class="positionIcon endObj"></view>
<view class="positionBox noBorderBottom" v-if="startEndType === 1"> <view class="positionBox noBorderBottom" v-if="startEndType === 1">
<textarea style="width: 100%;" auto-height placeholder="请输入目的地" placeholder-style="font-size: 30rpx" <input style="width: 100%;" auto-height placeholder="请输入目的地" placeholder-style="font-size: 30rpx"
v-model="searchPoint" confirm-type="search" @focus="handleEndPlaceFocus" @input="searchPOI" v-model="searchPoint" confirm-type="search" @focus="handleEndPlaceFocus" @input="searchPOI"
@confirm="handleConfirmToSearch"></textarea> @confirm="handleConfirmToSearch"></input>
<!-- @blur="handleEndPlaceBlur" --> <!-- @blur="handleEndPlaceBlur" -->
<!-- @confirm="searchPOI" --> <!-- @confirm="searchPOI" -->
@ -35,9 +35,8 @@
<view class="positionBox noBorderBottom" v-if="startEndType !== 1">{{ endObj.name || "" }}</view> <view class="positionBox noBorderBottom" v-if="startEndType !== 1">{{ endObj.name || "" }}</view>
</view> </view>
</view> </view>
<view class="itemRight"> <view class="itemRight" @click="handleChangeStartEnd">
<image class="reachIcon" src="https://eshangtech.com/wanmeiyizhanImg/home/reachIcon.png" <image class="reachIcon" src="https://eshangtech.com/wanmeiyizhanImg/home/reachIcon.png" />
@click="handleChangeStartEnd" />
</view> </view>
</view> </view>
</view> </view>
@ -733,9 +732,54 @@ export default {
} }
_this.pointList = list; _this.pointList = list;
console.log("_this.pointList", _this.pointList); console.log("_this.pointList", _this.pointList);
let result = _this.getBestMatchFromPointList()
console.log("resresresres", result);
if (result && result.id) {
const idx = list.findIndex(item => item.id === result.id);
if (idx > 0) {
const [matchItem] = list.splice(idx, 1);
list.unshift(matchItem);
}
}
_this.pointList = list;
}, },
}); });
}, },
getBestMatchFromPointList() {
if (!this.searchPoint || !this.pointList || this.pointList.length === 0) return null;
let bestItem = null;
let bestRatio = 0;
this.pointList.forEach(item => {
const label = item.label || item.name || '';
if (!label) return;
// searchPointlabel
let matchCount = 0;
let labelIdx = 0;
for (let i = 0; i < this.searchPoint.length; i++) {
const char = this.searchPoint[i];
labelIdx = label.indexOf(char, labelIdx);
if (labelIdx !== -1) {
matchCount++;
labelIdx++; //
} else {
break;
}
}
//
if (matchCount === this.searchPoint.length) {
const ratio = matchCount / label.length;
if (ratio > bestRatio) {
bestRatio = ratio;
bestItem = item;
}
}
});
return bestItem;
},
// //
handleGoUsMap(obj) { handleGoUsMap(obj) {
console.log("obj", obj); console.log("obj", obj);
@ -2165,6 +2209,10 @@ export default {
} }
.itemRight { .itemRight {
width: 24rpx;
height: 130rpx;
display: flex;
align-items: center;
margin-left: 6rpx; margin-left: 6rpx;
.reachIcon { .reachIcon {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1119,8 +1119,8 @@ function populateParameters(result) {
var parameters = { var parameters = {
appId: "__UNI__F870657", appId: "__UNI__F870657",
appName: "驿佳", appName: "驿佳",
appVersion: "1.0.33", appVersion: "1.0.34",
appVersionCode: "1033", appVersionCode: "1034",
appLanguage: getAppLanguage(hostLanguage), appLanguage: getAppLanguage(hostLanguage),
uniCompileVersion: "4.45", uniCompileVersion: "4.45",
uniCompilerVersion: "4.45", uniCompilerVersion: "4.45",
@ -1220,8 +1220,8 @@ var getAppBaseInfo = {
result = sortObject(Object.assign(result, { result = sortObject(Object.assign(result, {
appId: "__UNI__F870657", appId: "__UNI__F870657",
appName: "驿佳", appName: "驿佳",
appVersion: "1.0.33", appVersion: "1.0.34",
appVersionCode: "1033", appVersionCode: "1034",
appLanguage: getAppLanguage(hostLanguage), appLanguage: getAppLanguage(hostLanguage),
hostVersion: version, hostVersion: version,
hostLanguage: hostLanguage, hostLanguage: hostLanguage,

View File

@ -435,6 +435,7 @@ var _default = {
}); });
} else { } else {
var seatInfo = uni.getStorageSync("seatInfo"); var seatInfo = uni.getStorageSync("seatInfo");
console.log('11111', obj);
var req = { var req = {
start: { start: {
coordinate: { coordinate: {
@ -445,8 +446,8 @@ var _default = {
}, },
end: { end: {
coordinate: { coordinate: {
latitude: obj.latitude, latitude: obj.SERVERPART_Y,
longitude: obj.longitude longitude: obj.SERVERPART_X
}, },
name: obj.SERVERPART_NAME name: obj.SERVERPART_NAME
}, },