config.vue 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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">
  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">
  21. <view class="content hc-flex">
  22. <text class="i-ri-rocket-fill text-cyan text-32 mr-1"/>
  23. <text class="text-gray-4">检测升级</text>
  24. </view>
  25. <view class="action">
  26. <!--view class="cu-tag round bg-blue light">有新版本</view-->
  27. <text class="text-26 text-gray-5">暂无新版本</text>
  28. </view>
  29. </view>
  30. </view>
  31. </hc-sys>
  32. </template>
  33. <script setup>
  34. import {ref} from "vue";
  35. import {onLoad} from '@dcloudio/uni-app'
  36. import {useAppStore} from "@/store";
  37. //初始变量
  38. const store = useAppStore()
  39. const userInfo = ref(store.userInfo);
  40. const appInfo = ref({version: '-', wgt: '-'});
  41. //渲染完成
  42. onLoad(() => {
  43. const {appVersion, appWgtVersion} = uni.getSystemInfoSync();
  44. appInfo.value = {version: appVersion, wgt: appWgtVersion}
  45. })
  46. const toPageClick = (url) => {
  47. uni.navigateTo({url: url});
  48. }
  49. </script>