Model3.html 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  4. <meta name="viewport"
  5. content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  6. <link rel="shortcut icon" href="./img/favicon.ico" type="image/x-icon">
  7. <link rel="stylesheet" href="css/index.css">
  8. <script src="https://res.wx.qq.com/open/js/jweixin-1.4.0.js"></script>
  9. <head>
  10. <title>-</title>
  11. <script src="js/4dage.js"></script>
  12. <script src="./info.js"></script>
  13. <script>
  14. document.title = titleInfo
  15. </script>
  16. <style>
  17. html {
  18. overflow: hidden;
  19. }
  20. .back {
  21. z-index: 998;
  22. cursor: pointer;
  23. width: 30px;
  24. height: 30px;
  25. position: absolute;
  26. bottom: 10px;
  27. left: 10px;
  28. }
  29. .back img {
  30. width: 100%;
  31. height: 100%;
  32. }
  33. .outerImg {
  34. transition: all 1s;
  35. opacity: 1;
  36. position: absolute;
  37. z-index: 998;
  38. top: 0;
  39. left: 0;
  40. width: 100%;
  41. height: 100%;
  42. background-color: #1a1b20;
  43. }
  44. .URcode {
  45. position: absolute;
  46. right: 100px;
  47. bottom: 100px;
  48. width: 200px;
  49. height: 200px;
  50. z-index: 10;
  51. }
  52. .URcode img {
  53. width: 100%;
  54. height: 100%;
  55. }
  56. .Logo {
  57. width: 200px;
  58. height: 100px;
  59. position: absolute;
  60. right: 0px;
  61. top: 0px;
  62. z-index: 10;
  63. }
  64. .Logo img {
  65. width: 100%;
  66. }
  67. .outerImg img {
  68. position: absolute;
  69. width: 100%;
  70. height: 100%;
  71. object-fit: cover;
  72. }
  73. /* ---------------按钮和文字介绍------------- */
  74. body {
  75. user-select: none;
  76. }
  77. .topButn {
  78. opacity: 0;
  79. pointer-events: none;
  80. z-index: 999;
  81. position: absolute;
  82. top: 50px;
  83. left: 10px;
  84. }
  85. .topButn div {
  86. padding: 0 5px;
  87. margin-bottom: 10px;
  88. width: 100%;
  89. height: 40px;
  90. line-height: 40px;
  91. border-radius: 20px;
  92. font-size: 18px;
  93. color: #fff;
  94. cursor: pointer;
  95. text-align: center;
  96. /* background-color: #f2cd83; */
  97. background-color: #ccc;
  98. border-radius: 5px;
  99. }
  100. .con::-webkit-scrollbar {
  101. /*滚动条整体样式*/
  102. width: 3px;
  103. /*高宽分别对应横竖滚动条的尺寸*/
  104. height: 1px;
  105. }
  106. .con::-webkit-scrollbar-thumb {
  107. /*滚动条里面小方块*/
  108. border-radius: 10px;
  109. box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  110. background: #f2cd83;
  111. }
  112. .con::-webkit-scrollbar-track {
  113. /*滚动条里面轨道*/
  114. box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  115. border-radius: 10px;
  116. background: #ededed;
  117. }
  118. .txtOne {
  119. opacity: 0;
  120. pointer-events: none;
  121. padding: 30px 15px 30px 30px;
  122. z-index: 1000;
  123. position: absolute;
  124. top: 150px;
  125. left: 10px;
  126. background-image: url('./img/divBac.png');
  127. /* background-color: rgba(0, 0, 0, .6); */
  128. background-size: 100% 100%;
  129. width: 400px;
  130. height: 500px;
  131. z-index: 9999;
  132. color: #fff;
  133. }
  134. .txtOne .con {
  135. text-align: justify;
  136. padding-left: 10px;
  137. padding-right: 28px;
  138. line-height: 30px;
  139. margin-bottom: 30px;
  140. overflow-y: auto;
  141. height: 100%;
  142. }
  143. .txtOne .con>h3 {
  144. margin-left: -5px;
  145. font-size: 18px;
  146. font-weight: 700;
  147. margin-bottom: 15px;
  148. display: flex;
  149. }
  150. .txtOne .con>h3>img {
  151. width: 30px;
  152. /* height: 20px; */
  153. margin-left: 15px;
  154. cursor: pointer;
  155. }
  156. .txtOne .close {
  157. cursor: pointer;
  158. position: absolute;
  159. right: 24px;
  160. top: 20px;
  161. width: 20px;
  162. height: 20px;
  163. }
  164. .txtOne .close img {
  165. width: 100%;
  166. height: 100%;
  167. }
  168. /* 手机端的样式 */
  169. @media screen and (max-width: 600px) {
  170. .topButn {
  171. width: 220px;
  172. display: flex;
  173. justify-content: center;
  174. margin: 0;
  175. top: 5px;
  176. left: 50%;
  177. transform: translateX(-50%);
  178. pointer-events: auto;
  179. }
  180. .topButn div {
  181. width: 90px;
  182. font-size: 14px;
  183. background-color: #f2cd83;
  184. }
  185. .txtOne {
  186. display: none;
  187. box-sizing: border-box;
  188. width: 100vw;
  189. height: 100vh;
  190. top: 0;
  191. left: 0;
  192. transform: translate(0, 0);
  193. max-height: 100vh;
  194. color: #fff;
  195. }
  196. .txtOne .con {
  197. color: #fff;
  198. height: calc(100vh - 100px);
  199. }
  200. audio{
  201. display: none;
  202. }
  203. }
  204. </style>
  205. </head>
  206. <body>
  207. <!-- 新加的按钮 -->
  208. <div class="topButn">
  209. <!-- <div class="topButnOne">文物介绍</div> -->
  210. </div>
  211. <!-- 专家鉴定意见的文字 -->
  212. <div class="txtOne">
  213. <div class="close">
  214. <!-- <img src="./img/close.png" alt=""> -->
  215. </div>
  216. <p class="con"></p>
  217. </div>
  218. <!-- 音频 -->
  219. <audio id="explain" src="./audio/sgsw01.MP3"></audio>
  220. <div class="back" onclick="javascript:history.go(-1);">
  221. <img src="./img/back.png" alt="">
  222. </div>
  223. <div class="outerImg">
  224. <img src="./img/bg.jpg" alt="">
  225. </div>
  226. <div class="URcode">
  227. <img id="urcode" alt="">
  228. </div>
  229. <!-- <div class="Logo">
  230. <img src="./img/logo.jpg" alt="">
  231. </div> -->
  232. <div id="ui">
  233. </div>
  234. <script src="js/jquery.js"></script>
  235. <script src="./txt.js"></script>
  236. <script>
  237. var number = getQueryVariable("m");
  238. if (spinInfo) window.autoRotate = true;
  239. fdage.embed('4dage/' + number + '.4dage', {
  240. width: 800,
  241. height: 600,
  242. autoStart: true,
  243. fullFrame: true,
  244. pagePreset: false
  245. });
  246. $('.outerImg img').attr('src', `./images/${number}.jpg`)
  247. var number = getQueryVariable("m");
  248. console.log(number)
  249. $("#urcode").attr("src", "./img/" + number + ".png");
  250. $("#urcode").attr("onerror", "this.src = './img/error.png'");
  251. const explainDom = document.getElementById('explain')
  252. explainDom.src = `./audio/${number}.MP3`
  253. // explainDom.addEventListener('canplaythrough',() => {
  254. // const PlayDom = document.getElementsByClassName('play')[0]
  255. // PlayDom.src = './img/pause.png'
  256. // explainDom.play()
  257. // })
  258. // explainDom.play()
  259. // 获取文字介绍
  260. if (txtShow && txtObj[number]) {
  261. const btnDom = document.querySelector('.topButn')
  262. btnDom.style.opacity = 1
  263. // btnDom.style.pointerEvents = 'auto'
  264. const txtDom = document.querySelector('.txtOne')
  265. txtDom.style.opacity = 1
  266. txtDom.style.pointerEvents = 'auto'
  267. const txtButton = document.querySelector('.topButnOne')
  268. // 获取文本
  269. const txtInfo = txtObj[number] || '(空)'
  270. $('.txtOne .con').html(txtInfo)
  271. // 点击关闭
  272. $('.txtOne .close').click(() => {
  273. $('.txtOne').hide()
  274. btnDom.style.pointerEvents = 'auto'
  275. txtButton.style.backgroundColor = '#f2cd83'
  276. })
  277. $('.topButnOne').click(() => {
  278. $('.txtOne').show()
  279. btnDom.style.pointerEvents = 'none'
  280. txtButton.style.backgroundColor = '#ccc'
  281. })
  282. const newSrc = 'replacement-image.jpg';
  283. $('.play').click(() => {
  284. const PlayDom = document.getElementsByClassName('play')[0]
  285. if(PlayDom.src.includes('play.png')){
  286. explainDom.play()
  287. PlayDom.src = './img/pause.png'
  288. }else {
  289. PlayDom.src = './img/play.png'
  290. explainDom.pause()
  291. }
  292. })
  293. }
  294. </script>
  295. </body>
  296. </html>