Merge branch 'main' of https://git.nuttyreading.com/zm/taimed-international-app into 12.26
This commit is contained in:
@@ -101,6 +101,7 @@
|
||||
<!-- 活动图书模块 -->
|
||||
<view class="activity-block">
|
||||
<Skeleton
|
||||
ref="activityLabelsSkeleton"
|
||||
theme="image-card"
|
||||
:size="Array(5).fill({ height:'28px', width: '18%' })"
|
||||
:request="getActivityLabels"
|
||||
@@ -272,6 +273,7 @@ const myBookSkeleton = ref()
|
||||
const recommendBooksSkeleton = ref()
|
||||
|
||||
// 活动图书
|
||||
const activityLabelsSkeleton = ref()
|
||||
const activityBooksSkeleton = ref()
|
||||
const activityLabelList = ref<ILabel[]>([])
|
||||
const currentActivityIndex = ref(0)
|
||||
@@ -443,6 +445,7 @@ const handleRefresh = async () => {
|
||||
await Promise.all([
|
||||
myBookSkeleton.value?.reload(),
|
||||
recommendBooksSkeleton.value?.reload(),
|
||||
activityLabelsSkeleton.value?.reload(),
|
||||
categoryLevel1LabelSkeleton.value?.reload()
|
||||
])
|
||||
} catch (error) {
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
>
|
||||
<text class="label">{{ item.label }}</text>
|
||||
<view class="value-wrapper">
|
||||
<text class="value">{{ item.value }}</text>
|
||||
<wd-loading v-if="item.id === 4 && !isUpdateAvailable" :size="16" color="#cccccc" />
|
||||
<text v-else class="value">{{ item.value }}</text>
|
||||
<wd-icon name="arrow-right" size="16px" color="#aaa" />
|
||||
</view>
|
||||
</view>
|
||||
@@ -73,7 +74,7 @@ import { useI18n } from 'vue-i18n'
|
||||
import { useMessage } from '@/uni_modules/wot-design-uni'
|
||||
import { makePhoneCall, copyToClipboard } from '@/utils/index'
|
||||
// #ifdef APP-PLUS
|
||||
import update from "@/uni_modules/uni-upgrade-center-app/utils/check-update";
|
||||
import checkUpdate from "@/uni_modules/uni-upgrade-center-app/utils/check-update";
|
||||
import { getCurrentVersion } from '@/uni_modules/uni-upgrade-center-app/utils/call-check-version'
|
||||
// #endif
|
||||
|
||||
@@ -211,11 +212,13 @@ const selectLanguage = (languageCode: string) => {
|
||||
/**
|
||||
* 检查版本更新
|
||||
*/
|
||||
const isUpdateAvailable = ref(true)
|
||||
const checkVersion = async () => {
|
||||
// #ifdef APP-PLUS
|
||||
uni.showLoading()
|
||||
if (!isUpdateAvailable.value) return
|
||||
isUpdateAvailable.value = false
|
||||
try {
|
||||
const info = await update();
|
||||
const info = await checkUpdate();
|
||||
if(info.result.code == 0){
|
||||
uni.showToast({
|
||||
title:info.result.message,
|
||||
@@ -223,15 +226,14 @@ const checkVersion = async () => {
|
||||
})
|
||||
}
|
||||
} catch (error: any) {
|
||||
console.error('版本检测失败:', error)
|
||||
const msg = error?.hasOwnProperty('message') && error.message
|
||||
uni.showToast({
|
||||
title: msg || t('user.checkVersionFailed'),
|
||||
title: msg || error || t('global.queryFailed'),
|
||||
icon: 'none',
|
||||
duration: 5000
|
||||
})
|
||||
} finally {
|
||||
uni.hideLoading()
|
||||
isUpdateAvailable.value = true
|
||||
}
|
||||
|
||||
// #endif
|
||||
|
||||
Reference in New Issue
Block a user