|
@ -45,58 +45,11 @@
|
|
|
var dd = dialog({contentType:'load', skin:'bk-popup', content:'修改中...'});
|
|
|
var Request = new Object();
|
|
|
Request = GetRequest();
|
|
|
var openid = Request["openid"];
|
|
|
var type = Number(Request["type"]);
|
|
|
var idcard = Request["idcard"];
|
|
|
var userAgent;
|
|
|
$("#idcard").val(idcard);
|
|
|
$(function (){
|
|
|
userAgent = window.localStorage.getItem(agentName);
|
|
|
if(userAgent){
|
|
|
var paurl = "";
|
|
|
if(type == 0){
|
|
|
paurl = "wx/html/home/html/login.html?type=0&openid=" + openid;
|
|
|
}
|
|
|
else{
|
|
|
if(idcard){
|
|
|
paurl = "wx/html/home/html/login.html?type=" + type + "&openid=" + openid + "&idcard=" + idcard;
|
|
|
}
|
|
|
else{
|
|
|
paurl = "wx/html/home/html/login.html?type=" + type + "&openid=" + openid;
|
|
|
}
|
|
|
}
|
|
|
//从后台那边获取签名等信息
|
|
|
var params = {};
|
|
|
params.pageUrl = window.location.href;
|
|
|
$.ajax(server + "weixin/getSign", {
|
|
|
data: params,
|
|
|
dataType: "json",
|
|
|
type: "post",
|
|
|
success: function(res){
|
|
|
if (res.status == 200) {
|
|
|
var t = res.data.timestamp;
|
|
|
var noncestr = res.data.noncestr;
|
|
|
var signature = res.data.signature;
|
|
|
wx.config({
|
|
|
//debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
|
|
|
appId: appId, // 必填,公众号的唯一标识
|
|
|
timestamp: t, // 必填,生成签名的时间戳
|
|
|
nonceStr: noncestr, // 必填,生成签名的随机串
|
|
|
signature: signature,// 必填,签名,见附录1
|
|
|
jsApiList: [
|
|
|
// 'closeWindow'
|
|
|
] // 必填,需要使用的JS接口列表,所有JS接口列表见附录2
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
else{
|
|
|
if(!openid){
|
|
|
dialog({contentType:'tipsbox',bottom:true, skin:'bk-popup' , content:'openid获取失败'}).show();
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
|
|
|
checkUserAgent()
|
|
|
|
|
|
function submit(){
|
|
|
var userAgent = window.localStorage.getItem(agentName);
|