@10yun/open-sdk 0.3.141
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/common/common.js +33 -0
- package/common/console.js +8 -0
- package/common/router.js +193 -0
- package/dist/404-BPCxDpA_.js +10 -0
- package/dist/404-TRRGHMxc.cjs +1 -0
- package/dist/_plugin-vue_export-helper-BRhNVNlk.cjs +1 -0
- package/dist/_plugin-vue_export-helper-Be64z-LZ.js +8 -0
- package/dist/alone_run-B81vAxWr.cjs +1 -0
- package/dist/alone_run-CMRT04bJ.js +13 -0
- package/dist/helper-C42BllYY.cjs +1 -0
- package/dist/helper-_fZwiZH9.js +42 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.es.js +29 -0
- package/dist/login-B-P5ZeKk.cjs +1 -0
- package/dist/login-DF3BEUKH.js +2748 -0
- package/dist/none-CyU32h-T.js +13 -0
- package/dist/none-WaaVq-Tp.cjs +1 -0
- package/dist/open-sdk.css +2 -0
- package/dist/opensdk-v3-B5rqCXLc.cjs +6 -0
- package/dist/opensdk-v3-DWIRr4gg.js +6765 -0
- package/dist/vite-plugin.cjs.js +41 -0
- package/dist/vite-plugin.es.js +196 -0
- package/package.json +69 -0
- package/uncompiled/dict.js +23 -0
- package/uncompiled/index.js +102 -0
- package/uncompiled/style.js +0 -0
package/common/common.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 判断是否为有效字符串:
|
|
3
|
+
* - 类型必须是 string
|
|
4
|
+
* - 不能是空字符串或全是空格
|
|
5
|
+
* - 不能是 'undefined' 这个字符串
|
|
6
|
+
*/
|
|
7
|
+
export function isValidString(str) {
|
|
8
|
+
return typeof str === 'string' && str.trim() !== '' && str !== 'undefined';
|
|
9
|
+
}
|
|
10
|
+
const randomNum = Math.floor(Math.random() * 22) + 1;
|
|
11
|
+
export function randomAvatar() {
|
|
12
|
+
return `https://10ui.cn/default/avatar/default_${randomNum}.png`;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 使用正则表达式进行过滤
|
|
16
|
+
* 过滤除了 https:// 和 http:// 以外的 // 和 ///
|
|
17
|
+
*/
|
|
18
|
+
export function parseDomainUrl(str) {
|
|
19
|
+
str = str.replace(/\/(undefined\/)+/g, '/');
|
|
20
|
+
str = str.replace(/([^:]\/)\/+/g, '$1');
|
|
21
|
+
return str;
|
|
22
|
+
}
|
|
23
|
+
export function isHttpUrl(url) {
|
|
24
|
+
return /^https?:\/\//i.test(url);
|
|
25
|
+
}
|
|
26
|
+
export function mainLoadJs(url) {
|
|
27
|
+
var script = document.createElement('script');
|
|
28
|
+
script.type = 'text/javascript';
|
|
29
|
+
script.src = url;
|
|
30
|
+
// document.getElementsByTagName('head')[0].appendChild(script);
|
|
31
|
+
document.head.appendChild(script);
|
|
32
|
+
// document.body.appendChild(script);
|
|
33
|
+
}
|
package/common/router.js
ADDED
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { treeToSubFlatten } from '@10yun/cv-js-utils';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 路由-菜单 处理
|
|
5
|
+
*/
|
|
6
|
+
function replaceSlashes(str) {
|
|
7
|
+
// 去除开头的斜杠
|
|
8
|
+
str = str.replace(/^\//, '');
|
|
9
|
+
// 将所有斜杠替换为下划线
|
|
10
|
+
str = str.replace(/\//g, '_');
|
|
11
|
+
return str;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* 解析路由菜单单条,确保菜单每条都有`name`值
|
|
15
|
+
* @param {*} tempItem
|
|
16
|
+
* @param {*} i
|
|
17
|
+
* @returns
|
|
18
|
+
*/
|
|
19
|
+
function parseRouteItem(tempItem, i) {
|
|
20
|
+
i = i || 1;
|
|
21
|
+
let tempPath = '';
|
|
22
|
+
/**
|
|
23
|
+
* 如果没有 path
|
|
24
|
+
*/
|
|
25
|
+
if (!tempItem['path']) {
|
|
26
|
+
if (tempItem['component']) {
|
|
27
|
+
tempPath = tempItem['component'];
|
|
28
|
+
}
|
|
29
|
+
} else {
|
|
30
|
+
tempPath = tempItem.path;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* 如果没有 component 应该删除 path
|
|
34
|
+
*/
|
|
35
|
+
if (!tempItem['component']) {
|
|
36
|
+
tempPath = '';
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
let tempName = '';
|
|
40
|
+
if (!tempItem['name']) {
|
|
41
|
+
if (tempPath) {
|
|
42
|
+
tempName = replaceSlashes(tempPath);
|
|
43
|
+
} else {
|
|
44
|
+
tempName = 'temp_name_' + i;
|
|
45
|
+
}
|
|
46
|
+
} else {
|
|
47
|
+
tempName = tempItem['name'];
|
|
48
|
+
}
|
|
49
|
+
tempName = replaceSlashes(tempName);
|
|
50
|
+
/**
|
|
51
|
+
* 判断是否有子集
|
|
52
|
+
*/
|
|
53
|
+
if (tempItem.children && tempItem.children.length > 0) {
|
|
54
|
+
let tempChildren = tempItem.children;
|
|
55
|
+
let children_menu_num = 0; // 子菜单数量
|
|
56
|
+
let children_opt_num = 0; // 子操作数量
|
|
57
|
+
tempChildren.forEach((item2, index2) => {
|
|
58
|
+
item2.isMenu == true && children_menu_num++;
|
|
59
|
+
item2.isRbac == true && children_opt_num++;
|
|
60
|
+
});
|
|
61
|
+
tempItem.children_menu_num = children_menu_num;
|
|
62
|
+
tempItem.children_opt_num = children_opt_num;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
...tempItem,
|
|
66
|
+
path: tempPath,
|
|
67
|
+
name: tempName
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function parseChildrenAll() {}
|
|
71
|
+
function parseChildrenOption() {}
|
|
72
|
+
function parseChildrenMenu() {}
|
|
73
|
+
function parseRouteTree(originalArr) {
|
|
74
|
+
let newArr = [];
|
|
75
|
+
for (let index1 in originalArr) {
|
|
76
|
+
let tempItem1 = originalArr[index1];
|
|
77
|
+
tempItem1 = parseRouteItem(tempItem1, index1);
|
|
78
|
+
if (tempItem.children) {
|
|
79
|
+
tempItem.children = parseRouteTree(tempItem.children);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// https://www.cnblogs.com/jj123/p/12784100.html
|
|
85
|
+
// https://segmentfault.com/a/1190000015419713
|
|
86
|
+
|
|
87
|
+
function _import(file) {
|
|
88
|
+
file = file.replace(/\s/g, '');
|
|
89
|
+
if (file.substr(0, 1) == '/') file = file.substr(1);
|
|
90
|
+
if (file.substr(0, 1) == '/') file = file.substr(1);
|
|
91
|
+
return file;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* 递归获取,每层级的信息,类似 $route.matched
|
|
96
|
+
* @param {Array} routerlist 需要递归的数据
|
|
97
|
+
* @param {Array} parentInfo 上级的信息向下传递
|
|
98
|
+
* @returns
|
|
99
|
+
*/
|
|
100
|
+
function parseRouteTreeInfo(routerlist, parentInfo = []) {
|
|
101
|
+
routerlist = routerlist || [];
|
|
102
|
+
let routerInfo = [];
|
|
103
|
+
routerlist.forEach((item1, index1) => {
|
|
104
|
+
let isParam = {
|
|
105
|
+
isMenu: item1.isMenu || false,
|
|
106
|
+
isRbac: item1.isRbac || false,
|
|
107
|
+
isWindow: item1.isWindow || false,
|
|
108
|
+
isAlone: item1.isAlone || false,
|
|
109
|
+
isPage: item1.path ? true : false
|
|
110
|
+
};
|
|
111
|
+
let item_new = {
|
|
112
|
+
path: item1.path || '',
|
|
113
|
+
name: item1.name || '',
|
|
114
|
+
...isParam,
|
|
115
|
+
...item1.meta
|
|
116
|
+
};
|
|
117
|
+
if (item1.redirect) {
|
|
118
|
+
item_new = Object.assign({}, item_new, { redirect: item1.redirect });
|
|
119
|
+
}
|
|
120
|
+
if (item1.generatemenu == 0) {
|
|
121
|
+
item_new = Object.assign({}, item_new, { hidden: true });
|
|
122
|
+
}
|
|
123
|
+
let treeInfo = [];
|
|
124
|
+
treeInfo.push(...parentInfo);
|
|
125
|
+
treeInfo.push(item_new);
|
|
126
|
+
if (item1.children) {
|
|
127
|
+
let tempChildren = item1.children;
|
|
128
|
+
item1.children = parseRouteTreeInfo([...tempChildren], treeInfo);
|
|
129
|
+
}
|
|
130
|
+
item1.treeInfo = treeInfo;
|
|
131
|
+
routerInfo.push(item1);
|
|
132
|
+
});
|
|
133
|
+
return routerInfo;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* 根据路由匹配地址
|
|
138
|
+
* @param {*} data 路由数据
|
|
139
|
+
* @param {*} base 路由前缀
|
|
140
|
+
* @param {*} options 粗略的配置项
|
|
141
|
+
*/
|
|
142
|
+
function routeParseQiankun(baseRoute, menuArr, isFlatten = true) {
|
|
143
|
+
// 递归获取,各级信息
|
|
144
|
+
menuArr = parseRouteTreeInfo(menuArr);
|
|
145
|
+
if (!Array.isArray(menuArr)) return baseRoute;
|
|
146
|
+
|
|
147
|
+
/** 2级+菜单 ,将菜单数据处理为一维函数 如果有多级菜单*/
|
|
148
|
+
let menuRoute = treeToSubFlatten(menuArr, 'children');
|
|
149
|
+
// 遍历处理路由
|
|
150
|
+
menuRoute.forEach((item, index) => {
|
|
151
|
+
// menuArr.forEach((item, index) => {
|
|
152
|
+
if (!item['path']) return;
|
|
153
|
+
item = parseRouteItem(item, index);
|
|
154
|
+
|
|
155
|
+
try {
|
|
156
|
+
let routerItem = {
|
|
157
|
+
path: item.path, // 路由路径名
|
|
158
|
+
name: item.name, // 命名路由 用于配合菜单简洁跳转
|
|
159
|
+
query: item['query'] || {},
|
|
160
|
+
params: item['params'] || {},
|
|
161
|
+
props: item['props'] || true,
|
|
162
|
+
isMenu: item['isMenu'] || false,
|
|
163
|
+
meta: {
|
|
164
|
+
title: item['title'] || '',
|
|
165
|
+
isMenu: item['isMenu'] || false,
|
|
166
|
+
isRbac: item['isRbac'] || false,
|
|
167
|
+
isWindow: item['isWindow'] || false,
|
|
168
|
+
isAlone: item['isAlone'] || false,
|
|
169
|
+
treeInfo: item['treeInfo'] || [],
|
|
170
|
+
...item.meta
|
|
171
|
+
// purview: item[options.permissions],
|
|
172
|
+
}
|
|
173
|
+
// component = () =>
|
|
174
|
+
};
|
|
175
|
+
// 路由映射真实视图路径
|
|
176
|
+
if (typeof item.component == 'string') {
|
|
177
|
+
routerItem.component_str = _import(item.component);
|
|
178
|
+
}
|
|
179
|
+
baseRoute.push(routerItem);
|
|
180
|
+
// 递归处理子路由
|
|
181
|
+
if (!isFlatten && item.children) {
|
|
182
|
+
routerItem.children = [];
|
|
183
|
+
routeParseQiankun(routerItem.children, item.children);
|
|
184
|
+
}
|
|
185
|
+
} catch (err) {
|
|
186
|
+
console.log('---路由注册问题');
|
|
187
|
+
console.log('err--', err);
|
|
188
|
+
// item['url'] = '/404'
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
return baseRoute;
|
|
192
|
+
}
|
|
193
|
+
export { parseRouteItem, parseRouteTree, routeParseQiankun };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { t as r } from "./_plugin-vue_export-helper-Be64z-LZ.js";
|
|
2
|
+
import { createElementBlock as d, createElementVNode as e, openBlock as l } from "vue";
|
|
3
|
+
var t = {}, a = { class: "cloud-404-wrap" };
|
|
4
|
+
function c(s, o) {
|
|
5
|
+
return l(), d("div", a, [...o[0] || (o[0] = [e("div", { class: "cloud-404-box" }, [e("div", { class: "cloud-404-code" }, "404"), e("div", { class: "cloud-404-message" }, "Not Found")], -1)])]);
|
|
6
|
+
}
|
|
7
|
+
var n = /* @__PURE__ */ r(t, [["render", c]]);
|
|
8
|
+
export {
|
|
9
|
+
n as default
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const _=require("./helper-C42BllYY.cjs"),l=require("./_plugin-vue_export-helper-BRhNVNlk.cjs");let e=require("vue");var t={},o={class:"cloud-404-wrap"};function u(d,r){return(0,e.openBlock)(),(0,e.createElementBlock)("div",o,[...r[0]||(r[0]=[(0,e.createElementVNode)("div",{class:"cloud-404-box"},[(0,e.createElementVNode)("div",{class:"cloud-404-code"},"404"),(0,e.createElementVNode)("div",{class:"cloud-404-message"},"Not Found")],-1)])])}var c=l._plugin_vue_export_helper_default(t,[["render",u]]);exports.default=c;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var n=(e,r)=>{const t=e.__vccOpts||e;for(const[_,u]of r)t[_]=u;return t};Object.defineProperty(exports,"_plugin_vue_export_helper_default",{enumerable:!0,get:function(){return n}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const d=require("./helper-C42BllYY.cjs"),n=require("./_plugin-vue_export-helper-BRhNVNlk.cjs");let e=require("vue");var o={},l={class:"cloud-none-wrap",style:{"background-color":"none"}};function t(u,r){return(0,e.openBlock)(),(0,e.createElementBlock)("div",l,[...r[0]||(r[0]=[(0,e.createElementVNode)("div",{class:"cloud-none-box"},[(0,e.createElementVNode)("div",{class:"cloud-none-code"},"不建议,子应用单独运行~"),(0,e.createElementVNode)("div",{class:"cloud-none-message"},"Not Alone")],-1)])])}var c=n._plugin_vue_export_helper_default(o,[["render",t]]);exports.default=c;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { t as n } from "./_plugin-vue_export-helper-Be64z-LZ.js";
|
|
2
|
+
import { createElementBlock as r, createElementVNode as e, openBlock as l } from "vue";
|
|
3
|
+
var a = {}, t = {
|
|
4
|
+
class: "cloud-none-wrap",
|
|
5
|
+
style: { "background-color": "none" }
|
|
6
|
+
};
|
|
7
|
+
function c(d, o) {
|
|
8
|
+
return l(), r("div", t, [...o[0] || (o[0] = [e("div", { class: "cloud-none-box" }, [e("div", { class: "cloud-none-code" }, "不建议,子应用单独运行~"), e("div", { class: "cloud-none-message" }, "Not Alone")], -1)])]);
|
|
9
|
+
}
|
|
10
|
+
var _ = /* @__PURE__ */ n(a, [["render", c]]);
|
|
11
|
+
export {
|
|
12
|
+
_ as default
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _=Object.create,c=Object.defineProperty,d=Object.getOwnPropertyDescriptor,b=Object.getOwnPropertyNames,g=Object.getPrototypeOf,O=Object.prototype.hasOwnProperty,h=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),v=(e,n)=>{let r={};for(var t in e)c(r,t,{get:e[t],enumerable:!0});return n||c(r,Symbol.toStringTag,{value:"Module"}),r},P=(e,n,r,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(var o=b(n),i=0,l=o.length,u;i<l;i++)u=o[i],!O.call(e,u)&&u!==r&&c(e,u,{get:(f=>n[f]).bind(null,u),enumerable:!(t=d(n,u))||t.enumerable});return e},w=(e,n,r)=>(r=e!=null?_(g(e)):{},P(n||!e||!e.__esModule?c(r,"default",{value:e,enumerable:!0}):r,e));let A=require("@10yun/cv-js-utils");function y(e){return typeof e=="string"&&e.trim()!==""&&e!=="undefined"}var s=Math.floor(Math.random()*22)+1;function j(){return`https://10ui.cn/default/avatar/default_${s}.png`}function m(e){return e=e.replace(/\/(undefined\/)+/g,"/"),e=e.replace(/([^:]\/)\/+/g,"$1"),e}function p(e){return e=e.replace(/^\//,""),e=e.replace(/\//g,"_"),e}function M(e,n){n=n||1;let r="";e.path?r=e.path:e.component&&(r=e.component),e.component||(r="");let t="";if(e.name?t=e.name:r?t=p(r):t="temp_name_"+n,t=p(t),e.children&&e.children.length>0){let o=e.children,i=0,l=0;o.forEach((u,f)=>{u.isMenu==!0&&i++,u.isRbac==!0&&l++}),e.children_menu_num=i,e.children_opt_num=l}return{...e,path:r,name:t}}var a=typeof window<"u"?window.proxy||window:{},S=function(e){a?.__POWERED_BY_QIANKUN__&&(window.moudleQiankunAppLifeCycles||(window.moudleQiankunAppLifeCycles={}),a.qiankunName&&(window.moudleQiankunAppLifeCycles[a.qiankunName]=e))};Object.defineProperty(exports,"__commonJSMin",{enumerable:!0,get:function(){return h}});Object.defineProperty(exports,"__exportAll",{enumerable:!0,get:function(){return v}});Object.defineProperty(exports,"__toESM",{enumerable:!0,get:function(){return w}});Object.defineProperty(exports,"isValidString",{enumerable:!0,get:function(){return y}});Object.defineProperty(exports,"parseDomainUrl",{enumerable:!0,get:function(){return m}});Object.defineProperty(exports,"parseRouteItem",{enumerable:!0,get:function(){return M}});Object.defineProperty(exports,"qiankunWindow",{enumerable:!0,get:function(){return a}});Object.defineProperty(exports,"randomAvatar",{enumerable:!0,get:function(){return j}});Object.defineProperty(exports,"renderWithQiankun",{enumerable:!0,get:function(){return S}});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import "@10yun/cv-js-utils";
|
|
2
|
+
function _(n) {
|
|
3
|
+
return typeof n == "string" && n.trim() !== "" && n !== "undefined";
|
|
4
|
+
}
|
|
5
|
+
var f = Math.floor(Math.random() * 22) + 1;
|
|
6
|
+
function t() {
|
|
7
|
+
return `https://10ui.cn/default/avatar/default_${f}.png`;
|
|
8
|
+
}
|
|
9
|
+
function w(n) {
|
|
10
|
+
return n = n.replace(/\/(undefined\/)+/g, "/"), n = n.replace(/([^:]\/)\/+/g, "$1"), n;
|
|
11
|
+
}
|
|
12
|
+
function d(n) {
|
|
13
|
+
return n = n.replace(/^\//, ""), n = n.replace(/\//g, "_"), n;
|
|
14
|
+
}
|
|
15
|
+
function s(n, o) {
|
|
16
|
+
o = o || 1;
|
|
17
|
+
let e = "";
|
|
18
|
+
n.path ? e = n.path : n.component && (e = n.component), n.component || (e = "");
|
|
19
|
+
let i = "";
|
|
20
|
+
if (n.name ? i = n.name : e ? i = d(e) : i = "temp_name_" + o, i = d(i), n.children && n.children.length > 0) {
|
|
21
|
+
let c = n.children, u = 0, r = 0;
|
|
22
|
+
c.forEach((l, p) => {
|
|
23
|
+
l.isMenu == !0 && u++, l.isRbac == !0 && r++;
|
|
24
|
+
}), n.children_menu_num = u, n.children_opt_num = r;
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
...n,
|
|
28
|
+
path: e,
|
|
29
|
+
name: i
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
var a = typeof window < "u" ? window.proxy || window : {}, g = function(n) {
|
|
33
|
+
a?.__POWERED_BY_QIANKUN__ && (window.moudleQiankunAppLifeCycles || (window.moudleQiankunAppLifeCycles = {}), a.qiankunName && (window.moudleQiankunAppLifeCycles[a.qiankunName] = n));
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
w as a,
|
|
37
|
+
_ as i,
|
|
38
|
+
g as n,
|
|
39
|
+
t as o,
|
|
40
|
+
s as r,
|
|
41
|
+
a as t
|
|
42
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./helper-C42BllYY.cjs"),e=require("./opensdk-v3-B5rqCXLc.cjs");exports.HttpObj=e.HttpObj;exports.SameFrame=e._sfc_main;exports.SameRouteView=e.SameRouteView_default;exports.SameWatermark=e.SameWatermark_default;exports.StorageObj=e.StorageObj;exports.SwitchBusiness=e.SwitchBusiness_default;exports.createHttp=e.createHttp;exports.dialogChoiceGoods=e.dialogGoods_default;exports.dialogChoiceImage=e.dialogImage_default;exports.dialogChoiceStaff=e.dialogStaff_default;exports.qiankunWindow=o.qiankunWindow;exports.sdkBootstrap=e.sdkBootstrap;exports.sdkStartBefore=e.sdkStartBefore;exports.sdkStarup=e.sdkStarup;exports.sdkStoreClearCache=e.sdkStoreClearCache;exports.useSdkAccountStore=e.useSdkAccountStore;exports.useSdkConfigHook=e.useSdkConfigHook;exports.useSdkLanguageStore=e.useSdkLanguageStore;exports.useSdkPermissionHook=e.useSdkPermissionHook;exports.useSdkPermissionStore=e.useSdkPermissionStore;exports.useSdkProductStore=e.useSdkProductStore;exports.useSdkQiankunStore=e.useSdkQiankunStore;exports.useSdkSysWinStore=e.useSdkSysWinStore;exports.useSdkSystemStore=e.useSdkSystemStore;exports.useSdkThemesStore=e.useSdkThemesStore;
|
package/dist/index.es.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { C as s, S as e, _ as o, a as t, b as S, c as d, d as r, f as i, g as u, h as k, i as m, l as f, m as n, n as l, o as g, p as c, r as _, s as h, t as p, u as C, v as w, w as B, x as H, y as W } from "./opensdk-v3-DWIRr4gg.js";
|
|
2
|
+
import { t as y } from "./helper-_fZwiZH9.js";
|
|
3
|
+
export {
|
|
4
|
+
W as HttpObj,
|
|
5
|
+
d as SameFrame,
|
|
6
|
+
C as SameRouteView,
|
|
7
|
+
h as SameWatermark,
|
|
8
|
+
s as StorageObj,
|
|
9
|
+
f as SwitchBusiness,
|
|
10
|
+
S as createHttp,
|
|
11
|
+
t as dialogChoiceGoods,
|
|
12
|
+
g as dialogChoiceImage,
|
|
13
|
+
m as dialogChoiceStaff,
|
|
14
|
+
y as qiankunWindow,
|
|
15
|
+
p as sdkBootstrap,
|
|
16
|
+
l as sdkStartBefore,
|
|
17
|
+
_ as sdkStarup,
|
|
18
|
+
r as sdkStoreClearCache,
|
|
19
|
+
w as useSdkAccountStore,
|
|
20
|
+
B as useSdkConfigHook,
|
|
21
|
+
k as useSdkLanguageStore,
|
|
22
|
+
e as useSdkPermissionHook,
|
|
23
|
+
i as useSdkPermissionStore,
|
|
24
|
+
c as useSdkProductStore,
|
|
25
|
+
H as useSdkQiankunStore,
|
|
26
|
+
u as useSdkSysWinStore,
|
|
27
|
+
o as useSdkSystemStore,
|
|
28
|
+
n as useSdkThemesStore
|
|
29
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const q=require("./helper-C42BllYY.cjs"),N=require("./opensdk-v3-B5rqCXLc.cjs"),P=require("./_plugin-vue_export-helper-BRhNVNlk.cjs");let o=require("vue");var G={},x={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"};function K(h,n){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",x,[...n[0]||(n[0]=[(0,o.createElementVNode)("path",{d:"M384 554.666667a85.333333 85.333333 0 0 1 85.333333 85.333333v234.666667a85.333333 85.333333 0 0 1-85.333333 85.333333H149.333333a85.333333 85.333333 0 0 1-85.333333-85.333333V640a85.333333 85.333333 0 0 1 85.333333-85.333333h234.666667z m226.133333 277.333333c4.693333 0 8.533333 3.84 8.533334 8.533333V896h183.466666c4.693333 0 8.533333 3.84 8.533334 8.533333v46.933334a8.533333 8.533333 0 0 1-8.533334 8.533333H563.2a8.533333 8.533333 0 0 1-8.533333-8.533333v-110.933334c0-4.693333 3.84-8.533333 8.533333-8.533333h46.933333z m341.333334 0c4.693333 0 8.533333 3.84 8.533333 8.533333v110.933334a8.533333 8.533333 0 0 1-8.533333 8.533333h-46.933334a8.533333 8.533333 0 0 1-8.533333-8.533333v-110.933334c0-4.693333 3.84-8.533333 8.533333-8.533333h46.933334zM384 618.666667H149.333333a21.333333 21.333333 0 0 0-21.184 18.837333L128 640v234.666667a21.333333 21.333333 0 0 0 18.837333 21.184L149.333333 896h234.666667a21.333333 21.333333 0 0 0 21.184-18.837333L405.333333 874.666667V640a21.333333 21.333333 0 0 0-18.837333-21.184L384 618.666667z m418.133333 149.333333c4.693333 0 8.533333 3.84 8.533334 8.533333v46.933334a8.533333 8.533333 0 0 1-8.533334 8.533333h-46.933333a8.533333 8.533333 0 0 1-8.533333-8.533333v-46.933334c0-4.693333 3.84-8.533333 8.533333-8.533333h46.933333zM298.666667 704a21.333333 21.333333 0 0 1 21.333333 21.333333v64a21.333333 21.333333 0 0 1-21.333333 21.333334h-64a21.333333 21.333333 0 0 1-21.333334-21.333334v-64a21.333333 21.333333 0 0 1 21.333334-21.333333h64z m503.466666-149.333333c4.693333 0 8.533333 3.84 8.533334 8.533333v46.933333a8.533333 8.533333 0 0 1-8.533334 8.533334H618.666667v64h119.466666c4.693333 0 8.533333 3.84 8.533334 8.533333v46.933333a8.533333 8.533333 0 0 1-8.533334 8.533334h-174.933333a8.533333 8.533333 0 0 1-8.533333-8.533334v-174.933333c0-4.693333 3.84-8.533333 8.533333-8.533333h238.933333z m149.333334 128c4.693333 0 8.533333 3.84 8.533333 8.533333v46.933333a8.533333 8.533333 0 0 1-8.533333 8.533334h-132.266667a8.533333 8.533333 0 0 1-8.533333-8.533334v-46.933333c0-4.693333 3.84-8.533333 8.533333-8.533333h132.266667z m0-128c4.693333 0 8.533333 3.84 8.533333 8.533333v46.933333a8.533333 8.533333 0 0 1-8.533333 8.533334h-46.933334a8.533333 8.533333 0 0 1-8.533333-8.533334v-46.933333c0-4.693333 3.84-8.533333 8.533333-8.533333h46.933334zM384 64a85.333333 85.333333 0 0 1 85.333333 85.333333v234.666667a85.333333 85.333333 0 0 1-85.333333 85.333333H149.333333a85.333333 85.333333 0 0 1-85.333333-85.333333V149.333333a85.333333 85.333333 0 0 1 85.333333-85.333333h234.666667z m490.666667 0a85.333333 85.333333 0 0 1 85.333333 85.333333v234.666667a85.333333 85.333333 0 0 1-85.333333 85.333333H640a85.333333 85.333333 0 0 1-85.333333-85.333333V149.333333a85.333333 85.333333 0 0 1 85.333333-85.333333h234.666667zM384 128H149.333333a21.333333 21.333333 0 0 0-21.184 18.837333L128 149.333333v234.666667a21.333333 21.333333 0 0 0 18.837333 21.184L149.333333 405.333333h234.666667a21.333333 21.333333 0 0 0 21.184-18.837333L405.333333 384V149.333333a21.333333 21.333333 0 0 0-18.837333-21.184L384 128z m490.666667 0H640a21.333333 21.333333 0 0 0-21.184 18.837333L618.666667 149.333333v234.666667a21.333333 21.333333 0 0 0 18.837333 21.184L640 405.333333h234.666667a21.333333 21.333333 0 0 0 21.184-18.837333L896 384V149.333333a21.333333 21.333333 0 0 0-18.837333-21.184L874.666667 128z m-576 85.333333a21.333333 21.333333 0 0 1 21.333333 21.333334v64a21.333333 21.333333 0 0 1-21.333333 21.333333h-64a21.333333 21.333333 0 0 1-21.333334-21.333333v-64a21.333333 21.333333 0 0 1 21.333334-21.333334h64z m490.666666 0a21.333333 21.333333 0 0 1 21.333334 21.333334v64a21.333333 21.333333 0 0 1-21.333334 21.333333h-64a21.333333 21.333333 0 0 1-21.333333-21.333333v-64a21.333333 21.333333 0 0 1 21.333333-21.333334h64z",fill:"currentColor","p-id":"27545"},null,-1)])])}var J=P._plugin_vue_export_helper_default(G,[["render",K]]),X={},Y={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"};function W(h,n){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",Y,[...n[0]||(n[0]=[(0,o.createElementVNode)("path",{d:"M23 16a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h18a2 2 0 0 1 2 2v12ZM21 4H3v9h18V4ZM3 15v1h18v-1H3Zm3 6a1 1 0 0 1 1-1h10a1 1 0 1 1 0 2H7a1 1 0 0 1-1-1Z",fill:"currentColor"},null,-1)])])}var Z=P._plugin_vue_export_helper_default(X,[["render",W]]),j={},e3={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"};function t3(h,n){return(0,o.openBlock)(),(0,o.createElementBlock)("svg",e3,[...n[0]||(n[0]=[(0,o.createElementVNode)("path",{d:"M128 669.866667v154.133333a72 72 0 0 0 67.776 71.893333l4.224 0.106667H354.133333c4.693333 0 8.533333 3.84 8.533334 8.533333v46.933334a8.533333 8.533333 0 0 1-8.533334 8.533333H205.482667A141.482667 141.482667 0 0 1 64 818.517333V669.866667c0-4.693333 3.84-8.533333 8.533333-8.533334h46.933334c4.693333 0 8.533333 3.84 8.533333 8.533334z m832 0v148.650666A141.482667 141.482667 0 0 1 818.517333 960H669.866667a8.533333 8.533333 0 0 1-8.533334-8.533333v-46.933334c0-4.693333 3.84-8.533333 8.533334-8.533333h154.133333a72 72 0 0 0 71.893333-67.776l0.106667-4.224V669.866667c0-4.693333 3.84-8.533333 8.533333-8.533334h46.933334c4.693333 0 8.533333 3.84 8.533333 8.533334z m0-170.666667v46.933333a8.533333 8.533333 0 0 1-8.533333 8.533334H72.533333a8.533333 8.533333 0 0 1-8.533333-8.533334v-46.933333c0-4.693333 3.84-8.533333 8.533333-8.533333h878.933334c4.693333 0 8.533333 3.84 8.533333 8.533333z m-597.333333-426.666667v46.933334a8.533333 8.533333 0 0 1-8.533334 8.533333H200a72 72 0 0 0-71.893333 67.776L128 200V354.133333a8.533333 8.533333 0 0 1-8.533333 8.533334H72.533333a8.533333 8.533333 0 0 1-8.533333-8.533334V205.482667A141.482667 141.482667 0 0 1 205.482667 64H354.133333c4.693333 0 8.533333 3.84 8.533334 8.533333zM818.517333 64A141.482667 141.482667 0 0 1 960 205.482667V354.133333a8.533333 8.533333 0 0 1-8.533333 8.533334h-46.933334a8.533333 8.533333 0 0 1-8.533333-8.533334V200a72 72 0 0 0-67.776-71.893333L824 128H669.866667a8.533333 8.533333 0 0 1-8.533334-8.533333V72.533333c0-4.693333 3.84-8.533333 8.533334-8.533333h148.650666z",fill:"currentColor"},null,-1)])])}var o3=P._plugin_vue_export_helper_default(j,[["render",t3]]),a3=q.__commonJSMin(((h,n)=>{var c;(function(p,_){typeof h=="object"?n.exports=_():typeof define=="function"&&define.amd?define(_):p.QRCode=_()})(h,function(){function p(e){this.mode=w.MODE_8BIT_BYTE,this.data=e,this.parsedData=[];for(var t=0,a=this.data.length;t<a;t++){var i=[],r=this.data.charCodeAt(t);r>65536?(i[0]=240|(r&1835008)>>>18,i[1]=128|(r&258048)>>>12,i[2]=128|(r&4032)>>>6,i[3]=128|r&63):r>2048?(i[0]=224|(r&61440)>>>12,i[1]=128|(r&4032)>>>6,i[2]=128|r&63):r>128?(i[0]=192|(r&1984)>>>6,i[1]=128|r&63):i[0]=r,this.parsedData.push(i)}this.parsedData=Array.prototype.concat.apply([],this.parsedData),this.parsedData.length!=this.data.length&&(this.parsedData.unshift(191),this.parsedData.unshift(187),this.parsedData.unshift(239))}p.prototype={getLength:function(e){return this.parsedData.length},write:function(e){for(var t=0,a=this.parsedData.length;t<a;t++)e.put(this.parsedData[t],8)}};function _(e,t){this.typeNumber=e,this.errorCorrectLevel=t,this.modules=null,this.moduleCount=0,this.dataCache=null,this.dataList=[]}_.prototype={addData:function(e){var t=new p(e);this.dataList.push(t),this.dataCache=null},isDark:function(e,t){if(e<0||this.moduleCount<=e||t<0||this.moduleCount<=t)throw new Error(e+","+t);return this.modules[e][t]},getModuleCount:function(){return this.moduleCount},make:function(){this.makeImpl(!1,this.getBestMaskPattern())},makeImpl:function(e,t){this.moduleCount=this.typeNumber*4+17,this.modules=new Array(this.moduleCount);for(var a=0;a<this.moduleCount;a++){this.modules[a]=new Array(this.moduleCount);for(var i=0;i<this.moduleCount;i++)this.modules[a][i]=null}this.setupPositionProbePattern(0,0),this.setupPositionProbePattern(this.moduleCount-7,0),this.setupPositionProbePattern(0,this.moduleCount-7),this.setupPositionAdjustPattern(),this.setupTimingPattern(),this.setupTypeInfo(e,t),this.typeNumber>=7&&this.setupTypeNumber(e),this.dataCache==null&&(this.dataCache=_.createData(this.typeNumber,this.errorCorrectLevel,this.dataList)),this.mapData(this.dataCache,t)},setupPositionProbePattern:function(e,t){for(var a=-1;a<=7;a++)if(!(e+a<=-1||this.moduleCount<=e+a))for(var i=-1;i<=7;i++)t+i<=-1||this.moduleCount<=t+i||(0<=a&&a<=6&&(i==0||i==6)||0<=i&&i<=6&&(a==0||a==6)||2<=a&&a<=4&&2<=i&&i<=4?this.modules[e+a][t+i]=!0:this.modules[e+a][t+i]=!1)},getBestMaskPattern:function(){for(var e=0,t=0,a=0;a<8;a++){this.makeImpl(!0,a);var i=v.getLostPoint(this);(a==0||e>i)&&(e=i,t=a)}return t},createMovieClip:function(e,t,a){var i=e.createEmptyMovieClip(t,a),r=1;this.make();for(var l=0;l<this.modules.length;l++)for(var d=l*r,s=0;s<this.modules[l].length;s++){var u=s*r;this.modules[l][s]&&(i.beginFill(0,100),i.moveTo(u,d),i.lineTo(u+r,d),i.lineTo(u+r,d+r),i.lineTo(u,d+r),i.endFill())}return i},setupTimingPattern:function(){for(var e=8;e<this.moduleCount-8;e++)this.modules[e][6]==null&&(this.modules[e][6]=e%2==0);for(var t=8;t<this.moduleCount-8;t++)this.modules[6][t]==null&&(this.modules[6][t]=t%2==0)},setupPositionAdjustPattern:function(){for(var e=v.getPatternPosition(this.typeNumber),t=0;t<e.length;t++)for(var a=0;a<e.length;a++){var i=e[t],r=e[a];if(this.modules[i][r]==null)for(var l=-2;l<=2;l++)for(var d=-2;d<=2;d++)l==-2||l==2||d==-2||d==2||l==0&&d==0?this.modules[i+l][r+d]=!0:this.modules[i+l][r+d]=!1}},setupTypeNumber:function(e){for(var t=v.getBCHTypeNumber(this.typeNumber),a=0;a<18;a++){var i=!e&&(t>>a&1)==1;this.modules[Math.floor(a/3)][a%3+this.moduleCount-8-3]=i}for(var a=0;a<18;a++){var i=!e&&(t>>a&1)==1;this.modules[a%3+this.moduleCount-8-3][Math.floor(a/3)]=i}},setupTypeInfo:function(e,t){for(var a=this.errorCorrectLevel<<3|t,i=v.getBCHTypeInfo(a),r=0;r<15;r++){var l=!e&&(i>>r&1)==1;r<6?this.modules[r][8]=l:r<8?this.modules[r+1][8]=l:this.modules[this.moduleCount-15+r][8]=l}for(var r=0;r<15;r++){var l=!e&&(i>>r&1)==1;r<8?this.modules[8][this.moduleCount-r-1]=l:r<9?this.modules[8][15-r-1+1]=l:this.modules[8][15-r-1]=l}this.modules[this.moduleCount-8][8]=!e},mapData:function(e,t){for(var a=-1,i=this.moduleCount-1,r=7,l=0,d=this.moduleCount-1;d>0;d-=2)for(d==6&&d--;;){for(var s=0;s<2;s++)if(this.modules[i][d-s]==null){var u=!1;l<e.length&&(u=(e[l]>>>r&1)==1),v.getMask(t,i,d-s)&&(u=!u),this.modules[i][d-s]=u,r--,r==-1&&(l++,r=7)}if(i+=a,i<0||this.moduleCount<=i){i-=a,a=-a;break}}}},_.PAD0=236,_.PAD1=17,_.createData=function(e,t,a){for(var i=y.getRSBlocks(e,t),r=new R,l=0;l<a.length;l++){var d=a[l];r.put(d.mode,4),r.put(d.getLength(),v.getLengthInBits(d.mode,e)),d.write(r)}for(var s=0,l=0;l<i.length;l++)s+=i[l].dataCount;if(r.getLengthInBits()>s*8)throw new Error("code length overflow. ("+r.getLengthInBits()+">"+s*8+")");for(r.getLengthInBits()+4<=s*8&&r.put(0,4);r.getLengthInBits()%8!=0;)r.putBit(!1);for(;!(r.getLengthInBits()>=s*8||(r.put(_.PAD0,8),r.getLengthInBits()>=s*8));)r.put(_.PAD1,8);return _.createBytes(r,i)},_.createBytes=function(e,t){for(var a=0,i=0,r=0,l=new Array(t.length),d=new Array(t.length),s=0;s<t.length;s++){var u=t[s].dataCount,m=t[s].totalCount-u;i=Math.max(i,u),r=Math.max(r,m),l[s]=new Array(u);for(var f=0;f<l[s].length;f++)l[s][f]=255&e.buffer[f+a];a+=u;var C=v.getErrorCorrectPolynomial(m),k=new D(l[s],C.getLength()-1).mod(C);d[s]=new Array(C.getLength()-1);for(var f=0;f<d[s].length;f++){var A=f+k.getLength()-d[s].length;d[s][f]=A>=0?k.get(A):0}}for(var S=0,f=0;f<t.length;f++)S+=t[f].totalCount;for(var b=new Array(S),I=0,f=0;f<i;f++)for(var s=0;s<t.length;s++)f<l[s].length&&(b[I++]=l[s][f]);for(var f=0;f<r;f++)for(var s=0;s<t.length;s++)f<d[s].length&&(b[I++]=d[s][f]);return b};for(var w={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},L={L:1,M:0,Q:3,H:2},T={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},v={PATTERN_POSITION_TABLE:[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],G15:1335,G18:7973,G15_MASK:21522,getBCHTypeInfo:function(e){for(var t=e<<10;v.getBCHDigit(t)-v.getBCHDigit(v.G15)>=0;)t^=v.G15<<v.getBCHDigit(t)-v.getBCHDigit(v.G15);return(e<<10|t)^v.G15_MASK},getBCHTypeNumber:function(e){for(var t=e<<12;v.getBCHDigit(t)-v.getBCHDigit(v.G18)>=0;)t^=v.G18<<v.getBCHDigit(t)-v.getBCHDigit(v.G18);return e<<12|t},getBCHDigit:function(e){for(var t=0;e!=0;)t++,e>>>=1;return t},getPatternPosition:function(e){return v.PATTERN_POSITION_TABLE[e-1]},getMask:function(e,t,a){switch(e){case T.PATTERN000:return(t+a)%2==0;case T.PATTERN001:return t%2==0;case T.PATTERN010:return a%3==0;case T.PATTERN011:return(t+a)%3==0;case T.PATTERN100:return(Math.floor(t/2)+Math.floor(a/3))%2==0;case T.PATTERN101:return t*a%2+t*a%3==0;case T.PATTERN110:return(t*a%2+t*a%3)%2==0;case T.PATTERN111:return(t*a%3+(t+a)%2)%2==0;default:throw new Error("bad maskPattern:"+e)}},getErrorCorrectPolynomial:function(e){for(var t=new D([1],0),a=0;a<e;a++)t=t.multiply(new D([1,E.gexp(a)],0));return t},getLengthInBits:function(e,t){if(1<=t&&t<10)switch(e){case w.MODE_NUMBER:return 10;case w.MODE_ALPHA_NUM:return 9;case w.MODE_8BIT_BYTE:return 8;case w.MODE_KANJI:return 8;default:throw new Error("mode:"+e)}else if(t<27)switch(e){case w.MODE_NUMBER:return 12;case w.MODE_ALPHA_NUM:return 11;case w.MODE_8BIT_BYTE:return 16;case w.MODE_KANJI:return 10;default:throw new Error("mode:"+e)}else if(t<41)switch(e){case w.MODE_NUMBER:return 14;case w.MODE_ALPHA_NUM:return 13;case w.MODE_8BIT_BYTE:return 16;case w.MODE_KANJI:return 12;default:throw new Error("mode:"+e)}else throw new Error("type:"+t)},getLostPoint:function(e){for(var t=e.getModuleCount(),a=0,i=0;i<t;i++)for(var r=0;r<t;r++){for(var l=0,d=e.isDark(i,r),s=-1;s<=1;s++)if(!(i+s<0||t<=i+s))for(var u=-1;u<=1;u++)r+u<0||t<=r+u||s==0&&u==0||d==e.isDark(i+s,r+u)&&l++;l>5&&(a+=3+l-5)}for(var i=0;i<t-1;i++)for(var r=0;r<t-1;r++){var m=0;e.isDark(i,r)&&m++,e.isDark(i+1,r)&&m++,e.isDark(i,r+1)&&m++,e.isDark(i+1,r+1)&&m++,(m==0||m==4)&&(a+=3)}for(var i=0;i<t;i++)for(var r=0;r<t-6;r++)e.isDark(i,r)&&!e.isDark(i,r+1)&&e.isDark(i,r+2)&&e.isDark(i,r+3)&&e.isDark(i,r+4)&&!e.isDark(i,r+5)&&e.isDark(i,r+6)&&(a+=40);for(var r=0;r<t;r++)for(var i=0;i<t-6;i++)e.isDark(i,r)&&!e.isDark(i+1,r)&&e.isDark(i+2,r)&&e.isDark(i+3,r)&&e.isDark(i+4,r)&&!e.isDark(i+5,r)&&e.isDark(i+6,r)&&(a+=40);for(var f=0,r=0;r<t;r++)for(var i=0;i<t;i++)e.isDark(i,r)&&f++;var C=Math.abs(100*f/t/t-50)/5;return a+=C*10,a}},E={glog:function(e){if(e<1)throw new Error("glog("+e+")");return E.LOG_TABLE[e]},gexp:function(e){for(;e<0;)e+=255;for(;e>=256;)e-=255;return E.EXP_TABLE[e]},EXP_TABLE:new Array(256),LOG_TABLE:new Array(256)},g=0;g<8;g++)E.EXP_TABLE[g]=1<<g;for(var g=8;g<256;g++)E.EXP_TABLE[g]=E.EXP_TABLE[g-4]^E.EXP_TABLE[g-5]^E.EXP_TABLE[g-6]^E.EXP_TABLE[g-8];for(var g=0;g<255;g++)E.LOG_TABLE[E.EXP_TABLE[g]]=g;function D(e,t){if(e.length==null)throw new Error(e.length+"/"+t);for(var a=0;a<e.length&&e[a]==0;)a++;this.num=new Array(e.length-a+t);for(var i=0;i<e.length-a;i++)this.num[i]=e[i+a]}D.prototype={get:function(e){return this.num[e]},getLength:function(){return this.num.length},multiply:function(e){for(var t=new Array(this.getLength()+e.getLength()-1),a=0;a<this.getLength();a++)for(var i=0;i<e.getLength();i++)t[a+i]^=E.gexp(E.glog(this.get(a))+E.glog(e.get(i)));return new D(t,0)},mod:function(e){if(this.getLength()-e.getLength()<0)return this;for(var t=E.glog(this.get(0))-E.glog(e.get(0)),a=new Array(this.getLength()),i=0;i<this.getLength();i++)a[i]=this.get(i);for(var i=0;i<e.getLength();i++)a[i]^=E.gexp(E.glog(e.get(i))+t);return new D(a,0).mod(e)}};function y(e,t){this.totalCount=e,this.dataCount=t}y.RS_BLOCK_TABLE=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],y.getRSBlocks=function(e,t){var a=y.getRsBlockTable(e,t);if(a==null)throw new Error("bad rs block @ typeNumber:"+e+"/errorCorrectLevel:"+t);for(var i=a.length/3,r=[],l=0;l<i;l++)for(var d=a[l*3+0],s=a[l*3+1],u=a[l*3+2],m=0;m<d;m++)r.push(new y(s,u));return r},y.getRsBlockTable=function(e,t){switch(t){case L.L:return y.RS_BLOCK_TABLE[(e-1)*4+0];case L.M:return y.RS_BLOCK_TABLE[(e-1)*4+1];case L.Q:return y.RS_BLOCK_TABLE[(e-1)*4+2];case L.H:return y.RS_BLOCK_TABLE[(e-1)*4+3];default:return}};function R(){this.buffer=[],this.length=0}R.prototype={get:function(e){var t=Math.floor(e/8);return(this.buffer[t]>>>7-e%8&1)==1},put:function(e,t){for(var a=0;a<t;a++)this.putBit((e>>>t-a-1&1)==1)},getLengthInBits:function(){return this.length},putBit:function(e){var t=Math.floor(this.length/8);this.buffer.length<=t&&this.buffer.push(0),e&&(this.buffer[t]|=128>>>this.length%8),this.length++}};var B=[[17,14,11,7],[32,26,20,14],[53,42,32,24],[78,62,46,34],[106,84,60,44],[134,106,74,58],[154,122,86,64],[192,152,108,84],[230,180,130,98],[271,213,151,119],[321,251,177,137],[367,287,203,155],[425,331,241,177],[458,362,258,194],[520,412,292,220],[586,450,322,250],[644,504,364,280],[718,560,394,310],[792,624,442,338],[858,666,482,382],[929,711,509,403],[1003,779,565,439],[1091,857,611,461],[1171,911,661,511],[1273,997,715,535],[1367,1059,751,593],[1465,1125,805,625],[1528,1190,868,658],[1628,1264,908,698],[1732,1370,982,742],[1840,1452,1030,790],[1952,1538,1112,842],[2068,1628,1168,898],[2188,1722,1228,958],[2303,1809,1283,983],[2431,1911,1351,1051],[2563,1989,1423,1093],[2699,2099,1499,1139],[2809,2213,1579,1219],[2953,2331,1663,1273]];function F(){return typeof CanvasRenderingContext2D<"u"}function O(){var e=!1,t=navigator.userAgent;if(/android/i.test(t)){e=!0;var a=t.toString().match(/android ([0-9]\.[0-9])/i);a&&a[1]&&(e=parseFloat(a[1]))}return e}var $=(function(){var e=function(t,a){this._el=t,this._htOption=a};return e.prototype.draw=function(t){var a=this._htOption,i=this._el,r=t.getModuleCount();Math.floor(a.width/r),Math.floor(a.height/r),this.clear();function l(f,C){var k=document.createElementNS("http://www.w3.org/2000/svg",f);for(var A in C)C.hasOwnProperty(A)&&k.setAttribute(A,C[A]);return k}var d=l("svg",{viewBox:"0 0 "+String(r)+" "+String(r),width:"100%",height:"100%",fill:a.colorLight});d.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink","http://www.w3.org/1999/xlink"),i.appendChild(d),d.appendChild(l("rect",{fill:a.colorLight,width:"100%",height:"100%"})),d.appendChild(l("rect",{fill:a.colorDark,width:"1",height:"1",id:"template"}));for(var s=0;s<r;s++)for(var u=0;u<r;u++)if(t.isDark(s,u)){var m=l("use",{x:String(u),y:String(s)});m.setAttributeNS("http://www.w3.org/1999/xlink","href","#template"),d.appendChild(m)}},e.prototype.clear=function(){for(;this._el.hasChildNodes();)this._el.removeChild(this._el.lastChild)},e})(),U=document.documentElement.tagName.toLowerCase()==="svg"?$:F()?(function(){function e(){this._elImage.src=this._elCanvas.toDataURL("image/png"),this._elImage.style.display="block",this._elCanvas.style.display="none"}if(this&&this._android&&this._android<=2.1){var t=1/window.devicePixelRatio,a=CanvasRenderingContext2D.prototype.drawImage;CanvasRenderingContext2D.prototype.drawImage=function(l,d,s,u,m,f,C,k,A){if("nodeName"in l&&/img/i.test(l.nodeName))for(var S=arguments.length-1;S>=1;S--)arguments[S]=arguments[S]*t;else typeof k>"u"&&(arguments[1]*=t,arguments[2]*=t,arguments[3]*=t,arguments[4]*=t);a.apply(this,arguments)}}function i(l,d){var s=this;if(s._fFail=d,s._fSuccess=l,s._bSupportDataURI===null){var u=document.createElement("img"),m=function(){s._bSupportDataURI=!1,s._fFail&&s._fFail.call(s)},f=function(){s._bSupportDataURI=!0,s._fSuccess&&s._fSuccess.call(s)};u.onabort=m,u.onerror=m,u.onload=f,u.src="data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==";return}else s._bSupportDataURI===!0&&s._fSuccess?s._fSuccess.call(s):s._bSupportDataURI===!1&&s._fFail&&s._fFail.call(s)}var r=function(l,d){this._bIsPainted=!1,this._android=O(),this._htOption=d,this._elCanvas=document.createElement("canvas"),this._elCanvas.width=d.width,this._elCanvas.height=d.height,l.appendChild(this._elCanvas),this._el=l,this._oContext=this._elCanvas.getContext("2d"),this._bIsPainted=!1,this._elImage=document.createElement("img"),this._elImage.alt="Scan me!",this._elImage.style.display="none",this._el.appendChild(this._elImage),this._bSupportDataURI=null};return r.prototype.draw=function(l){var d=this._elImage,s=this._oContext,u=this._htOption,m=l.getModuleCount(),f=u.width/m,C=u.height/m,k=Math.round(f),A=Math.round(C);d.style.display="none",this.clear();for(var S=0;S<m;S++)for(var b=0;b<m;b++){var I=l.isDark(S,b),V=b*f,M=S*C;s.strokeStyle=I?u.colorDark:u.colorLight,s.lineWidth=1,s.fillStyle=I?u.colorDark:u.colorLight,s.fillRect(V,M,f,C),s.strokeRect(Math.floor(V)+.5,Math.floor(M)+.5,k,A),s.strokeRect(Math.ceil(V)-.5,Math.ceil(M)-.5,k,A)}this._bIsPainted=!0},r.prototype.makeImage=function(){this._bIsPainted&&i.call(this,e)},r.prototype.isPainted=function(){return this._bIsPainted},r.prototype.clear=function(){this._oContext.clearRect(0,0,this._elCanvas.width,this._elCanvas.height),this._bIsPainted=!1},r.prototype.round=function(l){return l&&Math.floor(l*1e3)/1e3},r})():(function(){var e=function(t,a){this._el=t,this._htOption=a};return e.prototype.draw=function(t){for(var a=this._htOption,i=this._el,r=t.getModuleCount(),l=Math.floor(a.width/r),d=Math.floor(a.height/r),s=['<table style="border:0;border-collapse:collapse;">'],u=0;u<r;u++){s.push("<tr>");for(var m=0;m<r;m++)s.push('<td style="border:0;border-collapse:collapse;padding:0;margin:0;width:'+l+"px;height:"+d+"px;background-color:"+(t.isDark(u,m)?a.colorDark:a.colorLight)+';"></td>');s.push("</tr>")}s.push("</table>"),i.innerHTML=s.join("");var f=i.childNodes[0],C=(a.width-f.offsetWidth)/2,k=(a.height-f.offsetHeight)/2;C>0&&k>0&&(f.style.margin=k+"px "+C+"px")},e.prototype.clear=function(){this._el.innerHTML=""},e})();function z(e,t){for(var a=1,i=Q(e),r=0,l=B.length;r<=l;r++){var d=0;switch(t){case L.L:d=B[r][0];break;case L.M:d=B[r][1];break;case L.Q:d=B[r][2];break;case L.H:d=B[r][3];break}if(i<=d)break;a++}if(a>B.length)throw new Error("Too long data");return a}function Q(e){var t=encodeURI(e).toString().replace(/\%[0-9a-fA-F]{2}/g,"a");return t.length+(t.length!=e?3:0)}return c=function(e,t){if(this._htOption={width:256,height:256,typeNumber:4,colorDark:"#000000",colorLight:"#ffffff",correctLevel:L.H},typeof t=="string"&&(t={text:t}),t)for(var a in t)this._htOption[a]=t[a];typeof e=="string"&&(e=document.getElementById(e)),this._htOption.useSVG&&(U=$),this._android=O(),this._el=e,this._oQRCode=null,this._oDrawing=new U(this._el,this._htOption),this._htOption.text&&this.makeCode(this._htOption.text)},c.prototype.makeCode=function(e){this._oQRCode=new _(z(e,this._htOption.correctLevel),this._htOption.correctLevel),this._oQRCode.addData(e),this._oQRCode.make(),this._el.title=e,this._oDrawing.draw(this._oQRCode),this.makeImage()},c.prototype.makeImage=function(){typeof this._oDrawing.makeImage=="function"&&(!this._android||this._android>=3)&&this._oDrawing.makeImage()},c.prototype.clear=function(){this._oDrawing.clear()},c.CorrectLevel=L,c})})),H=q.__toESM(a3()),i3={class:"cloud-login-wrap"},r3={key:0,class:"cloud-login-main"},n3={class:"cloud-login-logo no-dark-content can-click"},s3=["src"],l3={key:0,class:"cloud-login-box"},h3={class:"login-title"},c3={class:"login-subtitle"},d3={class:"cloud-login-mode-access"},u3={class:"login-switch"},g3={key:1,class:"cloud-login-box"},f3={class:"login-mode-switch"},m3={class:"login-mode-switch-box"},v3={class:"login-title"},p3={class:"login-subtitle"},_3={class:"cloud-login-mode-access"},w3={key:0,class:"code-load"},E3={key:1,class:"code-error"},C3=["src"],L3={class:"cloud-login-other"},k3={class:"cloud-login-other"},S3={key:0,class:"login-switch"},T3={key:1,class:"page-login-oauth"},y3={key:2,class:"cloud-login-box"},A3={class:"login-mode-switch"},b3={class:"login-mode-switch-box"},N3={class:"login-title"},D3={class:"login-subtitle"},B3={id:"qrcode",ref:"qrCodeUrl"},I3={key:3,class:"cloud-login-box"},V3={class:"login-title"},M3={class:"login-subtitle"},P3={class:"cloud-login-mode-access"},R3={class:"page-login-oauth"},O3=Object.assign({data(){return{loadOngoing:!1,loginMode:"access",loginJump:!1,cache_remember:"off",cache_privacy:"off",account_mobile:"",account_password:"",account_password2:"",captcha_code:"",sms_code:"",account_business_id:0,reg_invite:"",regInviteNeed:!1,codeNeed:!1,codeLoad:0,codeKey:"",codeUrl:"",chainShowFlag:!1,chainAccountList:[],chainTempToken:"",qrcodeExpiredShow:!1,qrcodeTimer:null,qrcodeLoad:!1,qrcodeScanVernum:15,qrcodeScanVererr:0,copyright_info:""}},watch:{$route({query:h}){h.type=="reg"&&this.$nextTick(()=>{this.loginMode="reg"})},account_mobile(h){this.$nextTick(()=>{let n=this.$refs.account_mobile?.$el?.querySelector("input");if(n){const c=getComputedStyle(n).background.match(/rgb\((\d+,\s*\d+,\s*\d+)\)/);c&&c[0]==="rgb(232, 240, 254)"&&this.onBlur()}})},loginMode(h){h=="reg"&&(this.regInviteNeed=!!this.cacheInstConfig.reg_invite_need)}},computed:{currentLanguage(){return this.languageList[this.languageName]||"Language"}},created(){this.cache_remember=localStorage.getItem("cacheLoginRemember")||"off",this.cache_privacy=localStorage.getItem("cacheLoginPrivacy")||"off",this.account_mobile=localStorage.getItem("cacheLoginMobile")||""},async mounted(){this.loginMode=this.$route.query.type==="reg"?"reg":"access",this.$Electron&&(this.$Electron.sendMessage("webTabDestroyAll"),this.$Electron.sendMessage("childWindowDestroyAll")),N.useSdkSystemStore().$subscribe((h,n)=>{h.events.key=="useSSOLogin"&&n.useSSOLogin==!0&&this.inputServerUrl()})},beforeDestroy(){clearInterval(this.qrcodeTimer),this.loginJump=!1,this.account_password="",this.account_password2="",this.captcha_code="",this.reg_invite=""},methods:{handleRemember(h){h=="on"?localStorage.setItem("cacheLoginRemember",h):localStorage.removeItem("cacheLoginRemember")},handleRrivacy(h){h=="on"?(localStorage.setItem("cacheLoginPrivacy",h),this.chackServerUrl().catch(n=>{})):localStorage.removeItem("cacheLoginPrivacy"),this.cache_privacy=h},handleForgot(){this.$message.warning("请联系管理员!")},chackServerUrl(h){return new Promise((n,c)=>{n()})},switchLoginMode(h){this.chackServerUrl(!0).then(()=>{clearInterval(this.qrcodeTimer),h==="qrcode"?(this.loginMode="qrcode",this.scanQrcodeRefresh()):h==="access"?this.loginMode="access":h==="smsLogin"?(this.loginMode="smsLogin",this.refreshCode()):this.loginMode=h})},refreshCode(){this.captcha_code="",!(this.codeLoad>0)&&(setTimeout(h=>{this.codeLoad++},600),this.$request.flagGet("BASE_PASSPORT_CODE_DATA",{account_mobile:this.account_mobile}).then(({data:h})=>{this.codeKey=h.key,this.codeUrl=h.img,this.$refs.captcha_code?.focus()}).catch(h=>{this.codeUrl="error"}).finally(h=>{this.codeLoad--}))},onBlur(){if(!this.account_mobile){this.codeNeed=!1;return}this.loadOngoing=!0,this.$request.flagGet("BASE_PASSPORT_CODE_NEED",{account_mobile:this.account_mobile}).then(h=>{this.loadOngoing=!1,h.data=="need"?(this.refreshCode(),this.codeNeed=!0):this.codeNeed=!1}).catch(h=>{this.loadOngoing=!1}).finally(h=>{this.loadOngoing=!1})},accessLoginFunc(){if(this.loadOngoing)return this.$message({type:"warning",message:"正在登录中,请勿重新确认~"}),!1;this.chackServerUrl(!0).then(()=>{if(this.account_mobile=cvUtils.strTrimAll(this.account_mobile),this.account_password=cvUtils.strTrimAll(this.account_password),this.account_password2=cvUtils.strTrimAll(this.account_password2),this.captcha_code=cvUtils.strTrimAll(this.captcha_code),this.reg_invite=cvUtils.strTrimAll(this.reg_invite),this.cache_privacy!="on"){this.$message.warning("请同意协议");return}if(!cvUtils.isMobile(this.account_mobile)){this.$message.warning("请输入正确的手机号码"),this.$refs.account_mobile.focus();return}if(!this.account_password){this.$message.warning("请输入密码"),this.$refs.account_password.focus();return}if(this.loginMode=="reg"&&this.account_password!=this.account_password2){this.$message.warning("确认密码输入不一致"),this.$refs.account_password2.focus();return}if(this.codeNeed&&!this.captcha_code){this.$message.warning("请输入验证码"),this.$refs.captcha_code.focus();return}let h={};this.loginMode=="access"?h={handleType:"MobilePwdLogin",account_mobile:this.account_mobile,business_id:this.account_business_id,account_password:this.account_password,captcha_code:this.captcha_code,captcha_key:this.codeKey}:this.loginMode=="reg"&&(h={handleType:"MobilePwdLogin",account_mobile:this.account_mobile,business_id:this.account_business_id,account_password:this.account_password,captcha_code:this.captcha_code,captcha_key:this.codeKey,reg_invite:this.reg_invite}),this.commonLoginIng(h)})},loginBusinessCheck(h){this.account_mobile=h.account_mobile_show,this.account_business_id=h.business_id,(h.acc_rules_type=="sy-org-admin"||h.acc_rules_type=="sy-org-staff")&&this.commonLoginIng({handleType:"OrgTokenLogin",account_mobile:this.account_mobile,business_id:this.account_business_id,temp_token:this.chainTempToken||""})},commonLoginIng(h){let n=this.$message({iconClass:"ElIconLoading",message:"正在登录...",duration:0});this.loadOngoing=!0,localStorage.setItem("cacheLoginMobile",this.account_mobile);try{this.$request.setOptions({timeout:1e4}).flagPost("BASE_PASSPORT_PASSPORT",{...h}).then(c=>{n.close(),this.loadOngoing=!1,c.status==200?this.commonLoginSucc(c):c.status==400130?(this.$message.error("验证码有误!"),this.refreshCode(),this.codeNeed=!0):(this.$message.error(c.msg),this.refreshCode())}).catch(c=>{this.loadOngoing=!1,this.chainShowFlag=!1,n.close(),this.refreshCode(),this.codeNeed=!0})}catch{this.$message.error("登录异常"),n.close(),this.loadOngoing=!1,this.refreshCode()}},async commonLoginSucc(h){let n=h.data||{};if(n.result_type=="chain")this.chainAccountList=n.result_data||[],this.chainShowFlag=!0,this.chainTempToken=n.result_token||"";else{const c=n.result_data||{};await N.useSdkAccountStore().SA_ACCOUNT_SIGNIN(c),this.codeNeed=!1,this.$message({type:"success",message:"登录成功...",duration:800,onClose:()=>{this.goNext()}})}},chainReselection(){this.refreshCode(),this.chainShowFlag=!1},scanCreate(h){new H.default(this.$refs.qrCodeUrl,{text:h,width:180,height:180,margin:2,colorDark:"#000000",colorLight:"#ffffff",correctLevel:H.default.CorrectLevel.L})},scanQrcodeRefresh(){if(this.loginMode!="qrcode"||this.qrcodeLoad)return!1;this.qrcodeExpiredShow=!1,this.qrcodeScanVererr=0,this.$nextTick(()=>{document.getElementById("qrcode").innerHTML="",clearInterval(this.qrcodeTimer),this.qrcodeLoad=!0,this.$request.flagGet("BASE_PASSPORT_SCAN_QRCODE",{name:"app",fun:"scanQrcode"}).then(h=>{h.status==200?(this.scanCreate(h?.data?.checkLogin),this.qrcodeTimer=window.setInterval(()=>{this.scanCheckFunc(h?.data?.scanCode)},3e3)):result.status==404}).catch(h=>{}).finally(h=>{this.qrcodeLoad=!1})})},scanCheckFunc(h){if(this.qrcodeScanVererr++,this.qrcodeScanVererr>this.qrcodeScanVernum)return clearInterval(this.qrcodeTimer),this.qrcodeExpiredShow=!0,!1;this.$request.flagPost("BASE_PASSPORT_SCAN_CHECK",{name:"app",fun:"scanCheck",scanCode:h||""}).then(n=>{n.status==200?(n.msg&&n?.data?.scanCVal||"")!=""&&(clearInterval(this.qrcodeTimer),this.scanLoginFunc(h,n?.data?.scanCVal)):n.status==405&&(clearInterval(this.qrcodeTimer),this.qrcodeExpiredShow=!0)}).catch(()=>{})},scanLoginFunc(h,n){this.$message({type:"success",message:"扫码成功,请稍后...",duration:1500}),this.$request.flagPost("BASE_PASSPORT_SCAN_LOGIN",{name:"app",fun:"scanLogin",scanCode:h,scanCVal:n}).then(c=>{if(c.status==200){let p=this.$message({iconClass:"ElIconLoading",message:"正在安全登录中,请稍后...",duration:0});setTimeout(()=>{p.close(),this.$message({message:c.msg,type:c.status==200?"success":"error"})},2e3)}}).catch(()=>{})},goNext(){this.loginJump=!0;let h=cvUtils.cc_url_get_params(null,this.$route.query);const n=decodeURIComponent(h.from||"");n?N.StorageObj.idbSetItem("clearCache","login").then(c=>{window.location.replace(n)}):this.$router.push({path:"/"})},setTheme(h){N.useSdkThemesStore().SA_THEMES_SET(h)},setLanguage(h){N.useSdkLanguageStore().SA_LANGUAGE_SET(h)},inputServerUrl(){},inputServerChack(h){return new Promise((n,c)=>{let p=h;/\/api\/$/.test(p)||(p=p+(cvUtils.strRightExists(p,"/")?"api/":"/api/")),/^https*:\/\//i.test(p)||(p=`https://${p}`),N.HttpObj.setOptions({checkNetwork:!1}).flagGet("SYS_SETT_ALL",{}).then(async({data:_})=>{typeof _.server_version>"u"&&typeof _.all_group_mute>"u"?c(`服务器(${cvUtils.cc_url_get_domain(h)})版本过低`):(p!=this.sysServerUrl&&(await N.StorageObj.idbSetItem("sysServerUrl",p),window.location.reload()),n())}).catch(({ret:_,msg:w})=>{if(_===-1001){if(!/^https*:\/\//i.test(h)){this.inputServerChack(`http://${h}`).then(n).catch(c);return}w="服务器地址无效"}c(w)})})}}},{__name:"login",setup(h){return(n,c)=>{const p=(0,o.resolveComponent)("el-input"),_=(0,o.resolveComponent)("el-button"),w=(0,o.resolveComponent)("el-icon"),L=(0,o.resolveComponent)("el-tooltip"),T=(0,o.resolveComponent)("cv-icons"),v=(0,o.resolveComponent)("ElIconLoading"),E=(0,o.resolveComponent)("el-checkbox");return(0,o.openBlock)(),(0,o.createElementBlock)("div",i3,[n.chainShowFlag?(0,o.createCommentVNode)("",!0):((0,o.openBlock)(),(0,o.createElementBlock)("div",r3,[(0,o.createElementVNode)("div",n3,[(0,o.createElementVNode)("img",{src:n.cacheInstInfo.LAST_IP_LOGO,alt:""},null,8,s3)]),n.loginMode=="reg"?((0,o.openBlock)(),(0,o.createElementBlock)("div",l3,[(0,o.createElementVNode)("div",h3,(0,o.toDisplayString)(n.cacheInstInfo.LAST_IP_TITLE),1),(0,o.createElementVNode)("div",c3,(0,o.toDisplayString)(n.$t("输入您的信息以创建帐户。")),1),(0,o.createElementVNode)("div",d3,[(0,o.createElementVNode)("form",null,[(0,o.createVNode)(p,{modelValue:n.account_password2,"onUpdate:modelValue":c[0]||(c[0]=g=>n.account_password2=g),ref:"account_password2","prefix-icon":"ElIconLock",placeholder:n.$t("输入确认密码"),type:"password",size:"large",clearable:""},null,8,["modelValue","placeholder"]),n.regInviteNeed?((0,o.openBlock)(),(0,o.createBlock)(p,{key:0,modelValue:n.reg_invite,"onUpdate:modelValue":c[1]||(c[1]=g=>n.reg_invite=g),ref:"reg_invite",class:"login-code",placeholder:n.$t("请输入注册邀请码"),type:"text",size:"large",clearable:""},{prepend:(0,o.withCtx)(()=>[(0,o.createTextVNode)(" "+(0,o.toDisplayString)(n.$t("邀请码"))+" ",1)]),_:1},8,["modelValue","placeholder"])):(0,o.createCommentVNode)("",!0)]),(0,o.createVNode)(_,null,{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(n.loginJump?"注册成功":"注册"),1)]),_:1}),(0,o.createElementVNode)("div",u3,[(0,o.createTextVNode)((0,o.toDisplayString)(n.$t("已经有帐号?"))+" ",1),(0,o.createElementVNode)("a",{href:"javascript:void(0)",onClick:c[2]||(c[2]=g=>n.switchLoginMode("access"))},(0,o.toDisplayString)(n.$t("登录帐号")),1)])])])):(0,o.createCommentVNode)("",!0),n.loginMode=="access"?((0,o.openBlock)(),(0,o.createElementBlock)("div",g3,[(0,o.createElementVNode)("div",f3,[(0,o.createElementVNode)("div",m3,[(0,o.createVNode)(L,{content:"扫码登录",placement:"left"},{default:(0,o.withCtx)(()=>[(0,o.createElementVNode)("span",{class:"login-mode-switch-icon",onClick:c[3]||(c[3]=g=>n.switchLoginMode("qrcode"))},[(0,o.createVNode)(w,{size:"45"},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(J)]),_:1})])]),_:1})])]),(0,o.createElementVNode)("div",v3,(0,o.toDisplayString)(n.cacheInstInfo.LAST_IP_TITLE),1),(0,o.createElementVNode)("div",p3,(0,o.toDisplayString)(n.$t("输入您的凭证以访问您的帐户。")),1),(0,o.createElementVNode)("div",_3,[(0,o.createElementVNode)("form",null,[(0,o.createVNode)(p,{modelValue:n.account_mobile,"onUpdate:modelValue":c[4]||(c[4]=g=>n.account_mobile=g),ref:"account_mobile","prefix-icon":"ElIconUser",placeholder:n.$t("输入您的手机账号"),type:"text",size:"large",maxlength:"11",onBlur:n.onBlur,clearable:""},null,8,["modelValue","placeholder","onBlur"]),(0,o.createVNode)(p,{modelValue:n.account_password,"onUpdate:modelValue":c[5]||(c[5]=g=>n.account_password=g),ref:"account_password","prefix-icon":"ElIconLock",placeholder:n.$t("输入您的密码"),type:"password",size:"large",clearable:"",onKeydown:(0,o.withKeys)(n.accessLoginFunc,["enter"])},null,8,["modelValue","placeholder","onKeydown"]),n.codeNeed?((0,o.openBlock)(),(0,o.createBlock)(p,{key:0,modelValue:n.captcha_code,"onUpdate:modelValue":c[7]||(c[7]=g=>n.captcha_code=g),ref:"captcha_code",class:"login-code",placeholder:n.$t("输入图形验证码"),type:"text",size:"large",clearable:"",maxlength:"6"},{prefix:(0,o.withCtx)(()=>[(0,o.createVNode)(T,{type:"ElIconCircleCheck"})]),append:(0,o.withCtx)(()=>[(0,o.createElementVNode)("div",{class:"login-code-end",onClick:c[6]||(c[6]=(...g)=>n.refreshCode&&n.refreshCode(...g))},[n.codeLoad>0?((0,o.openBlock)(),(0,o.createElementBlock)("div",w3,[(0,o.createVNode)(v)])):n.codeUrl==="error"?((0,o.openBlock)(),(0,o.createElementBlock)("span",E3,(0,o.toDisplayString)(n.$t("加载失败")),1)):((0,o.openBlock)(),(0,o.createElementBlock)("img",{key:2,src:n.codeUrl},null,8,C3))])]),_:1},8,["modelValue","placeholder"])):(0,o.createCommentVNode)("",!0)]),(0,o.createVNode)(_,{type:"primary",loading:n.loadOngoing||n.loginJump,size:"large",style:{width:"100%","margin-bottom":"15px"},onClick:n.accessLoginFunc},{default:(0,o.withCtx)(()=>[(0,o.createTextVNode)((0,o.toDisplayString)(n.loginJump?"登录成功":"登录"),1)]),_:1},8,["loading","onClick"]),(0,o.createElementVNode)("div",L3,[(0,o.createVNode)(E,{modelValue:n.cache_privacy,"onUpdate:modelValue":c[9]||(c[9]=g=>n.cache_privacy=g),"true-value":"on","false-value":"off",onChange:n.handleRrivacy},{default:(0,o.withCtx)(()=>[c[17]||(c[17]=(0,o.createTextVNode)(" 同意 ",-1)),(0,o.createElementVNode)("a",{onClick:c[8]||(c[8]=g=>n.jumpsXieyi("privacy")),target:"_blank"},"《隐私条款》")]),_:1},8,["modelValue","onChange"]),(0,o.createElementVNode)("a",{href:"javascript:void(0)",onClick:c[10]||(c[10]=(...g)=>n.handleForgot&&n.handleForgot(...g))},(0,o.toDisplayString)(n.$t("忘记密码了?")),1)]),(0,o.createElementVNode)("div",k3,[n.cacheInstConfig.open_business_reg=="on"?((0,o.openBlock)(),(0,o.createElementBlock)("div",S3,[(0,o.createTextVNode)((0,o.toDisplayString)(n.$t("还没有帐号?"))+" ",1),(0,o.createElementVNode)("a",{href:"javascript:void(0)",onClick:c[11]||(c[11]=g=>n.switchLoginMode("reg"))},(0,o.toDisplayString)(n.$t("注册帐号")),1)])):(0,o.createCommentVNode)("",!0),n.cacheInstConfig.open_business_oauth2=="on"?((0,o.openBlock)(),(0,o.createElementBlock)("div",T3,[(0,o.createElementVNode)("a",{href:"javascript:void(0)",onClick:c[12]||(c[12]=g=>n.switchLoginMode("oauth2"))},(0,o.toDisplayString)(n.$t("OAuth2授权登陆")),1)])):(0,o.createCommentVNode)("",!0)])])])):(0,o.createCommentVNode)("",!0),n.loginMode=="qrcode"?((0,o.openBlock)(),(0,o.createElementBlock)("div",y3,[(0,o.createElementVNode)("div",A3,[(0,o.createElementVNode)("div",b3,[(0,o.createVNode)(L,{content:"帐号登录",placement:"left"},{default:(0,o.withCtx)(()=>[(0,o.createElementVNode)("span",{class:"login-mode-switch-icon",onClick:c[13]||(c[13]=g=>n.switchLoginMode("access"))},[(0,o.createVNode)(w,{size:"45"},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(Z)]),_:1})])]),_:1})])]),(0,o.createElementVNode)("div",N3,(0,o.toDisplayString)(n.$t("扫码登录")),1),(0,o.createElementVNode)("div",D3,[(0,o.createVNode)(w,{size:"20",style:{"margin-right":"10px"}},{default:(0,o.withCtx)(()=>[(0,o.createVNode)(o3)]),_:1}),(0,o.createTextVNode)(" "+(0,o.toDisplayString)(n.$t(`请使用【${n.cacheInstInfo.LAST_IP_BRAND}】移动端扫描二维码`)),1)]),(0,o.createElementVNode)("div",{class:"login-qrcode",onClick:c[14]||(c[14]=(...g)=>n.scanQrcodeRefresh&&n.scanQrcodeRefresh(...g))},[(0,o.createElementVNode)("div",B3,null,512)])])):(0,o.createCommentVNode)("",!0),n.loginMode=="oauth2"?((0,o.openBlock)(),(0,o.createElementBlock)("div",I3,[(0,o.createElementVNode)("div",V3,(0,o.toDisplayString)(n.cacheInstInfo.LAST_IP_TITLE),1),(0,o.createElementVNode)("div",M3,(0,o.toDisplayString)(n.$t("输入您的信息以创建帐户。")),1),(0,o.createElementVNode)("div",P3,[(0,o.createElementVNode)("div",R3,[(0,o.createElementVNode)("a",{href:"javascript:void(0)",onClick:c[15]||(c[15]=g=>n.switchLoginMode("access"))},(0,o.toDisplayString)(n.$t("帐号登录")),1)])])])):(0,o.createCommentVNode)("",!0)])),n.chainShowFlag?((0,o.openBlock)(),(0,o.createBlock)(N.SwitchBusiness_default,{key:1,modelValue:n.chainAccountList,"onUpdate:modelValue":c[16]||(c[16]=g=>n.chainAccountList=g),reselectTitle:"重新登录",onReselectFunc:n.chainReselection,onSelectFunc:n.loginBusinessCheck},null,8,["modelValue","onReselectFunc","onSelectFunc"])):(0,o.createCommentVNode)("",!0)])}}});exports.default=O3;
|