index.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  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>
  18. </view>
  19. <view class="nav-panel">
  20. <view :class="{item: true, sapce: item.topSpace}" v-for="(item,index) in navList" :key="'nav'+index">
  21. <image class="icon" :src="`../../static/svg/user_nav_${item.value}.svg`"></image>
  22. <view class="label">
  23. {{item.label}}
  24. </view>
  25. <image class="arrow" src="../../static/svg/arrow.svg"></image>
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script>
  31. import md5 from "@/common/md5.js";
  32. import avatar from '@/static/taxation/poster.jpg';
  33. export default {
  34. components: {},
  35. data() {
  36. return {
  37. userInfo: '',
  38. manuList: [{
  39. label: '我的订单',
  40. value: 1
  41. }, {
  42. label: '我的账单',
  43. value: 2
  44. }, {
  45. label: '我的发票',
  46. value: 3
  47. }, {
  48. label: '企业钱包',
  49. value: 4
  50. }],
  51. navList: [{
  52. label: '企业资料',
  53. value: 1,
  54. },
  55. {
  56. label: '企业团队',
  57. value: 2,
  58. },
  59. {
  60. label: '认证信息',
  61. value: 3,
  62. },
  63. {
  64. label: '我的分销',
  65. value: 4,
  66. topSpace: true
  67. },
  68. {
  69. label: '我的优惠券',
  70. value: 5,
  71. },
  72. {
  73. label: '常见问题',
  74. value: 6,
  75. topSpace: true
  76. },
  77. {
  78. label: '关于我们',
  79. value: 7,
  80. }
  81. ],
  82. list: [{
  83. icon: "/static/scan.png",
  84. name: "企业资料",
  85. // url: "/pages/index/scanCode/index",
  86. isShow: true,
  87. },
  88. {
  89. icon: "/static/self-icon.png",
  90. name: "企业团队",
  91. url: "/pages/index/self_info",
  92. isShow: true,
  93. },
  94. {
  95. icon: "/static/org-icon.png",
  96. name: "认证信息",
  97. url: "/pages/index/org_member",
  98. isShow: true,
  99. },
  100. {
  101. icon: "/static/explain-icon.png",
  102. name: "我的分销",
  103. url: "/pages/index/back_login",
  104. isShow: true,
  105. },
  106. {
  107. icon: "/static/back.png",
  108. name: "我的优惠券",
  109. // url: "/pages/index/scanCode/index",
  110. isShow: true,
  111. },
  112. {
  113. icon: "/static/explain-icon.png",
  114. name: "常见问题",
  115. url: "/pages/index/back_login",
  116. isShow: true,
  117. },
  118. {
  119. icon: "/static/back.png",
  120. name: "关于我们",
  121. // url: "/pages/index/scanCode/index",
  122. isShow: true,
  123. },
  124. ],
  125. };
  126. },
  127. onLoad() {
  128. },
  129. onShow() {},
  130. methods: {
  131. handleOpenLogin() {
  132. this.userInfo = {
  133. name: 'Caocao',
  134. company: '天津超易达胜科技',
  135. avatar: avatar
  136. }
  137. },
  138. },
  139. };
  140. </script>
  141. <style lang="scss" scoped>
  142. .content {
  143. height: 100%;
  144. background: #f3f3f3;
  145. padding-bottom: 41.21rpx;
  146. box-sizing: border-box;
  147. }
  148. .header-panel {
  149. height: 274.73rpx;
  150. background: rgba(0, 210, 195, 1);
  151. font-size: 27.47rpx;
  152. display: flex;
  153. align-items: center;
  154. color: #fff;
  155. .avatar {
  156. width: 123.63rpx;
  157. height: 123.63rpx;
  158. margin: 0 39.84rpx 0 53.57rpx;
  159. border-radius: 50%;
  160. }
  161. .btn {
  162. width: 151.1rpx;
  163. height: 54.95rpx;
  164. line-height: 52.2rpx;
  165. border: 1px solid #fff;
  166. border-radius: 2.75rpx;
  167. font-size: 27.47rpx;
  168. background: transparent;
  169. color: #fff;
  170. padding: 0;
  171. margin: 0;
  172. &::after {
  173. display: none;
  174. }
  175. }
  176. .info {
  177. flex: 1;
  178. line-height: 1;
  179. position: relative;
  180. padding-right: 82.42rpx;
  181. .name {
  182. font-size: 38.46rpx;
  183. margin-bottom: 16.48rpx;
  184. white-space: nowrap;
  185. overflow: hidden;
  186. text-overflow: ellipsis;
  187. }
  188. .company {
  189. white-space: nowrap;
  190. overflow: hidden;
  191. text-overflow: ellipsis;
  192. }
  193. .arrow {
  194. width: 23.35rpx;
  195. height: 43.96rpx;
  196. position: absolute;
  197. right: 53.57rpx;
  198. top: 50%;
  199. transform: translateY(-50%);
  200. }
  201. }
  202. }
  203. .menu-panel {
  204. display: flex;
  205. background: #fff;
  206. position: relative;
  207. &::after {
  208. content: '';
  209. position: absolute;
  210. left: 0%;
  211. bottom: 0%;
  212. right: 0;
  213. height: 1rpx;
  214. background: #e0e0e0;
  215. transform: scaleY(.5);
  216. }
  217. .item {
  218. flex: 1;
  219. height: 151.1rpx;
  220. display: flex;
  221. flex-direction: column;
  222. align-items: center;
  223. justify-content: center;
  224. position: relative;
  225. &:before {
  226. content: '';
  227. width: 1rpx;
  228. position: absolute;
  229. left: 0%;
  230. top: 0;
  231. bottom: 0%;
  232. background: #e0e0e0;
  233. transform: scaleX(.5);
  234. }
  235. &:first-child::before {
  236. display: none;
  237. }
  238. .icon {
  239. width: 54.95rpx;
  240. height: 54.95rpx;
  241. margin-bottom: 13.74rpx;
  242. }
  243. }
  244. }
  245. .nav-panel {
  246. margin-top: 13.74rpx;
  247. .item {
  248. background: #fff;
  249. display: flex;
  250. align-items: center;
  251. height: 96.15rpx;
  252. position: relative;
  253. &:before {
  254. content: '';
  255. position: absolute;
  256. left: 0%;
  257. right: 0%;
  258. top: 0;
  259. height: 1rpx;
  260. background: #e0e0e0;
  261. transform: scaleY(.5);
  262. }
  263. &:first-child::before {
  264. display: none;
  265. }
  266. &.sapce {
  267. margin-top: 13.74rpx;
  268. &:before {
  269. display: none;
  270. }
  271. }
  272. .icon {
  273. width: 43.96rpx;
  274. height: 43.96rpx;
  275. margin: 0 20.6rpx 0 31.59rpx;
  276. }
  277. .label{
  278. flex: 1;
  279. }
  280. .arrow{
  281. width: 27.47rpx;
  282. height: 27.47rpx;
  283. margin-right: 27.47rpx;
  284. }
  285. }
  286. }
  287. </style>