Commit 648a9ae2 by zhangxw

找车页面交互bug

1 parent 0f5bfa87
......@@ -75,7 +75,7 @@ Page({
this.getVehicleData()
},
getVehicleData(){
if(this.data.sns){
if(this.data.sns){
this.setData({
isLoading: true
})
......@@ -107,6 +107,20 @@ Page({
this.myMap.setData({ // 防止页面跳转回退页面未保留用户的操作 用mapContext 会有问题
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({
carInfoArr: res.data,
includePoints: includePoints,
......@@ -185,7 +199,7 @@ Page({
})
this.moveToLocation(Number(this.data.carInfoWindowObj['gpsLocation'].elat), Number(this.data.carInfoWindowObj['gpsLocation'].elng))
carInfoArr.forEach(val => {
if (val.id === this.data.carInfoWindowObj.id) {
if (val.sn === this.data.carInfoWindowObj.sn) {
val.type = 'gpsLocation'
}
})
......@@ -217,7 +231,7 @@ Page({
}
})
carInfoArr.forEach(val => {
if (val.id === this.data.carInfoWindowObj.id) {
if (val.sn === this.data.carInfoWindowObj.sn) {
val.type = 'bsLocation'
}
})
......@@ -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)
data['bsLocation'].transferAddress = transferAddress
carInfoArr.forEach(val => {
if (val.id === this.data.carInfoWindowObj.id) {
if (val.sn === this.data.carInfoWindowObj.sn) {
val.type = 'bsLocation'
val['bsLocation'].transferAddress = transferAddress
}
......
{
"description": "项目配置文件。",
"description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"setting": {
"urlCheck": false,
"es6": true,
......@@ -36,33 +36,19 @@
"minifyWXML": true,
"showES6CompileOption": false,
"useCompilerPlugins": false,
"ignoreUploadUnusedFiles": true
"ignoreUploadUnusedFiles": true,
"useStaticServer": true
},
"compileType": "miniprogram",
"libVersion": "1.9.91",
"libVersion": "2.23.4",
"appid": "wxdae8cf8710b62fee",
"projectname": "wx",
"isGameTourist": false,
"simulatorType": "wechat",
"simulatorPluginLibVersion": {},
"condition": {
"search": {
"list": []
},
"conversation": {
"list": []
},
"plugin": {
"list": []
},
"game": {
"currentL": -1,
"list": []
},
"miniprogram": {
"list": [
{
"id": 0,
"name": "pages/wxPublicPage/wxPublicPage",
"pathName": "pages/wxPublicPage/wxPublicPage",
"query": "",
......@@ -71,5 +57,13 @@
}
]
}
},
"packOptions": {
"ignore": [],
"include": []
},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 4
}
}
\ 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!