mcrm-mobile 1.9.8 → 2.0.0

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.
@@ -873,7 +873,7 @@ var spliceUrl = /*#__PURE__*/function () {
873
873
  }
874
874
 
875
875
  if (isSecret) {
876
- url += "&isSecret=" + isSecret;
876
+ url += "&isSecrect=" + isSecret;
877
877
  }
878
878
 
879
879
  url = url.replace("?&", "?");
@@ -1648,7 +1648,7 @@ var openPage = /*#__PURE__*/function () {
1648
1648
 
1649
1649
  var verify = /*#__PURE__*/function () {
1650
1650
  var _ref13 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee11(menu, sybInfo, notAuth) {
1651
- var _menu$menuCode2, menuCode, _sybInfo, _sybInfo$billId, billId, _sybInfo$custUniqueId, custUniqueId, allVerifySerial, custUniqueIdVerifySerial, verifyLogId, opVerifyLogId, opSys, funcId, funcType, _yield$getExpInfo5, _yield$getExpInfo5$ap, appVersion, body, cityLimit, checkType, data, getLocationPromise, timeoutPromise;
1651
+ var _menu$menuCode2, menuCode, _sybInfo, _sybInfo$billId, billId, _sybInfo$custUniqueId, custUniqueId, allVerifySerial, custUniqueIdVerifySerial, verifyLogId, opVerifyLogId, opSys, funcId, funcType, _yield$getExpInfo5, _yield$getExpInfo5$ap, appVersion, body;
1652
1652
 
1653
1653
  return _regenerator.default.wrap(function _callee11$(_context11) {
1654
1654
  while (1) {
@@ -1678,7 +1678,6 @@ var verify = /*#__PURE__*/function () {
1678
1678
  _yield$getExpInfo5 = _context11.sent;
1679
1679
  _yield$getExpInfo5$ap = _yield$getExpInfo5.appVersion;
1680
1680
  appVersion = _yield$getExpInfo5$ap === void 0 ? "" : _yield$getExpInfo5$ap;
1681
- // TODO菜单新增位置校验
1682
1681
  body = {
1683
1682
  funcId: funcId,
1684
1683
  funcType: funcType,
@@ -1689,63 +1688,45 @@ var verify = /*#__PURE__*/function () {
1689
1688
  opSys: opSys,
1690
1689
  appVersion: appVersion,
1691
1690
  menuCode: menuCode
1692
- };
1693
- cityLimit = "1";
1694
- checkType = "1";
1695
- _context11.prev = 19;
1696
- _context11.next = 22;
1697
- return _http.default.menuPositionCheck(menuCode);
1698
-
1699
- case 22:
1700
- data = _context11.sent;
1691
+ }; // let cityLimit = "1";
1692
+ // let checkType = "1";
1693
+ // try {
1694
+ // const data = await Http.menuPositionCheck(menuCode);
1695
+ // if (data) {
1696
+ // cityLimit = data.cityLimit;
1697
+ // checkType = data.checkType;
1698
+ // }
1699
+ // } catch (e) {
1700
+ // console.error(e);
1701
+ // }
1702
+ // if (mcrm.env.isMcrm && (cityLimit === "1" || checkType === "1")) {
1703
+ // const getLocationPromise = new Promise((resolve) => {
1704
+ // mcrm.device.getLocation({
1705
+ // isRealTime: true,
1706
+ // onSuccess: (res) => {
1707
+ // body.longitude = res.longitude;
1708
+ // body.latitude = res.latitude;
1709
+ // body.mapCityName = res.cityName || "";
1710
+ // body.mapProvinceName = res.provinceName || "";
1711
+ // body.mapAddress = res.address || "";
1712
+ // resolve(); // 成功时resolve
1713
+ // },
1714
+ // onFail: (res) => {
1715
+ // console.error(res);
1716
+ // resolve(); // 失败时也resolve,确保Promise完成
1717
+ // },
1718
+ // });
1719
+ // });
1720
+ // const timeoutPromise = new Promise((resolve) => {
1721
+ // setTimeout(() => {
1722
+ // console.log("获取定位超时(1.5秒),继续执行菜单校验");
1723
+ // resolve();
1724
+ // }, 1500);
1725
+ // });
1726
+ // // 使用Promise.race实现超时控制
1727
+ // await Promise.race([getLocationPromise, timeoutPromise]);
1728
+ // }
1701
1729
 
1702
- if (data) {
1703
- cityLimit = data.cityLimit;
1704
- checkType = data.checkType;
1705
- }
1706
-
1707
- _context11.next = 29;
1708
- break;
1709
-
1710
- case 26:
1711
- _context11.prev = 26;
1712
- _context11.t0 = _context11["catch"](19);
1713
- console.error(_context11.t0);
1714
-
1715
- case 29:
1716
- if (!(_mcrmJsapi.default.env.isMcrm && (cityLimit === "1" || checkType === "1"))) {
1717
- _context11.next = 34;
1718
- break;
1719
- }
1720
-
1721
- getLocationPromise = new Promise(function (resolve) {
1722
- _mcrmJsapi.default.device.getLocation({
1723
- isRealTime: true,
1724
- onSuccess: function onSuccess(res) {
1725
- body.longitude = res.longitude;
1726
- body.latitude = res.latitude;
1727
- body.mapCityName = res.cityName || "";
1728
- body.mapProvinceName = res.provinceName || "";
1729
- body.mapAddress = res.address || "";
1730
- resolve(); // 成功时resolve
1731
- },
1732
- onFail: function onFail(res) {
1733
- console.error(res);
1734
- resolve(); // 失败时也resolve,确保Promise完成
1735
- }
1736
- });
1737
- });
1738
- timeoutPromise = new Promise(function (resolve) {
1739
- setTimeout(function () {
1740
- console.log("获取定位超时(1.5秒),继续执行菜单校验");
1741
- resolve();
1742
- }, 1500);
1743
- }); // 使用Promise.race实现超时控制
1744
-
1745
- _context11.next = 34;
1746
- return Promise.race([getLocationPromise, timeoutPromise]);
1747
-
1748
- case 34:
1749
1730
  return _context11.abrupt("return", new Promise(function (resolve, reject) {
1750
1731
  _http.default.menuPageVerify(body).then( /*#__PURE__*/function () {
1751
1732
  var _ref14 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee10(data) {
@@ -1910,12 +1891,12 @@ var verify = /*#__PURE__*/function () {
1910
1891
  });
1911
1892
  }));
1912
1893
 
1913
- case 35:
1894
+ case 18:
1914
1895
  case "end":
1915
1896
  return _context11.stop();
1916
1897
  }
1917
1898
  }
1918
- }, _callee11, null, [[19, 26]]);
1899
+ }, _callee11);
1919
1900
  }));
1920
1901
 
1921
1902
  return function verify(_x38, _x39, _x40) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcrm-mobile",
3
- "version": "1.9.8",
3
+ "version": "2.0.0",
4
4
  "description": "生意宝专用组件库",
5
5
  "author": "Wuner",
6
6
  "private": false,