aboutApp.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <view style="background: #03803B;height: 100vh;">
  3. <view style="display: flex;justify-content: center;padding-top: 180rpx;">
  4. <image src="/static/images/me/setting (2).png" style="width:360rpx;height: 286rpx;" mode="scaleToFill">
  5. </image>
  6. </view>
  7. <view style="margin-top: 200rpx;">
  8. <view style="text-align: center;">
  9. <image src="/static/images/me/setting (1).png" style="width:518rpx;height: 144rpx;" mode="scaleToFill">
  10. </image>
  11. <view style="color: #fff;font-size: 26rpx;margin-top: 55rpx;" @click="getAppUpdate">version:{{versionNumber}}</view>
  12. </view>
  13. </view>
  14. <!-- 更新组件 force 是否强制更新 tabbar:页面是否有原生tabbar组件-->
  15. <app-update ref="app_update" :force="false" :manual="true"></app-update>
  16. </view>
  17. </template>
  18. <script>
  19. import appUpdate from "@/components/yzhua006-update/app-update.vue"
  20. export default {
  21. components: {
  22. appUpdate
  23. },
  24. data() {
  25. return {
  26. name: '获取失败',
  27. versionNumber: '获取失败'
  28. }
  29. },
  30. created() {
  31. const systemInfo = uni.getSystemInfoSync();
  32. this.versionNumber = systemInfo.appVersion ? systemInfo.appVersion : '获取失败'
  33. },
  34. methods: {
  35. logOut() {
  36. uni.removeStorageSync('accessToken')
  37. uni.removeStorageSync('userInfo')
  38. uni.reLaunch({
  39. url: '/pages/login/index'
  40. });
  41. },
  42. getAppUpdate() {
  43. console.log(this.$refs.app_update.update())
  44. this.$refs.app_update.update()
  45. }
  46. }
  47. }
  48. </script>
  49. <style lang="scss" scoped>
  50. .head {
  51. padding-top: var(--status-bar-height);
  52. }
  53. .head ::v-deep.u-navbar-inner {
  54. z-index: -99999;
  55. }
  56. </style>