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