From 49e09732fc56cab0ad820b2a2a61073ee6667f53 Mon Sep 17 00:00:00 2001
From: yujialong <479214531@qq.com>
Date: Mon, 5 Sep 2022 10:49:44 +0800
Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/index.js | 36 ++++----
src/components/img-upload/Cropper.vue | 2 +-
src/pages/account/login/index.vue | 14 ++-
src/pages/annex/list/index.vue | 6 +-
src/pages/article/add/index.vue | 34 ++++----
src/pages/article/list/index.vue | 1 +
src/pages/column/add/index.vue | 117 +++++++++++++++++++++-----
src/pages/column/list/index.vue | 42 +++++++--
src/pages/setting/list/index.vue | 12 +--
src/pages/setting/list/info.vue | 67 +++++++--------
src/pages/user/list/index.vue | 55 ++++++------
src/setting.js | 2 +-
src/styles/common.scss | 3 +
13 files changed, 252 insertions(+), 139 deletions(-)
diff --git a/src/api/index.js b/src/api/index.js
index ae325ff..475055b 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -1,6 +1,6 @@
import Setting from '@/setting'
const host = Setting.apiBaseURL
-const host1 = 'http://192.168.31.151:10000/'
+const host1 = 'http://192.168.31.136:10000/'
export default {
logins: `iasf/sys/user/login`,
@@ -13,6 +13,9 @@ export default {
depts: `iasf/sys/dept/tree`,
users: `iasf/sys/users`,
user: `iasf/sys/user`,
+ sendPhoneOrEmailCode: `iasf/sys/sendPhoneOrEmailCode`,
+ updatePhoneOrEmail: `iasf/sys/updatePhoneOrEmail`,
+ updateUserAvatars: `${host}iasf/sys/updateUserAvatars`,
staffTemplate: `http://192.168.31.136/用户导入模板.xlsx`,
checkJobNumber: `iasf/sys/checkJobNumber`,
checkUsername: `iasf/sys/checkUsername`,
@@ -28,18 +31,21 @@ export default {
groupUpdate: `iasf/sys/userGroup/update`,
site: `iasf/sys/site/list`,
updateSite: `iasf/sys/site/update`,
- listWithTree: `${host1}iasf/sysColumn/listWithTree`,
- saveColumn: `${host1}iasf/sysColumn/save`,
- updateColumn: `${host1}iasf/sysColumn/update`,
- findColumn: `${host1}iasf/sysColumn/findById`,
- deleteColumn: `${host1}iasf/sysColumn/delete`,
- sameLevelJudgment: `${host1}iasf/sysColumn/sameLevelJudgment`,
- sortByColumn: `${host1}iasf/sysColumn/sortByColumn`,
- checkIfTheTitleIsRepeat: `${host1}iasf/sysContent/checkIfTheTitleIsRepeat`,
- deleteArticle: `${host1}iasf/sysContent/delete`,
- findArticle: `${host1}iasf/sysContent/findById`,
- queryArticle: `${host1}iasf/sysContent/pagingQuery`,
- saveArticle: `${host1}iasf/sysContent/save`,
- updateArticle: `${host1}iasf/sysContent/update`,
- longPageColumnList: `${host1}iasf/pageManagement/longPageColumnList`,
+ listWithTree: `iasf/sysColumn/listWithTree`,
+ saveColumn: `iasf/sysColumn/save`,
+ updateColumn: `iasf/sysColumn/update`,
+ findColumn: `iasf/sysColumn/findById`,
+ deleteColumn: `iasf/sysColumn/delete`,
+ sameLevelJudgment: `iasf/sysColumn/sameLevelJudgment`,
+ sortByColumn: `iasf/sysColumn/sortByColumn`,
+ checkIfTheTitleIsRepeat: `iasf/sysContent/checkIfTheTitleIsRepeat`,
+ deleteArticle: `iasf/sysContent/delete`,
+ findArticle: `iasf/sysContent/findById`,
+ queryArticle: `iasf/sysContent/pagingQuery`,
+ saveArticle: `iasf/sysContent/save`,
+ updateArticle: `iasf/sysContent/update`,
+ longPageColumnList: `iasf/pageManagement/longPageColumnList`,
+ searchAllBySite: `iasf/sysNavigationStyle/searchAllBySite`,
+ updateStyle: `iasf/sysNavigationStyle/update`,
+ saveStyle: `iasf/sysNavigationStyle/save`,
}
\ No newline at end of file
diff --git a/src/components/img-upload/Cropper.vue b/src/components/img-upload/Cropper.vue
index c94b4e3..22854fa 100644
--- a/src/components/img-upload/Cropper.vue
+++ b/src/components/img-upload/Cropper.vue
@@ -84,7 +84,7 @@ export default {
img: '', // 裁剪图片的地址 (默认:空)
size: 0.8, // 裁剪生成图片的质量 (默认:1)
full: true, // 是否输出原图比例的截图 选true生成的图片会非常大 (默认:false)
- outputType: 'jpeg', // 裁剪生成图片的格式 (默认:jpg)
+ outputType: 'jpg', // 裁剪生成图片的格式 (默认:jpg)
canMove: true, // 上传图片是否可以移动 (默认:true)
original: false, // 上传图片按照原始比例渲染 (默认:false)
canMoveBox: true, // 截图框能否拖动 (默认:true)
diff --git a/src/pages/account/login/index.vue b/src/pages/account/login/index.vue
index 1ff5a76..f296b8c 100644
--- a/src/pages/account/login/index.vue
+++ b/src/pages/account/login/index.vue
@@ -68,21 +68,17 @@ export default {
...mapMutations('user', [
'setUserId', 'setUserName'
]),
- getVerImg() { // 获取验证码图片
- this.loginForm.random = Math.floor(Math.random() * 999999999);
- this.verificationIMG = this.api.verification + "?random=" + `${this.loginForm.random}`;
- },
- handleClick(tab, event) { // 切换标签
- this.loginForm.username = "";
- this.$refs.loginForm.clearValidate();
- this.loginRules.username[0].message = tab.index === "1" ? "请输入账号" : "请输入手机号/邮箱";
+ // 获取验证码图片
+ getVerImg() {
+ this.loginForm.random = Math.floor(Math.random() * 999999999);
+ this.verificationIMG = this.api.verification + "?random=" + `${this.loginForm.random}`;
},
submit() {
this.$post(this.api.logins, this.loginForm).then(({ data }) => {
util.local.set(Setting.tokenKey, data.accessToken, Setting.tokenExpires)
addRoutes(data.permissionList[0].children)
util.successMsg('登录成功')
- this.setUserId(data.id)
+ this.setUserId(data.id || 1)
this.setUserName(data.username)
this.$router.push('/site')
}).catch(res => {
diff --git a/src/pages/annex/list/index.vue b/src/pages/annex/list/index.vue
index 06a3c2a..a67db74 100644
--- a/src/pages/annex/list/index.vue
+++ b/src/pages/annex/list/index.vue
@@ -58,7 +58,11 @@
-
+
+
+ {{ scope.row.quote || '--' }}
+
+
{{ scope.row.quote ? '是' : '否' }}
diff --git a/src/pages/article/add/index.vue b/src/pages/article/add/index.vue
index 1600f5f..fd06451 100644
--- a/src/pages/article/add/index.vue
+++ b/src/pages/article/add/index.vue
@@ -112,20 +112,22 @@
-
- -
-
-
-
- {{ item.name }}
-
+
+
+ -
+
+
+
+ {{ item.name }}
+
+
-
+
@@ -202,7 +204,7 @@
发布
预览
保存草稿
- 取消
+ 取消
@@ -216,7 +218,6 @@ export default {
data() {
return {
site: this.$store.state.content.site,
- headers: {},
nameRepeat: false,
types: ColumnConst.types,
templates: ColumnConst.templates,
@@ -234,8 +235,8 @@ export default {
id: this.$route.query.id || '',
founderId: this.$store.state.user.userId,
editorId: this.$store.state.user.userId,
- useArticleTemplate: 0,
- articleTemplate: this.$route.query.columnId ? this.$store.state.content.column.detailStyle : '',
+ templateStatus: 0,
+ articleTemplate: '',
author: '',
bannerImg: '',
columnId: +this.$route.query.columnId,
@@ -277,6 +278,9 @@ export default {
computed: {
...mapState('user', [
'userName'
+ ]),
+ ...mapState('content', [
+ 'column'
])
},
components: {
@@ -296,7 +300,6 @@ export default {
if (this.submiting) {
next()
} else {
- const { id } = this.form
const { updateTime } = this
// 更改了信息才需要提示
if (updateTime > 2) {
@@ -340,6 +343,7 @@ export default {
columnName: '',
templateId: '',
typeId : '',
+ isSort: 0
}).then(({ data }) => {
this.columns = data
let { columnId } = this.$route.query
@@ -459,7 +463,7 @@ export default {
if (!links.length && form.connectionType === 3 && isRelease) return util.errorMsg('请选择栏目')
form.linkAddress = links.join()
}
- if (form.articleTemplate !== 3 && !form.mainBody && isRelease) return util.errorMsg('请输入正文')
+ if (((form.templateStatus && form.articleTemplate === 2) || !form.templateStatus) && !form.mainBody && isRelease) return util.errorMsg('请输入正文')
const { columnId } = form
if (typeof columnId === 'object') form.columnId = columnId[columnId.length - 1]
form.isRelease = isRelease
diff --git a/src/pages/article/list/index.vue b/src/pages/article/list/index.vue
index 3ff6ab5..82c0a0d 100644
--- a/src/pages/article/list/index.vue
+++ b/src/pages/article/list/index.vue
@@ -193,6 +193,7 @@ export default {
columnName: '',
templateId: '',
typeId : '',
+ isSort: 0
}).then(({ data }) => {
this.columns = data
this.$nextTick(() => {
diff --git a/src/pages/column/add/index.vue b/src/pages/column/add/index.vue
index 861fd4c..8ea8c40 100644
--- a/src/pages/column/add/index.vue
+++ b/src/pages/column/add/index.vue
@@ -1,5 +1,5 @@
-
+
栏目
@@ -70,6 +70,14 @@
+
+
+
确定
- 取消
+ 取消
+
+
+
+