From abaeb33eaabe8f9b340f68871699e486b59c0700 Mon Sep 17 00:00:00 2001 From: liuqimichale <123456lq> Date: Mon, 22 Jun 2020 10:31:24 +0800 Subject: [PATCH] 现在线上代码 --- MP_verify_RraH33H3qcFBr5f1.txt | 1 + home.html | 7 ++++--- img/default.png | Bin 0 -> 2127 bytes img/no.png | Bin 0 -> 19667 bytes img/ok.png | Bin 0 -> 29667 bytes img/zero.png | Bin 6553 -> 0 bytes js/ajax.js | 2 +- js/config.js | 6 +++--- js/list.js | 455 ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- js/listnew.js | 458 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ js/pay.js | 12 +++++++++++- js/url.js | 4 ++-- list.html | 6 +++--- listnew.html | 8 ++++---- out.html | 7 ++++--- wxpayResult.html | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ zeroout.html | 14 ++++++++------ 17 files changed, 577 insertions(+), 481 deletions(-) create mode 100644 MP_verify_RraH33H3qcFBr5f1.txt create mode 100644 img/default.png create mode 100644 img/no.png create mode 100644 img/ok.png mode change 100755 => 100644 img/zero.png delete mode 100644 js/list.js create mode 100644 js/listnew.js create mode 100644 wxpayResult.html diff --git a/MP_verify_RraH33H3qcFBr5f1.txt b/MP_verify_RraH33H3qcFBr5f1.txt new file mode 100644 index 0000000..589178a --- /dev/null +++ b/MP_verify_RraH33H3qcFBr5f1.txt @@ -0,0 +1 @@ +RraH33H3qcFBr5f1 \ No newline at end of file diff --git a/home.html b/home.html index df439ae..06f8861 100644 --- a/home.html +++ b/home.html @@ -33,6 +33,7 @@
停车时长:
进场时间:
停车总费用:
+
商户优惠减免:
已支付金额:
优惠金额:
订单编号: 1234567890
@@ -82,10 +83,10 @@ - - + + - + diff --git a/img/default.png b/img/default.png new file mode 100644 index 0000000..ba8a52b Binary files /dev/null and b/img/default.png differ diff --git a/img/no.png b/img/no.png new file mode 100644 index 0000000..42f5fef Binary files /dev/null and b/img/no.png differ diff --git a/img/ok.png b/img/ok.png new file mode 100644 index 0000000..58c5b50 Binary files /dev/null and b/img/ok.png differ diff --git a/img/zero.png b/img/zero.png old mode 100755 new mode 100644 index f733d9f..f733d9f Binary files a/img/zero.png and b/img/zero.png differ diff --git a/js/ajax.js b/js/ajax.js index 8a32d0a..e0e0345 100644 --- a/js/ajax.js +++ b/js/ajax.js @@ -1,4 +1,4 @@ -var jsajax = jsajax || {}; +var jsajax = jsajax || {}; //任你停赤峰 jsajax.appID = 'wx945eccc8163fd75b'; //获取openid diff --git a/js/config.js b/js/config.js index cc8cecf..f63db25 100644 --- a/js/config.js +++ b/js/config.js @@ -1,4 +1,4 @@ -/* +/* @songcxa @2018-12-14 @移动支付配置[配置项除ip地址外勿动] @@ -7,11 +7,11 @@ window.webAppH5 = {}; /*服务器地址*/ -var webAppRoot = "http://pay.service.renniting.cn/v1"; + var webAppRoot = "http://pay.service.huangshiparking.com"; //test 测试环境 // var webAppRoot = "http://39.98.54.240:8090"; //微信支付结果回调地址 -var webAppPayResult = "http://wxgzh.renniting.cn/wechatwuxi/DEV/Threewf/codepay/page/wxpayResult.html"; +var webAppPayResult = "http://wxgzh.huangshiparking.com/HSwechat/PDA-Payment/wxpayResult.html"; /*公共参数*/ webAppH5.comParams = { diff --git a/js/list.js b/js/list.js deleted file mode 100644 index 46b5028..0000000 --- a/js/list.js +++ /dev/null @@ -1,455 +0,0 @@ -function getQueryString(location) { - //var url = location.search; //获取url中"?"符后的字串 - var url = location.search; - var theRequest = new Object(); - if (url.indexOf("?") != -1) { - var str = url.substr(1); - strs = str.split("&"); - for (var i = 0; i < strs.length; i++) { - theRequest[strs[i].split("=")[0]] = decodeURIComponent(strs[i].split("=")[1]); - } - } else { - theRequest = null; - } - return theRequest; -} - - -var func ={ - openid:'', - token:'', - unpaid:'', - countType:'' - -}; - -var _carNumber = getQueryString(window.location).carNumber -console.log(_carNumber) -$('#payCarNum').text(_carNumber) - -/** - * @param {} second - * @return {} - * @desc 秒转化成dd hh:mm:ss - */ -var salt = jsajax.salt(32); -var sortd = [ - {keyname:'app_id',value:'0eca8f5373ca4866aec2f8e9d9367104'}, - {keyname:'deviceInfo',value:'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E'}, - {keyname:'salt',value:salt}, - {keyname:'sign_type',value:'md5'}, - {keyname:'token',value:'8957e613280b46f7ae8aaea71ed17353'}, - {keyname:'pageNum',value:1}, - {keyname:'pageSize',value:10}, - {keyname:'parkState',value:10}, - {keyname:'terminalSource',value:7}, - {keyname:'carNumber',value:_carNumber} -]; -var md5sign = jsajax.getsign(sortd); -var jsondata = { - app_id:"0eca8f5373ca4866aec2f8e9d9367104", - deviceInfo:"BC0703A4-AFB0-4B51-9089-9B7487C0CC6E", - salt:salt, - sign_type :"md5", - token:'8957e613280b46f7ae8aaea71ed17353', - pageNum:1, - pageSize:10, - parkState:10, - terminalSource:7, - carNumber:_carNumber, - sign:md5sign -} -console.log('停车记录传参 '+JSON.stringify(jsondata)); -jsajax.defaultReq( - mUrl.listServer, - JSON.stringify(jsondata), - function (data) { - console.log(data.data.dataList) - - var data = data.data.dataList; - if(data.length==0){ - $('#tip-title').text('暂无停车记录') - return - } - var htmls=''; - for (var i=0;i parkDuration) { - htmls += '
' + - '
' + - '
' + - '

