This commit is contained in:
xx 2025-06-07 21:08:06 +08:00
parent 40fe2f4811
commit d169dca894
6 changed files with 25 additions and 25 deletions

View File

@ -42,7 +42,7 @@
export default {
data() {
return {
sendText: $t('setPasswork.text8'),
sendText: this.$t('setPasswork.text8'),
isSend: false,
model: {
email: '',
@ -51,10 +51,10 @@
code: ''
},
rules: {
email: {rules:[{required: true,errorMessage: $t('setPasswork.text9')}]},
password: {rules:[{required: true,errorMessage: $t('setPasswork.text10')}]},
cpassword: {rules:[{required: true,errorMessage: $t('setPasswork.text11')}]},
code: {rules:[{required: true,errorMessage: $t('setPasswork.text12')}]},
email: {rules:[{required: true,errorMessage: this.$t('setPasswork.text9')}]},
password: {rules:[{required: true,errorMessage: this.$t('setPasswork.text10')}]},
cpassword: {rules:[{required: true,errorMessage: this.$t('setPasswork.text11')}]},
code: {rules:[{required: true,errorMessage: this.$t('setPasswork.text12')}]},
}
};
},
@ -76,7 +76,7 @@
sendCode(){
this.isSend = true;
if (!this.$base.mailRegular.test(this.model.email)) {
uni.showToast({title: $t('setPasswork.text13'), icon:'error'});
uni.showToast({title: this.$t('setPasswork.text13'), icon:'error'});
return;
}
let s = 120;
@ -88,17 +88,17 @@
}
this.$http.post('/api/common/captcha', data).then(res => {
if(res.code == 0){
uni.showToast({title: $t('setPasswork.text14')});
this.sendText = $t('setPasswork.text15', {par: s});
uni.showToast({title: this.$t('setPasswork.text14')});
this.sendText = this.$t('setPasswork.text15', {par: s});
let intervalId = setInterval(() => {
s = s-1;
if (s == 0) {
clearInterval(intervalId);
this.isSend = false;
this.sendText = $t('setPasswork.text8');
this.sendText = this.$t('setPasswork.text8');
}
else{
this.sendText = $t('setPasswork.text15', {par: s});
this.sendText = this.$t('setPasswork.text15', {par: s});
}
}, 1000);
}
@ -107,15 +107,15 @@
submit(){
this.$refs.model.validate().then(res=>{
if (!this.$base.mailRegular.test(this.model.email)) {
uni.showToast({title: $t('setPasswork.text13'), icon:'error'});
uni.showToast({title: this.$t('setPasswork.text13'), icon:'error'});
return;
}
if (!this.$base.passwordRegular.test(this.model.password)) {
uni.showToast({title: $t('setPasswork.text16'), icon:'error'});
uni.showToast({title: this.$t('setPasswork.text16'), icon:'error'});
return;
}
if (this.model.cpassword !== this.model.password) {
uni.showToast({title: $t('setPasswork.text17'), icon:'error'});
uni.showToast({title: this.$t('setPasswork.text17'), icon:'error'});
return;
}
this.$http.post('/api/common/resetpwd', {email: this.model.email, newpassword: this.model.password, code: this.model.code}).then(res => {

View File

@ -37,14 +37,14 @@
},
rules: {
password:{
rules:[{required: true,errorMessage: $t('setPin.text7')},
{minLength: 6, maxLength: 6, errorMessage: $t('setPin.text8'), }],
rules:[{required: true,errorMessage: this.$t('setPin.text7')},
{minLength: 6, maxLength: 6, errorMessage: this.$t('setPin.text8'), }],
},
newpassword: {rules:[{required: true,errorMessage: $t('setPin.text9')},
{minLength: 6, maxLength: 6, errorMessage: $t('setPin.text10'), }],
newpassword: {rules:[{required: true,errorMessage: this.$t('setPin.text9')},
{minLength: 6, maxLength: 6, errorMessage: this.$t('setPin.text10'), }],
},
renewpassword:{rules:[{required: true,errorMessage: $t('setPin.text11')},
{minLength: 6, maxLength: 6, errorMessage: $t('setPin.text10'), }],
renewpassword:{rules:[{required: true,errorMessage: this.$t('setPin.text11')},
{minLength: 6, maxLength: 6, errorMessage: this.$t('setPin.text10'), }],
},
}
};
@ -75,7 +75,7 @@
this.$refs.model.validate().then(res=>{
if (this.model.newpassword !== this.model.renewpassword) {
uni.showToast({
title:$t('setPin.text12'),
title:this.$t('setPin.text12'),
icon:'error'
})
return;

View File

@ -66,7 +66,7 @@
//
onLoad(e) {
uni.showLoading({
title: $t('loading')
title: this.$t('loading')
});
if(e.id){
this.id = e.id;

View File

@ -98,7 +98,7 @@ import detailsVue from './details.vue';
//
onLoad(e) {
uni.showLoading({
title:$t('loading')
title: this.$t('loading')
})
if(e.id){
getUserInfo(this.$i18n.locale).then(res => {

View File

@ -106,7 +106,7 @@
//
onShow() {
uni.showLoading({
title:$t("loading")
title: this.$t("loading")
})
let data = {
page: this.par.page,

View File

@ -110,13 +110,13 @@
},
search(){
uni.showLoading({
title:$t('loading')
title: this.$t('loading')
})
this.getlist();
},
clear(){
uni.showLoading({
title:$t('loading')
title: this.$t('loading')
})
this.getlist();
}