setUp.vue 2.0 KB

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