Commit aa440716d1c74d76de3d0917d2127ebeaef2c99b

Authored by wangfan
1 parent f2ba0604

地图优化

@@ -122,9 +122,14 @@ App({ @@ -122,9 +122,14 @@ App({
122 'content-type': 'application/x-www-form-urlencoded' 122 'content-type': 'application/x-www-form-urlencoded'
123 }, 123 },
124 success: function (res) { 124 success: function (res) {
125 - let openid=res.data.data.openid;  
126 - wx.setStorage({key:'customer_openid',data:openid});  
127 - success(openid); 125 + try{
  126 + let openid=res.data.data.openid;
  127 + wx.setStorage({key:'customer_openid',data:openid});
  128 + success(openid);
  129 + }catch(e){
  130 + console.log(res);
  131 + fail(res);
  132 + }
128 }, 133 },
129 fail: function (res) { 134 fail: function (res) {
130 console.log(res); 135 console.log(res);
@@ -237,6 +237,7 @@ Page({ @@ -237,6 +237,7 @@ Page({
237 }, 237 },
238 mapUpdated(e){ 238 mapUpdated(e){
239 console.log('mapUpdated', e) 239 console.log('mapUpdated', e)
  240 + if(typeof this.mapCtx=='undefined') return;
240 this.getClassNameFlag=true; 241 this.getClassNameFlag=true;
241 this.mapCtx.getScale({ 242 this.mapCtx.getScale({
242 success:(res)=>{ 243 success:(res)=>{