ZaiZai il y a 1 an
Parent
commit
3a5d6a94fb
1 fichiers modifiés avec 12 ajouts et 3 suppressions
  1. 12 3
      components/hc-update/index.vue

+ 12 - 3
components/hc-update/index.vue

@@ -30,18 +30,27 @@
 </template>
 
 <script setup>
-import {ref} from "vue";
-import {onLoad} from '@dcloudio/uni-app'
+import {onMounted, ref} from "vue";
+import {getVersionData} from "~api/other";
 
 //初始变量
 const isShow = ref(false)
 const appInfo = ref({version: '', wgt: ''})
 
 //渲染完成
-onLoad(() => {
+onMounted(() => {
     const {appVersion, appWgtVersion} = uni.getSystemInfoSync();
     appInfo.value = {version: appVersion, wgt: appWgtVersion}
+    getVersionDataApi()
 })
+
+//获取新版本信息
+const getVersionDataApi = async () => {
+    await getVersionData({
+        softwareType: 1,
+        versionId: '平台66611'
+    })
+}
 </script>
 
 <style scoped lang="scss">