代码拉取完成,页面将自动刷新
<!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.8rem;
font-weight: 500;
height: 2.2rem;
line-height: 2.2px;
color: rgba(0, 0, 0, 0.85);
}
.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: 2rem;
padding-top: 4rem;
display: flex;
flex-direction: column;
}
.logoImg {
object-fit: contain;
height: 2.4rem;
margin-bottom: 1rem;
}
.failTip {
opacity: 1;
font-size: 0.8rem;
font-family: PingFangSC, PingFangSC-Semibold;
font-weight: 400;
text-align: center;
color: #e74e4e;
margin-bottom: 0.5rem;
}
.failInfo {
opacity: 1;
font-size: 0.7rem;
font-family: PingFangSC, PingFangSC-Regular;
font-weight: 400;
text-align: center;
color: #6c6e75;
line-height: 1.1rem;
letter-spacing: 1px;
}
.price {
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: 1rem;
margin-right: 1rem;
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;
font-family: MicrosoftYaHei, MicrosoftYaHei-Regular;
font-weight: 400;
text-align: left;
color: #999999;
}
</style>
</head>
<body>
<div class="h5Container">
<div class="logo">
<img class="logoImg" src="img/fail1.png" alt="Logo" />
<div class="failTip">支付失败</div>
<div class="failInfo">订单超时自动关闭,请重新发起支付。</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="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');
console.log('-log- ~ price', price);
var mer_ord_id = localStorage.getItem('mer_ord_id');
$('#priceNumber').text(price);
$('#orderId').text(mer_ord_id);
});
</script>
</html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。