wl-design-mobile 0.8.21 → 0.8.23
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/package.json +1 -1
- package/util/jssdk.js +22 -5
package/package.json
CHANGED
package/util/jssdk.js
CHANGED
|
@@ -244,7 +244,8 @@ let JsSDK = (function () {
|
|
|
244
244
|
filters: ['QR','EAN13','EAN8']
|
|
245
245
|
}
|
|
246
246
|
ccworkBridge.ccworkScanCode(params, (res) => {
|
|
247
|
-
|
|
247
|
+
console.log(res)
|
|
248
|
+
resolve(res.result)
|
|
248
249
|
})
|
|
249
250
|
}else{
|
|
250
251
|
configWx().then(()=>{
|
|
@@ -281,7 +282,10 @@ let JsSDK = (function () {
|
|
|
281
282
|
quality: 'mid',
|
|
282
283
|
mode: 'camera'
|
|
283
284
|
}
|
|
284
|
-
ccworkBridge.ccworkGetPicsFromCameraAndAlbumV4(params, (res) => {
|
|
285
|
+
ccworkBridge.ccworkGetPicsFromCameraAndAlbumV4(params, (res) => {
|
|
286
|
+
console.log(res)
|
|
287
|
+
resolve(res.result)
|
|
288
|
+
})
|
|
285
289
|
}else{
|
|
286
290
|
configWx().then(()=>{
|
|
287
291
|
wx.chooseImage({
|
|
@@ -359,7 +363,10 @@ let JsSDK = (function () {
|
|
|
359
363
|
quality: 'mid',
|
|
360
364
|
mode: 'album'
|
|
361
365
|
}
|
|
362
|
-
ccworkBridge.ccworkGetPicsFromCameraAndAlbumV4(params, (res) => {
|
|
366
|
+
ccworkBridge.ccworkGetPicsFromCameraAndAlbumV4(params, (res) => {
|
|
367
|
+
console.log(res)
|
|
368
|
+
resolve(res.result)
|
|
369
|
+
})
|
|
363
370
|
} else {
|
|
364
371
|
configWx().then(() => {
|
|
365
372
|
wx.chooseImage({
|
|
@@ -439,7 +446,14 @@ let JsSDK = (function () {
|
|
|
439
446
|
reject('钉钉获取位置失败:'+error)
|
|
440
447
|
})
|
|
441
448
|
}else if(getAppType() === '40'){
|
|
442
|
-
ccworkBridge.ccworkGetLocation((res) => {
|
|
449
|
+
ccworkBridge.ccworkGetLocation((res) => {
|
|
450
|
+
console.log(res) //{"status": 1, "errormessage": "", "result": {"lat": "36.662029833742444", "lng": "117.12916891592852", "addr": "山东省济南市历下区草山岭西路6777路靠近浪潮图书馆", "country": "中国", "province": "山东省", "city": "济南市", "district": "历下区", "street": "草山岭西路", "streetNum": "6777路", "accuracy": 31, "course": 0, "speed": 0, "adcode": "370102", "citycode": "0531"}}
|
|
451
|
+
if(res.status === 1){
|
|
452
|
+
resolve({longitude:res.result.lng,latitude:res.result.lat});
|
|
453
|
+
}else{
|
|
454
|
+
reject('云上协同获取位置失败:'+res.errormessage)
|
|
455
|
+
}
|
|
456
|
+
})
|
|
443
457
|
}else{
|
|
444
458
|
configWx().then(()=>{
|
|
445
459
|
wx.getLocation({
|
|
@@ -489,7 +503,10 @@ let JsSDK = (function () {
|
|
|
489
503
|
dstlat: latitude,
|
|
490
504
|
coordtype: 'GCJ-02'
|
|
491
505
|
}
|
|
492
|
-
ccworkBridge.ccworkInvokeNavi(params, (res) => {
|
|
506
|
+
ccworkBridge.ccworkInvokeNavi(params, (res) => {
|
|
507
|
+
console.log(res)
|
|
508
|
+
resolve()
|
|
509
|
+
})
|
|
493
510
|
}else{
|
|
494
511
|
configWx().then(()=>{
|
|
495
512
|
wx.openLocation({
|