123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8" />
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
- <meta
- name="viewport"
- content="width=device-width, initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0"
- />
- <title>支付结果</title>
- <script>
- (function (WIN) {
- var setFontSize = (WIN.setFontSize = function (_width) {
- var docEl = document.documentElement;
- // 获取当前窗口的宽度
- var width = _width || docEl.clientWidth || docEl.getBoundingClientRect().width;
- if (width > 420) {
- width = 420;
- }
- // 在375px上,1rem = 20px
- var rem = width / 18.75;
- docEl.style.fontSize = rem + 'px';
- // 部分机型上的误差、兼容性处理
- var actualSize =
- WIN.getComputedStyle && parseFloat(WIN.getComputedStyle(docEl)['font-size']);
- if (actualSize !== rem && actualSize > 0 && Math.abs(actualSize - rem) > 1) {
- var remScaled = (rem * rem) / actualSize;
- docEl.style.fontSize = rem + 'px';
- }
- });
- var timer;
- //函数节流
- function dbcRefresh() {
- clearTimeout(timer);
- timer = setTimeout(setFontSize, 100);
- }
- //窗口更新动态改变 font-size
- WIN.addEventListener('resize', dbcRefresh, false);
- //页面显示时计算一次
- WIN.addEventListener(
- 'pageshow',
- function (e) {
- if (e.persisted) {
- dbcRefresh();
- }
- },
- false
- );
- setFontSize();
- })(window);
- </script>
- <script src="./util.js"></script>
- <style>
- @media only screen and (min-width: 400px) {
- body {
- font-size: 21.33333333px !important;
- }
- }
- @media only screen and (min-width: 414px) {
- body {
- font-size: 21px !important;
- }
- }
- @media only screen and (min-width: 480px) {
- body {
- font-size: 25.6px !important;
- }
- }
- * {
- padding: 0;
- margin: 0;
- }
- body,
- html {
- height: 100%;
- width: 100%;
- background: #ffffff;
- }
- .h5Container {
- width: 100%;
- max-width: 18.75rem;
- margin: 0 auto;
- height: 100%;
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- text-align: center;
- box-sizing: border-box;
- font-size: 0.7rem;
- }
- .mb16 {
- margin-bottom: 2rem;
- }
- .headerTitle {
- padding-top: 2.7rem;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 0.9rem;
- font-weight: 500;
- height: 2.2rem;
- line-height: 2.2px;
- color: #050505;
- }
- .el-icon-close {
- position: absolute;
- left: 0.8rem;
- top: 3rem;
- width: 0.7rem;
- height: 0.7rem;
- opacity: 1;
- color: rgba(0, 0, 0, 0.45);
- }
- .divider {
- height: 1px;
- background: rgba(0, 0, 0, 0.04);
- }
- .logo {
- margin-bottom: 1.5rem;
- padding-top: 2rem;
- display: flex;
- flex-direction: column;
- }
- .logoImg {
- object-fit: contain;
- height: 2rem;
- margin-bottom: 1rem;
- }
- .successTip {
- height: 1.2rem;
- opacity: 1;
- font-size: 0.8rem;
- font-family: PingFangSC, PingFangSC-Semibold;
- font-weight: 600;
- text-align: center;
- color: #0b5afe;
- line-height: 1.2rem;
- }
- .price {
- font-size: 20px;
- color: #333333;
- }
- .priceNumber {
- font-size: 1.2rem;
- font-weight: 700;
- margin-left: 0.2rem;
- font-family: DINAlternate, DINAlternate-Bold;
- }
- .payTxt {
- color: rgba(0, 0, 0, 0.65);
- margin-right: 0.4rem;
- }
- .time {
- color: rgba(0, 0, 0, 0.65);
- font-weight: 500;
- }
- .timeItem {
- background: rgba(0, 0, 0, 0.04);
- border-radius: 0.1rem;
- padding: 0.1rem;
- }
- .timeSplit {
- margin: 0 0.2rem;
- }
- .order {
- color: rgba(0, 0, 0, 0.65);
- margin-bottom: 0.8rem;
- margin-left: 1.5rem;
- margin-right: 1.5rem;
- text-align: left;
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- .orderTxt {
- opacity: 1;
- font-size: 0.7rem;
- font-family: MicrosoftYaHei, MicrosoftYaHei-Regular;
- font-weight: 400;
- text-align: right;
- color: #22242e;
- }
- .orderTxt_l {
- opacity: 1;
- font-size: 0.7rem;
- font-family: MicrosoftYaHei, MicrosoftYaHei-Regular;
- font-weight: 400;
- text-align: left;
- color: #6c6e75;
- }
- .payType {
- text-align: left;
- box-sizing: border-box;
- }
- .checkout-list-item {
- display: flex;
- align-items: center;
- padding: 0.75rem 0;
- margin: 0 0.8rem;
- border-bottom: 1px solid rgba(0, 0, 0, 0.04);
- justify-content: space-between;
- }
- .checkout-list-item-inner {
- display: flex;
- align-items: center;
- }
- .checkout-payIcon {
- margin-right: 0.8rem;
- }
- .checkout-pay-title {
- margin-right: 0.75rem;
- }
- .checkout-recommend {
- width: 2rem;
- height: 1.2rem;
- border: 1px solid var(--theme);
- border-radius: 0.1rem;
- color: var(--theme);
- font-weight: 400;
- font-size: 0.6rem;
- line-height: 1.2rem;
- text-align: center;
- }
- .checkout-list-item:last-of-type {
- border-bottom: none;
- }
- .checkout-radio {
- width: 0.8rem;
- height: 0.8rem;
- background-color: #ffffff;
- border: solid 1px #dddddd;
- -webkit-border-radius: 50%;
- border-radius: 50%;
- font-size: 0.7rem;
- margin: 0;
- padding: 0;
- position: relative;
- display: inline-block;
- vertical-align: top;
- cursor: default;
- -webkit-appearance: none;
- -webkit-user-select: none;
- user-select: none;
- -webkit-transition: background-color ease 0.1s;
- transition: background-color ease 0.1s;
- }
- .checkout-radio:checked {
- background-color: var(--theme);
- border: solid 1px var(--theme);
- text-align: center;
- background-clip: padding-box;
- }
- .checkout-radio:checked:before,
- .checkout-radio.checkout-checked:before,
- .checkout-radio:checked:after,
- .checkout-radio.checkout-checked:after {
- content: '';
- width: 0.4rem;
- height: 0.25rem;
- position: absolute;
- top: 50%;
- left: 50%;
- margin-left: -0.2rem;
- margin-top: -0.15rem;
- background: transparent;
- border: 1px solid #ffffff;
- border-top: none;
- border-right: none;
- z-index: 2;
- -webkit-border-radius: 0;
- border-radius: 0;
- -webkit-transform: rotate(-45deg);
- transform: rotate(-45deg);
- }
- .title {
- font-weight: 500;
- padding: 0.8rem 0 0.8rem 0.8rem;
- }
- .payTxt {
- margin: 0 0.8rem;
- }
- .footer {
- position: absolute;
- bottom: 1.7rem;
- left: 0;
- width: 100%;
- z-index: 10;
- text-align: center;
- display: flex;
- flex-direction: column;
- align-items: center;
- cursor: pointer;
- }
- .payBtn {
- width: 18rem;
- height: 2.5rem;
- background: #5568d5;
- border-radius: 0.2rem;
- color: rgba(255, 255, 255, 0.85);
- line-height: 2.5rem;
- margin-bottom: 0.8rem;
- border: none;
- cursor: pointer;
- appearance: none;
- }
- .brand {
- display: flex;
- align-items: center;
- width: 100%;
- justify-content: center;
- }
- .brandImg {
- height: 1rem;
- min-height: 0.8rem;
- object-fit: contain;
- margin-right: 0.3rem;
- }
- .brandtxt {
- font-size: 0.6rem;
- color: rgba(0, 0, 0, 0.45);
- }
- </style>
- </head>
- <body>
- <div class="h5Container">
- <div class="logo">
- <img class="logoImg" src="img/success1.png" alt="Logo" />
- <div class="successTip">支付成功</div>
- </div>
- <div class="price mb16">
- <span>¥</span>
- <span class="priceNumber" id="priceNumber">793.21</span>
- </div>
- <div class="order">
- <span class="orderTxt">订单编号</span>
- <span class="orderTxt" id="orderId">207084835060</span>
- </div>
- <div class="order">
- <span class="orderTxt">支付时间</span>
- <span class="orderTxt" id="payTime">2021-06-25 11:21</span>
- </div>
- <div class="order">
- <span class="orderTxt">支付方式</span>
- <span class="orderTxt" id="payType">微信支付</span>
- </div>
- <div class="footer">
- <div onClick="toHome()" style="background-color: #0B5AFE" class="payBtn">
- 返回商家
- </div><div class="brand">
- <img class="brandImg" src="img/defaultLogo.png" alt="logo" title="logo" />
- <span class="brandtxt">提供技术支持</span>
- </div></div>
- </div>
- </body>
- <script src="https://cdn.cloudpnr.com/opps/libs/jquery/jquery-2.1.2.min.js"></script>
- <script src="https://cdn.cloudpnr.com/opps/libs/dayjs/dayjs-1.10.4.min.js"></script>
- <script src="./config/index.js"></script>
- <script>
- function toHome() {
- var backHomeUrl = configObj.mobile.backHomeUrl;
- location.href = backHomeUrl ? backHomeUrl : jumpLink('goodsDetail.html');
- }
- function jumpLink(urlName) {
- const origin = location.origin;
- const pathname = location.pathname;
- const urlAry = pathname.split('/');
- urlAry.pop();
- urlAry.push(urlName);
- const urlStr = urlAry.join('/');
- const link = origin + urlStr;
- return link;
- }
- window.addEventListener('load', () => {
- const state = { title: 'init', url: '#' };
- window.history.pushState(state, 'init', '#');
- });
- window.addEventListener('popstate', () => {
- toHome();
- });
- $(function () {
- var price = GetQueryString('price');
- var mer_ord_id = localStorage.getItem('mer_ord_id');
- var payTime = dayjs(localStorage.getItem('end_time')).format('YYYY-MM-DD HH:mm:ss');
- $('#priceNumber').text(price);
- $('#orderId').text(mer_ord_id);
- $('#payTime').text(payTime);
- var payTypeText = isInWeiXinApp ? '微信支付' : isInUnionApp ? '云闪付' : '支付宝';
- $('#payType').text(payTypeText);
- });
- </script>
- </html>
|