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
|
@@ -11224,6 +11224,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11224
11224
|
// EXPORTS
|
|
11225
11225
|
__webpack_require__.d(__webpack_exports__, {
|
|
11226
11226
|
"default": () => (/* binding */ entry_lib),
|
|
11227
|
+
loadCaptchaScripts: () => (/* reexport */ loadCaptchaScripts),
|
|
11227
11228
|
userCenterCompleteInformation: () => (/* reexport */ userCenterCompleteInformation),
|
|
11228
11229
|
userCenterLogin: () => (/* reexport */ userCenterLogin)
|
|
11229
11230
|
});
|
|
@@ -32734,45 +32735,45 @@ function unBindMobile(data) {
|
|
|
32734
32735
|
data: data
|
|
32735
32736
|
});
|
|
32736
32737
|
}
|
|
32737
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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=
|
|
32738
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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
|
|
32738
32739
|
|
|
32739
|
-
var
|
|
32740
|
+
var verifyComponentsvue_type_template_id_7d804fae_hoisted_1 = {
|
|
32740
32741
|
"class": "verify"
|
|
32741
32742
|
};
|
|
32742
|
-
var
|
|
32743
|
+
var verifyComponentsvue_type_template_id_7d804fae_hoisted_2 = {
|
|
32743
32744
|
key: 1,
|
|
32744
32745
|
"class": "aly"
|
|
32745
32746
|
};
|
|
32746
|
-
var
|
|
32747
|
+
var verifyComponentsvue_type_template_id_7d804fae_hoisted_3 = {
|
|
32747
32748
|
id: "clickButton",
|
|
32748
32749
|
ref: "clickButton"
|
|
32749
32750
|
};
|
|
32750
|
-
function
|
|
32751
|
+
function verifyComponentsvue_type_template_id_7d804fae_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
32751
32752
|
var _component_TJCaptcha = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("TJCaptcha");
|
|
32752
32753
|
var _component_AliyunCaptchaModal = (0,external_commonjs_vue_commonjs2_vue_root_Vue_.resolveComponent)("AliyunCaptchaModal");
|
|
32753
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div",
|
|
32754
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", verifyComponentsvue_type_template_id_7d804fae_hoisted_1, [$data.type == 1 ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createBlock)(_component_TJCaptcha, {
|
|
32754
32755
|
key: 0,
|
|
32755
32756
|
ref: "TJCaptcha",
|
|
32756
32757
|
CaptchaAppId: $data.CaptchaAppId,
|
|
32757
32758
|
onSuccess: $options.success
|
|
32758
|
-
}, null, 8, ["CaptchaAppId", "onSuccess"])) : ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div",
|
|
32759
|
+
}, null, 8, ["CaptchaAppId", "onSuccess"])) : ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", verifyComponentsvue_type_template_id_7d804fae_hoisted_2, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createVNode)(_component_AliyunCaptchaModal, {
|
|
32759
32760
|
id: "clickButton",
|
|
32760
32761
|
ref: "aliyunCaptcha",
|
|
32761
32762
|
sceneId: $data.sceneId,
|
|
32762
32763
|
onSuccess: $options.success
|
|
32763
|
-
}, null, 8, ["sceneId", "onSuccess"]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div",
|
|
32764
|
+
}, null, 8, ["sceneId", "onSuccess"]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", verifyComponentsvue_type_template_id_7d804fae_hoisted_3, null, 512)]))]);
|
|
32764
32765
|
}
|
|
32765
|
-
;// ./src/components/verifyComponents.vue?vue&type=template&id=
|
|
32766
|
+
;// ./src/components/verifyComponents.vue?vue&type=template&id=7d804fae
|
|
32766
32767
|
|
|
32767
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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=
|
|
32768
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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
|
|
32768
32769
|
|
|
32769
|
-
var
|
|
32770
|
+
var TJCaptchavue_type_template_id_9e7b3c90_hoisted_1 = {
|
|
32770
32771
|
"class": "TJCaptcha"
|
|
32771
32772
|
};
|
|
32772
|
-
function
|
|
32773
|
-
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div",
|
|
32773
|
+
function TJCaptchavue_type_template_id_9e7b3c90_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
32774
|
+
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", TJCaptchavue_type_template_id_9e7b3c90_hoisted_1);
|
|
32774
32775
|
}
|
|
32775
|
-
;// ./src/components/TJCaptcha.vue?vue&type=template&id=
|
|
32776
|
+
;// ./src/components/TJCaptcha.vue?vue&type=template&id=9e7b3c90
|
|
32776
32777
|
|
|
32777
32778
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/TJCaptcha.vue?vue&type=script&lang=js
|
|
32778
32779
|
|
|
@@ -32791,24 +32792,51 @@ function TJCaptchavue_type_template_id_4adf8476_render(_ctx, _cache, $props, $se
|
|
|
32791
32792
|
},
|
|
32792
32793
|
data: function data() {
|
|
32793
32794
|
return {
|
|
32794
|
-
captcha: null
|
|
32795
|
+
captcha: null,
|
|
32796
|
+
scriptLoaded: false
|
|
32795
32797
|
};
|
|
32796
32798
|
},
|
|
32797
32799
|
mounted: function mounted() {
|
|
32798
|
-
//
|
|
32800
|
+
// 动态加载腾讯验证码脚本
|
|
32801
|
+
this.loadTencentCaptchaScript();
|
|
32799
32802
|
},
|
|
32800
32803
|
methods: {
|
|
32801
|
-
|
|
32802
|
-
|
|
32804
|
+
// 动态加载腾讯验证码脚本
|
|
32805
|
+
loadTencentCaptchaScript: function loadTencentCaptchaScript() {
|
|
32803
32806
|
var _this = this;
|
|
32807
|
+
if (this.scriptLoaded || typeof window.TencentCaptcha !== 'undefined') {
|
|
32808
|
+
this.scriptLoaded = true;
|
|
32809
|
+
return;
|
|
32810
|
+
}
|
|
32811
|
+
var script = document.createElement('script');
|
|
32812
|
+
script.src = 'https://turing.captcha.qcloud.com/TJCaptcha.js';
|
|
32813
|
+
script.onload = function () {
|
|
32814
|
+
_this.scriptLoaded = true;
|
|
32815
|
+
};
|
|
32816
|
+
script.onerror = function () {
|
|
32817
|
+
console.error('腾讯验证码脚本加载失败');
|
|
32818
|
+
};
|
|
32819
|
+
document.head.appendChild(script);
|
|
32820
|
+
},
|
|
32821
|
+
// 获取验证码加密
|
|
32822
|
+
getCaptchaAppid: function getCaptchaAppid() {
|
|
32823
|
+
var _this2 = this;
|
|
32824
|
+
if (typeof window.TencentCaptcha === 'undefined') {
|
|
32825
|
+
console.warn('腾讯验证码库未加载,使用容错处理');
|
|
32826
|
+
this.loadErrorCallback();
|
|
32827
|
+
return;
|
|
32828
|
+
}
|
|
32804
32829
|
login_getCaptchaAppid().then(function (res) {
|
|
32805
|
-
|
|
32830
|
+
_this2.init(res.data.data);
|
|
32831
|
+
})["catch"](function (error) {
|
|
32832
|
+
console.error('获取验证码AppId失败:', error);
|
|
32833
|
+
_this2.loadErrorCallback();
|
|
32806
32834
|
});
|
|
32807
32835
|
},
|
|
32808
32836
|
init: function init(aidEncrypted) {
|
|
32809
32837
|
try {
|
|
32810
32838
|
// 检查环境是否支持腾讯验证码
|
|
32811
|
-
if (typeof TencentCaptcha === 'undefined') {
|
|
32839
|
+
if (typeof window.TencentCaptcha === 'undefined') {
|
|
32812
32840
|
console.warn('腾讯验证码库未加载,使用容错处理');
|
|
32813
32841
|
this.loadErrorCallback();
|
|
32814
32842
|
return;
|
|
@@ -32816,14 +32844,14 @@ function TJCaptchavue_type_template_id_4adf8476_render(_ctx, _cache, $props, $se
|
|
|
32816
32844
|
|
|
32817
32845
|
// 生成一个验证码对象
|
|
32818
32846
|
// CaptchaAppId:登录验证码控制台,从【验证管理】页面进行查看。如果未创建过验证,请先新建验证。注意:不可使用客户端类型为小程序的CaptchaAppId,会导致数据统计错误。
|
|
32819
|
-
//callback:定义的回调函数
|
|
32820
|
-
this.captcha = new TencentCaptcha(this.CaptchaAppId, this.callback, {
|
|
32847
|
+
// callback:定义的回调函数
|
|
32848
|
+
this.captcha = new window.TencentCaptcha(this.CaptchaAppId, this.callback, {
|
|
32821
32849
|
aidEncrypted: aidEncrypted
|
|
32822
32850
|
});
|
|
32823
32851
|
// 调用方法,显示验证码
|
|
32824
32852
|
this.captcha.show();
|
|
32825
32853
|
} catch (error) {
|
|
32826
|
-
console.
|
|
32854
|
+
console.error("验证码初始化失败:", error);
|
|
32827
32855
|
// 加载异常,调用验证码js加载错误处理函数
|
|
32828
32856
|
this.loadErrorCallback();
|
|
32829
32857
|
}
|
|
@@ -32859,20 +32887,25 @@ function TJCaptchavue_type_template_id_4adf8476_render(_ctx, _cache, $props, $se
|
|
|
32859
32887
|
|
|
32860
32888
|
|
|
32861
32889
|
;
|
|
32862
|
-
const TJCaptcha_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(TJCaptchavue_type_script_lang_js, [['render',
|
|
32890
|
+
const TJCaptcha_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(TJCaptchavue_type_script_lang_js, [['render',TJCaptchavue_type_template_id_9e7b3c90_render]])
|
|
32863
32891
|
|
|
32864
32892
|
/* harmony default export */ const TJCaptcha = (TJCaptcha_exports_);
|
|
32865
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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=
|
|
32893
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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
|
|
32866
32894
|
|
|
32867
|
-
var
|
|
32868
|
-
function
|
|
32895
|
+
var AliyunCaptchaModalvue_type_template_id_1572512c_hoisted_1 = ["id"];
|
|
32896
|
+
function AliyunCaptchaModalvue_type_template_id_1572512c_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
32869
32897
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", null, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
32870
|
-
id: "captcha-element-".concat(
|
|
32871
|
-
}, null, 8,
|
|
32898
|
+
id: "captcha-element-".concat($data.uniqueId)
|
|
32899
|
+
}, null, 8, AliyunCaptchaModalvue_type_template_id_1572512c_hoisted_1)]);
|
|
32872
32900
|
}
|
|
32873
|
-
;// ./src/components/AliyunCaptchaModal.vue?vue&type=template&id=
|
|
32901
|
+
;// ./src/components/AliyunCaptchaModal.vue?vue&type=template&id=1572512c
|
|
32874
32902
|
|
|
32875
32903
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/AliyunCaptchaModal.vue?vue&type=script&lang=js
|
|
32904
|
+
|
|
32905
|
+
|
|
32906
|
+
|
|
32907
|
+
|
|
32908
|
+
|
|
32876
32909
|
/* harmony default export */ const AliyunCaptchaModalvue_type_script_lang_js = ({
|
|
32877
32910
|
props: {
|
|
32878
32911
|
id: {
|
|
@@ -32886,13 +32919,18 @@ function AliyunCaptchaModalvue_type_template_id_3f1f3ec9_render(_ctx, _cache, $p
|
|
|
32886
32919
|
},
|
|
32887
32920
|
data: function data() {
|
|
32888
32921
|
return {
|
|
32889
|
-
captcha: null
|
|
32922
|
+
captcha: null,
|
|
32923
|
+
uniqueId: '',
|
|
32924
|
+
// Vue 3 兼容的唯一ID
|
|
32925
|
+
scriptLoaded: false
|
|
32890
32926
|
};
|
|
32891
32927
|
},
|
|
32892
32928
|
mounted: function mounted() {
|
|
32929
|
+
this.uniqueId = 'captcha-' + Math.random().toString(36).substr(2, 9);
|
|
32893
32930
|
try {
|
|
32894
32931
|
if (typeof window.initAliyunCaptcha === 'undefined') {
|
|
32895
|
-
console.warn('
|
|
32932
|
+
console.warn('阿里云验证码库未加载,尝试动态加载');
|
|
32933
|
+
this.loadAliyunCaptchaScript();
|
|
32896
32934
|
return;
|
|
32897
32935
|
}
|
|
32898
32936
|
this.initAliyunCaptcha();
|
|
@@ -32901,8 +32939,31 @@ function AliyunCaptchaModalvue_type_template_id_3f1f3ec9_render(_ctx, _cache, $p
|
|
|
32901
32939
|
}
|
|
32902
32940
|
},
|
|
32903
32941
|
methods: {
|
|
32904
|
-
|
|
32942
|
+
// 动态加载阿里云验证码脚本
|
|
32943
|
+
loadAliyunCaptchaScript: function loadAliyunCaptchaScript() {
|
|
32905
32944
|
var _this = this;
|
|
32945
|
+
if (this.scriptLoaded) return;
|
|
32946
|
+
|
|
32947
|
+
// 先加载配置
|
|
32948
|
+
if (!window.AliyunCaptchaConfig) {
|
|
32949
|
+
window.AliyunCaptchaConfig = {
|
|
32950
|
+
region: 'cn',
|
|
32951
|
+
prefix: '106eu7'
|
|
32952
|
+
};
|
|
32953
|
+
}
|
|
32954
|
+
var script = document.createElement('script');
|
|
32955
|
+
script.src = 'https://o.alicdn.com/captcha-frontend/aliyunCaptcha/AliyunCaptcha.js';
|
|
32956
|
+
script.onload = function () {
|
|
32957
|
+
_this.scriptLoaded = true;
|
|
32958
|
+
_this.initAliyunCaptcha();
|
|
32959
|
+
};
|
|
32960
|
+
script.onerror = function () {
|
|
32961
|
+
console.error('阿里云验证码脚本加载失败');
|
|
32962
|
+
};
|
|
32963
|
+
document.head.appendChild(script);
|
|
32964
|
+
},
|
|
32965
|
+
initAliyunCaptcha: function initAliyunCaptcha() {
|
|
32966
|
+
var _this2 = this;
|
|
32906
32967
|
try {
|
|
32907
32968
|
if (typeof window.initAliyunCaptcha === 'undefined') {
|
|
32908
32969
|
console.warn('阿里云验证码库未加载,跳过初始化');
|
|
@@ -32913,7 +32974,7 @@ function AliyunCaptchaModalvue_type_template_id_3f1f3ec9_render(_ctx, _cache, $p
|
|
|
32913
32974
|
// 场景ID。根据步骤二新建验证场景后,您可以在验证码场景列表,获取该场景的场景ID
|
|
32914
32975
|
mode: "popup",
|
|
32915
32976
|
// 验证码模式。popup表示要集成的验证码模式为弹出式。无需修改
|
|
32916
|
-
element: "#captcha-element-".concat(this.
|
|
32977
|
+
element: "#captcha-element-".concat(this.uniqueId),
|
|
32917
32978
|
// 页面上预留的渲染验证码的元素,与原代码中预留的页面元素保持一致。
|
|
32918
32979
|
button: "#".concat(this.id),
|
|
32919
32980
|
captchaLogoImg: "https://file.icve.com.cn/app/site/prod/zyzyzx_components/zhzj_logo.webp",
|
|
@@ -32922,8 +32983,8 @@ function AliyunCaptchaModalvue_type_template_id_3f1f3ec9_render(_ctx, _cache, $p
|
|
|
32922
32983
|
try {
|
|
32923
32984
|
// 入参为验签captchaVerifyParam
|
|
32924
32985
|
// 1.根据校验结果来进行业务处理
|
|
32925
|
-
|
|
32926
|
-
|
|
32986
|
+
_this2.$emit("success", captchaVerifyParam);
|
|
32987
|
+
_this2.initAliyunCaptcha();
|
|
32927
32988
|
} catch (error) {
|
|
32928
32989
|
console.error('验证码成功回调处理失败:', error);
|
|
32929
32990
|
}
|
|
@@ -32937,8 +32998,8 @@ function AliyunCaptchaModalvue_type_template_id_3f1f3ec9_render(_ctx, _cache, $p
|
|
|
32937
32998
|
// 绑定验证码实例回调函数,该回调会在验证码初始化成功后调用
|
|
32938
32999
|
getInstance: function getInstance(instance) {
|
|
32939
33000
|
try {
|
|
32940
|
-
|
|
32941
|
-
|
|
33001
|
+
_this2.$emit("getInstance", instance);
|
|
33002
|
+
_this2.captcha = instance;
|
|
32942
33003
|
} catch (error) {
|
|
32943
33004
|
console.error('验证码实例绑定失败:', error);
|
|
32944
33005
|
}
|
|
@@ -32948,7 +33009,7 @@ function AliyunCaptchaModalvue_type_template_id_3f1f3ec9_render(_ctx, _cache, $p
|
|
|
32948
33009
|
height: 40
|
|
32949
33010
|
},
|
|
32950
33011
|
// 滑块验证码样式,支持自定义宽度和高度,单位为px。其中,width最小值为320 px
|
|
32951
|
-
language: localStorage.getItem("language") || "cn" // 验证码语言类型,支持简体中文(cn)、繁体中文(tw)、英文(en)
|
|
33012
|
+
language: typeof localStorage !== 'undefined' ? localStorage.getItem("language") || "cn" : "cn" // 验证码语言类型,支持简体中文(cn)、繁体中文(tw)、英文(en)
|
|
32952
33013
|
});
|
|
32953
33014
|
} catch (error) {
|
|
32954
33015
|
console.error('阿里云验证码初始化失败:', error);
|
|
@@ -32964,7 +33025,7 @@ function AliyunCaptchaModalvue_type_template_id_3f1f3ec9_render(_ctx, _cache, $p
|
|
|
32964
33025
|
|
|
32965
33026
|
|
|
32966
33027
|
;
|
|
32967
|
-
const AliyunCaptchaModal_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(AliyunCaptchaModalvue_type_script_lang_js, [['render',
|
|
33028
|
+
const AliyunCaptchaModal_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(AliyunCaptchaModalvue_type_script_lang_js, [['render',AliyunCaptchaModalvue_type_template_id_1572512c_render]])
|
|
32968
33029
|
|
|
32969
33030
|
/* harmony default export */ const AliyunCaptchaModal = (AliyunCaptchaModal_exports_);
|
|
32970
33031
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/verifyComponents.vue?vue&type=script&lang=js
|
|
@@ -33022,9 +33083,10 @@ const AliyunCaptchaModal_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)
|
|
|
33022
33083
|
if (this.type === 'tencent') {
|
|
33023
33084
|
this.$refs.TJCaptcha.getCaptchaAppid();
|
|
33024
33085
|
} else if (this.type === 'alibaba') {
|
|
33025
|
-
if (window.AliyunCaptcha) {
|
|
33086
|
+
if (typeof window.AliyunCaptcha !== 'undefined' && this.$refs.aliyunCaptcha.captcha) {
|
|
33026
33087
|
this.$refs.aliyunCaptcha.captcha.show();
|
|
33027
33088
|
} else {
|
|
33089
|
+
console.warn('阿里云验证码未加载,使用容错处理');
|
|
33028
33090
|
var VerifyParam = {
|
|
33029
33091
|
specialKey: true
|
|
33030
33092
|
};
|
|
@@ -33054,69 +33116,69 @@ const AliyunCaptchaModal_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)
|
|
|
33054
33116
|
|
|
33055
33117
|
|
|
33056
33118
|
;
|
|
33057
|
-
const verifyComponents_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(verifyComponentsvue_type_script_lang_js, [['render',
|
|
33119
|
+
const verifyComponents_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(verifyComponentsvue_type_script_lang_js, [['render',verifyComponentsvue_type_template_id_7d804fae_render]])
|
|
33058
33120
|
|
|
33059
33121
|
/* harmony default export */ const verifyComponents = (verifyComponents_exports_);
|
|
33060
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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=
|
|
33122
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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
|
|
33061
33123
|
|
|
33062
|
-
var
|
|
33124
|
+
var QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_1 = {
|
|
33063
33125
|
"class": "qr-code-wrapper"
|
|
33064
33126
|
};
|
|
33065
|
-
var
|
|
33066
|
-
var
|
|
33127
|
+
var QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_2 = ["id"];
|
|
33128
|
+
var QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_3 = {
|
|
33067
33129
|
key: 0,
|
|
33068
33130
|
"class": "qr-login-overlay"
|
|
33069
33131
|
};
|
|
33070
|
-
var
|
|
33132
|
+
var QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_4 = {
|
|
33071
33133
|
key: 0,
|
|
33072
33134
|
"class": "overlay-content"
|
|
33073
33135
|
};
|
|
33074
|
-
var
|
|
33136
|
+
var QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_5 = {
|
|
33075
33137
|
"class": "overlay-text"
|
|
33076
33138
|
};
|
|
33077
|
-
var
|
|
33139
|
+
var QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_6 = {
|
|
33078
33140
|
"class": "overlay-tip"
|
|
33079
33141
|
};
|
|
33080
|
-
var
|
|
33142
|
+
var QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_7 = {
|
|
33081
33143
|
key: 1,
|
|
33082
33144
|
"class": "overlay-content"
|
|
33083
33145
|
};
|
|
33084
|
-
var
|
|
33146
|
+
var QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_8 = {
|
|
33085
33147
|
"class": "overlay-text",
|
|
33086
33148
|
style: {
|
|
33087
33149
|
"color": "red"
|
|
33088
33150
|
}
|
|
33089
33151
|
};
|
|
33090
|
-
var
|
|
33152
|
+
var QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_9 = {
|
|
33091
33153
|
"class": "overlay-tip"
|
|
33092
33154
|
};
|
|
33093
|
-
var
|
|
33155
|
+
var QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_10 = {
|
|
33094
33156
|
"class": "qr-tip"
|
|
33095
33157
|
};
|
|
33096
|
-
var
|
|
33158
|
+
var QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_11 = {
|
|
33097
33159
|
key: 0,
|
|
33098
33160
|
"class": "bind-tip"
|
|
33099
33161
|
};
|
|
33100
|
-
function
|
|
33162
|
+
function QRCodeLoginvue_type_template_id_6badd114_scoped_true_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
33101
33163
|
return (0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", {
|
|
33102
33164
|
"class": (0,external_commonjs_vue_commonjs2_vue_root_Vue_.normalizeClass)(["qr-login-container", {
|
|
33103
33165
|
'qr-login-container1': $props.bdwxShow
|
|
33104
33166
|
}])
|
|
33105
|
-
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div",
|
|
33106
|
-
id: "qrcode-container-".concat(
|
|
33107
|
-
}, null, 8,
|
|
33167
|
+
}, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_1, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("div", {
|
|
33168
|
+
id: "qrcode-container-".concat($data.uniqueId)
|
|
33169
|
+
}, 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_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_3, [$data.loginStatus == 1 ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_4, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("p", QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_5, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(_ctx.i18n('已扫码')), 1), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("p", QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_6, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(_ctx.i18n('请在手机上确认')), 1), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("button", {
|
|
33108
33170
|
"class": "rescan-btn",
|
|
33109
33171
|
onClick: _cache[0] || (_cache[0] = function () {
|
|
33110
33172
|
return $options.handleRescanQrCode && $options.handleRescanQrCode.apply($options, arguments);
|
|
33111
33173
|
})
|
|
33112
|
-
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(_ctx.i18n('重新扫码')), 1)])) : $data.loginStatus == 3 ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div",
|
|
33174
|
+
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(_ctx.i18n('重新扫码')), 1)])) : $data.loginStatus == 3 ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_7, [(0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("p", QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_8, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(_ctx.i18n('二维码已过期')), 1), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("p", QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_9, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(_ctx.i18n('请点击下方按钮刷新')), 1), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("button", {
|
|
33113
33175
|
"class": "rescan-btn",
|
|
33114
33176
|
onClick: _cache[1] || (_cache[1] = function () {
|
|
33115
33177
|
return $options.handleRescanQrCode && $options.handleRescanQrCode.apply($options, arguments);
|
|
33116
33178
|
})
|
|
33117
|
-
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(_ctx.i18n('重新生成')), 1)])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("p",
|
|
33179
|
+
}, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(_ctx.i18n('重新生成')), 1)])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)])) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementVNode)("p", QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_10, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)($props.bdwxShow ? _ctx.i18n('微信扫码进行账号绑定') : _ctx.i18n('微信或App扫码均可登录')), 1), $data.wxRandom ? ((0,external_commonjs_vue_commonjs2_vue_root_Vue_.openBlock)(), (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createElementBlock)("div", QRCodeLoginvue_type_template_id_6badd114_scoped_true_hoisted_11, (0,external_commonjs_vue_commonjs2_vue_root_Vue_.toDisplayString)(_ctx.i18n('你当前的微信暂未绑定账号或手机号,需先完成绑定,后续登录将无需重复验证,直接进入即可~')), 1)) : (0,external_commonjs_vue_commonjs2_vue_root_Vue_.createCommentVNode)("", true)], 2);
|
|
33118
33180
|
}
|
|
33119
|
-
;// ./src/components/QRCodeLogin.vue?vue&type=template&id=
|
|
33181
|
+
;// ./src/components/QRCodeLogin.vue?vue&type=template&id=6badd114&scoped=true
|
|
33120
33182
|
|
|
33121
33183
|
// EXTERNAL MODULE: ./node_modules/qrcodejs2/qrcode.js
|
|
33122
33184
|
var qrcode = __webpack_require__(9118);
|
|
@@ -33139,6 +33201,11 @@ function removeToken() {
|
|
|
33139
33201
|
|
|
33140
33202
|
|
|
33141
33203
|
|
|
33204
|
+
|
|
33205
|
+
|
|
33206
|
+
|
|
33207
|
+
|
|
33208
|
+
|
|
33142
33209
|
/* harmony default export */ const QRCodeLoginvue_type_script_lang_js = ({
|
|
33143
33210
|
mixins: [i18nMixin],
|
|
33144
33211
|
props: {
|
|
@@ -33159,10 +33226,12 @@ function removeToken() {
|
|
|
33159
33226
|
statusTimer: null,
|
|
33160
33227
|
loginStatus: 0,
|
|
33161
33228
|
// 0-未扫码, 1-已扫码待确认, 2-登录成功, 3-过期
|
|
33162
|
-
wxRandom: ''
|
|
33229
|
+
wxRandom: '',
|
|
33230
|
+
uniqueId: '' // Vue 3 兼容的唯一ID
|
|
33163
33231
|
};
|
|
33164
33232
|
},
|
|
33165
33233
|
mounted: function mounted() {
|
|
33234
|
+
this.uniqueId = 'qr-' + Math.random().toString(36).substr(2, 9);
|
|
33166
33235
|
this.generateQrCode();
|
|
33167
33236
|
},
|
|
33168
33237
|
beforeDestroy: function beforeDestroy() {
|
|
@@ -33192,7 +33261,7 @@ function removeToken() {
|
|
|
33192
33261
|
});
|
|
33193
33262
|
},
|
|
33194
33263
|
generateQRCode: function generateQRCode(url) {
|
|
33195
|
-
var containerId = "qrcode-container-".concat(this.
|
|
33264
|
+
var containerId = "qrcode-container-".concat(this.uniqueId);
|
|
33196
33265
|
document.getElementById(containerId).innerHTML = '';
|
|
33197
33266
|
// 创建新的二维码实例
|
|
33198
33267
|
new (qrcode_default())(document.getElementById(containerId), {
|
|
@@ -33259,10 +33328,10 @@ function removeToken() {
|
|
|
33259
33328
|
});
|
|
33260
33329
|
;// ./src/components/QRCodeLogin.vue?vue&type=script&lang=js
|
|
33261
33330
|
|
|
33262
|
-
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-64.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-64.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-64.use[3]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/QRCodeLogin.vue?vue&type=style&index=0&id=
|
|
33331
|
+
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-64.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-64.use[1]!./node_modules/vue-loader/dist/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-64.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-64.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
|
|
33263
33332
|
// extracted by mini-css-extract-plugin
|
|
33264
33333
|
|
|
33265
|
-
;// ./src/components/QRCodeLogin.vue?vue&type=style&index=0&id=
|
|
33334
|
+
;// ./src/components/QRCodeLogin.vue?vue&type=style&index=0&id=6badd114&lang=scss&scoped=true
|
|
33266
33335
|
|
|
33267
33336
|
;// ./src/components/QRCodeLogin.vue
|
|
33268
33337
|
|
|
@@ -33272,7 +33341,7 @@ function removeToken() {
|
|
|
33272
33341
|
;
|
|
33273
33342
|
|
|
33274
33343
|
|
|
33275
|
-
const QRCodeLogin_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(QRCodeLoginvue_type_script_lang_js, [['render',
|
|
33344
|
+
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"]])
|
|
33276
33345
|
|
|
33277
33346
|
/* harmony default export */ const QRCodeLogin = (QRCodeLogin_exports_);
|
|
33278
33347
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.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
|
|
@@ -35232,12 +35301,42 @@ const userCenterLogin_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(us
|
|
|
35232
35301
|
|
|
35233
35302
|
|
|
35234
35303
|
|
|
35304
|
+
// 预加载验证码脚本(可选,用于提前加载)
|
|
35305
|
+
function loadCaptchaScripts() {
|
|
35306
|
+
// 加载腾讯验证码
|
|
35307
|
+
if (typeof window.TencentCaptcha === 'undefined') {
|
|
35308
|
+
var tencentScript = document.createElement('script');
|
|
35309
|
+
tencentScript.src = 'https://turing.captcha.qcloud.com/TJCaptcha.js';
|
|
35310
|
+
tencentScript.async = true;
|
|
35311
|
+
document.head.appendChild(tencentScript);
|
|
35312
|
+
}
|
|
35313
|
+
|
|
35314
|
+
// 加载阿里云验证码
|
|
35315
|
+
if (typeof window.AliyunCaptcha === 'undefined') {
|
|
35316
|
+
if (!window.AliyunCaptchaConfig) {
|
|
35317
|
+
window.AliyunCaptchaConfig = {
|
|
35318
|
+
region: 'cn',
|
|
35319
|
+
prefix: '106eu7'
|
|
35320
|
+
};
|
|
35321
|
+
}
|
|
35322
|
+
var aliyunScript = document.createElement('script');
|
|
35323
|
+
aliyunScript.src = 'https://o.alicdn.com/captcha-frontend/aliyunCaptcha/AliyunCaptcha.js';
|
|
35324
|
+
aliyunScript.async = true;
|
|
35325
|
+
document.head.appendChild(aliyunScript);
|
|
35326
|
+
}
|
|
35327
|
+
}
|
|
35328
|
+
|
|
35235
35329
|
// 导出组件
|
|
35236
35330
|
|
|
35237
35331
|
|
|
35238
35332
|
// 添加 install 方法以支持 Vue.use()
|
|
35239
35333
|
/* harmony default export */ const index = ({
|
|
35240
35334
|
install: function install(app) {
|
|
35335
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
35336
|
+
// 自动加载验证码脚本(如果未手动禁用)
|
|
35337
|
+
if (options.loadCaptcha !== false) {
|
|
35338
|
+
loadCaptchaScripts();
|
|
35339
|
+
}
|
|
35241
35340
|
app.component("userCenterCompleteInformation", userCenterCompleteInformation);
|
|
35242
35341
|
app.component("userCenterLogin", userCenterLogin);
|
|
35243
35342
|
}
|