index.1.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <view class="page">
  3. <view class="uni-list my_padding">
  4. <navigator url="/pages/my/details" hover-class="navigator-hover">
  5. <view class="uni-list-cell">
  6. <view class="uni-media-list uni-list-cell-navigate uni-navigate-right">
  7. <view class="uni-media-list-logo phto">
  8. <image :src="myPhoto" :lazy-load="true"/>
  9. </view>
  10. <view class="uni-media-list-body">
  11. <view class="uni-media-list-text-top">{{my_data.nickname}}</view>
  12. <view class="uni-media-list-text-bottom uni-ellipsis">{{my_data.doodling}}</view>
  13. </view>
  14. </view>
  15. </view>
  16. </navigator>
  17. </view>
  18. <uni-list>
  19. <uni-list-item title="支付"
  20. :show-arrow="true"
  21. thumb="../../static/theme/default/my/pay.png"
  22. @click="goPath()"
  23. />
  24. </uni-list>
  25. <uni-list>
  26. <uni-list-item title="小程序"
  27. :show-arrow="true"
  28. thumb="../../static/theme/default/push/program.png"
  29. />
  30. <uni-list-item title="相册"
  31. :show-arrow="true"
  32. thumb="../../static/theme/default/my/images.png"
  33. @click="goPath()"
  34. />
  35. <uni-list-item title="实名绑定"
  36. :show-arrow="true"
  37. thumb="../../static/theme/default/my/real.png"
  38. @click="goPath()"
  39. />
  40. <uni-list-item title="表情"
  41. :show-arrow="true"
  42. thumb="../../static/theme/default/my/emoji.png"
  43. @click="goPath()"
  44. />
  45. </uni-list>
  46. <uni-list>
  47. <uni-list-item title="我的收款二维码"
  48. :show-arrow="true"
  49. thumb="../../static/theme/default/my/qrcode.png"
  50. @click="goPath()"
  51. v-if="0"
  52. />
  53. <uni-list-item title="设置"
  54. :show-arrow="true"
  55. thumb="../../static/theme/default/my/set.png"
  56. @click="goPath('../set/index')"
  57. />
  58. </uni-list>
  59. </view>
  60. </template>
  61. <script>
  62. import uniList from '../../components/uni-ui/uni-list/uni-list.vue';
  63. import uniListItem from '../../components/uni-ui/uni-list-item/uni-list-item.vue';
  64. import _get from '../../common/_get';
  65. import _hook from '../../common/_hook';
  66. export default {
  67. components: {
  68. uniList,
  69. uniListItem
  70. },
  71. data() {
  72. return {
  73. my_data: { id: 0 },
  74. }
  75. },
  76. onShow(){
  77. _hook.routeTabBarHook();
  78. },
  79. onLoad() {
  80. this.my_data = this.$store.state.user_info;
  81. },
  82. computed: {
  83. myPhoto(){
  84. return this.$store.getters.staticPhoto + this.$store.state.user_info.photo;
  85. },
  86. userInfo(){
  87. return this.$store.state.user_info;
  88. }
  89. },
  90. methods: {
  91. goPath(path) {
  92. if(path){
  93. uni.navigateTo({
  94. url: path
  95. });
  96. }
  97. },
  98. },
  99. watch: {
  100. userInfo(new_val,old_val){
  101. this.my_data = new_val;
  102. }
  103. },
  104. }
  105. </script>
  106. <style>
  107. .phto {
  108. width: 106upx;
  109. height: 106upx;
  110. margin-left: 30upx;
  111. margin-right: 30upx;
  112. }
  113. .my_padding {
  114. padding-bottom: 25px;
  115. }
  116. .my_padding:before {
  117. background-color:white;
  118. }
  119. .uni-list {
  120. margin-bottom: 30upx;
  121. }
  122. </style>