mySet.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. <template>
  2. <view class="content">
  3. <view class="content1 flex-between relative flex">
  4. <view class="user flex">
  5. <image :src="userInfo.head" mode="widthFix" class="img"></image>
  6. <view class="name">
  7. {{userInfo.nickname}}
  8. </view>
  9. </view>
  10. <view class="position">
  11. <image src="../../static/imgs/mySet/share.png" mode="widthFix" class="right-img"></image>
  12. <image src="../../static/imgs/mySet/ewm.png" mode="widthFix" class="right-img"></image>
  13. </view>
  14. </view>
  15. <view class="content2">
  16. <view class="row flex flex-between" v-for="(item,index) in menuList" :key='index' @click="menuClick(item.type)">
  17. <view class="flex">
  18. <image :src="item.src" mode="widthFix" class="nav-img"></image>
  19. <button class="left-btn" v-if='item.type=="contactCustomer"' open-type='contact'>{{item.name}}</button>
  20. <span class="left" v-else>{{item.name}}</span>
  21. </view>
  22. <span class="right"><image src="../../static/imgs/mySet/yjt.png" mode="widthFix" class="row-right-img"></image></span>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. data() {
  30. return {
  31. userInfo: {},
  32. menuList: [{
  33. name: "我的名片",
  34. type: 'myInfo',
  35. src:'../../static/imgs/mySet/card.png'
  36. },
  37. {
  38. name: "我的主页",
  39. type: 'myHome',
  40. src:'../../static/imgs/mySet/home.png'
  41. },
  42. {
  43. name: "名片分类",
  44. type: "cardType",
  45. src:'../../static/imgs/mySet/type.png'
  46. },
  47. {
  48. name: "我的证件",
  49. type: "myCard",
  50. src:'../../static/imgs/mySet/card1.png'
  51. },
  52. {
  53. name: "帮助说明",
  54. type: "help",
  55. src:'../../static/imgs/mySet/help.png'
  56. },
  57. {
  58. name: "联系客服",
  59. type: "contactCustomer",
  60. src:'../../static/imgs/mySet/kf.png'
  61. },
  62. {
  63. name: "设置",
  64. type: 'set',
  65. src:'../../static/imgs/mySet/set.png'
  66. },
  67. ]
  68. };
  69. },
  70. onShow() {
  71. this.userInfo = uni.getStorageSync("userInfo")
  72. console.log(this.userInfo)
  73. },
  74. methods: {
  75. menuClick(typeName) {
  76. let _url = '/pages/mySet/' + typeName
  77. console.log(_url)
  78. uni.navigateTo({
  79. url: _url
  80. })
  81. }
  82. }
  83. }
  84. </script>
  85. <style lang="scss" scoped>
  86. .content1 {
  87. background: #112253;
  88. padding: 0rpx 20rpx 160rpx 20rpx;
  89. box-sizing: border-box;
  90. border-radius: 0px 0px 20rpx 20rpx;
  91. .user {
  92. color: #fff;
  93. .name {
  94. font-weight: 700;
  95. }
  96. }
  97. .img {
  98. width: 124rpx;
  99. border-radius: 50%;
  100. margin-right: 32rpx;
  101. }
  102. .position {
  103. .right-img {
  104. width: 44rpx;
  105. margin-left: 40rpx;
  106. }
  107. }
  108. }
  109. .content2 {
  110. background: #fff;
  111. margin: 20rpx;
  112. padding:0 40rpx;
  113. position: relative;
  114. top: -100rpx;
  115. border-radius: 20rpx;
  116. .nav-img{
  117. width: 32rpx;
  118. margin-right:20rpx ;
  119. }
  120. .row{
  121. border-bottom: 1px solid #E6E6E6;
  122. padding: 35rpx 0;
  123. .row-right-img{
  124. width: 12rpx;
  125. }
  126. }
  127. .row:last-child{
  128. border: none;
  129. }
  130. .left-btn{
  131. background: #fff;
  132. padding: 0;
  133. margin: 0;
  134. font-size: 32rpx;
  135. }
  136. .left-btn:after{
  137. border: none!important;
  138. }
  139. }
  140. </style>