building.vue 2.7 KB

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