修改密码优化,固定 Header 样式修复

This commit is contained in:
Elune
2019-07-11 14:27:40 +08:00
parent a7e22ced51
commit d368bf5b64
4 changed files with 18 additions and 23 deletions

View File

@@ -23,9 +23,10 @@ export function edit(data) {
}) })
} }
export function updatePass(password) { export function updatePass(user) {
const data = { const data = {
password oldPass: user.oldPass,
newPass: user.newPass
} }
return request({ return request({
url: 'api/users/updatePass/', url: 'api/users/updatePass/',

View File

@@ -1,26 +1,21 @@
<template> <template>
<div> <section class="app-main">
<section class="app-main"> <transition name="fade-transform" mode="out-in">
<!--<CodeFund />--> <keep-alive :include="cachedViews">
<transition name="fade-transform" mode="out-in"> <router-view :key="key"/>
<keep-alive :include="cachedViews"> </keep-alive>
<router-view :key="key"/> </transition>
</keep-alive>
</transition>
</section>
<div v-if="$store.state.settings.showFooter" id="el-main-footer"> <div v-if="$store.state.settings.showFooter" id="el-main-footer">
<span v-html="$store.state.settings.footerTxt"/> <span v-html="$store.state.settings.footerTxt"/>
<span> </span> <span> </span>
<a href="http://www.beian.miit.gov.cn" target="_blank">{{ $store.state.settings.caseNumber }}</a> <a href="http://www.beian.miit.gov.cn" target="_blank">{{ $store.state.settings.caseNumber }}</a>
</div> </div>
</div> </section>
</template> </template>
<script> <script>
// import CodeFund from '@/components/CodeFund'
export default { export default {
name: 'AppMain', name: 'AppMain',
// components: { CodeFund },
computed: { computed: {
cachedViews() { cachedViews() {
return this.$store.state.tagsView.cachedViews return this.$store.state.tagsView.cachedViews
@@ -39,7 +34,6 @@ export default {
min-height: calc(100vh - 84px); min-height: calc(100vh - 84px);
width: 100%; width: 100%;
position: relative; position: relative;
padding-bottom: 18px;
overflow: hidden; overflow: hidden;
} }
@@ -48,13 +42,13 @@ export default {
} }
.hasTagsView { .hasTagsView {
.app-main { .app-main {
min-height: calc(100vh - 84px); min-height: calc(100vh - 84px);
} }
.fixed-header+.app-main { .fixed-header+.app-main {
padding-top: 85px; padding-top: 85px;
} }
} }
</style> </style>

View File

@@ -155,7 +155,7 @@ a:hover {
overflow: hidden; overflow: hidden;
padding: 10px 6px 0px 6px; padding: 10px 6px 0px 6px;
height: 33px; height: 33px;
font-size: 0.5rem !important; font-size: 0.7rem !important;
color: #7a8b9a; color: #7a8b9a;
letter-spacing: 0.8px; letter-spacing: 0.8px;
font-family: Arial, sans-serif !important; font-family: Arial, sans-serif !important;

View File

@@ -60,7 +60,7 @@ export default {
this.$refs['form'].validate((valid) => { this.$refs['form'].validate((valid) => {
if (valid) { if (valid) {
this.loading = true this.loading = true
updatePass(this.form.confirmPass).then(res => { updatePass(this.form).then(res => {
this.resetForm() this.resetForm()
this.$notify({ this.$notify({
title: '密码修改成功,请重新登录', title: '密码修改成功,请重新登录',