index.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  1. <template>
  2. <div class="content">
  3. <div class="home-img" id="home-img">
  4. <div class="homeBg" style=" background-size: auto 930px;
  5. height: 930px;">
  6. <div class="list">
  7. <div
  8. class="itme"
  9. :class="{ active: item.id == active }"
  10. v-for="item in list"
  11. :style="item.style"
  12. :key="item.id"
  13. @click.stop="handleItem(item)"
  14. >
  15. <div class="itmeText">{{ item.title }}</div>
  16. <div class="mypopup" :style="{top: item.title == '宝林道场'?'125px':''}">
  17. <div class="popupImg">
  18. <div class="but">可打卡</div>
  19. <img
  20. width="209px"
  21. height="131px"
  22. radius="10"
  23. :src="'https://4dscene.4dage.com/new4dkk/deng/static/img/m/cjms.jpg'||item.img"
  24. ></img>
  25. <div class="title">{{ item.title }}</div>
  26. </div>
  27. <div
  28. class="flex justify-evenly butList content-center items-center"
  29. style="line-height: 24px; color: #fff"
  30. >
  31. <div class="flex justify-around content-center items-center" @click="handleRoam">
  32. <img src="https://4dscene.4dage.com/new4dkk/deng/static/img/icon_3d@2x.png" />
  33. 漫游
  34. </div>
  35. <!-- <div class="border"></div>
  36. <div class="flex justify-around content-center items-center">
  37. <img src="https://4dscene.4dage.com/new4dkk/deng/static/img/icon_navigator@2x.png" />
  38. 导航
  39. </div> -->
  40. </div>
  41. </div>
  42. </div>
  43. </div>
  44. </div>
  45. </div>
  46. <tabbar />
  47. <!-- <div class="fixed bottom-40 flex w-full justify-around" style="">
  48. <div class="text-center">
  49. 点亮祈福
  50. <u-icon
  51. class="text-center flex-col-reverse"
  52. name="scan"
  53. color="#2979ff"
  54. size="28"
  55. ></u-icon>
  56. </div>
  57. <div class="text-center">
  58. 扫码打卡
  59. <u-icon
  60. class="text-center flex-col-reverse"
  61. name="scan"
  62. color="#2979ff"
  63. size="28"
  64. ></u-icon>
  65. </div>
  66. </div> -->
  67. <!-- <tabbar></tabbar> -->
  68. <!-- <van-popup
  69. closeIconPos="bottom-right"
  70. :show="show"
  71. mode="center"
  72. round="10"
  73. :closeable="true"
  74. @close="close"
  75. @open="open"
  76. >
  77. <div>
  78. <div class="text">
  79. <img
  80. src="https://4dscene.4dage.com/new4dkk/v2/lang/images/solutions/government/survey1.png"
  81. ></img>
  82. <text mt-10>出淤泥而不染,濯清涟而不妖</text>
  83. </div>
  84. <div class="butList flex justify-around my-10">
  85. <u-button
  86. @click="handleRoam"
  87. style="width: 60px"
  88. type="primary"
  89. plain
  90. icon="car"
  91. size="small"
  92. shape="circle"
  93. text="漫游"
  94. ></u-button>
  95. <u-button
  96. @click="handleMap"
  97. style="width: 60px"
  98. type="primary"
  99. plain
  100. icon="map"
  101. size="small"
  102. shape="circle"
  103. text="祈愿地图"
  104. ></u-button>
  105. <u-button
  106. style="width: 60px"
  107. type="primary"
  108. plain
  109. icon="map"
  110. size="small"
  111. shape="circle"
  112. text="导航"
  113. ></u-button>
  114. </div>
  115. </div>
  116. </van-popup> -->
  117. </div>
  118. </template>
  119. <script>
  120. import tabbar from "@/components/tabbar/index.vue";
  121. import { Toast } from 'vant';
  122. export default {
  123. components: {
  124. tabbar,
  125. },
  126. data() {
  127. return {
  128. title: 'Hello',
  129. show: false,
  130. codeList: [],
  131. active: null,
  132. list: [
  133. {
  134. id: 1,
  135. title: '大雄宝殿',
  136. m: 'SG-PHP2F5mD35e',
  137. img: 'https://4dscene.4dage.com/new4dkk/deng/static/img/m/02.png',
  138. style: {
  139. left: '315px',
  140. top: '326px',
  141. }
  142. },{
  143. id: 8,
  144. title: '灵照塔',
  145. m: 'SG-PHP2F5mD35e',
  146. img: 'https://4dscene.4dage.com/new4dkk/deng/static/img/m/02.png',
  147. style: {
  148. left: '373px',
  149. top: '260px',
  150. }
  151. },
  152. {
  153. id: 2,
  154. title: '宝林道场',
  155. img: 'https://4dscene.4dage.com/new4dkk/deng/static/img/m/01.png',
  156. m: 'SG-OMcbiNUQwPE',
  157. style: {
  158. left: '355px',
  159. top: '114px'
  160. }
  161. },
  162. {
  163. id: 3,
  164. title: '琉璃光如来',
  165. m: 'SG-E3S63H7X7QI',
  166. img: 'https://4dscene.4dage.com/new4dkk/deng/static/img/m/03.png',
  167. style: {
  168. left: '317px',
  169. top: '570px'
  170. }
  171. },
  172. {
  173. id: 4,
  174. title: '祈福长廊',
  175. m: 'SG-7uj9R1IZNsp',
  176. img: 'https://4dscene.4dage.com/new4dkk/deng/static/img/m/05.png',
  177. style: {
  178. left: '354px',
  179. top: '660px'
  180. }
  181. },
  182. {
  183. id: 5,
  184. title: '典藏罗汉像',
  185. m: 'SG-zlWvkf1WATJ',
  186. img: 'https://4dscene.4dage.com/new4dkk/deng/static/img/m/06.png',
  187. style: {
  188. left: '349px',
  189. top: '455px'
  190. }
  191. },
  192. // {
  193. // id: 6,
  194. // title: '宝林道场',
  195. // img: 'https://4dscene.4dage.com/new4dkk/deng/static/img/m/07.png',
  196. // m: 'SG-QHk73u8zRxD',
  197. // style: {}
  198. // },
  199. {
  200. id: 7,
  201. title: '文化长廊',
  202. m: 'SG-w51bY2f2Ojj',
  203. img: 'https://4dscene.4dage.com/new4dkk/deng/static/img/m/11.png',
  204. style: {
  205. left: '531px',
  206. top: '467px',
  207. }
  208. },
  209. {
  210. id: 9,
  211. title: '一花五叶',
  212. m: 'SG-w51bY2f2Ojj',
  213. img: 'https://4dscene.4dage.com/new4dkk/deng/static/img/m/11.png',
  214. style: {
  215. left: '353px',
  216. top: '798px'
  217. }
  218. },
  219. {
  220. id: 10,
  221. title: '智药三藏寻源',
  222. m: 'SG-w51bY2f2Ojj',
  223. img: 'https://4dscene.4dage.com/new4dkk/deng/static/img/m/11.png',
  224. style: {
  225. left: '323px',
  226. top: '750px',
  227. height: '145px',
  228. paddingTop: '10px'
  229. }
  230. },
  231. ]
  232. }
  233. },
  234. onLoad() {},
  235. created() {
  236. this.getRequest('/api/wx/getCode').then((res) => {
  237. this.codeList = res.data || []
  238. })
  239. },
  240. mounted() {
  241. // document.getElementById('d1').scrollTop=100;//通过scrollTop设置滚动到100位置
  242. document.getElementById('home-img').scrollLeft=150;//通过scrollTop设置滚动到200位置
  243. },
  244. methods: {
  245. handleMap() {
  246. // uni.$u.route("/pages/home/map");
  247. },
  248. handleRoam() {
  249. Toast('功能开发中~');
  250. // uni.$u.route("/pages/home/roam");
  251. },
  252. handleItem(item) {
  253. // Toast('功能开发中~');
  254. this.active = item.id
  255. },
  256. close() {
  257. this.show = false
  258. // console.log('close');
  259. },
  260. open() {},
  261. handleDaka(param) {
  262. this.getRequest('/api/wx/clockIn', {code: param.m}).then((res) => {
  263. Toast('打卡成功');
  264. this.codeList.push(param.m)
  265. })
  266. }
  267. }
  268. }
  269. </script>
  270. <style lang="scss">
  271. .content {
  272. display: flex;
  273. flex-direction: column;
  274. align-items: center;
  275. justify-content: center;
  276. height: 100vh;
  277. }
  278. .home-img {
  279. width: 100vw;
  280. height: 859px;
  281. overflow-x: scroll;
  282. overflow-y: scroll;
  283. // position: absolute;
  284. // left: 0;
  285. // right: 0;
  286. // top: 0;
  287. // bottom: 0;
  288. .homeBg {
  289. width: 200.33333vw;
  290. background-image: url(https://4dscene.4dage.com/new4dkk/deng/static/img/homeBg.jpg);
  291. background-size: 900px 930px;
  292. height: 930px;
  293. background-repeat: no-repeat;
  294. position: relative;
  295. .list {
  296. width: 100%;
  297. height: 100%;
  298. .itme {
  299. background-image: url(https://4dscene.4dage.com/new4dkk/deng/static/img/tab_normal1@2x.png);
  300. background-size: 100% 100%;
  301. background-repeat: no-repeat;
  302. position: absolute;
  303. top: 50%;
  304. left: 50%;
  305. // border-radius: 50%;
  306. text-align: center;
  307. line-height: 30px;
  308. width: 27px;
  309. height: 108px;
  310. font-weight: 400;
  311. font-size: 14px;
  312. color: #fff;
  313. // color: #5B472E;
  314. line-height: 17px;
  315. text-align: center;
  316. // letter-spacing: 10px;
  317. // vertical-align: middle;
  318. .bg {
  319. width: 100%;
  320. height: 100%;
  321. position: absolute;
  322. z-index: -1;
  323. }
  324. .itmeText {
  325. writing-mode: vertical-rl;
  326. position: relative;
  327. left: 5px;
  328. top: 22px;
  329. // letter-spacing: normal;
  330. // display: table-cell;
  331. // vertical-align: middle;
  332. }
  333. .mypopup {
  334. display: none;
  335. width: 230px;
  336. height: 162px;
  337. position: absolute;
  338. bottom: 108px;
  339. background: url(https://4dscene.4dage.com/new4dkk/deng/static/img/pop3@2x.png) 100% 100% no-repeat;
  340. background-size: 100%;
  341. // background: linear-gradient(158deg, rgba(193, 149, 97, 0.85) 0%, #5b472e 100%);
  342. // border: 1px solid;
  343. left: -95px;
  344. border-radius: 15px;
  345. z-index: 10;
  346. .popupImg {
  347. letter-spacing: 0;
  348. width: 209px;
  349. height: 131px;
  350. margin: 0 auto;
  351. position: relative;
  352. top: -10px;
  353. border-radius: 10px;
  354. overflow: hidden;
  355. .title {
  356. font-weight: bold;
  357. font-size: 14px;
  358. color: #ffffff;
  359. line-height: 16px;
  360. text-align: center;
  361. position: absolute;
  362. bottom: 10px;
  363. left: 20px;
  364. }
  365. img {
  366. width: 100%;
  367. height: 131px;
  368. object-fit: cover;
  369. border-radius: 10px;
  370. }
  371. .but {
  372. width: 63px;
  373. height: 25px;
  374. position: absolute;
  375. right: 10px;
  376. top: 10px;
  377. border-radius: 20px 20px 20px 20px;
  378. border: 1px solid #fff9b6;
  379. text-align: center;
  380. color: #fff9b6;
  381. line-height: 25px;
  382. font-weight: 400;
  383. font-size: 12px;
  384. color: #fff9b6;
  385. z-index: 1;
  386. }
  387. }
  388. .butList {
  389. .border {
  390. width: 1px;
  391. height: 26px;
  392. border-radius: 0px 0px 0px 0px;
  393. border-left: 1px solid;
  394. border-image: linear-gradient(
  395. 180deg,
  396. rgba(255, 255, 255, 0),
  397. rgba(255, 255, 255, 1),
  398. rgba(255, 255, 255, 0)
  399. )
  400. 1 1;
  401. }
  402. img {
  403. width: 24px;
  404. height: 24px;
  405. }
  406. }
  407. }
  408. }
  409. .active {
  410. background-image: url(https://4dscene.4dage.com/new4dkk/deng/static/img/tab_active@2x.png);
  411. color: #5b472e;
  412. .mypopup {
  413. display: block;
  414. }
  415. }
  416. }
  417. .img {
  418. height: calc(100vh - 81px);
  419. position: relative;
  420. z-index: -1;
  421. overflow-x: auto;
  422. width: 700px;
  423. img {
  424. height: 100%;
  425. position: relative;
  426. z-index: -1;
  427. }
  428. }
  429. }
  430. }
  431. </style>