index.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view>
  3. <u-navbar :is-back="true" title=" " :border-bottom="false">
  4. <view class="u-flex u-row-right" style="width: 100%;">
  5. <view class="camera u-flex u-row-center">
  6. <u-icon @tap="linkToMoment" name="camera-fill" color="#000000" size="48"></u-icon>
  7. </view>
  8. </view>
  9. </u-navbar>
  10. <view class="u-flex user-box u-p-l-30 u-p-r-20 u-p-b-30">
  11. <view class="u-m-r-10">
  12. <u-avatar mode="square" :src="userData.user.avatar" size="140"></u-avatar>
  13. </view>
  14. <view class="u-flex-1">
  15. <view class="u-font-18 u-p-b-20">{{userData.user.realname}}</view>
  16. <view class="u-font-14 u-tips-color">积分: {{userData.user.money}}</view>
  17. </view>
  18. <view class="u-m-l-10 u-p-10">
  19. <view style="font-size: 16px;color: #969799;" class="iconfont iconxingzhuangjiehe" @tap="linkToPerson"></view>
  20. </view>
  21. <view class="u-m-l-10 u-p-10">
  22. <u-icon name="arrow-right" color="#969799" size="28" @tap="linkToPerson"></u-icon>
  23. </view>
  24. </view>
  25. <view class="u-m-t-20">
  26. <u-cell-group>
  27. <u-cell-item @tap="linkTo(index)" v-for="(item, index) in groupList" :key="index" :title="item.title" :title-style="{ marginLeft: '30rpx' ,fontWeight:'800'}">
  28. <u-icon slot="icon" :name="item.icon" :color="item.color" size="40"></u-icon>
  29. </u-cell-item>
  30. </u-cell-group>
  31. </view>
  32. <view class="u-m-t-20">
  33. <u-cell-group>
  34. <u-cell-item @click="linkToSetting" title="设置" :title-style="{ marginLeft: '30rpx' ,fontWeight:'800'}">
  35. <u-icon slot="icon" name="setting" color="#409eff" size="40"></u-icon>
  36. </u-cell-item>
  37. </u-cell-group>
  38. </view>
  39. <tarBar :totarBer='tar'></tarBar>
  40. </view>
  41. </template>
  42. <script>
  43. import tarBar from '@/components/tarbar.vue'
  44. export default {
  45. components:{ tarBar },
  46. data() {
  47. return {
  48. pic:'',
  49. show:true,
  50. tar:{
  51. color:'#07A7E3',
  52. id:4
  53. },
  54. groupList: [
  55. {
  56. title: '相册',
  57. color: '#50E3C2',
  58. icon: 'photo'
  59. },
  60. {
  61. title: '表情',
  62. color: '#ff9900',
  63. icon: 'star'
  64. }
  65. ],
  66. $url:''
  67. }
  68. },
  69. onLoad() {
  70. },
  71. methods: {
  72. linkToMoment(){
  73. this.$u.route({
  74. url:'pageC/firendCircle/firendCircle'
  75. })
  76. },
  77. linkTo(index) {
  78. const url = index == 1 ? '/pageC/my/face' : '/pageC/my/photo'
  79. this.$u.route({
  80. url: url
  81. });
  82. },
  83. linkToSetting() {
  84. this.$u.route({
  85. url: 'pageC/setings/setings'
  86. });
  87. },
  88. linkToPerson() {
  89. this.$u.route({
  90. url: 'pageC/my/person'
  91. });
  92. },
  93. previewImage() {
  94. let current = this.userData.user.avatar
  95. uni.previewImage({
  96. current,
  97. urls: [current],
  98. // #ifndef MP-WEIXIN
  99. indicator: 'number'
  100. // #endif
  101. });
  102. }
  103. }
  104. }
  105. </script>
  106. <style lang="scss" scoped>
  107. page{
  108. background-color: #ededed;
  109. }
  110. .camera{
  111. width: 54px;
  112. height: 44px;
  113. &:active{
  114. background-color: #ededed;
  115. }
  116. }
  117. .user-box{
  118. background-color: #fff;
  119. }
  120. </style>