接入练习数据接口
This commit is contained in:
@@ -1,12 +1,18 @@
|
||||
<script setup>
|
||||
import Container from "@/components/Container.vue";
|
||||
import Avatar from "@/components/Avatar.vue";
|
||||
import { getPractiseResultListAPI } from "@/apis";
|
||||
|
||||
import { ref } from "vue";
|
||||
|
||||
const selectedIndex = ref(0);
|
||||
const practiseList = ref([]);
|
||||
|
||||
const handleSelect = (index) => {
|
||||
const handleSelect = async (index) => {
|
||||
if (index === 2) {
|
||||
const result = await getPractiseResultListAPI();
|
||||
practiseList.value = result.list;
|
||||
}
|
||||
selectedIndex.value = index;
|
||||
};
|
||||
</script>
|
||||
@@ -104,11 +110,11 @@ const handleSelect = (index) => {
|
||||
}"
|
||||
>
|
||||
<view
|
||||
v-for="(_, index) in new Array(6).fill(0)"
|
||||
v-for="(item, index) in practiseList"
|
||||
:key="index"
|
||||
class="practice-record"
|
||||
>
|
||||
<text>单组练习 2025.01.21 14:09:23</text>
|
||||
<text>单组练习 {{ item.createdAt }}</text>
|
||||
<image src="../static/back.png" mode="widthFix" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user