index.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  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="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(item.m)">
  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: 6,
  135. title: '憨山大师系列',
  136. m: 'SG-GadEtPyVUvN',
  137. img: 'https://4dscene.4dage.com/new4dkk/deng/static/img/m2/06.png',
  138. style: {
  139. left: '315px',
  140. top: '211px',
  141. height: '145px',
  142. paddingTop: '10px'
  143. }
  144. },{
  145. id: 7,
  146. title: '六祖坛经',
  147. m: 'SG-5eNn5iZnzej',
  148. img: 'https://4dscene.4dage.com/new4dkk/deng/static/img/m2/07.png',
  149. style: {
  150. left: '373px',
  151. top: '145px',
  152. }
  153. },
  154. {
  155. id: 8,
  156. title: '菩提本无树',
  157. img: 'https://4dscene.4dage.com/new4dkk/deng/static/img/m2/08.png',
  158. m: 'SG-McyGGua70BH',
  159. style: {
  160. left: '265px',
  161. top: '380px',
  162. height: '125px',
  163. paddingTop: '10px'
  164. }
  165. },
  166. {
  167. id: 4,
  168. title: '琉璃光如来',
  169. m: 'SG-CU5JTIjXXs0',
  170. img: 'https://4dscene.4dage.com/new4dkk/deng/static/img/m2/04.png',
  171. style: {
  172. left: '317px',
  173. top: '455px'
  174. }
  175. },
  176. {
  177. id: 3,
  178. title: '祈福长廊',
  179. m: 'SG-E3S63H7X7QI',
  180. img: 'https://4dscene.4dage.com/new4dkk/deng/static/img/m2/03.png',
  181. style: {
  182. left: '354px',
  183. top: '545px'
  184. }
  185. },
  186. {
  187. id: 5,
  188. title: '典藏罗汉像',
  189. m: 'SG-nfYaok3HBhG',
  190. img: 'https://4dscene.4dage.com/new4dkk/deng/static/img/m2/05.png',
  191. style: {
  192. left: '349px',
  193. top: '340px',
  194. height: '125px',
  195. }
  196. },
  197. // {
  198. // id: 6,
  199. // title: '宝林道场',
  200. // img: 'https://4dscene.4dage.com/new4dkk/deng/static/img/m/07.png',
  201. // m: 'SG-QHk73u8zRxD',
  202. // style: {}
  203. // },
  204. {
  205. id: 9,
  206. title: '文化长廊',
  207. m: 'SG-RWc2zM63H5g',
  208. img: 'https://4dscene.4dage.com/new4dkk/deng/static/img/m2/09.png',
  209. style: {
  210. left: '531px',
  211. top: '353px',
  212. }
  213. },
  214. {
  215. id: 1,
  216. title: '一花五叶',
  217. m: 'SG-PHP2F5mD35e',
  218. img: 'https://4dscene.4dage.com/new4dkk/deng/static/img/m2/01.png',
  219. style: {
  220. left: '353px',
  221. top: '683px'
  222. }
  223. },
  224. {
  225. id: 2,
  226. title: '智药三藏寻源',
  227. m: 'SG-SBAYwluXbtk',
  228. img: 'https://4dscene.4dage.com/new4dkk/deng/static/img/m2/02.png',
  229. style: {
  230. left: '323px',
  231. top: '635px',
  232. height: '145px',
  233. paddingTop: '10px'
  234. }
  235. },
  236. {
  237. id: 10,
  238. title: '繁花似锦',
  239. m: 'SG-pfZwK63KEQZ',
  240. img: 'https://4dscene.4dage.com/new4dkk/deng/static/img/m2/10.png',
  241. style: {
  242. left: '353px',
  243. top: '790px',
  244. height: '110px',
  245. paddingTop: '10px'
  246. }
  247. },
  248. ]
  249. }
  250. },
  251. onLoad() {},
  252. created() {
  253. this.getRequest('/api/wx/getCode').then((res) => {
  254. this.codeList = res.data || []
  255. })
  256. },
  257. mounted() {
  258. // document.getElementById('d1').scrollTop=100;//通过scrollTop设置滚动到100位置
  259. document.getElementById('home-img').scrollLeft=150;//通过scrollTop设置滚动到200位置
  260. document.getElementById('home-img').scrollTop=30;//通过scrollTop设置滚动到200位置
  261. },
  262. methods: {
  263. handleMap() {
  264. // uni.$u.route("/pages/home/map");
  265. },
  266. handleRoam(m) {
  267. // Toast('功能开发中~');url
  268. this.$router.replace('/url?m=' + m)
  269. // uni.$u.route("/pages/home/roam");
  270. },
  271. handleItem(item) {
  272. // Toast('功能开发中~');
  273. this.active = item.id
  274. },
  275. close() {
  276. this.show = false
  277. // console.log('close');
  278. },
  279. open() {},
  280. handleDaka(param) {
  281. this.getRequest('/api/wx/clockIn', {code: param.m}).then((res) => {
  282. Toast('打卡成功');
  283. this.codeList.push(param.m)
  284. })
  285. }
  286. }
  287. }
  288. </script>
  289. <style lang="scss">
  290. .content {
  291. display: flex;
  292. flex-direction: column;
  293. align-items: center;
  294. justify-content: center;
  295. height: 100vh;
  296. }
  297. .home-img {
  298. width: 100vw;
  299. height: 859px;
  300. overflow-x: scroll;
  301. overflow-y: scroll;
  302. // position: absolute;
  303. // left: 0;
  304. // right: 0;
  305. // top: 0;
  306. // bottom: 0;
  307. .homeBg {
  308. width: 200.33333vw;
  309. background-image: url(https://4dscene.4dage.com/new4dkk/deng/static/img/homebg2.jpg);
  310. background-size: 900px 930px;
  311. height: 930px;
  312. background-repeat: no-repeat;
  313. position: relative;
  314. .list {
  315. width: 100%;
  316. height: 100%;
  317. .itme {
  318. background-image: url(https://4dscene.4dage.com/new4dkk/deng/static/img/tab_normal1@2x.png);
  319. background-size: 100% 100%;
  320. background-repeat: no-repeat;
  321. position: absolute;
  322. top: 50%;
  323. left: 50%;
  324. // border-radius: 50%;
  325. text-align: center;
  326. line-height: 30px;
  327. width: 27px;
  328. height: 108px;
  329. font-weight: 400;
  330. font-size: 14px;
  331. color: #fff;
  332. // color: #5B472E;
  333. line-height: 17px;
  334. text-align: center;
  335. // letter-spacing: 10px;
  336. // vertical-align: middle;
  337. .bg {
  338. width: 100%;
  339. height: 100%;
  340. position: absolute;
  341. z-index: -1;
  342. }
  343. .itmeText {
  344. writing-mode: vertical-rl;
  345. position: relative;
  346. left: 5px;
  347. top: 22px;
  348. // letter-spacing: normal;
  349. // display: table-cell;
  350. // vertical-align: middle;
  351. }
  352. .mypopup {
  353. display: none;
  354. width: 230px;
  355. height: 162px;
  356. position: absolute;
  357. bottom: 108px;
  358. background: url(https://4dscene.4dage.com/new4dkk/deng/static/img/pop3@2x.png) 100% 100% no-repeat;
  359. background-size: 100%;
  360. // background: linear-gradient(158deg, rgba(193, 149, 97, 0.85) 0%, #5b472e 100%);
  361. // border: 1px solid;
  362. left: -95px;
  363. border-radius: 15px;
  364. z-index: 10;
  365. .popupImg {
  366. letter-spacing: 0;
  367. width: 209px;
  368. height: 131px;
  369. margin: 0 auto;
  370. position: relative;
  371. top: -10px;
  372. border-radius: 10px;
  373. overflow: hidden;
  374. .title {
  375. font-weight: bold;
  376. font-size: 14px;
  377. color: #ffffff;
  378. line-height: 16px;
  379. text-align: center;
  380. position: absolute;
  381. bottom: 10px;
  382. left: 20px;
  383. }
  384. img {
  385. width: 100%;
  386. height: 131px;
  387. object-fit: cover;
  388. border-radius: 10px;
  389. }
  390. .but {
  391. width: 63px;
  392. height: 25px;
  393. position: absolute;
  394. right: 10px;
  395. top: 10px;
  396. border-radius: 20px 20px 20px 20px;
  397. border: 1px solid #fff9b6;
  398. text-align: center;
  399. color: #fff9b6;
  400. line-height: 25px;
  401. font-weight: 400;
  402. font-size: 12px;
  403. color: #fff9b6;
  404. z-index: 1;
  405. }
  406. }
  407. .butList {
  408. .border {
  409. width: 1px;
  410. height: 26px;
  411. border-radius: 0px 0px 0px 0px;
  412. border-left: 1px solid;
  413. border-image: linear-gradient(
  414. 180deg,
  415. rgba(255, 255, 255, 0),
  416. rgba(255, 255, 255, 1),
  417. rgba(255, 255, 255, 0)
  418. )
  419. 1 1;
  420. }
  421. img {
  422. width: 24px;
  423. height: 24px;
  424. }
  425. }
  426. }
  427. }
  428. .active {
  429. background-image: url(https://4dscene.4dage.com/new4dkk/deng/static/img/tab_active@2x.png);
  430. color: #5b472e;
  431. .mypopup {
  432. display: block;
  433. }
  434. }
  435. }
  436. .img {
  437. height: calc(100vh - 81px);
  438. position: relative;
  439. z-index: -1;
  440. overflow-x: auto;
  441. width: 700px;
  442. img {
  443. height: 100%;
  444. position: relative;
  445. z-index: -1;
  446. }
  447. }
  448. }
  449. }
  450. </style>