@indfnd/common-mobile 1.0.21 → 1.0.23

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.0.23](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v1.0.22...v1.0.23) (2026-01-22)
6
+
7
+ ### [1.0.22](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v1.0.21...v1.0.22) (2026-01-22)
8
+
5
9
  ### [1.0.21](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v1.0.20...v1.0.21) (2026-01-21)
6
10
 
7
11
  ### [1.0.20](http://git.inspur.com/imp-ec/ind-front/ind-common-mobile-front/compare/v1.0.19...v1.0.20) (2026-01-21)
@@ -3,7 +3,7 @@ import { getQuarterNum, getHalfYearNum, formatDate, useConfig, getLocalStorage,
3
3
  import Vue$1 from "vue";
4
4
  import { DropdownMenu as DropdownMenu$1, DropdownItem as DropdownItem$1, Message, LoadingBar, Spin } from "view-design";
5
5
  const name$1 = "@indfnd/common-mobile";
6
- const version$2 = "1.0.20";
6
+ const version$2 = "1.0.22";
7
7
  const author$1 = "huxuetong";
8
8
  const publishConfig = {
9
9
  registry: "https://registry.npmjs.org/"
@@ -4569,6 +4569,7 @@ var normalMerge = ["attrs", "props", "domProps"], toArrayMerge = ["class", "styl
4569
4569
  };
4570
4570
  };
4571
4571
  var helper = mergeJsxProps;
4572
+ var _mergeJSXProps = helper;
4572
4573
  function gen(name2, mods) {
4573
4574
  if (!mods) {
4574
4575
  return "";
@@ -5020,7 +5021,7 @@ function Overlay(h, props, slots2, ctx) {
5020
5021
  "attrs": {
5021
5022
  "name": "van-fade"
5022
5023
  }
5023
- }, [h("div", helper([{
5024
+ }, [h("div", _mergeJSXProps([{
5024
5025
  "directives": [{
5025
5026
  name: "show",
5026
5027
  value: props.show
@@ -5491,7 +5492,7 @@ function Info(h, props, slots2, ctx) {
5491
5492
  if (!dot && !showInfo) {
5492
5493
  return;
5493
5494
  }
5494
- return h("div", helper([{
5495
+ return h("div", _mergeJSXProps([{
5495
5496
  "class": bem$1w({
5496
5497
  dot
5497
5498
  })
@@ -5518,7 +5519,7 @@ function Icon(h, props, slots2, ctx) {
5518
5519
  var _props$badge;
5519
5520
  var name2 = correctName(props.name);
5520
5521
  var imageIcon = isImage(name2);
5521
- return h(props.tag, helper([{
5522
+ return h(props.tag, _mergeJSXProps([{
5522
5523
  "class": [props.classPrefix, imageIcon ? "" : props.classPrefix + "-" + name2],
5523
5524
  "style": {
5524
5525
  color: props.color,
@@ -5694,7 +5695,7 @@ function Loading(h, props, slots2, ctx) {
5694
5695
  style12.width = iconSize;
5695
5696
  style12.height = iconSize;
5696
5697
  }
5697
- return h("div", helper([{
5698
+ return h("div", _mergeJSXProps([{
5698
5699
  "class": bem$1t([type2, {
5699
5700
  vertical: props.vertical
5700
5701
  }])
@@ -5805,7 +5806,7 @@ function ActionSheet(h, props, slots2, ctx) {
5805
5806
  }, [description2]);
5806
5807
  }
5807
5808
  }
5808
- return h(Popup, helper([{
5809
+ return h(Popup, _mergeJSXProps([{
5809
5810
  "class": bem$1s(),
5810
5811
  "attrs": {
5811
5812
  "position": "bottom",
@@ -6217,7 +6218,7 @@ var PickerColumn = createComponent$1A({
6217
6218
  class: "van-ellipsis",
6218
6219
  domProps: (_domProps = {}, _domProps[_this4.allowHtml ? "innerHTML" : "textContent"] = text, _domProps)
6219
6220
  };
6220
- return h("li", helper([{}, data49]), [_this4.slots("option", option2) || h("div", helper([{}, childData]))]);
6221
+ return h("li", _mergeJSXProps([{}, data49]), [_this4.slots("option", option2) || h("div", _mergeJSXProps([{}, childData]))]);
6221
6222
  });
6222
6223
  }
6223
6224
  },
@@ -6944,7 +6945,7 @@ function Cell(h, props, slots2, ctx) {
6944
6945
  if (size2) {
6945
6946
  classes[size2] = size2;
6946
6947
  }
6947
- return h("div", helper([{
6948
+ return h("div", _mergeJSXProps([{
6948
6949
  "class": bem$1o(classes),
6949
6950
  "attrs": {
6950
6951
  "role": clickable ? "button" : null,
@@ -7353,7 +7354,7 @@ var Field = createComponent$1w({
7353
7354
  }]
7354
7355
  };
7355
7356
  if (type2 === "textarea") {
7356
- return h("textarea", helper([{}, inputProps]));
7357
+ return h("textarea", _mergeJSXProps([{}, inputProps]));
7357
7358
  }
7358
7359
  var inputType = type2;
7359
7360
  var inputMode;
@@ -7365,7 +7366,7 @@ var Field = createComponent$1w({
7365
7366
  inputType = "tel";
7366
7367
  inputMode = "numeric";
7367
7368
  }
7368
- return h("input", helper([{
7369
+ return h("input", _mergeJSXProps([{
7369
7370
  "attrs": {
7370
7371
  "type": inputType,
7371
7372
  "inputmode": inputMode
@@ -7881,7 +7882,7 @@ function Button(h, props, slots2, ctx) {
7881
7882
  }
7882
7883
  return content;
7883
7884
  }
7884
- return h(tag, helper([{
7885
+ return h(tag, _mergeJSXProps([{
7885
7886
  "style": style12,
7886
7887
  "class": classes,
7887
7888
  "attrs": {
@@ -8297,7 +8298,7 @@ var VanDialog = createComponent$1r({
8297
8298
  "class": bem$1i("content", {
8298
8299
  isolated: !hasTitle
8299
8300
  })
8300
- }, [h("div", helper([{}, data49]))]);
8301
+ }, [h("div", _mergeJSXProps([{}, data49]))]);
8301
8302
  }
8302
8303
  }
8303
8304
  },
@@ -9113,7 +9114,7 @@ function Tag(h, props, slots2, ctx) {
9113
9114
  "attrs": {
9114
9115
  "name": props.closeable ? "van-fade" : null
9115
9116
  }
9116
- }, [h("span", helper([{
9117
+ }, [h("span", _mergeJSXProps([{
9117
9118
  "key": "content",
9118
9119
  "style": style12,
9119
9120
  "class": bem$1d([classes, type2])
@@ -9342,7 +9343,7 @@ function AddressItem(h, props, slots2, ctx) {
9342
9343
  "on": {
9343
9344
  "click": onClick19
9344
9345
  }
9345
- }, [h(Cell$1, helper([{
9346
+ }, [h(Cell$1, _mergeJSXProps([{
9346
9347
  "attrs": {
9347
9348
  "border": false,
9348
9349
  "valueClass": bem$1b("value")
@@ -9400,7 +9401,7 @@ function AddressList(h, props, slots2, ctx) {
9400
9401
  }
9401
9402
  var List2 = genList(props.list);
9402
9403
  var DisabledList = genList(props.disabledList, true);
9403
- return h("div", helper([{
9404
+ return h("div", _mergeJSXProps([{
9404
9405
  "class": bem$1a()
9405
9406
  }, inherit(ctx)]), [slots2.top == null ? void 0 : slots2.top(), h(RadioGroup, {
9406
9407
  "attrs": {
@@ -10512,7 +10513,7 @@ var Image = createComponent$1e({
10512
10513
  return;
10513
10514
  }
10514
10515
  if (this.lazyLoad) {
10515
- return h("img", helper([{
10516
+ return h("img", _mergeJSXProps([{
10516
10517
  "ref": "image",
10517
10518
  "directives": [{
10518
10519
  name: "lazy",
@@ -10520,7 +10521,7 @@ var Image = createComponent$1e({
10520
10521
  }]
10521
10522
  }, imgData]));
10522
10523
  }
10523
- return h("img", helper([{
10524
+ return h("img", _mergeJSXProps([{
10524
10525
  "attrs": {
10525
10526
  "src": this.src
10526
10527
  },
@@ -10647,7 +10648,7 @@ function Card(h, props, slots2, ctx) {
10647
10648
  }, [slots2.footer()]);
10648
10649
  }
10649
10650
  }
10650
- return h("div", helper([{
10651
+ return h("div", _mergeJSXProps([{
10651
10652
  "class": bem$16()
10652
10653
  }, inherit(ctx, true)]), [h("div", {
10653
10654
  "class": bem$16("header")
@@ -11679,7 +11680,7 @@ var Cascader = createComponent$17({
11679
11680
  var _createNamespace$12 = createNamespace("cell-group"), createComponent$16 = _createNamespace$12[0], bem$$ = _createNamespace$12[1];
11680
11681
  function CellGroup(h, props, slots2, ctx) {
11681
11682
  var _ref;
11682
- var Group = h("div", helper([{
11683
+ var Group = h("div", _mergeJSXProps([{
11683
11684
  "class": [bem$$({
11684
11685
  inset: props.inset
11685
11686
  }), (_ref = {}, _ref[BORDER_TOP_BOTTOM] = props.border, _ref)]
@@ -12220,7 +12221,7 @@ function ContactCard(h, props, slots2, ctx) {
12220
12221
  }
12221
12222
  return [h("div", [t$i("name") + "\uFF1A" + props.name]), h("div", [t$i("tel") + "\uFF1A" + props.tel])];
12222
12223
  }
12223
- return h(Cell$1, helper([{
12224
+ return h(Cell$1, _mergeJSXProps([{
12224
12225
  "attrs": {
12225
12226
  "center": true,
12226
12227
  "border": false,
@@ -12479,7 +12480,7 @@ function ContactList(h, props, slots2, ctx) {
12479
12480
  }
12480
12481
  });
12481
12482
  });
12482
- return h("div", helper([{
12483
+ return h("div", _mergeJSXProps([{
12483
12484
  "class": bem$S()
12484
12485
  }, inherit(ctx)]), [h(RadioGroup, {
12485
12486
  "attrs": {
@@ -12800,7 +12801,7 @@ function formatValue(props) {
12800
12801
  function CouponCell(h, props, slots2, ctx) {
12801
12802
  var selected = props.coupons[+props.chosenCoupon];
12802
12803
  var value17 = formatValue(props);
12803
- return h(Cell$1, helper([{
12804
+ return h(Cell$1, _mergeJSXProps([{
12804
12805
  "class": bem$P(),
12805
12806
  "attrs": {
12806
12807
  "value": value17,
@@ -13605,7 +13606,7 @@ var DatetimePicker = createComponent$S({
13605
13606
  var _createNamespace$N = createNamespace("divider"), createComponent$R = _createNamespace$N[0], bem$M = _createNamespace$N[1];
13606
13607
  function Divider(h, props, slots2, ctx) {
13607
13608
  var _bem;
13608
- return h("div", helper([{
13609
+ return h("div", _mergeJSXProps([{
13609
13610
  "attrs": {
13610
13611
  "role": "separator"
13611
13612
  },
@@ -16205,7 +16206,7 @@ function Notify$1(h, props, slots2, ctx) {
16205
16206
  color: props.color,
16206
16207
  background: props.background
16207
16208
  };
16208
- return h(Popup, helper([{
16209
+ return h(Popup, _mergeJSXProps([{
16209
16210
  "attrs": {
16210
16211
  "value": props.value,
16211
16212
  "position": "top",
@@ -16821,7 +16822,7 @@ function Panel(h, props, slots2, ctx) {
16821
16822
  "class": [bem$s("footer"), BORDER_TOP]
16822
16823
  }, [slots2.footer()])];
16823
16824
  };
16824
- return h(CellGroup$1, helper([{
16825
+ return h(CellGroup$1, _mergeJSXProps([{
16825
16826
  "class": bem$s(),
16826
16827
  "scopedSlots": {
16827
16828
  default: Content2
@@ -16867,7 +16868,7 @@ function PasswordInput(h, props, slots2, ctx) {
16867
16868
  }
16868
16869
  return h("div", {
16869
16870
  "class": bem$r()
16870
- }, [h("ul", helper([{
16871
+ }, [h("ul", _mergeJSXProps([{
16871
16872
  "class": [bem$r("security"), (_ref2 = {}, _ref2[BORDER_SURROUND] = !gutter, _ref2)],
16872
16873
  "on": {
16873
16874
  "touchstart": function touchstart(event) {
@@ -18577,7 +18578,7 @@ function Search(h, props, slots2, ctx) {
18577
18578
  };
18578
18579
  var inheritData = inherit(ctx);
18579
18580
  inheritData.attrs = void 0;
18580
- return h("div", helper([{
18581
+ return h("div", _mergeJSXProps([{
18581
18582
  "class": bem$l({
18582
18583
  "show-action": props.showAction
18583
18584
  }),
@@ -18586,7 +18587,7 @@ function Search(h, props, slots2, ctx) {
18586
18587
  }
18587
18588
  }, inheritData]), [slots2.left == null ? void 0 : slots2.left(), h("div", {
18588
18589
  "class": bem$l("content", props.shape)
18589
- }, [Label(), h(Field, helper([{
18590
+ }, [Label(), h(Field, _mergeJSXProps([{
18590
18591
  "attrs": {
18591
18592
  "type": "search",
18592
18593
  "border": false,
@@ -18909,7 +18910,7 @@ function Skeleton(h, props, slots2, ctx) {
18909
18910
  });
18910
18911
  }
18911
18912
  }
18912
- return h("div", helper([{
18913
+ return h("div", _mergeJSXProps([{
18913
18914
  "class": bem$h({
18914
18915
  animate: props.animate,
18915
18916
  round: props.round
@@ -19167,7 +19168,7 @@ function SkuHeader$1(h, props, slots2, ctx) {
19167
19168
  var previewImage = function previewImage2() {
19168
19169
  skuEventBus.$emit("sku:previewImage", selectedValue);
19169
19170
  };
19170
- return h("div", helper([{
19171
+ return h("div", _mergeJSXProps([{
19171
19172
  "class": [bem$g(), BORDER_BOTTOM]
19172
19173
  }, inherit(ctx)]), [showHeaderImage && h(Image, {
19173
19174
  "attrs": {
@@ -19192,7 +19193,7 @@ SkuHeader$1.props = {
19192
19193
  var SkuHeader$2 = createComponent$l(SkuHeader$1);
19193
19194
  var _createNamespace$g = createNamespace("sku-header-item"), createComponent$k = _createNamespace$g[0], bem$f = _createNamespace$g[1];
19194
19195
  function SkuHeader(h, props, slots2, ctx) {
19195
- return h("div", helper([{
19196
+ return h("div", _mergeJSXProps([{
19196
19197
  "class": bem$f()
19197
19198
  }, inherit(ctx)]), [slots2.default && slots2.default()]);
19198
19199
  }
@@ -19670,7 +19671,7 @@ var Stepper = createComponent$g({
19670
19671
  };
19671
19672
  return h("div", {
19672
19673
  "class": bem$d([this.theme])
19673
- }, [h("button", helper([{
19674
+ }, [h("button", _mergeJSXProps([{
19674
19675
  "directives": [{
19675
19676
  name: "show",
19676
19677
  value: this.showMinus
@@ -19710,7 +19711,7 @@ var Stepper = createComponent$g({
19710
19711
  "blur": this.onBlur,
19711
19712
  "mousedown": this.onMousedown
19712
19713
  }
19713
- }), h("button", helper([{
19714
+ }), h("button", _mergeJSXProps([{
19714
19715
  "directives": [{
19715
19716
  name: "show",
19716
19717
  value: this.showPlus
@@ -20754,7 +20755,7 @@ function SkuActions(h, props, slots2, ctx) {
20754
20755
  props.skuEventBus.$emit(name2);
20755
20756
  };
20756
20757
  };
20757
- return h("div", helper([{
20758
+ return h("div", _mergeJSXProps([{
20758
20759
  "class": bem$a()
20759
20760
  }, inherit(ctx)]), [props.showAddCartBtn && h(Button$1, {
20760
20761
  "attrs": {
@@ -21893,7 +21894,7 @@ function SubmitBar(h, props, slots2, ctx) {
21893
21894
  }, [tip]), slots2.tip && slots2.tip()]);
21894
21895
  }
21895
21896
  }
21896
- return h("div", helper([{
21897
+ return h("div", _mergeJSXProps([{
21897
21898
  "class": bem$5({
21898
21899
  unfit: !props.safeAreaInsetBottom
21899
21900
  })
@@ -22132,7 +22133,7 @@ var SwipeCell = createComponent$4({
22132
22133
  });
22133
22134
  var _createNamespace$3 = createNamespace("switch-cell"), createComponent$3 = _createNamespace$3[0], bem$3 = _createNamespace$3[1];
22134
22135
  function SwitchCell(h, props, slots2, ctx) {
22135
- return h(Cell$1, helper([{
22136
+ return h(Cell$1, _mergeJSXProps([{
22136
22137
  "attrs": {
22137
22138
  "center": true,
22138
22139
  "size": props.cellSize,
@@ -22409,7 +22410,7 @@ function TreeSelect(h, props, slots2, ctx) {
22409
22410
  })]);
22410
22411
  });
22411
22412
  }
22412
- return h("div", helper([{
22413
+ return h("div", _mergeJSXProps([{
22413
22414
  "class": bem(),
22414
22415
  "style": {
22415
22416
  height: addUnit(height)
@@ -23672,17 +23673,17 @@ function _nonIterableSpread() {
23672
23673
  throw new TypeError("Invalid attempt to spread non-iterable instance");
23673
23674
  }
23674
23675
  var version$1 = "1.10.2";
23675
- function userAgent(pattern) {
23676
+ function userAgent$1(pattern) {
23676
23677
  if (typeof window !== "undefined" && window.navigator) {
23677
23678
  return !!/* @__PURE__ */ navigator.userAgent.match(pattern);
23678
23679
  }
23679
23680
  }
23680
- var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
23681
- var Edge = userAgent(/Edge/i);
23682
- var FireFox = userAgent(/firefox/i);
23683
- var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i);
23684
- var IOS = userAgent(/iP(ad|od|hone)/i);
23685
- var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i);
23681
+ var IE11OrLess = userAgent$1(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i);
23682
+ var Edge = userAgent$1(/Edge/i);
23683
+ var FireFox = userAgent$1(/firefox/i);
23684
+ var Safari = userAgent$1(/safari/i) && !userAgent$1(/chrome/i) && !userAgent$1(/android/i);
23685
+ var IOS = userAgent$1(/iP(ad|od|hone)/i);
23686
+ var ChromeForAndroid = userAgent$1(/chrome/i) && userAgent$1(/android/i);
23686
23687
  var captureMode = {
23687
23688
  capture: false,
23688
23689
  passive: false
@@ -31348,6 +31349,9 @@ axios$1.isAxiosError = isAxiosError;
31348
31349
  axios$2.exports = axios$1;
31349
31350
  axios$2.exports.default = axios$1;
31350
31351
  var axios = axios$2.exports;
31352
+ const isHb$1 = location.pathname.includes("scyxweb");
31353
+ const userAgent = navigator.userAgent.toLowerCase();
31354
+ const isQywx = /wxwork/.test(userAgent) ? true : false;
31351
31355
  const Cookie = {
31352
31356
  set: function(key, value17, exdays) {
31353
31357
  if (key.indexOf("=") !== -1) {
@@ -31374,10 +31378,15 @@ const Cookie = {
31374
31378
  }
31375
31379
  };
31376
31380
  async function renderRoutes({ router, store: store2, microType, allowPermissionList, routerOptionsBak }) {
31377
- await store2.dispatch("getUserInfo");
31381
+ var _a, _b;
31382
+ let userInfo = await store2.dispatch("getUserInfo");
31378
31383
  await store2.dispatch("getAppListData");
31384
+ await store2.dispatch("getMyAppsList", {
31385
+ userId: userInfo.userId,
31386
+ funId: "store-my-app"
31387
+ });
31379
31388
  const permissionData = await store2.dispatch("getPermissionData");
31380
- const sessionVersion = JSON.parse(getSessionStorage("appInfo").extendProps.extendProps);
31389
+ const sessionVersion = JSON.parse(((_b = (_a = getSessionStorage("appInfo")) == null ? void 0 : _a.extendProps) == null ? void 0 : _b.extendProps) || "{}");
31381
31390
  const localVersion = getLocalStorage("versionInfo");
31382
31391
  if (localVersion) {
31383
31392
  if (sessionVersion.appVersion > localVersion.appVersion) {
@@ -31419,8 +31428,31 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
31419
31428
  const LOGIN_PAGE_NAME = config.loginRouteName;
31420
31429
  const routerOptionsBak = _.cloneDeep(router.options);
31421
31430
  window.sessionNotValidHandler = async function() {
31422
- if (typeof window.Code != "undefined") {
31423
- await pluginLogin(store2);
31431
+ if (typeof window.Code != "undefined" || isHb$1) {
31432
+ try {
31433
+ await pluginLogin(store2);
31434
+ } catch (e) {
31435
+ console.log("pluginLogin e", e);
31436
+ if (isHb$1) {
31437
+ if (isQywx) {
31438
+ location.href = location.protocol + "//" + location.host + "/hbwebchat/wxmain?syscode=gtptrpxebl";
31439
+ } else {
31440
+ try {
31441
+ await Dialog.alert({
31442
+ title: "\u63D0\u793A",
31443
+ message: "\u5F53\u524D\u4F1A\u8BDD\u5DF2\u5931\u6548\uFF0C\u7CFB\u7EDF\u5C06\u91CD\u65B0\u767B\u9646"
31444
+ });
31445
+ console.log("\u4F1A\u8BDD\u5931\u6548-------2");
31446
+ wx.miniProgram.navigateTo({
31447
+ url: "/pages/index/reload"
31448
+ });
31449
+ } catch (err) {
31450
+ console.log(err);
31451
+ return false;
31452
+ }
31453
+ }
31454
+ }
31455
+ }
31424
31456
  await store2.dispatch("getUserInfo");
31425
31457
  await store2.dispatch("getAppListData");
31426
31458
  await store2.dispatch("getPermissionData");
@@ -31448,6 +31480,14 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
31448
31480
  store2.dispatch("loginSuccess", token);
31449
31481
  }
31450
31482
  }
31483
+ if (!token) {
31484
+ let tokenInQuery = window.getQueryVariable("tokenWeapp");
31485
+ if (tokenInQuery) {
31486
+ console.log("tokenInQuery", tokenInQuery);
31487
+ setToken(tokenInQuery);
31488
+ token = tokenInQuery;
31489
+ }
31490
+ }
31451
31491
  }
31452
31492
  console.log("typeof window.Code", typeof window.Code);
31453
31493
  async function _renderRoutes() {
@@ -31495,18 +31535,30 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
31495
31535
  }
31496
31536
  }
31497
31537
  }
31498
- const code2 = getQueryVariable("code");
31499
- if (typeof window.Code != "undefined" || code2) {
31500
- if (!token) {
31538
+ async function tryPluginLogin() {
31539
+ try {
31501
31540
  token = await pluginLogin(store2);
31502
31541
  store2.dispatch("loginSuccess", token);
31503
- await _renderRoutes();
31542
+ return token;
31543
+ } catch (e) {
31544
+ console.log("tryPluginLogin error", e);
31545
+ return false;
31546
+ }
31547
+ }
31548
+ const code2 = getQueryVariable("code");
31549
+ if (typeof window.Code != "undefined" || code2 || isHb$1) {
31550
+ if (!token) {
31551
+ if (await tryPluginLogin()) {
31552
+ await _renderRoutes();
31553
+ }
31504
31554
  } else {
31505
31555
  if (!await checkLogin()) {
31506
- token = await pluginLogin(store2);
31507
- store2.dispatch("loginSuccess", token);
31556
+ if (await tryPluginLogin()) {
31557
+ await _renderRoutes();
31558
+ }
31559
+ } else {
31560
+ await _renderRoutes();
31508
31561
  }
31509
- await _renderRoutes();
31510
31562
  }
31511
31563
  } else {
31512
31564
  if (!token && to.name !== LOGIN_PAGE_NAME) {
@@ -31518,10 +31570,14 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
31518
31570
  } else {
31519
31571
  console.log("router8");
31520
31572
  if (!await checkLogin()) {
31521
- token = await pluginLogin(store2);
31522
- store2.dispatch("loginSuccess", token);
31573
+ if (await tryPluginLogin()) {
31574
+ await _renderRoutes();
31575
+ } else {
31576
+ console.log("router9");
31577
+ }
31578
+ } else {
31579
+ await _renderRoutes();
31523
31580
  }
31524
- await _renderRoutes();
31525
31581
  }
31526
31582
  }
31527
31583
  });
@@ -31530,38 +31586,40 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
31530
31586
  window.scrollTo(0, 0);
31531
31587
  });
31532
31588
  }
31589
+ let singleLoginPromiseMapping = {};
31533
31590
  const pluginLogin = (store2) => {
31534
- sessionStorage.removeItem("lambo-token");
31535
- sessionStorage.removeItem("sso_token");
31536
- sessionStorage.removeItem("userInfo");
31537
- localStorage.removeItem("v8-token");
31538
- localStorage.removeItem("userId");
31539
- localStorage.removeItem("userInfo");
31540
- Cookie.set("lambo-sso-key", "", 1);
31541
- Cookie.set("TOKEN_KEY", "", 1);
31542
- store2.commit("setUserName", "");
31543
- store2.commit("setToken", "");
31544
- return new Promise((resolve, reject) => {
31545
- console.log("1111`111");
31546
- const code2 = getQueryVariable("code");
31547
- if (code2) {
31548
- axios$3.get("/ind-uc-ext-server/sso/xtbg/auth/appLogin?code=" + code2).then(async (resp) => {
31591
+ let code2 = getQueryVariable("code");
31592
+ let singleLoginPromise = singleLoginPromiseMapping[code2];
31593
+ if (singleLoginPromise) {
31594
+ console.log("\u91CD\u590D\u4F7F\u7528\u4E86code\u521B\u5EFA\u4F1A\u8BDD\uFF01");
31595
+ return singleLoginPromise;
31596
+ }
31597
+ singleLoginPromise = singleLoginPromiseMapping[code2] = new Promise((resolve, reject) => {
31598
+ sessionStorage.removeItem("lambo-token");
31599
+ sessionStorage.removeItem("sso_token");
31600
+ sessionStorage.removeItem("userInfo");
31601
+ localStorage.removeItem("v8-token");
31602
+ localStorage.removeItem("userId");
31603
+ localStorage.removeItem("userInfo");
31604
+ Cookie.set("lambo-sso-key", "", 1);
31605
+ Cookie.set("TOKEN_KEY", "", 1);
31606
+ store2.commit("setUserName", "");
31607
+ store2.commit("setToken", "");
31608
+ if (isHb$1) {
31609
+ let url = location.protocol + "//" + location.host + "/scyxgateway/ind-uc-ext-server/sso/hb/ssoHbWxLogin";
31610
+ axios$3.get(url).then(async (resp) => {
31549
31611
  setToken(resp.token);
31550
31612
  resolve(resp.token);
31613
+ localStorage.setItem("v8-token", resp.token);
31614
+ sessionStorage.setItem("lambo-token", resp.token);
31551
31615
  }).catch((e) => {
31552
31616
  console.log("\u83B7\u53D6token\u5F02\u5E38", e);
31553
- Message.error({
31554
- content: "\u8C03\u7528\u5355\u70B9\u767B\u5F55\u670D\u52A1\u767B\u5F55\u5F02\u5E38\uFF0C\u8BF7\u8FD4\u56DE\u79FB\u52A8\u95E8\u6237\u91CD\u65B0\u767B\u5F55\uFF01",
31555
- duration: 10,
31556
- closable: true
31557
- });
31558
31617
  reject(0);
31559
31618
  });
31560
31619
  } else {
31561
- Code.postMessage("");
31562
- window.getCode = function(res) {
31563
- console.log("getCode res", res);
31564
- axios$3.get("/ind-uc-ext-server/sso/ssoAppLogin?code=" + res).then(async (resp) => {
31620
+ console.log("1111`111");
31621
+ if (code2) {
31622
+ axios$3.get("/ind-uc-ext-server/sso/xtbg/auth/appLogin?code=" + code2).then(async (resp) => {
31565
31623
  setToken(resp.token);
31566
31624
  resolve(resp.token);
31567
31625
  }).catch((e) => {
@@ -31573,9 +31631,27 @@ const pluginLogin = (store2) => {
31573
31631
  });
31574
31632
  reject(0);
31575
31633
  });
31576
- };
31634
+ } else {
31635
+ Code.postMessage("");
31636
+ window.getCode = function(res) {
31637
+ console.log("getCode res", res);
31638
+ axios$3.get("/ind-uc-ext-server/sso/ssoAppLogin?code=" + res).then(async (resp) => {
31639
+ setToken(resp.token);
31640
+ resolve(resp.token);
31641
+ }).catch((e) => {
31642
+ console.log("\u83B7\u53D6token\u5F02\u5E38", e);
31643
+ Message.error({
31644
+ content: "\u8C03\u7528\u5355\u70B9\u767B\u5F55\u670D\u52A1\u767B\u5F55\u5F02\u5E38\uFF0C\u8BF7\u8FD4\u56DE\u79FB\u52A8\u95E8\u6237\u91CD\u65B0\u767B\u5F55\uFF01",
31645
+ duration: 10,
31646
+ closable: true
31647
+ });
31648
+ reject(0);
31649
+ });
31650
+ };
31651
+ }
31577
31652
  }
31578
31653
  });
31654
+ return singleLoginPromise;
31579
31655
  };
31580
31656
  window.getQueryVariable = function getQueryVariable2(variable) {
31581
31657
  var query = window.location.search.substring(1);
@@ -31600,7 +31676,10 @@ window.getQueryVariable = function getQueryVariable2(variable) {
31600
31676
  return false;
31601
31677
  };
31602
31678
  const checkLogin = async () => {
31603
- var _a;
31679
+ var _a, _b;
31680
+ if (localStorage.getItem("whoisyourdaddy") == "1") {
31681
+ return Promise.resolve(true);
31682
+ }
31604
31683
  try {
31605
31684
  let token = getToken();
31606
31685
  const resp = await axios.get(`${config.authServerContext}/manage/user/getCurrentInfo`, {
@@ -31609,7 +31688,8 @@ const checkLogin = async () => {
31609
31688
  token
31610
31689
  }
31611
31690
  });
31612
- return ((_a = resp.data) == null ? void 0 : _a.code) == 1;
31691
+ console.log(((_a = resp.data) == null ? void 0 : _a.code) == 1 ? "\u6709\u4F1A\u8BDD\u4E86\uFF01" : "\u6CA1\u6709\u4F1A\u8BDD\u3002\u3002\u3002");
31692
+ return ((_b = resp.data) == null ? void 0 : _b.code) == 1;
31613
31693
  } catch (e) {
31614
31694
  console.log("getLoginData e", e);
31615
31695
  Message.error({ content: "\u6821\u9A8C\u4F1A\u8BDD\u5F02\u5E38\uFF01", duration: 10, closable: true });