building.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <!-- https://www.kancloud.cn/dishaxueyuan/uni-app/1358897 onBackPress在小程序不生效 -->
  2. <template>
  3. <view class="pages">
  4. <view class="hold-status-bar show"><!-- 占据了状态栏位置 --></view>
  5. <view class="custom-nav">
  6. <view class="custom-nav-left" @click="$api.goback"><text class="iconfont icon-jiantou"></text></view>
  7. <view class="custom-nav-center"></view>
  8. </view>
  9. <image :src="$getimg + 'building.png'" class="building-img" mode="heightFix"></image>
  10. <view class="building-text">
  11. 正在建设中
  12. <text class="dotting"></text>
  13. </view>
  14. <hans-tabber
  15. :list="list"
  16. style="position:fixed;bottom:0;width:100%;left:0;right:0;"
  17. @tabChange="tabChange"></hans-tabber>
  18. </view>
  19. </template>
  20. <script>
  21. import hansTabber from '../../components/hans-tabbar/hans-tabbar.vue';
  22. export default {
  23. components: {
  24. hansTabber
  25. },
  26. data() {
  27. return {
  28. list: [
  29. {
  30. text: '首页',
  31. iconPath: '/static/img/icon_home.png',
  32. selectedIconPath: '/static/img/icon_home_active.png'
  33. },
  34. {
  35. text: '价值实现',
  36. iconPath: '/static/img/icon_use.png',
  37. selectedIconPath: '/static/img/icon_use_active.png'
  38. },
  39. {
  40. text: '我的信息',
  41. iconPath: '/static/img/icon_usercenter.png',
  42. selectedIconPath: '/static/img/icon_usercenter_active.png'
  43. }
  44. ],
  45. $getimg: this.$getimg,
  46. token: '',
  47. params: {}
  48. };
  49. },
  50. onShow() {
  51. let self = this;
  52. uni.getStorage({
  53. key: 'userInfo',
  54. success: function(res) {
  55. if (res.data.customerType == '1') {
  56. // console.log('个人用户');
  57. self.list[1].text = '普惠商城';
  58. self.list[1].iconPath = '/static/img/icon_mall.png';
  59. self.list[1].selectedIconPath = '/static/img/icon_mall_active.png';
  60. } else {
  61. }
  62. }
  63. });
  64. },
  65. onLoad() {
  66. // var pages = getCurrentPages();
  67. // console.log('pages',pages);
  68. // let menuButtonInfo = uni.getMenuButtonBoundingClientRect();//胶囊按钮信息
  69. // console.log('menuButtonInfo',menuButtonInfo);
  70. },
  71. methods: {
  72. tabChange(index) {
  73. console.log(index);
  74. switch (index) {
  75. case 0:
  76. uni.switchTab({
  77. url: '../index/index'
  78. });
  79. break;
  80. case 1:
  81. return;
  82. break;
  83. case 2:
  84. uni.switchTab({
  85. url: '../usercenter/usercenter'
  86. });
  87. break;
  88. default:
  89. return;
  90. }
  91. }
  92. }
  93. };
  94. </script>
  95. <style>
  96. /* @import url("./building.css"); */
  97. page {
  98. background-color: #f5f5f5;
  99. text-align: center;
  100. }
  101. .custom-nav {
  102. background-color: #fff;
  103. color: #333;
  104. padding-bottom: 20rpx;
  105. }
  106. .building-img {
  107. margin-top: 408rpx;
  108. width: 240rpx;
  109. height: 240rpx;
  110. margin-bottom: 36rpx;
  111. }
  112. .building-text {
  113. font-size: 30rpx;
  114. color: #999;
  115. line-height: 45rpx;
  116. font-weight: 400;
  117. }
  118. </style>