yujialong 2 years ago
parent a80a307666
commit 5298d2feaf
  1. 3
      src/api/index.js
  2. 2
      src/components/breadcrumb/index.vue
  3. 1
      src/layouts/navbar/index.vue
  4. 19
      src/libs/util.js
  5. 22
      src/mixins/page/index.js
  6. 25
      src/pages/article/activity.vue
  7. 28
      src/pages/article/index.vue
  8. 136
      src/pages/column/index.vue
  9. 41
      src/pages/news/index.vue
  10. 2
      src/plugins/requests/index.js
  11. 2
      src/router/routes.js

@ -9,7 +9,8 @@ export default {
theAttachmentUnderTheQueryColumn: `iasf/content/file/theAttachmentUnderTheQueryColumn`, theAttachmentUnderTheQueryColumn: `iasf/content/file/theAttachmentUnderTheQueryColumn`,
findColumn: `iasf/sysColumn/findById`, findColumn: `iasf/sysColumn/findById`,
queryClassif: `iasf/content/classification/allTheQuery`, queryClassif: `iasf/content/classification/allTheQuery`,
getTheFullArticleByColumn: `iasf/sysColumn/getTheFullArticleByColumn`,
queryLabel: `iasf/content/label/queryAllArticleSubjectTags`, queryLabel: `iasf/content/label/queryAllArticleSubjectTags`,
getsTheSubColumn: `iasf/sysColumn/getsTheSubColumn`, getsTheSubColumn: `iasf/sysColumn/getsTheSubColumn`,
getTheFullArticleByColumn: `iasf/sysColumn/getTheFullArticleByColumn`, articlePreview: `iasf/sysContent/articlePreview`,
} }

@ -40,7 +40,7 @@ export default {
}; };
}, },
methods: { methods: {
update(data){ update(data) {
this.pages = data.split('/') this.pages = data.split('/')
} }
} }

@ -70,6 +70,7 @@ export default {
}, },
// //
jump(id) { jump(id) {
console.log("🚀 ~ file: index.vue ~ line 73 ~ jump ~ id", id)
this.getPath(this.menus ,id) this.getPath(this.menus ,id)
const to = this.toItem const to = this.toItem
const { typeId } = to const { typeId } = to

@ -162,25 +162,6 @@ const util = {
showClose: true, showClose: true,
duration duration
}); });
},
// 登录互踢
getToken() {
if (process.env.NODE_ENV == "production") {
if (store.state.user.dataTime && !logout) {
axios.get(`${api.queryToken}?token=${_local.get(Setting.tokenKey)}`).then(res => {
if (store.state.user.dataTime && (res.data.message != store.state.user.dataTime)) {
logout || Message.error("您已在另一台设备登录,本次登录已下线!");
logout = true;
setTimeout(() => {
_local.remove(Setting.storeKey);
_local.remove(Setting.tokenKey);
location.reload();
}, 1500);
}
}).catch(err => {
});
}
}
} }
}; };

