refactor(report): 重构报告页面 API 调用
-将 pages/report/api.js 中的 API 定义移动到 sheep/api/report/index.js - 更新 pages/report/index.vue 中的 API 调用引用 - 删除 pages/report/api.js 中的未使用 API 定义 - 优化 sheep/api/report/index.js 中的 API 定义结构
This commit is contained in:
+2
-2
@@ -1,8 +1,8 @@
|
||||
import { request } from "../../http/index.js";
|
||||
let baseUrl = "https://llshop.zglvling.com/soapi/";
|
||||
// let baseUrl = "https://test.zglvling.com/soapi/";
|
||||
// const praiseTextApi = (params) =>
|
||||
// request.post(baseUrl + "ai/praiseTexttwo", params);
|
||||
const praiseTextApi = (params) =>
|
||||
request.post(baseUrl + "ai/praiseTexttwo", params);
|
||||
const userFaceInoApi = (params) =>
|
||||
request.post(baseUrl + "userinfo/get_user_face_info", params);
|
||||
const hairstyleListApi = (params) =>
|
||||
|
||||
+11
-11
@@ -399,16 +399,6 @@ import {
|
||||
faceList,
|
||||
shengxiaoImgList,
|
||||
} from "./database";
|
||||
import {
|
||||
praiseTextApi,
|
||||
userFaceInoApi,
|
||||
exchangeHairHistoryByTaskId,
|
||||
wardrobeListApi,
|
||||
getStyleApi,
|
||||
hairStyleListApi,
|
||||
addHairApi,
|
||||
getHairApi,
|
||||
} from "./api";
|
||||
import {
|
||||
uploadFormData,
|
||||
downloadFile,
|
||||
@@ -426,6 +416,16 @@ import CustomSwiper from "./component/CustomSwiper/CustomSwiper";
|
||||
import SensoryTypes from "./component/FirstStyleType/SensoryTypes.vue";
|
||||
import TypeOfMass from "./component/FirstStyleType/TypeOfMass.vue";
|
||||
import Movementtype from "./component/FirstStyleType/Movementtype.vue";
|
||||
import ReportApi from "../../sheep/api/report";
|
||||
const {
|
||||
praiseTextApi,
|
||||
getStyleApi,
|
||||
exchangeHairHistoryByTaskId,
|
||||
wardrobeListApi,
|
||||
hairStyleListApi,
|
||||
addHairApi,
|
||||
getHairApi,
|
||||
} = ReportApi;
|
||||
// if (
|
||||
// typeof window !== "undefined" &&
|
||||
// /MicroMessenger/i.test(navigator.userAgent)
|
||||
@@ -1105,7 +1105,7 @@ const getHair = async (data) => {
|
||||
return res.data;
|
||||
};
|
||||
const getUserFaceInfo = async () => {
|
||||
userFaceInoApi({ openId: openId }).then(async (res) => {
|
||||
getStyleApi({ openId: openId }).then(async (res) => {
|
||||
newColorTypeList.value = reorderByValue(
|
||||
colorTypeList,
|
||||
res?.detail?.sj_color_type
|
||||
|
||||
Reference in New Issue
Block a user