Commit 3c954e64 authored by xishifeng's avatar xishifeng

暂存1

parent 7a52b405
...@@ -106,6 +106,52 @@ function h5Page(token, fn) { ...@@ -106,6 +106,52 @@ function h5Page(token, fn) {
// }); // });
} }
function h5PageB(token, fn) {
localStorage.setItem('token', token);
fn();
$.ajax({
type: "post",
url: ServerHost + "/AppTab5/about_Token",
data: {
'token': token
},
dataType: "json",
success: function(data) {
if(typeof data === 'object'){
if(data['status'] == '0'){
console.log(data.msg);
setLoginStorage(data, token, 'agents');
fn(data);
}else{
try{
layer.open({
content: data.msg,
skin: 'msg',
time: 2
});
}catch(e){
alert(data.msg);
}
}
}else{
try{
layer.open({
content: 'token验证接口数据错误',
skin: 'msg',
time: 2
});
}catch(e){
alert('token验证接口数据错误');
}
};
},
error: function() {
console.warn("获取token失败");
}
});
}
//验证C端token //验证C端token
function h5PageC(token, fn) { function h5PageC(token, fn) {
$.ajax({ $.ajax({
......
...@@ -12,7 +12,7 @@ $(function(){ ...@@ -12,7 +12,7 @@ $(function(){
var _tokenB = getUrlParam("token"); var _tokenB = getUrlParam("token");
if(_token !== null) { if(_token !== null) {
h5Page(_token, function(data) { h5PageC(_token, function(data) {
loadMain(); loadMain();
}); });
} else { } else {
......
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 to comment