修复:内测问题修改
This commit is contained in:
@@ -172,10 +172,11 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { ref, onMounted, computed } from 'vue'
|
||||
import { onShow } from '@dcloudio/uni-app'
|
||||
import { homeApi } from '@/api/modules/book_home'
|
||||
import { getNotchHeight } from '@/utils/system'
|
||||
import { useUserStore } from '@/stores/user'
|
||||
import BookPrice from '@/components/book/BookPrice.vue'
|
||||
import type {
|
||||
IBook,
|
||||
@@ -184,6 +185,8 @@ import type {
|
||||
IVipInfo
|
||||
} from '@/types/book'
|
||||
|
||||
const userStore = useUserStore()
|
||||
|
||||
// 状态定义
|
||||
const showMyBooks = ref(false)
|
||||
const showActivity = ref(false)
|
||||
@@ -208,17 +211,7 @@ const currentLevel1Index = ref(0)
|
||||
const currentLevel2Index = ref(0)
|
||||
|
||||
// VIP信息
|
||||
const vipInfo = ref<IVipInfo | null>(null)
|
||||
|
||||
/**
|
||||
* 获取VIP信息
|
||||
*/
|
||||
const getVipInfo = async () => {
|
||||
const res = await homeApi.getVipInfo()
|
||||
if (res.vipInfo) {
|
||||
vipInfo.value = res.vipInfo
|
||||
}
|
||||
}
|
||||
const vipInfo = computed(() => userStore.userInfo?.userEbookVip?.[0] || null)
|
||||
|
||||
/**
|
||||
* 获取我的书单
|
||||
@@ -388,7 +381,6 @@ onMounted(() => {
|
||||
*/
|
||||
onShow(() => {
|
||||
// 刷新数据
|
||||
getVipInfo()
|
||||
getMyBooks()
|
||||
getRecommendBooks()
|
||||
getActivityLabels()
|
||||
|
||||
Reference in New Issue
Block a user