Commit 53575541 by libai

测试

parent 5cdb833e
Showing with 76 additions and 45 deletions
......@@ -193,55 +193,86 @@ try{
sessionStorage.pay = $(this).children("i").text()
})
$(".pay-btn").on("click", function () {
if (moneyBl && payBl) {
if (sessionStorage.pay == "alipay") {
if (payOk) {
$.ajax({
url: $ip + "/order/h5/alipay.html",
dataType: "json",
type: "get",
data: {
'uid': sessionStorage.bbb,
'amount': amount,
'pkg':sessionStorage.pkg,
'cid':sessionStorage.cid,
'os':sessionStorage.os
},
success: function (msg) {
console.log(msg);
var html = [];
payOk = true
html += msg.html;
$(".alipay").html(html);
$.ajax({
url:'https://zhibo.lvdou66.com/account/client/idcard/auth/check.html',
type: "post",
data:{
uid:sessionStorage.bbb,
token:sessionStorage.kkk,
pkg:sessionStorage.pkg
},
success:function(msg){
var data=JSON.parse(msg);
if(data.code==1){
if(data.authcode==1){
if (moneyBl && payBl) {
if (sessionStorage.pay == "alipay") {
if (payOk) {
$.ajax({
url: $ip + "/order/h5/alipay.html",
dataType: "json",
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) {
$.ajax({
url: $ip+"/order/h5/wechat.html",
dataType: "json",
type: "post",
data: {
'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;
}
})
}
else if(data.authcode==0){
window.location.href='https://activity.ishuaji.cn/eggplant/verification/index.html?uid='+sessionStorage.bbb+'&token='+sessionStorage.kkk+'&pkg='+sessionStorage.pkg+'&back='+location.href+''
}
else if(data.authcode==-1){
$(".pay-btn").text("未成年人禁止充值消费").css("background","#999999").css("color","#fff")
return
}
}
}
}
})
})
$(".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