diff --git a/src/api/index.js b/src/api/index.js
index 9278fbe..043b725 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -76,4 +76,5 @@ export default {
individualTemplateDetailsStyle: `iasf/template/individualTemplateDetailsStyle`,
longPageListStyle: `iasf/template/longPageListStyle`,
resort: `iasf/sysContent/sort`,
+ articleTopOperation: `iasf/sysContent/articleTopOperation`,
}
\ No newline at end of file
diff --git a/src/layouts/header/index.vue b/src/layouts/header/index.vue
index d1c3f34..3144386 100644
--- a/src/layouts/header/index.vue
+++ b/src/layouts/header/index.vue
@@ -98,7 +98,7 @@ export default {
// 前往站点首页
toIndex() {
const { site } = this.$store.state.content
- window.open((Setting.isDev ? `http://${location.hostname}:8095` : site.domainName) + `/#/column?siteId=${site.id}`)
+ window.open((Setting.isDev ? `http://${location.hostname}:8095/` : site.domainName) + `#/column?siteId=${site.id}`)
},
// 站点切换回调
siteCommand(e) {
diff --git a/src/pages/article/list/index.vue b/src/pages/article/list/index.vue
index eb64b1a..3ebec88 100644
--- a/src/pages/article/list/index.vue
+++ b/src/pages/article/list/index.vue
@@ -39,18 +39,6 @@
-
-
-
- {{ scope.row.sequence }}
-
-
-
-
@@ -68,13 +56,18 @@
{{ scope.row.isRelease ? '已发布' : '草稿' }}
-
+
+
+
+
+
+
- 置顶
预览
编辑
删除
{
+ this.$post(`${this.api.articleTopOperation}?articleId=${row.id}&isTop=${row.isTop ? 0 : 1}`).then(res => {
this.initData()
}).catch(res => {})
},
@@ -391,8 +384,13 @@ export default {
text-overflow: ellipsis;
}
.squ-icon {
- margin-left: 5px;
+ font-size: 16px;
+ font-weight: 600;
cursor: pointer;
+ color: #f70000;
+ &.el-icon-check {
+ color: #05991e;
+ }
}
/deep/.squ-input {
width: auto;
diff --git a/src/pages/user/list/index.vue b/src/pages/user/list/index.vue
index a4b43d3..a044a1d 100644
--- a/src/pages/user/list/index.vue
+++ b/src/pages/user/list/index.vue
@@ -521,7 +521,7 @@ export default {
const len = cas.length
if (cas && len) {
this.orgForm.pid = cas[len - 1]
- } else {
+ } else if (!form.pid) {
form.pid = 0
}
if (!form.id) {
diff --git a/src/plugins/requests/index.js b/src/plugins/requests/index.js
index 24aa7ac..ea67895 100644
--- a/src/plugins/requests/index.js
+++ b/src/plugins/requests/index.js
@@ -47,28 +47,26 @@ service.interceptors.response.use(
// 服务器状态码不是200的情况
error => {
if (error.response.status) {
- switch (error.response.status) {
- case 500:
- Util.errorMsg("网络错误");
- break;
- // 401token过期
+ const { msg, code } = error.response.data
+ switch (code) {
+ // 401: 未登录
case 401:
- Util.errorMsg(error.response.data.msg)
- setTimeout(() => {
- store.dispatch('user/logout')
- }, 1000)
- break;
- // 404请求不存在
- case 404:
- Util.errorMsg("网络请求不存在!");
- break;
- case 401001:
- Util.errorMsg(error.response.data.msg);
- break;
- // 其他错误,直接抛出错误提示
- default:
- Util.errorMsg(error.response.data.msg);
- Promise.reject(res);
+ Util.errorMsg("登录过期,请重新登录");
+ setTimeout(() => {
+ store.dispatch('user/logout')
+ }, 1000);
+ break;
+ // 403 token过期
+ case 403:
+ Util.errorMsg("登录过期,请重新登录");
+ setTimeout(() => {
+ store.dispatch('user/logout')
+ }, 1000);
+ break;
+ // 其他错误,直接抛出错误提示
+ default:
+ Util.errorMsg(msg);
+ Promise.reject(error.response.data);
}
return Promise.reject(error.response);
}