前端
This commit is contained in:
parent
93161691a6
commit
e3fbc92511
@ -55,3 +55,10 @@ export function getAccountInfo(query) {
|
||||
params: query
|
||||
})
|
||||
}
|
||||
export function resetPwd(data) {
|
||||
return request({
|
||||
url: '/backendApi/account/resetPwd',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
@ -47,12 +47,33 @@
|
||||
</el-dropdown>
|
||||
</div>
|
||||
|
||||
<el-dialog
|
||||
title="提示"
|
||||
:visible.sync="xg"
|
||||
:modal="false"
|
||||
width="30%"
|
||||
:before-close="handleClose">
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm">
|
||||
<el-form-item label="密码" prop="name">
|
||||
<el-input v-model="ruleForm.password"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="新密码" prop="name">
|
||||
<el-input v-model="ruleForm.passwords"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="xg = false">取 消</el-button>
|
||||
<el-button type="primary" @click="postparssword()">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getAccountInfo ,resetPwd } from '@/api/indexBanner/index'
|
||||
import { mapGetters } from 'vuex'
|
||||
import Breadcrumb from '@/components/Breadcrumb'
|
||||
import TopNav from '@/components/TopNav'
|
||||
@ -66,7 +87,21 @@ import confirmLog from "@/views/coupon/confirmLog/index.vue";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
dialogVisible: false
|
||||
ruleForm: {
|
||||
password:'',
|
||||
passwords:''
|
||||
},
|
||||
rules:{
|
||||
password: [
|
||||
{ required: true, message: '请输入密码', trigger: 'blur' },
|
||||
{ min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
|
||||
],
|
||||
passwords: [
|
||||
{ required: true, message: '请输入新密码', trigger: 'blur' },
|
||||
{ min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
|
||||
],
|
||||
},
|
||||
xg: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@ -112,7 +147,23 @@ export default {
|
||||
},
|
||||
prsswrod(){
|
||||
console.log('方法')
|
||||
this.dialogVisible = false
|
||||
this.xg =! this.xg
|
||||
getAccountInfo().then(res=>{
|
||||
console.log(res)
|
||||
this.accountId = res.data.accountId
|
||||
|
||||
})
|
||||
|
||||
},
|
||||
postparssword(){
|
||||
let data = {
|
||||
accountId : this.accountId,
|
||||
password: this.ruleForm.password,
|
||||
}
|
||||
resetPwd(data).then(res=>{
|
||||
console.log(res)
|
||||
this.xg =! this.xg
|
||||
})
|
||||
|
||||
},
|
||||
toggleSideBar() {
|
||||
|
Loading…
Reference in New Issue
Block a user