component-shipinlv 1.1.26 → 1.1.27

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  interface Props {
3
+ env?: Global.Env | '';
3
4
  onActive: () => void;
4
5
  }
5
6
  declare const UserProfileVipCard: React.FC<Props>;
@@ -8,13 +8,16 @@ import updateUserInfo from "../lib/updateUserInfo";
8
8
  import Tool from "../lib/Tool";
9
9
  import { jsx as _jsx } from "react/jsx-runtime";
10
10
  var UserProfileVipCard = function UserProfileVipCard(_ref) {
11
- var onActive = _ref.onActive;
11
+ var env = _ref.env,
12
+ onActive = _ref.onActive;
12
13
  var _Form$useForm = Form.useForm(),
13
14
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
14
15
  form = _Form$useForm2[0];
15
16
  var _useRequest = useRequest(function (vipCardCode) {
16
17
  return VipCardController.activate({
17
18
  vipCardCode: vipCardCode
19
+ }, {
20
+ env: env
18
21
  });
19
22
  }, {
20
23
  manual: true,
@@ -51,7 +54,7 @@ var UserProfileVipCard = function UserProfileVipCard(_ref) {
51
54
  required: true,
52
55
  message: '请输入'
53
56
  }, {
54
- pattern: /^\s*(AI\d-)?[A-Z0-9-]{14,}\s*$/i,
57
+ pattern: /^\s*([a-z0-9]+-)?[A-Z0-9-]{14,}\s*$/i,
55
58
  message: '类似:AI-AAAA-BBBB-CCCC'
56
59
  }],
57
60
  children: /*#__PURE__*/_jsx(Input, {
@@ -8,7 +8,9 @@ var AccountManageSettingConfig = function AccountManageSettingConfig(data) {
8
8
  return data;
9
9
  }
10
10
  var chromePath = (_window$getBridge = (_window = window).getBridge) === null || _window$getBridge === void 0 ? void 0 : _window$getBridge.call(_window).getChromiumPath();
11
- console.log('AccountManageSettingConfig get:', chromePath);
11
+
12
+ // console.log('AccountManageSettingConfig get:', chromePath );
13
+
12
14
  var storeData = store.get(AccountManageSettingConfigKey);
13
15
  var outData = _objectSpread(_objectSpread({
14
16
  isChromeOpen: false,
@@ -1,2 +1,2 @@
1
- declare const renewalVip: (productName: string) => Promise<unknown>;
1
+ declare const renewalVip: (productName: string, env?: Global.Env | '') => Promise<unknown>;
2
2
  export default renewalVip;
@@ -8,7 +8,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
8
8
  import { Fragment as _Fragment } from "react/jsx-runtime";
9
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
10
  var renewalVip = /*#__PURE__*/function () {
11
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(productName) {
11
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(productName, env) {
12
12
  var _userInfo$userVip;
13
13
  var siteInfo, userInfo, userVip, isVip, localSiteInfo;
14
14
  return _regeneratorRuntime().wrap(function _callee$(_context) {
@@ -20,7 +20,8 @@ var renewalVip = /*#__PURE__*/function () {
20
20
  isVip = !!(userVip !== null && userVip !== void 0 && userVip.isVip);
21
21
  localSiteInfo = Tool.getLocalSiteInfo();
22
22
  return _context.abrupt("return", new Promise(function (resolve, reject) {
23
- if (siteInfo.disabledOnlineBuy.includes(productName)) {
23
+ var _siteInfo$disabledOnl;
24
+ if ((_siteInfo$disabledOnl = siteInfo.disabledOnlineBuy) !== null && _siteInfo$disabledOnl !== void 0 && _siteInfo$disabledOnl.includes(productName)) {
24
25
  // 激活码
25
26
  var dialog = Tool.drawer({
26
27
  title: /*#__PURE__*/_jsxs(_Fragment, {
@@ -32,6 +33,7 @@ var renewalVip = /*#__PURE__*/function () {
32
33
  })]
33
34
  }),
34
35
  content: /*#__PURE__*/_jsx(UserProfileVipCard, {
36
+ env: env,
35
37
  onActive: function onActive() {
36
38
  resolve(true);
37
39
  dialog.destroy();
@@ -44,7 +46,7 @@ var renewalVip = /*#__PURE__*/function () {
44
46
  Tool.pageDialog({
45
47
  title: '价格表',
46
48
  content: /*#__PURE__*/_jsx(VipList, {
47
- env: getApiEnv(),
49
+ env: env || getApiEnv(),
48
50
  tableScrollY: "60vh",
49
51
  productType: productName,
50
52
  applyDemoWechatUrl: localSiteInfo.domainUserWeContactQrUrl || localSiteInfo.dealerWeContactQrUrl || localSiteInfo.adminWechatQr,
@@ -68,7 +70,7 @@ var renewalVip = /*#__PURE__*/function () {
68
70
  }
69
71
  }, _callee);
70
72
  }));
71
- return function renewalVip(_x) {
73
+ return function renewalVip(_x, _x2) {
72
74
  return _ref.apply(this, arguments);
73
75
  };
74
76
  }();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-shipinlv",
3
- "version": "1.1.26",
3
+ "version": "1.1.27",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",