index.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <template>
  2. <view class="mine">
  3. <view class="mine-content" style="background:url('/static/login/login_top_backgroud.png') no-repeat; background-size: 100%;">
  4. <!-- 用户信息 -->
  5. <view class="mine-card cu-card padding radius shadow bg-white">
  6. <view class="cu-chat">
  7. <view class="cu-avatar xl round" style="background-image:url(https://ossweb-img.qq.com/images/lol/web201310/skin/big99008.jpg);"></view>
  8. <text class="text-bold text-xl"> {{ userInfo.name }} </text>
  9. </view>
  10. <view class="cu-bar justify-around" style="width: 100%;">
  11. <view class="cu-bar">
  12. <image src="../../static/mine/phone.png" style="width: 20px;height: 20px;"></image>
  13. <text class="text-sm"> {{ userInfo.mobile }} </text>
  14. </view>
  15. <view class="cu-bar">
  16. <image src="../../static/mine/email.png" style="width: 20px;height: 20px;"></image>
  17. <text class="text-sm"> {{ userInfo.email }} </text>
  18. </view>
  19. </view>
  20. </view>
  21. <view v-for="(section,i) in mineItems" :key="i">
  22. <u-gap height="15"/>
  23. <view class="cu-card padding radius shadow bg-white">
  24. <view class="cu-bar justify-between align-center" v-for="(item,index) in section" :key="index" @click="itemDidClick(item)">
  25. <view class="cu-bar">
  26. <image :src="item.image" style="width: 30px;height: 30px;"></image>
  27. <text class="text-bold padding-sm"> {{ $t(item.title) }} </text>
  28. </view>
  29. <text v-if="item.detail"> {{ item.detail }} </text>
  30. <text v-else class="lg text-gray cuIcon-right"></text>
  31. </view>
  32. </view>
  33. </view>
  34. </view>
  35. <!-- <button class="u-button--primary" type="default" @click="back">back</button> -->
  36. </view>
  37. </template>
  38. <script>
  39. import { mapState, mapMutations } from 'vuex'
  40. export default {
  41. data() {
  42. return {
  43. mineItems: [
  44. [
  45. {'image': '/static/mine/city.png','title': 'city','detail': '成都', 'url': ''},
  46. {'image': '/static/mine/location.png','title': 'campus','detail': '成都', 'url': ''},
  47. {'image': '/static/mine/department.png','title': 'department', 'detail': '成都', 'url': ''}
  48. ],
  49. [
  50. {'image': '/static/mine/student_old.png','title': 'referralList', 'detail': '', 'url': ''},
  51. {'image': '/static/mine/student_pain.png','title': 'renewList', 'detail': '', 'url': ''},
  52. {'image': '/static/mine/referral.png','title': 'auditList', 'detail': '', 'url': ''}
  53. ],
  54. [
  55. {'image': '/static/mine/setting.png','title': 'setting', 'detail': '', 'url': '../mine/setting'},
  56. ],
  57. ]
  58. };
  59. },
  60. name: 'tabbar-mine',
  61. computed: {
  62. ...mapState(['userInfo'])
  63. },
  64. props: {
  65. },
  66. methods: {
  67. /// 列表跳转
  68. itemDidClick(item) {
  69. if (!item.url) return
  70. uni.navigateTo({
  71. url: item.url
  72. })
  73. }
  74. }
  75. }
  76. </script>
  77. <style lang="scss">
  78. .mine {
  79. width: 100%;
  80. position: absolute;
  81. display: flex;
  82. flex-direction: column;
  83. height: 100%;
  84. .mine-content {
  85. padding: 80px 20px 70px;
  86. .mine-card{
  87. display: flex;
  88. flex-direction: column;
  89. justify-content: center;
  90. align-items: center;
  91. .user-card-top {
  92. position: absolute;
  93. top: 0;
  94. left: 0;
  95. align-self: flex-start;
  96. width: 40px;
  97. height: 20px;
  98. }
  99. }
  100. }
  101. }
  102. </style>