commit
This commit is contained in:
@@ -89,8 +89,7 @@ export default {
|
||||
if (_this) {
|
||||
_this[loading] = true
|
||||
}
|
||||
const prefix = config.prefix || '/api/'
|
||||
_axios.post(prefix + '/' + url + '?' + new Date().getTime(), _formData).then(res => {
|
||||
_axios.post(api() + url + '?' + new Date().getTime(), _formData).then(res => {
|
||||
if (_this && loading) { _this[loading] = false }
|
||||
if (res.data.ok !== undefined && showTips) {
|
||||
let type = res.data.ok ? 'success' : 'warning'
|
||||
@@ -132,8 +131,7 @@ export default {
|
||||
if (_this) {
|
||||
_this[loading] = true
|
||||
}
|
||||
const prefix = config.prefix || '/api/'
|
||||
_axios.post(prefix + '/' + url + '?' + new Date().getTime(), param).then(res => {
|
||||
_axios.post(api() + url + '?' + new Date().getTime(), param).then(res => {
|
||||
if (_this && loading) { _this[loading] = false }
|
||||
if (res.data.ok !== undefined && showTips) {
|
||||
let type = res.data.ok ? 'success' : 'warning'
|
||||
@@ -172,8 +170,7 @@ export default {
|
||||
if (_this) {
|
||||
_this[loading] = true
|
||||
}
|
||||
const prefix = config.prefix || '/api/'
|
||||
_axios.post(prefix + '/' + url + '?' + new Date().getTime(), _formData).then(res => {
|
||||
_axios.post(api() + url + '?' + new Date().getTime(), _formData).then(res => {
|
||||
if (_this && loading) { _this[loading] = false }
|
||||
thenFun.call(this, res.data)
|
||||
}).catch(err => {
|
||||
@@ -205,8 +202,8 @@ export default {
|
||||
if (_this) {
|
||||
_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 }
|
||||
// 返回data对象
|
||||
if (res.ok !== undefined) {
|
||||
|
||||
Reference in New Issue
Block a user