diff --git a/hchyun-ui/src/api/tool/regular.js b/hchyun-ui/src/api/tool/regular.js index ec08ffe..6774468 100644 --- a/hchyun-ui/src/api/tool/regular.js +++ b/hchyun-ui/src/api/tool/regular.js @@ -3,7 +3,7 @@ import request from '@/utils/request' // 查询校验规则列表 export function listRegular(query) { return request({ - url: '/system/regular/list', + url: '/tool/regular/list', method: 'get', params: query }) @@ -12,7 +12,7 @@ export function listRegular(query) { // 查询校验规则详细 export function getRegular(id) { return request({ - url: '/system/regular/' + id, + url: '/tool/regular/' + id, method: 'get' }) } @@ -20,7 +20,7 @@ export function getRegular(id) { // 新增校验规则 export function addRegular(data) { return request({ - url: '/system/regular', + url: '/tool/regular', method: 'post', data: data }) @@ -29,7 +29,7 @@ export function addRegular(data) { // 修改校验规则 export function updateRegular(data) { return request({ - url: '/system/regular', + url: '/tool/regular', method: 'put', data: data }) @@ -38,7 +38,7 @@ export function updateRegular(data) { // 删除校验规则 export function delRegular(id) { return request({ - url: '/system/regular/' + id, + url: '/tool/regular/' + id, method: 'delete' }) } @@ -50,4 +50,4 @@ export function exportRegular(query) { method: 'get', params: query }) -} \ No newline at end of file +} diff --git a/hchyun-ui/src/store/modules/user.js b/hchyun-ui/src/store/modules/user.js index 767d334..ba870b4 100644 --- a/hchyun-ui/src/store/modules/user.js +++ b/hchyun-ui/src/store/modules/user.js @@ -51,7 +51,8 @@ const user = { return new Promise((resolve, reject) => { getInfo(state.token).then(res => { const user = res.user - const avatar = user.avatar == "" ? require("@/assets/image/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar; + // const avatar = user.avatar == "" ? require("@/assets/image/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar; + const avatar = user.avatar == "" ? require("@/assets/image/profile.jpg") : user.avatar; if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组 commit('SET_ROLES', res.roles) commit('SET_PERMISSIONS', res.permissions) @@ -66,7 +67,7 @@ const user = { }) }) }, - + // 退出系统 LogOut({ commit, state }) { return new Promise((resolve, reject) => { diff --git a/hchyun-ui/src/utils/fileUtils.js b/hchyun-ui/src/utils/fileUtils.js index 89af810..33396d4 100644 --- a/hchyun-ui/src/utils/fileUtils.js +++ b/hchyun-ui/src/utils/fileUtils.js @@ -22,7 +22,7 @@ export function uploadFile(data) { } }).then(res => { if (res.data.code === 200) { - return res.data + return res.data.data } else { Message({ message: res.data.msg, diff --git a/hchyun-ui/src/views/system/user/profile/userAvatar.vue b/hchyun-ui/src/views/system/user/profile/userAvatar.vue index 37ae1dd..9606bc5 100644 --- a/hchyun-ui/src/views/system/user/profile/userAvatar.vue +++ b/hchyun-ui/src/views/system/user/profile/userAvatar.vue @@ -126,7 +126,9 @@ export default { formData.append("avatarfile", data); uploadAvatar(formData).then(response => { this.open = false; - this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl; + // this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl; + + this.options.img = response.imgUrl; store.commit('SET_AVATAR', this.options.img); this.msgSuccess("修改成功"); this.visible = false; @@ -139,4 +141,4 @@ export default { } } }; - \ No newline at end of file + diff --git a/hchyun-ui/src/views/test/downloadtest.vue b/hchyun-ui/src/views/test/downloadtest.vue index 8a6b367..09560c9 100644 --- a/hchyun-ui/src/views/test/downloadtest.vue +++ b/hchyun-ui/src/views/test/downloadtest.vue @@ -1,18 +1,18 @@