Commit 648a9ae2 by zhangxw

找车页面交互bug

1 parent 0f5bfa87
...@@ -75,7 +75,7 @@ Page({ ...@@ -75,7 +75,7 @@ Page({
this.getVehicleData() this.getVehicleData()
}, },
getVehicleData(){ getVehicleData(){
if(this.data.sns){ if(this.data.sns){
this.setData({ this.setData({
isLoading: true isLoading: true
}) })
...@@ -107,6 +107,20 @@ Page({ ...@@ -107,6 +107,20 @@ Page({
this.myMap.setData({ // 防止页面跳转回退页面未保留用户的操作 用mapContext 会有问题 this.myMap.setData({ // 防止页面跳转回退页面未保留用户的操作 用mapContext 会有问题
inPoints: includePoints inPoints: includePoints
}) })
wx.getSystemInfo({
success: (res) => {
if (res.platform == 'devtools') { // 开发工具上include-points 失效
this.myMap.getMapCtx().includePoints({
points: includePoints,
padding: [80, 80, 80, 80]
})
} else {
this.myMap.setData({ // 防止页面跳转回退页面未保留用户的操作 用mapContext 会有问题
inPoints: includePoints
})
}
}
})
this.setData({ this.setData({
carInfoArr: res.data, carInfoArr: res.data,
includePoints: includePoints, includePoints: includePoints,
...@@ -185,7 +199,7 @@ Page({ ...@@ -185,7 +199,7 @@ Page({
}) })
this.moveToLocation(Number(this.data.carInfoWindowObj['gpsLocation'].elat), Number(this.data.carInfoWindowObj['gpsLocation'].elng)) this.moveToLocation(Number(this.data.carInfoWindowObj['gpsLocation'].elat), Number(this.data.carInfoWindowObj['gpsLocation'].elng))
carInfoArr.forEach(val => { carInfoArr.forEach(val => {
if (val.id === this.data.carInfoWindowObj.id) { if (val.sn === this.data.carInfoWindowObj.sn) {
val.type = 'gpsLocation' val.type = 'gpsLocation'
} }
}) })
...@@ -217,7 +231,7 @@ Page({ ...@@ -217,7 +231,7 @@ Page({
} }
}) })
carInfoArr.forEach(val => { carInfoArr.forEach(val => {
if (val.id === this.data.carInfoWindowObj.id) { if (val.sn === this.data.carInfoWindowObj.sn) {
val.type = 'bsLocation' val.type = 'bsLocation'
} }
}) })
...@@ -236,7 +250,7 @@ Page({ ...@@ -236,7 +250,7 @@ Page({
let transferAddress = res.data && res.data.result.address_component.province === res.data.result.address_component.city ? (res.data.result.address_component.city + '' + res.data.result.formatted_addresses.rough) : (res.data.result.address_component.province + '' + res.data.result.address_component.city + '' + res.data.result.formatted_addresses.rough) let transferAddress = res.data && res.data.result.address_component.province === res.data.result.address_component.city ? (res.data.result.address_component.city + '' + res.data.result.formatted_addresses.rough) : (res.data.result.address_component.province + '' + res.data.result.address_component.city + '' + res.data.result.formatted_addresses.rough)
data['bsLocation'].transferAddress = transferAddress data['bsLocation'].transferAddress = transferAddress
carInfoArr.forEach(val => { carInfoArr.forEach(val => {
if (val.id === this.data.carInfoWindowObj.id) { if (val.sn === this.data.carInfoWindowObj.sn) {
val.type = 'bsLocation' val.type = 'bsLocation'
val['bsLocation'].transferAddress = transferAddress val['bsLocation'].transferAddress = transferAddress
} }
......
{ {
"description": "项目配置文件。", "description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"setting": { "setting": {
"urlCheck": false, "urlCheck": false,
"es6": true, "es6": true,
...@@ -36,33 +36,19 @@ ...@@ -36,33 +36,19 @@
"minifyWXML": true, "minifyWXML": true,
"showES6CompileOption": false, "showES6CompileOption": false,
"useCompilerPlugins": false, "useCompilerPlugins": false,
"ignoreUploadUnusedFiles": true "ignoreUploadUnusedFiles": true,
"useStaticServer": true
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "1.9.91", "libVersion": "2.23.4",
"appid": "wxdae8cf8710b62fee", "appid": "wxdae8cf8710b62fee",
"projectname": "wx", "projectname": "wx",
"isGameTourist": false,
"simulatorType": "wechat", "simulatorType": "wechat",
"simulatorPluginLibVersion": {}, "simulatorPluginLibVersion": {},
"condition": { "condition": {
"search": {
"list": []
},
"conversation": {
"list": []
},
"plugin": {
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"id": 0,
"name": "pages/wxPublicPage/wxPublicPage", "name": "pages/wxPublicPage/wxPublicPage",
"pathName": "pages/wxPublicPage/wxPublicPage", "pathName": "pages/wxPublicPage/wxPublicPage",
"query": "", "query": "",
...@@ -71,5 +57,13 @@ ...@@ -71,5 +57,13 @@
} }
] ]
} }
},
"packOptions": {
"ignore": [],
"include": []
},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 4
} }
} }
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!