From 1018de002a89754cbd748a4c57a0be02d8999147 Mon Sep 17 00:00:00 2001 From: ROC Date: Fri, 27 May 2022 19:21:23 +0800 Subject: [PATCH] change constant name --- paopao-web/src/views/Setting.vue | 54 ++++++++++++++++---------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/paopao-web/src/views/Setting.vue b/paopao-web/src/views/Setting.vue index 32b5fb34..ad25acef 100644 --- a/paopao-web/src/views/Setting.vue +++ b/paopao-web/src/views/Setting.vue @@ -97,8 +97,8 @@ @@ -106,13 +106,13 @@
@@ -121,7 +121,7 @@ { const validatePasswordStartWith = (rule, value) => { return ( - !!model.password && - model.password.startsWith(value) && - model.password.length >= value.length + !!modelData.password && + modelData.password.startsWith(value) && + modelData.password.length >= value.length ); }; const validatePasswordSame = (rule, value) => { - return value === model.password; + return value === modelData.password; }; const handlePasswordInput = () => { - if (model.reenteredPassword) { + if (modelData.reenteredPassword) { rPasswordFormItemRef.value?.validate({ trigger: 'password-input' }); } }; @@ -349,8 +349,8 @@ const handleValidateButtonClick = (e) => { if (!errors) { passwordSetting.value = true; changePassword({ - password: model.password, - old_password: model.old_password, + password: modelData.password, + old_password: modelData.old_password, }) .then((res) => { passwordSetting.value = false; @@ -375,8 +375,8 @@ const handlePhoneBind = (e) => { if (!errors) { binding.value = true; bindUserPhone({ - phone: model.phone, - captcha: model.phone_captcha, + phone: modelData.phone, + captcha: modelData.phone_captcha, }) .then((res) => { binding.value = false; @@ -385,7 +385,7 @@ const handlePhoneBind = (e) => { store.commit('updateUserinfo', { ...store.state.userInfo, - phone: model.phone, + phone: modelData.phone, }); model = { @@ -406,8 +406,8 @@ const handlePhoneBind = (e) => { const loadCaptcha = () => { getCaptcha() .then((res) => { - model.id = res.id; - model.b64s = res.b64s; + modelData.id = res.id; + modelData.b64s = res.b64s; }) .catch((err) => { console.log(err); @@ -431,15 +431,15 @@ const sendPhoneCaptcha = () => { if (smsCounter.value > 0 && smsDisabled.value) { return; } - if (model.imgCaptcha === '') { + if (modelData.imgCaptcha === '') { window.$message.warning('请输入图片验证码'); return; } sending.value = true; sendCaptcha({ - phone: model.phone, - img_captcha: model.imgCaptcha, - img_captcha_id: model.id, + phone: modelData.phone, + img_captcha: modelData.imgCaptcha, + img_captcha_id: modelData.id, }) .then((res) => { smsDisabled.value = true;