component-shipinlv 2.0.16 → 2.0.18

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.
@@ -7,7 +7,7 @@ var h5WePublicLogin = /*#__PURE__*/function () {
7
7
  return _regeneratorRuntime().wrap(function _callee$(_context) {
8
8
  while (1) switch (_context.prev = _context.next) {
9
9
  case 0:
10
- document.location.replace("https://auth.shanren.wang/auth/wechat/login?url=".concat(document.location.href));
10
+ document.location.replace("https://wechat-auth.shipinlv.com/auth/wechat/login?url=".concat(encodeURIComponent(document.location.href)));
11
11
  return _context.abrupt("return");
12
12
  case 2:
13
13
  case "end":
@@ -0,0 +1,4 @@
1
+ declare class Product {
2
+ detail(productType: string, env?: Global.Env): Promise<Product.Detail>;
3
+ }
4
+ export default Product;
@@ -0,0 +1,36 @@
1
+ import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
2
+ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
3
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
4
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
5
+ import * as ProductController from "../service/api/ProductController";
6
+ var Product = /*#__PURE__*/function () {
7
+ function Product() {
8
+ _classCallCheck(this, Product);
9
+ }
10
+ _createClass(Product, [{
11
+ key: "detail",
12
+ value: function () {
13
+ var _detail = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(productType, env) {
14
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
15
+ while (1) switch (_context.prev = _context.next) {
16
+ case 0:
17
+ return _context.abrupt("return", ProductController.detail({
18
+ productType: productType
19
+ }, {
20
+ env: env
21
+ }));
22
+ case 1:
23
+ case "end":
24
+ return _context.stop();
25
+ }
26
+ }, _callee);
27
+ }));
28
+ function detail(_x, _x2) {
29
+ return _detail.apply(this, arguments);
30
+ }
31
+ return detail;
32
+ }()
33
+ }]);
34
+ return Product;
35
+ }();
36
+ export default Product;
@@ -1,5 +1,5 @@
1
1
  // 业务服务器 api
2
- export var currentEnv = 'prod';
2
+ export var currentEnv = 'local';
3
3
  var ApiUrls = {
4
4
  local: {
5
5
  api: 'http://localhost:9999/',
@@ -170,7 +170,7 @@ var getOpenQuery = /*#__PURE__*/function () {
170
170
  });
171
171
  chromeProfileDir = settingConfig.chromeUserDataDir + '/' + query.chromeProfileName;
172
172
  _context4.t0 = Tool.getOsName();
173
- _context4.next = _context4.t0 === "windows" ? 8 : _context4.t0 === "darwin" ? 11 : 16;
173
+ _context4.next = _context4.t0 === "windows" ? 8 : _context4.t0 === "darwin" ? 11 : 15;
174
174
  break;
175
175
  case 8:
176
176
  // 艹,屎一样的 windows cmd
@@ -188,23 +188,24 @@ var getOpenQuery = /*#__PURE__*/function () {
188
188
  // --disable-gpu是为了解决一些在无头模式下可能出现的GPU相关的问题
189
189
  cmdList.push("--disable-gpu");
190
190
  }
191
- return _context4.abrupt("break", 17);
191
+ return _context4.abrupt("break", 16);
192
192
  case 11:
193
- cmdList = ["open"];
193
+ // cmdList = [ `open`, `-a` ];
194
+
195
+ cmdList = ["".concat(query.chromePath || 'Google Chrome'), "--args"];
194
196
  if (isNew) {
195
197
  cmdList.push("-n");
196
198
  }
197
- cmdList.push("-a", "".concat(query.chromePath || 'Google Chrome'), "--args");
198
199
  if (!query.isOpen) {
199
200
  cmdList.push("--headless");
200
201
 
201
202
  // --disable-gpu是为了解决一些在无头模式下可能出现的GPU相关的问题
202
203
  cmdList.push("--disable-gpu");
203
204
  }
204
- return _context4.abrupt("break", 17);
205
- case 16:
205
+ return _context4.abrupt("break", 16);
206
+ case 15:
206
207
  notification.notificationError('不支持的系统', '发布不支持此系统');
207
- case 17:
208
+ case 16:
208
209
  position = {
209
210
  x: 0,
210
211
  y: 0
@@ -222,18 +223,18 @@ var getOpenQuery = /*#__PURE__*/function () {
222
223
 
223
224
  // 不要检查
224
225
  cmdList.push('--no-first-run', '--no-default-browser-check', '--disable-default-apps');
225
- _context4.next = 26;
226
+ _context4.next = 25;
226
227
  return getPublishExtensionDir(env).catch(function (err) {
227
228
  notification.notificationError('获取插件地址失败', err.message);
228
229
  });
229
- case 26:
230
+ case 25:
230
231
  publishExtensionDir = _context4.sent;
231
232
  if (publishExtensionDir) {
232
- _context4.next = 29;
233
+ _context4.next = 28;
233
234
  break;
234
235
  }
235
236
  return _context4.abrupt("return", Promise.reject(new Error('获取插件地址失败')));
236
- case 29:
237
+ case 28:
237
238
  cmdList.push("--load-extension=".concat(publishExtensionDir));
238
239
  cmdList.push("".concat(openUrl));
239
240
  console.log('profileName:', cmdList, chromeProfileDir);
@@ -241,7 +242,7 @@ var getOpenQuery = /*#__PURE__*/function () {
241
242
  commandList: cmdList,
242
243
  chromeProfileDir: chromeProfileDir
243
244
  });
244
- case 33:
245
+ case 32:
245
246
  case "end":
246
247
  return _context4.stop();
247
248
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component-shipinlv",
3
- "version": "2.0.16",
3
+ "version": "2.0.18",
4
4
  "description": "",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",