a2551e05
liuqimichale
赤峰广告
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
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 color = getQueryString(window.location).carType
|
fb4f6f2a
liuqimichale
赤峰广告 跳转
|
25
|
console.log(color)
|
a2551e05
liuqimichale
赤峰广告
|
26
27
28
29
30
31
32
33
|
if(color == 1){
$('.carNum').addClass('carNumYellow')
}
var _carNumber = getQueryString(window.location).carNumber
console.log(_carNumber)
$('.carNum').text(_carNumber)
|
d68fc748
liuqimichale
多笔缴纳费用
|
34
35
36
|
|
a2551e05
liuqimichale
赤峰广告
|
37
38
39
40
41
42
43
|
/**
* @param {} second
* @return {}
* @desc 秒转化成dd hh:mm:ss
*/
var salt = jsajax.salt(32);
var sortd = [
|
a0c3e5ba
liuqimichale
赤峰 扫码支付 签名
|
44
|
{ keyname: 'app_id', value: _app_id },
|
a2551e05
liuqimichale
赤峰广告
|
45
46
47
48
49
50
51
52
53
54
55
56
|
{ 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 = {
|
a0c3e5ba
liuqimichale
赤峰 扫码支付 签名
|
57
|
app_id: _app_id,
|
a2551e05
liuqimichale
赤峰广告
|
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
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
|
d68fc748
liuqimichale
多笔缴纳费用
|
80
|
}else{
|
a2551e05
liuqimichale
赤峰广告
|
81
82
|
}
|
a2551e05
liuqimichale
赤峰广告
|
83
|
|
a2551e05
liuqimichale
赤峰广告
|
84
85
86
|
})
|
a2551e05
liuqimichale
赤峰广告
|
87
|
|
a2551e05
liuqimichale
赤峰广告
|
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
$(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 = {
|
a0c3e5ba
liuqimichale
赤峰 扫码支付 签名
|
148
|
app_id: _app_id,
|
a2551e05
liuqimichale
赤峰广告
|
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
|
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 = {
|
a0c3e5ba
liuqimichale
赤峰 扫码支付 签名
|
205
|
app_id: _app_id,
|
a2551e05
liuqimichale
赤峰广告
|
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
|
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 = [
|
a0c3e5ba
liuqimichale
赤峰 扫码支付 签名
|
293
|
{ keyname: 'app_id', value: _app_id },
|
a2551e05
liuqimichale
赤峰广告
|
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
|
{ 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 = 'out.html'
})
$('.hiddenBtn').on('click', function () {
|
d68fc748
liuqimichale
多笔缴纳费用
|
310
311
|
// $('#strTip').hide()
window.location.href = 'paybacknew.html?carNumber='+_carNumber
|
a2551e05
liuqimichale
赤峰广告
|
312
|
})
|