index.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <template>
  2. <view class="main-content ">
  3. <view class="home-banner">
  4. <view class="home-banner-left">
  5. <img src="/static/serverImg/home/address.png" alt=""
  6. style="width: 41.67rpx;height: 41.67rpx;margin-right: 8rpx;">
  7. <text>{{ data.address }}</text>
  8. </view>
  9. <view>
  10. <img src="/static/serverImg/home/message.png" alt="" style="width: 50rpx;height: 50rpx;">
  11. </view>
  12. </view>
  13. <view class="home-main">
  14. <view class="custom-swiper">
  15. <up-swiper :list="list3" indicator indicatorMode="line" circular></up-swiper>
  16. </view>
  17. </view>
  18. <view class="home-grid">
  19. <Client />
  20. </view>
  21. <view class="home-ranking">
  22. <volunteerSide v-if="userType == 1"></volunteerSide>
  23. <RankingList v-if="userType === 2"/>
  24. </view>
  25. </view>
  26. </template>
  27. <script setup>
  28. import { ref, reactive, onMounted } from 'vue';
  29. import {
  30. onLoad,
  31. onShow
  32. } from "@dcloudio/uni-app";
  33. import RankingList from '@/pages/common/rankingList/index.vue';
  34. import volunteerSide from "@/pages/Volunteerside/Side_index.vue"
  35. import {
  36. Client
  37. } from "@/pages/Client/new_file.vue"
  38. const data = reactive({
  39. address: '北京市朝阳区',
  40. queryValue: ''
  41. })
  42. const userType = uni.getStorageSync('userType') //读取本地存储
  43. const list3 = ref([
  44. '/static/img/68c51cda626f732e5a6a782e245ac255.jpeg',
  45. '/static/img/78f89f319f760ba84a5b86916612a99d.jpeg',
  46. '/static/img/e88c34398a054556e59659f4b7b83e8e.jpeg',
  47. ]);
  48. </script>
  49. <style scoped lang="scss">
  50. .main-content {
  51. .home-banner {
  52. display: flex;
  53. align-items: center;
  54. justify-content: space-between;
  55. background: rgba(255, 255, 255, 1);
  56. box-shadow: 0rpx 0rpx 0rpx rgba(0, 0, 0, 0), 0rpx 0rpx 0rpx rgba(0, 0, 0, 0), 0rpx 2.08rpx 4.17rpx rgba(0, 0, 0, 0.05);
  57. padding: 20rpx 16rpx;
  58. }
  59. .home-banner-left {
  60. display: flex;
  61. align-items: center;
  62. }
  63. .home-main {
  64. padding: 12px 16px;
  65. .custom-swiper {}
  66. .home-grid {
  67. margin-bottom: 32px;
  68. }
  69. }
  70. .home-ranking {
  71. padding: 12px 16px;
  72. }
  73. }
  74. </style>