' + data[i].carNumber + '

' + - ' ' + - // ' ' + - - '
' + - '
' + - '
' + - '
' + - '
' + - '

停车场名称:' + data[i].parkName + '

' + - '

进场时间:' + data[i].parkInTime + '

' + - '

出场时间:' + data[i].parkOutTime + '

' + - '

停车时长:' + dateFormat(data[i].parkDuration) + '

' + - '
' + - '
' + - '

' + num + '

' + - '

申请离场' + - ' ' + - '

' + - '
' + - '
' + - '
'; - } else { - htmls += '
' + - '
' + - '
' + - '

' + data[i].carNumber + '

' + - ' ' + - // ' ' + - - '
' + - '
' + - '
' + - '
' + - '
' + - '

停车场名称:' + data[i].parkName + '

' + - '

进场时间:' + data[i].parkInTime + '

' + - '

出场时间:' + data[i].parkOutTime + '

' + - '

停车时长:' + dateFormat(data[i].parkDuration) + '

' + - '
' + - '

' + num + '

' + - '

出场缴费' + - ' ' + - '

' + - '
' + - '
' + - '
'; - } - - } else { - htmls += '
' + - '
' + - '
' + - '

' + data[i].carNumber + '

' + - ' ' + - // ' ' + - - '
' + - '
' + outflag + '
' + - '
' + - '
' + - '
' + - '

停车场名称:' + data[i].parkName + '

' + - '

进场时间:' + data[i].parkInTime + '

' + - '

出场时间:' + data[i].parkOutTime + '

' + - '

停车时长:' + dateFormat(data[i].parkDuration) + '

' + - '
' + - '

' + num + '

' + - '

清缴欠费' + - ' ' + - '

' + - '
' + - '
' + - '
'; - } - // if(outflag=='出场缴费'){ - // outflag = '' - // } - - } - $('#pay_listcont').append(htmls); - - // alert(data.message) - - - }) - - -var dateFormat = function(msd){ - var time =msd - - if (null != time && "" != time) { - - if (time > 60 && time < 60 * 60) { - - time = parseInt(time / 60.0) + "分钟" + parseInt((parseFloat(time / 60.0) - - - parseInt(time / 60.0)) * 60) + "秒"; - - } - - else if (time >= 60 * 60 && time < 60 * 60 * 24) { - - time = parseInt(time / 3600.0) + "小时" + parseInt((parseFloat(time / 3600.0) - - - parseInt(time / 3600.0)) * 60) + "分钟" + - - parseInt((parseFloat((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60) - - - parseInt((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60)) * 60) + "秒"; - - } else if (time >= 60 * 60 * 24) { - - time = parseInt(time / 3600.0/24) + "天" +parseInt((parseFloat(time / 3600.0/24)- - - parseInt(time / 3600.0/24))*24) + "小时" + parseInt((parseFloat(time / 3600.0) - - - parseInt(time / 3600.0)) * 60) + "分钟" + - - parseInt((parseFloat((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60) - - - parseInt((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60)) * 60) + "秒"; - - } - - else { - - time = parseInt(time) + "秒"; - - } - - } - - return time; -}; - - -$(document).on('click','.weui-cells',function () { - console.log($(this).attr('data-flag')) - var flag = $(this).attr('data-flag') - if(flag == 0){ - - }else{ - var money = $(this).find('.paymoney').text() - - var carNumber = $(this).find('.carNumber').text() - //var parkCode = $(this).find('.parkCode').text() - var orderId = $(this).find('.orderId').text() - var parkCode= $(this).find('.parkCode').text() - // var carNumber = $(this).find('.carNumber').text() - var paySrcType = $(this).find('.paySrcType').text() - if(paySrcType == '欠费'){ - paySrcType = 103 - }else{ - paySrcType = 101 - } - localStorage.setItem('paySrcType',paySrcType) - localStorage.setItem('parkCode',parkCode) - - getOneorder(carNumber,parkCode,orderId,paySrcType) - } - - - -}) - -$(document).on('click','.out-btn',function () { - var _this = $(this).parent().parent().parent(); - - var money = _this.find('.paymoney').text() - console.log(money) - var _orderId = _this.find('.orderId').text() - - var carNumber = _this.find('.carNumber').text() - //var parkCode = $(this).find('.parkCode').text() - // var orderId = _this.find('.orderId').text() - var parkCode= _this.find('.parkCode').text() - // var carNumber = $(this).find('.carNumber').text() - - var paySrcType = _this.find('.paySrcType').text() - var paySrcType = '101' - - // if(paySrcType == ''){ - // paySrcType = 103 - // }else{ - // paySrcType = 101 - // } - // alert(paySrcType) - console.log(paySrcType) - localStorage.setItem('paySrcType',paySrcType) - localStorage.setItem('parkCode',parkCode) - - - var salt = jsajax.salt(32); - var token = mUrl.GetToken(); - if (token == null) { - token = ''; - } - var jsondata = { - app_id: "0eca8f5373ca4866aec2f8e9d9367104", - deviceInfo: "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E", - salt: salt, - sign: getMd5sign(), - sign_type: "md5", - //token : token, - - //appId:jsajax.appID, - orderId: _orderId, - payOrderType: '101', - terminalSource: '3', - //parkCode:parkCode, - // carNumber:carNumber, - - } - jsajax.defaultReq( - cepath + '/appAccountPay/appApplyParkOut', - JSON.stringify(jsondata), - function (data) { - console.log(data) - - if(data.code=='5005'){ - getOneorder(carNumber,parkCode,_orderId) - - }else{ - //$('.dialog-out').show() - window.location.href='zeroout.html?carNumber='+carNumber - } - // alert(data.message) - - - }) - -}) -$('.close-btn').on('click',function () { - $('.dialog-out').hide() -}) - - -//查询单个待支付单费用 -function getOneorder(carNumber,parkCode,orderId,_paySrcType){ - //alert(_paySrcType) - // var salt = jsajax.salt(32); - // var token = mUrl.GetToken(); - - var salt = jsajax.salt(32); - var token = mUrl.GetToken(); - if (token == null) { - token = ''; - } - - var _payType = 0; - - - if (/MicroMessenger/.test(window.navigator.userAgent)) { - _payType = 4 - } else { - _payType = 1 - } - var jsondata = { - app_id: "0eca8f5373ca4866aec2f8e9d9367104", - deviceInfo : "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E", - salt : salt, - sign : getMd5sign(), - sign_type : "md5", - token : token, - payType:_payType, - paySrcType:_paySrcType, - appId:jsajax.appID, - orderId:orderId, - terminalSource:'7', - parkCode:parkCode, - carNumber:carNumber, - - } - console.log('查询单个的入参 '+JSON.stringify(jsondata)+" 请求的接口"+mUrl.oneCardorder); - jsajax.defaultReq( - mUrl.oneCardorder, - JSON.stringify(jsondata), - function(data){ - console.log(data) - console.log('获取单个待支付订单 '+JSON.stringify(data)); - if(data.code=='0'){ - //setdiv(); - setTimeout(function(){ - var datas = data.data - console.log(datas) - var discountFee = datas.discountFee;//已优惠 - var discountDesc = datas.discountDesc;//已优惠 - var parkCode = datas.parkCode; - var no = datas.orderId;//.no;//订单id - var inparktime = datas.inparktime;//.inparktime;//进场时间 - var plateno = datas.plateno;//车牌号 - var parkName = datas.parkName;//停车场名称 - var staytime = datas.staytime;//停车时长 - var due = datas.due;//总计费用 - var unpaid = datas.unpaid;//待支付 - var paid = datas.paid;//实付 - var discountType = datas.discountType; - - if(datas.discountFee&&datas.discountFee!=''&&datas.discountFee!=undefined){ - discountFee = datas.discountFee;//已优惠 - if(datas.discountDesc&&datas.discountDesc!=''&&datas.discountDesc!=undefined){ - discountDesc = datas.discountDesc;//已优惠 - } - } - - //console.log('-------------------------------'+discountType); - //查询到车牌号订单信息 - var src = 'home.html?carnum='+plateno - +"&inparktime="+inparktime - +"&parkName="+parkName - +"&staytime="+staytime - +"&due="+due - +"&unpaid="+unpaid - +"&paid="+paid - +"&no="+no - +"&disfee="+discountFee - +"&disdesc="+discountDesc - +'&discountType='+discountType - +'&parkCode='+parkCode - +'&orderId='+datas.orderId - +'&discountFee='+datas.discountFee - +'&parkOutTime='+datas.outtime - +'&orderFee='+datas.orderFee - +'&appOrderTimeout='+datas.appOrderTimeout - +'&appId='+datas.appId - +'&orderId='+datas.orderId - +'&_paySrcType='+_paySrcType - +"&"; - console.log(src) - window.location.assign(encodeURI(src)) - },100); - } - } - ) -} - - - - -function getMd5sign() -{ - var salt = jsajax.salt(32); - var token = mUrl.GetToken(); - if (token == null) { - token = ''; - } - var sortd = [ - {keyname:'app_id',value:'0eca8f5373ca4866aec2f8e9d9367104'}, - {keyname:'deviceInfo',value:'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E'}, - {keyname:'salt',value:salt}, - {keyname:'sign_type',value:'md5'}, - {keyname:'token',value:token} - ]; - var md5sign = jsajax.getsign(sortd); - return md5sign; - -} - - -$('.outBtn').on('click',function () { - //window.location.href = 'http://wxgzh.renniting.cn/wechatwuxi/Chifeng/Threewf/stoppayment/select.html' - window.location.href = 'http://wxgzh.renniting.cn/wechatwuxi/DEV/PDA-Payment/out.html' - -}) -$('.hiddenBtn').on('click',function () { - $('#strTip').hide() -}) - - diff --git a/js/listnew.js b/js/listnew.js new file mode 100644 index 0000000..25abafa --- /dev/null +++ b/js/listnew.js @@ -0,0 +1,458 @@ +function getQueryString(location) { + //var url = location.search; //获取url中"?"符后的字串 + var url = location.search; + var theRequest = new Object(); + if (url.indexOf("?") != -1) { + var str = url.substr(1); + strs = str.split("&"); + for (var i = 0; i < strs.length; i++) { + theRequest[strs[i].split("=")[0]] = decodeURIComponent(strs[i].split("=")[1]); + } + } else { + theRequest = null; + } + return theRequest; +} + + +var func ={ + openid:'', + token:'', + unpaid:'', + countType:'' + +}; + +var _carNumber = getQueryString(window.location).carNumber +console.log(_carNumber) +$('#payCarNum').text(_carNumber) + +/** + * @param {} second + * @return {} + * @desc 秒转化成dd hh:mm:ss + */ +var salt = jsajax.salt(32); +var sortd = [ + {keyname:'app_id',value:'0eca8f5373ca4866aec2f8e9d9367104'}, + {keyname:'deviceInfo',value:'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E'}, + {keyname:'salt',value:salt}, + {keyname:'sign_type',value:'md5'}, + {keyname:'token',value:'8957e613280b46f7ae8aaea71ed17353'}, + {keyname:'pageNum',value:1}, + {keyname:'pageSize',value:10}, + {keyname:'parkState',value:10}, + {keyname:'terminalSource',value:7}, + {keyname:'carNumber',value:_carNumber} +]; +var md5sign = jsajax.getsign(sortd); +var jsondata = { + app_id:"0eca8f5373ca4866aec2f8e9d9367104", + deviceInfo:"BC0703A4-AFB0-4B51-9089-9B7487C0CC6E", + salt:salt, + sign_type :"md5", + token:'8957e613280b46f7ae8aaea71ed17353', + pageNum:1, + pageSize:10, + parkState:10, + terminalSource:7, + carNumber:_carNumber, + sign:md5sign +} +console.log('停车记录传参 '+JSON.stringify(jsondata)); +jsajax.defaultReq( + mUrl.listServer, + JSON.stringify(jsondata), + function (data) { + console.log(data.data.dataList) + + var data = data.data.dataList; + if(data.length==0){ + $('#tip-title').text('您的停车费用为0元,无须缴费,谢谢!') + return + } + var htmls=''; + for (var i=0;i parkDuration) { + htmls += '
' + + '
' + + '
' + + '

