index.html 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  6. <meta content="yes" name="apple-mobile-web-app-capable">
  7. <meta content="yes" name="apple-touch-fullscreen">
  8. <meta content="black" name="apple-mobile-web-app-status-bar-style">
  9. <meta content="telephone=no" name="format-detection">
  10. <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no,viewport-fit=cover" />
  11. <title>回望江南—苏州老照片展</title>
  12. <link rel="stylesheet" type="text/css" href="static/public/animate.min.css" />
  13. <link rel="stylesheet" type="text/css" href="static/public/swiper-4.3.5.min.css" />
  14. <link rel="stylesheet" type="text/css" href="static/css/app.css" />
  15. <script src="static/public/flexible.min.js" async></script>
  16. <style>
  17. .BAC {
  18. z-index: 999;
  19. background: url('./static/images/adds/1.jpg') no-repeat center;
  20. background-size: cover;
  21. width: 100vw;
  22. height: 100vh;
  23. position: absolute;
  24. top: 0;
  25. left: 0;
  26. display: block;
  27. overflow: hidden;
  28. }
  29. .BAC_son {
  30. width: 140px;
  31. max-width: 240px;
  32. min-width: 100px;
  33. position: absolute;
  34. top: 50%;
  35. left: 50%;
  36. transform: translate(-50%,-50%);
  37. }
  38. .BAC_son img {
  39. width: 100%;
  40. height: 100%;
  41. }
  42. .but{
  43. z-index: 1000;
  44. position: absolute;
  45. left: 50%;
  46. transform: translateX(-50%);
  47. bottom: 40px;
  48. display: flex;
  49. justify-content: space-between;
  50. width: 70%;
  51. height: 40px;
  52. }
  53. .but img {
  54. height: 100%;
  55. }
  56. .box{
  57. position: absolute;
  58. width: 100%;
  59. height: 85%;
  60. bottom: 0;
  61. left: 0;
  62. }
  63. .BAC_son .arrows{
  64. position: absolute;
  65. right: 0;
  66. top: 0;
  67. width: 30px;
  68. height: 30px;
  69. }
  70. </style>
  71. </head>
  72. <body>
  73. <!-- 背景图和人像图 -->
  74. <div class="BAC">
  75. <div class="BAC_son">
  76. <img class="arrows" src="./static/images/adds/fangda.png" alt="">
  77. <div class="box">
  78. </div>
  79. <img src="./static/images/adds/33.png" alt="">
  80. </div>
  81. </div>
  82. <div class="but">
  83. <img class="cancel" src="./static/images/adds/22.png" alt="">
  84. <img src="./static/images/adds/11.png" alt="">
  85. </div>
  86. <div class="app-main">
  87. <div class="ads-swiper swiper-container">
  88. <div class="swiper-wrapper"></div>
  89. <div class="swiper-pagination"></div>
  90. </div>
  91. <nav class="nav-menu">
  92. <ul>
  93. <li><a href="javascript:;" class="btn-pic-take"></a></li>
  94. <li><a href="javascript:;" class="btn-pic-list"></a></li>
  95. </ul>
  96. </nav>
  97. </div>
  98. <div class="app-switch">
  99. <nav class="swt-style clearfix">
  100. <a href="javascript:;" data-id='1' class="switch active"></a>
  101. <div></div>
  102. </nav>
  103. <div class="stl-swiper swiper-container">
  104. <div class="swiper-wrapper">
  105. <div data-msg="1" class="swiper-slide style-1"></div>
  106. <div data-msg="2" class="swiper-slide style-2"></div>
  107. <div data-msg="3" class="swiper-slide style-3"></div>
  108. <div data-msg="4" class="swiper-slide style-4"></div>
  109. <div data-msg="5" class="swiper-slide style-5"></div>
  110. <div data-msg="6" class="swiper-slide style-6"></div>
  111. </div>
  112. </div>
  113. </div>
  114. <div class="my-pic-list">
  115. <header>
  116. <div class="home-nav">
  117. <a class="btn-back"></a>
  118. </div>
  119. <div class="tips">
  120. 相片将于您退出后删除,请尽快保存
  121. </div>
  122. </header>
  123. <article>
  124. <div class="pic-swiper swiper-container">
  125. <div class="swiper-wrapper">
  126. <div class="swiper-slide">
  127. <!-- <div class="img">
  128. <img src="static/images/test.png">
  129. </div>
  130. <div class="info">
  131. <div class="time">
  132. 2010年10月10日 18:00:00
  133. </div>
  134. <div class="style style-1"></div>
  135. </div> -->
  136. </div>
  137. </div>
  138. <div class="swiper-scrollbar"></div>
  139. </div>
  140. </article>
  141. </div>
  142. <!-- 点击拍照之后的原显示页面 -->
  143. <div class="app-mask"></div>
  144. <div class="app-alert">
  145. <div class="tips"></div>
  146. <div class="btns">
  147. <a class="btn-use" href="javascript:;">再次使用</a>
  148. <a class="btn-link" href="javascript:;">刷新页面</a>
  149. </div>
  150. </div>
  151. <div class="app-view">
  152. <div class="img"></div>
  153. <div class="tip">
  154. <div>
  155. <div>长按图片保存</div>
  156. <div>关闭后可在【我的相片】中查看</div>
  157. </div>
  158. <span class="close"></span>
  159. </div>
  160. </div>
  161. <div class="app-action-tips">
  162. <div class="content loading">
  163. <div class="lds-spinner">
  164. <div></div>
  165. <div></div>
  166. <div></div>
  167. <div></div>
  168. <div></div>
  169. <div></div>
  170. <div></div>
  171. <div></div>
  172. <div></div>
  173. <div></div>
  174. <div></div>
  175. <div></div>
  176. </div>
  177. <div class="tips"></div>
  178. </div>
  179. <div class="content loading-switch">
  180. <div class="lds-spinner">
  181. <div></div>
  182. <div></div>
  183. <div></div>
  184. <div></div>
  185. <div></div>
  186. <div></div>
  187. <div></div>
  188. <div></div>
  189. <div></div>
  190. <div></div>
  191. <div></div>
  192. <div></div>
  193. </div>
  194. <div class="tips">正在切换画风</div>
  195. </div>
  196. <div class="content face-6">
  197. <div class="tips">
  198. 将于1秒后拍摄
  199. </div>
  200. </div>
  201. <div class="content face-5">
  202. <div class="tips">
  203. 将于2秒后拍摄
  204. </div>
  205. </div>
  206. <div class="content face-4">
  207. <div class="tips">
  208. 将于3秒后拍摄
  209. </div>
  210. </div>
  211. <div class="content face-3">
  212. <div class="tips">
  213. 将于4秒后拍摄
  214. </div>
  215. </div>
  216. <div class="content face-2">
  217. <div class="tips">
  218. 将于5秒后拍摄
  219. </div>
  220. </div>
  221. <div class="content face-1">
  222. <div class="tips">
  223. 快望向你身前的艺术<br>照设备,准备拍照啦
  224. </div>
  225. </div>
  226. </div>
  227. <script src="static/public/swiper-4.3.5.min.js"></script>
  228. <script src="static/public/jquery.min.js"></script>
  229. <script src="static/js/config.js"></script>
  230. <script src="static/js/app.js"></script>
  231. <script src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
  232. </body>
  233. <script>
  234. // 获取最大盒子的宽高
  235. let BACwidth =$('.BAC').width()
  236. let BACheight =$('.BAC').height()
  237. // 初始盒子的位移
  238. let BACSonTop =$('.BAC_son').offset().top
  239. let BACSonLeft =$('.BAC_son').offset().left
  240. let _x_start, _y_start, _x_move, _y_move, _x_end, _y_end, left_start, top_start;
  241. $('.box').on('touchstart', function (e) {
  242. _x_start = e.touches[0].pageX;
  243. _y_start = e.touches[0].pageY;
  244. // console.log("start",_x_start)
  245. left_start = $('.BAC_son').css("left");
  246. top_start = $('.BAC_son').css("top");
  247. })
  248. $('.box').on('touchmove', function (e) {
  249. //获取当前盒子的宽高
  250. let BACSonWidth =$('.BAC_son').width()
  251. let BACSonHeight =$('.BAC_son').height()
  252. _x_move = e.touches[0].pageX;
  253. _y_move = e.touches[0].pageY;
  254. // console.log("move",_x_move)
  255. let myLeft =parseFloat(_x_move) - parseFloat(_x_start) + parseFloat(left_start)
  256. if(myLeft<BACSonWidth/2) myLeft=BACSonWidth/2
  257. if(myLeft>BACwidth-BACSonWidth+BACSonLeft) myLeft=BACwidth-BACSonWidth/2
  258. let myTop =parseFloat(_y_move) - parseFloat(_y_start) + parseFloat(top_start)
  259. if(myTop<BACSonHeight/2) myTop=BACSonHeight/2
  260. if(myTop>BACheight-BACSonHeight+BACSonLeft) myTop=BACheight-BACSonHeight/2
  261. $('.BAC_son').css("left", myLeft + "px");
  262. $('.BAC_son').css("top", myTop + "px");
  263. // console.log(parseFloat(_y_move) - parseFloat(_y_start) + parseFloat(top_start));
  264. })
  265. $('.box').on('touchend', function (e) {
  266. let _x_end=e.changedTouches[0].pageX;
  267. let _y_end=e.changedTouches[0].pageY;
  268. })
  269. //阻止浏览器下拉事件
  270. $('BAC').on('touchmove', function (event) {event.preventDefault();});
  271. //------------------------------按住箭头放大图片-------------------------
  272. let zoom_xS,zoom_yS,zoom_xE,zoom_yE
  273. $('.arrows').on('touchstart', function (e) {
  274. //获取初始的手指按下位置
  275. zoom_xS = e.touches[0].pageX;
  276. zoom_yS = e.touches[0].pageY;
  277. // console.log('按住了');
  278. })
  279. $('.arrows').on('touchmove', function (e) {
  280. //获取当前盒子的宽高
  281. let BACSonWidth =$('.BAC_son').width()
  282. let BACSonHeight =$('.BAC_son').height()
  283. //移动后的手指位置
  284. zoom_xE = e.touches[0].pageX;
  285. zoom_yE = e.touches[0].pageY;
  286. console.log(zoom_xE-zoom_xS,zoom_yE-zoom_yS);
  287. // console.log('移动了',e.touches[0].pageX,e.touches[0].pageY);
  288. if(zoom_xE-zoom_xS>0) $('.BAC_son').css('width',BACSonWidth+5)
  289. else $('.BAC_son').css('width',BACSonWidth-5)
  290. // if() $('.BAC_son').css('height',BACSonWidth-3)
  291. // else $('.BAC_son').css('height',BACSonHeight+3)
  292. })
  293. // 点击取消
  294. $('.cancel').on('click',function(e){
  295. $('.BAC').css('display','none')
  296. $('.but').css('display','none')
  297. })
  298. </script>
  299. </html>