component-shipinlv 0.0.5 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -52,7 +52,9 @@ var AuthReg = function AuthReg(_ref) {
52
52
  _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
53
53
  form = _Form$useForm2[0];
54
54
  var _useRequest = useRequest(function (data) {
55
- return AuthController.login(_objectSpread(_objectSpread({}, data), {}, {
55
+ return AuthController.login(_objectSpread(_objectSpread({
56
+ from: "web"
57
+ }, data), {}, {
56
58
  inviteUserId: Tool.getInviteUserId()
57
59
  }));
58
60
  }, {
@@ -136,6 +136,7 @@ var LoginQr = function LoginQr(_ref) {
136
136
  loginId: loginId,
137
137
  //string 32
138
138
  loginType: 'client',
139
+ from: "web",
139
140
  // 没有推荐者,会根据域名判断 经销商
140
141
  inviteUserId: Tool.getInviteUserId(),
141
142
  env: getApiEnv()
@@ -97,6 +97,7 @@ declare const Tool: {
97
97
  };
98
98
  };
99
99
  store: {
100
+ key(): string;
100
101
  get(name: string): any;
101
102
  set(name: string, value: any): void;
102
103
  };
package/dist/lib/Tool.js CHANGED
@@ -19,10 +19,14 @@ import PostMessage from "./postMessage";
19
19
  import { jsx as _jsx } from "react/jsx-runtime";
20
20
  var packageJson = require("../../package.json");
21
21
  var store = {
22
+ key: function key() {
23
+ var WebBaseConfig = window.WebBaseConfig || {};
24
+ return ".".concat(WebBaseConfig.webKind, "-").concat(WebBaseConfig.productName);
25
+ },
22
26
  get: function get(name) {
23
27
  var getData;
24
28
  try {
25
- getData = window.localStorage.getItem('__shan__' + name);
29
+ getData = window.localStorage.getItem("__".concat(this.key(), "__") + name);
26
30
  if (getData) {
27
31
  getData = JSON.parse(getData);
28
32
  }
@@ -43,7 +47,7 @@ var store = {
43
47
  value: value
44
48
  };
45
49
  try {
46
- window.localStorage.setItem('__shan__' + name, JSON.stringify(saveData));
50
+ window.localStorage.setItem("__".concat(this.key(), "__") + name, JSON.stringify(saveData));
47
51
  } catch (e) {
48
52
  console.error('LocalStorage set Error:', e);
49
53
  }
@@ -1,11 +1,13 @@
1
1
  export declare function login(body: {
2
2
  accountName: string;
3
3
  password: string;
4
+ from: "web";
4
5
  inviteUserId: number;
5
6
  }): Promise<UserAuth.LoginSuccessData>;
6
7
  export declare function weMiniLoginQr(body: {
7
8
  loginId: string;
8
9
  loginType: 'client';
10
+ from: string;
9
11
  inviteUserId: number;
10
12
  env: Global.Env;
11
13
  }): Promise<UserAuth.WeQrResult>;
package/dist/typings.d.ts CHANGED
@@ -42,6 +42,7 @@ declare namespace Global {
42
42
  webKind: WebKind;
43
43
  version: string;
44
44
  versionReal: string;
45
+ productName: string;
45
46
 
46
47
  douzhuli: WebBaseConfigItem;
47
48
  douxidong: WebBaseConfigItem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-shipinlv",
3
- "version": "0.0.5",
3
+ "version": "0.0.7",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",