map.vue 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <template>
  2. <div class="homeMap">
  3. <view class="map">
  4. <scroll-view :scroll-x="true" class="scrollview-box">
  5. <div class="chinaMap" v-if="show">
  6. <echarsMap></echarsMap>
  7. </div>
  8. <div class="allMap" v-else>
  9. <div class="goChina" @click="show = !show"></div>
  10. </div>
  11. </scroll-view>
  12. </view>
  13. <div class="people">
  14. <u--image
  15. height="30px"
  16. width="30px"
  17. mode="heightFix"
  18. src="/static/img/icon_lotus_dark@2x.png"
  19. ></u--image>
  20. <text class="peopleNum">祈愿人数</text>
  21. <text class="peopleNum">{{ people }}</text>
  22. </div>
  23. <div class="bottom flex justify-between items-end">
  24. <div class="list">
  25. <div class="listItem" v-for="item in 6" :key="item">
  26. 用户名
  27. <text style="color: #7EE3DE">【河北】</text>
  28. 打卡!
  29. </div>
  30. </div>
  31. <div class="qiyuan">
  32. <u--image
  33. height="70px"
  34. width="70px"
  35. mode="heightFix"
  36. src="/static/img/btn_wish@2x.png"
  37. ></u--image>
  38. </div>
  39. </div>
  40. <tabbar></tabbar>
  41. </div>
  42. </template>
  43. <script>
  44. import tabbar from "components/tabbar/index.vue";
  45. import echarsMap from "components/echars/maps.vue";
  46. export default {
  47. components: {
  48. tabbar,
  49. echarsMap,
  50. },
  51. data() {
  52. return {
  53. show: true,
  54. people: 15124,
  55. };
  56. },
  57. onReady() {},
  58. methods: {
  59. handleHome() {
  60. console.log("开启云上观灯", uni);
  61. uni.$u.route("/pages/home/home");
  62. },
  63. },
  64. };
  65. </script>
  66. <style lang="scss">
  67. .homeMap {
  68. width: 100%;
  69. height: 100vh;
  70. position: relative;
  71. background: url(https://4dscene.4dage.com/new4dkk/deng/static/img/bg03@2x.png)
  72. 100% 100% no-repeat;
  73. background-size: cover;
  74. .bottom {
  75. width: calc(100% - 47px);
  76. position: absolute;
  77. bottom: 105px;
  78. left: 0;
  79. height: 25vh;
  80. padding: 0 27px 0 20px;
  81. .list{
  82. .listItem{
  83. padding: 6px 10px;
  84. background: rgba(0,0,0,0.3);
  85. border-radius: 50px;
  86. margin-top: 10px;
  87. font-weight: 400;
  88. font-size: 12px;
  89. color: #FFFFFF;
  90. line-height: 14px;
  91. text-align: center;
  92. font-style: normal;
  93. }
  94. }
  95. }
  96. .people {
  97. position: absolute;
  98. height: 35px;
  99. padding: 0 5px;
  100. background: rgba(0,0,0,0.5);
  101. right: 0;
  102. top: 125px;
  103. display: flex;
  104. justify-content: center;
  105. align-items: center;
  106. border-radius: 20px 0 0 20px;
  107. .peopleNum {
  108. font-size: 24rpx;
  109. color: #fff;
  110. margin-right: 8px;
  111. }
  112. }
  113. .map {
  114. width: 100%;
  115. height: 100%;
  116. .scrollview-box {
  117. white-space: nowrap; // 滚动必须加的属性
  118. width: 100%;
  119. }
  120. .chinaMap {
  121. overflow: hidden;
  122. width: 100vw;
  123. height: 100vh;
  124. background: url(https://4dscene.4dage.com/new4dkk/deng/static/img/map@2x.png)
  125. 100% 100% no-repeat;
  126. // background-position: -1281px -397px;
  127. background-position: -1262px -383px;
  128. background-size: 1950px 1334px;
  129. }
  130. .allMap {
  131. width: 384px;
  132. height: calc(100vh - 358px);
  133. background: url(https://4dscene.4dage.com/new4dkk/deng/static/img/map@2x.png)
  134. 100% 55% no-repeat;
  135. background-position-y: 47px;
  136. background-position-x: -231px;
  137. background-size: 100vh 1097px;
  138. background-size: cover;
  139. position: relative;
  140. // background-position: -1758px -600px;
  141. .goChina {
  142. width: 100px;
  143. height: 100px;
  144. position: absolute;
  145. left: 240px;
  146. top: 236px;
  147. }
  148. }
  149. }
  150. }
  151. </style>