Commit 53575541 by libai

测试

parent 5cdb833e
Showing with 76 additions and 45 deletions
...@@ -193,55 +193,86 @@ try{ ...@@ -193,55 +193,86 @@ try{
sessionStorage.pay = $(this).children("i").text() sessionStorage.pay = $(this).children("i").text()
}) })
$(".pay-btn").on("click", function () { $(".pay-btn").on("click", function () {
if (moneyBl && payBl) {
if (sessionStorage.pay == "alipay") { $.ajax({
if (payOk) { url:'https://zhibo.lvdou66.com/account/client/idcard/auth/check.html',
$.ajax({ type: "post",
url: $ip + "/order/h5/alipay.html", data:{
dataType: "json", uid:sessionStorage.bbb,
type: "get", token:sessionStorage.kkk,
data: { pkg:sessionStorage.pkg
'uid': sessionStorage.bbb, },
'amount': amount, success:function(msg){
'pkg':sessionStorage.pkg, var data=JSON.parse(msg);
'cid':sessionStorage.cid, if(data.code==1){
'os':sessionStorage.os if(data.authcode==1){
}, if (moneyBl && payBl) {
success: function (msg) { if (sessionStorage.pay == "alipay") {
console.log(msg); if (payOk) {
var html = []; $.ajax({
payOk = true url: $ip + "/order/h5/alipay.html",
html += msg.html; dataType: "json",
$(".alipay").html(html); type: "get",
data: {
'uid': sessionStorage.bbb,
'amount': amount,
'pkg':sessionStorage.pkg,
'cid':sessionStorage.cid,
'os':sessionStorage.os
},
success: function (msg) {
if(msg.code==1){
var html = [];
payOk = true
html += msg.html;
$(".alipay").html(html);
}else{
alert(msg.msg)
}
}
})
}
}
else if (sessionStorage.pay == "weipay") {
if (payOk) {
$.ajax({
url: $ip + "/order/h5/wechat.html",
dataType: "json",
type: "post",
data: {
'uid': sessionStorage.bbb,
'amount': amount,
'pkg':sessionStorage.pkg,
'cid':sessionStorage.cid,
'os':sessionStorage.os
},
success: function (msg) {
if(msg.code==1){
payOk = true;
window.location.href = msg.result.payInfo.url;
}else{
alert(msg.msg)
}
}
})
}
}
} }
})
}
} else if (sessionStorage.pay == "weipay") { }
if (payOk) { else if(data.authcode==0){
$.ajax({ window.location.href='https://activity.ishuaji.cn/eggplant/verification/index.html?uid='+sessionStorage.bbb+'&token='+sessionStorage.kkk+'&pkg='+sessionStorage.pkg+'&back='+location.href+''
url: $ip+"/order/h5/wechat.html", }
dataType: "json", else if(data.authcode==-1){
type: "post", $(".pay-btn").text("未成年人禁止充值消费").css("background","#999999").css("color","#fff")
data: { return
'uid': sessionStorage.bbb, }
'amount': amount,
'pkg':'h5',
'cid':sessionStorage.cid,
'os':sessionStorage.os
},
success: function (msg) {
console.log(msg);
payOk = true;
window.location.href=msg.result.payInfo.url;
}
})
} }
} }
})
}
}) })
$(".taobao-Pay").on("click", function () { $(".taobao-Pay").on("click", function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment