feat: 半屏扫码、改密退出与表格并升至1.1.19
This commit is contained in:
+37
-20
@@ -33,7 +33,7 @@ export default {
|
||||
model: {
|
||||
oldPassword: '',
|
||||
newPassword: '',
|
||||
confirmNewPassword: ''
|
||||
confirmPassword: ''
|
||||
},
|
||||
rules: {
|
||||
oldPassword: [
|
||||
@@ -79,26 +79,27 @@ export default {
|
||||
submit() {
|
||||
this.$refs.uForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.$u.api.user.infoSavePwd({
|
||||
oldPassword: this.model.oldPassword,
|
||||
newPassword: this.model.newPassword
|
||||
}).then(res => {
|
||||
if(res.code == '200'){
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: res.msg,
|
||||
showCancel: false,
|
||||
success: function () {
|
||||
uni.navigateBack();
|
||||
}
|
||||
});
|
||||
}else{
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: res.msg,
|
||||
showCancel: false
|
||||
this.$u.api.updatePassword({
|
||||
old_password: this.model.oldPassword,
|
||||
new_password: this.model.newPassword
|
||||
}).then(() => {
|
||||
const saved = uni.getStorageSync('UserInfo');
|
||||
if (saved && typeof saved === 'object') {
|
||||
uni.setStorageSync('UserInfo', {
|
||||
...saved,
|
||||
password: this.model.newPassword
|
||||
});
|
||||
}
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '密码修改成功',
|
||||
showCancel: false,
|
||||
success: function () {
|
||||
uni.navigateBack();
|
||||
}
|
||||
});
|
||||
}).catch((error) => {
|
||||
console.log('updatePassword error', error);
|
||||
});
|
||||
} else {
|
||||
this.$u.toast('您填写的信息有误,请根据提示修正。');
|
||||
@@ -112,15 +113,31 @@ export default {
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@import '@/common/pda-typography.scss';
|
||||
page{
|
||||
background: #f5f5f5;
|
||||
}
|
||||
.u-form{
|
||||
background: #fff;
|
||||
padding: 0px 15px;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
.remind-text{
|
||||
padding: 20rpx 30rpx;
|
||||
color: #666666;
|
||||
font-size: $pda-font-popup-sub;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.form-footer {
|
||||
padding: 40rpx 30rpx;
|
||||
}
|
||||
::v-deep .u-form-item--left__content__label {
|
||||
font-size: $pda-font-body;
|
||||
}
|
||||
::v-deep .u-input__input {
|
||||
font-size: $pda-font-body;
|
||||
}
|
||||
::v-deep .u-btn {
|
||||
height: $pda-button-height;
|
||||
font-size: $pda-font-button;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user