icve-sso-vue3 0.0.14 → 0.0.15
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.
|
@@ -34592,7 +34592,7 @@ const agreement_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(agreemen
|
|
|
34592
34592
|
|
|
34593
34593
|
//获取验证类型
|
|
34594
34594
|
function getCaptcha() {
|
|
34595
|
-
return
|
|
34595
|
+
return request({
|
|
34596
34596
|
url: '/v2/user/getCaptcha',
|
|
34597
34597
|
method: 'post'
|
|
34598
34598
|
});
|
|
@@ -34749,8 +34749,8 @@ function login_saveUserInfo(data) {
|
|
|
34749
34749
|
});
|
|
34750
34750
|
}
|
|
34751
34751
|
//获取CaptchaAppid加密
|
|
34752
|
-
function
|
|
34753
|
-
return
|
|
34752
|
+
function getCaptchaAppid() {
|
|
34753
|
+
return request({
|
|
34754
34754
|
url: '/captcha/encrypt',
|
|
34755
34755
|
method: 'post'
|
|
34756
34756
|
});
|
|
@@ -35100,309 +35100,21 @@ function unBindMobile(data) {
|
|
|
35100
35100
|
data: data
|
|
35101
35101
|
});
|
|
35102
35102
|
}
|
|
35103
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/verifyComponents.vue?vue&type=template&id=
|
|
35103
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/verifyComponents.vue?vue&type=template&id=28be0eea
|
|
35104
35104
|
|
|
35105
|
-
var
|
|
35105
|
+
var verifyComponentsvue_type_template_id_28be0eea_hoisted_1 = {
|
|
35106
35106
|
"class": "verify"
|
|
35107
35107
|
};
|
|
35108
|
-
|
|
35109
|
-
|
|
35110
|
-
"class": "aly"
|
|
35111
|
-
};
|
|
35112
|
-
var verifyComponentsvue_type_template_id_7d804fae_hoisted_3 = {
|
|
35113
|
-
id: "clickButton",
|
|
35114
|
-
ref: "clickButton"
|
|
35115
|
-
};
|
|
35116
|
-
function verifyComponentsvue_type_template_id_7d804fae_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
35117
|
-
var _component_TJCaptcha = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.resolveComponent)("TJCaptcha");
|
|
35118
|
-
var _component_AliyunCaptchaModal = (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.resolveComponent)("AliyunCaptchaModal");
|
|
35119
|
-
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, {
|
|
35120
|
-
key: 0,
|
|
35121
|
-
ref: "TJCaptcha",
|
|
35122
|
-
CaptchaAppId: $data.CaptchaAppId,
|
|
35123
|
-
onSuccess: $options.success
|
|
35124
|
-
}, 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, {
|
|
35125
|
-
id: "clickButton",
|
|
35126
|
-
ref: "aliyunCaptcha",
|
|
35127
|
-
sceneId: $data.sceneId,
|
|
35128
|
-
onSuccess: $options.success
|
|
35129
|
-
}, null, 8, ["sceneId", "onSuccess"]), (0,external_commonjs_vue_commonjs2_vue_root_Vue_namespaceObject.createElementVNode)("div", verifyComponentsvue_type_template_id_7d804fae_hoisted_3, null, 512)]))]);
|
|
35130
|
-
}
|
|
35131
|
-
;// ./src/components/verifyComponents.vue?vue&type=template&id=7d804fae
|
|
35132
|
-
|
|
35133
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/TJCaptcha.vue?vue&type=template&id=9e7b3c90
|
|
35134
|
-
|
|
35135
|
-
var TJCaptchavue_type_template_id_9e7b3c90_hoisted_1 = {
|
|
35136
|
-
"class": "TJCaptcha"
|
|
35137
|
-
};
|
|
35138
|
-
function TJCaptchavue_type_template_id_9e7b3c90_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
35139
|
-
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);
|
|
35140
|
-
}
|
|
35141
|
-
;// ./src/components/TJCaptcha.vue?vue&type=template&id=9e7b3c90
|
|
35142
|
-
|
|
35143
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/TJCaptcha.vue?vue&type=script&lang=js
|
|
35144
|
-
|
|
35145
|
-
|
|
35146
|
-
|
|
35147
|
-
|
|
35148
|
-
|
|
35149
|
-
|
|
35150
|
-
/* harmony default export */ const TJCaptchavue_type_script_lang_js = ({
|
|
35151
|
-
name: "TJCaptcha",
|
|
35152
|
-
props: {
|
|
35153
|
-
CaptchaAppId: {
|
|
35154
|
-
type: String,
|
|
35155
|
-
"default": ""
|
|
35156
|
-
}
|
|
35157
|
-
},
|
|
35158
|
-
data: function data() {
|
|
35159
|
-
return {
|
|
35160
|
-
captcha: null,
|
|
35161
|
-
scriptLoaded: false
|
|
35162
|
-
};
|
|
35163
|
-
},
|
|
35164
|
-
mounted: function mounted() {
|
|
35165
|
-
// 动态加载腾讯验证码脚本
|
|
35166
|
-
this.loadTencentCaptchaScript();
|
|
35167
|
-
},
|
|
35168
|
-
methods: {
|
|
35169
|
-
// 动态加载腾讯验证码脚本
|
|
35170
|
-
loadTencentCaptchaScript: function loadTencentCaptchaScript() {
|
|
35171
|
-
var _this = this;
|
|
35172
|
-
if (this.scriptLoaded || typeof window.TencentCaptcha !== 'undefined') {
|
|
35173
|
-
this.scriptLoaded = true;
|
|
35174
|
-
return;
|
|
35175
|
-
}
|
|
35176
|
-
var script = document.createElement('script');
|
|
35177
|
-
script.src = 'https://turing.captcha.qcloud.com/TJCaptcha.js';
|
|
35178
|
-
script.onload = function () {
|
|
35179
|
-
_this.scriptLoaded = true;
|
|
35180
|
-
};
|
|
35181
|
-
script.onerror = function () {
|
|
35182
|
-
console.error('腾讯验证码脚本加载失败');
|
|
35183
|
-
};
|
|
35184
|
-
document.head.appendChild(script);
|
|
35185
|
-
},
|
|
35186
|
-
// 获取验证码加密
|
|
35187
|
-
getCaptchaAppid: function getCaptchaAppid() {
|
|
35188
|
-
var _this2 = this;
|
|
35189
|
-
if (typeof window.TencentCaptcha === 'undefined') {
|
|
35190
|
-
console.warn('腾讯验证码库未加载,使用容错处理');
|
|
35191
|
-
this.loadErrorCallback();
|
|
35192
|
-
return;
|
|
35193
|
-
}
|
|
35194
|
-
login_getCaptchaAppid().then(function (res) {
|
|
35195
|
-
_this2.init(res.data.data);
|
|
35196
|
-
})["catch"](function (error) {
|
|
35197
|
-
console.error('获取验证码AppId失败:', error);
|
|
35198
|
-
_this2.loadErrorCallback();
|
|
35199
|
-
});
|
|
35200
|
-
},
|
|
35201
|
-
init: function init(aidEncrypted) {
|
|
35202
|
-
try {
|
|
35203
|
-
// 检查环境是否支持腾讯验证码
|
|
35204
|
-
if (typeof window.TencentCaptcha === 'undefined') {
|
|
35205
|
-
console.warn('腾讯验证码库未加载,使用容错处理');
|
|
35206
|
-
this.loadErrorCallback();
|
|
35207
|
-
return;
|
|
35208
|
-
}
|
|
35209
|
-
|
|
35210
|
-
// 生成一个验证码对象
|
|
35211
|
-
// CaptchaAppId:登录验证码控制台,从【验证管理】页面进行查看。如果未创建过验证,请先新建验证。注意:不可使用客户端类型为小程序的CaptchaAppId,会导致数据统计错误。
|
|
35212
|
-
// callback:定义的回调函数
|
|
35213
|
-
this.captcha = new window.TencentCaptcha(this.CaptchaAppId, this.callback, {
|
|
35214
|
-
aidEncrypted: aidEncrypted
|
|
35215
|
-
});
|
|
35216
|
-
// 调用方法,显示验证码
|
|
35217
|
-
this.captcha.show();
|
|
35218
|
-
} catch (error) {
|
|
35219
|
-
console.error("验证码初始化失败:", error);
|
|
35220
|
-
// 加载异常,调用验证码js加载错误处理函数
|
|
35221
|
-
this.loadErrorCallback();
|
|
35222
|
-
}
|
|
35223
|
-
},
|
|
35224
|
-
loadErrorCallback: function loadErrorCallback() {
|
|
35225
|
-
var appid = this.CaptchaAppId;
|
|
35226
|
-
// 生成容灾票据或自行做其它处理
|
|
35227
|
-
var ticket = "trerror_1001_" + appid + "_" + Math.floor(new Date().getTime() / 1000);
|
|
35228
|
-
this.callback({
|
|
35229
|
-
ret: 0,
|
|
35230
|
-
randstr: "@" + Math.random().toString(36).substr(2),
|
|
35231
|
-
ticket: ticket,
|
|
35232
|
-
errorCode: 1001,
|
|
35233
|
-
errorMessage: "jsload_error"
|
|
35234
|
-
});
|
|
35235
|
-
},
|
|
35236
|
-
callback: function callback(res) {
|
|
35237
|
-
// randstr
|
|
35238
|
-
if (res.ret == 0) {
|
|
35239
|
-
this.$emit("success", {
|
|
35240
|
-
ticket: res.ticket,
|
|
35241
|
-
randstr: res.randstr
|
|
35242
|
-
});
|
|
35243
|
-
}
|
|
35244
|
-
}
|
|
35245
|
-
}
|
|
35246
|
-
});
|
|
35247
|
-
;// ./src/components/TJCaptcha.vue?vue&type=script&lang=js
|
|
35248
|
-
|
|
35249
|
-
;// ./src/components/TJCaptcha.vue
|
|
35250
|
-
|
|
35251
|
-
|
|
35252
|
-
|
|
35253
|
-
|
|
35254
|
-
;
|
|
35255
|
-
const TJCaptcha_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(TJCaptchavue_type_script_lang_js, [['render',TJCaptchavue_type_template_id_9e7b3c90_render]])
|
|
35256
|
-
|
|
35257
|
-
/* harmony default export */ const TJCaptcha = (TJCaptcha_exports_);
|
|
35258
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/AliyunCaptchaModal.vue?vue&type=template&id=1572512c
|
|
35259
|
-
|
|
35260
|
-
var AliyunCaptchaModalvue_type_template_id_1572512c_hoisted_1 = ["id"];
|
|
35261
|
-
function AliyunCaptchaModalvue_type_template_id_1572512c_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
35262
|
-
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", {
|
|
35263
|
-
id: "captcha-element-".concat($data.uniqueId)
|
|
35264
|
-
}, null, 8, AliyunCaptchaModalvue_type_template_id_1572512c_hoisted_1)]);
|
|
35108
|
+
function verifyComponentsvue_type_template_id_28be0eea_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
35109
|
+
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_28be0eea_hoisted_1);
|
|
35265
35110
|
}
|
|
35266
|
-
;// ./src/components/
|
|
35267
|
-
|
|
35268
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/AliyunCaptchaModal.vue?vue&type=script&lang=js
|
|
35269
|
-
|
|
35270
|
-
|
|
35271
|
-
|
|
35272
|
-
|
|
35273
|
-
|
|
35274
|
-
/* harmony default export */ const AliyunCaptchaModalvue_type_script_lang_js = ({
|
|
35275
|
-
props: {
|
|
35276
|
-
id: {
|
|
35277
|
-
type: String,
|
|
35278
|
-
required: true
|
|
35279
|
-
},
|
|
35280
|
-
sceneId: {
|
|
35281
|
-
type: String,
|
|
35282
|
-
required: true
|
|
35283
|
-
}
|
|
35284
|
-
},
|
|
35285
|
-
data: function data() {
|
|
35286
|
-
return {
|
|
35287
|
-
captcha: null,
|
|
35288
|
-
uniqueId: '',
|
|
35289
|
-
// Vue 3 兼容的唯一ID
|
|
35290
|
-
scriptLoaded: false
|
|
35291
|
-
};
|
|
35292
|
-
},
|
|
35293
|
-
mounted: function mounted() {
|
|
35294
|
-
this.uniqueId = 'captcha-' + Math.random().toString(36).substr(2, 9);
|
|
35295
|
-
try {
|
|
35296
|
-
if (typeof window.initAliyunCaptcha === 'undefined') {
|
|
35297
|
-
console.warn('阿里云验证码库未加载,尝试动态加载');
|
|
35298
|
-
this.loadAliyunCaptchaScript();
|
|
35299
|
-
return;
|
|
35300
|
-
}
|
|
35301
|
-
this.initAliyunCaptcha();
|
|
35302
|
-
} catch (error) {
|
|
35303
|
-
console.error('阿里云验证码初始化失败:', error);
|
|
35304
|
-
}
|
|
35305
|
-
},
|
|
35306
|
-
methods: {
|
|
35307
|
-
// 动态加载阿里云验证码脚本
|
|
35308
|
-
loadAliyunCaptchaScript: function loadAliyunCaptchaScript() {
|
|
35309
|
-
var _this = this;
|
|
35310
|
-
if (this.scriptLoaded) return;
|
|
35311
|
-
|
|
35312
|
-
// 先加载配置
|
|
35313
|
-
if (!window.AliyunCaptchaConfig) {
|
|
35314
|
-
window.AliyunCaptchaConfig = {
|
|
35315
|
-
region: 'cn',
|
|
35316
|
-
prefix: '106eu7'
|
|
35317
|
-
};
|
|
35318
|
-
}
|
|
35319
|
-
var script = document.createElement('script');
|
|
35320
|
-
script.src = 'https://o.alicdn.com/captcha-frontend/aliyunCaptcha/AliyunCaptcha.js';
|
|
35321
|
-
script.onload = function () {
|
|
35322
|
-
_this.scriptLoaded = true;
|
|
35323
|
-
_this.initAliyunCaptcha();
|
|
35324
|
-
};
|
|
35325
|
-
script.onerror = function () {
|
|
35326
|
-
console.error('阿里云验证码脚本加载失败');
|
|
35327
|
-
};
|
|
35328
|
-
document.head.appendChild(script);
|
|
35329
|
-
},
|
|
35330
|
-
initAliyunCaptcha: function initAliyunCaptcha() {
|
|
35331
|
-
var _this2 = this;
|
|
35332
|
-
try {
|
|
35333
|
-
if (typeof window.initAliyunCaptcha === 'undefined') {
|
|
35334
|
-
console.warn('阿里云验证码库未加载,跳过初始化');
|
|
35335
|
-
return;
|
|
35336
|
-
}
|
|
35337
|
-
window.initAliyunCaptcha({
|
|
35338
|
-
SceneId: this.sceneId,
|
|
35339
|
-
// 场景ID。根据步骤二新建验证场景后,您可以在验证码场景列表,获取该场景的场景ID
|
|
35340
|
-
mode: "popup",
|
|
35341
|
-
// 验证码模式。popup表示要集成的验证码模式为弹出式。无需修改
|
|
35342
|
-
element: "#captcha-element-".concat(this.uniqueId),
|
|
35343
|
-
// 页面上预留的渲染验证码的元素,与原代码中预留的页面元素保持一致。
|
|
35344
|
-
button: "#".concat(this.id),
|
|
35345
|
-
captchaLogoImg: "https://file.icve.com.cn/app/site/prod/zyzyzx_components/zhzj_logo.webp",
|
|
35346
|
-
// 验证码验证通过回调函数
|
|
35347
|
-
success: function success(captchaVerifyParam) {
|
|
35348
|
-
try {
|
|
35349
|
-
// 入参为验签captchaVerifyParam
|
|
35350
|
-
// 1.根据校验结果来进行业务处理
|
|
35351
|
-
_this2.$emit("success", captchaVerifyParam);
|
|
35352
|
-
_this2.initAliyunCaptcha();
|
|
35353
|
-
} catch (error) {
|
|
35354
|
-
console.error('验证码成功回调处理失败:', error);
|
|
35355
|
-
}
|
|
35356
|
-
},
|
|
35357
|
-
// 验证码验证不通过回调函数
|
|
35358
|
-
fail: function fail(result) {
|
|
35359
|
-
// 入参为不通过信息
|
|
35360
|
-
// 正常验证有效期内不需要做任何操作,验证码自动刷新,重新进行验证
|
|
35361
|
-
console.error(result);
|
|
35362
|
-
},
|
|
35363
|
-
// 绑定验证码实例回调函数,该回调会在验证码初始化成功后调用
|
|
35364
|
-
getInstance: function getInstance(instance) {
|
|
35365
|
-
try {
|
|
35366
|
-
_this2.$emit("getInstance", instance);
|
|
35367
|
-
_this2.captcha = instance;
|
|
35368
|
-
} catch (error) {
|
|
35369
|
-
console.error('验证码实例绑定失败:', error);
|
|
35370
|
-
}
|
|
35371
|
-
},
|
|
35372
|
-
slideStyle: {
|
|
35373
|
-
width: 360,
|
|
35374
|
-
height: 40
|
|
35375
|
-
},
|
|
35376
|
-
// 滑块验证码样式,支持自定义宽度和高度,单位为px。其中,width最小值为320 px
|
|
35377
|
-
language: typeof localStorage !== 'undefined' ? localStorage.getItem("language") || "cn" : "cn" // 验证码语言类型,支持简体中文(cn)、繁体中文(tw)、英文(en)
|
|
35378
|
-
});
|
|
35379
|
-
} catch (error) {
|
|
35380
|
-
console.error('阿里云验证码初始化失败:', error);
|
|
35381
|
-
}
|
|
35382
|
-
}
|
|
35383
|
-
}
|
|
35384
|
-
});
|
|
35385
|
-
;// ./src/components/AliyunCaptchaModal.vue?vue&type=script&lang=js
|
|
35386
|
-
|
|
35387
|
-
;// ./src/components/AliyunCaptchaModal.vue
|
|
35388
|
-
|
|
35389
|
-
|
|
35111
|
+
;// ./src/components/verifyComponents.vue?vue&type=template&id=28be0eea
|
|
35390
35112
|
|
|
35391
|
-
|
|
35392
|
-
;
|
|
35393
|
-
const AliyunCaptchaModal_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(AliyunCaptchaModalvue_type_script_lang_js, [['render',AliyunCaptchaModalvue_type_template_id_1572512c_render]])
|
|
35394
|
-
|
|
35395
|
-
/* harmony default export */ const AliyunCaptchaModal = (AliyunCaptchaModal_exports_);
|
|
35396
35113
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/verifyComponents.vue?vue&type=script&lang=js
|
|
35397
35114
|
|
|
35398
|
-
|
|
35399
|
-
|
|
35400
35115
|
/* harmony default export */ const verifyComponentsvue_type_script_lang_js = ({
|
|
35401
35116
|
name: 'VerifySlide',
|
|
35402
|
-
components: {
|
|
35403
|
-
TJCaptcha: TJCaptcha,
|
|
35404
|
-
AliyunCaptchaModal: AliyunCaptchaModal
|
|
35405
|
-
},
|
|
35117
|
+
components: {},
|
|
35406
35118
|
data: function data() {
|
|
35407
35119
|
return {
|
|
35408
35120
|
CaptchaAppId: '196632980',
|
|
@@ -35410,65 +35122,6 @@ const AliyunCaptchaModal_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)
|
|
|
35410
35122
|
type: 'alibaba' // tencent 腾讯 alibaba阿里 none无需验证
|
|
35411
35123
|
};
|
|
35412
35124
|
},
|
|
35413
|
-
methods: {
|
|
35414
|
-
//获取验证码类型
|
|
35415
|
-
getType: function getType() {
|
|
35416
|
-
var _this = this;
|
|
35417
|
-
getCaptcha().then(function (res) {
|
|
35418
|
-
_this.type = res.data.data;
|
|
35419
|
-
})["catch"](function (error) {
|
|
35420
|
-
console.warn('获取验证码类型失败,使用默认类型:', error);
|
|
35421
|
-
_this.type = 'alibaba'; // 默认使用阿里云验证码
|
|
35422
|
-
});
|
|
35423
|
-
},
|
|
35424
|
-
// 验证成功
|
|
35425
|
-
success: function success(captchaVerifyParam) {
|
|
35426
|
-
try {
|
|
35427
|
-
if (this.type === 'tencent') {
|
|
35428
|
-
this.$emit('success', captchaVerifyParam);
|
|
35429
|
-
} else {
|
|
35430
|
-
var VerifyParam = captchaVerifyParam ? {
|
|
35431
|
-
captchaVerifyParam: captchaVerifyParam,
|
|
35432
|
-
sceneId: this.sceneId
|
|
35433
|
-
} : {
|
|
35434
|
-
specialKey: true
|
|
35435
|
-
};
|
|
35436
|
-
this.$emit('success', VerifyParam);
|
|
35437
|
-
}
|
|
35438
|
-
} catch (error) {
|
|
35439
|
-
console.error('验证码处理失败:', error);
|
|
35440
|
-
// 发送默认成功参数
|
|
35441
|
-
this.$emit('success', {
|
|
35442
|
-
specialKey: true
|
|
35443
|
-
});
|
|
35444
|
-
}
|
|
35445
|
-
},
|
|
35446
|
-
show: function show() {
|
|
35447
|
-
try {
|
|
35448
|
-
if (this.type === 'tencent') {
|
|
35449
|
-
this.$refs.TJCaptcha.getCaptchaAppid();
|
|
35450
|
-
} else if (this.type === 'alibaba') {
|
|
35451
|
-
if (typeof window.AliyunCaptcha !== 'undefined' && this.$refs.aliyunCaptcha.captcha) {
|
|
35452
|
-
this.$refs.aliyunCaptcha.captcha.show();
|
|
35453
|
-
} else {
|
|
35454
|
-
console.warn('阿里云验证码未加载,使用容错处理');
|
|
35455
|
-
var VerifyParam = {
|
|
35456
|
-
specialKey: true
|
|
35457
|
-
};
|
|
35458
|
-
this.$emit('success', VerifyParam);
|
|
35459
|
-
}
|
|
35460
|
-
} else {
|
|
35461
|
-
this.$emit('success');
|
|
35462
|
-
}
|
|
35463
|
-
} catch (error) {
|
|
35464
|
-
console.error('显示验证码失败:', error);
|
|
35465
|
-
// 容错处理:直接发送成功信号
|
|
35466
|
-
this.$emit('success', {
|
|
35467
|
-
specialKey: true
|
|
35468
|
-
});
|
|
35469
|
-
}
|
|
35470
|
-
}
|
|
35471
|
-
},
|
|
35472
35125
|
created: function created() {
|
|
35473
35126
|
this.getType();
|
|
35474
35127
|
}
|
|
@@ -35481,7 +35134,7 @@ const AliyunCaptchaModal_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)
|
|
|
35481
35134
|
|
|
35482
35135
|
|
|
35483
35136
|
;
|
|
35484
|
-
const verifyComponents_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(verifyComponentsvue_type_script_lang_js, [['render',
|
|
35137
|
+
const verifyComponents_exports_ = /*#__PURE__*/(0,exportHelper/* default */.A)(verifyComponentsvue_type_script_lang_js, [['render',verifyComponentsvue_type_template_id_28be0eea_render]])
|
|
35485
35138
|
|
|
35486
35139
|
/* harmony default export */ const verifyComponents = (verifyComponents_exports_);
|
|
35487
35140
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/cli-service/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/components/QRCodeLogin.vue?vue&type=template&id=6badd114&scoped=true
|