yujialong 2 years ago
parent 1f731bf524
commit e574a488b2
  1. 3
      src/layouts/navbar/index.vue
  2. 3
      src/pages/account/login/index.vue
  3. 9
      src/pages/article/add/index.vue
  4. 4
      src/pages/article/list/index.vue
  5. 2
      src/pages/column/page/application.vue
  6. 3
      src/pages/column/page/home.vue
  7. 20
      src/pages/setting/list/index.vue
  8. 3
      src/pages/setting/list/info.vue
  9. 4
      src/styles/common.scss
  10. BIN
      src/styles/font/SF-Pro-Display-Bold.otf
  11. BIN
      src/styles/font/SF-Pro-Display-Regular.otf
  12. 5
      src/styles/page/page.scss

@ -7,6 +7,7 @@
</div> </div>
<el-menu <el-menu
:default-active="active" :default-active="active"
:default-openeds="['user']"
background-color="#001529" background-color="#001529"
text-color="#fff" text-color="#fff"
active-text-color="#fff" active-text-color="#fff"
@ -97,7 +98,7 @@ export default {
site: this.$store.state.content.site, site: this.$store.state.content.site,
collapse: false, collapse: false,
active: this.$route.path, active: this.$route.path,
siteActive: '/page', siteActive: '/column',
menus: [], menus: [],
defaultMenus: [ defaultMenus: [
{ {

@ -66,7 +66,7 @@ export default {
}, },
methods: { methods: {
...mapMutations('user', [ ...mapMutations('user', [
'setUserId', 'setUserName' 'setUserId', 'setUserName', 'setAvatar'
]), ]),
// //
getVerImg() { getVerImg() {
@ -80,6 +80,7 @@ export default {
util.successMsg('登录成功') util.successMsg('登录成功')
this.setUserId(data.id || 1) this.setUserId(data.id || 1)
this.setUserName(data.username) this.setUserName(data.username)
this.setAvatar(data.userAvatars)
this.$router.push('/site') this.$router.push('/site')
}).catch(res => { }).catch(res => {
this.getVerImg() this.getVerImg()

@ -73,7 +73,7 @@
placeholder="请输入作者" placeholder="请输入作者"
v-model.trim="form.author" v-model.trim="form.author"
clearable clearable
maxlength="15" maxlength="200"
class="inline-input" class="inline-input"
@change="nameChange" @change="nameChange"
></el-input> ></el-input>
@ -242,7 +242,7 @@
</el-form> </el-form>
<div class="btns"> <div class="btns">
<el-button type="primary" @click="submit(1)">发布</el-button> <el-button type="primary" @click="submit(1)">发布</el-button>
<el-button @click="preview">预览</el-button> <el-button v-if="$route.query.id" @click="preview">预览</el-button>
<el-button @click="submit(0)">保存草稿</el-button> <el-button @click="submit(0)">保存草稿</el-button>
<el-button @click="back">取消</el-button> <el-button @click="back">取消</el-button>
</div> </div>
@ -323,6 +323,7 @@
</div> </div>
</template> </template>
<script> <script>
import Setting from '@/setting'
import util from '@/libs/util' import util from '@/libs/util'
import ColumnConst from '@/const/column' import ColumnConst from '@/const/column'
import { mapState } from 'vuex' import { mapState } from 'vuex'
@ -364,7 +365,7 @@ export default {
file: '', file: '',
isRelease: 0, isRelease: 0,
mainBody: '', mainBody: '',
releaseTime: '', releaseTime: new Date(),
source: '', source: '',
summary : '', summary : '',
title: '', title: '',
@ -787,7 +788,7 @@ export default {
}, },
// //
preview() { preview() {
window.open((Setting.isDev ? `http://${location.hostname}:8095` : 'http://192.168.31.136') + `/#/article?id=${this.form.id}&siteId=${this.form.siteId}`)
}, },
// //
back() { back() {

@ -47,8 +47,8 @@
</el-table-column> </el-table-column>
<el-table-column v-if="settings[4].show" prop="founderName" label="录入人" align="center" min-width="80"></el-table-column> <el-table-column v-if="settings[4].show" prop="founderName" label="录入人" align="center" min-width="80"></el-table-column>
<el-table-column v-if="settings[5].show" prop="editorName" label="修改人" align="center" min-width="80"></el-table-column> <el-table-column v-if="settings[5].show" prop="editorName" label="修改人" align="center" min-width="80"></el-table-column>
<el-table-column v-if="settings[6].show" prop="updateTime" label="修改日期" align="center" min-width="130"></el-table-column> <el-table-column v-if="settings[6].show" prop="updateTime" label="修改日期" align="center" min-width="140"></el-table-column>
<el-table-column v-if="settings[7].show" prop="releaseTime" label="发布日期" align="center" min-width="130"></el-table-column> <el-table-column v-if="settings[7].show" prop="releaseTime" label="发布日期" align="center" min-width="140"></el-table-column>
<el-table-column v-if="settings[8].show" prop="totalBrowsing" label="总浏览" align="center" min-width="80"></el-table-column> <el-table-column v-if="settings[8].show" prop="totalBrowsing" label="总浏览" align="center" min-width="80"></el-table-column>
<el-table-column v-if="settings[9].show" prop="workNumber" label="状态" align="center" min-width="80"> <el-table-column v-if="settings[9].show" prop="workNumber" label="状态" align="center" min-width="80">
<template slot-scope="scope"> <template slot-scope="scope">

@ -249,7 +249,7 @@ export default {
line-height: 143px; line-height: 143px;
color: #272727; color: #272727;
text-align: center; text-align: center;
background-color: #F5F5F5; background-color: #fff;
} }
} }
.news-block { .news-block {

@ -312,6 +312,9 @@ export default {
.glance { .glance {
padding-bottom: 50px; padding-bottom: 50px;
font-size: 45px; font-size: 45px;
font-weight: bold;
font-family: SFProDisplay-Bold, SFProDisplay;
text-align: center;
border-bottom: 1px solid #DEDEDE; border-bottom: 1px solid #DEDEDE;
} }
.stat { .stat {

@ -16,7 +16,7 @@
</ul> </ul>
</div> </div>
</div> </div>
<info class="flex-1" ref="info" @updateStatus="updateStatus"></info> <info class="flex-1" ref="info" @updateStatus="updateStatus" @back="back"></info>
</div> </div>
</template> </template>
@ -51,7 +51,7 @@ export default {
this.$refs.info.submit() this.$refs.info.submit()
next() next()
}).catch(() => { }).catch(() => {
next(false) next()
}) })
}else{ }else{
next() next()
@ -69,6 +69,22 @@ export default {
}, },
updateStatus(status){ updateStatus(status){
this.edited = status this.edited = status
},
//
back() {
if(this.edited){
this.edited = false
this.$confirm(`您所更改的内容未更新,是否更新?`, '提示', {
type: 'warning'
}).then(() => {
this.$refs.info.submit()
this.$router.back()
}).catch(() => {
this.$router.back()
})
}else{
this.$router.back()
}
} }
} }
}; };

@ -43,7 +43,7 @@
</ul> </ul>
</div> </div>
<div class="btn-wrap"> <div class="btn-wrap">
<el-button size="small" v-throttle @click="$router.back()">取消</el-button> <el-button size="small" v-throttle @click="$emit('back')">取消</el-button>
<el-button type="primary" size="small" v-throttle @click="submit">更新</el-button> <el-button type="primary" size="small" v-throttle @click="submit">更新</el-button>
</div> </div>
</div> </div>
@ -287,6 +287,7 @@ export default {
username: form.username, username: form.username,
sex: form.sex, sex: form.sex,
}).then(res => { }).then(res => {
this.$emit('updateStatus', false)
this.setUserName(form.username) this.setUserName(form.username)
this.$message.success("提交成功!") this.$message.success("提交成功!")
}).catch(res => {}) }).catch(res => {})

@ -4,6 +4,10 @@
font-family: PingFang; font-family: PingFang;
src: url('font/PingFang-Regular.otf'); src: url('font/PingFang-Regular.otf');
} }
@font-face {
font-family: SFProDisplay-Bold;
src: url('font/SF-Pro-Display-Bold.otf');
}
[v-cloak] { [v-cloak] {
display: none; display: none;
} }

@ -4,7 +4,10 @@
position: relative; position: relative;
margin-bottom: 50px; margin-bottom: 50px;
font-size: 50px; font-size: 50px;
line-height: 59px; font-family: SFProDisplay-Bold, SFProDisplay;
font-weight: bold;
color: #333333;
line-height: 60px;
text-align: center; text-align: center;
color: #1F1F1F; color: #1F1F1F;
&:after { &:after {

Loading…
Cancel
Save