zmp-sdk 2.17.0 → 2.17.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.
@@ -36751,7 +36751,7 @@
36751
36751
  }
36752
36752
  _ZJSBridgeProvider_bridge = new WeakMap();
36753
36753
 
36754
- var version = "2.17.0";
36754
+ var version = "2.17.1";
36755
36755
 
36756
36756
  class Basics {
36757
36757
  /**
@@ -40999,34 +40999,39 @@
40999
40999
  const uIds = yield __classPrivateFieldGet(this, _SDKCreator_sdkService).openProfilePicker(object.maxProfile);
41000
41000
  let users;
41001
41001
  if (uIds.length > 0) {
41002
- const accessToken = yield this.getAccessToken();
41003
- const response = yield axios.post(APIS.GET_LIST_USER_INFO, {
41004
- fields: 'id,name,picture',
41005
- user_ids: uIds
41006
- }, {
41007
- headers: {
41008
- 'Content-Type': 'application/json',
41009
- access_token: accessToken
41010
- }
41011
- });
41012
- const resData = response.data;
41013
- if (resData.error === 0 && resData.data) {
41014
- users = uIds.map((item) => {
41015
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
41016
- return {
41017
- id: item,
41018
- profile: {
41019
- name: (_b = (_a = resData.data[item]) === null || _a === void 0 ? void 0 : _a.user_info) === null || _b === void 0 ? void 0 : _b.name,
41020
- avatar: (_f = (_e = (_d = (_c = resData.data[item]) === null || _c === void 0 ? void 0 : _c.user_info) === null || _d === void 0 ? void 0 : _d.picture) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.url
41021
- },
41022
- code: ((_g = resData.data[item]) === null || _g === void 0 ? void 0 : _g.error) !== 0 ? -1 : 0,
41023
- message: `Get more information: ${lodash.isUndefined((_h = resData.data[item]) === null || _h === void 0 ? void 0 : _h.message)
41024
- ? 'Unknown error'
41025
- : (_j = resData.data[item]) === null || _j === void 0 ? void 0 : _j.message}`
41026
- };
41002
+ try {
41003
+ const accessToken = yield this.getAccessToken();
41004
+ const response = yield axios.post(APIS.GET_LIST_USER_INFO, {
41005
+ fields: 'id,name,picture',
41006
+ user_ids: uIds
41007
+ }, {
41008
+ headers: {
41009
+ 'Content-Type': 'application/json',
41010
+ access_token: accessToken
41011
+ }
41027
41012
  });
41013
+ const resData = response.data;
41014
+ if (resData.error === 0 && resData.data) {
41015
+ users = uIds.map((item) => {
41016
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
41017
+ return {
41018
+ id: item,
41019
+ profile: {
41020
+ name: (_b = (_a = resData.data[item]) === null || _a === void 0 ? void 0 : _a.user_info) === null || _b === void 0 ? void 0 : _b.name,
41021
+ avatar: (_f = (_e = (_d = (_c = resData.data[item]) === null || _c === void 0 ? void 0 : _c.user_info) === null || _d === void 0 ? void 0 : _d.picture) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.url
41022
+ },
41023
+ code: ((_g = resData.data[item]) === null || _g === void 0 ? void 0 : _g.error) !== 0 ? -1 : 0,
41024
+ message: `Get profile: ${lodash.isUndefined((_h = resData.data[item]) === null || _h === void 0 ? void 0 : _h.message)
41025
+ ? 'Unknown error'
41026
+ : (_j = resData.data[item]) === null || _j === void 0 ? void 0 : _j.message}`
41027
+ };
41028
+ });
41029
+ }
41030
+ else {
41031
+ throw new Error(resData.message);
41032
+ }
41028
41033
  }
41029
- else {
41034
+ catch (error) {
41030
41035
  users = uIds.map((item) => {
41031
41036
  return {
41032
41037
  id: item,
@@ -41035,7 +41040,7 @@
41035
41040
  avatar: ''
41036
41041
  },
41037
41042
  code: -1,
41038
- message: `Can't get more information: ${lodash.isUndefined(resData.message) ? 'Unknown error' : resData.message}`
41043
+ message: `Can't get profile: ${error.message}`
41039
41044
  };
41040
41045
  });
41041
41046
  }
package/dist/index.es.js CHANGED
@@ -36748,7 +36748,7 @@ class ZJSBridgeProvider {
36748
36748
  }
36749
36749
  _ZJSBridgeProvider_bridge = new WeakMap();
36750
36750
 
36751
- var version = "2.17.0";
36751
+ var version = "2.17.1";
36752
36752
 
36753
36753
  class Basics {
36754
36754
  /**
@@ -40996,34 +40996,39 @@ class SDKCreator {
40996
40996
  const uIds = yield __classPrivateFieldGet(this, _SDKCreator_sdkService).openProfilePicker(object.maxProfile);
40997
40997
  let users;
40998
40998
  if (uIds.length > 0) {
40999
- const accessToken = yield this.getAccessToken();
41000
- const response = yield axios.post(APIS.GET_LIST_USER_INFO, {
41001
- fields: 'id,name,picture',
41002
- user_ids: uIds
41003
- }, {
41004
- headers: {
41005
- 'Content-Type': 'application/json',
41006
- access_token: accessToken
41007
- }
41008
- });
41009
- const resData = response.data;
41010
- if (resData.error === 0 && resData.data) {
41011
- users = uIds.map((item) => {
41012
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
41013
- return {
41014
- id: item,
41015
- profile: {
41016
- name: (_b = (_a = resData.data[item]) === null || _a === void 0 ? void 0 : _a.user_info) === null || _b === void 0 ? void 0 : _b.name,
41017
- avatar: (_f = (_e = (_d = (_c = resData.data[item]) === null || _c === void 0 ? void 0 : _c.user_info) === null || _d === void 0 ? void 0 : _d.picture) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.url
41018
- },
41019
- code: ((_g = resData.data[item]) === null || _g === void 0 ? void 0 : _g.error) !== 0 ? -1 : 0,
41020
- message: `Get more information: ${lodash.isUndefined((_h = resData.data[item]) === null || _h === void 0 ? void 0 : _h.message)
41021
- ? 'Unknown error'
41022
- : (_j = resData.data[item]) === null || _j === void 0 ? void 0 : _j.message}`
41023
- };
40999
+ try {
41000
+ const accessToken = yield this.getAccessToken();
41001
+ const response = yield axios.post(APIS.GET_LIST_USER_INFO, {
41002
+ fields: 'id,name,picture',
41003
+ user_ids: uIds
41004
+ }, {
41005
+ headers: {
41006
+ 'Content-Type': 'application/json',
41007
+ access_token: accessToken
41008
+ }
41024
41009
  });
41010
+ const resData = response.data;
41011
+ if (resData.error === 0 && resData.data) {
41012
+ users = uIds.map((item) => {
41013
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
41014
+ return {
41015
+ id: item,
41016
+ profile: {
41017
+ name: (_b = (_a = resData.data[item]) === null || _a === void 0 ? void 0 : _a.user_info) === null || _b === void 0 ? void 0 : _b.name,
41018
+ avatar: (_f = (_e = (_d = (_c = resData.data[item]) === null || _c === void 0 ? void 0 : _c.user_info) === null || _d === void 0 ? void 0 : _d.picture) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.url
41019
+ },
41020
+ code: ((_g = resData.data[item]) === null || _g === void 0 ? void 0 : _g.error) !== 0 ? -1 : 0,
41021
+ message: `Get profile: ${lodash.isUndefined((_h = resData.data[item]) === null || _h === void 0 ? void 0 : _h.message)
41022
+ ? 'Unknown error'
41023
+ : (_j = resData.data[item]) === null || _j === void 0 ? void 0 : _j.message}`
41024
+ };
41025
+ });
41026
+ }
41027
+ else {
41028
+ throw new Error(resData.message);
41029
+ }
41025
41030
  }
41026
- else {
41031
+ catch (error) {
41027
41032
  users = uIds.map((item) => {
41028
41033
  return {
41029
41034
  id: item,
@@ -41032,7 +41037,7 @@ class SDKCreator {
41032
41037
  avatar: ''
41033
41038
  },
41034
41039
  code: -1,
41035
- message: `Can't get more information: ${lodash.isUndefined(resData.message) ? 'Unknown error' : resData.message}`
41040
+ message: `Can't get profile: ${error.message}`
41036
41041
  };
41037
41042
  });
41038
41043
  }