22 changed files with 175 additions and 33 deletions
|
Before Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
@ -0,0 +1,47 @@ |
|||||
|
<template> |
||||
|
<div class="edit-password"> |
||||
|
<div class="form-group"> |
||||
|
<label>{{$t('setting.newPassword')}}</label> |
||||
|
<input type="password" required v-model="form.password" class="form-control" :placeholder="$t('setting.enterNewPassword')" /> |
||||
|
</div> |
||||
|
<div class="form-group"> |
||||
|
<label>{{$t('setting.confirmPassword')}}</label> |
||||
|
<input type="password" v-model="form.password_confirmation" required class="form-control" :placeholder="$t('setting.pleaseConfirmPassword')" /> |
||||
|
</div> |
||||
|
<div class="text-center"> |
||||
|
<button type="button" class="btn w-25 btn-secondary" @click="$emit('close')">{{$t('common.cancelBtn')}}</button> |
||||
|
<button type="button" class="btn w-25 btn-primary" @click="setPassword">{{$t('common.confirmBtn')}}</button> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import Member from "@/api/member"; |
||||
|
import Setting from "../../api/setting"; |
||||
|
export default { |
||||
|
props: ["detail"], |
||||
|
data() { |
||||
|
return { |
||||
|
form: { |
||||
|
password: "", |
||||
|
password_confirmation: "" |
||||
|
} |
||||
|
}; |
||||
|
}, |
||||
|
methods: { |
||||
|
setPassword() { |
||||
|
let data = this.form; |
||||
|
if (utils.validate(".edit-password")) { |
||||
|
Setting.withdrawalPassword(data).then(res => { |
||||
|
this.$message.success(this.$t('setting.changeSuccess')); |
||||
|
this.$emit("close"); |
||||
|
}).catch(err => {}); |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
activated() {} |
||||
|
}; |
||||
|
</script> |
||||
|
|
||||
|
<style> |
||||
|
</style> |
||||
Loading…
Reference in new issue