index.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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/city.png','title': 'city','detail': '成都', 'url': ''},
  51. {'image': '/static/mine/location.png','title': 'campus','detail': '成都', 'url': ''},
  52. {'image': '/static/mine/department.png','title': 'department', 'detail': '成都', 'url': ''}
  53. ],
  54. [
  55. {'image': '/static/mine/city.png','title': 'city','detail': '成都', 'url': ''},
  56. {'image': '/static/mine/location.png','title': 'campus','detail': '成都', 'url': ''},
  57. {'image': '/static/mine/department.png','title': 'department', 'detail': '成都', 'url': ''}
  58. ],
  59. [
  60. {'image': '/static/mine/student_old.png','title': 'referralList', 'detail': '', 'url': ''},
  61. {'image': '/static/mine/student_pain.png','title': 'renewList', 'detail': '', 'url': ''},
  62. {'image': '/static/mine/referral.png','title': 'auditList', 'detail': '', 'url': ''}
  63. ],
  64. [
  65. {'image': '/static/mine/setting.png','title': 'setting', 'detail': '', 'url': '../mine/setting'},
  66. ],
  67. ]
  68. };
  69. },
  70. name: 'tabbar-mine',
  71. computed: {
  72. ...mapState(['userInfo'])
  73. },
  74. props: {
  75. },
  76. methods: {
  77. /// 列表跳转
  78. itemDidClick(item) {
  79. if (!item.url) return
  80. uni.navigateTo({
  81. url: item.url
  82. })
  83. }
  84. }
  85. }
  86. </script>
  87. <style lang="scss">
  88. .mine {
  89. width: 100%;
  90. position: absolute;
  91. display: flex;
  92. flex-direction: column;
  93. height: 100%;
  94. .mine-content {
  95. padding: 80px 20px 70px;
  96. .mine-card{
  97. display: flex;
  98. flex-direction: column;
  99. justify-content: center;
  100. align-items: center;
  101. .user-card-top {
  102. position: absolute;
  103. top: 0;
  104. left: 0;
  105. align-self: flex-start;
  106. width: 40px;
  107. height: 20px;
  108. }
  109. }
  110. }
  111. }
  112. </style>