wl-design-mobile 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/list/lambo-list.vue +2 -2
- package/package.json +1 -1
- package/util/jssdk.js +35 -2
package/list/lambo-list.vue
CHANGED
|
@@ -141,14 +141,14 @@ export default {
|
|
|
141
141
|
console.error("lambo-init-list -- onLoad -- 查询[" + this.title + "]数据失败", res)
|
|
142
142
|
Toast.fail("查询[" + this.title + "]数据失败:" + res.data || '')
|
|
143
143
|
this.error = true;
|
|
144
|
-
this.errorText = res.data
|
|
144
|
+
this.errorText = '请求失败\n'+res.data
|
|
145
145
|
}
|
|
146
146
|
this.loading = false; // 加载状态结束
|
|
147
147
|
}).catch(err => {
|
|
148
148
|
console.error("lambo-init-list -- onLoad -- 查询[" + this.title + "]异常:", err)
|
|
149
149
|
Toast.fail("查询[" + this.url + "]数据异常")
|
|
150
150
|
this.error = true;
|
|
151
|
-
this.errorText = err
|
|
151
|
+
this.errorText = '请求失败\n'+err
|
|
152
152
|
this.loading = false; // 加载状态结束
|
|
153
153
|
})
|
|
154
154
|
}
|
package/package.json
CHANGED
package/util/jssdk.js
CHANGED
|
@@ -198,7 +198,39 @@ let JsSDK = (function () {
|
|
|
198
198
|
reject('微信获取位置失败:'+error)
|
|
199
199
|
})
|
|
200
200
|
}
|
|
201
|
-
|
|
201
|
+
})
|
|
202
|
+
}
|
|
203
|
+
function openLocation({longitude,latitude,name,address,scale= 15} = {}){
|
|
204
|
+
return new Promise((resolve, reject)=>{
|
|
205
|
+
if(getAppType() === '30'){
|
|
206
|
+
configDd().then(()=>{
|
|
207
|
+
dd.openLocation({
|
|
208
|
+
title: name,
|
|
209
|
+
address: address,
|
|
210
|
+
latitude: latitude,
|
|
211
|
+
longitude: longitude,
|
|
212
|
+
success: () => {},
|
|
213
|
+
fail: () => {},
|
|
214
|
+
complete: () => {},
|
|
215
|
+
});
|
|
216
|
+
resolve()
|
|
217
|
+
}).catch((error)=>{
|
|
218
|
+
reject('钉钉启动内置地图位置失败:'+error)
|
|
219
|
+
})
|
|
220
|
+
}else{
|
|
221
|
+
configWx().then(()=>{
|
|
222
|
+
wx.openLocation({
|
|
223
|
+
latitude: latitude,//目的地latitude
|
|
224
|
+
longitude: longitude,//目的地longitude
|
|
225
|
+
name: name,
|
|
226
|
+
address: address,
|
|
227
|
+
scale: scale//地图缩放大小,可根据情况具体调整
|
|
228
|
+
});
|
|
229
|
+
resolve()
|
|
230
|
+
}).catch((error)=>{
|
|
231
|
+
reject('微信启动内置地图失败:'+error)
|
|
232
|
+
})
|
|
233
|
+
}
|
|
202
234
|
})
|
|
203
235
|
}
|
|
204
236
|
|
|
@@ -206,7 +238,8 @@ let JsSDK = (function () {
|
|
|
206
238
|
return {
|
|
207
239
|
init:init,
|
|
208
240
|
scanQRCode: scanQRCode,
|
|
209
|
-
getLocation:getLocation
|
|
241
|
+
getLocation:getLocation,
|
|
242
|
+
openLocation:openLocation
|
|
210
243
|
};
|
|
211
244
|
})();
|
|
212
245
|
|