setUp.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <template>
  2. <view class="head">
  3. <u-navbar :autoBack="true" title="设置" bgColor="#fd5003" leftIconColor="#fff" titleStyle="color:#fff"></u-navbar>
  4. <view class="content">
  5. <view style="text-align: center;">
  6. <image src="../../static/images/logo/logo.png" mode=""
  7. style="width: 500rpx;height: 160rpx;border-radius: 40rpx;"></image>
  8. <h3>{{name}}</h3>
  9. <view>version:{{versionNumber}}</view>
  10. </view>
  11. <view class="u-m-t-20" style="margin-top: 100rpx;">
  12. <u-cell-group>
  13. <u-cell icon="setting-fill" :isLink="true" title="检查更新" @click="checkVersion"
  14. :iconStyle="{color: '#fd5003'}"></u-cell>
  15. </u-cell-group>
  16. </view>
  17. </view>
  18. <view style="width: 100%;position:fixed; bottom:200rpx;padding: 0;">
  19. <view style="width: 92%;margin: 0 auto;">
  20. <u-button type="primary" @click="logOut" text="退出登录" color="#fd5003"></u-button>
  21. </view>
  22. <view style="width: 100%;position:fixed;bottom:20rpx;text-align: center;">
  23. <view>
  24. {{name}}软件许可及服务协议
  25. </view>
  26. <view style="color: #fd5003;">
  27. 《隐私保护指引》
  28. </view>
  29. </view>
  30. </view>
  31. </u-modal>
  32. <!-- 更新组件 force 是否强制更新 tabbar:页面是否有原生tabbar组件-->
  33. <app-update ref="app_update" :force="false" :tabbar="false"></app-update>
  34. </view>
  35. </template>
  36. <script>
  37. import appUpdate from "@/components/yzhua006-update/app-update.vue"
  38. export default {
  39. components: {
  40. appUpdate
  41. },
  42. data() {
  43. return {
  44. name: '获取失败',
  45. versionNumber: '获取失败'
  46. }
  47. },
  48. onLoad() {
  49. },
  50. created() {
  51. // #ifdef APP-PLUS
  52. plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
  53. this.versionNumber = wgtinfo.version
  54. this.name = wgtinfo.name
  55. })
  56. //#endif
  57. },
  58. onBackPress(e) {
  59. if (e.from == 'backbutton') {
  60. return true
  61. }
  62. },
  63. methods: {
  64. logOut() {
  65. uni.clearStorageSync();
  66. uni.redirectTo({
  67. url: '/pages/login/login'
  68. });
  69. },
  70. checkVersion() {
  71. this.$refs.app_update.update(); //调用子组件 检查更新
  72. }
  73. }
  74. }
  75. </script>
  76. <style lang="scss" scoped>
  77. .content {
  78. width: 96%;
  79. margin: 140rpx auto;
  80. }
  81. .head{
  82. padding-top: var(--status-bar-height);
  83. }
  84. .head ::v-deep.u-navbar-inner {
  85. z-index: -99999;
  86. }
  87. </style>