e-browse.vue 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. <template>
  2. <view class="browse">
  3. <view class="left">
  4. <view class="icon">
  5. <uni-icons type="staff" size="32" color="#009FE8"></uni-icons>
  6. </view>
  7. <view class="text">浏览记录</view>
  8. </view>
  9. <view class="right" @click="go_browse()">
  10. <view class="list" v-for="(item,index) in browse" :key="index">
  11. <view class="item" v-if="item.img">
  12. <image :src="item.img" mode=""></image>
  13. </view>
  14. <view v-if="!item.img" class="item" :style="{backgroundColor:bgColor[index]}">
  15. {{item.name.split('').pop()}}
  16. </view>
  17. </view>
  18. <view class="text">
  19. 更多记录
  20. </view>
  21. <view class="icon">
  22. <uni-icons type="arrowright" size="22"></uni-icons>
  23. </view>
  24. </view>
  25. </view>
  26. </template>
  27. <script>
  28. export default {
  29. props: [
  30. "browse",
  31. "bgColor",
  32. "mine_code",
  33. "pageId"
  34. ],
  35. data() {
  36. return {
  37. };
  38. },
  39. methods: {
  40. go_browse() {
  41. uni.navigateTo({
  42. url: "../../index/record/record-browse/record-browse?mine_code=" + this.mine_code + "&pageId=" +
  43. this.pageId
  44. })
  45. }
  46. }
  47. }
  48. </script>
  49. <style lang="scss">
  50. .browse {
  51. display: flex;
  52. justify-content: space-between;
  53. align-items: center;
  54. height: 110rpx;
  55. font-size: 32rpx;
  56. .left {
  57. height: 110rpx;
  58. display: flex;
  59. align-items: center;
  60. .icon {
  61. margin-right: 10rpx;
  62. }
  63. }
  64. .right {
  65. height: 110rpx;
  66. display: flex;
  67. align-items: center;
  68. .list {
  69. display: flex;
  70. .item {
  71. width: 70rpx;
  72. height: 70rpx;
  73. border-radius: 50%;
  74. overflow: hidden;
  75. text-align: center;
  76. line-height: 70rpx;
  77. font-size: 28rpx;
  78. color: #fff;
  79. margin-right: 10rpx;
  80. image {
  81. width: 70rpx;
  82. height: 70rpx;
  83. }
  84. }
  85. }
  86. }
  87. }
  88. </style>