|
@@ -1,146 +0,0 @@
|
|
|
-<html>
|
|
|
-<head>
|
|
|
- <meta charset="utf-8">
|
|
|
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
- <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
|
|
- <link rel="shortcut icon" type="image/x-icon" href="./../favicon.ico">
|
|
|
- <title>城市智慧停车中转页面</title>
|
|
|
- <style type="text/css">
|
|
|
- html,
|
|
|
- body,
|
|
|
- div {
|
|
|
- margin: 0;
|
|
|
- padding: 0;
|
|
|
- }
|
|
|
- .container {
|
|
|
- height: calc(100% - 26vh);
|
|
|
- padding: 13vh 0;
|
|
|
- text-align: center;
|
|
|
- background: linear-gradient(138deg, #7EBAB8 0%, #48999A 100%);
|
|
|
- box-shadow: 0px 2px 4px 0px #0B7C7D;
|
|
|
- }
|
|
|
- .text-img {
|
|
|
- height: 21vh;
|
|
|
- background-size: contain;
|
|
|
- background-repeat: no-repeat;
|
|
|
- background-position: center center;
|
|
|
- background-image: url('./../img/text-html-bg.png');
|
|
|
- }
|
|
|
- .car-img {
|
|
|
- height: 40vh;
|
|
|
- margin-top: 39px;
|
|
|
- background-size: contain;
|
|
|
- background-repeat: no-repeat;
|
|
|
- background-position: 19px center;
|
|
|
- background-image: url('./../img/car-html-bg.png');
|
|
|
- }
|
|
|
- .button {
|
|
|
- width: calc(100% - 84px);
|
|
|
- height: 6vh;
|
|
|
- margin-top: 4vh;
|
|
|
- outline: none;
|
|
|
- border: none;
|
|
|
- background: #FFFFFF;
|
|
|
- box-shadow: 0px 7px 13px 0px rgba(0, 105, 106, 0.26);
|
|
|
- border-radius: 10px;
|
|
|
- font-size: 1.1em;
|
|
|
- font-weight: 500;
|
|
|
- color: #1D8587;
|
|
|
- font-family: 'PingFangSC-Medium, PingFang SC';
|
|
|
- }
|
|
|
- </style>
|
|
|
-</head>
|
|
|
-<body>
|
|
|
- <div class="container">
|
|
|
- <div class="text-img"></div>
|
|
|
- <div class="car-img"></div>
|
|
|
- <button type="button" class="button" onclick="goToBgzchina()">回到普定智慧停车</button>
|
|
|
- </div>
|
|
|
- <!-- <script type="text/javascript" src="https://cdn.bootcss.com/vConsole/3.3.0/vconsole.min.js"></script> -->
|
|
|
- <script type="text/javascript" src="https://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
|
|
|
- <script type="text/javascript" charset="UTF-8" src="https://wx.gtimg.com/pay_h5/goldplan/js/jgoldplan-1.0.0.js"></script>
|
|
|
- <script>
|
|
|
- // 测试环境
|
|
|
- // const baseUrl = 'https://wx.hw.hongweisoft.com/parking'
|
|
|
- // 正式环境
|
|
|
- const baseUrl = 'https://parking.pdzhtc.com'
|
|
|
-
|
|
|
- // 初始化console.log(?)
|
|
|
- // const vConsole = new VConsole();
|
|
|
-
|
|
|
- // 尽量在页面加载完成后实现“点金计划”的相关代码
|
|
|
- // 函数-获取返回页面参数
|
|
|
- function getParameters(key) {
|
|
|
- const params = window.location.search.substring(1);
|
|
|
- const vars = params.split("&");
|
|
|
- for (let i = 0; i < vars.length; i++) {
|
|
|
- const kvPair = vars[i].split("=");
|
|
|
- if (kvPair[0] == key) return kvPair[1];
|
|
|
- }
|
|
|
- return null;
|
|
|
- };
|
|
|
- // end getParameters(key)
|
|
|
-
|
|
|
- //测试微信通知过来的参数【非必需】
|
|
|
- var sub_mch_id = getParameters("sub_mch_id"); //特约商户号
|
|
|
- console.log("1、特约商户号=" + sub_mch_id);
|
|
|
- var out_trade_no = getParameters("out_trade_no"); //商户订单号
|
|
|
- console.log("2、商户订单号=" + out_trade_no);
|
|
|
- var check_code = getParameters("check_code"); //md5校验码。如果需要计算(参考说明文档)校验则需要后台完成
|
|
|
- console.log("3、md5校验码=" + check_code);
|
|
|
- // 跳转地址
|
|
|
- let jump_url = 'https://h5.pdzhtc.com'
|
|
|
- if (out_trade_no) {
|
|
|
- getOrderId(out_trade_no)
|
|
|
- }
|
|
|
- //初始化微信点金计划小票【必需,否则在微信不能展示该页面】
|
|
|
- let mchData = {
|
|
|
- action: 'onIframeReady',
|
|
|
- displayStyle: 'SHOW_CUSTOM_PAGE',
|
|
|
- height: 960,
|
|
|
- };
|
|
|
- //高度可选(参考说明文档)
|
|
|
- const postData = JSON.stringify(mchData);
|
|
|
- parent.postMessage(postData, 'https://payapp.weixin.qq.com');
|
|
|
-
|
|
|
- //测试跳转到其他页面【非必需】
|
|
|
- function goToBgzchina() {
|
|
|
- const mchData = {
|
|
|
- action: 'jumpOut',
|
|
|
- jumpOutUrl: jump_url // 要跳转到的页面。注意:不支持跳转到小程序
|
|
|
- };
|
|
|
- const postData = JSON.stringify(mchData);
|
|
|
- parent.postMessage(postData, 'https://payapp.weixin.qq.com');
|
|
|
- }
|
|
|
- // end goToBgzchina
|
|
|
-
|
|
|
- // 通过商户订单号获取跳转地址
|
|
|
- function getOrderId(id) {
|
|
|
- const localToken = JSON.parse(localStorage.getItem('lifeData') ?? '{}')
|
|
|
- const token = localToken?.data?.vuex_token
|
|
|
- $.ajax({
|
|
|
- //请求方式
|
|
|
- type : "get",
|
|
|
- //请求地址
|
|
|
- url : baseUrl + '/client/orderinfo/orderListByPoly/' + id,
|
|
|
- // token
|
|
|
- beforeSend: function(request) {
|
|
|
- request.setRequestHeader("Authorization", 'Bearer ' + token);
|
|
|
- },
|
|
|
- //请求成功
|
|
|
- success: function(result) {
|
|
|
- if (result.code === 200) {
|
|
|
- jump_url = result?.data?.jumpUrl ?? 'https://h5.pdzhtc.com'
|
|
|
- } else {
|
|
|
- alert(result.msg)
|
|
|
- }
|
|
|
- },
|
|
|
- //请求失败,包含具体的错误信息
|
|
|
- error: function(e){
|
|
|
- alert('程序错误!')
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
- </script>
|
|
|
-</body>
|
|
|
-</html>
|