This commit is contained in:
宋伟佳
2021-06-16 13:44:27 +08:00
parent 8beae2f334
commit fc66a89e5b
3 changed files with 6 additions and 17 deletions
+5 -8
View File
@@ -89,8 +89,7 @@ export default {
if (_this) { if (_this) {
_this[loading] = true _this[loading] = true
} }
const prefix = config.prefix || '/api/' _axios.post(api() + url + '?' + new Date().getTime(), _formData).then(res => {
_axios.post(prefix + '/' + url + '?' + new Date().getTime(), _formData).then(res => {
if (_this && loading) { _this[loading] = false } if (_this && loading) { _this[loading] = false }
if (res.data.ok !== undefined && showTips) { if (res.data.ok !== undefined && showTips) {
let type = res.data.ok ? 'success' : 'warning' let type = res.data.ok ? 'success' : 'warning'
@@ -132,8 +131,7 @@ export default {
if (_this) { if (_this) {
_this[loading] = true _this[loading] = true
} }
const prefix = config.prefix || '/api/' _axios.post(api() + url + '?' + new Date().getTime(), param).then(res => {
_axios.post(prefix + '/' + url + '?' + new Date().getTime(), param).then(res => {
if (_this && loading) { _this[loading] = false } if (_this && loading) { _this[loading] = false }
if (res.data.ok !== undefined && showTips) { if (res.data.ok !== undefined && showTips) {
let type = res.data.ok ? 'success' : 'warning' let type = res.data.ok ? 'success' : 'warning'
@@ -172,8 +170,7 @@ export default {
if (_this) { if (_this) {
_this[loading] = true _this[loading] = true
} }
const prefix = config.prefix || '/api/' _axios.post(api() + url + '?' + new Date().getTime(), _formData).then(res => {
_axios.post(prefix + '/' + url + '?' + new Date().getTime(), _formData).then(res => {
if (_this && loading) { _this[loading] = false } if (_this && loading) { _this[loading] = false }
thenFun.call(this, res.data) thenFun.call(this, res.data)
}).catch(err => { }).catch(err => {
@@ -205,8 +202,8 @@ export default {
if (_this) { if (_this) {
_this[loading] = true _this[loading] = true
} }
const prefix = config.prefix || '/api/'
_axios.get(prefix + '/' + url + '?_t=' + new Date().getTime(), { params: param, cancelToken: config.cancelToken }).then(res => { _axios.get(api() + url + '?_t=' + new Date().getTime(), { params: param, cancelToken: config.cancelToken }).then(res => {
if (_this && loading) { _this[loading] = false } if (_this && loading) { _this[loading] = false }
// 返回data对象 // 返回data对象
if (res.ok !== undefined) { if (res.ok !== undefined) {
@@ -1878,8 +1878,7 @@ export default {
this.sarMenu.parentIds = this.selectSarMenu.id this.sarMenu.parentIds = this.selectSarMenu.id
} }
this.$http.post('lawss/sarMenu/addSarMenu', this.sarMenu, { this.$http.post('lawss/sarMenu/addSarMenu', this.sarMenu, {
_this: this, _this: this
prefix: '/foton'
}, res => { }, res => {
this.selectMenu() // 新增成功后,更新二级菜单 this.selectMenu() // 新增成功后,更新二级菜单
this.menuModalFlag = false this.menuModalFlag = false
-7
View File
@@ -91,13 +91,6 @@ module.exports = {
pathRewrite: { pathRewrite: {
'^/onlyOffice': '/api' '^/onlyOffice': '/api'
} }
},
'/foton': {
target: 'http://39.98.140.126:10005',
changeOrigin: true,
pathRewrite: {
'^/foton': '/api'
}
} }
} }
} }