mySet.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <template>
  2. <view class="content">
  3. <view class="content1 flex-all-center relative">
  4. <view class="user">
  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. <u-icon name="share-square" color="#2979ff" size="28"></u-icon>
  12. <u-icon name="grid-fill" color="#2979ff" size="28"></u-icon>
  13. </view>
  14. </view>
  15. <view class="content2">
  16. <view class="row" v-for="item in menuList" @click="menuClick(item.type)">
  17. <span class="left">{{item.name}}</span>
  18. <span class="right">></span>
  19. </view>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. data() {
  26. return {
  27. userInfo:{},
  28. menuList:[
  29. {
  30. name:"我的名片",
  31. type:'myInfo'
  32. },
  33. {
  34. name:"我的主页",
  35. type:'myHome'
  36. },
  37. {
  38. name:"账号",
  39. type:"myAccount"
  40. },
  41. {
  42. name:"名片分类",
  43. type:"cardType"
  44. },
  45. {
  46. name:"我的证件",
  47. type:"myCard"
  48. },
  49. {
  50. name:"帮助说明",
  51. type:"help"
  52. },
  53. {
  54. name:"联系客服",
  55. type:"contactCustomer"
  56. },
  57. {
  58. name:"设置",
  59. type:'set'
  60. },
  61. ]
  62. };
  63. },
  64. onShow() {
  65. this.userInfo = uni.getStorageSync("userInfo")
  66. console.log(this.userInfo)
  67. },
  68. methods:{
  69. menuClick(typeName){
  70. let _url = '/pages/mySet/'+typeName
  71. console.log(_url)
  72. uni.navigateTo({
  73. url:_url
  74. })
  75. }
  76. }
  77. }
  78. </script>
  79. <style lang="scss" scoped>
  80. .content1{
  81. .img{
  82. width: 100rpx;
  83. border-radius: 50%;
  84. }
  85. }
  86. </style>