use.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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>
  31. <hans-tabber :list="list" style="position:fixed;bottom:0;width:100%;left:0;right:0;" @tabChange="tabChange"></hans-tabber>
  32. </view>
  33. </template>
  34. <script>
  35. import hansTabber from '../../components/hans-tabbar/hans-tabbar.vue';
  36. export default {
  37. components: {
  38. hansTabber
  39. },
  40. data() {
  41. return {
  42. list: [
  43. {
  44. text: '首页',
  45. iconPath: '/static/img/icon_home.png',
  46. selectedIconPath: '/static/img/icon_home_active.png'
  47. },
  48. {
  49. text: '价值实现',
  50. iconPath: '/static/img/icon_use.png',
  51. selectedIconPath: '/static/img/icon_use_active.png'
  52. },
  53. {
  54. text: '我的信息',
  55. iconPath: '/static/img/icon_usercenter.png',
  56. selectedIconPath: '/static/img/icon_usercenter_active.png'
  57. }
  58. ],
  59. $getimg: this.$getimg,
  60. token: '',
  61. params: {}
  62. };
  63. },
  64. onShow() {
  65. let self = this;
  66. uni.getStorage({
  67. key: 'userInfo',
  68. success: function(res) {
  69. console.log('userInfo customerType', res.data.customerType);
  70. if (res.data.customerType == '1') {
  71. console.log('个人用户');
  72. self.$api.href('/pages/mall/mall');
  73. }
  74. }
  75. });
  76. },
  77. onLoad() {},
  78. methods: {
  79. lvyue() {
  80. this.$api.msg('暂未开放');
  81. },
  82. zhonghe() {
  83. this.$api.msg('暂未开放');
  84. },
  85. huodong() {
  86. this.$api.msg('暂未开放');
  87. },
  88. useClick() {
  89. this.$api.href('/pages/usercenter/question/question');
  90. // this.$api.msg('稍后展示')
  91. },
  92. tabChange(index) {
  93. console.log(index);
  94. switch (index) {
  95. case 0:
  96. uni.switchTab({
  97. url: '../index/index'
  98. });
  99. break;
  100. case 1:
  101. return;
  102. break;
  103. case 2:
  104. uni.switchTab({
  105. url: '../usercenter/usercenter'
  106. });
  107. break;
  108. default:
  109. return;
  110. }
  111. }
  112. }
  113. };
  114. </script>
  115. <style>
  116. @import url('./use.css');
  117. </style>