mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-student.git
synced 2025-12-11 03:46:48 +08:00
init
This commit is contained in:
@@ -2,6 +2,7 @@ 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 {BASE} from "@/api/api";
|
||||||
|
|
||||||
export function usePage(_url, param) {
|
export function usePage(_url, param) {
|
||||||
|
|
||||||
@@ -82,7 +83,7 @@ export async function request(_url, params) {
|
|||||||
}
|
}
|
||||||
const body = method !== 'get' ? params || {} : {}
|
const body = method !== 'get' ? params || {} : {}
|
||||||
return axios({
|
return axios({
|
||||||
url,
|
url: BASE + url,
|
||||||
method,
|
method,
|
||||||
headers: {
|
headers: {
|
||||||
'X-Token': localStorage.getItem('token'),
|
'X-Token': localStorage.getItem('token'),
|
||||||
|
|||||||
Reference in New Issue
Block a user