config.vue 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <template>
  2. <hc-sys class="hc-config-page" :isNavBar="false">
  3. <view class="cu-list menu sm-border mt-1">
  4. <view class="cu-item arrow" @click="toPageClick('/pages/my/info')">
  5. <view class="content hc-flex">
  6. <text class="i-ri-user-3-fill text-blue text-32 mr-1"/>
  7. <text class="text-gray-4">个人资料</text>
  8. </view>
  9. <view class="action">{{userInfo.real_name}}</view>
  10. </view>
  11. </view>
  12. <view class="cu-list menu sm-border">
  13. <view class="cu-item arrow">
  14. <view class="content hc-flex">
  15. <text class="i-ri-pantone-fill text-purple text-32 mr-1"/>
  16. <text class="text-gray-4">当前版本</text>
  17. </view>
  18. <view class="action text-gray-5">v{{appInfo.version}}</view>
  19. </view>
  20. <view class="cu-item arrow">
  21. <view class="content hc-flex">
  22. <text class="i-ri-shapes-fill text-pink text-32 mr-1"/>
  23. <text class="text-gray-4">热更新版本</text>
  24. </view>
  25. <view class="action text-gray-5">v{{appInfo.wgt}}</view>
  26. </view>
  27. <view class="cu-item arrow">
  28. <view class="content hc-flex">
  29. <text class="i-ri-rocket-fill text-green text-32 mr-1"/>
  30. <text class="text-gray-4">检测升级</text>
  31. </view>
  32. <view class="action">
  33. <!--view class="cu-tag round bg-blue light">有新版本</view-->
  34. <text class="text-26 text-gray-5">暂无新版本</text>
  35. </view>
  36. </view>
  37. </view>
  38. </hc-sys>
  39. </template>
  40. <script setup>
  41. import {ref} from "vue";
  42. import {onLoad} from '@dcloudio/uni-app'
  43. import {useAppStore} from "@/store";
  44. //初始变量
  45. const store = useAppStore()
  46. const userInfo = ref(store.userInfo);
  47. const appInfo = ref({version: '-', wgt: '-'});
  48. //渲染完成
  49. onLoad(() => {
  50. //const {appVersion, appWgtVersion} = uni.getSystemInfoSync();
  51. //appInfo.value = {version: appVersion ?? '-', wgt: appWgtVersion ?? '-'}
  52. })
  53. const toPageClick = (url) => {
  54. uni.navigateTo({url: url});
  55. }
  56. </script>
  57. <style lang="scss">
  58. </style>