1
This commit is contained in:
parent
40fe2f4811
commit
d169dca894
@ -42,7 +42,7 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
sendText: $t('setPasswork.text8'),
|
sendText: this.$t('setPasswork.text8'),
|
||||||
isSend: false,
|
isSend: false,
|
||||||
model: {
|
model: {
|
||||||
email: '',
|
email: '',
|
||||||
@ -51,10 +51,10 @@
|
|||||||
code: ''
|
code: ''
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
email: {rules:[{required: true,errorMessage: $t('setPasswork.text9')}]},
|
email: {rules:[{required: true,errorMessage: this.$t('setPasswork.text9')}]},
|
||||||
password: {rules:[{required: true,errorMessage: $t('setPasswork.text10')}]},
|
password: {rules:[{required: true,errorMessage: this.$t('setPasswork.text10')}]},
|
||||||
cpassword: {rules:[{required: true,errorMessage: $t('setPasswork.text11')}]},
|
cpassword: {rules:[{required: true,errorMessage: this.$t('setPasswork.text11')}]},
|
||||||
code: {rules:[{required: true,errorMessage: $t('setPasswork.text12')}]},
|
code: {rules:[{required: true,errorMessage: this.$t('setPasswork.text12')}]},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -76,7 +76,7 @@
|
|||||||
sendCode(){
|
sendCode(){
|
||||||
this.isSend = true;
|
this.isSend = true;
|
||||||
if (!this.$base.mailRegular.test(this.model.email)) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
let s = 120;
|
let s = 120;
|
||||||
@ -88,17 +88,17 @@
|
|||||||
}
|
}
|
||||||
this.$http.post('/api/common/captcha', data).then(res => {
|
this.$http.post('/api/common/captcha', data).then(res => {
|
||||||
if(res.code == 0){
|
if(res.code == 0){
|
||||||
uni.showToast({title: $t('setPasswork.text14')});
|
uni.showToast({title: this.$t('setPasswork.text14')});
|
||||||
this.sendText = $t('setPasswork.text15', {par: s});
|
this.sendText = this.$t('setPasswork.text15', {par: s});
|
||||||
let intervalId = setInterval(() => {
|
let intervalId = setInterval(() => {
|
||||||
s = s-1;
|
s = s-1;
|
||||||
if (s == 0) {
|
if (s == 0) {
|
||||||
clearInterval(intervalId);
|
clearInterval(intervalId);
|
||||||
this.isSend = false;
|
this.isSend = false;
|
||||||
this.sendText = $t('setPasswork.text8');
|
this.sendText = this.$t('setPasswork.text8');
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
this.sendText = $t('setPasswork.text15', {par: s});
|
this.sendText = this.$t('setPasswork.text15', {par: s});
|
||||||
}
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
@ -107,15 +107,15 @@
|
|||||||
submit(){
|
submit(){
|
||||||
this.$refs.model.validate().then(res=>{
|
this.$refs.model.validate().then(res=>{
|
||||||
if (!this.$base.mailRegular.test(this.model.email)) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
if (!this.$base.passwordRegular.test(this.model.password)) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
if (this.model.cpassword !== this.model.password) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
this.$http.post('/api/common/resetpwd', {email: this.model.email, newpassword: this.model.password, code: this.model.code}).then(res => {
|
this.$http.post('/api/common/resetpwd', {email: this.model.email, newpassword: this.model.password, code: this.model.code}).then(res => {
|
||||||
|
@ -37,14 +37,14 @@
|
|||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
password:{
|
password:{
|
||||||
rules:[{required: true,errorMessage: $t('setPin.text7')},
|
rules:[{required: true,errorMessage: this.$t('setPin.text7')},
|
||||||
{minLength: 6, maxLength: 6, errorMessage: $t('setPin.text8'), }],
|
{minLength: 6, maxLength: 6, errorMessage: this.$t('setPin.text8'), }],
|
||||||
},
|
},
|
||||||
newpassword: {rules:[{required: true,errorMessage: $t('setPin.text9')},
|
newpassword: {rules:[{required: true,errorMessage: this.$t('setPin.text9')},
|
||||||
{minLength: 6, maxLength: 6, errorMessage: $t('setPin.text10'), }],
|
{minLength: 6, maxLength: 6, errorMessage: this.$t('setPin.text10'), }],
|
||||||
},
|
},
|
||||||
renewpassword:{rules:[{required: true,errorMessage: $t('setPin.text11')},
|
renewpassword:{rules:[{required: true,errorMessage: this.$t('setPin.text11')},
|
||||||
{minLength: 6, maxLength: 6, errorMessage: $t('setPin.text10'), }],
|
{minLength: 6, maxLength: 6, errorMessage: this.$t('setPin.text10'), }],
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -75,7 +75,7 @@
|
|||||||
this.$refs.model.validate().then(res=>{
|
this.$refs.model.validate().then(res=>{
|
||||||
if (this.model.newpassword !== this.model.renewpassword) {
|
if (this.model.newpassword !== this.model.renewpassword) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title:$t('setPin.text12'),
|
title:this.$t('setPin.text12'),
|
||||||
icon:'error'
|
icon:'error'
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
|
@ -66,7 +66,7 @@
|
|||||||
//第一次加载
|
//第一次加载
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: $t('loading')
|
title: this.$t('loading')
|
||||||
});
|
});
|
||||||
if(e.id){
|
if(e.id){
|
||||||
this.id = e.id;
|
this.id = e.id;
|
||||||
|
@ -98,7 +98,7 @@ import detailsVue from './details.vue';
|
|||||||
//第一次加载
|
//第一次加载
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title:$t('loading')
|
title: this.$t('loading')
|
||||||
})
|
})
|
||||||
if(e.id){
|
if(e.id){
|
||||||
getUserInfo(this.$i18n.locale).then(res => {
|
getUserInfo(this.$i18n.locale).then(res => {
|
||||||
|
@ -106,7 +106,7 @@
|
|||||||
//页面显示
|
//页面显示
|
||||||
onShow() {
|
onShow() {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title:$t("loading")
|
title: this.$t("loading")
|
||||||
})
|
})
|
||||||
let data = {
|
let data = {
|
||||||
page: this.par.page,
|
page: this.par.page,
|
||||||
|
@ -110,13 +110,13 @@
|
|||||||
},
|
},
|
||||||
search(){
|
search(){
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title:$t('loading')
|
title: this.$t('loading')
|
||||||
})
|
})
|
||||||
this.getlist();
|
this.getlist();
|
||||||
},
|
},
|
||||||
clear(){
|
clear(){
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title:$t('loading')
|
title: this.$t('loading')
|
||||||
})
|
})
|
||||||
this.getlist();
|
this.getlist();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user