index.tsx 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532
  1. import React, { useEffect, useState } from 'react'
  2. import styles from './index.module.scss'
  3. import A2main from '../A2main'
  4. import A4base from '../A4base'
  5. const scriptArr = [
  6. './js/manage.js',
  7. './js/Hot.js?m=1',
  8. './js/main_2020_show.js',
  9. './CAD/bundle.js',
  10. './showa/js/loadCAD.js'
  11. ]
  12. function A1home() {
  13. // 动态加载 js
  14. const [lodingJs, setLodingJs] = useState(0)
  15. useEffect(() => {
  16. if (lodingJs < scriptArr.length) {
  17. let script = document.createElement('script')
  18. script.type = 'text/javascript'
  19. script.src = scriptArr[lodingJs]
  20. document.head.appendChild(script)
  21. script.onload = () => {
  22. setLodingJs(lodingJs + 1)
  23. }
  24. }
  25. }, [lodingJs])
  26. return (
  27. <div className={styles.A1home}>
  28. {/* 初始封面 */}
  29. <A4base />
  30. <div id='hot'> </div>
  31. <div className='widgets-doll-labels'> </div>
  32. <div id='popup'>
  33. <div className='popup-content'></div>
  34. <div id='closepop'>close</div>
  35. </div>
  36. <div className='sidecontent' style={{ width: '35%' }}>
  37. <h1>
  38. <span className='side-client-close'>关闭</span>
  39. </h1>
  40. <img src='' alt='' id='sideimg' style={{ width: '90%' }} />
  41. <br />
  42. <p id='text'></p>
  43. </div>
  44. <div id='gui-thumb' style={{ display: 'none' }}></div>
  45. <div id='player' style={{ display: 'none' }}></div>
  46. <div id='gui-parent'>
  47. <div id='memory-info'>
  48. GPU memory used: <span id='memory-gpu'></span>
  49. </div>
  50. <div id='gui-loading' className='message-outer darkGlass' style={{ display: 'none' }}>
  51. <h2 className='model-title'> </h2>
  52. <div className='message-inner'>
  53. <div className='loadingLogo'>
  54. <div className='img'></div>
  55. </div>
  56. <div className='progressbar' data-perc='100'>
  57. <div className='label'>
  58. <div className='perc'>0%</div>
  59. </div>
  60. <div className='bar'>
  61. <span></span>
  62. </div>
  63. </div>
  64. <div id='loaderCoBrand'>
  65. <div className='vert-align'></div>
  66. </div>
  67. <div className='bottom-logo'>
  68. <div className='img'></div>
  69. </div>
  70. <div className='specialPower'>
  71. <span className='powered-by'>{'{[{ POWERED_BY }]}'}</span>
  72. &#xA0;<div className='img'></div>
  73. </div>
  74. </div>
  75. </div>
  76. {/* 主要内容 */}
  77. <A2main />
  78. <div className='webvr-popup' style={{ display: 'none' }}>
  79. <div className='messaging'>
  80. <div className='page p1'>
  81. <div className='title'>{'{[{ WEBVR_FOR_DAYDREAM }]}'}</div>
  82. <img className='image device-headset-side' alt='' />
  83. <div className='enter-button'>{'{[{ WEBVR_ENTER_WEBVR }]}'}</div>
  84. <span className='hrule'></span>
  85. <div className='alt-help'>
  86. <span className='open-with-app'>{'{[{ VR_APP_OPEN }]}'}</span>
  87. </div>
  88. </div>
  89. <div className='page p2 hidden'>
  90. <div className='title'>{'{[{ VR_WHAT_YOU_NEED }]}'}</div>
  91. <ul className='tabs'>
  92. <li className='tabbutton' id='tabcardboard'>
  93. {'{[{ VR_GOOGLE_CARDBOARD }]}'}
  94. </li>
  95. <li className='tabbutton' id='tabdaydream'>
  96. {'{[{ VR_GOOGLE_DAYDREAM }]}'}
  97. </li>
  98. <li className='tabbutton' id='tabnative'>
  99. {'{[{ VR_APP }]}'}
  100. </li>
  101. </ul>
  102. <div className='tab-content webvr'>
  103. <img className='image device-headset' alt='' />
  104. <span className='detail headset'>
  105. <u>{'{[{ VR_GOOGLE_CARDBOARD }]}'}</u>
  106. </span>
  107. <img className='image device-phone' alt='' />
  108. <span className='detail phone'>
  109. <p>
  110. <b>
  111. <u>{'{[{ VR_COMPATIBLE_ANDROID }]}'}</u>
  112. </b>
  113. </p>
  114. <p>{'{[{ VR_ANDROID_DETAIL }]}'}</p>
  115. </span>
  116. <div className='detail daydream-label'>{'{[{ VR_NEED_DAYDREAM }]}'}</div>
  117. </div>
  118. <div className='tab-content native hidden'>
  119. <div className='badge-label'>{'{[{ VR_APP_FOR_ANDROID }]}'}</div>
  120. <span>
  121. <img className='image badge-cardboard' alt='' />
  122. <img className='image badge-oculus' alt='' />
  123. </span>
  124. </div>
  125. </div>
  126. </div>
  127. <div className='close'>
  128. {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
  129. <a>
  130. <i className='icon icon-close'></i>
  131. </a>
  132. </div>
  133. <div className='footer'>
  134. <div className='help'>
  135. {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
  136. <a>{'{[{ HELP }]}'}</a>
  137. </div>
  138. <div>|</div>
  139. <div className='terms'>
  140. {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
  141. <a>{'{[{ MATTERPORT_TERMS }]}'}</a>
  142. </div>
  143. </div>
  144. </div>
  145. <div id='gui-spinner' style={{ display: 'none' }}>
  146. <div className='gui-spinner-icon'></div>
  147. </div>
  148. <div id='gui-message' className='message-outer darkGlass' style={{ display: 'none' }}>
  149. <h2 className='model-title'> </h2>
  150. <div className='message-inner'>
  151. <div className='message-content'>
  152. {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
  153. <a id='button-play'>
  154. <i className='icon icon-play'></i>
  155. </a>
  156. <div className='explore'>{'{[{ EXPLORE_3D_SPACE }]}'}</div>
  157. </div>
  158. </div>
  159. </div>
  160. <div id='share-modal' style={{ display: 'none' }}>
  161. <div className='title'>{'{[{ SOCIAL_SHARING }]}'}</div>
  162. <div id='share-outer'>
  163. <div className='share-to'>{'{[{ SHARE_TO }]}'}</div>
  164. <div className='share-images'>
  165. {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
  166. <a id='facebook-share'>
  167. <div className='share-button'>
  168. <span className='faceBookLink'>
  169. <i className='icon icon-facebook'></i>
  170. </span>
  171. </div>
  172. </a>
  173. {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
  174. <a id='twitter-share'>
  175. <div className='share-button'>
  176. <span className='twitterLink'>
  177. <i className='icon icon-twitter'></i>
  178. </span>
  179. </div>
  180. </a>
  181. {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
  182. <a id='mail-share'>
  183. <div className='share-button'>
  184. <span className='mailLink'>
  185. <i className='icon icon-email'></i>
  186. </span>
  187. </div>
  188. </a>
  189. </div>
  190. <div className='direct-link'>{'{[{ SHARE_LINK }]}'}</div>
  191. <div id='share-url'>
  192. <span id='share-url-text'></span>
  193. </div>
  194. <div id='copy-success' className='hidden'>
  195. <span id='copy-success-text'>{'{[{ SHARE_COPIED }]}'}</span>
  196. </div>
  197. </div>
  198. <div id='share-close' className='close'>
  199. <i className='icon icon-close'></i>
  200. </div>
  201. </div>
  202. <div id='terms-modal' className='fadeOut' style={{ display: 'none' }}>
  203. <div id='terms-text'></div>
  204. <div className='close'>
  205. {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
  206. <a>
  207. <i className='icon icon-close'></i>
  208. </a>
  209. </div>
  210. </div>
  211. <div className='gui-error message-outer' style={{ display: 'none' }}>
  212. <div className='message-inner'>
  213. <div className='message-content'>
  214. <div className='error-problem-text'></div>
  215. <div className='error-solution-text'></div>
  216. <div className='error-explanation'></div>
  217. <div className='error-actions'></div>
  218. </div>
  219. </div>
  220. </div>
  221. <div id='help-dialog' className='nav-help-dialog' style={{ display: 'none' }}>
  222. <div className='nav-help-elements'>
  223. <div className='help-tabs'>
  224. <div className='navigation-tab'>
  225. <span>{'{[{ HELP_NAVIGATION_TAB }]}'}</span>
  226. </div>
  227. <div className='more-help-tab'>
  228. <span>{'{[{ HELP_MORE_HELP_TAB }]}'}</span>
  229. </div>
  230. </div>
  231. </div>
  232. <div id='navigation-help-wrapper'>
  233. <div id='navigation-help' className='help outer'>
  234. <div className='interactions left'>
  235. <h2 className='top-info'> </h2>
  236. <img className='big-image' alt='' />
  237. <hr />
  238. <div className='bottom-info'></div>
  239. <img className='keyboard' alt='' />
  240. </div>
  241. <div className='interactions middle'>
  242. <h2 className='top-info'> </h2>
  243. <img className='big-image' alt='' />
  244. <hr />
  245. <div className='bottom-info'></div>
  246. <img className='keyboard' alt='' />
  247. </div>
  248. <div className='interactions right'>
  249. <h2 className='top-info'> </h2>
  250. <img className='big-image' alt='' />
  251. <hr />
  252. <div className='bottom-info'></div>
  253. <img className='keyboard' alt='' />
  254. </div>
  255. </div>
  256. </div>
  257. <div id='more-help-wrapper'>
  258. <div id='more-help'>
  259. <div className='ui-instructions more-help-hlr'>
  260. <h2 className='top-info'> </h2>
  261. <img className='big-image' alt='' />
  262. <div className='bottom-info'></div>
  263. </div>
  264. <div className='ui-instructions more-help-tour'>
  265. <h2 className='top-info'> </h2>
  266. <img className='big-image' alt='' />
  267. <div className='bottom-info'></div>
  268. </div>
  269. <div className='ui-instructions more-help-dollhouse'>
  270. <h2 className='top-info'> </h2>
  271. <img className='big-image' alt='' />
  272. <div className='bottom-info'></div>
  273. </div>
  274. <div className='ui-instructions more-help-inside'>
  275. <h2 className='top-info'> </h2>
  276. <img className='big-image' alt='' />
  277. <div className='bottom-info'></div>
  278. </div>
  279. <div className='ui-instructions more-help-360'>
  280. <h2 className='top-info'> </h2>
  281. <img className='big-image' alt='' />
  282. <div className='bottom-info'></div>
  283. </div>
  284. <div className='ui-instructions more-help-floors'>
  285. <h2 className='top-info'> </h2>
  286. <img className='big-image' alt='' />
  287. <div className='bottom-info'></div>
  288. </div>
  289. <div className='ui-instructions more-help-tag'>
  290. <h2 className='top-info'> </h2>
  291. <img className='big-image' alt='' />
  292. <div className='bottom-info'></div>
  293. </div>
  294. <div className='ui-instructions more-help-vr'>
  295. <h2 className='top-info'> </h2>
  296. <img className='big-image' alt='' />
  297. <div className='bottom-info'></div>
  298. </div>
  299. <div className='ui-instructions more-help-fullscreen'>
  300. <h2 className='top-info'> </h2>
  301. <img className='big-image' alt='' />
  302. <div className='bottom-info'></div>
  303. </div>
  304. <div className='ui-instructions more-help-zoom'>
  305. <h2 className='top-info'> </h2>
  306. <img className='big-image' alt='' />
  307. <div className='bottom-info'></div>
  308. </div>
  309. </div>
  310. </div>
  311. <div className='close'>
  312. {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
  313. <a>
  314. <i className='icon icon-close'></i>
  315. </a>
  316. </div>
  317. </div>
  318. <div id='vr-modal' className='vr-popup' style={{ display: 'none' }}>
  319. <div className='title'>{'{[{ VR_VIEW_SPACE }]}'}</div>
  320. <div className='outer'>
  321. <div className='inner'>
  322. <h3 className='vr-popup-title'>
  323. <span className='show-supported p1'>
  324. <p className='center'>{'{[{ VR_SHOW_SUPPORTED }]}'}</p>
  325. </span>
  326. <span className='show-unsupported p1'>{'{[{ VR_SHOW_UNSUPPORTED }]}'}</span>
  327. <span className='show-ios p1'>
  328. {'{[{ VR_SHOW_IOS_1 }]}'}
  329. <br />
  330. <br />
  331. </span>
  332. <span className='show-ios p2'>{'{[{ VR_WHAT_YOU_NEED }]}'}</span>
  333. </h3>
  334. <div className='vr-images'>
  335. <div className='img-container cardboard first'>
  336. <img className='vr-sm-image first' alt='' />
  337. <div className='vr-img-caption first'>
  338. <span className='show-supported show-desktop show-ios p1'>
  339. <b className='cardboard'>{'{[{ VR_GOOGLE_CARDBOARD }]}'}</b>
  340. <b className='gearvr hidden'>{'{[{ VR_SAMSUNG_GEAR_VR }]}'}</b>
  341. </span>
  342. <span className='show-supported show-unsupported show-desktop p2'>
  343. {'{[{ VR_NEED_CARDBOARD}]}'}
  344. </span>
  345. <span className='show-supported show-unsupported show-desktop p3'>
  346. {'{[{ VR_NEED_SAMSUNG}]}'}
  347. </span>
  348. <span className='show-ios p2'>
  349. <b>{'{[{ VR_GOOGLE_CARDBOARD }]}'}</b>
  350. <br />
  351. <br />
  352. </span>
  353. </div>
  354. </div>
  355. <div className='front-close'>
  356. <span className='front-close-x'>&#x2715;</span>
  357. </div>
  358. <div className='img-container gearvr second'>
  359. <img className='vr-sm-image second' alt='' />
  360. <div className='vr-img-caption second'>
  361. <span className='show-supported show-desktop p1'>
  362. <b>{'{[{ VR_SAMSUNG_GEAR_VR }]}'}</b>
  363. </span>
  364. <span className='show-supported p2'>
  365. <p>
  366. <b>{'{[{ VR_COMPATIBLE_ANDROID }]}'}</b>
  367. </p>
  368. <p>{'{[{ VR_ANDROID_DETAIL }]}'}</p>
  369. </span>
  370. <span className='show-desktop p2'>
  371. <p>
  372. <b>{'{[{ VR_COMPATIBLE_IPHONES_1 }]}'}</b>
  373. </p>
  374. <p>{'{[{ VR_COMPATIBLE_IPHONES_2 }]}'}</p>
  375. </span>
  376. <span className='show-ios p2'>
  377. <p>
  378. <b id='vr-compatible-iphones-3'>{'{[{ VR_COMPATIBLE_IPHONES_3 }]}'}</b>
  379. </p>
  380. <p id='vr-compatible-iphones-2b'>{'{[{ VR_COMPATIBLE_IPHONES_2 }]}'}</p>
  381. </span>
  382. <span className='show-unsupported p1 p2'>
  383. <p>
  384. <b>{'{[{ VR_COMPATIBLE_ANDROID }]}'}</b>
  385. </p>
  386. <p>{'{[{ VR_ANDROID_DETAIL }]}'}</p>
  387. </span>
  388. <span className='show-supported show-unsupported show-desktop p3'>
  389. <p>
  390. <b>{'{[{ VR_COMPATIBLE_SAMSUNG }]}'}</b>
  391. </p>
  392. <p>{'{[{ VR_SAMSUNG_DETAIL }]}'}</p>
  393. </span>
  394. </div>
  395. </div>
  396. <div className='img-container third'>
  397. <img className='vr-sm-image third' alt='' />
  398. <div className='vr-img-caption third'>
  399. <span className='show-supported show-unsupported show-ios p2'>
  400. <p>
  401. <b>{'{[{ VR_APP_FOR_CARDBOARD }]}'}</b>
  402. </p>
  403. <p>
  404. {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
  405. <a className='cardboardLink'>{'{[{ VR_DOWNLOAD_HERE }]}'}</a>
  406. </p>
  407. </span>
  408. <span className='show-desktop p2'>
  409. <p>
  410. <b>{'{[{ VR_ANDROID_DVICES }]}'}</b>
  411. </p>
  412. <p>{'{[{ VR_ANDROID_DETAIL }]}'}</p>
  413. </span>
  414. <span className='show-supported show-unsupported p3'>
  415. <p>
  416. <b>{'{[{ VR_APP_FOR_SAMSUNG }]}'}</b>
  417. </p>
  418. <p>
  419. {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
  420. <a className='gearLink'>{'{[{ VR_DOWNLOAD_HERE }]}'}</a>
  421. </p>
  422. </span>
  423. </div>
  424. </div>
  425. </div>
  426. <div className='vr-popup-body'>
  427. <span className='show-supported p1'>
  428. <p>
  429. <i>{'{[{ VR_REQUIRE_HEADSET }]}'}</i>
  430. </p>
  431. <br />
  432. <p>
  433. <i>{'{[{ VR_REDIRECT_TO_STORE }]}'}</i>
  434. </p>
  435. <br />
  436. <p className='improper-embed hidden'>
  437. <i>{'{[{ VR_IMPROPER_EMBED }]}'}</i>
  438. </p>
  439. </span>
  440. <span className='show-ios p1'>
  441. <p>
  442. <i id='show-ios-2'>{'{[{ VR_SHOW_IOS_2 }]}'}</i>
  443. </p>
  444. </span>
  445. <span className='show-desktop p1'>
  446. <p></p>
  447. <h3>{'{[{ VR_OPEN_ANDROID_LINK }]}'}</h3>
  448. <p>
  449. <br />
  450. </p>
  451. <p className='logo-button'>
  452. <span className='modelLink'></span>
  453. </p>
  454. <br />
  455. <br />
  456. <p></p>
  457. <h3>{'{[{ VR_ANDROID_OPTIONS }]}'}</h3>
  458. <p></p>
  459. </span>
  460. </div>
  461. </div>
  462. <div className='vr-buttons'>
  463. <div className='next-button'></div>
  464. <div className='prev-button'>{'{[{ VR_PREVIOUS_CAPS }]}'}</div>
  465. <div className='vr-arrows prev-container'></div>
  466. <div className='vr-arrows next-container'></div>
  467. </div>
  468. <div className='vr-page'></div>
  469. <div className='close'>
  470. {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
  471. <a>
  472. <i className='icon icon-close'></i>
  473. </a>
  474. </div>
  475. </div>
  476. </div>
  477. <div id='quick-blackout' className='quick' style={{ display: 'none' }}></div>
  478. <div id='quick-logo' className='quick-brand' style={{ display: 'none' }}></div>
  479. <div id='hover-top' className='hover-row' style={{ display: 'none' }}></div>
  480. <div id='hover-bottom' className='hover-row' style={{ display: 'none' }}></div>
  481. <div id='call-to-action'>
  482. <div id='pause-overlay' style={{ display: 'none' }}>
  483. <div id='pause-icon'>
  484. {/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
  485. <a>
  486. <i className='icon icon-pause'></i>
  487. </a>
  488. </div>
  489. </div>
  490. <div id='interaction-modal'>
  491. <div id='interaction-modal-inner'>
  492. <div className='nav-icon'>
  493. <img src='images/pc_step1.png' className='icon' title='导览' data-page='1' alt='' />
  494. <div className='nav-help-button'>
  495. <div className='next-button nav-help-page' data-id='plus'></div>
  496. <div className='prev-button nav-help-page'></div>
  497. </div>
  498. </div>
  499. </div>
  500. </div>
  501. </div>
  502. <div id='tag-billboards' style={{ display: 'none' }}></div>
  503. </div>
  504. </div>
  505. )
  506. }
  507. const MemoA1home = React.memo(A1home)
  508. export default MemoA1home