eoss-ui 0.4.48 → 0.4.49
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/lib/data-table.js +22 -8
- package/lib/eoss-ui.common.js +175 -82
- package/lib/form.js +6 -3
- package/lib/index.js +1 -1
- package/lib/login.js +134 -58
- package/package.json +1 -1
- package/packages/data-table/src/main.vue +18 -2
- package/packages/form/src/main.vue +4 -1
- package/packages/login/src/main.vue +77 -45
- package/src/index.js +1 -1
package/lib/login.js
CHANGED
|
@@ -2815,7 +2815,7 @@ function normalizeComponent(
|
|
|
2815
2815
|
// ESM COMPAT FLAG
|
|
2816
2816
|
__webpack_require__.r(__webpack_exports__);
|
|
2817
2817
|
|
|
2818
|
-
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/login/src/main.vue?vue&type=template&id=
|
|
2818
|
+
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/login/src/main.vue?vue&type=template&id=9885b762&
|
|
2819
2819
|
var render = function () {
|
|
2820
2820
|
var _vm = this
|
|
2821
2821
|
var _h = _vm.$createElement
|
|
@@ -2916,7 +2916,8 @@ var render = function () {
|
|
|
2916
2916
|
"div",
|
|
2917
2917
|
{ staticClass: "es-login-form-box" },
|
|
2918
2918
|
[
|
|
2919
|
-
_vm.isShow(_vm.active) &&
|
|
2919
|
+
_vm.isShow(_vm.active) &&
|
|
2920
|
+
(_vm.active == 0 || _vm.active == 2)
|
|
2920
2921
|
? [
|
|
2921
2922
|
_c(
|
|
2922
2923
|
"el-form",
|
|
@@ -3025,7 +3026,7 @@ var render = function () {
|
|
|
3025
3026
|
],
|
|
3026
3027
|
1
|
|
3027
3028
|
),
|
|
3028
|
-
_vm.imgCode
|
|
3029
|
+
_vm.imgCode || _vm.showVerifyCode
|
|
3029
3030
|
? _c(
|
|
3030
3031
|
"el-form-item",
|
|
3031
3032
|
{
|
|
@@ -3073,20 +3074,66 @@ var render = function () {
|
|
|
3073
3074
|
"es-icon-yanzheng es-label-code-image",
|
|
3074
3075
|
}),
|
|
3075
3076
|
]),
|
|
3076
|
-
_c(
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3077
|
+
_c(
|
|
3078
|
+
"template",
|
|
3079
|
+
{ slot: "suffix" },
|
|
3080
|
+
[
|
|
3081
|
+
_c(
|
|
3082
|
+
"el-button",
|
|
3083
|
+
{
|
|
3084
|
+
directives: [
|
|
3085
|
+
{
|
|
3086
|
+
name: "show",
|
|
3087
|
+
rawName: "v-show",
|
|
3088
|
+
value:
|
|
3089
|
+
_vm.active == 2 &&
|
|
3090
|
+
_vm.showVerifyCode,
|
|
3091
|
+
expression:
|
|
3092
|
+
"active == 2 && showVerifyCode",
|
|
3093
|
+
},
|
|
3094
|
+
],
|
|
3095
|
+
staticClass: "es-get-code",
|
|
3096
|
+
attrs: {
|
|
3097
|
+
type: "primary",
|
|
3098
|
+
disabled: _vm.disabled,
|
|
3099
|
+
},
|
|
3100
|
+
on: {
|
|
3101
|
+
click: function ($event) {
|
|
3102
|
+
$event.stopPropagation()
|
|
3103
|
+
return _vm.getCode(
|
|
3104
|
+
$event
|
|
3105
|
+
)
|
|
3106
|
+
},
|
|
3107
|
+
},
|
|
3086
3108
|
},
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3109
|
+
[_vm._v(_vm._s(_vm.btnText))]
|
|
3110
|
+
),
|
|
3111
|
+
_c("img", {
|
|
3112
|
+
directives: [
|
|
3113
|
+
{
|
|
3114
|
+
name: "show",
|
|
3115
|
+
rawName: "v-show",
|
|
3116
|
+
value:
|
|
3117
|
+
_vm.imgCode &&
|
|
3118
|
+
_vm.active == 0,
|
|
3119
|
+
expression:
|
|
3120
|
+
"imgCode && active == 0",
|
|
3121
|
+
},
|
|
3122
|
+
],
|
|
3123
|
+
staticClass: "es-img-code",
|
|
3124
|
+
attrs: { src: _vm.imageCode },
|
|
3125
|
+
on: {
|
|
3126
|
+
click: function ($event) {
|
|
3127
|
+
$event.stopPropagation()
|
|
3128
|
+
return _vm.getImgCode(
|
|
3129
|
+
$event
|
|
3130
|
+
)
|
|
3131
|
+
},
|
|
3132
|
+
},
|
|
3133
|
+
}),
|
|
3134
|
+
],
|
|
3135
|
+
1
|
|
3136
|
+
),
|
|
3090
3137
|
],
|
|
3091
3138
|
2
|
|
3092
3139
|
),
|
|
@@ -3617,7 +3664,7 @@ var staticRenderFns = []
|
|
|
3617
3664
|
render._withStripped = true
|
|
3618
3665
|
|
|
3619
3666
|
|
|
3620
|
-
// CONCATENATED MODULE: ./packages/login/src/main.vue?vue&type=template&id=
|
|
3667
|
+
// CONCATENATED MODULE: ./packages/login/src/main.vue?vue&type=template&id=9885b762&
|
|
3621
3668
|
|
|
3622
3669
|
// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/login/src/resetPassword.vue?vue&type=template&id=4f5da52e&
|
|
3623
3670
|
var resetPasswordvue_type_template_id_4f5da52e_render = function () {
|
|
@@ -4337,6 +4384,15 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
|
|
|
4337
4384
|
//
|
|
4338
4385
|
//
|
|
4339
4386
|
//
|
|
4387
|
+
//
|
|
4388
|
+
//
|
|
4389
|
+
//
|
|
4390
|
+
//
|
|
4391
|
+
//
|
|
4392
|
+
//
|
|
4393
|
+
//
|
|
4394
|
+
//
|
|
4395
|
+
//
|
|
4340
4396
|
|
|
4341
4397
|
|
|
4342
4398
|
|
|
@@ -4570,6 +4626,7 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
|
|
|
4570
4626
|
return types.length > 2 ? {
|
|
4571
4627
|
0: { type: '0', icon: 'es-icon-shuru', name: '账号登录' },
|
|
4572
4628
|
1: { type: '1', icon: 'es-icon-usb-key', name: '证书登录' },
|
|
4629
|
+
2: { type: '2', icon: 'es-icon-shuru', name: '账号登录' },
|
|
4573
4630
|
3: { type: '3', icon: 'es-icon-saoma', name: '扫码登录' },
|
|
4574
4631
|
6: { type: '6', icon: 'es-icon-duanxin', name: '短信登录' },
|
|
4575
4632
|
7: { type: '7', icon: 'es-icon-dingding', name: '钉钉扫码登录' },
|
|
@@ -4578,6 +4635,7 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
|
|
|
4578
4635
|
} : {
|
|
4579
4636
|
0: { type: '0', icon: 'es-icon-jianpan', name: '账号登录' },
|
|
4580
4637
|
1: { type: '1', icon: 'es-icon-ca', name: '证书登录' },
|
|
4638
|
+
2: { type: '2', icon: 'es-icon-jianpan', name: '账号登录' },
|
|
4581
4639
|
3: { type: '3', icon: 'es-icon-qrcode', name: '扫码登录' },
|
|
4582
4640
|
6: { type: '6', icon: 'es-icon-duanxin', name: '短信登录' },
|
|
4583
4641
|
7: { type: '7', icon: 'es-icon-dingding', name: '钉钉扫码登录' },
|
|
@@ -4604,6 +4662,9 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
|
|
|
4604
4662
|
this.copyrightBgColor && (style['background-color'] = this.copyrightBgColor);
|
|
4605
4663
|
this.copyrightColor && (style['color'] = this.copyrightColor);
|
|
4606
4664
|
return mainvue_type_script_lang_js_extends({}, this.copyrightStyle, style);
|
|
4665
|
+
},
|
|
4666
|
+
showVerifyCode: function showVerifyCode() {
|
|
4667
|
+
return this.passModifyModel.indexOf('6') > -1 || this.passModifyModel.indexOf('11') > -1;
|
|
4607
4668
|
}
|
|
4608
4669
|
},
|
|
4609
4670
|
watch: {
|
|
@@ -4839,6 +4900,7 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
|
|
|
4839
4900
|
this.active = res;
|
|
4840
4901
|
this.formData = JSON.parse(JSON.stringify(this.defaultModel));
|
|
4841
4902
|
}
|
|
4903
|
+
this.countdown = 0;
|
|
4842
4904
|
this.$emit('change-type', res, this.identifyingId);
|
|
4843
4905
|
},
|
|
4844
4906
|
isShow: function isShow(res) {
|
|
@@ -4938,58 +5000,72 @@ var mainvue_type_script_lang_js_extends = Object.assign || function (target) { f
|
|
|
4938
5000
|
if (this.countdown) {
|
|
4939
5001
|
return false;
|
|
4940
5002
|
}
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
5003
|
+
var data = {};
|
|
5004
|
+
var flag = false;
|
|
5005
|
+
if (this.active == 2) {
|
|
5006
|
+
if (!this.formData.username) {
|
|
5007
|
+
this.$refs.login.validateField('username');
|
|
5008
|
+
return false;
|
|
5009
|
+
}
|
|
5010
|
+
this.$refs.login.validateField('username', function (res) {
|
|
5011
|
+
flag = res != '';
|
|
5012
|
+
});
|
|
5013
|
+
if (flag) {
|
|
5014
|
+
return false;
|
|
5015
|
+
}
|
|
5016
|
+
data = {
|
|
5017
|
+
target: this.formData.username,
|
|
5018
|
+
targetType: this.passModifyModel.indexOf('11') > -1 ? 'EMAIL' : 'SMS'
|
|
5019
|
+
};
|
|
4944
5020
|
} else {
|
|
4945
|
-
|
|
5021
|
+
if (!this.formData.target) {
|
|
5022
|
+
this.$refs.login.validateField('target');
|
|
5023
|
+
return false;
|
|
5024
|
+
}
|
|
4946
5025
|
this.$refs.login.validateField('target', function (res) {
|
|
4947
5026
|
flag = res != '';
|
|
4948
5027
|
});
|
|
4949
5028
|
if (flag) {
|
|
4950
5029
|
return false;
|
|
4951
5030
|
}
|
|
4952
|
-
|
|
5031
|
+
data = {
|
|
4953
5032
|
target: this.formData.target,
|
|
4954
5033
|
targetType: this.active == '6' ? 'SMS' : 'EMAIL'
|
|
4955
5034
|
};
|
|
4956
|
-
this.countdown = 60;
|
|
4957
|
-
this.timer = setInterval(function () {
|
|
4958
|
-
if (_this4.countdown > 0) {
|
|
4959
|
-
_this4.countdown--;
|
|
4960
|
-
_this4.disabled = true;
|
|
4961
|
-
_this4.btnText = '重新获取' + _this4.countdown + 's';
|
|
4962
|
-
} else {
|
|
4963
|
-
_this4.btnText = '重新获取';
|
|
4964
|
-
_this4.disabled = false;
|
|
4965
|
-
}
|
|
4966
|
-
}, 1000);
|
|
4967
|
-
util["a" /* default */].ajax({
|
|
4968
|
-
method: 'post',
|
|
4969
|
-
url: this.getLoginCode,
|
|
4970
|
-
data: data
|
|
4971
|
-
}).then(function (res) {
|
|
4972
|
-
_this4.$message({
|
|
4973
|
-
message: res.msg,
|
|
4974
|
-
duration: 2000,
|
|
4975
|
-
type: res.rCode == 0 ? 'success' : 'error'
|
|
4976
|
-
});
|
|
4977
|
-
|
|
4978
|
-
if (res.rCode === 2) {
|
|
4979
|
-
_this4.btnText = '获取验证码';
|
|
4980
|
-
_this4.disabled = false;
|
|
4981
|
-
_this4.countdown = 0;
|
|
4982
|
-
clearInterval(_this4.timer);
|
|
4983
|
-
}
|
|
4984
|
-
// if (res.rCode) {
|
|
4985
|
-
// clearInterval(this.timer);
|
|
4986
|
-
// }
|
|
4987
|
-
}).catch(function (err) {
|
|
4988
|
-
if (err.message && err.message !== 'canceled') {
|
|
4989
|
-
_this4.$message.error(err.message);
|
|
4990
|
-
}
|
|
4991
|
-
});
|
|
4992
5035
|
}
|
|
5036
|
+
this.countdown = 60;
|
|
5037
|
+
this.timer = setInterval(function () {
|
|
5038
|
+
if (_this4.countdown > 0) {
|
|
5039
|
+
_this4.countdown--;
|
|
5040
|
+
_this4.disabled = true;
|
|
5041
|
+
_this4.btnText = '重新获取' + _this4.countdown + 's';
|
|
5042
|
+
} else {
|
|
5043
|
+
_this4.btnText = '重新获取';
|
|
5044
|
+
_this4.disabled = false;
|
|
5045
|
+
}
|
|
5046
|
+
}, 1000);
|
|
5047
|
+
util["a" /* default */].ajax({
|
|
5048
|
+
method: 'post',
|
|
5049
|
+
url: this.getLoginCode,
|
|
5050
|
+
data: data
|
|
5051
|
+
}).then(function (res) {
|
|
5052
|
+
_this4.$message({
|
|
5053
|
+
message: res.msg,
|
|
5054
|
+
duration: 2000,
|
|
5055
|
+
type: res.rCode == 0 ? 'success' : 'error'
|
|
5056
|
+
});
|
|
5057
|
+
|
|
5058
|
+
if (res.rCode === 2) {
|
|
5059
|
+
_this4.btnText = '获取验证码';
|
|
5060
|
+
_this4.disabled = false;
|
|
5061
|
+
_this4.countdown = 0;
|
|
5062
|
+
clearInterval(_this4.timer);
|
|
5063
|
+
}
|
|
5064
|
+
}).catch(function (err) {
|
|
5065
|
+
if (err.message && err.message !== 'canceled') {
|
|
5066
|
+
_this4.$message.error(err.message);
|
|
5067
|
+
}
|
|
5068
|
+
});
|
|
4993
5069
|
},
|
|
4994
5070
|
handleLogin: function handleLogin() {
|
|
4995
5071
|
var _this5 = this;
|
package/package.json
CHANGED
|
@@ -301,6 +301,10 @@ export default {
|
|
|
301
301
|
type: [Boolean, Array],
|
|
302
302
|
default: false
|
|
303
303
|
},
|
|
304
|
+
checkedKey: {
|
|
305
|
+
type: String,
|
|
306
|
+
default: 'id'
|
|
307
|
+
},
|
|
304
308
|
sizer: {
|
|
305
309
|
type: Boolean,
|
|
306
310
|
default: true
|
|
@@ -389,7 +393,10 @@ export default {
|
|
|
389
393
|
},
|
|
390
394
|
checkboxParseData: Function,
|
|
391
395
|
checkboxParse: Object,
|
|
392
|
-
display:
|
|
396
|
+
display: {
|
|
397
|
+
type: Boolean,
|
|
398
|
+
default: true
|
|
399
|
+
},
|
|
393
400
|
showFormBtn: {
|
|
394
401
|
type: Boolean,
|
|
395
402
|
default: true
|
|
@@ -585,6 +592,7 @@ export default {
|
|
|
585
592
|
methods: {
|
|
586
593
|
getIcon(res) {
|
|
587
594
|
if (
|
|
595
|
+
this.sizer &&
|
|
588
596
|
this.icon &&
|
|
589
597
|
res !== 'right' &&
|
|
590
598
|
!this.$slots.prepend &&
|
|
@@ -692,7 +700,15 @@ export default {
|
|
|
692
700
|
if (!this.isFirsetCheck && newVal) {
|
|
693
701
|
if (util.getObjectType(newVal) === 'array') {
|
|
694
702
|
newVal.forEach((row) => {
|
|
695
|
-
|
|
703
|
+
if (util.isObject(row)) {
|
|
704
|
+
this.$refs.oaTable.toggleRowSelection(row, true);
|
|
705
|
+
} else
|
|
706
|
+
this.datas.forEach((item) => {
|
|
707
|
+
if (item[this.checkedKey] === row) {
|
|
708
|
+
this.$refs.oaTable.toggleRowSelection(item, true);
|
|
709
|
+
return;
|
|
710
|
+
}
|
|
711
|
+
});
|
|
696
712
|
});
|
|
697
713
|
} else if (newVal === true) {
|
|
698
714
|
this.toggleAllSelection();
|
|
@@ -3719,7 +3719,10 @@ export default {
|
|
|
3719
3719
|
formatTable: Object,
|
|
3720
3720
|
full: Boolean,
|
|
3721
3721
|
within: [String, Object],
|
|
3722
|
-
display:
|
|
3722
|
+
display: {
|
|
3723
|
+
type: Boolean,
|
|
3724
|
+
default: true
|
|
3725
|
+
},
|
|
3723
3726
|
submitLoading: {
|
|
3724
3727
|
type: Boolean,
|
|
3725
3728
|
default: true
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
></i>
|
|
46
46
|
</div>
|
|
47
47
|
<div class="es-login-form-box">
|
|
48
|
-
<template v-if="isShow(active) && active == 0">
|
|
48
|
+
<template v-if="isShow(active) && (active == 0 || active == 2)">
|
|
49
49
|
<el-form ref="login" class="es-login-form" :model="formData">
|
|
50
50
|
<div class="es-login-title">
|
|
51
51
|
<span class="es-login-title-content">{{ title }}</span>
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
size="large"
|
|
93
93
|
prop="identifyingCode"
|
|
94
94
|
:rules="[{ required: true, message: '验证码不能为空' }]"
|
|
95
|
-
v-if="imgCode"
|
|
95
|
+
v-if="imgCode || showVerifyCode"
|
|
96
96
|
>
|
|
97
97
|
<el-input
|
|
98
98
|
size="large"
|
|
@@ -107,7 +107,16 @@
|
|
|
107
107
|
<i class="es-icon-yanzheng es-label-code-image"></i>
|
|
108
108
|
</template>
|
|
109
109
|
<template slot="suffix">
|
|
110
|
+
<el-button
|
|
111
|
+
class="es-get-code"
|
|
112
|
+
type="primary"
|
|
113
|
+
v-show="active == 2 && showVerifyCode"
|
|
114
|
+
:disabled="disabled"
|
|
115
|
+
@click.stop="getCode"
|
|
116
|
+
>{{ btnText }}</el-button
|
|
117
|
+
>
|
|
110
118
|
<img
|
|
119
|
+
v-show="imgCode && active == 0"
|
|
111
120
|
class="es-img-code"
|
|
112
121
|
:src="imageCode"
|
|
113
122
|
@click.stop="getImgCode"
|
|
@@ -563,6 +572,7 @@ export default {
|
|
|
563
572
|
? {
|
|
564
573
|
0: { type: '0', icon: 'es-icon-shuru', name: '账号登录' },
|
|
565
574
|
1: { type: '1', icon: 'es-icon-usb-key', name: '证书登录' },
|
|
575
|
+
2: { type: '2', icon: 'es-icon-shuru', name: '账号登录' },
|
|
566
576
|
3: { type: '3', icon: 'es-icon-saoma', name: '扫码登录' },
|
|
567
577
|
6: { type: '6', icon: 'es-icon-duanxin', name: '短信登录' },
|
|
568
578
|
7: { type: '7', icon: 'es-icon-dingding', name: '钉钉扫码登录' },
|
|
@@ -572,6 +582,7 @@ export default {
|
|
|
572
582
|
: {
|
|
573
583
|
0: { type: '0', icon: 'es-icon-jianpan', name: '账号登录' },
|
|
574
584
|
1: { type: '1', icon: 'es-icon-ca', name: '证书登录' },
|
|
585
|
+
2: { type: '2', icon: 'es-icon-jianpan', name: '账号登录' },
|
|
575
586
|
3: { type: '3', icon: 'es-icon-qrcode', name: '扫码登录' },
|
|
576
587
|
6: { type: '6', icon: 'es-icon-duanxin', name: '短信登录' },
|
|
577
588
|
7: { type: '7', icon: 'es-icon-dingding', name: '钉钉扫码登录' },
|
|
@@ -597,6 +608,12 @@ export default {
|
|
|
597
608
|
(style['background-color'] = this.copyrightBgColor);
|
|
598
609
|
this.copyrightColor && (style['color'] = this.copyrightColor);
|
|
599
610
|
return { ...this.copyrightStyle, ...style };
|
|
611
|
+
},
|
|
612
|
+
showVerifyCode() {
|
|
613
|
+
return (
|
|
614
|
+
this.passModifyModel.indexOf('6') > -1 ||
|
|
615
|
+
this.passModifyModel.indexOf('11') > -1
|
|
616
|
+
);
|
|
600
617
|
}
|
|
601
618
|
},
|
|
602
619
|
watch: {
|
|
@@ -833,6 +850,7 @@ export default {
|
|
|
833
850
|
this.active = res;
|
|
834
851
|
this.formData = JSON.parse(JSON.stringify(this.defaultModel));
|
|
835
852
|
}
|
|
853
|
+
this.countdown = 0;
|
|
836
854
|
this.$emit('change-type', res, this.identifyingId);
|
|
837
855
|
},
|
|
838
856
|
isShow(res) {
|
|
@@ -947,61 +965,75 @@ export default {
|
|
|
947
965
|
if (this.countdown) {
|
|
948
966
|
return false;
|
|
949
967
|
}
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
968
|
+
let data = {};
|
|
969
|
+
let flag = false;
|
|
970
|
+
if (this.active == 2) {
|
|
971
|
+
if (!this.formData.username) {
|
|
972
|
+
this.$refs.login.validateField('username');
|
|
973
|
+
return false;
|
|
974
|
+
}
|
|
975
|
+
this.$refs.login.validateField('username', (res) => {
|
|
976
|
+
flag = res != '';
|
|
977
|
+
});
|
|
978
|
+
if (flag) {
|
|
979
|
+
return false;
|
|
980
|
+
}
|
|
981
|
+
data = {
|
|
982
|
+
target: this.formData.username,
|
|
983
|
+
targetType: this.passModifyModel.indexOf('11') > -1 ? 'EMAIL' : 'SMS'
|
|
984
|
+
};
|
|
953
985
|
} else {
|
|
954
|
-
|
|
986
|
+
if (!this.formData.target) {
|
|
987
|
+
this.$refs.login.validateField('target');
|
|
988
|
+
return false;
|
|
989
|
+
}
|
|
955
990
|
this.$refs.login.validateField('target', (res) => {
|
|
956
991
|
flag = res != '';
|
|
957
992
|
});
|
|
958
993
|
if (flag) {
|
|
959
994
|
return false;
|
|
960
995
|
}
|
|
961
|
-
|
|
996
|
+
data = {
|
|
962
997
|
target: this.formData.target,
|
|
963
998
|
targetType: this.active == '6' ? 'SMS' : 'EMAIL'
|
|
964
999
|
};
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
1000
|
+
}
|
|
1001
|
+
this.countdown = 60;
|
|
1002
|
+
this.timer = setInterval(() => {
|
|
1003
|
+
if (this.countdown > 0) {
|
|
1004
|
+
this.countdown--;
|
|
1005
|
+
this.disabled = true;
|
|
1006
|
+
this.btnText = '重新获取' + this.countdown + 's';
|
|
1007
|
+
} else {
|
|
1008
|
+
this.btnText = '重新获取';
|
|
1009
|
+
this.disabled = false;
|
|
1010
|
+
}
|
|
1011
|
+
}, 1000);
|
|
1012
|
+
util
|
|
1013
|
+
.ajax({
|
|
1014
|
+
method: 'post',
|
|
1015
|
+
url: this.getLoginCode,
|
|
1016
|
+
data: data
|
|
1017
|
+
})
|
|
1018
|
+
.then((res) => {
|
|
1019
|
+
this.$message({
|
|
1020
|
+
message: res.msg,
|
|
1021
|
+
duration: 2000,
|
|
1022
|
+
type: res.rCode == 0 ? 'success' : 'error'
|
|
1023
|
+
});
|
|
1024
|
+
|
|
1025
|
+
if (res.rCode === 2) {
|
|
1026
|
+
this.btnText = '获取验证码';
|
|
973
1027
|
this.disabled = false;
|
|
1028
|
+
this.countdown = 0;
|
|
1029
|
+
clearInterval(this.timer);
|
|
974
1030
|
}
|
|
975
|
-
}
|
|
976
|
-
|
|
977
|
-
.
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
})
|
|
982
|
-
.then((res) => {
|
|
983
|
-
this.$message({
|
|
984
|
-
message: res.msg,
|
|
985
|
-
duration: 2000,
|
|
986
|
-
type: res.rCode == 0 ? 'success' : 'error'
|
|
987
|
-
});
|
|
988
|
-
|
|
989
|
-
if (res.rCode === 2) {
|
|
990
|
-
this.btnText = '获取验证码';
|
|
991
|
-
this.disabled = false;
|
|
992
|
-
this.countdown = 0;
|
|
993
|
-
clearInterval(this.timer);
|
|
994
|
-
}
|
|
995
|
-
// if (res.rCode) {
|
|
996
|
-
// clearInterval(this.timer);
|
|
997
|
-
// }
|
|
998
|
-
})
|
|
999
|
-
.catch((err) => {
|
|
1000
|
-
if (err.message && err.message !== 'canceled') {
|
|
1001
|
-
this.$message.error(err.message);
|
|
1002
|
-
}
|
|
1003
|
-
});
|
|
1004
|
-
}
|
|
1031
|
+
})
|
|
1032
|
+
.catch((err) => {
|
|
1033
|
+
if (err.message && err.message !== 'canceled') {
|
|
1034
|
+
this.$message.error(err.message);
|
|
1035
|
+
}
|
|
1036
|
+
});
|
|
1005
1037
|
},
|
|
1006
1038
|
handleLogin() {
|
|
1007
1039
|
if (this.submit) {
|