' + data[i].carNumber + '

' + + ' ' + + // ' ' + + + '
' + + '
' + + '
' + + '
' + + '
' + + '

停车场名称:' + data[i].parkName + '

' + + '

进场时间:' + data[i].parkInTime + '

' + + '

出场时间:' + data[i].parkOutTime + '

' + + '

停车时长:' + dateFormat(data[i].parkDuration) + '

' + + '
' + + '
' + + '

' + num + '

' + + '

申请离场' + + ' ' + + '

' + + '
' + + '
' + + '
'; + } else { + htmls += '
' + + '
' + + '
' + + '

' + data[i].carNumber + '

' + + ' ' + + // ' ' + + + '
' + + '
' + + '
' + + '
' + + '
' + + '

停车场名称:' + data[i].parkName + '

' + + '

进场时间:' + data[i].parkInTime + '

' + + '

出场时间:' + data[i].parkOutTime + '

' + + '

停车时长:' + dateFormat(data[i].parkDuration) + '

' + + '
' + + '

' + num + '

' + + '

出场缴费' + + ' ' + + '

' + + '
' + + '
' + + '
'; + } + + } else { + htmls += '
' + + '
' + + '
' + + '

' + data[i].carNumber + '

' + + ' ' + + // ' ' + + + '
' + + '
' + outflag + '
' + + '
' + + '
' + + '
' + + '

