HomeView(横向滑动).vue 56 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804
  1. <template>
  2. <div class="home">
  3. <div class="bg-mask" />
  4. <Transition name="fade-out">
  5. <Startup
  6. v-if="!store.state.haveShownStartup"
  7. class="startup"
  8. />
  9. </Transition>
  10. <!-- 标题 -->
  11. <div
  12. class="title-wrap"
  13. :style="{
  14. opacity: titleOpacity,
  15. }"
  16. >
  17. <img
  18. class="title"
  19. src="@/assets/images/home-title.png"
  20. alt=""
  21. draggable="false"
  22. >
  23. <div class="sub-text">
  24. 南京博物院<br>
  25. 绢本 墨笔<br>
  26. 元 李衎<br>
  27. </div>
  28. </div>
  29. <!-- 画作 -->
  30. <div
  31. class="painting-wrap"
  32. :style="{
  33. top: summaryOpacity > 0 ? `${90 / windowSizeWhenDesignForRef * windowSizeInCssForRef.substring(0, windowSizeInCssForRef.length - 2)}px` : `${paintingTop / windowSizeWhenDesignForRef * windowSizeInCssForRef.substring(0, windowSizeInCssForRef.length - 2)}px`,
  34. width: summaryOpacity > 0 ? `calc(225 / 308 * 100%)` : paintingWidth == 485 ? `110%` : `${paintingWidth / windowSizeWhenDesignForRef * windowSizeInCssForRef.substring(0, windowSizeInCssForRef.length - 2)}px`,
  35. height: summaryOpacity > 0 ? `${523 / windowSizeWhenDesignForRef * windowSizeInCssForRef.substring(0, windowSizeInCssForRef.length - 2)}px` : `${paintingHeight / windowSizeWhenDesignForRef * windowSizeInCssForRef.substring(0, windowSizeInCssForRef.length - 2)}px`,
  36. transform: `${currentPosition}`,
  37. transition: currentPosition != '' ? `all 1.5s` : ``
  38. }"
  39. >
  40. <div
  41. class="size-sign-h"
  42. :style="{
  43. opacity: 0,
  44. }"
  45. >
  46. <img
  47. class=""
  48. src="@/assets/images/size-sign-h.png"
  49. alt=""
  50. draggable="false"
  51. >
  52. <span>100.6cm</span>
  53. </div>
  54. <div
  55. class="size-sign-v"
  56. :style="{
  57. opacity: 0,
  58. }"
  59. >
  60. <img
  61. class=""
  62. src="@/assets/images/size-sign-v.png"
  63. alt=""
  64. draggable="false"
  65. >
  66. <span>151.7cm</span>
  67. </div>
  68. <!-- 绿色幕布层 -->
  69. <div
  70. class="green-box"
  71. :style="{ opacity: stemGreenOpacity }"
  72. />
  73. <img
  74. class="painting-border"
  75. src="@/assets/images/painting-border-new.png"
  76. alt=""
  77. draggable="false"
  78. >
  79. <img
  80. class="painting-stem"
  81. src="@/assets/images/home-painting1.jpg"
  82. alt=""
  83. draggable="false"
  84. >
  85. <img
  86. class="painting-stem"
  87. src="@/assets/images/home-painting2.jpg"
  88. alt=""
  89. draggable="false"
  90. >
  91. <img
  92. class="painting-stem"
  93. src="@/assets/images/img_fen-min.png"
  94. :style="{
  95. opacity: leafOpacity3,
  96. zIndex: 2,
  97. }"
  98. alt=""
  99. draggable="false"
  100. >
  101. <img
  102. class="painting-stem"
  103. src="@/assets/images/img_ge-min.png"
  104. :style="{
  105. opacity: leafOpacity1,
  106. zIndex: 2,
  107. }"
  108. alt=""
  109. draggable="false"
  110. >
  111. <img
  112. class="painting-stem"
  113. src="@/assets/images/img_guanmu-min.png"
  114. :style="{
  115. opacity: stoneOpacity1,
  116. }"
  117. alt=""
  118. draggable="false"
  119. >
  120. <img
  121. class="painting-stem"
  122. src="@/assets/images/img_jie-min.png"
  123. alt=""
  124. :style="{
  125. opacity: leafOpacity2,
  126. zIndex: 2,
  127. }"
  128. draggable="false"
  129. >
  130. <img
  131. class="painting-stem"
  132. src="@/assets/images/img_kumu-min.png"
  133. :style="{
  134. opacity: stoneOpacity2,
  135. }"
  136. alt=""
  137. draggable="false"
  138. >
  139. <img
  140. class="painting-stem"
  141. src="@/assets/images/img_stone_all-min.png"
  142. :style="{
  143. opacity: stoneOpacity3,
  144. }"
  145. alt=""
  146. draggable="false"
  147. >
  148. <img
  149. class="painting-stem"
  150. src="@/assets/images/img_stone-min.png"
  151. :style="{
  152. opacity: stoneOpacity,
  153. }"
  154. alt=""
  155. draggable="false"
  156. >
  157. <img
  158. class="painting-stem"
  159. src="@/assets/images/img_zhuye-min.png"
  160. alt=""
  161. :style="{
  162. opacity: leafOpacity,
  163. zIndex: 2,
  164. }"
  165. draggable="false"
  166. >
  167. <img
  168. class="painting-stem"
  169. :style="{
  170. opacity: stemOpacity,
  171. }"
  172. src="@/assets/images/home-1.jpg"
  173. alt=""
  174. draggable="false"
  175. >
  176. <img
  177. class="painting-stem"
  178. :style="{
  179. opacity: stemOpacity1,
  180. zIndex: 2,
  181. }"
  182. src="@/assets/images/home-1-1.jpg"
  183. alt=""
  184. draggable="false"
  185. >
  186. <img
  187. class="painting-stem"
  188. :style="{
  189. opacity: stemOpacity2,
  190. zIndex: 2,
  191. }"
  192. src="@/assets/images/home-1-2.jpg"
  193. alt=""
  194. draggable="false"
  195. >
  196. <!-- <img
  197. class="painting-leaf"
  198. :style="{
  199. opacity: leafOpacity1,
  200. zIndex: 2,
  201. }"
  202. src="@/assets/images/home-2-1.jpg"
  203. alt=""
  204. draggable="false"
  205. > -->
  206. <!-- <img
  207. class="painting-leaf"
  208. :style="{
  209. opacity: leafOpacity2,
  210. zIndex: 2,
  211. }"
  212. src="@/assets/images/home-2-2.jpg"
  213. alt=""
  214. draggable="false"
  215. >
  216. <img
  217. class="painting-leaf"
  218. :style="{
  219. opacity: leafOpacity3,
  220. zIndex: 2,
  221. }"
  222. src="@/assets/images/home-2-3.jpg"
  223. alt=""
  224. draggable="false"
  225. > -->
  226. <!-- <img
  227. class="painting-stone"
  228. :style="{
  229. opacity: stoneOpacity,
  230. }"
  231. src="@/assets/images/home-3.jpg"
  232. alt=""
  233. draggable="false"
  234. > -->
  235. <!-- <img
  236. class="painting-stone"
  237. :style="{
  238. opacity: stoneOpacity1,
  239. zIndex: 2,
  240. }"
  241. src="@/assets/images/home-3-1.jpg"
  242. alt=""
  243. draggable="false"
  244. > -->
  245. </div>
  246. <!-- 叶子底部渐变层 -->
  247. <div
  248. v-show="leafOpacity1 > 0 || leafOpacity2 > 0 || leafOpacity3 > 0"
  249. :style="{
  250. opacity: leafTextOpacity,
  251. }"
  252. class="jianbian"
  253. />
  254. <!-- 石头文字层 -->
  255. <div
  256. class="stone-text-box"
  257. :style="{
  258. opacity: stoneOpacity3,
  259. }"
  260. >
  261. <img
  262. class="stone-text"
  263. src="@/assets/images/stone-text-min.png"
  264. >
  265. </div>
  266. <!-- 热点层 -->
  267. <div
  268. class="hotspot-wrap"
  269. :style="{
  270. top: `${paintingTop / windowSizeWhenDesignForRef * windowSizeInCssForRef.substring(0, windowSizeInCssForRef.length - 2)}px`,
  271. width: summaryOpacity > 0 ? `calc(215 / 308 * 100%)` : paintingWidth == 485 ? `110%` : `${paintingWidth / windowSizeWhenDesignForRef * windowSizeInCssForRef.substring(0, windowSizeInCssForRef.length - 2)}px`,
  272. }"
  273. >
  274. <HotspotForHomepage
  275. v-show="isShowHotspot"
  276. class="hotspot-1"
  277. @click="isShowHotspotDetail1 = true"
  278. />
  279. <HotspotForHomepage
  280. v-show="false"
  281. class="hotspot-2"
  282. @click="showBigPainting"
  283. />
  284. <HotspotForHomepage
  285. v-show="isShowHotspot"
  286. class="hotspot-3"
  287. @click="isShowHotspotDetail3 = true"
  288. />
  289. </div>
  290. <!-- 文字介绍 -->
  291. <div
  292. ref="longDesc"
  293. v-touch:swipe.left="onSwipeLeft"
  294. v-touch:swipe.right="onSwipeRight"
  295. class="long-desc"
  296. :style="{
  297. top: `${(paintingTop + paintingHeight + 53) / windowSizeWhenDesignForRef * windowSizeInCssForRef.substring(0, windowSizeInCssForRef.length - 2)}px`,
  298. opacity: longDescOpacity,
  299. }"
  300. >
  301. <!-- <h3>作品简介:</h3> -->
  302. <p
  303. v-for="(item, index) in homepagePaintingDesc"
  304. :key="index"
  305. >
  306. {{ item }}
  307. </p>
  308. <!-- <h3>作者简介:</h3>
  309. <p
  310. v-for="(item, index) in homepageAuthorDesc"
  311. :key="index"
  312. >
  313. {{ item }}
  314. </p> -->
  315. </div>
  316. <!-- 展开作者简介 -->
  317. <div
  318. class="up-icon"
  319. :style="{
  320. top: `${(paintingTop + paintingHeight + 300) / windowSizeWhenDesignForRef * windowSizeInCssForRef.substring(0, windowSizeInCssForRef.length - 2)}px`,
  321. opacity: longDescOpacity,
  322. }"
  323. @click="isShowAuthorDesc = true"
  324. >
  325. <img src="@/assets/images/icon_up.png">
  326. </div>
  327. <div
  328. v-show="isShowAuthorDesc"
  329. class="author-box"
  330. >
  331. <img
  332. class="top-icon"
  333. src="@/assets/images/img_author.png"
  334. alt=""
  335. >
  336. <div class="author-desc">
  337. <p
  338. v-for="(item, index) in homepageAuthorDesc"
  339. :key="index"
  340. >
  341. {{ item }}
  342. </p>
  343. </div>
  344. <img
  345. class="down-icon"
  346. src="@/assets/images/icon_down.png"
  347. @click="isShowAuthorDesc = false"
  348. >
  349. </div>
  350. <!-- stem title -->
  351. <!-- 上面 -->
  352. <div
  353. class="fixed-desc detail-title-stem"
  354. :style="{
  355. top: `${paintingTop + 750 / windowSizeWhenDesignForRef * windowSizeInCssForRef.substring(0, windowSizeInCssForRef.length - 2)}px`,
  356. opacity:stemOpacity ,
  357. }"
  358. >
  359. 三竿修竹
  360. </div>
  361. <div
  362. class="fixed-desc detail-title-stem"
  363. :style="{
  364. top: `${paintingTop + 500 / windowSizeWhenDesignForRef * windowSizeInCssForRef.substring(0, windowSizeInCssForRef.length - 2)}px`,
  365. opacity: stemTextOpacity2,
  366. }"
  367. >
  368. 三竿修竹
  369. </div>
  370. <!-- <div
  371. class="fixed-desc detail-title-stem"
  372. :style="{
  373. top: `${( stoneOpacity1 > 0 ? paintingTop + 500 : paintingTop + 580 ) / windowSizeWhenDesignForRef * windowSizeInCssForRef.substring(0, windowSizeInCssForRef.length - 2)}px`,
  374. opacity: stoneTextOpacity,
  375. }"
  376. >
  377. 卧石
  378. </div> -->
  379. <!-- <div
  380. class="fixed-desc detail-title-stem"
  381. :style="{
  382. top: `${( leafOpacity1 > 0 || leafOpacity2 >0 || leafOpacity3 >0? paintingTop + 330 : paintingTop + 410 ) / windowSizeWhenDesignForRef * windowSizeInCssForRef.substring(0, windowSizeInCssForRef.length - 2)}px`,
  383. opacity: leafTextOpacity,
  384. }"
  385. >
  386. 竹叶
  387. </div> -->
  388. <div
  389. class="fixed-desc detail-desc-stem"
  390. :style="{
  391. top: `${(paintingTop + 750) / windowSizeWhenDesignForRef * windowSizeInCssForRef.substring(0, windowSizeInCssForRef.length - 2)}px`,
  392. opacity: stemGreenOpacity,
  393. }"
  394. v-html="stemOpacity1 > 0 ? detailDescStem1 : detailDescStem2 "
  395. />
  396. <div
  397. class="fixed-desc detail-desc-leaf"
  398. :style="{
  399. top: `${(paintingTop + 750) / windowSizeWhenDesignForRef * windowSizeInCssForRef.substring(0, windowSizeInCssForRef.length - 2)}px`,
  400. opacity: leafGreenOpacity,
  401. zIndex: 4,
  402. }"
  403. v-html="leafOpacity1 > 0 ? detailDescLeaf1 : leafOpacity2 > 0 ? detailDescLeaf2 : detailDescLeaf3"
  404. />
  405. <!-- <div
  406. class="fixed-desc detail-desc-stone"
  407. :style="{
  408. top: `${(paintingTop + 750) / windowSizeWhenDesignForRef * windowSizeInCssForRef.substring(0, windowSizeInCssForRef.length - 2)}px`,
  409. opacity: stoneGreenOpacity,
  410. }"
  411. v-html="detailDescStone"
  412. /> -->
  413. <div
  414. class="fixed-desc summary-desc"
  415. :style="{
  416. top: `${(paintingTop + 700) / windowSizeWhenDesignForRef * windowSizeInCssForRef.substring(0, windowSizeInCssForRef.length - 2)}px`,
  417. opacity: summaryOpacity,
  418. }"
  419. >
  420. {{ summaryDesc }}
  421. </div>
  422. <div class="progress-bar">
  423. <div
  424. class="bar-artwork-desc"
  425. :style="{
  426. width: `${scrollerElScrollTop / summaryHideAt * 100}%`,
  427. }"
  428. />
  429. <!-- <img
  430. class="progress-bar-node-1"
  431. src="@/assets/images/progress-bar-node-1.png"
  432. v-show="scrollerElScrollTop / summaryHideAt > 0.10"
  433. alt=""
  434. draggable="false"
  435. > -->
  436. <!-- <div class="bar-author-desc" /> -->
  437. <!-- <img
  438. class="progress-bar-node-2"
  439. src="@/assets/images/progress-bar-node-2.png"
  440. alt=""
  441. draggable="false"
  442. >
  443. <img
  444. class="progress-bar-node-3"
  445. src="@/assets/images/progress-bar-node-3.png"
  446. alt=""
  447. draggable="false"
  448. > -->
  449. <!-- <div
  450. class="mask"
  451. :style="{
  452. width: `${(1 - scrollerElScrollTop / summaryHideAt) * 100}%`,
  453. backgroundColor:stemGreenOpacity > 0 || leafGreenOpacity > 0 || stoneGreenOpacity > 0?'rgba(85,116,83,0.8)':''
  454. }"
  455. /> -->
  456. </div>
  457. <OperationTip
  458. v-if="isStartupOver"
  459. class="operation-tip"
  460. text="向左划动"
  461. direction="h"
  462. :is-show="isShowOperationTip"
  463. />
  464. <div
  465. ref="scrollerEl"
  466. class="scroller"
  467. @touchstart="handletouchstart($event)"
  468. @touchend="touchEnd($event)"
  469. >
  470. <div
  471. class="inner"
  472. :style="{
  473. height: summaryHideAt + windowHeight + 'px',
  474. }"
  475. />
  476. </div>
  477. <!-- 热点详情页 -->
  478. <Transition name="fade-in-out">
  479. <HotspotDetail1
  480. v-if="isShowHotspotDetail1"
  481. class="hotspot-detail"
  482. @close="isShowHotspotDetail1 = false"
  483. />
  484. </Transition>
  485. <!-- <Transition name="fade-in-out">
  486. <PaintingDetail
  487. v-if="isShowPaintingDetail"
  488. :thumb="require(`@/assets/images/home-painting.jpg`)"
  489. :title="'修篁树石图'"
  490. :author="'李衎'"
  491. :age="'元'"
  492. :subtitle="'轴 绢本 墨笔'"
  493. :location="'南京博物院藏'"
  494. :painting-desc="homepagePaintingDesc.join('\n\n')"
  495. :author-desc="homepageAuthorDesc.join('\n\n')"
  496. :big-painting="require(`@/assets/images/home-painting-big.jpg`)"
  497. :need-operation-tip="true"
  498. class="hotspot-detail painting-detail"
  499. @close="isShowPaintingDetail = false"
  500. />
  501. </Transition> -->
  502. <Transition name="fade-in-out">
  503. <HotspotDetail3
  504. v-if="isShowHotspotDetail3"
  505. class="hotspot-detail"
  506. @close="isShowHotspotDetail3 = false"
  507. />
  508. </Transition>
  509. <Transition name="fade-in">
  510. <video
  511. v-if="isShowVideoFadeToNextPage"
  512. ref="videoFadeToNextPageEl"
  513. class="fade-to-next-page"
  514. src="@/assets/videos/fade-from-home-to-more-content.mp4"
  515. playsinline
  516. webkit-playsinline="true"
  517. x5-video-player-type="h5"
  518. muted
  519. @ended="router.replace({
  520. name: 'MoreContentChange',
  521. })"
  522. />
  523. </Transition>
  524. <Transition name="fade-in">
  525. <BtnSkip
  526. v-if="isShowSkip"
  527. @click="router.replace({
  528. name: 'MoreContentChange',
  529. })"
  530. />
  531. </Transition>
  532. <BtnClickMe
  533. class="go-next-page"
  534. text="点击继续"
  535. :is-show="isShowBtnGoNextPage"
  536. @click="onClickGoNextPage"
  537. />
  538. </div>
  539. </template>
  540. <script setup>
  541. import { ref, computed, watch, onMounted, inject, onBeforeUnmount, onUnmounted, nextTick } from "vue"
  542. import { useRoute, useRouter } from "vue-router"
  543. import { useStore } from "vuex"
  544. import Startup from '@/views/StartupView.vue'
  545. import useSizeAdapt from "@/useFunctions/useSizeAdapt"
  546. import HotspotDetail1 from '@/views/HotspotDetail1.vue'
  547. // import PaintingDetail from '@/views/PaintingDetail.vue'
  548. import HotspotDetail3 from '@/views/HotspotDetail3.vue'
  549. import { api as viewerApi } from 'v-viewer'
  550. import { useWindowSize } from '@vueuse/core'
  551. const { width: windowWidth, height: windowHeight } = useWindowSize()
  552. const route = useRoute()
  553. const router = useRouter()
  554. const store = useStore()
  555. const $env = inject('$env')
  556. const {
  557. windowSizeInCssForRef,
  558. windowSizeWhenDesignForRef,
  559. } = useSizeAdapt()
  560. const isShowAuthorDesc = ref(false)
  561. const homepagePaintingDesc = configText.homepagePaintingDesc
  562. const homepageAuthorDesc = configText.homepageAuthorDesc
  563. const detailDescStem1 = configText.homepagePaintingDetailDescStem1
  564. const detailDescStem2 = configText.homepagePaintingDetailDescStem2
  565. const detailDescLeaf1 = configText.homepagePaintingDetailDescLeaf1
  566. const detailDescLeaf2 = configText.homepagePaintingDetailDescLeaf2
  567. const detailDescLeaf3 = configText.homepagePaintingDetailDescLeaf3
  568. const detailDescStone = configText.homepagePaintingDetailDescStone
  569. const summaryDesc = configText.homepagePaintingSummary
  570. const scrollerEl = ref(null)
  571. const scrollerElScrollTop = ref(0)
  572. function onScroll() {
  573. scrollerElScrollTop.value = scrollerEl.value.scrollTop
  574. console.log('当前滚动比例', scrollerElScrollTop.value / summaryHideAt, scrollerEl.value.scrollTop / scrollerEl.value.scrollHeight)
  575. }
  576. onMounted(() => {
  577. scrollerEl.value.addEventListener('scroll', onScroll)
  578. })
  579. onBeforeUnmount(() => {
  580. scrollerEl.value.removeEventListener('scroll', onScroll)
  581. })
  582. const isShowOperationTip = ref(true)
  583. watch(scrollerElScrollTop, (v) => {
  584. if (v > 0) {
  585. isShowOperationTip.value = false
  586. }
  587. })
  588. const haveShownStartup = computed(() => {
  589. return store.state.haveShownStartup
  590. })
  591. const isStartupOver = ref(false)
  592. const unwatch = watch(haveShownStartup, (v) => {
  593. if (v) {
  594. setTimeout(() => {
  595. isStartupOver.value = true
  596. }, 2000)
  597. unwatch()
  598. }
  599. })
  600. const titleHideAt = window.innerHeight * 0
  601. const titleHideFinishAt = window.innerHeight * 0.75
  602. const titleOpacity = computed(() => {
  603. let ret = null
  604. if (scrollerElScrollTop.value <= titleHideAt) {
  605. ret = 1
  606. } else {
  607. ret = 1 - (scrollerElScrollTop.value - titleHideAt) / (titleHideFinishAt - titleHideAt)
  608. }
  609. return ret
  610. })
  611. const paintingMoveUpAt = window.innerHeight * 0
  612. const paintingTopInitial = 236
  613. const paintingMoveUpFinishAt = paintingMoveUpAt + window.innerHeight * 1
  614. const paintingTopMovedUp = 41
  615. const paintingMoveDownAt = paintingMoveUpFinishAt + window.innerHeight * 0.5
  616. const paintingMoveDownFinishAt = paintingMoveDownAt + window.innerHeight * 0.25
  617. const paingtingTopMovedDown = -80
  618. const paintingTop = computed(() => {
  619. let ret = null
  620. if (scrollerElScrollTop.value <= paintingMoveUpAt) {
  621. ret = paintingTopInitial
  622. } else if (scrollerElScrollTop.value > paintingMoveUpAt && scrollerElScrollTop.value <= paintingMoveUpFinishAt) {
  623. ret = (scrollerElScrollTop.value - paintingMoveUpAt) / (paintingMoveUpFinishAt - paintingMoveUpAt) * (paintingTopMovedUp - paintingTopInitial) + paintingTopInitial
  624. } else if (scrollerElScrollTop.value > paintingMoveUpFinishAt && scrollerElScrollTop.value <= paintingMoveDownAt) {
  625. ret = paintingTopMovedUp
  626. } else if (scrollerElScrollTop.value > paintingMoveDownAt && scrollerElScrollTop.value <= paintingMoveDownFinishAt) {
  627. ret = (scrollerElScrollTop.value - paintingMoveDownAt) / (paintingMoveDownFinishAt - paintingMoveDownAt) * (paingtingTopMovedDown - paintingTopMovedUp) + paintingTopMovedUp
  628. } else {
  629. ret = paingtingTopMovedDown
  630. }
  631. return ret
  632. })
  633. const paintingWidthInitial = 308
  634. const paintingWidthMovedUp = 250
  635. const paintingWidthMovedDown = 485
  636. const paintingWidth = computed(() => {
  637. let ret = null
  638. if (scrollerElScrollTop.value <= paintingMoveUpAt) {
  639. ret = paintingWidthInitial
  640. } else if (scrollerElScrollTop.value > paintingMoveUpAt && scrollerElScrollTop.value <= paintingMoveUpFinishAt) {
  641. ret = (scrollerElScrollTop.value - paintingMoveUpAt) / (paintingMoveUpFinishAt - paintingMoveUpAt) * (paintingWidthMovedUp - paintingWidthInitial) + paintingWidthInitial
  642. } else if (scrollerElScrollTop.value > paintingMoveUpFinishAt && scrollerElScrollTop.value <= paintingMoveDownAt) {
  643. ret = paintingWidthMovedUp
  644. } else if (scrollerElScrollTop.value > paintingMoveDownAt && scrollerElScrollTop.value <= paintingMoveDownFinishAt) {
  645. ret = (scrollerElScrollTop.value - paintingMoveDownAt) / (paintingMoveDownFinishAt - paintingMoveDownAt) * (paintingWidthMovedDown - paintingWidthMovedUp) + paintingWidthMovedUp
  646. } else {
  647. ret = paintingWidthMovedDown
  648. }
  649. return ret
  650. })
  651. const paintingHeightInitial = 523
  652. const paintingHeightMovedUp = 425
  653. let paintingHeightMovedDown = 758
  654. const paintingHeight = computed(() => {
  655. let ret = null
  656. if (scrollerElScrollTop.value <= paintingMoveUpAt) {
  657. ret = paintingHeightInitial
  658. } else if (scrollerElScrollTop.value > paintingMoveUpAt && scrollerElScrollTop.value <= paintingMoveUpFinishAt) {
  659. ret = (scrollerElScrollTop.value - paintingMoveUpAt) / (paintingMoveUpFinishAt - paintingMoveUpAt) * (paintingHeightMovedUp - paintingHeightInitial) + paintingHeightInitial
  660. } else if (scrollerElScrollTop.value > paintingMoveUpFinishAt && scrollerElScrollTop.value <= paintingMoveDownAt) {
  661. ret = paintingHeightMovedUp
  662. } else if (scrollerElScrollTop.value > paintingMoveDownAt && scrollerElScrollTop.value <= paintingMoveDownFinishAt) {
  663. ret = (scrollerElScrollTop.value - paintingMoveDownAt) / (paintingMoveDownFinishAt - paintingMoveDownAt) * (paintingHeightMovedDown - paintingHeightMovedUp) + paintingHeightMovedUp
  664. } else {
  665. ret = paintingHeightMovedDown
  666. }
  667. return ret
  668. })
  669. const longDesc = ref(null)
  670. const longDescShowFinishAt = window.innerHeight * 0.25
  671. const longDescHideAt = longDescShowFinishAt + window.innerHeight * 1
  672. const longDescHideFinishAt = longDescHideAt + window.innerHeight * 0.25
  673. const longDescOpacity = computed(() => {
  674. let ret = null
  675. if (scrollerElScrollTop.value <= longDescShowFinishAt) {
  676. ret = 1 - (longDescShowFinishAt - scrollerElScrollTop.value) / (longDescShowFinishAt)
  677. } else if (scrollerElScrollTop.value > longDescShowFinishAt && scrollerElScrollTop.value < longDescHideAt) {
  678. ret = 1
  679. } else {
  680. ret = 1 - (scrollerElScrollTop.value - longDescHideAt) / (longDescHideFinishAt - longDescHideAt)
  681. }
  682. return ret
  683. })
  684. watch(scrollerElScrollTop, (vNew, vOld) => {
  685. if (vNew > paintingMoveUpFinishAt) {
  686. // longDesc.value.scrollTop = vNew - paintingMoveUpFinishAt
  687. } else if (vNew < vOld && vNew <= paintingMoveUpFinishAt) {
  688. // longDesc.value.scrollTop = 0
  689. }
  690. })
  691. // 第一页
  692. const stemShowAt = longDescHideFinishAt + window.innerHeight * 0
  693. const stemShowFinishAt = stemShowAt + window.innerHeight * 0.45
  694. const stemHideAt = stemShowFinishAt + window.innerHeight * 0.1
  695. const stemHideFisishAt = stemHideAt + window.innerHeight * 0.25
  696. const stemOpacity = computed(() => {
  697. let ret = null
  698. if (scrollerElScrollTop.value <= stemShowAt) {
  699. ret = 0
  700. } else if (scrollerElScrollTop.value > stemShowAt && scrollerElScrollTop.value < stemShowFinishAt) {
  701. // ret = (scrollerElScrollTop.value - stemShowAt) / (stemShowFinishAt - stemShowAt)
  702. ret = 0
  703. } else if (scrollerElScrollTop.value >= stemShowFinishAt && scrollerElScrollTop.value <= stemHideAt) {
  704. ret = 1
  705. // } else if (scrollerElScrollTop.value > stemHideAt && scrollerElScrollTop.value < stemHideFisishAt) {
  706. } else if (scrollerElScrollTop.value > stemHideAt) {
  707. ret = 1 - (scrollerElScrollTop.value - stemHideAt) / (stemHideFisishAt - stemHideAt)
  708. } else {
  709. ret = 0
  710. }
  711. return ret
  712. })
  713. const stemShowAt1 = stemHideFisishAt + window.innerHeight * 0
  714. const stemShowFinishAt1 = stemShowAt1 + window.innerHeight * 0.25
  715. const stemHideAt1 = stemShowFinishAt1 + window.innerHeight * 0.3
  716. const stemHideFisishAt1 = stemHideAt1 + window.innerHeight * 0.25
  717. const stemOpacity1 = computed(() => {
  718. let ret = null
  719. if (scrollerElScrollTop.value <= stemShowAt1) {
  720. ret = 0
  721. } else if (scrollerElScrollTop.value > stemShowAt1 && scrollerElScrollTop.value < stemShowFinishAt1) {
  722. ret = (scrollerElScrollTop.value - stemShowAt1) / (stemShowFinishAt1 - stemShowAt1)
  723. } else if (scrollerElScrollTop.value >= stemShowFinishAt1 && scrollerElScrollTop.value <= stemHideAt1) {
  724. ret = 1
  725. } else if (scrollerElScrollTop.value > stemHideAt1 && scrollerElScrollTop.value < stemHideFisishAt1) {
  726. ret = 1 - (scrollerElScrollTop.value - stemHideAt1) / (stemHideFisishAt1 - stemHideAt1)
  727. } else {
  728. ret = 0
  729. }
  730. return ret
  731. })
  732. const stemShowAt2 = stemHideFisishAt1 + window.innerHeight * 0
  733. const stemShowFinishAt2 = stemShowAt2 + window.innerHeight * 0.25
  734. const stemHideAt2 = stemShowFinishAt2 + window.innerHeight * 0.3
  735. const stemHideFisishAt2 = stemHideAt2 + window.innerHeight * 0.25
  736. const stemOpacity2 = computed(() => {
  737. let ret = null
  738. if (scrollerElScrollTop.value <= stemShowAt1) {
  739. ret = 0
  740. } else if (scrollerElScrollTop.value > stemShowAt2 && scrollerElScrollTop.value < stemShowFinishAt2) {
  741. ret = (scrollerElScrollTop.value - stemShowAt2) / (stemShowFinishAt2 - stemShowAt2)
  742. } else if (scrollerElScrollTop.value >= stemShowFinishAt2 && scrollerElScrollTop.value <= stemHideAt2) {
  743. ret = 1
  744. } else if (scrollerElScrollTop.value > stemHideAt2 && scrollerElScrollTop.value < stemHideFisishAt2) {
  745. ret = 1 - (scrollerElScrollTop.value - stemHideAt2) / (stemHideFisishAt - stemHideAt2)
  746. } else {
  747. ret = 0
  748. }
  749. return ret
  750. })
  751. const stemShowText = stemShowAt
  752. const stemShowTextFinishAt = stemShowFinishAt
  753. const stemTextHideAt = stemHideAt2
  754. const stemHideTextFisishAt = stemHideFisishAt2 + 220
  755. const stemTextOpacity = computed(() => {
  756. let ret = null
  757. if (scrollerElScrollTop.value <= stemShowText) {
  758. ret = 0
  759. } else if (scrollerElScrollTop.value > stemShowText && scrollerElScrollTop.value < stemShowTextFinishAt) {
  760. ret = (scrollerElScrollTop.value - stemShowText) / (stemShowTextFinishAt - stemShowText)
  761. } else if (scrollerElScrollTop.value >= stemShowTextFinishAt && scrollerElScrollTop.value <= stemTextHideAt) {
  762. ret = 1
  763. } else if (scrollerElScrollTop.value > stemTextHideAt && scrollerElScrollTop.value < stemHideTextFisishAt) {
  764. ret = 1 - (scrollerElScrollTop.value - stemTextHideAt) / (stemHideTextFisishAt - stemTextHideAt)
  765. } else {
  766. ret = 0
  767. }
  768. return ret
  769. })
  770. const stemShowText2 = stemShowAt1
  771. const stemShowTextFinishAt2 = stemShowFinishAt1
  772. const stemTextHideAt2 = stemHideAt2
  773. const stemHideTextFisishAt2 = stemHideFisishAt2 + 220
  774. const stemTextOpacity2 = computed(() => {
  775. let ret = null
  776. if (scrollerElScrollTop.value <= stemShowText2) {
  777. ret = 0
  778. } else if (scrollerElScrollTop.value > stemShowText2 && scrollerElScrollTop.value < stemShowTextFinishAt2) {
  779. ret = (scrollerElScrollTop.value - stemShowText2) / (stemShowTextFinishAt2 - stemShowText2)
  780. } else if (scrollerElScrollTop.value >= stemShowTextFinishAt2 && scrollerElScrollTop.value <= stemTextHideAt2) {
  781. ret = 1
  782. } else if (scrollerElScrollTop.value > stemTextHideAt2 && scrollerElScrollTop.value < stemHideTextFisishAt2) {
  783. ret = 1 - (scrollerElScrollTop.value - stemTextHideAt2) / (stemHideTextFisishAt2 - stemTextHideAt2)
  784. } else {
  785. ret = 0
  786. }
  787. return ret
  788. })
  789. const stemShowGreen = stemShowAt1
  790. const stemShowGreenFinishAt = stemShowFinishAt1
  791. const stemGreenHideAt = stemHideAt2
  792. const stemHideGreenFisishAt = stemHideFisishAt2
  793. const stemGreenOpacity = computed(() => {
  794. let ret = null
  795. if (scrollerElScrollTop.value <= stemShowGreen) {
  796. ret = 0
  797. } else if (scrollerElScrollTop.value > stemShowGreen && scrollerElScrollTop.value < stemShowGreenFinishAt) {
  798. ret = (scrollerElScrollTop.value - stemShowGreen) / (stemShowGreenFinishAt - stemShowGreen)
  799. } else if (scrollerElScrollTop.value >= stemShowGreenFinishAt && scrollerElScrollTop.value <= stemGreenHideAt) {
  800. ret = 1
  801. } else if (scrollerElScrollTop.value > stemGreenHideAt && scrollerElScrollTop.value < stemHideGreenFisishAt) {
  802. ret = 1 - (scrollerElScrollTop.value - stemGreenHideAt) / (stemHideGreenFisishAt - stemGreenHideAt)
  803. } else {
  804. ret = 0
  805. }
  806. return ret
  807. })
  808. const leafShowAt = stemHideFisishAt2 + (0 * window.innerHeight)
  809. const leafShowFinishAt = leafShowAt + (0.25 * window.innerHeight)
  810. const leafHideAt = leafShowFinishAt + (0.3 * window.innerHeight)
  811. const leafHideFisishAt = leafHideAt + (0.25 * window.innerHeight)
  812. const leafOpacity = computed(() => {
  813. let ret = null
  814. if (scrollerElScrollTop.value <= leafShowAt) {
  815. ret = 0
  816. } else if (scrollerElScrollTop.value > leafShowAt && scrollerElScrollTop.value < leafShowFinishAt) {
  817. ret = (scrollerElScrollTop.value - leafShowAt) / (leafShowFinishAt - leafShowAt)
  818. } else if (scrollerElScrollTop.value >= leafShowFinishAt && scrollerElScrollTop.value <= leafHideAt) {
  819. ret = 1
  820. } else if (scrollerElScrollTop.value > leafHideAt && scrollerElScrollTop.value < leafHideFisishAt) {
  821. ret = 1 - (scrollerElScrollTop.value - leafHideAt) / (leafHideFisishAt - leafHideAt)
  822. } else {
  823. ret = 0
  824. }
  825. return ret
  826. })
  827. const leafShowAt1 = leafHideFisishAt + (0 * window.innerHeight)
  828. const leafShowFinishAt1 = leafShowAt1 + (0.25 * window.innerHeight)
  829. const leafHideAt1 = leafShowFinishAt1 + (0.3 * window.innerHeight)
  830. const leafHideFisishAt1 = leafHideAt1 + (0.25 * window.innerHeight)
  831. const leafOpacity1 = computed(() => {
  832. let ret = null
  833. if (scrollerElScrollTop.value <= leafShowAt1) {
  834. ret = 0
  835. } else if (scrollerElScrollTop.value > leafShowAt1 && scrollerElScrollTop.value < leafShowFinishAt1) {
  836. ret = (scrollerElScrollTop.value - leafShowAt1) / (leafShowFinishAt1 - leafShowAt1)
  837. } else if (scrollerElScrollTop.value >= leafShowFinishAt1 && scrollerElScrollTop.value <= leafHideAt1) {
  838. ret = 1
  839. } else if (scrollerElScrollTop.value > leafHideAt1 && scrollerElScrollTop.value < leafHideFisishAt1) {
  840. ret = 1 - (scrollerElScrollTop.value - leafHideAt1) / (leafHideFisishAt1 - leafHideAt1)
  841. } else {
  842. ret = 0
  843. }
  844. return ret
  845. })
  846. const leafShowAt2 = leafHideFisishAt1 + (0 * window.innerHeight)
  847. const leafShowFinishAt2 = leafShowAt2 + (0.25 * window.innerHeight)
  848. const leafHideAt2 = leafShowFinishAt2 + (0.3 * window.innerHeight)
  849. const leafHideFisishAt2 = leafHideAt2 + (0.25 * window.innerHeight)
  850. const leafOpacity2 = computed(() => {
  851. let ret = null
  852. if (scrollerElScrollTop.value <= leafShowAt2) {
  853. ret = 0
  854. } else if (scrollerElScrollTop.value > leafShowAt2 && scrollerElScrollTop.value < leafShowFinishAt2) {
  855. ret = (scrollerElScrollTop.value - leafShowAt2) / (leafShowFinishAt2 - leafShowAt2)
  856. } else if (scrollerElScrollTop.value >= leafShowFinishAt2 && scrollerElScrollTop.value <= leafHideAt2) {
  857. ret = 1
  858. } else if (scrollerElScrollTop.value > leafHideAt2 && scrollerElScrollTop.value < leafHideFisishAt2) {
  859. ret = 1 - (scrollerElScrollTop.value - leafHideAt2) / (leafHideFisishAt2 - leafHideAt2)
  860. } else {
  861. ret = 0
  862. }
  863. return ret
  864. })
  865. const leafShowAt3 = leafHideFisishAt2 + (0 * window.innerHeight)
  866. const leafShowFinishAt3 = leafShowAt3 + (0.25 * window.innerHeight)
  867. const leafHideAt3 = leafShowFinishAt3 + (0.3 * window.innerHeight)
  868. const leafHideFisishAt3 = leafHideAt3 + (0.25 * window.innerHeight)
  869. const leafOpacity3 = computed(() => {
  870. let ret = null
  871. if (scrollerElScrollTop.value <= leafShowAt3) {
  872. ret = 0
  873. } else if (scrollerElScrollTop.value > leafShowAt3 && scrollerElScrollTop.value < leafShowFinishAt3) {
  874. ret = (scrollerElScrollTop.value - leafShowAt3) / (leafShowFinishAt3 - leafShowAt3)
  875. } else if (scrollerElScrollTop.value >= leafShowFinishAt3 && scrollerElScrollTop.value <= leafHideAt3) {
  876. ret = 1
  877. } else if (scrollerElScrollTop.value > leafHideAt3 && scrollerElScrollTop.value < leafHideFisishAt3) {
  878. ret = 1 - (scrollerElScrollTop.value - leafHideAt3) / (leafHideFisishAt3 - leafHideAt3)
  879. } else {
  880. ret = 0
  881. }
  882. return ret
  883. })
  884. const leafShowText = leafShowAt
  885. const leafShowTextFinishAt = leafShowFinishAt
  886. const leafTextHideAt = leafHideAt3
  887. const leafHideTextFisishAt = leafHideFisishAt3
  888. const leafTextOpacity = computed(() => {
  889. let ret = null
  890. if (scrollerElScrollTop.value <= leafShowText) {
  891. ret = 0
  892. } else if (scrollerElScrollTop.value > leafShowText && scrollerElScrollTop.value < leafShowTextFinishAt) {
  893. ret = 1 - (scrollerElScrollTop.value - leafShowText) / (leafShowTextFinishAt - leafShowText)
  894. } else if (scrollerElScrollTop.value >= leafShowTextFinishAt && scrollerElScrollTop.value <= leafTextHideAt) {
  895. ret = 1
  896. } else if (scrollerElScrollTop.value > leafTextHideAt && scrollerElScrollTop.value < leafHideTextFisishAt) {
  897. ret = 1 - (scrollerElScrollTop.value - leafTextHideAt) / (leafHideTextFisishAt - leafTextHideAt)
  898. } else {
  899. ret = 0
  900. }
  901. return ret
  902. })
  903. const leafShowGreen = leafShowAt1
  904. const leafShowGreenFinishAt = leafShowFinishAt1
  905. const leafGreenHideAt = leafHideAt3
  906. const leafHideGreenFisishAt = leafHideFisishAt3
  907. const leafGreenOpacity = computed(() => {
  908. let ret = null
  909. if (scrollerElScrollTop.value <= leafShowGreen) {
  910. ret = 0
  911. } else if (scrollerElScrollTop.value > leafShowGreen && scrollerElScrollTop.value < leafShowGreenFinishAt) {
  912. ret = (scrollerElScrollTop.value - leafShowGreen) / (leafShowGreenFinishAt - leafShowGreen)
  913. } else if (scrollerElScrollTop.value >= leafShowGreenFinishAt && scrollerElScrollTop.value <= leafGreenHideAt) {
  914. ret = 1
  915. } else if (scrollerElScrollTop.value > leafGreenHideAt && scrollerElScrollTop.value < leafHideGreenFisishAt) {
  916. ret = 1 - (scrollerElScrollTop.value - leafGreenHideAt) / (leafHideGreenFisishAt - leafGreenHideAt)
  917. } else {
  918. ret = 0
  919. }
  920. return ret
  921. })
  922. const stoneShowAt = leafHideFisishAt3 + (0 * window.innerHeight)
  923. const stoneShowFinishAt = stoneShowAt + (0.25 * window.innerHeight)
  924. const stoneHideAt = stoneShowFinishAt + (0.3 * window.innerHeight)
  925. const stoneHideFinishAt = stoneHideAt + (0.25 * window.innerHeight)
  926. const stoneOpacity = computed(() => {
  927. let ret = null
  928. if (scrollerElScrollTop.value <= stoneShowAt) {
  929. ret = 0
  930. } else if (scrollerElScrollTop.value > stoneShowAt && scrollerElScrollTop.value < stoneShowFinishAt) {
  931. ret = (scrollerElScrollTop.value - stoneShowAt) / (stoneShowFinishAt - stoneShowAt)
  932. } else if (scrollerElScrollTop.value >= stoneShowFinishAt && scrollerElScrollTop.value <= stoneHideAt) {
  933. ret = 1
  934. } else if (scrollerElScrollTop.value > stoneHideAt && scrollerElScrollTop.value < stoneHideFinishAt) {
  935. ret = 1 - (scrollerElScrollTop.value - stoneHideAt) / (stoneHideFinishAt - stoneHideAt)
  936. } else {
  937. ret = 0
  938. }
  939. return ret
  940. })
  941. const stoneShowAt1 = stoneHideFinishAt + (0 * window.innerHeight)
  942. const stoneShowFinishAt1 = stoneShowAt1 + (0.25 * window.innerHeight)
  943. const stoneHideAt1 = stoneShowFinishAt1 + (0.3 * window.innerHeight)
  944. const stoneHideFinishAt1 = stoneHideAt1 + (0.25 * window.innerHeight)
  945. const stoneOpacity1 = computed(() => {
  946. let ret = null
  947. if (scrollerElScrollTop.value <= stoneShowAt1) {
  948. ret = 0
  949. } else if (scrollerElScrollTop.value > stoneShowAt1 && scrollerElScrollTop.value < stoneShowFinishAt1) {
  950. ret = (scrollerElScrollTop.value - stoneShowAt1) / (stoneShowFinishAt1 - stoneShowAt1)
  951. } else if (scrollerElScrollTop.value >= stoneShowFinishAt1 && scrollerElScrollTop.value <= stoneHideAt1) {
  952. ret = 1
  953. } else if (scrollerElScrollTop.value > stoneHideAt1 && scrollerElScrollTop.value < stoneHideFinishAt1) {
  954. ret = 1 - (scrollerElScrollTop.value - stoneHideAt1) / (stoneHideFinishAt1 - stoneHideAt1)
  955. } else {
  956. ret = 0
  957. }
  958. return ret
  959. })
  960. const stoneShowAt2 = stoneHideFinishAt1 + (0 * window.innerHeight)
  961. const stoneShowFinishAt2 = stoneShowAt2 + (0.25 * window.innerHeight)
  962. const stoneHideAt2 = stoneShowFinishAt2 + (0.3 * window.innerHeight)
  963. const stoneHideFinishAt2 = stoneHideAt2 + (0.25 * window.innerHeight)
  964. const stoneOpacity2 = computed(() => {
  965. let ret = null
  966. if (scrollerElScrollTop.value <= stoneShowAt2) {
  967. ret = 0
  968. } else if (scrollerElScrollTop.value > stoneShowAt2 && scrollerElScrollTop.value < stoneShowFinishAt2) {
  969. ret = (scrollerElScrollTop.value - stoneShowAt2) / (stoneShowFinishAt2 - stoneShowAt2)
  970. } else if (scrollerElScrollTop.value >= stoneShowFinishAt2 && scrollerElScrollTop.value <= stoneHideAt2) {
  971. ret = 1
  972. } else if (scrollerElScrollTop.value > stoneHideAt2 && scrollerElScrollTop.value < stoneHideFinishAt2) {
  973. ret = 1 - (scrollerElScrollTop.value - stoneHideAt2) / (stoneHideFinishAt2 - stoneHideAt2)
  974. } else {
  975. ret = 0
  976. }
  977. return ret
  978. })
  979. const stoneShowAt3 = stoneHideFinishAt2 + (0 * window.innerHeight)
  980. const stoneShowFinishAt3 = stoneShowAt3 + (0.25 * window.innerHeight)
  981. const stoneHideAt3 = stoneShowFinishAt3 + (0.3 * window.innerHeight)
  982. const stoneHideFinishAt3 = stoneHideAt3 + (0.25 * window.innerHeight)
  983. const stoneOpacity3 = computed(() => {
  984. let ret = null
  985. if (scrollerElScrollTop.value <= stoneShowAt3) {
  986. ret = 0
  987. } else if (scrollerElScrollTop.value > stoneShowAt3 && scrollerElScrollTop.value < stoneShowFinishAt3) {
  988. ret = (scrollerElScrollTop.value - stoneShowAt3) / (stoneShowFinishAt3 - stoneShowAt3)
  989. } else if (scrollerElScrollTop.value >= stoneShowFinishAt3 && scrollerElScrollTop.value <= stoneHideAt3) {
  990. ret = 1
  991. } else if (scrollerElScrollTop.value > stoneHideAt3 && scrollerElScrollTop.value < stoneHideFinishAt3) {
  992. ret = 1 - (scrollerElScrollTop.value - stoneHideAt3) / (stoneHideFinishAt3 - stoneHideAt3)
  993. } else {
  994. ret = 0
  995. }
  996. return ret
  997. })
  998. const stoneShowGreen = stoneShowAt1
  999. const stoneShowGreenFinishAt = stoneShowFinishAt1
  1000. const stoneGreenHideAt = stoneHideAt1
  1001. const stoneHideGreenFisishAt = stoneHideFinishAt1
  1002. const stoneGreenOpacity = computed(() => {
  1003. let ret = null
  1004. if (scrollerElScrollTop.value <= stoneShowGreen) {
  1005. ret = 0
  1006. } else if (scrollerElScrollTop.value > stoneShowGreen && scrollerElScrollTop.value < stoneShowGreenFinishAt) {
  1007. ret = (scrollerElScrollTop.value - stoneShowGreen) / (stoneShowGreenFinishAt - stoneShowGreen)
  1008. } else if (scrollerElScrollTop.value >= stoneShowGreenFinishAt && scrollerElScrollTop.value <= stoneGreenHideAt) {
  1009. ret = 1
  1010. } else if (scrollerElScrollTop.value > stoneGreenHideAt && scrollerElScrollTop.value < stoneHideGreenFisishAt) {
  1011. ret = 1 - (scrollerElScrollTop.value - stoneGreenHideAt) / (stoneHideGreenFisishAt - stoneGreenHideAt)
  1012. } else {
  1013. ret = 0
  1014. }
  1015. return ret
  1016. })
  1017. const currentPosition = computed(() => {
  1018. if (leafOpacity.value > 0) {
  1019. return `translate(-57%, -40%) scale(3.7)`
  1020. }
  1021. if (leafOpacity1.value > 0) {
  1022. return `translate(-57%, -40%) scale(3.7)`
  1023. }
  1024. if (leafOpacity2.value > 0) {
  1025. return `translate(-57%, -40%) scale(3.7)`
  1026. }
  1027. if (leafOpacity3.value > 0) {
  1028. return `translate(-57%, -40%) scale(3.7)`
  1029. }
  1030. if (stoneOpacity.value > 0) {
  1031. return `translate(-25%, -6%) scale(2.2)`
  1032. }
  1033. if (stoneOpacity1.value > 0) {
  1034. return `translate(-25%, -6%) scale(2.2)`
  1035. }
  1036. if (stoneOpacity2.value > 0) {
  1037. return `translate(-25%, -6%) scale(2.2)`
  1038. }
  1039. if (stoneOpacity3.value > 0) {
  1040. return `translate(-25%, -6%) scale(2.2)`
  1041. }
  1042. // if (leafOpacity.value > 0 || leafOpacity1.value > 0 || leafOpacity2.value > 0 || leafOpacity3.value > 0) {
  1043. // return `translate(-57%, -40%) scale(3.7)`
  1044. // }
  1045. // if (stoneOpacity3.value > 0 || stoneOpacity2.value > 0 || stoneOpacity1.value > 0 || stoneOpacity.value > 0) {
  1046. // return `translate(-57%, -40%) scale(4.65)`
  1047. // }
  1048. return ''
  1049. })
  1050. const stoneShowText = stoneShowAt
  1051. const stoneShowTextFinishAt = stoneShowFinishAt
  1052. const stoneTextHideAt = stoneHideAt1
  1053. const stoneHideTextFisishAt = stoneHideFinishAt1
  1054. const stoneTextOpacity = computed(() => {
  1055. let ret = null
  1056. if (scrollerElScrollTop.value <= stoneShowText) {
  1057. ret = 0
  1058. } else if (scrollerElScrollTop.value > stoneShowText && scrollerElScrollTop.value < stoneShowTextFinishAt) {
  1059. ret = (scrollerElScrollTop.value - stoneShowText) / (stoneShowTextFinishAt - stoneShowText)
  1060. } else if (scrollerElScrollTop.value >= stoneShowTextFinishAt && scrollerElScrollTop.value <= stoneTextHideAt) {
  1061. ret = 1
  1062. } else if (scrollerElScrollTop.value > stoneTextHideAt && scrollerElScrollTop.value < stoneHideTextFisishAt) {
  1063. ret = 1 - (scrollerElScrollTop.value - stoneTextHideAt) / (stoneHideTextFisishAt - stoneTextHideAt)
  1064. } else {
  1065. ret = 0
  1066. }
  1067. return ret
  1068. })
  1069. const summaryShowAt = stoneHideFinishAt3 + window.innerHeight * 0
  1070. const summaryShowFinishAt = summaryShowAt + window.innerHeight * 0.25
  1071. const summaryHideAt = summaryShowFinishAt + window.innerHeight * 0.3
  1072. const summaryHideFisishAt = summaryHideAt + window.innerHeight * 0.25
  1073. const summaryOpacity = computed(() => {
  1074. let ret = null
  1075. if (scrollerElScrollTop.value <= summaryShowAt) {
  1076. ret = 0
  1077. } else if (scrollerElScrollTop.value > summaryShowAt && scrollerElScrollTop.value < summaryShowFinishAt) {
  1078. ret = (scrollerElScrollTop.value - summaryShowAt) / (summaryShowFinishAt - summaryShowAt)
  1079. } else if (scrollerElScrollTop.value >= summaryShowFinishAt && scrollerElScrollTop.value <= summaryHideAt) {
  1080. ret = 1
  1081. } else if (scrollerElScrollTop.value > summaryHideAt && scrollerElScrollTop.value < summaryHideFisishAt) {
  1082. ret = 1 - (scrollerElScrollTop.value - summaryHideAt) / (summaryHideFisishAt - summaryHideAt)
  1083. } else {
  1084. ret = 0
  1085. }
  1086. return ret
  1087. })
  1088. const sizeShowAt = stemShowAt
  1089. const sizeShowFinishAt = stemShowFinishAt
  1090. const sizeHideAt = stoneHideAt
  1091. const sizeHideFisishAt = stoneHideFinishAt
  1092. const sizeOpacity = computed(() => {
  1093. let ret = null
  1094. if (scrollerElScrollTop.value <= sizeShowAt) {
  1095. ret = 0
  1096. } else if (scrollerElScrollTop.value > sizeShowAt && scrollerElScrollTop.value < sizeShowFinishAt) {
  1097. ret = (scrollerElScrollTop.value - sizeShowAt) / (sizeShowFinishAt - sizeShowAt)
  1098. } else if (scrollerElScrollTop.value >= sizeShowFinishAt && scrollerElScrollTop.value <= sizeHideAt) {
  1099. ret = 1
  1100. } else if (scrollerElScrollTop.value > sizeHideAt && scrollerElScrollTop.value < sizeHideFisishAt) {
  1101. ret = 1 - (scrollerElScrollTop.value - sizeHideAt) / (sizeHideFisishAt - sizeHideAt)
  1102. } else {
  1103. ret = 0
  1104. }
  1105. return ret
  1106. })
  1107. const isShowHotspot = computed(() => {
  1108. let ret = null
  1109. if (scrollerElScrollTop.value >= summaryShowAt) {
  1110. ret = true
  1111. } else {
  1112. return false
  1113. }
  1114. return ret
  1115. })
  1116. const isShowHotspotDetail1 = ref(false)
  1117. // const isShowPaintingDetail = ref(false)
  1118. const isShowHotspotDetail3 = ref(false)
  1119. function showBigPainting() {
  1120. viewerApi({
  1121. images: [require(`@/assets/images/home-painting-big.jpg`)],
  1122. })
  1123. }
  1124. /**
  1125. * 跳转新页面
  1126. */
  1127. const videoFadeToNextPageEl = ref(null)
  1128. const isShowVideoFadeToNextPage = ref(false)
  1129. const isShowSkip = ref(false)
  1130. const isShowBtnGoNextPage = ref(false)
  1131. watch(scrollerElScrollTop, (v) => {
  1132. if (Math.abs(v + windowHeight.value - scrollerEl.value.scrollHeight) < 3) {
  1133. isShowBtnGoNextPage.value = true
  1134. } else {
  1135. isShowBtnGoNextPage.value = false
  1136. }
  1137. })
  1138. function smoothScrollTo(element, finalPosition, duration = 500, startTime = performance.now()) {
  1139. const currentTime = performance.now()
  1140. const timeElapsed = currentTime - startTime
  1141. const progress = Math.min(timeElapsed / duration, 1) // 确保进度不超过1
  1142. const currentPos = element.scrollTop
  1143. const newPos = currentPos + (finalPosition - currentPos) * progress
  1144. element.scrollTop = newPos
  1145. if (progress < 1 && finalPosition == scrollerPositionList[curStep.value] * scrollerEl.value.scrollHeight) {
  1146. // console.log('最后位置', finalPosition)
  1147. requestAnimationFrame(() => smoothScrollTo(element, finalPosition, duration, startTime))
  1148. }
  1149. }
  1150. const curStep = ref(0)
  1151. const scrollerPositionList = [0, 0.078, 0.166, 0.228, 0.290, 0.353, 0.436, 0.509, 0.561, 0.644, 0.706, 0.769, 0.831, 1]
  1152. const scrollerPositionTimeRight = [500, 300, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000]
  1153. const scrollerPositionTimeLeft = [500, 300, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000, 6000]
  1154. const onSwipeLeft = () => {
  1155. if (curStep.value < scrollerPositionList.length - 1) {
  1156. curStep.value++
  1157. const pp = scrollerPositionList[curStep.value]
  1158. const startTime = performance.now()
  1159. requestAnimationFrame(() => { smoothScrollTo(scrollerEl.value, pp * scrollerEl.value.scrollHeight, scrollerPositionTimeRight[curStep.value], startTime) })
  1160. }
  1161. }
  1162. const onSwipeRight = () => {
  1163. if (curStep.value > 0) {
  1164. curStep.value--
  1165. const pp = scrollerPositionList[curStep.value] * scrollerEl.value.scrollHeight
  1166. const startTime = performance.now()
  1167. requestAnimationFrame(() => { smoothScrollTo(scrollerEl.value, pp, scrollerPositionTimeLeft[curStep.value], startTime) })
  1168. }
  1169. }
  1170. const lastX = ref(0)
  1171. // 开始滑动
  1172. const handletouchstart = (event) => {
  1173. lastX.value = event.changedTouches[0].pageX
  1174. }
  1175. // 监听活动
  1176. const touchEnd = (event) => {
  1177. let currentX = event.changedTouches[0].pageX
  1178. let tx = currentX - lastX.value
  1179. if (tx < 0) {
  1180. if (curStep.value < scrollerPositionList.length - 1) {
  1181. curStep.value++
  1182. const pp = scrollerPositionList[curStep.value]
  1183. const startTime = performance.now()
  1184. requestAnimationFrame(() => { smoothScrollTo(scrollerEl.value, pp * scrollerEl.value.scrollHeight, scrollerPositionTimeRight[curStep.value], startTime) })
  1185. }
  1186. } else if (tx > 0) {
  1187. if (curStep.value > 0) {
  1188. curStep.value--
  1189. const pp = scrollerPositionList[curStep.value] * scrollerEl.value.scrollHeight
  1190. const startTime = performance.now()
  1191. requestAnimationFrame(() => { smoothScrollTo(scrollerEl.value, pp, scrollerPositionTimeLeft[curStep.value], startTime) })
  1192. }
  1193. }
  1194. }
  1195. function onClickGoNextPage() {
  1196. isShowBtnGoNextPage.value = false
  1197. isShowVideoFadeToNextPage.value = true
  1198. nextTick(() => {
  1199. videoFadeToNextPageEl.value.play()
  1200. })
  1201. setTimeout(() => {
  1202. isShowSkip.value = true
  1203. }, 2000)
  1204. }
  1205. </script>
  1206. <style lang="less" scoped>
  1207. * {
  1208. transition: all 1s;
  1209. }
  1210. .home {
  1211. width: 100%;
  1212. height: 100%;
  1213. background-image: url(@/assets/images/home-painting-line-small.jpg);
  1214. background-size: cover;
  1215. background-repeat: no-repeat;
  1216. background-position: center center;
  1217. // 滚动条,只设置某一项可能导致不生效。
  1218. ::-webkit-scrollbar {
  1219. width: 0;
  1220. height: 0;
  1221. }
  1222. >.bg-mask {
  1223. position: absolute;
  1224. left: 0;
  1225. top: 0;
  1226. width: 100%;
  1227. height: 100%;
  1228. background: rgba(60, 89, 71, 0.65);
  1229. backdrop-filter: blur(calc(22 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')));
  1230. }
  1231. >.startup {
  1232. z-index: 20;
  1233. }
  1234. >.title-wrap {
  1235. position: absolute;
  1236. left: 50%;
  1237. top: calc(36 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1238. transform: translate(-50%);
  1239. width: calc(43 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1240. height: calc(180 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1241. z-index: 5;
  1242. >img.title {
  1243. position: absolute;
  1244. left: 0;
  1245. top: 0;
  1246. width: 100%;
  1247. height: 100%;
  1248. }
  1249. >.sub-text {
  1250. position: absolute;
  1251. left: 110%;
  1252. top: 46%;
  1253. transform: translateY(-50%);
  1254. writing-mode: vertical-lr;
  1255. font-family: KaiTi, KaiTi;
  1256. font-weight: 400;
  1257. font-size: calc(18 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1258. color: #FFFFFF;
  1259. line-height: calc(21 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1260. white-space: pre;
  1261. letter-spacing: 0.2em;
  1262. text-align: center;
  1263. }
  1264. }
  1265. >.painting-wrap {
  1266. position: absolute;
  1267. left: 50%;
  1268. transform: translate(-50%, 0);
  1269. z-index: 1;
  1270. >.green-box {
  1271. width: 200vw;
  1272. height: 200vh;
  1273. background: rgba(85, 116, 83, 0.8);
  1274. position: fixed;
  1275. top: 0;
  1276. left: 0;
  1277. z-index: 2;
  1278. overflow: hidden;
  1279. transition: opacity 1s ease;
  1280. }
  1281. >.size-sign-h {
  1282. position: absolute;
  1283. left: 50%;
  1284. top: 0;
  1285. transform: translate(-50%, -105%);
  1286. width: calc(245 / 308 * 100%);
  1287. >img {
  1288. width: 100%;
  1289. }
  1290. >span {
  1291. position: absolute;
  1292. left: 50%;
  1293. top: 50%;
  1294. transform: translate(-50%, -50%);
  1295. font-family: KaiTi, KaiTi;
  1296. font-weight: 400;
  1297. font-size: calc(16 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1298. color: #FFFFFF;
  1299. line-height: calc(23 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1300. text-shadow: 0px 0px calc(4 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')) #F8DD86;
  1301. }
  1302. }
  1303. >.size-sign-v {
  1304. position: absolute;
  1305. right: 0;
  1306. top: 54%;
  1307. transform: translate(80%, -50%);
  1308. height: calc(371 / 523 * 100%);
  1309. >img {
  1310. height: 100%;
  1311. }
  1312. >span {
  1313. position: absolute;
  1314. left: 50%;
  1315. top: 50%;
  1316. transform: translate(-50%, -50%);
  1317. font-family: KaiTi, KaiTi;
  1318. font-weight: 400;
  1319. font-size: calc(16 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1320. color: #FFFFFF;
  1321. line-height: calc(23 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1322. text-shadow: 0px 0px calc(4 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')) #F8DD86;
  1323. writing-mode: vertical-lr;
  1324. }
  1325. }
  1326. >img.painting-border {
  1327. position: absolute;
  1328. left: 0;
  1329. top: 0;
  1330. width: 100%;
  1331. height: 100%;
  1332. }
  1333. >img.painting,
  1334. img.painting-stem,
  1335. img.painting-leaf,
  1336. img.painting-stone {
  1337. position: absolute;
  1338. left: 50%;
  1339. top: 54%;
  1340. transform: translate(-50%, -50%);
  1341. // width: calc(225 / 308 * 100%);
  1342. height: 70%;
  1343. }
  1344. }
  1345. >.hotspot-wrap {
  1346. position: absolute;
  1347. left: 50%;
  1348. top: calc(92 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')) !important;
  1349. transform: translate(-46%, 0);
  1350. width: calc(264 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1351. height: calc(517 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1352. z-index: 7;
  1353. pointer-events: none;
  1354. &>div {
  1355. z-index: 100;
  1356. }
  1357. >.hotspot-1 {
  1358. position: absolute;
  1359. top: calc(54 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1360. right: calc(0 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1361. pointer-events: initial;
  1362. }
  1363. >.hotspot-2 {
  1364. position: absolute;
  1365. left: calc(60 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1366. top: calc(222 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1367. pointer-events: initial;
  1368. }
  1369. >.hotspot-3 {
  1370. position: absolute;
  1371. bottom: calc(-10 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1372. right: calc(-10 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1373. pointer-events: initial;
  1374. }
  1375. }
  1376. >.stone-text-box {
  1377. position: fixed;
  1378. top: 0;
  1379. right: 0;
  1380. z-index: 3;
  1381. width: calc(224 / var(--9ea40744-windowSizeWhenDesignForRef)* var(--9ea40744-windowSizeInCssForRef));
  1382. background: linear-gradient(78deg, rgba(0, 0, 0, 0) 38%, #00000045 75%);
  1383. height: 100%;
  1384. >.stone-text {
  1385. position: fixed;
  1386. top: calc(50 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1387. right: calc(20 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1388. z-index: 3;
  1389. width: calc(120 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1390. }
  1391. }
  1392. >.jianbian {
  1393. width: 100%;
  1394. position: fixed;
  1395. height: calc(100 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1396. bottom: calc(0 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1397. background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #00000082 100%);
  1398. z-index: 3;
  1399. }
  1400. >.painting-leaf-hight {
  1401. position: fixed;
  1402. z-index: 2;
  1403. width: 100%;
  1404. transform: translate(0px, 0px);
  1405. left: 0;
  1406. top: 0;
  1407. }
  1408. >.long-desc {
  1409. position: absolute;
  1410. left: 50%;
  1411. bottom: calc(50 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1412. width: calc(309 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1413. transform: translate(-50%, 0);
  1414. color: white;
  1415. overflow: hidden;
  1416. font-family: KaiTi, KaiTi;
  1417. color: #FFFFFF;
  1418. animation: none;
  1419. >h3 {
  1420. font-size: calc(20 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1421. margin-bottom: 0.5em;
  1422. font-weight: 600;
  1423. }
  1424. >p {
  1425. font-weight: 400;
  1426. font-size: calc(20 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1427. line-height: calc(25 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1428. text-align: justify;
  1429. margin-bottom: 0.5em;
  1430. }
  1431. }
  1432. >.up-icon {
  1433. position: absolute;
  1434. transform: translateX(-50%);
  1435. left: 50%;
  1436. z-index: 12;
  1437. >img {
  1438. width: calc(25 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1439. }
  1440. }
  1441. >.author-box {
  1442. width: 100%;
  1443. height: 100%;
  1444. background: rgba(85, 116, 83, 0.8);
  1445. position: fixed;
  1446. top: 0;
  1447. left: 0;
  1448. padding: 0 10%;
  1449. z-index: 12;
  1450. display: flex;
  1451. flex-direction: column;
  1452. justify-content: center;
  1453. align-items: center;
  1454. >.top-icon {
  1455. width: calc(90 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1456. height: calc(90 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1457. position: absolute;
  1458. top: 10%;
  1459. transform: translateX(-50%);
  1460. left: 50%;
  1461. margin-bottom: calc(45 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1462. }
  1463. >.author-desc {
  1464. width: 100%;
  1465. color: white;
  1466. overflow: auto;
  1467. font-family: KaiTi, KaiTi;
  1468. color: #FFFFFF;
  1469. animation: none;
  1470. font-size: calc(20 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1471. line-height: calc(29 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1472. }
  1473. >.down-icon {
  1474. position: absolute;
  1475. transform: translateX(-50%);
  1476. left: 50%;
  1477. bottom: calc(45 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1478. width: calc(35 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1479. }
  1480. }
  1481. >.fixed-desc {
  1482. position: absolute;
  1483. left: 50%;
  1484. transform: translateX(-50%);
  1485. width: calc(309 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1486. height: 20%;
  1487. display: flex;
  1488. justify-content: center;
  1489. align-items: center;
  1490. font-family: KaiTi, KaiTi;
  1491. color: #FFFFFF;
  1492. font-weight: 400;
  1493. font-size: calc(18 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1494. line-height: calc(25 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1495. text-align: justify;
  1496. z-index: 2;
  1497. }
  1498. >.detail-title-stem {
  1499. font-size: calc(24 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1500. letter-spacing: 2px;
  1501. transition: top 1s ease;
  1502. position: relative;
  1503. z-index: 2;
  1504. }
  1505. >.detail-desc-stem {
  1506. display: block;
  1507. margin-top: 10%;
  1508. transition: all 0.5s;
  1509. }
  1510. >.detail-desc-leaf {
  1511. display: block;
  1512. margin-top: 6%;
  1513. }
  1514. >.detail-desc-stone {
  1515. display: block;
  1516. margin-top: 8%;
  1517. }
  1518. >.progress-bar {
  1519. position: absolute;
  1520. left: 0;
  1521. bottom: 0;
  1522. width: 100%;
  1523. height: 15px;
  1524. z-index: 3;
  1525. >.bar-artwork-desc {
  1526. position: absolute;
  1527. left: 0;
  1528. bottom: 0;
  1529. // right: 10px;
  1530. height: 3px;
  1531. background-color: #A9D185;
  1532. }
  1533. >img.progress-bar-node-1 {
  1534. position: absolute;
  1535. left: calc(0.6 * v-bind('longDescHideFinishAt') / v-bind('summaryHideAt') * 100%);
  1536. bottom: 1px;
  1537. width: 2.41px;
  1538. height: 10.23px
  1539. }
  1540. >.bar-author-desc {
  1541. position: absolute;
  1542. left: 12px;
  1543. bottom: 0;
  1544. right: calc(v-bind('longDescHideFinishAt') / v-bind('summaryHideAt') * 100%);
  1545. height: 3px;
  1546. background: #A9D185;
  1547. }
  1548. >img.progress-bar-node-2 {
  1549. position: absolute;
  1550. left: calc(v-bind('longDescHideFinishAt') / v-bind('summaryHideAt') * 100%);
  1551. bottom: 1px;
  1552. width: 7.5px;
  1553. height: 10.8px
  1554. }
  1555. >.bar-artwork-enjoy {
  1556. position: absolute;
  1557. left: calc(v-bind('stoneShowAt') / v-bind('summaryHideAt') * 100%);
  1558. bottom: 0;
  1559. right: 0;
  1560. height: 3px;
  1561. background: #A9D185;
  1562. }
  1563. >img.progress-bar-node-3 {
  1564. position: absolute;
  1565. right: 0;
  1566. bottom: 1px;
  1567. width: 9.7px;
  1568. height: 10.8px
  1569. }
  1570. >.mask {
  1571. position: absolute;
  1572. right: 0;
  1573. bottom: 0;
  1574. height: 15px;
  1575. background-color: #6e8175;
  1576. }
  1577. }
  1578. >.operation-tip {
  1579. position: absolute;
  1580. left: 50%;
  1581. transform: translateX(-50%);
  1582. // bottom: calc(77 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1583. bottom: calc(30 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1584. }
  1585. >.scroller {
  1586. position: absolute;
  1587. left: 0;
  1588. top: 0;
  1589. width: 100%;
  1590. height: 100%;
  1591. overflow: auto;
  1592. transition: transform 2s ease;
  1593. z-index: 3;
  1594. >.inner {
  1595. width: 100%;
  1596. }
  1597. }
  1598. >.hotspot-detail {
  1599. z-index: 21;
  1600. }
  1601. >.hotspot-detail.painting-detail {
  1602. backdrop-filter: blur(calc(20 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef')));
  1603. }
  1604. >video.fade-to-next-page {
  1605. position: absolute;
  1606. left: 0;
  1607. top: 0;
  1608. width: 100%;
  1609. height: 100%;
  1610. object-fit: cover;
  1611. z-index: 20;
  1612. }
  1613. >button.go-next-page {
  1614. position: absolute;
  1615. left: 50%;
  1616. bottom: calc(25 / v-bind('windowSizeWhenDesignForRef') * v-bind('windowSizeInCssForRef'));
  1617. z-index: 20;
  1618. transform: translate(-50%, 0);
  1619. }
  1620. }
  1621. </style>