From 088dc619a491847267145fefd6420718a084ac3f Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Thu, 1 Dec 2022 10:08:41 +0800 Subject: [PATCH] fix --- src/libs/util.js | 19 ---- src/mixins/page/index.js | 5 +- src/pages/article/add/index.vue | 150 ++++++++++++++++++++----------- src/pages/article/list/index.vue | 4 +- src/pages/column/add/index.vue | 5 +- src/pages/column/list/index.vue | 6 +- src/plugins/requests/index.js | 1 - 7 files changed, 107 insertions(+), 83 deletions(-) diff --git a/src/libs/util.js b/src/libs/util.js index 93c6690..cfaa42e 100644 --- a/src/libs/util.js +++ b/src/libs/util.js @@ -175,25 +175,6 @@ const util = { Message.closeAll(); return Message.error({ message, showClose: true, offset: (document.documentElement.clientHeight - 40) / 2, 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 => { - }); - } - } - }, debounce(fn, delay) { // 防抖 let timeout = null; return function() { diff --git a/src/mixins/page/index.js b/src/mixins/page/index.js index 683651c..4ffa2d1 100644 --- a/src/mixins/page/index.js +++ b/src/mixins/page/index.js @@ -9,7 +9,6 @@ export default { userId: +this.$store.state.user.userId, site: this.$store.state.content.site, columnId: +this.$route.query.id, - listStyleId: +this.$route.query.listStyleId, id: '', diaVisible: false, curModule: 0, @@ -45,7 +44,6 @@ export default { if (form && form.link && !form.link.site) form.link.site = siteId if (form && type === 'column' && !form.site) form.site = siteId }) - console.log(555, this.modules) // 查询页面详情 this.$post(`${this.api.findPage}?columnId=${this.columnId}`).then(({ data }) => { if (data.length) { @@ -102,8 +100,7 @@ export default { json: this.handleJson() }).then(res => { load.close() - const item = ColumnConst.pageStyle.find(e => e.id == this.listStyleId) - window.open((Setting.isDev ? `http://${location.hostname}:8095` : 'http://192.168.31.136') + `/#/${item ? item.path : 'home'}?id=${this.columnId}&preview=1&siteId=${this.$route.query.siteId}`) + window.open((Setting.isDev ? `http://${location.hostname}:8095` : 'http://192.168.31.136/front') + `/#/${this.$route.query.path}?id=${this.columnId}&preview=1&siteId=${this.$route.query.siteId}`) }).catch(err => { load.close() }) diff --git a/src/pages/article/add/index.vue b/src/pages/article/add/index.vue index 80d583b..891243d 100644 --- a/src/pages/article/add/index.vue +++ b/src/pages/article/add/index.vue @@ -44,8 +44,7 @@ ref="column" v-model="form.columnId" :options="columns" - :props="columnProps" - clearable> + :props="columnProps"> @@ -120,7 +119,7 @@ > -
+
-
+