home.vue 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366
  1. <template>
  2. <view class="content">
  3. <view class="home-img">
  4. <div class="homeBg">
  5. <scroll-view :scroll-x="true" class="scrollview-box">
  6. <div class="img">
  7. <u--image
  8. height="calc(100vh - 71px)"
  9. width="700px"
  10. mode="heightFix"
  11. src="/static/img/homeBg.jpg"
  12. ></u--image>
  13. </div>
  14. <div class="list">
  15. <view
  16. class="itme"
  17. :class="{ active: item.id == active }"
  18. v-for="item in list"
  19. :key="item.id"
  20. @click.stop="handleItem(item)"
  21. >
  22. <img
  23. class="bg"
  24. v-if="item.id == active"
  25. src="/static/img/tab_active@2x.png"
  26. alt=""
  27. />
  28. <img
  29. class="bg"
  30. v-else
  31. src="/static/img/tab_normal@2x.png"
  32. alt=""
  33. />
  34. <div class="itmeText">{{ item.title }}</div>
  35. <div class="mypopup">
  36. <div class="popupImg">
  37. <div class="but">可打卡</div>
  38. <u--image
  39. width="209px"
  40. height="131px"
  41. radius="10"
  42. src="https://4dkk.4dage.com/head/15915816041/head_1722399456050.png"
  43. ></u--image>
  44. <div class="title">{{ item.title }}</div>
  45. </div>
  46. <div
  47. class="flex justify-evenly butList content-center"
  48. style="line-height: 24px; color: #fff"
  49. >
  50. <div class="flex justify-around content-center" @click="handleRoam">
  51. <img src="/static/img/icon_dollhouse_normal@2x.png" />
  52. 漫游
  53. </div>
  54. <div class="border"></div>
  55. <div class="flex justify-around content-center">
  56. <img src="/static/img/icon_dollhouse_normal@2x.png" />
  57. 导航
  58. </div>
  59. </div>
  60. </div>
  61. </view>
  62. </div>
  63. </scroll-view>
  64. <!-- <div >
  65. </div> -->
  66. </div>
  67. </view>
  68. <!-- <view class="fixed bottom-40 flex w-full justify-around" style="">
  69. <view class="text-center">
  70. 点亮祈福
  71. <u-icon
  72. class="text-center flex-col-reverse"
  73. name="scan"
  74. color="#2979ff"
  75. size="28"
  76. ></u-icon>
  77. </view>
  78. <view class="text-center">
  79. 扫码打卡
  80. <u-icon
  81. class="text-center flex-col-reverse"
  82. name="scan"
  83. color="#2979ff"
  84. size="28"
  85. ></u-icon>
  86. </view>
  87. </view> -->
  88. <tabbar></tabbar>
  89. <u-popup
  90. closeIconPos="bottom-right"
  91. :show="show"
  92. mode="center"
  93. round="10"
  94. :closeable="true"
  95. @close="close"
  96. @open="open"
  97. >
  98. <view>
  99. <view class="text">
  100. <u--image
  101. src="https://4dscene.4dage.com/new4dkk/v2/lang/images/solutions/government/survey1.png"
  102. ></u--image>
  103. <text mt-10>出淤泥而不染,濯清涟而不妖</text>
  104. </view>
  105. <view class="butList flex justify-around my-10">
  106. <u-button
  107. @click="handleRoam"
  108. style="width: 60px"
  109. type="primary"
  110. plain
  111. icon="car"
  112. size="small"
  113. shape="circle"
  114. text="漫游"
  115. ></u-button>
  116. <u-button
  117. @click="handleMap"
  118. style="width: 60px"
  119. type="primary"
  120. plain
  121. icon="map"
  122. size="small"
  123. shape="circle"
  124. text="祈愿地图"
  125. ></u-button>
  126. <u-button
  127. style="width: 60px"
  128. type="primary"
  129. plain
  130. icon="map"
  131. size="small"
  132. shape="circle"
  133. text="导航"
  134. ></u-button>
  135. </view>
  136. </view>
  137. </u-popup>
  138. </view>
  139. </template>
  140. <script>
  141. import tabbar from "components/tabbar/index.vue";
  142. export default {
  143. components: {
  144. tabbar,
  145. },
  146. data() {
  147. return {
  148. title: "Hello",
  149. show: false,
  150. active: null,
  151. list: [
  152. {
  153. id: 1,
  154. title: "大雄宝殿",
  155. style: {},
  156. },
  157. ],
  158. };
  159. },
  160. onLoad() {},
  161. methods: {
  162. handleMap() {
  163. uni.$u.route("/pages/home/map");
  164. },
  165. handleRoam() {
  166. uni.$u.route("/pages/home/roam");
  167. },
  168. handleItem(item) {
  169. this.active = item.id;
  170. },
  171. close() {
  172. this.show = false;
  173. // console.log('close');
  174. },
  175. open() {},
  176. },
  177. };
  178. </script>
  179. <style lang="scss">
  180. .content {
  181. display: flex;
  182. flex-direction: column;
  183. align-items: center;
  184. justify-content: center;
  185. min-height: 100vh;
  186. .right {
  187. position: fixed;
  188. left: 20px;
  189. top: 20px;
  190. }
  191. }
  192. .logo {
  193. height: 200rpx;
  194. width: 200rpx;
  195. margin-top: 200rpx;
  196. margin-left: auto;
  197. margin-right: auto;
  198. margin-bottom: 50rpx;
  199. }
  200. .text-area {
  201. display: flex;
  202. justify-content: center;
  203. padding-bottom: 50%;
  204. }
  205. .title {
  206. font-size: 36rpx;
  207. color: #8f8f94;
  208. }
  209. .home-img {
  210. width: 100%;
  211. height: 100%;
  212. position: absolute;
  213. left: 0;
  214. right: 0;
  215. top: 0;
  216. bottom: 0;
  217. .homeBg {
  218. .scrollview-box {
  219. white-space: nowrap; // 滚动必须加的属性
  220. width: 100%;
  221. }
  222. .list {
  223. .itme {
  224. position: absolute;
  225. top: 50%;
  226. left: 50%;
  227. border-radius: 50%;
  228. text-align: center;
  229. line-height: 30px;
  230. width: 27px;
  231. height: 108px;
  232. font-weight: 400;
  233. font-size: 14px;
  234. color: #fff;
  235. // color: #5B472E;
  236. line-height: 17px;
  237. text-align: center;
  238. // letter-spacing: 10px;
  239. // vertical-align: middle;
  240. .bg {
  241. width: 100%;
  242. height: 100%;
  243. position: absolute;
  244. z-index: -1;
  245. }
  246. .itmeText {
  247. writing-mode: vertical-rl;
  248. position: relative;
  249. left: 18px;
  250. top: 22px;
  251. // letter-spacing: normal;
  252. // display: table-cell;
  253. // vertical-align: middle;
  254. }
  255. .mypopup {
  256. display: none;
  257. width: 230px;
  258. height: 162px;
  259. position: absolute;
  260. bottom: 108px;
  261. background: linear-gradient(
  262. 158deg,
  263. rgba(193, 149, 97, 0.85) 0%,
  264. #5b472e 100%
  265. );
  266. border: 1px solid;
  267. left: -95px;
  268. border-radius: 15px;
  269. .popupImg {
  270. letter-spacing: 0;
  271. width: 209px;
  272. height: 131px;
  273. padding: 0 9px;
  274. position: relative;
  275. top: -10px;
  276. border-radius: 10px;
  277. overflow: hidden;
  278. .title {
  279. font-weight: bold;
  280. font-size: 14px;
  281. color: #ffffff;
  282. line-height: 16px;
  283. text-align: center;
  284. position: absolute;
  285. bottom: 10px;
  286. left: 20px;
  287. }
  288. .but {
  289. width: 63px;
  290. height: 25px;
  291. position: absolute;
  292. right: 10px;
  293. top: 10px;
  294. border-radius: 20px 20px 20px 20px;
  295. border: 1px solid #fff9b6;
  296. text-align: center;
  297. color: #fff9b6;
  298. line-height: 25px;
  299. font-weight: 400;
  300. font-size: 12px;
  301. color: #fff9b6;
  302. z-index: 1;
  303. }
  304. }
  305. .butList {
  306. .border {
  307. width: 1px;
  308. height: 26px;
  309. border-radius: 0px 0px 0px 0px;
  310. border-left: 1px solid;
  311. border-image: linear-gradient(
  312. 180deg,
  313. rgba(255, 255, 255, 0),
  314. rgba(255, 255, 255, 1),
  315. rgba(255, 255, 255, 0)
  316. )
  317. 1 1;
  318. }
  319. img {
  320. width: 24px;
  321. height: 24px;
  322. }
  323. }
  324. }
  325. }
  326. .active {
  327. color: #5b472e;
  328. .mypopup {
  329. display: block;
  330. }
  331. }
  332. }
  333. .img {
  334. height: calc(100vh - 81px);
  335. position: relative;
  336. z-index: -1;
  337. overflow-x: auto;
  338. width: 700px;
  339. img {
  340. height: 100%;
  341. position: relative;
  342. z-index: -1;
  343. }
  344. }
  345. }
  346. }
  347. .u-popup__content__close {
  348. right: calc(50% - 4.5px) !important;
  349. bottom: -40px !important;
  350. z-index: 10;
  351. border: 1px solid #fff;
  352. border-radius: 20px;
  353. padding: 5px;
  354. color: #fff;
  355. .u-icon__icon {
  356. color: #fff !important;
  357. }
  358. }
  359. </style>