This commit is contained in:
Pengxiansen
2025-02-13 19:12:59 +08:00
parent e04ee4a408
commit 535a1ad419
3 changed files with 7 additions and 6 deletions

View File

@@ -70,7 +70,7 @@ export function useRequest(_url, params = {}, callback) {
};
}
export async function request(_url, params) {
export async function growthRequest(_url, params) {
const s = _url.split(' ')
let url = s[0]
const method = s[1]?.toLowerCase() || 'get'

View File

@@ -456,7 +456,8 @@
<script setup>
import { computed, onMounted, ref, watch, reactive } from "vue";
import { ElMessage } from "element-plus";
import { request } from "@/api/growthRequest";
import { request } from "@/api/request";
import { growthRequest } from "@/api/growthRequest";
import {
CompletionList,
EvaluationToLearn,
@@ -547,7 +548,7 @@ console.log(data);
const loading = ref(false);
const getList = () => {
loading.value = true;
request(PROFESSIONAL_STUDENT_TASKLIST, {
growthRequest(PROFESSIONAL_STUDENT_TASKLIST, {
growthId: routerId,
...queryParams,
}).then((res) => {

View File

@@ -182,7 +182,7 @@
<script setup>
import { computed, reactive, onMounted, onUnmounted, ref } from "vue";
import { useRoute } from "vue-router";
import { useRequest, request } from "@/api/growthRequest";
import { useRequest, growthRequest } from "@/api/growthRequest";
import { useStore } from "vuex";
import {
PROFESSIONAL_STUDENT_TASKLIST,
@@ -214,7 +214,7 @@ const tabClick = (type, status) => {
const loading = ref(false);
const getList = () => {
loading.value = true;
request(PROFESSIONAL_STUDENT_TASKLIST, {
growthRequest(PROFESSIONAL_STUDENT_TASKLIST, {
growthId: routerId,
...queryParams,
}).then((res) => {
@@ -231,7 +231,7 @@ onMounted(() => {
});
function toFinish(item) {
request(PROFESSIONAL_STUDENT_LEARN, {
growthRequest(PROFESSIONAL_STUDENT_LEARN, {
growthId: routerId,
taskId: item.taskId,
});