From ddf3f6a379747aded64196c214e735825d23353f Mon Sep 17 00:00:00 2001
From: liuqimichale <123456lq>
Date: Thu, 16 Jul 2020 10:03:25 +0800
Subject: [PATCH] 支付宝
---
home.html | 2 +-
js/config.js | 6 ++++--
js/listnew.js | 4 ++--
js/pay.js | 24 +++++++++++++++---------
js/url.js | 2 +-
out.html | 2 +-
6 files changed, 24 insertions(+), 16 deletions(-)
diff --git a/home.html b/home.html
index 06f8861..5f5adc0 100644
--- a/home.html
+++ b/home.html
@@ -33,7 +33,7 @@
停车时长:
进场时间:
停车总费用:
- 商户优惠减免:
+
已支付金额:
优惠金额:
订单编号: 1234567890
diff --git a/js/config.js b/js/config.js
index f63db25..709360a 100644
--- a/js/config.js
+++ b/js/config.js
@@ -7,11 +7,13 @@ window.webAppH5 = {};
/*服务器地址*/
- var webAppRoot = "http://pay.service.huangshiparking.com";
+//
+// http://pay.service.huangshiparking.com
+ var webAppRoot = "http://pay.service.renniting.cn/v1";
//test 测试环境
// var webAppRoot = "http://39.98.54.240:8090";
//微信支付结果回调地址
-var webAppPayResult = "http://wxgzh.huangshiparking.com/HSwechat/PDA-Payment/wxpayResult.html";
+var webAppPayResult = "http://wxgzh.renniting.cn/xcscan/PDA-Payment/wxpayResult.html";
/*公共参数*/
webAppH5.comParams = {
diff --git a/js/listnew.js b/js/listnew.js
index 95e4da1..84eb2d6 100644
--- a/js/listnew.js
+++ b/js/listnew.js
@@ -403,8 +403,8 @@ function getOneorder(carNumber, parkCode, orderId, _paySrcType) {
+ '&appId=' + datas.appId
+ '&orderId=' + datas.orderId
+ '&_paySrcType=' + _paySrcType
- + "&businessUsedType=" + businessUsedType
- + "&businessFee=" + businessFee
+ // + "&businessUsedType=" + businessUsedType
+ // + "&businessFee=" + businessFee
console.log(src)
window.location.assign(encodeURI(src))
}, 100);
diff --git a/js/pay.js b/js/pay.js
index c3a0d4e..526e21b 100644
--- a/js/pay.js
+++ b/js/pay.js
@@ -8,6 +8,7 @@ var $btnObj = null;
var $btnLoad = null;
var flag = 0;
var appWxID = getQueryString(window.location).appId;
+
// var appWxID = 'wx945eccc8163fd75b'
var webAppCode = null;//如果是微信,先获取微信code
//var $btnLoad = document.getElementById("loading");
@@ -363,6 +364,7 @@ var webAppClass = {
getCode: function () {
var appID = appWxID;
var code = getUrlParam('code');
+
var local = window.location.href;
//alert("local:" + local);
if (code == null || code === '') {
@@ -470,6 +472,7 @@ var webAppClass = {
var btnOBj = $btnObj;
//0:页面初始化获取code[webAppCode]
var codeParams = { code: webAppCode, appId: appWxID };
+ alert('微信webAppCode'+webAppCode)
var openIdUrl = webAppRoot + window.webAppH5.wxGetOpenIdServer;
//1:有code获取OpenId
@@ -609,6 +612,9 @@ var webAppClass = {
btnOBj.style.display = "block";
$btnLoad.style.display = "none";
if (res.code == 0) {//进场
+ alert(res.data)
+ alert(JSON.stringify(res.data))
+
document.write(res.data);//打开支付表单
} else {//其他情况如【该卡号场内已存在】
console.log(res.message);
@@ -639,8 +645,8 @@ var webAppClass = {
$paid = getObjectByID("paid"),//已支付金额
$discountDesc = getObjectByID("discountDesc"),//8折优惠折扣费用
$discountFee = getObjectByID("discountFee");//优惠金额
- $businessFeeWrap = getObjectByID("businessFeeWrap")
- $businessFee = getObjectByID("businessFee")
+ // $businessFeeWrap = getObjectByID("businessFeeWrap")
+ // $businessFee = getObjectByID("businessFee")
if (params != null && params != "") {
var price = keepTwoDecimalFull((params.orderFee / 100));//(params.orderFee / 100);
@@ -655,13 +661,13 @@ var webAppClass = {
$inparktime.innerHTML = params.inparktime;
$staytime.innerHTML = formatSeconds(params.staytime);
// alert(params.parkName)
- // alert(params.businessFee)
- if (params.businessUsedType == 0) {
- $('#businessFeeWrap').css('display', 'none')
- } else {
- var _mon = Number(params.businessFee)
- $businessFee.innerHTML = '¥' + (_mon / 100).toFixed(2);
- }
+ // // alert(params.businessFee)
+ // if (params.businessUsedType == 0) {
+ // $('#businessFeeWrap').css('display', 'none')
+ // } else {
+ // var _mon = Number(params.businessFee)
+ // $businessFee.innerHTML = '¥' + (_mon / 100).toFixed(2);
+ // }
$due.innerHTML = keepTwoDecimalFull((params.due / 100));//停车总费用
$paid.innerHTML = keepTwoDecimalFull(params.paid / 100);
diff --git a/js/url.js b/js/url.js
index fbc2962..b876722 100644
--- a/js/url.js
+++ b/js/url.js
@@ -89,7 +89,7 @@ mUrl.getJx = function(){
// var cepath = 'http://39.98.54.240:8090';
-var cepath = 'http://pay.service.huangshiparking.com';
+var cepath = 'http://pay.service.renniting.cn/v1';
// http://pay.service.renniting.cn
// var cepath = 'http://39.98.54.240:8090'
// http://app.api.dyszt.com:8090
diff --git a/out.html b/out.html
index c8a9685..64e5b85 100644
--- a/out.html
+++ b/out.html
@@ -154,7 +154,7 @@
-
+
|
--
libgit2 0.21.4