feat:合并

This commit is contained in:
lixg
2022-12-18 21:08:32 +08:00
4 changed files with 4884 additions and 4865 deletions

View File

@@ -15,7 +15,8 @@
"axios": "^1.1.3", "axios": "^1.1.3",
"core-js": "^3.26.0", "core-js": "^3.26.0",
"dayjs": "^1.11.6", "dayjs": "^1.11.6",
"element-plus": "^2.2.20", "element-plus": "^2.2.27",
"json-bigint": "^1.0.0",
"vue": "^3.2.45", "vue": "^3.2.45",
"vue-router": "^4.1.6", "vue-router": "^4.1.6",
"vuex": "^4.1.0" "vuex": "^4.1.0"

9722
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,8 @@ import router from "@/router";
import { reactive, ref, toRefs, watch } from "vue"; import { reactive, ref, toRefs, watch } from "vue";
import axios from 'axios'; import axios from 'axios';
import { getCookie } from "@/api/utils"; import { getCookie } from "@/api/utils";
import JSONBigInt from 'json-bigint';
const JSONBigIntStr = JSONBigInt({ storeAsString: true });
export function usePage(_url, param) { export function usePage(_url, param) {
const state = reactive({ const state = reactive({
@@ -130,19 +131,16 @@ export async function boeRequest(_url, params) {
} }
} }
const body = method !== 'get' ? params || {} : {} const body = method !== 'get' ? params || {} : {}
return axios({ return fetch(url,{
url,
method, method,
headers: { headers:{
token: getCookie('token'), token: getCookie('token'),
...method !== 'get' ? { 'Content-Type': 'application/json' } : {} ...method !== 'get' ? {'Content-Type': 'application/json'} : {}
}, },
baseURL: '', ...method !== 'get' ? {body: JSON.stringify(body)} : {}
...method !== 'get' ? { data: JSON.stringify(body) } : {} }).then(res=>{
}).then(resp => resp.data).then(response => { return res.text()
return response }).then(res=>{
}).catch(e => { return JSONBigIntStr.parse(res)
console.log(e)
// router.push({path: '/login'})
}) })
} }

View File

@@ -422,7 +422,7 @@ function toFinish(d, sName, chapterId) {
router.push({ router.push({
path: types.value.path[d.type], path: types.value.path[d.type],
query: { query: {
id: d.routerTaskId, id: d.projectTaskId,
type: 2, type: 2,
courseId: d.courseId, courseId: d.courseId,
pName: data.value.name, pName: data.value.name,