21
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
zpc 2026-04-05 17:48:29 +08:00
parent 3c81e81738
commit 6f4834d34a
4 changed files with 21 additions and 1 deletions

View File

@ -2,6 +2,7 @@
"version" : "1.0",
"configurations" : [
{
"customPlaygroundType" : "local",
"playground" : "standard",
"type" : "uni-app:app-android"
}

View File

@ -37,6 +37,9 @@
<text class="empty-text">暂无可用功能模块</text>
</view>
</view>
<!-- 版本更新弹窗 -->
<update-dialog :visible="showUpdate" :downloadUrl="updateUrl" :forceUpdate="forceUpdate" @close="showUpdate = false" />
</view>
</template>
@ -45,8 +48,14 @@ import { ref, computed } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import store from '@/store'
import { getUserModules } from '@/services/permission'
import { checkAppVersion } from '@/services/home'
import { APP_VERSION } from '@/services/api'
import updateDialog from '@/components/update-dialog.vue'
const statusBarHeight = uni.getSystemInfoSync().statusBarHeight || 0
const showUpdate = ref(false)
const updateUrl = ref('')
const forceUpdate = ref(false)
//
const allModules = [
@ -77,7 +86,18 @@ function goSettings() {
onLoad(() => {
//
handleRefresh()
//
loadVersionCheck()
})
async function loadVersionCheck() {
const res = await checkAppVersion(APP_VERSION)
if (res.code === 200 && res.data && res.data.needUpdate) {
updateUrl.value = res.data.downloadUrl || ''
forceUpdate.value = !!res.data.forceUpdate
showUpdate.value = true
}
}
</script>
<style scoped>

View File

@ -1 +0,0 @@
forceInstall