@ -15,22 +15,34 @@ export default {
}, },
methods: { methods: {
// 打开链接 // 打开链接
openLink(item) { async openLink(item) {
const { link } = item const { link } = item
if (link.linkName === '无') return false if (link.linkName === '无') return false
console.log("🚀 ~ file: index.js ~ line 19 ~ openLink ~ link", link) console.log("🚀 ~ file: index.js ~ line 19 ~ openLink ~ link", link)
let href = link.linkAddress let href = link.linkAddress
const type = link.connectionType const type = link.connectionType
if (type === 1) { if (type === 1) { // 站内链接
if (link.articleId) { // 文章 if (link.articleId) { // 文章
href = '/article?id=' + link.articleId // 查询文章详情。禁用的文章要提示
const data = await this.$post(`${this.api.findArticle}?id=${link.articleId}`)
if (data.data.isDisable) {
return Util.errorMsg('该文章已禁用!')
} else {
href = '/article?id=' + link.articleId
}
} else { // 栏目 } else { // 栏目
href = '/column?id=' + link.columnId[link.columnId.length - 1] href = '/column?id=' + link.columnId[link.columnId.length - 1]
} }
href = this.$router.resolve(href + '&siteId=' + (this.$route.query.siteId || this.site)).href href = this.$router.resolve(href + '&siteId=' + (this.$route.query.siteId || this.site)).href
} else if (type === 3) { } else if (type === 3) { // 站外链接
if (link.otherArticleId) { // 文章 if (link.otherArticleId) { // 文章
href = '/article?id=' + link.otherArticleId // 查询文章详情。禁用的文章要提示
const data = await this.$post(`${this.api.findArticle}?id=${link.otherArticleId}`)
if (data.data.isDisable) {
return Util.errorMsg('该文章已禁用!')
} else {
href = '/article?id=' + link.otherArticleId
}
} else { // 栏目 } else { // 栏目
href = '/column?id=' + link.otherColumnId[link.otherColumnId.length - 1] href = '/column?id=' + link.otherColumnId[link.otherColumnId.length - 1]
} }

@ -1,14 +1,14 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<div class="content" style="width: 1400px;"> <div class="content" style="width: 1400px;">
<Breadcrumb ref="breadcrumb" :data="'装置概况/' + form.title"/> <Breadcrumb ref="breadcrumb" :data="'装置概况/' + form.title" route="column" :query.sync="query"/>
<div class="article"> <div class="article">
<div class="left"> <div class="left">
<h2>{{ form.title }}</h2> <h2>{{ form.title }}</h2>
<div class="meta">日期{{ form.activityStartTime + ' ~ ' + form.activityEndTime }}</div> <div class="meta">日期{{ form.activityStartTime + ' ~ ' + form.activityEndTime }}</div>
<div class="meta">地址{{ form.offlineLocation }}</div> <div v-if="form.offlineLocation" class="meta">地址{{ form.offlineLocation }}</div>
<div class="meta">线上{{ form.onlineLocation }}</div> <div v-if="form.onlineLocation" class="meta">线上{{ form.onlineLocation }}</div>
<div class="meta">主讲人{{ form.keynoteSpeaker }}</div> <div v-if="form.keynoteSpeaker" class="meta">主讲人{{ form.keynoteSpeaker }}</div>
<h6>内容介绍</h6> <h6>内容介绍</h6>
<div v-html="form.mainBody"></div> <div v-html="form.mainBody"></div>
@ -54,6 +54,7 @@ export default {
return { return {
id: this.$route.query.id, id: this.$route.query.id,
columnId: '', columnId: '',
query: {},
form: {}, form: {},
columnBanner: '', columnBanner: '',
columns: [], columns: [],
@ -62,7 +63,6 @@ export default {
label: 'columnName' label: 'columnName'
}, },
news: [], news: [],
files: []
} }
}, },
components: { components: {
@ -77,7 +77,6 @@ export default {
mounted() { mounted() {
this.getColumn() this.getColumn()
this.getArticle() this.getArticle()
this.getFile()
}, },
methods: { methods: {
// //
@ -85,10 +84,16 @@ export default {
this.$post(`${this.api.findArticle}?id=${this.id}`).then(({ data }) => { this.$post(`${this.api.findArticle}?id=${this.id}`).then(({ data }) => {
this.form = data this.form = data
this.columnId = data.columnId this.columnId = data.columnId
this.$refs.breadcrumb.update('装置概况/' + data.title) this.query = {
id: data.columnId
}
this.$refs.breadcrumb.update(data.columnName + '/' + data.title)
data.bannerImg || this.getBanner(this.columns) data.bannerImg || this.getBanner(this.columns)
if (this.columnBanner) this.form.bannerImg = this.columnBanner if (this.columnBanner) this.form.bannerImg = this.columnBanner
}).catch(err => {}) }).catch(err => {})
// +1
this.$post(`${this.api.articlePreview}?contentId=${this.id}`).then(({ data }) => {}).catch(err => {})
}, },
// banner // banner
getBanner(data) { getBanner(data) {
@ -102,12 +107,6 @@ export default {
} }
} }
}, },
//
getFile() {
this.$post(`${this.api.theAttachmentUnderTheQueryColumn}?contentId=${this.id}`).then(({ data }) => {
this.files = data
}).catch(err => {})
},
// //
getColumn() { getColumn() {
this.$post(this.api.listWithTree, { this.$post(this.api.listWithTree, {

@ -4,7 +4,7 @@
{{ form.columnName }} {{ form.columnName }}
</div> </div>
<div class="content" style="width: 1400px;"> <div class="content" style="width: 1400px;">
<Breadcrumb ref="breadcrumb" :data="'装置概况/' + form.title"/> <Breadcrumb ref="breadcrumb" :data="'装置概况/' + form.title" route="column" :query.sync="query"/>
<div class="article"> <div class="article">
<div class="left"> <div class="left">
<h2>{{ form.title }}</h2> <h2>{{ form.title }}</h2>
@ -12,10 +12,10 @@
<div class="meta">{{ form.edit && '编辑:' + form.edit }} {{ form.audit && ' | 审核:' + form.audit }} {{ form.label && ' | 标签:' + form.label }}</div> <div class="meta">{{ form.edit && '编辑:' + form.edit }} {{ form.audit && ' | 审核:' + form.audit }} {{ form.label && ' | 标签:' + form.label }}</div>
<p class="brief">{{ form.summary }}</p> <p class="brief">{{ form.summary }}</p>
<div v-html="form.mainBody"></div> <div v-html="form.mainBody"></div>
<div v-if="files.length" class="annex"> <div v-if="form.fileList && form.fileList.length" class="annex">
<h6>附件下载</h6> <h6>附件下载</h6>
<ul class="files"> <ul class="files">
<li v-for="(file, i) in files" :key="i"> <li v-for="(file, i) in form.fileList" :key="i">
<span class="name">{{ file.fileName }}</span> <span class="name">{{ file.fileName }}</span>
<span class="download" @click="download(file)">下载</span> <span class="download" @click="download(file)">下载</span>
</li> </li>
@ -61,8 +61,10 @@ import Breadcrumb from '@/components/breadcrumb'
export default { export default {
data() { data() {
return { return {
site: this.$store.state.content.site,
loaded: false, loaded: false,
id: this.$route.query.id, id: this.$route.query.id,
query: {},
columnId: '', columnId: '',
form: {}, form: {},
columnBanner: '', columnBanner: '',
@ -72,7 +74,6 @@ export default {
label: 'columnName' label: 'columnName'
}, },
news: [], news: [],
files: []
} }
}, },
components: { components: {
@ -87,27 +88,32 @@ export default {
mounted() { mounted() {
this.getColumn() this.getColumn()
this.getArticle() this.getArticle()
this.getFile()
}, },
methods: { methods: {
// //
getInfo() { getInfo() {
this.$post(`${this.api.findArticle}?id=${this.id}`).then(({ data }) => { this.$post(`${this.api.findArticle}?id=${this.id}`).then(({ data }) => {
this.$refs.breadcrumb.update(data.columnName + '/' + data.title)
if (data.isDisable) { if (data.isDisable) {
this.$router.back() this.$router.back()
} else { } else {
if (data.articleTemplate === 10) { if (data.articleTemplate === 25) { //
this.$router.replace(`/article/activity?id=${this.id}&siteId=${this.$route.query.siteId}`) this.$router.replace(`/article/activity?id=${this.id}&siteId=${this.$route.query.siteId || this.site}`)
} else { } else {
this.query = {
id: data.columnId
}
this.form = data this.form = data
this.columnId = data.columnId this.columnId = data.columnId
this.$refs.breadcrumb.update('装置概况/' + data.title)
data.bannerImg || this.getBanner(this.columns) data.bannerImg || this.getBanner(this.columns)
if (this.columnBanner) this.form.bannerImg = this.columnBanner if (this.columnBanner) this.form.bannerImg = this.columnBanner
this.loaded = true this.loaded = true
} }
} }
}).catch(err => {}) }).catch(err => {})
// +1
this.$post(`${this.api.articlePreview}?contentId=${this.id}`).then(({ data }) => {}).catch(err => {})
}, },
// banner // banner
getBanner(data) { getBanner(data) {
@ -121,12 +127,6 @@ export default {
} }
} }
}, },
//
getFile() {
this.$post(`${this.api.theAttachmentUnderTheQueryColumn}?contentId=${this.id}`).then(({ data }) => {
this.files = data
}).catch(err => {})
},
// //
getColumn() { getColumn() {
this.$post(this.api.listWithTree, { this.$post(this.api.listWithTree, {

@ -12,7 +12,7 @@
<div class="item"> <div class="item">
<span class="label">所属分类</span> <span class="label">所属分类</span>
<el-select v-model="form.classificationId" @change="filter"> <el-select v-model="form.classificationId" @change="filter">
<el-option label="不限" value=""></el-option> <el-option label="不限" :value="null"></el-option>
<el-option <el-option
v-for="item in classifications" v-for="item in classifications"
:key="item.id" :key="item.id"
@ -41,41 +41,41 @@
</div> </div>
<!-- 会议活动筛选+会议活动列表 --> <!-- 会议活动筛选+会议活动列表 -->
<div v-if="info.listStyleId === 15" class="forms"> <div v-if="info.listStyleId === 15" class="forms">
<ul class="switch">
<li v-for="(item, i) in convokeTypes" :key="i" :class="{active: item.id === form.convokeType}" @click="switchChange(item)">{{ item.name }}</li>
</ul>
<div class="item"> <div class="item">
<span class="label">类型</span> <span class="label">类型</span>
<el-select v-model="form.classificationId"> <el-select v-model="form.classificationId" @change="filter">
<el-option label="不限" value=""></el-option> <el-option label="不限" :value="null"></el-option>
<el-option <el-option
v-for="item in classifications" v-for="item in classifications"
:key="item.id" :key="item.id"
:label="item.labelName" :label="item.classificationName"
:value="item.id"> :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
</div> </div>
<div class="contents"> <div class="contents">
<ul v-if="columns.length > 2 && !isFilter && showNav" class="columns"> <el-tree v-if="!isFilter && showNav" class="columns" ref="leftColumn" :data="columns" highlight-current :expand-on-click-node="false" default-expand-all :props="defaultProps" node-key="id" @node-click="columnClick"></el-tree>
<li v-if="all.columnName" class="all" :class="{active: curColumn === 0 }" @click="toArticle(0, 1)">{{ all.columnName }}</li>
<template v-for="(item, i) in columns">
<li v-if="i" :key="i" :class="{active: i === curColumn}" @click="toArticle(i)">{{ item.columnName }}</li>
</template>
</ul>
<div style="width: 1113px"> <div style="width: 1113px">
<ul class="articles"> <ul class="articles">
<li v-for="(item, i) in articles" :key="i" @click="toArtice(item)"> <li v-for="(item, i) in articles" :key="i" @click="toArtice(item)">
<div class="texts"> <div class="texts">
<p v-if="info.listStyleId === 10 && item.classificationName" class="type">{{ item.classificationName }}</p> <p v-if="(item.listStyleId === 10 || item.listStyleId === 15) && item.classificationName" class="type">{{ item.classificationName }}</p>
<h6>{{ item.title }}</h6> <h6>{{ item.title }}</h6>
<template v-if="info.listStyleId === 11"> <template v-if="item.listStyleId === 11">
<span class="meta">{{ item.updateTime }}</span> <span class="meta">{{ item.updateTime }}</span>
<div class="des" v-html="item.mainBody"></div> <div class="des" v-html="item.mainBody"></div>
</template> </template>
<span v-if="info.listStyleId === 10" class="meta">{{ item.updateTime }} {{ item.labelName && ' | ' + item.labelName }}</span> <span v-if="item.listStyleId === 10" class="meta">{{ item.updateTime }} {{ item.labelName && ' | ' + item.labelName }}</span>
<template v-if="info.listStyleId === 15 || info.listStyleId === 16"> <template v-if="item.listStyleId === 15 || item.listStyleId === 16">
<div v-if="item.keynoteSpeaker" class="meta m-b-10"><i class="el-icon-user"></i> {{ item.keynoteSpeaker }}</div> <div v-if="item.keynoteSpeaker" class="meta m-b-10"><i class="el-icon-user"></i> {{ item.keynoteSpeaker }}</div>
<div v-if="item.activityStartTime" class="meta m-b-10"><i class="el-icon-alarm-clock"></i> {{ item.activityStartTime + '~' + item.activityEndTime }}</div> <div v-if="item.activityStartTime" class="meta m-b-10"><i class="el-icon-alarm-clock"></i> {{ item.activityStartTime + ' ~ ' + item.activityEndTime }}</div>
<div v-if="item.offlineLocation" class="meta"><i class="el-icon-location-outline"></i> {{ item.offlineLocation }}</div> <div v-if="item.offlineLocation" class="meta m-b-10"><i class="el-icon-location-outline"></i> {{ item.offlineLocation }}</div>
<div v-if="item.onlineLocation" class="meta"><i class="el-icon-position"></i> {{ item.onlineLocation }}</div>
</template> </template>
</div> </div>
<img class="pic" :src="item.titleImg" alt=""> <img class="pic" :src="item.titleImg" alt="">
@ -131,9 +131,24 @@ export default {
info: {}, info: {},
searchTimer: null, searchTimer: null,
lableId: [], lableId: [],
convokeTypes: [
{
id: null,
name: '全部'
},
{
id: 1,
name: '即将召开'
},
{
id: 2,
name: '已经召开'
}
],
form: { form: {
classificationId: '', classificationId: null,
title: '' title: '',
convokeType: null
}, },
classifications: [], classifications: [],
labels: [], labels: [],
@ -188,9 +203,16 @@ export default {
}, },
// //
getClassification() { getClassification() {
this.$post(`${this.api.getTheFullArticleByColumn}?id=${this.id}`).then(({ data }) => { if (this.info.templateId === 7) {
this.classifications = data this.$post(`${this.api.queryClassif}?siteId=${this.site}&templateId=${7}`).then(({ data }) => {
}).catch(err => {}) this.classifications = data
}).catch(err => {})
} else {
this.$post(`${this.api.getTheFullArticleByColumn}?id=${this.id}`).then(({ data }) => {
this.classifications = data
}).catch(err => {})
}
}, },
// //
getLabel() { getLabel() {
@ -201,17 +223,17 @@ export default {
// //
getLeftColumn() { getLeftColumn() {
this.$post(`${this.api.getsTheSubColumn}?id=${this.id}`).then(({ data }) => { this.$post(`${this.api.getsTheSubColumn}?id=${this.id}`).then(({ data }) => {
if (data.length > 1 && !data.find(e => e.listStyleId !== data[0].listStyleId)) { // if (data.length > 1 && !data.find(e => e.listStyleId !== data[0].listStyleId)) {
this.all = data[0] // this.all = data[0]
this.getArticle(data.map(e => e.id)) // this.getArticle(data.map(e => e.id))
} else { // } else {
this.all = null // this.all = null
this.getArticle([data[data.length > 1 ? 1 : 0].id]) // this.getArticle([data[data.length > 1 ? 1 : 0].id])
data = data.slice(1) // // data = data.slice(1)
} // }
data.length && this.getArticle([data[0].id])
this.curColumn = 0 this.curColumn = 0
this.columns = data this.columns = data
console.log("🚀 ~ file: index.vue ~ line 212 ~ this.$post ~ columns", columns)
}).catch(err => {}) }).catch(err => {})
}, },
// //
@ -236,20 +258,28 @@ export default {
this.news = data.records this.news = data.records
}).catch(res => {}) }).catch(res => {})
}, },
//
switchChange(item) {
this.form.convokeType = item.id
this.filter()
},
// //
toArticle(i, all) { columnClick(data) {
this.curColumn = i
this.page = 1 this.page = 1
this.getArticle(all ? this.columns.map(e => e.id) : [this.columns[i].id]) this.getArticle([data.id])
}, },
// //
getArticle(columnIds) { getArticle(columnIds) {
const labelName = []
this.labels.map(e => {
if (this.lableId.includes(e.id)) labelName.push(e.labelName)
})
this.$post(this.api.newlyPublishedArticles, { this.$post(this.api.newlyPublishedArticles, {
siteId: this.$route.query.siteId || this.site, siteId: this.$route.query.siteId || this.site,
columnIds, columnIds,
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
labelId: this.lableId.join(), labelName,
...this.form ...this.form
}).then(({ data }) => { }).then(({ data }) => {
const list = data.records const list = data.records
@ -260,13 +290,23 @@ export default {
this.total = +data.total this.total = +data.total
}).catch(res => {}) }).catch(res => {})
}, },
// id
getIds(data, ids) {
data.map(e => {
ids.push(e.id)
this.getIds(e.children, ids)
})
},
// //
filter() { filter() {
this.page = 1 this.page = 1
this.isFilter = !!(this.form.classificationId || this.form.title || this.lableId.length) this.isFilter = !!(this.form.classificationId || this.form.title || this.form.convokeType || this.lableId.length)
const id = (this.isFilter || this.all) ? let id = []
this.columns.map(e => e.id) : if (this.isFilter || this.all) {
[this.columns[0].id] this.getIds(this.columns, id)
} else if (this.columns.length) {
id = [this.columns[0].id]
}
this.curColumn = 0 this.curColumn = 0
this.getArticle(id) this.getArticle(id)
}, },
@ -306,6 +346,24 @@ export default {
.left { .left {
width: 1295px; width: 1295px;
} }
.switch {
display: inline-flex;
align-items: center;
margin-right: 50px;
li {
padding: 0 15px;
margin-right: 10px;
line-height: 32px;
font-size: 14px;
color: #333;
border-radius: 4px;
cursor: pointer;
}
.active {
color: #fff;
background-color: #1fa7ff;
}
}
.forms { .forms {
display: flex; display: flex;
align-items: center; align-items: center;

@ -19,17 +19,24 @@
<div class="block"> <div class="block">
<div class="inner" v-if="modules[1].list[this.curColumn].articles.length"> <div class="inner" v-if="modules[1].list[this.curColumn].articles.length">
<div class="banner"> <el-carousel class="articles" height="410px" arrow="never">
<img width="50%" height="480" :src="modules[1].list[this.curColumn].articles[0].titleImg" alt=""> <template v-for="(item, i) in modules[1].list[this.curColumn].articles">
<div class="right"> <el-carousel-item v-if="i < 3" :key="i">
<h6>{{ modules[1].list[this.curColumn].articles[0].title }}</h6> <div class="banner" @click="toArtice(item)">
<div class="des" v-html="modules[1].list[this.curColumn].articles[0].mainBody"></div> <img width="50%" height="480" :src="item.titleImg" alt="">
<p class="meta">{{ modules[1].list[this.curColumn].articles[0].createTime }} {{ modules[1].list[this.curColumn].articles[0].author && ' | ' + modules[1].list[this.curColumn].articles[0].author }}</p> <div class="right">
</div> <h6>{{ item.title }}</h6>
</div> <div class="des" v-html="item.mainBody"></div>
<p class="meta">{{ item.createTime }} {{ item.author && ' | ' + item.author }}</p>
</div>
</div>
</el-carousel-item>
</template>
</el-carousel>
<ul class="card"> <ul class="card">
<template v-for="(item, i) in modules[1].list[this.curColumn].articles"> <template v-for="(item, i) in modules[1].list[this.curColumn].articles">
<li v-if="i" :key="i"> <li v-if="i > 3" :key="i" @click="toArtice(item)">
<img class="pic" :src="item.titleImg" alt=""> <img class="pic" :src="item.titleImg" alt="">
<div class="texts"> <div class="texts">
<p class="meta">{{ item.createTime }} {{ item.author && ' | ' + item.author }}</p> <p class="meta">{{ item.createTime }} {{ item.author && ' | ' + item.author }}</p>
@ -39,7 +46,7 @@
</li> </li>
</template> </template>
</ul> </ul>
<div class="more">More news ></div> <div class="more" @click="toMore">More news ></div>
</div> </div>
</div> </div>
@ -169,7 +176,7 @@ export default {
siteId: e.site, siteId: e.site,
columnIds: [id], columnIds: [id],
pageNum: 1, pageNum: 1,
pageSize: e.articleNum || 4 pageSize: e.articleNum || 6
}).then(({ data }) => { }).then(({ data }) => {
this.$set(e, 'articles', data.records) this.$set(e, 'articles', data.records)
}).catch(err => {}) }).catch(err => {})
@ -248,6 +255,11 @@ export default {
} else { } else {
this.curColumn = i this.curColumn = i
} }
},
// more
toMore() {
const { column } = this.modules[1].list[this.curColumn]
column.length && this.$router.push(`/column?id=${column[column.length - 1]}`)
} }
} }
}; };
@ -273,6 +285,12 @@ export default {
} }
} }
} }
/deep/.articles {
.el-carousel__indicators--horizontal {
bottom: 20px;
left: 804px;
}
}
.banner { .banner {
display: flex; display: flex;
cursor: pointer; cursor: pointer;
@ -307,6 +325,7 @@ export default {
margin-right: 28px; margin-right: 28px;
box-shadow: 0px 0px 20px 0px rgba(176,176,176,0.21); box-shadow: 0px 0px 20px 0px rgba(176,176,176,0.21);
border-radius: 6px; border-radius: 6px;
cursor: pointer;
&:last-child { &:last-child {
margin-right: 0; margin-right: 0;
} }

@ -3,7 +3,6 @@ import util from "@/libs/util";
import router from "@/router"; import router from "@/router";
import Setting from "@/setting"; import Setting from "@/setting";
import { Message } from "element-ui"; import { Message } from "element-ui";
const service = axios.create({ const service = axios.create({
baseURL: Setting.apiBaseURL, baseURL: Setting.apiBaseURL,
timeout: 10000000 timeout: 10000000
@ -14,7 +13,6 @@ service.defaults.headers.post["Content-Type"] = "application/json;charset=UTF-8"
// 请求拦截器 // 请求拦截器
service.interceptors.request.use(config => { service.interceptors.request.use(config => {
util.getToken();
let token = util.local.get(Setting.tokenKey); let token = util.local.get(Setting.tokenKey);
if (token) config.headers.token = token; if (token) config.headers.token = token;
return config; return config;

@ -10,7 +10,7 @@ requireModule.keys().forEach(fileName => {
const frameIn = [ const frameIn = [
{ {
path: "/", path: "/",
redirect: "/channel" redirect: "/home"
}, },
...modules ...modules
]; ];

Loading…
Cancel
Save