完成部分接口联调

This commit is contained in:
XGL-THINKPAD-X1\rucky
2024-01-16 17:43:41 +08:00
parent 3c258cff70
commit 27b1eab2ce
8 changed files with 182 additions and 19 deletions

View File

@@ -4,9 +4,12 @@ import gsap from "gsap";
import { debounceTap } from "@/plugins";
import Preloader from "@/plugins/Preloader";
import { loadImg, pageImg } from "@/data/imgList";
import {getMyPrize} from '@/api'
import {useMainStore} from '@/store'
// 页面配置初始化
const emit = defineEmits(["LoadPage"]);
const userStore = useMainStore()
const loadNum = ref(0);
@@ -43,6 +46,13 @@ onMounted(() => {
duration: 0.2,
autoAlpha: 1,
onComplete: () => {
getMyPrize({},userStore.token).then(
res=>{
if(res.code == 0){
console.log('我的奖品',res);
}
}
)
Preloader({
name: "内页资源",
imgs: pageImg,
@@ -53,6 +63,7 @@ onMounted(() => {
},
}).then((res) => {
console.log("加载完成");
gsap.to(".LoadPage", {
duration: 1,
autoAlpha: 0,
@@ -65,6 +76,9 @@ onMounted(() => {
});
});
});
</script>
<template>