icve-sso-vue3 0.0.2 → 0.0.4
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/README.md +109 -23
- package/dist/icve-sso-vue3.common.js +165 -66
- package/dist/icve-sso-vue3.common.js.map +1 -1
- package/dist/icve-sso-vue3.css +1 -1
- package/dist/icve-sso-vue3.umd.js +165 -66
- package/dist/icve-sso-vue3.umd.js.map +1 -1
- package/dist/icve-sso-vue3.umd.min.js +4 -4
- package/dist/icve-sso-vue3.umd.min.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,37 +1,123 @@
|
|
|
1
1
|
# 智慧职教-统一用户中心
|
|
2
2
|
|
|
3
3
|
#### 介绍
|
|
4
|
-
智慧职教-统一用户中心
|
|
5
|
-
|
|
6
|
-
#### 软件架构
|
|
7
|
-
软件架构说明
|
|
8
|
-
|
|
4
|
+
智慧职教-统一用户中心 Vue3 组件库
|
|
9
5
|
|
|
10
6
|
#### 安装教程
|
|
11
7
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
```bash
|
|
9
|
+
npm install icve-sso-vue3
|
|
10
|
+
```
|
|
15
11
|
|
|
16
12
|
#### 使用说明
|
|
17
13
|
|
|
18
|
-
1.
|
|
19
|
-
2. xxxx
|
|
20
|
-
3. xxxx
|
|
14
|
+
##### 1. 基础使用
|
|
21
15
|
|
|
22
|
-
|
|
16
|
+
```vue
|
|
17
|
+
<template>
|
|
18
|
+
<div>
|
|
19
|
+
<!-- 登录组件 -->
|
|
20
|
+
<userCenterLogin
|
|
21
|
+
v-model:loginModalShow="loginModalShow"
|
|
22
|
+
@loginSuccess="handleLoginSuccess"
|
|
23
|
+
/>
|
|
24
|
+
|
|
25
|
+
<!-- 信息完善组件 -->
|
|
26
|
+
<userCenterCompleteInformation
|
|
27
|
+
@completeInformation="handleCompleteInformation"
|
|
28
|
+
:token="token"
|
|
29
|
+
/>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script>
|
|
34
|
+
import { userCenterLogin, userCenterCompleteInformation } from 'icve-sso-vue3';
|
|
35
|
+
|
|
36
|
+
export default {
|
|
37
|
+
components: {
|
|
38
|
+
userCenterLogin,
|
|
39
|
+
userCenterCompleteInformation
|
|
40
|
+
},
|
|
41
|
+
data() {
|
|
42
|
+
return {
|
|
43
|
+
loginModalShow: true,
|
|
44
|
+
token: ''
|
|
45
|
+
};
|
|
46
|
+
},
|
|
47
|
+
methods: {
|
|
48
|
+
handleLoginSuccess(data) {
|
|
49
|
+
console.log('登录成功', data);
|
|
50
|
+
this.loginModalShow = false;
|
|
51
|
+
},
|
|
52
|
+
handleCompleteInformation() {
|
|
53
|
+
console.log('信息完善');
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
</script>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
##### 2. 全局注册
|
|
61
|
+
|
|
62
|
+
```javascript
|
|
63
|
+
// main.js
|
|
64
|
+
import { createApp } from 'vue';
|
|
65
|
+
import IcveSso from 'icve-sso-vue3';
|
|
66
|
+
import 'icve-sso-vue3/dist/icve-sso-vue3.css';
|
|
67
|
+
|
|
68
|
+
const app = createApp(App);
|
|
69
|
+
|
|
70
|
+
// 安装插件(默认会自动加载验证码脚本)
|
|
71
|
+
app.use(IcveSso);
|
|
72
|
+
|
|
73
|
+
// 或者手动控制验证码脚本加载
|
|
74
|
+
app.use(IcveSso, { loadCaptcha: false });
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
##### 3. 手动加载验证码脚本(可选)
|
|
23
78
|
|
|
24
|
-
|
|
25
|
-
2. 新建 Feat_xxx 分支
|
|
26
|
-
3. 提交代码
|
|
27
|
-
4. 新建 Pull Request
|
|
79
|
+
如果你想在应用启动时提前加载验证码脚本,可以使用以下方法:
|
|
28
80
|
|
|
81
|
+
```javascript
|
|
82
|
+
// 在 main.js 中
|
|
83
|
+
import { loadCaptchaScripts } from 'icve-sso-vue3';
|
|
29
84
|
|
|
30
|
-
|
|
85
|
+
// 提前加载验证码脚本
|
|
86
|
+
loadCaptchaScripts();
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
##### 4. 注意事项
|
|
90
|
+
|
|
91
|
+
- 组件库会自动处理验证码脚本的加载,无需手动在 HTML 中添加 script 标签
|
|
92
|
+
- 支持腾讯验证码和阿里云验证码,会根据后端配置自动选择
|
|
93
|
+
- 组件库内部已包含完整的错误处理和降级方案
|
|
94
|
+
- 需要引入样式文件:`import 'icve-sso-vue3/dist/icve-sso-vue3.css'`
|
|
95
|
+
|
|
96
|
+
#### 组件Props
|
|
97
|
+
|
|
98
|
+
##### userCenterLogin
|
|
99
|
+
|
|
100
|
+
| 属性 | 类型 | 默认值 | 说明 |
|
|
101
|
+
|-----|------|--------|------|
|
|
102
|
+
| loginModalShow | Boolean | true | 控制登录弹窗显示/隐藏 |
|
|
103
|
+
|
|
104
|
+
| 事件 | 参数 | 说明 |
|
|
105
|
+
|-----|------|------|
|
|
106
|
+
| loginSuccess | data | 登录成功回调,返回登录数据 |
|
|
107
|
+
|
|
108
|
+
##### userCenterCompleteInformation
|
|
109
|
+
|
|
110
|
+
| 属性 | 类型 | 默认值 | 说明 |
|
|
111
|
+
|-----|------|--------|------|
|
|
112
|
+
| token | String | - | 用户token(必需) |
|
|
113
|
+
|
|
114
|
+
| 事件 | 参数 | 说明 |
|
|
115
|
+
|-----|------|------|
|
|
116
|
+
| completeInformation | - | 信息完成回调 |
|
|
117
|
+
|
|
118
|
+
#### 参与贡献
|
|
31
119
|
|
|
32
|
-
1.
|
|
33
|
-
2.
|
|
34
|
-
3.
|
|
35
|
-
4.
|
|
36
|
-
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
|
37
|
-
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
120
|
+
1. Fork 本仓库
|
|
121
|
+
2. 新建 Feat_xxx 分支
|
|
122
|
+
3. 提交代码
|
|
123
|
+
4. 新建 Pull Request
|
|
@@ -11206,6 +11206,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11206
11206
|
// EXPORTS
|
|
11207
11207
|
__webpack_require__.d(__webpack_exports__, {
|
|
11208
11208
|
"default": () => (/* binding */ entry_lib),
|
|
11209
|
+
loadCaptchaScripts: () => (/* reexport */ loadCaptchaScripts),
|
|
11209
11210
|
userCenterCompleteInformation: () => (/* reexport */ userCenterCompleteInformation),
|
|
11210
11211
|
userCenterLogin: () => (/* reexport */ userCenterLogin)
|
|
11211
11212
|
});
|
|
@@ -32716,45 +32717,45 @@ function unBindMobile(data) {
|
|
|
32716
32717
|
data: data
|
|
32717
32718
|
});
|
|
32718
32719
|
}
|
|
32719
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/verifyComponents.vue?vue&type=template&id=
|
|
32720
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/verifyComponents.vue?vue&type=template&id=7d804fae
|
|
32720
32721
|
|
|
32721
|
-
var
|
|
32722
|
+
var verifyComponentsvue_type_template_id_7d804fae_hoisted_1 = {
|
|
32722
32723
|
"class": "verify"
|
|
32723
32724
|
};
|
|
32724
|
-
var
|
|
32725
|
+
var verifyComponentsvue_type_template_id_7d804fae_hoisted_2 = {
|
|
32725
32726
|
key: 1,
|
|
32726
32727
|
"class": "aly"
|
|
32727
32728
|
};
|
|
32728
|
-
var
|
|
32729
|
+
var verifyComponentsvue_type_template_id_7d804fae_hoisted_3 = {
|
|
32729
32730
|
id: "clickButton",
|
|
32730
32731
|
ref: "clickButton"
|
|
32731
32732
|
};
|
|
32732
|
-
function
|
|
32733
|
+
function verifyComponentsvue_type_template_id_7d804fae_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
32733
32734
|
var _component_TJCaptcha = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.resolveComponent)("TJCaptcha");
|
|
32734
32735
|
var _component_AliyunCaptchaModal = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.resolveComponent)("AliyunCaptchaModal");
|
|
32735
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div",
|
|
32736
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", verifyComponentsvue_type_template_id_7d804fae_hoisted_1, [$data.type == 1 ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createBlock)(_component_TJCaptcha, {
|
|
32736
32737
|
key: 0,
|
|
32737
32738
|
ref: "TJCaptcha",
|
|
32738
32739
|
CaptchaAppId: $data.CaptchaAppId,
|
|
32739
32740
|
onSuccess: $options.success
|
|
32740
|
-
}, null, 8, ["CaptchaAppId", "onSuccess"])) : ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div",
|
|
32741
|
+
}, null, 8, ["CaptchaAppId", "onSuccess"])) : ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", verifyComponentsvue_type_template_id_7d804fae_hoisted_2, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createVNode)(_component_AliyunCaptchaModal, {
|
|
32741
32742
|
id: "clickButton",
|
|
32742
32743
|
ref: "aliyunCaptcha",
|
|
32743
32744
|
sceneId: $data.sceneId,
|
|
32744
32745
|
onSuccess: $options.success
|
|
32745
|
-
}, null, 8, ["sceneId", "onSuccess"]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div",
|
|
32746
|
+
}, null, 8, ["sceneId", "onSuccess"]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", verifyComponentsvue_type_template_id_7d804fae_hoisted_3, null, 512)]))]);
|
|
32746
32747
|
}
|
|
32747
|
-
;// ./src/components/verifyComponents.vue?vue&type=template&id=
|
|
32748
|
+
;// ./src/components/verifyComponents.vue?vue&type=template&id=7d804fae
|
|
32748
32749
|
|
|
32749
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/TJCaptcha.vue?vue&type=template&id=
|
|
32750
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/TJCaptcha.vue?vue&type=template&id=9e7b3c90
|
|
32750
32751
|
|
|
32751
|
-
var
|
|
32752
|
+
var TJCaptchavue_type_template_id_9e7b3c90_hoisted_1 = {
|
|
32752
32753
|
"class": "TJCaptcha"
|
|
32753
32754
|
};
|
|
32754
|
-
function
|
|
32755
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div",
|
|
32755
|
+
function TJCaptchavue_type_template_id_9e7b3c90_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
32756
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", TJCaptchavue_type_template_id_9e7b3c90_hoisted_1);
|
|
32756
32757
|
}
|
|
32757
|
-
;// ./src/components/TJCaptcha.vue?vue&type=template&id=
|
|
32758
|
+
;// ./src/components/TJCaptcha.vue?vue&type=template&id=9e7b3c90
|
|
32758
32759
|
|
|
32759
32760
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/TJCaptcha.vue?vue&type=script&lang=js
|
|
32760
32761
|
|
|
@@ -32773,24 +32774,51 @@ function TJCaptchavue_type_template_id_4adf8476_render(_ctx, _cache, $props, $se
|
|
|
32773
32774
|
},
|
|
32774
32775
|
data: function data() {
|
|
32775
32776
|
return {
|
|
32776
|
-
captcha: null
|
|
32777
|
+
captcha: null,
|
|
32778
|
+
scriptLoaded: false
|
|
32777
32779
|
};
|
|
32778
32780
|
},
|
|
32779
32781
|
mounted: function mounted() {
|
|
32780
|
-
//
|
|
32782
|
+
// 动态加载腾讯验证码脚本
|
|
32783
|
+
this.loadTencentCaptchaScript();
|
|
32781
32784
|
},
|
|
32782
32785
|
methods: {
|
|
32783
|
-
|
|
32784
|
-
|
|
32786
|
+
// 动态加载腾讯验证码脚本
|
|
32787
|
+
loadTencentCaptchaScript: function loadTencentCaptchaScript() {
|
|
32785
32788
|
var _this = this;
|
|
32789
|
+
if (this.scriptLoaded || typeof window.TencentCaptcha !== 'undefined') {
|
|
32790
|
+
this.scriptLoaded = true;
|
|
32791
|
+
return;
|
|
32792
|
+
}
|
|
32793
|
+
var script = document.createElement('script');
|
|
32794
|
+
script.src = 'https://turing.captcha.qcloud.com/TJCaptcha.js';
|
|
32795
|
+
script.onload = function () {
|
|
32796
|
+
_this.scriptLoaded = true;
|
|
32797
|
+
};
|
|
32798
|
+
script.onerror = function () {
|
|
32799
|
+
console.error('腾讯验证码脚本加载失败');
|
|
32800
|
+
};
|
|
32801
|
+
document.head.appendChild(script);
|
|
32802
|
+
},
|
|
32803
|
+
// 获取验证码加密
|
|
32804
|
+
getCaptchaAppid: function getCaptchaAppid() {
|
|
32805
|
+
var _this2 = this;
|
|
32806
|
+
if (typeof window.TencentCaptcha === 'undefined') {
|
|
32807
|
+
console.warn('腾讯验证码库未加载,使用容错处理');
|
|
32808
|
+
this.loadErrorCallback();
|
|
32809
|
+
return;
|
|
32810
|
+
}
|
|
32786
32811
|
login_getCaptchaAppid().then(function (res) {
|
|
32787
|
-
|
|
32812
|
+
_this2.init(res.data.data);
|
|
32813
|
+
})["catch"](function (error) {
|
|
32814
|
+
console.error('获取验证码AppId失败:', error);
|
|
32815
|
+
_this2.loadErrorCallback();
|
|
32788
32816
|
});
|
|
32789
32817
|
},
|
|
32790
32818
|
init: function init(aidEncrypted) {
|
|
32791
32819
|
try {
|
|
32792
32820
|
// 检查环境是否支持腾讯验证码
|
|
32793
|
-
if (typeof TencentCaptcha === 'undefined') {
|
|
32821
|
+
if (typeof window.TencentCaptcha === 'undefined') {
|
|
32794
32822
|
console.warn('腾讯验证码库未加载,使用容错处理');
|
|
32795
32823
|
this.loadErrorCallback();
|
|
32796
32824
|
return;
|
|
@@ -32798,14 +32826,14 @@ function TJCaptchavue_type_template_id_4adf8476_render(_ctx, _cache, $props, $se
|
|
|
32798
32826
|
|
|
32799
32827
|
// 生成一个验证码对象
|
|
32800
32828
|
// CaptchaAppId:登录验证码控制台,从【验证管理】页面进行查看。如果未创建过验证,请先新建验证。注意:不可使用客户端类型为小程序的CaptchaAppId,会导致数据统计错误。
|
|
32801
|
-
//callback:定义的回调函数
|
|
32802
|
-
this.captcha = new TencentCaptcha(this.CaptchaAppId, this.callback, {
|
|
32829
|
+
// callback:定义的回调函数
|
|
32830
|
+
this.captcha = new window.TencentCaptcha(this.CaptchaAppId, this.callback, {
|
|
32803
32831
|
aidEncrypted: aidEncrypted
|
|
32804
32832
|
});
|
|
32805
32833
|
// 调用方法,显示验证码
|
|
32806
32834
|
this.captcha.show();
|
|
32807
32835
|
} catch (error) {
|
|
32808
|
-
console.
|
|
32836
|
+
console.error("验证码初始化失败:", error);
|
|
32809
32837
|
// 加载异常,调用验证码js加载错误处理函数
|
|
32810
32838
|
this.loadErrorCallback();
|
|
32811
32839
|
}
|
|
@@ -32841,20 +32869,25 @@ function TJCaptchavue_type_template_id_4adf8476_render(_ctx, _cache, $props, $se
|
|
|
32841
32869
|
|
|
32842
32870
|
|
|
32843
32871
|
;
|
|
32844
|
-
const TJCaptcha_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(TJCaptchavue_type_script_lang_js, [['render',
|
|
32872
|
+
const TJCaptcha_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(TJCaptchavue_type_script_lang_js, [['render',TJCaptchavue_type_template_id_9e7b3c90_render]])
|
|
32845
32873
|
|
|
32846
32874
|
/* harmony default export */ const TJCaptcha = (TJCaptcha_exports_);
|
|
32847
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/AliyunCaptchaModal.vue?vue&type=template&id=
|
|
32875
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/AliyunCaptchaModal.vue?vue&type=template&id=1572512c
|
|
32848
32876
|
|
|
32849
|
-
var
|
|
32850
|
-
function
|
|
32877
|
+
var AliyunCaptchaModalvue_type_template_id_1572512c_hoisted_1 = ["id"];
|
|
32878
|
+
function AliyunCaptchaModalvue_type_template_id_1572512c_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
32851
32879
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", null, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", {
|
|
32852
|
-
id: "captcha-element-".concat(
|
|
32853
|
-
}, null, 8,
|
|
32880
|
+
id: "captcha-element-".concat($data.uniqueId)
|
|
32881
|
+
}, null, 8, AliyunCaptchaModalvue_type_template_id_1572512c_hoisted_1)]);
|
|
32854
32882
|
}
|
|
32855
|
-
;// ./src/components/AliyunCaptchaModal.vue?vue&type=template&id=
|
|
32883
|
+
;// ./src/components/AliyunCaptchaModal.vue?vue&type=template&id=1572512c
|
|
32856
32884
|
|
|
32857
32885
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/AliyunCaptchaModal.vue?vue&type=script&lang=js
|
|
32886
|
+
|
|
32887
|
+
|
|
32888
|
+
|
|
32889
|
+
|
|
32890
|
+
|
|
32858
32891
|
/* harmony default export */ const AliyunCaptchaModalvue_type_script_lang_js = ({
|
|
32859
32892
|
props: {
|
|
32860
32893
|
id: {
|
|
@@ -32868,13 +32901,18 @@ function AliyunCaptchaModalvue_type_template_id_3f1f3ec9_render(_ctx, _cache, $p
|
|
|
32868
32901
|
},
|
|
32869
32902
|
data: function data() {
|
|
32870
32903
|
return {
|
|
32871
|
-
captcha: null
|
|
32904
|
+
captcha: null,
|
|
32905
|
+
uniqueId: '',
|
|
32906
|
+
// Vue 3 兼容的唯一ID
|
|
32907
|
+
scriptLoaded: false
|
|
32872
32908
|
};
|
|
32873
32909
|
},
|
|
32874
32910
|
mounted: function mounted() {
|
|
32911
|
+
this.uniqueId = 'captcha-' + Math.random().toString(36).substr(2, 9);
|
|
32875
32912
|
try {
|
|
32876
32913
|
if (typeof window.initAliyunCaptcha === 'undefined') {
|
|
32877
|
-
console.warn('
|
|
32914
|
+
console.warn('阿里云验证码库未加载,尝试动态加载');
|
|
32915
|
+
this.loadAliyunCaptchaScript();
|
|
32878
32916
|
return;
|
|
32879
32917
|
}
|
|
32880
32918
|
this.initAliyunCaptcha();
|
|
@@ -32883,8 +32921,31 @@ function AliyunCaptchaModalvue_type_template_id_3f1f3ec9_render(_ctx, _cache, $p
|
|
|
32883
32921
|
}
|
|
32884
32922
|
},
|
|
32885
32923
|
methods: {
|
|
32886
|
-
|
|
32924
|
+
// 动态加载阿里云验证码脚本
|
|
32925
|
+
loadAliyunCaptchaScript: function loadAliyunCaptchaScript() {
|
|
32887
32926
|
var _this = this;
|
|
32927
|
+
if (this.scriptLoaded) return;
|
|
32928
|
+
|
|
32929
|
+
// 先加载配置
|
|
32930
|
+
if (!window.AliyunCaptchaConfig) {
|
|
32931
|
+
window.AliyunCaptchaConfig = {
|
|
32932
|
+
region: 'cn',
|
|
32933
|
+
prefix: '106eu7'
|
|
32934
|
+
};
|
|
32935
|
+
}
|
|
32936
|
+
var script = document.createElement('script');
|
|
32937
|
+
script.src = 'https://o.alicdn.com/captcha-frontend/aliyunCaptcha/AliyunCaptcha.js';
|
|
32938
|
+
script.onload = function () {
|
|
32939
|
+
_this.scriptLoaded = true;
|
|
32940
|
+
_this.initAliyunCaptcha();
|
|
32941
|
+
};
|
|
32942
|
+
script.onerror = function () {
|
|
32943
|
+
console.error('阿里云验证码脚本加载失败');
|
|
32944
|
+
};
|
|
32945
|
+
document.head.appendChild(script);
|
|
32946
|
+
},
|
|
32947
|
+
initAliyunCaptcha: function initAliyunCaptcha() {
|
|
32948
|
+
var _this2 = this;
|
|
32888
32949
|
try {
|
|
32889
32950
|
if (typeof window.initAliyunCaptcha === 'undefined') {
|
|
32890
32951
|
console.warn('阿里云验证码库未加载,跳过初始化');
|
|
@@ -32895,7 +32956,7 @@ function AliyunCaptchaModalvue_type_template_id_3f1f3ec9_render(_ctx, _cache, $p
|
|
|
32895
32956
|
// 场景ID。根据步骤二新建验证场景后,您可以在验证码场景列表,获取该场景的场景ID
|
|
32896
32957
|
mode: "popup",
|
|
32897
32958
|
// 验证码模式。popup表示要集成的验证码模式为弹出式。无需修改
|
|
32898
|
-
element: "#captcha-element-".concat(this.
|
|
32959
|
+
element: "#captcha-element-".concat(this.uniqueId),
|
|
32899
32960
|
// 页面上预留的渲染验证码的元素,与原代码中预留的页面元素保持一致。
|
|
32900
32961
|
button: "#".concat(this.id),
|
|
32901
32962
|
captchaLogoImg: "https://file.icve.com.cn/app/site/prod/zyzyzx_components/zhzj_logo.webp",
|
|
@@ -32904,8 +32965,8 @@ function AliyunCaptchaModalvue_type_template_id_3f1f3ec9_render(_ctx, _cache, $p
|
|
|
32904
32965
|
try {
|
|
32905
32966
|
// 入参为验签captchaVerifyParam
|
|
32906
32967
|
// 1.根据校验结果来进行业务处理
|
|
32907
|
-
|
|
32908
|
-
|
|
32968
|
+
_this2.$emit("success", captchaVerifyParam);
|
|
32969
|
+
_this2.initAliyunCaptcha();
|
|
32909
32970
|
} catch (error) {
|
|
32910
32971
|
console.error('验证码成功回调处理失败:', error);
|
|
32911
32972
|
}
|
|
@@ -32919,8 +32980,8 @@ function AliyunCaptchaModalvue_type_template_id_3f1f3ec9_render(_ctx, _cache, $p
|
|
|
32919
32980
|
// 绑定验证码实例回调函数,该回调会在验证码初始化成功后调用
|
|
32920
32981
|
getInstance: function getInstance(instance) {
|
|
32921
32982
|
try {
|
|
32922
|
-
|
|
32923
|
-
|
|
32983
|
+
_this2.$emit("getInstance", instance);
|
|
32984
|
+
_this2.captcha = instance;
|
|
32924
32985
|
} catch (error) {
|
|
32925
32986
|
console.error('验证码实例绑定失败:', error);
|
|
32926
32987
|
}
|
|
@@ -32930,7 +32991,7 @@ function AliyunCaptchaModalvue_type_template_id_3f1f3ec9_render(_ctx, _cache, $p
|
|
|
32930
32991
|
height: 40
|
|
32931
32992
|
},
|
|
32932
32993
|
// 滑块验证码样式,支持自定义宽度和高度,单位为px。其中,width最小值为320 px
|
|
32933
|
-
language: localStorage.getItem("language") || "cn" // 验证码语言类型,支持简体中文(cn)、繁体中文(tw)、英文(en)
|
|
32994
|
+
language: typeof localStorage !== 'undefined' ? localStorage.getItem("language") || "cn" : "cn" // 验证码语言类型,支持简体中文(cn)、繁体中文(tw)、英文(en)
|
|
32934
32995
|
});
|
|
32935
32996
|
} catch (error) {
|
|
32936
32997
|
console.error('阿里云验证码初始化失败:', error);
|
|
@@ -32946,7 +33007,7 @@ function AliyunCaptchaModalvue_type_template_id_3f1f3ec9_render(_ctx, _cache, $p
|
|
|
32946
33007
|
|
|
32947
33008
|
|
|
32948
33009
|
;
|
|
32949
|
-
const AliyunCaptchaModal_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(AliyunCaptchaModalvue_type_script_lang_js, [['render',
|
|
33010
|
+
const AliyunCaptchaModal_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(AliyunCaptchaModalvue_type_script_lang_js, [['render',AliyunCaptchaModalvue_type_template_id_1572512c_render]])
|
|
32950
33011
|
|
|
32951
33012
|
/* harmony default export */ const AliyunCaptchaModal = (AliyunCaptchaModal_exports_);
|
|
32952
33013
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/verifyComponents.vue?vue&type=script&lang=js
|
|
@@ -33004,9 +33065,10 @@ const AliyunCaptchaModal_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)
|
|
|
33004
33065
|
if (this.type === 'tencent') {
|
|
33005
33066
|
this.$refs.TJCaptcha.getCaptchaAppid();
|
|
33006
33067
|
} else if (this.type === 'alibaba') {
|
|
33007
|
-
if (window.AliyunCaptcha) {
|
|
33068
|
+
if (typeof window.AliyunCaptcha !== 'undefined' && this.$refs.aliyunCaptcha.captcha) {
|
|
33008
33069
|
this.$refs.aliyunCaptcha.captcha.show();
|
|
33009
33070
|
} else {
|
|
33071
|
+
console.warn('阿里云验证码未加载,使用容错处理');
|
|
33010
33072
|
var VerifyParam = {
|
|
33011
33073
|
specialKey: true
|
|
33012
33074
|
};
|
|
@@ -33036,69 +33098,69 @@ const AliyunCaptchaModal_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)
|
|
|
33036
33098
|
|
|
33037
33099
|
|
|
33038
33100
|
;
|
|
33039
|
-
const verifyComponents_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(verifyComponentsvue_type_script_lang_js, [['render',
|
|
33101
|
+
const verifyComponents_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(verifyComponentsvue_type_script_lang_js, [['render',verifyComponentsvue_type_template_id_7d804fae_render]])
|
|
33040
33102
|
|
|
33041
33103
|
/* harmony default export */ const verifyComponents = (verifyComponents_exports_);
|
|
33042
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/QRCodeLogin.vue?vue&type=template&id=
|
|
33104
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/QRCodeLogin.vue?vue&type=template&id=6badd114&scoped=true
|
|
33043
33105
|
|
|
33044
|
-
var
|
|
33106
|
+
var QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_1 = {
|
|
33045
33107
|
"class": "qr-code-wrapper"
|
|
33046
33108
|
};
|
|
33047
|
-
var
|
|
33048
|
-
var
|
|
33109
|
+
var QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_2 = ["id"];
|
|
33110
|
+
var QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_3 = {
|
|
33049
33111
|
key: 0,
|
|
33050
33112
|
"class": "qr-login-overlay"
|
|
33051
33113
|
};
|
|
33052
|
-
var
|
|
33114
|
+
var QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_4 = {
|
|
33053
33115
|
key: 0,
|
|
33054
33116
|
"class": "overlay-content"
|
|
33055
33117
|
};
|
|
33056
|
-
var
|
|
33118
|
+
var QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_5 = {
|
|
33057
33119
|
"class": "overlay-text"
|
|
33058
33120
|
};
|
|
33059
|
-
var
|
|
33121
|
+
var QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_6 = {
|
|
33060
33122
|
"class": "overlay-tip"
|
|
33061
33123
|
};
|
|
33062
|
-
var
|
|
33124
|
+
var QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_7 = {
|
|
33063
33125
|
key: 1,
|
|
33064
33126
|
"class": "overlay-content"
|
|
33065
33127
|
};
|
|
33066
|
-
var
|
|
33128
|
+
var QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_8 = {
|
|
33067
33129
|
"class": "overlay-text",
|
|
33068
33130
|
style: {
|
|
33069
33131
|
"color": "red"
|
|
33070
33132
|
}
|
|
33071
33133
|
};
|
|
33072
|
-
var
|
|
33134
|
+
var QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_9 = {
|
|
33073
33135
|
"class": "overlay-tip"
|
|
33074
33136
|
};
|
|
33075
|
-
var
|
|
33137
|
+
var QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_10 = {
|
|
33076
33138
|
"class": "qr-tip"
|
|
33077
33139
|
};
|
|
33078
|
-
var
|
|
33140
|
+
var QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_11 = {
|
|
33079
33141
|
key: 0,
|
|
33080
33142
|
"class": "bind-tip"
|
|
33081
33143
|
};
|
|
33082
|
-
function
|
|
33144
|
+
function QRCodeLoginvue_type_template_id_6badd114_scoped_true_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
33083
33145
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", {
|
|
33084
33146
|
"class": (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.normalizeClass)(["qr-login-container", {
|
|
33085
33147
|
'qr-login-container1': $props.bdwxShow
|
|
33086
33148
|
}])
|
|
33087
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div",
|
|
33088
|
-
id: "qrcode-container-".concat(
|
|
33089
|
-
}, null, 8,
|
|
33149
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", {
|
|
33150
|
+
id: "qrcode-container-".concat($data.uniqueId)
|
|
33151
|
+
}, null, 8, QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_2), $data.loginStatus == 1 || $data.loginStatus == 3 ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_3, [$data.loginStatus == 1 ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_4, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("p", QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_5, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(_ctx.i18n('已扫码')), 1), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("p", QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_6, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(_ctx.i18n('请在手机上确认')), 1), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("button", {
|
|
33090
33152
|
"class": "rescan-btn",
|
|
33091
33153
|
onClick: _cache[0] || (_cache[0] = function () {
|
|
33092
33154
|
return $options.handleRescanQrCode && $options.handleRescanQrCode.apply($options, arguments);
|
|
33093
33155
|
})
|
|
33094
|
-
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(_ctx.i18n('重新扫码')), 1)])) : $data.loginStatus == 3 ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div",
|
|
33156
|
+
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(_ctx.i18n('重新扫码')), 1)])) : $data.loginStatus == 3 ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_7, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("p", QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_8, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(_ctx.i18n('二维码已过期')), 1), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("p", QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_9, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(_ctx.i18n('请点击下方按钮刷新')), 1), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("button", {
|
|
33095
33157
|
"class": "rescan-btn",
|
|
33096
33158
|
onClick: _cache[1] || (_cache[1] = function () {
|
|
33097
33159
|
return $options.handleRescanQrCode && $options.handleRescanQrCode.apply($options, arguments);
|
|
33098
33160
|
})
|
|
33099
|
-
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(_ctx.i18n('重新生成')), 1)])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("p",
|
|
33161
|
+
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(_ctx.i18n('重新生成')), 1)])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("p", QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_10, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)($props.bdwxShow ? _ctx.i18n('微信扫码进行账号绑定') : _ctx.i18n('微信或App扫码均可登录')), 1), $data.wxRandom ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementBlock)("div", QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_11, (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.toDisplayString)(_ctx.i18n('你当前的微信暂未绑定账号或手机号,需先完成绑定,后续登录将无需重复验证,直接进入即可~')), 1)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createCommentVNode)("", true)], 2);
|
|
33100
33162
|
}
|
|
33101
|
-
;// ./src/components/QRCodeLogin.vue?vue&type=template&id=
|
|
33163
|
+
;// ./src/components/QRCodeLogin.vue?vue&type=template&id=6badd114&scoped=true
|
|
33102
33164
|
|
|
33103
33165
|
// EXTERNAL MODULE: ./node_modules/qrcodejs2/qrcode.js
|
|
33104
33166
|
var qrcode = __webpack_require__(9118);
|
|
@@ -33121,6 +33183,11 @@ function removeToken() {
|
|
|
33121
33183
|
|
|
33122
33184
|
|
|
33123
33185
|
|
|
33186
|
+
|
|
33187
|
+
|
|
33188
|
+
|
|
33189
|
+
|
|
33190
|
+
|
|
33124
33191
|
/* harmony default export */ const QRCodeLoginvue_type_script_lang_js = ({
|
|
33125
33192
|
mixins: [i18nMixin],
|
|
33126
33193
|
props: {
|
|
@@ -33141,10 +33208,12 @@ function removeToken() {
|
|
|
33141
33208
|
statusTimer: null,
|
|
33142
33209
|
loginStatus: 0,
|
|
33143
33210
|
// 0-未扫码, 1-已扫码待确认, 2-登录成功, 3-过期
|
|
33144
|
-
wxRandom: ''
|
|
33211
|
+
wxRandom: '',
|
|
33212
|
+
uniqueId: '' // Vue 3 兼容的唯一ID
|
|
33145
33213
|
};
|
|
33146
33214
|
},
|
|
33147
33215
|
mounted: function mounted() {
|
|
33216
|
+
this.uniqueId = 'qr-' + Math.random().toString(36).substr(2, 9);
|
|
33148
33217
|
this.generateQrCode();
|
|
33149
33218
|
},
|
|
33150
33219
|
beforeDestroy: function beforeDestroy() {
|
|
@@ -33174,7 +33243,7 @@ function removeToken() {
|
|
|
33174
33243
|
});
|
|
33175
33244
|
},
|
|
33176
33245
|
generateQRCode: function generateQRCode(url) {
|
|
33177
|
-
var containerId = "qrcode-container-".concat(this.
|
|
33246
|
+
var containerId = "qrcode-container-".concat(this.uniqueId);
|
|
33178
33247
|
document.getElementById(containerId).innerHTML = '';
|
|
33179
33248
|
// 创建新的二维码实例
|
|
33180
33249
|
new (qrcode_default())(document.getElementById(containerId), {
|
|
@@ -33241,10 +33310,10 @@ function removeToken() {
|
|
|
33241
33310
|
});
|
|
33242
33311
|
;// ./src/components/QRCodeLogin.vue?vue&type=script&lang=js
|
|
33243
33312
|
|
|
33244
|
-
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/QRCodeLogin.vue?vue&type=style&index=0&id=
|
|
33313
|
+
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/QRCodeLogin.vue?vue&type=style&index=0&id=6badd114&lang=scss&scoped=true
|
|
33245
33314
|
// extracted by mini-css-extract-plugin
|
|
33246
33315
|
|
|
33247
|
-
;// ./src/components/QRCodeLogin.vue?vue&type=style&index=0&id=
|
|
33316
|
+
;// ./src/components/QRCodeLogin.vue?vue&type=style&index=0&id=6badd114&lang=scss&scoped=true
|
|
33248
33317
|
|
|
33249
33318
|
;// ./src/components/QRCodeLogin.vue
|
|
33250
33319
|
|
|
@@ -33254,7 +33323,7 @@ function removeToken() {
|
|
|
33254
33323
|
;
|
|
33255
33324
|
|
|
33256
33325
|
|
|
33257
|
-
const QRCodeLogin_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(QRCodeLoginvue_type_script_lang_js, [['render',
|
|
33326
|
+
const QRCodeLogin_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(QRCodeLoginvue_type_script_lang_js, [['render',QRCodeLoginvue_type_template_id_6badd114_scoped_true_render],['__scopeId',"data-v-6badd114"]])
|
|
33258
33327
|
|
|
33259
33328
|
/* harmony default export */ const QRCodeLogin = (QRCodeLogin_exports_);
|
|
33260
33329
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/mobileBinding.vue?vue&type=template&id=3371c604&scoped=true
|
|
@@ -35214,12 +35283,42 @@ const userCenterLogin_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(us
|
|
|
35214
35283
|
|
|
35215
35284
|
|
|
35216
35285
|
|
|
35286
|
+
// 预加载验证码脚本(可选,用于提前加载)
|
|
35287
|
+
function loadCaptchaScripts() {
|
|
35288
|
+
// 加载腾讯验证码
|
|
35289
|
+
if (typeof window.TencentCaptcha === 'undefined') {
|
|
35290
|
+
var tencentScript = document.createElement('script');
|
|
35291
|
+
tencentScript.src = 'https://turing.captcha.qcloud.com/TJCaptcha.js';
|
|
35292
|
+
tencentScript.async = true;
|
|
35293
|
+
document.head.appendChild(tencentScript);
|
|
35294
|
+
}
|
|
35295
|
+
|
|
35296
|
+
// 加载阿里云验证码
|
|
35297
|
+
if (typeof window.AliyunCaptcha === 'undefined') {
|
|
35298
|
+
if (!window.AliyunCaptchaConfig) {
|
|
35299
|
+
window.AliyunCaptchaConfig = {
|
|
35300
|
+
region: 'cn',
|
|
35301
|
+
prefix: '106eu7'
|
|
35302
|
+
};
|
|
35303
|
+
}
|
|
35304
|
+
var aliyunScript = document.createElement('script');
|
|
35305
|
+
aliyunScript.src = 'https://o.alicdn.com/captcha-frontend/aliyunCaptcha/AliyunCaptcha.js';
|
|
35306
|
+
aliyunScript.async = true;
|
|
35307
|
+
document.head.appendChild(aliyunScript);
|
|
35308
|
+
}
|
|
35309
|
+
}
|
|
35310
|
+
|
|
35217
35311
|
// 导出组件
|
|
35218
35312
|
|
|
35219
35313
|
|
|
35220
35314
|
// 添加 install 方法以支持 Vue.use()
|
|
35221
35315
|
/* harmony default export */ const index = ({
|
|
35222
35316
|
install: function install(app) {
|
|
35317
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
35318
|
+
// 自动加载验证码脚本(如果未手动禁用)
|
|
35319
|
+
if (options.loadCaptcha !== false) {
|
|
35320
|
+
loadCaptchaScripts();
|
|
35321
|
+
}
|
|
35223
35322
|
app.component("userCenterCompleteInformation", userCenterCompleteInformation);
|
|
35224
35323
|
app.component("userCenterLogin", userCenterLogin);
|
|
35225
35324
|
}
|