use.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <template>
  2. <view class="pages">
  3. <view class="hold-status-bar"><!-- 占据了状态栏位置 --></view>
  4. <view class="custom-nav">
  5. <view class="custom-nav-left" @click="$api.goback"><text class="iconfont icon-jiantou"></text></view>
  6. <view class="custom-nav-center"></view>
  7. </view>
  8. <view class="top-img"><image :src="$getimg + 'use-bg-s1.png'" class="img" mode="widthFix"></image></view>
  9. <view class="use-wrap">
  10. <view class="use-wrap-header">
  11. <view class="til">价值实现</view>
  12. <view class="subtil" @click="useClick">
  13. <text>关于价值实现</text>
  14. <text class="iconfont icon-jiantou"></text>
  15. </view>
  16. </view>
  17. <view class="use-item" @click="lvyue">
  18. <image :src="$getimg + 'icon-lvyue.png'" class="use-item-img" mode="scaleToFill"></image>
  19. <view class="use-item-til">碳履约</view>
  20. <view class="use-item-subtil">(仅履约企业)</view>
  21. </view>
  22. <view class="use-item" @click="zhonghe">
  23. <image :src="$getimg + 'icon-zhonghe.png'" class="use-item-img" mode="scaleToFill"></image>
  24. <view class="use-item-til">企业碳中和</view>
  25. </view>
  26. <view class="use-item" @click="huodong">
  27. <image :src="$getimg + 'icon-huodong.png'" class="use-item-img" mode="scaleToFill"></image>
  28. <view class="use-item-til">大型活动碳中和</view>
  29. </view>
  30. <view class="use-item" @click="shangcheng">
  31. <image :src="$getimg + 'mall.png'" class="use-item-img" mode="scaleToFill"></image>
  32. <view class="use-item-til">普惠商城</view>
  33. </view>
  34. </view>
  35. <!-- 自定义tabBar -->
  36. <!-- <hans-tabber :list="list" style="position:fixed;bottom:0;width:100%;left:0;right:0;" @tabChange="tabChange"></hans-tabber> -->
  37. </view>
  38. </template>
  39. <script>
  40. import hansTabber from '../../components/hans-tabbar/hans-tabbar.vue';
  41. export default {
  42. components: {
  43. hansTabber
  44. },
  45. data() {
  46. return {
  47. list: [
  48. {
  49. text: '首页',
  50. iconPath: '/static/img/icon_home.png',
  51. selectedIconPath: '/static/img/icon_home_active.png'
  52. },
  53. {
  54. text: '价值实现',
  55. iconPath: '/static/img/icon_use.png',
  56. selectedIconPath: '/static/img/icon_use_active.png'
  57. },
  58. {
  59. text: '我的信息',
  60. iconPath: '/static/img/icon_usercenter.png',
  61. selectedIconPath: '/static/img/icon_usercenter_active.png'
  62. }
  63. ],
  64. $getimg: this.$getimg,
  65. token: '',
  66. params: {}
  67. };
  68. },
  69. onShow() {
  70. let self = this;
  71. //判断用户类别
  72. // uni.getStorage({
  73. // key: 'userInfo',
  74. // success: function(res) {
  75. // console.log('userInfo customerType', res.data.customerType);
  76. // if (res.data.customerType == '1') {
  77. // console.log('个人用户');
  78. // self.$api.href('/pages/mall/mall');
  79. // }
  80. // }
  81. // });
  82. },
  83. onLoad() {},
  84. methods: {
  85. lvyue() {
  86. this.$api.msg('暂未开放');
  87. },
  88. zhonghe() {
  89. this.$api.msg('暂未开放');
  90. },
  91. huodong() {
  92. this.$api.msg('暂未开放');
  93. },
  94. useClick() {
  95. this.$api.href('/pages/usercenter/question/question');
  96. // this.$api.msg('稍后展示')
  97. },
  98. shangcheng(){
  99. this.$api.msg('暂未开放');
  100. },
  101. tabChange(index) {
  102. console.log(index);
  103. switch (index) {
  104. case 0:
  105. uni.switchTab({
  106. url: '../index/index'
  107. });
  108. break;
  109. case 1:
  110. return;
  111. break;
  112. case 2:
  113. uni.switchTab({
  114. url: '../usercenter/usercenter'
  115. });
  116. break;
  117. default:
  118. return;
  119. }
  120. }
  121. }
  122. };
  123. </script>
  124. <style>
  125. @import url('./use.css');
  126. </style>