index.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <template>
  2. <view class="content">
  3. <view class="header-panel">
  4. <image v-if="userInfo && userInfo.avatar" class="avatar" :src="userInfo.avatar" mode="aspectFill"></image>
  5. <image v-else class="avatar" src="../../static/img_avatar.png" mode="aspectFill"></image>
  6. <view v-if="userInfo" class="info">
  7. <view class="name">{{ userInfo.name }}</view>
  8. <view class="company">{{ userInfo.company }}</view>
  9. <image class="arrow" src="../../static/icon_arrow.png"></image>
  10. </view>
  11. <button v-else class="btn" @click="handleOpenLogin">登录</button>
  12. </view>
  13. <view class="menu-panel">
  14. <view class="item" v-for="(item, index) in manuList" :key="index">
  15. <image class="icon" :src="`../../static/svg/user_menu_${item.value}.svg`"></image>
  16. {{ item.label }}
  17. <view class="badge" v-if="item.value === 2">
  18. 4
  19. </view>
  20. </view>
  21. </view>
  22. <view class="nav-panel">
  23. <view :class="{ item: true, sapce: item.topSpace }" v-for="(item, index) in navList" :key="index">
  24. <view class="icon">
  25. <image :class="'icon-img icon-img-'+item.value" :src="`../../static/svg/user_nav_${item.value}.svg`"></image>
  26. </view>
  27. <view class="label">
  28. {{ item.label }}
  29. </view>
  30. <!-- 我的分销 -->
  31. <view class="tag" v-if="item.value === 4">
  32. 累计收益 0.00
  33. </view>
  34. <!-- 我的优惠券 -->
  35. <view class="sub active" v-if="item.value === 5">
  36. 3张可用
  37. </view>
  38. <image class="arrow" src="../../static/svg/arrow.svg"></image>
  39. </view>
  40. </view>
  41. </view>
  42. </template>
  43. <script>
  44. import md5 from '@/common/md5.js';
  45. import avatar from '@/static/taxation/poster.jpg';
  46. export default {
  47. components: {},
  48. data() {
  49. return {
  50. userInfo: '',
  51. manuList: [
  52. {
  53. label: '我的订单',
  54. value: 1
  55. },
  56. {
  57. label: '我的账单',
  58. value: 2
  59. },
  60. {
  61. label: '我的发票',
  62. value: 3
  63. },
  64. {
  65. label: '企业钱包',
  66. value: 4
  67. }
  68. ],
  69. navList: [
  70. {
  71. label: '企业资料',
  72. value: 1
  73. },
  74. {
  75. label: '企业团队',
  76. value: 2
  77. },
  78. {
  79. label: '认证信息',
  80. value: 3
  81. },
  82. {
  83. label: '我的分销',
  84. value: 4,
  85. topSpace: true
  86. },
  87. {
  88. label: '我的优惠券',
  89. value: 5
  90. },
  91. {
  92. label: '常见问题',
  93. value: 6,
  94. topSpace: true
  95. },
  96. {
  97. label: '关于我们',
  98. value: 7
  99. }
  100. ],
  101. list: [
  102. {
  103. icon: '/static/scan.png',
  104. name: '企业资料',
  105. // url: "/pages/index/scanCode/index",
  106. isShow: true
  107. },
  108. {
  109. icon: '/static/self-icon.png',
  110. name: '企业团队',
  111. url: '/pages/index/self_info',
  112. isShow: true
  113. },
  114. {
  115. icon: '/static/org-icon.png',
  116. name: '认证信息',
  117. url: '/pages/index/org_member',
  118. isShow: true
  119. },
  120. {
  121. icon: '/static/explain-icon.png',
  122. name: '我的分销',
  123. url: '/pages/index/back_login',
  124. isShow: true
  125. },
  126. {
  127. icon: '/static/back.png',
  128. name: '我的优惠券',
  129. // url: "/pages/index/scanCode/index",
  130. isShow: true
  131. },
  132. {
  133. icon: '/static/explain-icon.png',
  134. name: '常见问题',
  135. url: '/pages/index/back_login',
  136. isShow: true
  137. },
  138. {
  139. icon: '/static/back.png',
  140. name: '关于我们',
  141. // url: "/pages/index/scanCode/index",
  142. isShow: true
  143. }
  144. ]
  145. };
  146. },
  147. onLoad() {},
  148. onShow() {},
  149. methods: {
  150. handleOpenLogin() {
  151. this.userInfo = {
  152. name: 'Caocao',
  153. company: '天津超易达胜科技',
  154. avatar: avatar
  155. };
  156. }
  157. }
  158. };
  159. </script>
  160. <style lang="scss" scoped>
  161. @import 'index.scss';
  162. </style>