ucservice 2.0.7 → 2.0.9

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.
@@ -27816,6 +27816,7 @@ let dept_ry = {
27816
27816
  url: '/common-gis-web/data/gispos/addPersion',
27817
27817
  method: 'POST',
27818
27818
  contentType: 'application/json;charset=utf-8',
27819
+ paramOnUrl: ['token'],
27819
27820
  requestParam: {
27820
27821
  token: '',
27821
27822
  name: '',
@@ -31450,9 +31451,11 @@ const loadJson = function (url, param, backSuccfn, async, method, headers, conte
31450
31451
 
31451
31452
  $.ajax(ajaxContent).fail(function (jqXHR, sts) {
31452
31453
  console.error('加载数据失败:' + sts + ", " + url);
31454
+ throw new Error('请求失败!');
31453
31455
  }).done(function (ret) {
31454
31456
  if (!ret || ret.code != 0) {
31455
31457
  console.error('加载数据失败:' + JSON.stringify(ret) + ", " + url);
31458
+ throw new Error('加载数据失败!');
31456
31459
  }
31457
31460
 
31458
31461
  if (backSuccfn) backSuccfn(ret);
@@ -32259,8 +32262,18 @@ const deptRyOp = sip => {
32259
32262
  },
32260
32263
  createOnGis: function (param) {
32261
32264
  let net = dept_ry_url.createOnGis;
32265
+ let urlParamString = '';
32266
+
32267
+ if (net.paramOnUrl) {
32268
+ net.paramOnUrl.forEach(key => {
32269
+ urlParamString && (urlParamString += '&');
32270
+ urlParamString += `${key}=${param[key]}`;
32271
+ delete param[key];
32272
+ });
32273
+ }
32274
+
32262
32275
  return new Promise((resolve, reject) => {
32263
- loadJson(server_ + net.url, { ...param
32276
+ loadJson(server_ + net.url + (urlParamString ? '?' + urlParamString : ''), { ...param
32264
32277
  }, function (ret) {
32265
32278
  if (ret.code == 0) {
32266
32279
  resolve(ret);
Binary file