update
This commit is contained in:
parent
8f55c2e695
commit
3cd150cc9d
@ -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); // 当前选中服务区信息
|
||||||
|
|||||||
@ -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" : {
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
@ -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;
|
||||||
|
// 统计searchPoint中有多少字符在label中出现(顺序一致)
|
||||||
|
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 {
|
||||||
|
|||||||
6
unpackage/dist/build/app-plus/app-service.js
vendored
6
unpackage/dist/build/app-plus/app-service.js
vendored
File diff suppressed because one or more lines are too long
2
unpackage/dist/build/app-plus/app-view.js
vendored
2
unpackage/dist/build/app-plus/app-view.js
vendored
File diff suppressed because one or more lines are too long
2
unpackage/dist/build/app-plus/manifest.json
vendored
2
unpackage/dist/build/app-plus/manifest.json
vendored
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
@ -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,
|
||||||
|
|||||||
@ -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
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user