Merge branch 'main' of https://git.nuttyreading.com/zm/taimed-international-app
This commit is contained in:
@@ -66,12 +66,15 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import { ref, computed } from 'vue'
|
||||
import { useSysStore } from '@/stores/sys'
|
||||
import { useUserStore } from '@/stores/user'
|
||||
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";
|
||||
// #endif
|
||||
|
||||
const { t, locale } = useI18n()
|
||||
const sysStore = useSysStore()
|
||||
@@ -81,7 +84,6 @@ const message = useMessage()
|
||||
|
||||
// 导航栏高度
|
||||
const statusBarHeight = ref(0)
|
||||
const navbarHeight = ref('44px')
|
||||
|
||||
// 弹窗状态
|
||||
const showQrCode = ref(false)
|
||||
@@ -89,8 +91,8 @@ const showLanguageSelect = ref(false)
|
||||
|
||||
// 可选语言列表
|
||||
const availableLanguages = computed(() => [
|
||||
{ code: 'en', name: t('locale.en') },
|
||||
{ code: 'zh-Hans', name: t('locale.zh-hans') }
|
||||
{ code: 'zh-Hans', name: t('locale.zh-hans') },
|
||||
{ code: 'en', name: t('locale.en') }
|
||||
])
|
||||
|
||||
// 获取当前语言名称
|
||||
@@ -134,22 +136,6 @@ const settingItems = computed(() => [
|
||||
}
|
||||
])
|
||||
|
||||
/**
|
||||
* 获取导航栏高度
|
||||
*/
|
||||
const getNavbarHeight = () => {
|
||||
const systemInfo = uni.getSystemInfoSync()
|
||||
statusBarHeight.value = systemInfo.statusBarHeight || 0
|
||||
|
||||
let navBarHeight = 44
|
||||
if (systemInfo.model.indexOf('iPhone') !== -1 && parseInt(systemInfo.model.slice(-2)) >= 11) {
|
||||
navBarHeight = 48
|
||||
}
|
||||
|
||||
const totalHeight = statusBarHeight.value + navBarHeight
|
||||
navbarHeight.value = totalHeight + 'px'
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理设置项点击
|
||||
*/
|
||||
@@ -221,13 +207,16 @@ const selectLanguage = (languageCode: string) => {
|
||||
/**
|
||||
* 检查版本更新
|
||||
*/
|
||||
const checkVersion = () => {
|
||||
const checkVersion = async () => {
|
||||
// #ifdef APP-PLUS
|
||||
// TODO: 集成 uni-upgrade-center-app 插件
|
||||
uni.showToast({
|
||||
title: '当前已是最新版本',
|
||||
icon: 'none'
|
||||
})
|
||||
var info = await update();
|
||||
console.log('版本检测信息', info)
|
||||
if(info.result.code == 0){
|
||||
uni.showToast({
|
||||
title:info.result.message,
|
||||
icon:'none'
|
||||
})
|
||||
}
|
||||
// #endif
|
||||
|
||||
// #ifndef APP-PLUS
|
||||
@@ -283,10 +272,6 @@ const performLogout = () => {
|
||||
url: '/pages/login/login'
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getNavbarHeight()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user