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 @@ - + + +