HomeView.vue 64 KB

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