setUp.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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/uview/common/logo.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. 青岛途宝软件开发有限公司提供服务
  29. </view>
  30. </view>
  31. </view>
  32. </u-modal>
  33. <!-- 更新组件 force 是否强制更新 tabbar:页面是否有原生tabbar组件-->
  34. <app-update ref="app_update" :force="false" :tabbar="false"></app-update>
  35. </view>
  36. </template>
  37. <script>
  38. import appUpdate from "@/components/yzhua006-update/app-update.vue"
  39. export default {
  40. components: {
  41. appUpdate
  42. },
  43. data() {
  44. return {
  45. name: '获取失败',
  46. version: '获取失败'
  47. }
  48. },
  49. onLoad() {
  50. },
  51. created() {
  52. // #ifdef APP-PLUS
  53. plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
  54. console.log(wgtinfo)
  55. this.version = wgtinfo.version
  56. this.name = wgtinfo.name
  57. })
  58. //#endif
  59. },
  60. onBackPress(e){
  61. console.log(e.from)
  62. if(e.from == 'backbutton'){
  63. return true
  64. }
  65. },
  66. methods: {
  67. logOut() {
  68. uni.clearStorageSync();
  69. uni.redirectTo({
  70. url: '/pages/login/login'
  71. });
  72. },
  73. checkVersion() {
  74. this.$refs.app_update.update();//调用子组件 检查更新
  75. }
  76. }
  77. }
  78. </script>
  79. <style lang="scss" scoped>
  80. .content {
  81. width: 96%;
  82. margin: 140rpx auto;
  83. }
  84. .head ::v-deep.u-navbar-inner{
  85. z-index: -99999;
  86. }
  87. </style>