diff --git a/src/.env.development b/src/.env.development index b8b6bd0f87f130b6a725ca7f83fd31ec28a7e033..4355ff68582168eb9a3cdf5ddceb3253d6729027 100644 --- a/src/.env.development +++ b/src/.env.development @@ -13,5 +13,5 @@ VITE_APP_BASE_API = 'http://localhost:3000' # proxy代理配置 # 例如:VITE_APP_TARGET_URL = "http://vapi.youlai.tech" # VITE_APP_TARGET_URL = "http://localhost:5173" # 线上接口 -VITE_APP_TARGET_URL = "http://43.139.205.178:3000" # 线上接口 +VITE_APP_TARGET_URL = "http://123.57.181.60:3000" # 线上接口 VITE_APP_TARGET_BASE_API = '' \ No newline at end of file diff --git a/src/api/login/index.ts b/src/api/login/index.ts index 0b936801649535b3a87b720530e658fd231b536c..b2a3ff569340cec7bdcd2effd3967c7f4b996a76 100644 --- a/src/api/login/index.ts +++ b/src/api/login/index.ts @@ -8,6 +8,9 @@ const apiPath = { login: '/login/cellphone', logout: '/logout', code: '/captcha/sent', + qr: '/login/qr/key', + qrcreate: "/login/qr/create", + qrcheck: "/login/qr/check" } /** @@ -67,3 +70,19 @@ export function logout(params: loginType.LogoutParams) { } +/** + * 说明:调用此接,生成一个key + */ +export function qr() { + return request({ + url: apiPath.qr, + method: "get" + }) +} +export function qrcreate(){ + return request({ + url:apiPath.qrcheck, + method:"get" + }) +} +111 \ No newline at end of file diff --git a/src/api/user/index.ts b/src/api/user/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..23d88bdc21b4a72d19b85a002a7f33f7ca8b280c --- /dev/null +++ b/src/api/user/index.ts @@ -0,0 +1,19 @@ +import request from "@/utils/request"; + +// 用户相关api +const apiPath = { + userList: "/user/detail", // 获取用户详情 +}; + +/** + * 用户信息 + * @说明 : 登录后调用此接口 , 传入用户 id, 可获取用户播放记录 + * @必选参数 : uid : 用户 id + */ +export function getUserList(params: { uid: number; }) { + return request({ + url: apiPath.userList, + method: "get", + params, + }); +} diff --git a/src/components/createSongSheet.vue b/src/components/createSongSheet.vue index 54eed2f2dc1ecb510b2e7bde81b191a28e54fdfa..2de5d17d151dc1487be63b0bf4fb8d80e1cf6f83 100644 --- a/src/components/createSongSheet.vue +++ b/src/components/createSongSheet.vue @@ -14,7 +14,7 @@ -@/api/userVip diff --git a/src/views/home/My/my.vue b/src/views/home/My/my.vue new file mode 100644 index 0000000000000000000000000000000000000000..bed9da203d4ade7833791841aac99c8097730bed --- /dev/null +++ b/src/views/home/My/my.vue @@ -0,0 +1,166 @@ + + + + + + {{ getUser()?.userName }} + + {{ userDital.follows }}关注 {{ userDital.followeds + }}粉丝 {{ userDital.authority }}获赞 + + {{ getAge(userDital.birthday) }}岁 + + + + 创建的歌单 + + + + + + {{ item.name }} + + + + + + + + + \ No newline at end of file diff --git a/src/views/home/myLike/index.vue b/src/views/home/myLike/index.vue index d32c0336341bd30856e52e6f7bd9f6be748a9c58..5ca0732af6a552730becfcf6568a7142208b0158 100644 --- a/src/views/home/myLike/index.vue +++ b/src/views/home/myLike/index.vue @@ -36,16 +36,18 @@ const loading = ref(true) onMounted(async () => { // 获取音乐详情 + console.log(musicLikeListId.value) const data = await getMusicDetail({ ids: musicLikeListId.value.join(",") }) + console.log(data) // 判断返回状态 if (data.code === "success") { // 判断返回状态码 if (data.data.code === 200) { // 将返回的数据赋值给likeList likeList.value = data.data.songs ? data.data.songs : [] - // 将loading设置为false - loading.value = false } + // 将loading设置为false + loading.value = false } }) //播放当前全部历史歌曲