mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-10 11:26:45 +08:00
Merge branch 'develop' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage into develop
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import { reactive, ref, toRefs, watch } from "vue";
|
||||
import { getCookie } from "@/api/method";
|
||||
import {reactive, ref, toRefs, watch} from "vue";
|
||||
import {getCookie} from "@/api/method";
|
||||
import JSONBigInt from 'json-bigint';
|
||||
|
||||
const JSONBigIntStr = JSONBigInt({ storeAsString: true });
|
||||
const JSONBigIntStr = JSONBigInt({storeAsString: true});
|
||||
|
||||
export function useBoeApiPage(_url, params = {}, config = {
|
||||
init: true,
|
||||
result: res => res.result,
|
||||
@@ -138,14 +139,14 @@ export async function request(_url, params) {
|
||||
}
|
||||
}
|
||||
const body = method !== 'get' ? params || {} : {}
|
||||
url = process.env.VUE_APP_BOE_API_URL + url
|
||||
url = process.env.NODE_ENV === 'development' ? url : process.env.VUE_APP_BOE_API_URL + url
|
||||
return fetch(url, {
|
||||
method,
|
||||
headers: {
|
||||
token: getCookie('token'),
|
||||
...method !== 'get' ? { 'Content-Type': 'application/json' } : {}
|
||||
...method !== 'get' ? {'Content-Type': 'application/json'} : {}
|
||||
},
|
||||
...method !== 'get' ? { body: JSON.stringify(body) } : {}
|
||||
...method !== 'get' ? {body: JSON.stringify(body)} : {}
|
||||
}).then(res => {
|
||||
return res.text()
|
||||
}).then(res => {
|
||||
|
||||
Reference in New Issue
Block a user