mySet.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. <button class="left" v-if='item.type=="contactCustomer"' open-type='contact'>{{item.name}}</button>
  18. <span class="left" v-else>{{item.name}}</span>
  19. <!-- <span class="right">></span> -->
  20. </view>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. data() {
  27. return {
  28. userInfo:{},
  29. menuList:[
  30. {
  31. name:"我的名片",
  32. type:'myInfo'
  33. },
  34. {
  35. name:"我的主页",
  36. type:'myHome'
  37. },
  38. {
  39. name:"名片分类",
  40. type:"cardType"
  41. },
  42. {
  43. name:"我的证件",
  44. type:"myCard"
  45. },
  46. {
  47. name:"帮助说明",
  48. type:"help"
  49. },
  50. {
  51. name:"联系客服",
  52. type:"contactCustomer"
  53. },
  54. {
  55. name:"设置",
  56. type:'set'
  57. },
  58. ]
  59. };
  60. },
  61. onShow() {
  62. this.userInfo = uni.getStorageSync("userInfo")
  63. console.log(this.userInfo)
  64. },
  65. methods:{
  66. menuClick(typeName){
  67. let _url = '/pages/mySet/'+typeName
  68. console.log(_url)
  69. uni.navigateTo({
  70. url:_url
  71. })
  72. }
  73. }
  74. }
  75. </script>
  76. <style lang="scss" scoped>
  77. .content1{
  78. .img{
  79. width: 100rpx;
  80. border-radius: 50%;
  81. }
  82. }
  83. </style>