setting.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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;">version:{{versionNumber}}</view>
  12. </view>
  13. </view>
  14. <view style="width: 100%;position:fixed; bottom:200rpx;padding: 0;">
  15. <view style="width:468rpx;margin: 0 auto;">
  16. <debounce-button type="primary" @click="logOut" text="退出登录" bgColor="#0F974C"></debounce-button>
  17. </view>
  18. </view>
  19. </u-modal>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  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.clearStorageSync();
  37. uni.navigateTo()
  38. uni.reLaunch({
  39. url: '/pages/login/index'
  40. });
  41. }
  42. }
  43. }
  44. </script>
  45. <style lang="scss" scoped>
  46. .head {
  47. padding-top: var(--status-bar-height);
  48. }
  49. .head ::v-deep.u-navbar-inner {
  50. z-index: -99999;
  51. }
  52. </style>