|
|
|
@ -16,6 +16,7 @@
|
|
|
|
|
<el-col :span="24">
|
|
|
|
|
<el-descriptions title="用户信息">
|
|
|
|
|
<el-descriptions-item label="用户名">{{username}} <el-button type="primary" @click="logout" size="mini" round>退出登录</el-button></el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="登录密码" @click="updatePasswordVisible = true">修改</el-descriptions-item>
|
|
|
|
|
</el-descriptions>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
@ -77,6 +78,25 @@
|
|
|
|
|
<el-button @click="payInfoVisible = false">确 定</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<el-dialog title="修改登录密码" :visible.sync="updatePasswordVisible" width="40%">
|
|
|
|
|
<div>
|
|
|
|
|
<el-form ref="updatePasswordForm" :model="updatePasswordForm" label-width="80px">
|
|
|
|
|
<el-form-item label="原密码">
|
|
|
|
|
<el-input show-password v-model="updatePasswordForm.oldPassword"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="密码">
|
|
|
|
|
<el-input show-password v-model="updatePasswordForm.password"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="确认密码">
|
|
|
|
|
<el-input show-password v-model="updatePasswordForm.confirm_password"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</div>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="updatePasswordVisible = false">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="updatePassword">确 定</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</body>
|
|
|
|
|
<!-- import Vue before Element -->
|
|
|
|
@ -90,6 +110,7 @@
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
activeName: 'user',
|
|
|
|
|
updatePasswordVisible: false,
|
|
|
|
|
username: '',
|
|
|
|
|
payForm: {
|
|
|
|
|
amount: 0
|
|
|
|
@ -104,6 +125,11 @@
|
|
|
|
|
apply_no: '',
|
|
|
|
|
is_platform_account: ''
|
|
|
|
|
},
|
|
|
|
|
updatePasswordForm: {
|
|
|
|
|
oldPassword: '',
|
|
|
|
|
password: '',
|
|
|
|
|
confirm_password: ''
|
|
|
|
|
},
|
|
|
|
|
bankCard: {
|
|
|
|
|
id: 0,
|
|
|
|
|
bank_name: '',
|
|
|
|
@ -166,6 +192,26 @@
|
|
|
|
|
});
|
|
|
|
|
console.log('submit!');
|
|
|
|
|
},
|
|
|
|
|
updatePassword() {
|
|
|
|
|
if (this.registerForm.confirm_password != this.registerForm.password) {
|
|
|
|
|
this.$message.error('密码和确认密码不一致');
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
axios.post('/account/update-password', {token: window.sessionStorage.getItem('token'), oldPassword: this.updatePasswordForm.oldPassword, password: this.updatePasswordForm.password})
|
|
|
|
|
.then( (response) => {
|
|
|
|
|
console.log(response);
|
|
|
|
|
let result = response.data
|
|
|
|
|
if (result.code != 1000) {
|
|
|
|
|
return this.$message.error(response.data.message);
|
|
|
|
|
}
|
|
|
|
|
this.$message.success('修改成功');
|
|
|
|
|
})
|
|
|
|
|
.catch((error) => {
|
|
|
|
|
this.$message.error('请求错误');
|
|
|
|
|
console.log(error);
|
|
|
|
|
});
|
|
|
|
|
console.log('submit!');
|
|
|
|
|
},
|
|
|
|
|
resetPayPassword() {
|
|
|
|
|
axios.post('/account/reset-pay-password', {token: window.sessionStorage.getItem('token')})
|
|
|
|
|
.then( (response) => {
|
|
|
|
|