停车场名称:' + data[i].parkName + '

' + + '

进场时间:' + data[i].parkInTime + '

' + + '

出场时间:' + data[i].parkOutTime + '

' + + '

停车时长:' + dateFormat(data[i].parkDuration) + '

' + + '
' + + '

' + num + '

' + + '

清缴欠费' + + ' ' + + '

' + + '
' + + '
' + + '
'; + } + // if(outflag=='出场缴费'){ + // outflag = '' + // } + + } + $('#pay_listcont').append(htmls); + + // alert(data.message) + + + }) + + +var dateFormat = function(msd){ + var time =msd + + if (null != time && "" != time) { + + if (time > 60 && time < 60 * 60) { + + time = parseInt(time / 60.0) + "分钟" + parseInt((parseFloat(time / 60.0) - + + parseInt(time / 60.0)) * 60) + "秒"; + + } + + else if (time >= 60 * 60 && time < 60 * 60 * 24) { + + time = parseInt(time / 3600.0) + "小时" + parseInt((parseFloat(time / 3600.0) - + + parseInt(time / 3600.0)) * 60) + "分钟" + + + parseInt((parseFloat((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60) - + + parseInt((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60)) * 60) + "秒"; + + } else if (time >= 60 * 60 * 24) { + + time = parseInt(time / 3600.0/24) + "天" +parseInt((parseFloat(time / 3600.0/24)- + + parseInt(time / 3600.0/24))*24) + "小时" + parseInt((parseFloat(time / 3600.0) - + + parseInt(time / 3600.0)) * 60) + "分钟" + + + parseInt((parseFloat((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60) - + + parseInt((parseFloat(time / 3600.0) - parseInt(time / 3600.0)) * 60)) * 60) + "秒"; + + } + + else { + + time = parseInt(time) + "秒"; + + } + + } + + return time; +}; + + +$(document).on('click','.weui-cells',function () { + console.log($(this).attr('data-flag')) + var flag = $(this).attr('data-flag') + if(flag == 0){ + + }else{ + var money = $(this).find('.paymoney').text() + + var carNumber = $(this).find('.carNumber').text() + //var parkCode = $(this).find('.parkCode').text() + var orderId = $(this).find('.orderId').text() + var parkCode= $(this).find('.parkCode').text() + // var carNumber = $(this).find('.carNumber').text() + var paySrcType = $(this).find('.paySrcType').text() + if(paySrcType == '欠费'){ + paySrcType = 103 + }else{ + paySrcType = 101 + } + localStorage.setItem('paySrcType',paySrcType) + localStorage.setItem('parkCode',parkCode) + + getOneorder(carNumber,parkCode,orderId,paySrcType) + } + + + +}) + +$(document).on('click','.out-btn',function () { + var _this = $(this).parent().parent().parent(); + + var money = _this.find('.paymoney').text() + console.log(money) + var _orderId = _this.find('.orderId').text() + + var carNumber = _this.find('.carNumber').text() + //var parkCode = $(this).find('.parkCode').text() + // var orderId = _this.find('.orderId').text() + var parkCode= _this.find('.parkCode').text() + // var carNumber = $(this).find('.carNumber').text() + + var paySrcType = _this.find('.paySrcType').text() + var paySrcType = '101' + + // if(paySrcType == ''){ + // paySrcType = 103 + // }else{ + // paySrcType = 101 + // } + // alert(paySrcType) + console.log(paySrcType) + localStorage.setItem('paySrcType',paySrcType) + localStorage.setItem('parkCode',parkCode) + + + var salt = jsajax.salt(32); + var token = mUrl.GetToken(); + if (token == null) { + token = ''; + } + var jsondata = { + app_id: "0eca8f5373ca4866aec2f8e9d9367104", + deviceInfo: "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E", + salt: salt, + sign: getMd5sign(), + sign_type: "md5", + //token : token, + + //appId:jsajax.appID, + orderId: _orderId, + payOrderType: '101', + terminalSource: '3', + //parkCode:parkCode, + // carNumber:carNumber, + + } + jsajax.defaultReq( + cepath + '/appAccountPay/appApplyParkOut', + JSON.stringify(jsondata), + function (data) { + console.log(data) + + if(data.code=='5005'){ + getOneorder(carNumber,parkCode,_orderId) + + }else{ + //$('.dialog-out').show() + window.location.href='zeroout.html?carNumber='+carNumber + } + // alert(data.message) + + + }) + +}) +$('.close-btn').on('click',function () { + $('.dialog-out').hide() +}) + + +//查询单个待支付单费用 +function getOneorder(carNumber,parkCode,orderId,_paySrcType){ + //alert(_paySrcType) + // var salt = jsajax.salt(32); + // var token = mUrl.GetToken(); + + var salt = jsajax.salt(32); + var token = mUrl.GetToken(); + if (token == null) { + token = ''; + } + + var _payType = 0; + + + if (/MicroMessenger/.test(window.navigator.userAgent)) { + _payType = 4 + } else { + _payType = 1 + } + var jsondata = { + app_id: "0eca8f5373ca4866aec2f8e9d9367104", + deviceInfo : "BC0703A4-AFB0-4B51-9089-9B7487C0CC6E", + salt : salt, + sign : getMd5sign(), + sign_type : "md5", + token : token, + payType:_payType, + paySrcType:_paySrcType, + appId:jsajax.appID, + orderId:orderId, + terminalSource:'7', + parkCode:parkCode, + carNumber:carNumber, + + } + console.log('查询单个的入参 '+JSON.stringify(jsondata)+" 请求的接口"+mUrl.oneCardorder); + jsajax.defaultReq( + mUrl.oneCardorder, + JSON.stringify(jsondata), + function(data){ + console.log(data) + console.log('获取单个待支付订单 '+JSON.stringify(data)); + if(data.code=='0'){ + //setdiv(); + setTimeout(function(){ + var datas = data.data + console.log(datas) + var discountFee = datas.discountFee;//已优惠 + var discountDesc = datas.discountDesc;//已优惠 + var parkCode = datas.parkCode; + var no = datas.orderId;//.no;//订单id + var inparktime = datas.inparktime;//.inparktime;//进场时间 + var plateno = datas.plateno;//车牌号 + var parkName = datas.parkName;//停车场名称 + var staytime = datas.staytime;//停车时长 + var due = datas.due;//总计费用 + var unpaid = datas.unpaid;//待支付 + var paid = datas.paid;//实付 + var discountType = datas.discountType; + var businessUsedType = datas.businessUsedType //商户信息-是否使用商户券,1-使用,0-未使用 + var businessFee = datas.businessFee //商户减扣金额 + + if(datas.discountFee&&datas.discountFee!=''&&datas.discountFee!=undefined){ + discountFee = datas.discountFee;//已优惠 + if(datas.discountDesc&&datas.discountDesc!=''&&datas.discountDesc!=undefined){ + discountDesc = datas.discountDesc;//已优惠 + } + } + + //console.log('-------------------------------'+discountType); + //查询到车牌号订单信息 + var src = 'home.html?carnum='+plateno + +"&inparktime="+inparktime + +"&parkName="+parkName + +"&staytime="+staytime + +"&due="+due + +"&unpaid="+unpaid + +"&paid="+paid + +"&no="+no + +"&disfee="+discountFee + +"&disdesc="+discountDesc + +'&discountType='+discountType + +'&parkCode='+parkCode + +'&orderId='+datas.orderId + +'&discountFee='+datas.discountFee + +'&parkOutTime='+datas.outtime + +'&orderFee='+datas.orderFee + +'&appOrderTimeout='+datas.appOrderTimeout + +'&appId='+datas.appId + +'&orderId='+datas.orderId + +'&_paySrcType='+_paySrcType + + "&businessUsedType=" + businessUsedType + + "&businessFee=" + businessFee + console.log(src) + window.location.assign(encodeURI(src)) + },100); + } + } + ) +} + + + + +function getMd5sign() +{ + var salt = jsajax.salt(32); + var token = mUrl.GetToken(); + if (token == null) { + token = ''; + } + var sortd = [ + {keyname:'app_id',value:'0eca8f5373ca4866aec2f8e9d9367104'}, + {keyname:'deviceInfo',value:'BC0703A4-AFB0-4B51-9089-9B7487C0CC6E'}, + {keyname:'salt',value:salt}, + {keyname:'sign_type',value:'md5'}, + {keyname:'token',value:token} + ]; + var md5sign = jsajax.getsign(sortd); + return md5sign; + +} + + +$('.outBtn').on('click',function () { + //window.location.href = 'http://wxgzh.renniting.cn/wechatwuxi/Chifeng/Threewf/stoppayment/select.html' + window.location.href = 'http://wxgzh.huangshiparking.com/HSwechat/PDA-Payment/out.html' + +}) +$('.hiddenBtn').on('click',function () { + $('#strTip').hide() +}) + + diff --git a/js/pay.js b/js/pay.js index 504d1af..9ffbf19 100644 --- a/js/pay.js +++ b/js/pay.js @@ -1,4 +1,4 @@ -/* +/* @songcxa @2018-12-14 @移动支付 @@ -647,6 +647,8 @@ var webAppClass = { $paid = getObjectByID("paid"),//已支付金额 $discountDesc = getObjectByID("discountDesc"),//8折优惠折扣费用 $discountFee = getObjectByID("discountFee");//优惠金额 + $businessFeeWrap = getObjectByID("businessFeeWrap") + $businessFee = getObjectByID("businessFee") if (params != null && params != "") { var price = keepTwoDecimalFull((params.orderFee / 100));//(params.orderFee / 100); @@ -660,6 +662,14 @@ var webAppClass = { $parkName.innerHTML = params.parkName; $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); + } $due.innerHTML = keepTwoDecimalFull((params.due / 100));//停车总费用 $paid.innerHTML = keepTwoDecimalFull(params.paid / 100); diff --git a/js/url.js b/js/url.js index 1859edc..fbc2962 100644 --- a/js/url.js +++ b/js/url.js @@ -1,4 +1,4 @@ -var mUrl = mUrl || {}; +var mUrl = mUrl || {}; //songcxa 15801541129 @@ -89,7 +89,7 @@ mUrl.getJx = function(){ // var cepath = 'http://39.98.54.240:8090'; -var cepath = 'http://pay.service.renniting.cn/v1'; +var cepath = 'http://pay.service.huangshiparking.com'; // http://pay.service.renniting.cn // var cepath = 'http://39.98.54.240:8090' // http://app.api.dyszt.com:8090 diff --git a/list.html b/list.html index 0d5bde1..78661fd 100644 --- a/list.html +++ b/list.html @@ -183,7 +183,7 @@ -
48小时限时补缴优惠
+
@@ -224,7 +224,7 @@ - + - + diff --git a/listnew.html b/listnew.html index 2221e1c..bff6878 100644 --- a/listnew.html +++ b/listnew.html @@ -183,7 +183,7 @@ -
48小时限时补缴优惠
+
@@ -224,8 +224,8 @@ - - + + - + diff --git a/out.html b/out.html index 36dbb90..c8a9685 100644 --- a/out.html +++ b/out.html @@ -15,8 +15,8 @@ - - + + + 扫码查询出场