cashier.html 25 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0" />
  7. <!-- 清除缓存 -->
  8. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  9. <meta http-equiv="X-UA-Compatible" content="IE=8">
  10. <meta http-equiv="Expires" content="0">
  11. <meta http-equiv="Pragma" content="no-cache">
  12. <meta http-equiv="Cache-control" content="no-cache, no-store, must-revalidate">
  13. <meta http-equiv="Cache" content="no-cache">
  14. <title>收银台</title>
  15. <link rel="stylesheet" href="./css/reset.css" />
  16. <script>
  17. (function(WIN) {
  18. var setFontSize = (WIN.setFontSize = function(_width) {
  19. var docEl = document.documentElement;
  20. // 获取当前窗口的宽度
  21. var width = _width || docEl.clientWidth || docEl.getBoundingClientRect().width;
  22. if (width > 420) {
  23. width = 420;
  24. }
  25. // 在375px上,1rem = 20px
  26. var rem = width / 18.75;
  27. docEl.style.fontSize = rem + 'px';
  28. // // 部分机型上的误差、兼容性处理
  29. var actualSize =
  30. WIN.getComputedStyle && parseFloat(WIN.getComputedStyle(docEl)['font-size']);
  31. if (actualSize !== rem && actualSize > 0 && Math.abs(actualSize - rem) > 1) {
  32. var remScaled = (rem * rem) / actualSize;
  33. docEl.style.fontSize = rem + 'px';
  34. }
  35. });
  36. var timer;
  37. //函数节流
  38. function dbcRefresh() {
  39. clearTimeout(timer);
  40. timer = setTimeout(setFontSize, 100);
  41. }
  42. //窗口更新动态改变 font-size
  43. WIN.addEventListener('resize', dbcRefresh, false);
  44. //页面显示时计算一次
  45. WIN.addEventListener(
  46. 'pageshow',
  47. function(e) {
  48. if (e.persisted) {
  49. dbcRefresh();
  50. }
  51. },
  52. false
  53. );
  54. setFontSize();
  55. })(window);
  56. </script>
  57. <style>
  58. @font-face {
  59. font-display: auto;
  60. font-family: 'DIN_Alternate_Bold';
  61. font-style: normal;
  62. font-weight: 400;
  63. src: local('DIN_Alternate_Bold'), url('./fonts/DIN_Alternate_Bold.ttf') format('ttf');
  64. }
  65. @media only screen and (min-width: 400px) {
  66. body {
  67. font-size: 21.33333333px !important;
  68. }
  69. }
  70. @media only screen and (min-width: 414px) {
  71. body {
  72. font-size: 21px !important;
  73. }
  74. }
  75. @media only screen and (min-width: 480px) {
  76. body {
  77. font-size: 25.6px !important;
  78. }
  79. }
  80. * {
  81. padding: 0;
  82. margin: 0;
  83. }
  84. li {
  85. list-style: none;
  86. }
  87. body,
  88. html {
  89. width: 100%;
  90. height: 100%;
  91. background: #fff;
  92. }
  93. .h5Container {
  94. width: 18.75rem;
  95. max-width: 18.75rem;
  96. height: 100vh;
  97. box-sizing: border-box;
  98. margin: 0 auto;
  99. font-size: 0.7rem;
  100. text-align: center;
  101. }
  102. /* 独立页面样式 */
  103. .cashier_headerTitle {
  104. color: #050505;
  105. font-size: 0.9rem;
  106. font-weight: 400;
  107. }
  108. .cashier_cashierDivider {
  109. height: 0.5rem;
  110. background: #f5f5f5;
  111. }
  112. .cashier_logo {
  113. padding-top: 1.85rem;
  114. margin-bottom: 1rem;
  115. }
  116. .cashier_logoImg {
  117. max-width: 10rem;
  118. min-height: 2rem;
  119. max-height: 3rem;
  120. object-fit: contain;
  121. }
  122. .cashier_price {
  123. margin-bottom: 1rem;
  124. color: #333;
  125. font-size: 1.2rem;
  126. }
  127. .cashier_priceNumber {
  128. margin-left: 0.2rem;
  129. font-family: DIN_Alternate_Bold;
  130. font-size: 1.5rem;
  131. font-weight: 500;
  132. }
  133. .cashier_payTimeRemaining {
  134. margin-bottom: 0.3rem;
  135. }
  136. .cashier_payTxt {
  137. margin-right: 0.5rem;
  138. color: #999;
  139. }
  140. .cashier_time {
  141. color: #999;
  142. font-weight: 500;
  143. }
  144. .cashier_timeItem {
  145. padding: 0.1rem;
  146. background: rgba(0, 0, 0, 0.04);
  147. border-radius: 0.1rem;
  148. color: #000;
  149. }
  150. .cashier_timeSplit {
  151. margin: 0 0.2rem;
  152. color: #000;
  153. }
  154. .cashier_order {
  155. margin-bottom: 2.5rem;
  156. color: #999;
  157. }
  158. .cashier_orderTxt {
  159. margin-right: 0.4rem;
  160. }
  161. .cashier_payType {
  162. box-sizing: border-box;
  163. text-align: left;
  164. }
  165. .checkout-list-item {
  166. display: none;
  167. overflow: hidden;
  168. padding: 0.85rem 0;
  169. border-bottom: 1px solid #e9eaeb;
  170. margin: 0 1rem;
  171. }
  172. .checkout-list-item-inner {
  173. display: flex;
  174. align-items: center;
  175. float: left;
  176. pointer-events: none;
  177. }
  178. .checkout-payIcon {
  179. width: 1rem;
  180. height: 1rem;
  181. margin-right: 0.5rem;
  182. }
  183. .checkout-pay-title {
  184. margin-right: 0.5rem;
  185. font-size: 0.7rem;
  186. }
  187. .checkout-recommend {
  188. width: 1.9rem;
  189. height: 1rem;
  190. border: 1px solid var(--theme);
  191. border-radius: 0.15rem;
  192. color: var(--theme);
  193. font-size: 0.7rem;
  194. font-weight: 400;
  195. line-height: 1rem;
  196. text-align: center;
  197. display: none;
  198. }
  199. .checkout-list-item:nth-of-type(1) .checkout-recommend {
  200. display: block;
  201. }
  202. .checkout-radio {
  203. position: relative;
  204. display: block;
  205. width: 1rem;
  206. height: 1rem;
  207. padding: 0;
  208. border: 0.1rem solid #ccc;
  209. margin: 0;
  210. -webkit-appearance: none;
  211. background-color: #fff;
  212. -webkit-border-radius: 50%;
  213. border-radius: 50%;
  214. /* vertical-align: top; */
  215. cursor: default;
  216. float: right;
  217. font-size: 0.7rem;
  218. -webkit-transition: background-color ease 0.1s;
  219. transition: background-color ease 0.1s;
  220. -webkit-user-select: none;
  221. user-select: none;
  222. pointer-events: none;
  223. }
  224. .checkout-radio:checked,
  225. .checked-radio {
  226. border: solid 0.1rem var(--theme);
  227. background-color: var(--theme);
  228. text-align: center;
  229. }
  230. .checkout-radio:checked::before,
  231. .checkout-radio.checkout-checked::before,
  232. .checkout-radio:checked::after,
  233. .checkout-radio.checkout-checked::after,
  234. .checked-radio::before,
  235. .checked-radio::after {
  236. position: absolute;
  237. z-index: 2;
  238. top: 50%;
  239. left: 50%;
  240. width: 0.5rem;
  241. height: 0.3rem;
  242. border: 1px solid #fff;
  243. border-top: none;
  244. border-right: none;
  245. margin-top: -0.25rem;
  246. margin-left: -0.25rem;
  247. background: transparent;
  248. -webkit-border-radius: 0;
  249. border-radius: 0;
  250. content: '';
  251. -webkit-transform: rotate(-45deg);
  252. transform: rotate(-45deg);
  253. }
  254. .cashier_payTypeTitle {
  255. padding: 1rem 0 1rem 1rem;
  256. font-weight: 500;
  257. }
  258. .cashier_footer {
  259. position: absolute;
  260. z-index: 10;
  261. bottom: 0;
  262. left: 0;
  263. display: flex;
  264. width: 100%;
  265. flex-direction: column;
  266. align-items: center;
  267. padding-bottom: 1rem;
  268. cursor: pointer;
  269. text-align: center;
  270. }
  271. .cashier_payBtn {
  272. width: 17.15rem;
  273. height: 2.2rem;
  274. margin-bottom: 1rem;
  275. background: rgb(133, 133, 133);
  276. border-radius: 0.2rem;
  277. color: rgba(255, 255, 255, 0.85);
  278. font-size: 0.8rem;
  279. line-height: 2.2rem;
  280. }
  281. .cashier_brand {
  282. display: flex;
  283. width: 100%;
  284. align-items: center;
  285. justify-content: center;
  286. }
  287. .cashier_brandImg {
  288. max-width: 5rem;
  289. height: 1rem;
  290. margin-right: 0.2rem;
  291. object-fit: contain;
  292. }
  293. .cashier_brandtxt {
  294. color: rgba(0, 0, 0, 0.45);
  295. font-size: 0.6rem;
  296. }
  297. /* 底部弹出样式 */
  298. .dialogMask {
  299. position: absolute;
  300. z-index: 999;
  301. top: 0;
  302. right: 0;
  303. bottom: 0;
  304. left: 0;
  305. width: 100%;
  306. height: 100%;
  307. background: rgba(0, 0, 0, 0.5);
  308. }
  309. .confirmDialog {
  310. position: absolute;
  311. top: 50%;
  312. left: 50%;
  313. display: flex;
  314. overflow: hidden;
  315. width: 15rem;
  316. flex-direction: column;
  317. align-items: center;
  318. background: #fff;
  319. border-radius: 0.2rem;
  320. text-align: center;
  321. transform: translate(-50%, -50%);
  322. }
  323. .confirmHeader {
  324. padding: 1.55rem 0.6rem 0;
  325. color: #22242e;
  326. font-size: 0.9rem;
  327. line-height: 1.2rem;
  328. }
  329. .confimContent {
  330. display: flex;
  331. width: 100%;
  332. justify-content: center;
  333. padding: 0.55rem 1rem 1.55rem;
  334. color: #6c6e75;
  335. font-size: 0.7rem;
  336. font-weight: 400;
  337. text-align: justify;
  338. }
  339. .contentTxt {
  340. line-height: 1.05rem;
  341. }
  342. .confimFooter {
  343. position: relative;
  344. display: flex;
  345. width: 100%;
  346. height: 2.5rem;
  347. align-items: center;
  348. border-top: 1px solid #eee;
  349. }
  350. /* .confimFooter::after {
  351. position: absolute;
  352. content: '';
  353. height: 100%;
  354. width: 1px;
  355. background: #eeeeee;
  356. left: 50%;
  357. top: 0;
  358. } */
  359. .confimBtn {
  360. display: flex;
  361. height: 100%;
  362. flex: 1;
  363. align-items: center;
  364. justify-content: center;
  365. color: #22242e;
  366. font-size: 0.7rem;
  367. line-height: 0.95rem;
  368. text-align: center;
  369. }
  370. .leaveBtn {
  371. position: relative;
  372. }
  373. .leaveBtn::after {
  374. position: absolute;
  375. top: 0;
  376. right: 0;
  377. width: 1px;
  378. height: 100%;
  379. background: #eee;
  380. content: '';
  381. }
  382. .payBtn {
  383. color: #5568d5;
  384. }
  385. .hide {
  386. display: none;
  387. }
  388. .show {
  389. display: block;
  390. }
  391. /* 取消支付 */
  392. .cancelMask {
  393. position: absolute;
  394. z-index: 9999;
  395. top: 0;
  396. right: 0;
  397. bottom: 0;
  398. left: 0;
  399. width: 100%;
  400. height: 100%;
  401. background: rgba(0, 0, 0, 0.5);
  402. }
  403. .cancelMask .confirmDialog {
  404. position: absolute;
  405. top: 50%;
  406. left: 50%;
  407. display: flex;
  408. overflow: hidden;
  409. width: 15rem;
  410. flex-direction: column;
  411. align-items: center;
  412. background: #fff;
  413. border-radius: 0.2rem;
  414. text-align: center;
  415. transform: translate(-50%, -50%);
  416. }
  417. .cancelMask .confirmHeader {
  418. padding: 1.55rem 0.6rem 0;
  419. color: #22242e;
  420. font-size: 0.9rem;
  421. line-height: 1.2rem;
  422. }
  423. .cancelMask .confimContent {
  424. display: flex;
  425. width: 100%;
  426. justify-content: center;
  427. padding: 0.55rem 1rem 1.55rem;
  428. color: #6c6e75;
  429. font-size: 0.7rem;
  430. font-weight: 400;
  431. text-align: justify;
  432. }
  433. .cancelMask .contentTxt {
  434. line-height: 1.05rem;
  435. }
  436. .cancelMask .confimFooter {
  437. position: relative;
  438. display: flex;
  439. width: 100%;
  440. height: 2.5rem;
  441. align-items: center;
  442. border-top: 1px solid #eee;
  443. }
  444. .cancelMask .confimFooter::after {
  445. position: absolute;
  446. top: 0;
  447. left: 50%;
  448. width: 1px;
  449. height: 100%;
  450. background: #eee;
  451. content: '';
  452. }
  453. .cancelMask .confimBtn {
  454. display: flex;
  455. height: 100%;
  456. flex: 1;
  457. align-items: center;
  458. justify-content: center;
  459. color: #22242e;
  460. font-size: 0.7rem;
  461. line-height: 0.95rem;
  462. text-align: center;
  463. }
  464. .cancelMask .payBtn {
  465. color: #5568d5;
  466. }
  467. /* loading */
  468. .loadingMask {
  469. position: absolute;
  470. z-index: 99;
  471. top: 0;
  472. right: 0;
  473. bottom: 0;
  474. left: 0;
  475. width: 100%;
  476. max-width: 18.75rem;
  477. height: 100%;
  478. margin: 0 auto;
  479. background: rgba(0, 0, 0, 0.5);
  480. border-radius: 0 0 0.2rem 0.2rem;
  481. }
  482. .loadingMask .content {
  483. position: absolute;
  484. top: 50%;
  485. left: 50%;
  486. display: flex;
  487. width: 15rem;
  488. flex-direction: column;
  489. align-items: center;
  490. background: #fff;
  491. border-radius: 0.2rem;
  492. box-shadow:
  493. 0 12px 48px 16px rgba(0, 0, 0, 0.03),
  494. 0 9px 28px 0 rgba(0, 0, 0, 0.05),
  495. 0 6px 16px -8px rgba(0, 0, 0, 0.08);
  496. transform: translate(-50%, -50%);
  497. }
  498. .loadingMask .loadingImg {
  499. width: 1.6rem;
  500. height: 1.6rem;
  501. margin-top: 2rem;
  502. animation: 1.6s linear ratate infinite;
  503. }
  504. @keyframes ratate {
  505. 0% {
  506. transform: rotate(0deg);
  507. }
  508. 40% {
  509. transform: rotate(144deg);
  510. }
  511. 80% {
  512. transform: rotate(288deg);
  513. }
  514. 100% {
  515. transform: rotate(360deg);
  516. }
  517. }
  518. .loadingMask .loadingTxt {
  519. margin-top: 1.2rem;
  520. margin-bottom: 2rem;
  521. color: #22242e;
  522. font-size: 0.7rem;
  523. }
  524. /* 底部弹出收银台 */
  525. .cashier_mask_mb16 {
  526. margin-bottom: 0.8rem;
  527. }
  528. .cashier_mask_headerTitle {
  529. position: relative;
  530. margin-top: 0.8rem;
  531. color: rgba(0, 0, 0, 0.85);
  532. font-size: 0.8rem;
  533. font-weight: 500;
  534. text-align: center;
  535. }
  536. .cashier_mask_cancel {
  537. position: absolute;
  538. left: 0.8rem;
  539. color: rgba(0, 0, 0, 0.45);
  540. font-size: 0.7rem;
  541. font-weight: 400;
  542. }
  543. .cashier_mask_divider {
  544. height: 1px;
  545. background: #eee;
  546. }
  547. .cashier_mask_logo {
  548. padding-top: 1.6rem;
  549. margin-bottom: 0.75rem;
  550. }
  551. .cashier_mask_logoImg {
  552. max-width: 2rem;
  553. max-width: 10rem;
  554. min-height: 1.2rem;
  555. object-fit: contain;
  556. }
  557. .cashier_mask_price {
  558. margin-bottom: 1rem;
  559. color: rgba(0, 0, 0, 0.85);
  560. }
  561. .cashier_mask_priceNumber {
  562. margin-left: 0.2rem;
  563. font-size: 1.2rem;
  564. font-weight: 500;
  565. }
  566. .cashier_mask_payTxt {
  567. margin-right: 0.4rem;
  568. color: rgba(0, 0, 0, 0.65);
  569. }
  570. .cashier_mask_time {
  571. color: rgba(0, 0, 0, 0.65);
  572. font-weight: 500;
  573. }
  574. .cashier_mask_order {
  575. margin-bottom: 2rem;
  576. color: rgba(0, 0, 0, 0.65);
  577. }
  578. .cashier_mask_orderTxt {
  579. margin-right: 0.2rem;
  580. }
  581. .cashier_mask_payType {
  582. box-sizing: border-box;
  583. margin-bottom: 1rem;
  584. text-align: left;
  585. }
  586. .cashier_mask_payTypeTitle {
  587. padding: 1rem 0 1rem 1rem;
  588. font-weight: 500;
  589. }
  590. .cashier_mask_payTxt {
  591. margin: 0 1rem;
  592. }
  593. .cashier_mask_footer {
  594. display: flex;
  595. width: 100%;
  596. flex-direction: column;
  597. align-items: center;
  598. padding-bottom: 1.2rem;
  599. cursor: pointer;
  600. text-align: center;
  601. }
  602. .cashier_mask_payBtn {
  603. width: 17.15rem;
  604. height: 2.2rem;
  605. background: #0b5afe;
  606. border-radius: 0.2rem;
  607. color: rgba(255, 255, 255, 0.85);
  608. line-height: 2.2rem;
  609. }
  610. .cashier_mask_brand {
  611. display: flex;
  612. width: 100%;
  613. align-items: center;
  614. justify-content: center;
  615. }
  616. .cashier_mask_brandImg {
  617. height: 1rem;
  618. margin-right: 0.2rem;
  619. object-fit: contain;
  620. }
  621. .cashier_mask_brandtxt {
  622. color: rgba(0, 0, 0, 0.45);
  623. font-size: 0.6rem;
  624. }
  625. .cashier_mask_content {
  626. position: absolute;
  627. z-index: 99;
  628. bottom: 0;
  629. left: 50%;
  630. width: 100%;
  631. background: #fff;
  632. border-radius: 0.4rem 0.4rem 0 0;
  633. box-shadow:
  634. 0 12px 48px 16px rgba(0, 0, 0, 0.03),
  635. 0 9px 28px 0 rgba(0, 0, 0, 0.05),
  636. 0 6px 16px -8px rgba(0, 0, 0, 0.08);
  637. transform: translateX(-50%);
  638. }
  639. .cashier_mask_mask {
  640. position: absolute;
  641. z-index: 10;
  642. top: 0;
  643. right: 0;
  644. bottom: 0;
  645. left: 0;
  646. width: 100%;
  647. max-width: 18.75rem;
  648. height: 100%;
  649. margin: 0 auto;
  650. background: rgba(0, 0, 0, 0.5);
  651. border-radius: 0 0 0.2rem 0.2rem;
  652. }
  653. /* page loading */
  654. .pageLoadingMask {
  655. position: absolute;
  656. z-index: 99;
  657. top: 0;
  658. right: 0;
  659. bottom: 0;
  660. left: 0;
  661. width: 100%;
  662. width: 18.75rem;
  663. height: 100%;
  664. margin: 0 auto;
  665. background: #fff;
  666. }
  667. .pageLoadingImg {
  668. position: absolute;
  669. top: 30%;
  670. left: 46%;
  671. width: 1.6rem;
  672. height: 1.6rem;
  673. animation: 1.6s linear ratate infinite;
  674. transform: translate(-50%, -50%);
  675. }
  676. .pageLoadingText {
  677. position: absolute;
  678. top: 37%;
  679. width: 100%;
  680. text-align: center;
  681. transform: translateY(-50%);
  682. }
  683. /* 弹出层-订单页面 */
  684. .content {
  685. position: fixed;
  686. top: 0;
  687. left: 0;
  688. margin-bottom: 129px;
  689. }
  690. .itemContent {
  691. display: flex;
  692. justify-content: center;
  693. }
  694. .actImg {
  695. margin-top: 10px;
  696. }
  697. .address {
  698. width: 100%;
  699. margin-top: 20px;
  700. text-align: left;
  701. }
  702. .contact {
  703. width: 100%;
  704. margin-top: 10px;
  705. margin-bottom: 10px;
  706. color: #818489;
  707. font-size: 14px;
  708. text-align: left;
  709. }
  710. .cashier_priceNumber-order {
  711. margin-left: 20px;
  712. font-size: 14px;
  713. }
  714. .dliver {
  715. width: 100%;
  716. height: 10px;
  717. background-color: #ecf1f4;
  718. }
  719. .goodsTitle {
  720. margin-left: 20px;
  721. color: #595a5b;
  722. font-size: 15px;
  723. text-align: left;
  724. }
  725. .orderContent {
  726. display: flex;
  727. width: 100%;
  728. flex-direction: row;
  729. justify-content: space-between;
  730. margin-top: 15px;
  731. }
  732. .orderImg {
  733. width: 85px;
  734. height: 85px;
  735. margin-left: 20px;
  736. }
  737. .orderLeft {
  738. margin-left: 20px;
  739. font-size: 13px;
  740. }
  741. .orderRight {
  742. margin-right: 20px;
  743. font-size: 14px;
  744. font-weight: 500;
  745. }
  746. .detail {
  747. display: flex;
  748. flex-direction: column;
  749. margin-top: 15px;
  750. margin-right: 20px;
  751. margin-bottom: 15px;
  752. margin-left: 20px;
  753. color: #818489;
  754. font-size: 13px;
  755. }
  756. .orderDetail {
  757. display: flex;
  758. height: 85px;
  759. flex-direction: column;
  760. justify-content: space-between;
  761. margin-right: 15px;
  762. margin-left: 15px;
  763. text-align: left;
  764. }
  765. .pTitle {
  766. color: #595a5b;
  767. font-size: 14px;
  768. text-align: left;
  769. }
  770. .colorType {
  771. color: #818489;
  772. font-size: 12px;
  773. text-align: left;
  774. }
  775. .payView {
  776. display: flex;
  777. flex-direction: row;
  778. justify-content: space-between;
  779. }
  780. .payPrice {
  781. color: red;
  782. font-size: 16px;
  783. text-align: left;
  784. }
  785. .stepper {
  786. display: flex;
  787. width: 100px;
  788. height: 20px;
  789. flex-direction: row;
  790. background: white;
  791. border-radius: 3px;
  792. }
  793. /* 加号和减号 */
  794. .stepper .sign {
  795. width: 40px;
  796. float: left;
  797. line-height: 20px;
  798. text-align: center;
  799. }
  800. /* 数值 */
  801. .stepper .number {
  802. width: 45px;
  803. height: 20px;
  804. margin: 0 auto;
  805. background-color: #ecf1f4;
  806. color: #000;
  807. float: left;
  808. font-size: 15px;
  809. text-align: center;
  810. }
  811. /* 普通样式 */
  812. .sign_normal {
  813. width: 30px;
  814. color: black;
  815. float: left;
  816. line-height: 20px;
  817. text-align: center;
  818. }
  819. /* 禁用样式 */
  820. .sign_disabled {
  821. width: 30px;
  822. color: #ccc;
  823. float: left;
  824. line-height: 20px;
  825. text-align: center;
  826. }
  827. .logo {
  828. width: 100px;
  829. height: 100px;
  830. margin-top: 100px;
  831. margin-right: auto;
  832. margin-bottom: 25px;
  833. margin-left: auto;
  834. }
  835. .text-area {
  836. display: flex;
  837. justify-content: center;
  838. }
  839. .title {
  840. color: #8f8f94;
  841. font-size: 18px;
  842. }
  843. .btnView {
  844. display: flex;
  845. width: 80%;
  846. height: 33px;
  847. justify-content: center;
  848. border: #1296db solid 1px;
  849. margin-top: 30px;
  850. border-radius: 10px;
  851. color: #366092;
  852. line-height: 33px;
  853. }
  854. .cashier_footer {
  855. position: fixed;
  856. z-index: 10;
  857. bottom: 0;
  858. left: 0;
  859. display: flex;
  860. width: 100%;
  861. flex-direction: column;
  862. align-items: center;
  863. padding-bottom: 5px;
  864. background-color: #fff;
  865. text-align: center;
  866. }
  867. .cashier_payBtn-order {
  868. width: 113px;
  869. height: 44px;
  870. background: rgb(133, 133, 133);
  871. color: rgba(255, 255, 255, 0.85);
  872. cursor: pointer;
  873. font-size: 16px;
  874. line-height: 44px;
  875. }
  876. .footerPay {
  877. display: flex;
  878. width: calc(100vw - 40px);
  879. height: 44px;
  880. flex-direction: row;
  881. align-items: center;
  882. justify-content: space-between;
  883. margin-bottom: 20px;
  884. }
  885. .payPrice {
  886. display: flex;
  887. flex-direction: row;
  888. align-items: center;
  889. justify-content: flex-start;
  890. color: red;
  891. font-size: 12px;
  892. }
  893. </style>
  894. </head>
  895. <body>
  896. <div class="h5Container">
  897. <div class="cashier_logo">
  898. <img class="cashier_logoImg" src="img/logo.png" alt="Logo" title="Logo" />
  899. </div>
  900. <div class="cashier_price">
  901. <span>¥</span>
  902. <span class="cashier_priceNumber" id="cashier_priceNumber">793.21</span>
  903. </div>
  904. <div class="cashier_payTimeRemaining">
  905. <span class="cashier_payTxt">支付剩余时间</span>
  906. <span class="cashier_time">
  907. <span class="cashier_timeItem" id="pay_minute">05</span><span
  908. class="cashier_timeSplit">:</span><span class="cashier_timeItem" id="pay_second">00</span>
  909. </span>
  910. </div>
  911. <div class="cashier_order">
  912. <span class="cashier_orderTxt">订单编号:</span>
  913. <span class="cashier_orderNumber" id="cashier_orderNumber">207084835060</span>
  914. </div>
  915. <div class="cashier_cashierDivider"></div>
  916. <div class="cashier_payType">
  917. <div class="cashier_payTypeTitle">选择支付方式</div>
  918. <ul class="checkout-list">
  919. <li class="checkout-list-item" id="alipayItem">
  920. <div class="checkout-list-item-inner">
  921. <img class="checkout-payIcon" src="img/alipay.png" />
  922. <span class="checkout-pay-title">支付宝</span>
  923. <span style="--theme: #e74e4e" class="checkout-recommend">推荐</span>
  924. </div>
  925. <input style="--theme: #0B5AFE" class="checkout-radio" type="radio" name="radio"
  926. id="alipayInput" />
  927. </li>
  928. <li class="checkout-list-item" id="wxpayItem">
  929. <div class="checkout-list-item-inner">
  930. <img class="checkout-payIcon" src="img/wxpay.png" />
  931. <span class="checkout-pay-title">微信支付</span>
  932. <span style="--theme: #e74e4e" class="checkout-recommend">推荐</span>
  933. </div>
  934. <input style="--theme: #0B5AFE" class="checkout-radio" type="radio" name="radio"
  935. id="wxpayInput" />
  936. </li>
  937. <li class="checkout-list-item" id="unionpayItem">
  938. <div class="checkout-list-item-inner">
  939. <img class="checkout-payIcon" src="img/unionpay.png" />
  940. <span class="checkout-pay-title">银联</span>
  941. <span style="--theme: #e74e4e" class="checkout-recommend">推荐</span>
  942. </div>
  943. <input style="--theme: #0B5AFE" class="checkout-radio" type="radio" name="radio"
  944. id="unionpayInput" />
  945. </li>
  946. <li class="checkout-list-item" id="huabeipayItem">
  947. <div class="checkout-list-item-inner">
  948. <img class="checkout-payIcon" src="img/huabeipay.png" />
  949. <span class="checkout-pay-title">花呗分期</span>
  950. <span style="--theme: #e74e4e" class="checkout-recommend">推荐</span>
  951. </div>
  952. <input style="--theme: #0B5AFE" class="checkout-radio" type="radio" name="radio"
  953. id="huabeipayInput" />
  954. </li>
  955. <li class="checkout-list-item" id="bankpayItem">
  956. <div class="checkout-list-item-inner">
  957. <img class="checkout-payIcon" src="img/bankpay.png" />
  958. <span class="checkout-pay-title">银行卡分期</span>
  959. <span style="--theme: #e74e4e" class="checkout-recommend">推荐</span>
  960. </div>
  961. <input style="--theme: #0B5AFE" class="checkout-radio" type="radio" name="radio"
  962. id="bankpayInput" />
  963. </li>
  964. </ul>
  965. </div>
  966. <div class="cashier_footer">
  967. <div class="cashier_payBtn" id="pay-button" style="background: #0B5AFE">
  968. 支付¥<span id="pay_amount">793.21</span>
  969. </div>
  970. <div class="cashier_brand">
  971. <img class="cashier_brandImg" src="img/defaultLogo.png" alt="" />
  972. <span class="cashier_brandtxt">提供技术支持</span>
  973. </div>
  974. </div><!-- 超时提醒 -->
  975. <div class="dialogMask hide" id="timeoutRemind">
  976. <div class="confirmDialog">
  977. <div class="confirmHeader">订单已取消</div>
  978. <div class="confimContent">
  979. <p class="contentTxt">交易超时已关闭,请重新下单支付。</p>
  980. </div>
  981. <div class="confimFooter">
  982. <div id="continuePayBtn" class="confimBtn payBtn" style="color: #0B5AFE">
  983. 重新下单
  984. </div>
  985. </div>
  986. </div>
  987. </div>
  988. <!-- 取消支付 -->
  989. <div class="cancelMask hide" id="cancelPay">
  990. <div class="confirmDialog">
  991. <div class="confirmHeader">确定离开收银台?</div>
  992. <div class="confimContent">
  993. <p class="contentTxt">订单尚未完成支付,请尽快支付。</p>
  994. </div>
  995. <div class="confimFooter">
  996. <div class="confimBtn" id="confirmLeaveBtn">确认离开</div>
  997. <div id="continuePay" class="confimBtn payBtn" style="color: #0B5AFE">
  998. 继续支付
  999. </div>
  1000. </div>
  1001. </div>
  1002. </div>
  1003. <!-- loading -->
  1004. <div class="loadingMask hide" id="loadingMask">
  1005. <div class="content">
  1006. <img class="loadingImg" src="img/loading.png" alt="" />
  1007. <div class="loadingTxt">处理中,请耐心等待</div>
  1008. </div>
  1009. </div>
  1010. <!-- 页面初始化loading -->
  1011. <div class="pageLoadingMask" id="pageLoadingMask">
  1012. <img class="pageLoadingImg" src="img/loading.png" alt="" />
  1013. <div class="pageLoadingText">加载中...</div>
  1014. </div>
  1015. </div>
  1016. </body>
  1017. <script src="https://cdn.cloudpnr.com/opps/libs/jquery/jquery-2.1.2.min.js"></script>
  1018. <script src="https://cdn.cloudpnr.com/opps/libs/vconsole/vconsole-3.4.0.min.js"></script>
  1019. <script src="https://cdn.cloudpnr.com/opps/libs/axios/axios-0.21.1.min.js"></script>
  1020. <script src="https://cdn.cloudpnr.com/opps/libs/dayjs/dayjs-1.10.4.min.js"></script>
  1021. <script src="https://cdn.cloudpnr.com/opps/libs/fastclick/fastclick-1.0.6.min.js"></script>
  1022. <script src="./monitor.js"></script>
  1023. <script src="./config/index.js"></script>
  1024. <script src="./http.js"></script>
  1025. <script src="./util.js"></script>
  1026. <script>
  1027. window.addEventListener('load', () => {
  1028. const state = {
  1029. title: 'init',
  1030. url: '#'
  1031. };
  1032. window.history.pushState(state, 'init', '#');
  1033. });
  1034. window.addEventListener('popstate', () => {
  1035. $('#cancelPay').show();
  1036. });
  1037. function jumpLink(urlName) {
  1038. const origin = location.origin;
  1039. const pathname = location.pathname;
  1040. const urlAry = pathname.split('/');
  1041. urlAry.pop();
  1042. urlAry.push(urlName);
  1043. const urlStr = urlAry.join('/');
  1044. const link = origin + urlStr;
  1045. return link;
  1046. }
  1047. let totalPrice = GetQueryString('price');
  1048. $('#cashier_priceNumber').text(totalPrice);
  1049. $('#pay_amount').text(totalPrice);
  1050. // 取消支付,返回商品确认页面,修复微信中无法返回上一页
  1051. $('#confirmLeaveBtn').click(function() {
  1052. location.href = jumpLink('goodsDetail.html');
  1053. });
  1054. $('#continuePay').click(function() {
  1055. $('#cancelPay').hide();
  1056. });
  1057. var mer_ord_id = dayjs().format('YYYYMMDDHHmmssSSS') + '' + randomNum(100, 999);
  1058. localStorage.setItem('mer_ord_id', mer_ord_id);
  1059. $('#cashier_orderNumber').text(localStorage.getItem('mer_ord_id'));
  1060. </script>
  1061. <script src="./pay.js"></script>
  1062. </html>