index.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <template>
  2. <view class="hc-update-app-box" v-if="isShow">
  3. <view class="update-head-bar">
  4. <view class="head-bar">
  5. <image class="head-img" src="/static/update/1.png"/>
  6. <view class="relative flex">
  7. <view class="flex-1 text-white hc-p">
  8. <view class="text-34">发现新版本</view>
  9. <view class="mt-2">v1.0.0</view>
  10. </view>
  11. <view class="relative top--60 right-40">
  12. <c-lottie src='/static/update/2.json' width="240rpx" height='240rpx' :loop="true"/>
  13. </view>
  14. </view>
  15. </view>
  16. <view class="update-content-bar hc-p">
  17. <scroll-view scroll-y>
  18. <view>更新内容: </view>
  19. <view class="mt-2 text-gray-6">1111</view>
  20. </scroll-view>
  21. </view>
  22. <view class="update-action-bar">
  23. <view class="hc-flex hc-p">
  24. <button class="cu-btn bg-blue-5 text-white flex-1 mr-2">立即更新</button>
  25. <button class="cu-btn bg-gray-4 text-white flex-1 ml-2">下次再说</button>
  26. </view>
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <script setup>
  32. import {ref} from "vue";
  33. import {onLoad} from '@dcloudio/uni-app'
  34. //初始变量
  35. const isShow = ref(false)
  36. const appInfo = ref({version: '', wgt: ''})
  37. //渲染完成
  38. onLoad(() => {
  39. const {appVersion, appWgtVersion} = uni.getSystemInfoSync();
  40. appInfo.value = {version: appVersion, wgt: appWgtVersion}
  41. })
  42. </script>
  43. <style scoped lang="scss">
  44. @import "./style.scss";
  45. </style>