From 779a356c0b4731cbb1bb7616ad9bb40465f4914c Mon Sep 17 00:00:00 2001 From: zzc <1761997216@qq.com> Date: Sun, 25 Jan 2026 22:49:50 +0800 Subject: [PATCH] fix: avatar --- .hbuilderx/launch.json | 16 ++++++++++++++++ api/avatar.js | 8 ++++++++ pages/avatar/index.vue | 2 +- utils/request.js | 5 +++-- 4 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 .hbuilderx/launch.json diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json new file mode 100644 index 0000000..81f13f4 --- /dev/null +++ b/.hbuilderx/launch.json @@ -0,0 +1,16 @@ +{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ + // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 + "version": "0.0", + "configurations": [{ + "default" : + { + "launchtype" : "local" + }, + "mp-weixin" : + { + "launchtype" : "local" + }, + "type" : "uniCloud" + } + ] +} diff --git a/api/avatar.js b/api/avatar.js index 0bce033..0226466 100644 --- a/api/avatar.js +++ b/api/avatar.js @@ -1,5 +1,13 @@ import { request } from "@/utils/request.js"; +export const getAvatarSystemList = async (page = 1) => { + return request({ + url: `/api/blessing/avatar/system/list?page=${page}`, + method: "GET", + }); +}; + + export const avatarDownloadRecord = async (data) => { return request({ url: "/api/blessing/avatar/download", diff --git a/pages/avatar/index.vue b/pages/avatar/index.vue index ca9ebea..ce5b496 100644 --- a/pages/avatar/index.vue +++ b/pages/avatar/index.vue @@ -123,7 +123,7 @@ import { getShareReward, abilityCheck, } from "@/api/system.js"; -import { avatarDownloadRecord } from "@/api/avatar.js"; +import { avatarDownloadRecord, getAvatarSystemList } from "@/api/avatar.js"; const userStore = useUserStore(); const loginPopupRef = ref(null); diff --git a/utils/request.js b/utils/request.js index 07a5e38..77efa9e 100644 --- a/utils/request.js +++ b/utils/request.js @@ -1,6 +1,7 @@ // const BASE_URL = 'https://apis.lihailezzc.com' -// const BASE_URL = 'http://127.0.0.1:3999' -const BASE_URL = "http://192.168.1.3:3999"; +const BASE_URL = 'http://127.0.0.1:3999' +// const BASE_URL = "http://192.168.1.3:3999"; +// const BASE_URL = "http://192.168.31.253:3999"; import { useUserStore } from "@/stores/user"; // 环境区分