jufubao-base 1.0.37 → 1.0.38

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.37",
3
+ "version": "1.0.38",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -299,7 +299,13 @@ export default {
299
299
  this.location = location;
300
300
  this.latitude = location["latitude"];
301
301
  this.longitude = location["longitude"];
302
- this.receipt_address = location["sourceData"]["title"]?location["sourceData"]["title"]:'';
302
+ if(location["sourceData"] && location["sourceData"]["title"]) {
303
+ this.receipt_address = location["sourceData"]["title"];
304
+ }
305
+ else{
306
+ this.receipt_address = '';
307
+ }
308
+
303
309
 
304
310
  this.handleParse(location);
305
311
  this.showTips = true;
@@ -23,6 +23,18 @@ module.exports = [
23
23
  isConsole: true,
24
24
  disabled: true
25
25
  },
26
+ {
27
+ mapFnName: "getLoadingCityBaseCityByLocationLv4",
28
+ title: '根据经纬度获取城市信息',
29
+ path: "/common/v1/region/city/get-trans-lv4-by-geo",
30
+ isRule: false,
31
+ params: {
32
+ latitude: ['latitude', 'Number', true],
33
+ longitude: ['longitude', 'Number', true]
34
+ },
35
+ isConsole: true,
36
+ disabled: true
37
+ },
26
38
  {
27
39
  mapFnName: "getAllMapCity",
28
40
  title: "热门城市列表-字母排序城市",
@@ -65,11 +65,14 @@
65
65
  //this.height = getContainerPropsValue(container, 'content.height', 10);
66
66
  },
67
67
  getCityInfoByLocation(options, cb){
68
- jfbRootExec("getCityInfoByLocation", {
68
+ jfbRootExec("getLoadingCityBaseCityByLocationLv4", {
69
69
  vm: this,
70
70
  data: options
71
71
  }).then(res => {
72
72
  cb(res)
73
+ }).catch(e => {
74
+ this.$xdLog.setARMSCustomError('get_city_info_by_location_city', this.$runtime.getErrorInfo(e));
75
+ cb({data: this.$settings.defaultCity})
73
76
  })
74
77
  },
75
78
 
@@ -22,5 +22,17 @@ module.exports = [
22
22
  },
23
23
  isConsole: true,
24
24
  disabled: true
25
+ },
26
+ {
27
+ mapFnName: "getLoadingCityBaseHeaderByLocationLv4",
28
+ title: '根据经纬度获取城市信息',
29
+ path: "/common/v1/region/city/get-trans-lv4-by-geo",
30
+ isRule: false,
31
+ params: {
32
+ latitude: ['latitude', 'Number', true],
33
+ longitude: ['longitude', 'Number', true]
34
+ },
35
+ isConsole: true,
36
+ disabled: true
25
37
  }
26
38
  ];
@@ -222,11 +222,14 @@
222
222
  },
223
223
 
224
224
  getCityInfoByLocation(options, cb){
225
- jfbRootExec("getCityInfoByLocation", {
225
+ jfbRootExec("getLoadingCityBaseHeaderByLocationLv4", {
226
226
  vm: this,
227
227
  data: options
228
228
  }).then(res => {
229
229
  cb(res)
230
+ }).catch(e => {
231
+ this.$xdLog.setARMSCustomError('get_city_info_by_location_header', this.$runtime.getErrorInfo(e));
232
+ cb({data: this.$settings.defaultCity})
230
233
  })
231
234
  },
232
235
  /***
@@ -465,22 +465,26 @@ export default {
465
465
  redirect_url = location.origin + this.base + redirect_url;
466
466
  }
467
467
 
468
+ let params = {
469
+ providers: providers.join(","),
470
+ callback_url: redirect_url,
471
+ phone_number_login_url: location.origin + this.base + this.phone_number_login_url,
472
+ phone_number_collect_url: location.origin + this.base + this.phone_number_collect_url,
473
+ error_callback_url: location.origin + this.base + this.error_callback_url,
474
+ }
468
475
  jfbRootExec("listSiteProvider", {
469
476
  vm: this,
470
- data: {
471
- providers: providers.join(","),
472
- callback_url: redirect_url,
473
- phone_number_login_url: location.origin + this.base + this.phone_number_login_url,
474
- phone_number_collect_url: location.origin + this.base + this.phone_number_collect_url,
475
- error_callback_url: location.origin + this.base + this.error_callback_url,
476
- },
477
+ data: params,
477
478
  })
478
479
  .then((res) => {
479
480
  this.handleAuthResult(res);
480
481
  })
481
482
  .catch((error) => {
482
- console.log(error);
483
- this.$xdLog.setARMSError(error)
483
+ if (this.$xdUniHelper.checkVarType(error) === 'object') {
484
+ this.$xdLog.setARMSCustomError('list_site_provider_error', {...params, fn:'listSiteProvider'})
485
+ } else {
486
+ this.$xdLog.setARMSError(error)
487
+ }
484
488
  });
485
489
  },
486
490