Commit ebe7dd06 authored by agping's avatar agping

登陆修改

parent 1346ac7b
...@@ -430,7 +430,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp ...@@ -430,7 +430,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
getPhoneBindingList: function(v,pageNo) { getPhoneBindingList: function(v,pageNo) {
var params = {}; var params = {};
params.agent_id = agent.agent_id; params.agent_id = agent.agent_id;
params.model = v; // params.model = v;
$.ajax({ $.ajax({
url: '/index/deviceList', url: '/index/deviceList',
type: 'GET', type: 'GET',
......
...@@ -37,12 +37,72 @@ $(function(){ ...@@ -37,12 +37,72 @@ $(function(){
alert('请输入登录密码'); alert('请输入登录密码');
return false; return false;
}; };
var NV = {};
var UA = navigator.userAgent.toLowerCase();
try {
NV.name = !-[1, ] ? 'ie' :
(UA.indexOf("firefox") > 0) ? 'firefox' :
(UA.indexOf("chrome") > 0) ? 'chrome' :
window.opera ? 'opera' :
window.openDatabase ? 'safari' :
'unkonw';
} catch(e) {};
try {
NV.version = (NV.name == 'ie') ? UA.match(/msie ([\d.]+)/)[1] :
(NV.name == 'firefox') ? UA.match(/firefox\/([\d.]+)/)[1] :
(NV.name == 'chrome') ? UA.match(/chrome\/([\d.]+)/)[1] :
(NV.name == 'opera') ? UA.match(/opera.([\d.]+)/)[1] :
(NV.name == 'safari') ? UA.match(/version\/([\d.]+)/)[1] :
'0';
} catch(e) {};
try {
NV.shell = (UA.indexOf('360ee') > -1) ? '360极速浏览器' :
(UA.indexOf('360se') > -1) ? '360安全浏览器' :
(UA.indexOf('qqbrowser') > -1) ? 'QQ浏览器' :
(UA.indexOf('se') > -1) ? '搜狗浏览器' :
(UA.indexOf('aoyou') > -1) ? '遨游浏览器' :
(UA.indexOf('theworld') > -1) ? '世界之窗浏览器' :
(UA.indexOf('worldchrome') > -1) ? '世界之窗极速浏览器' :
(UA.indexOf('greenbrowser') > -1) ? '绿色浏览器' :
(UA.indexOf('baidu') > -1) ? '百度浏览器' :
NV.name;
} catch(e) {};
//判断 谷歌 360 application/vnd.chromium.remoting-viewer 可能为360特有
if(NV.name=='chrome'){
var is360 = _mime("type", "application/vnd.chromium.remoting-viewer");
if(isChrome() && is360) {
NV.shell='360浏览器'
}
//检测是否是谷歌内核(可排除360及谷歌以外的浏览器)
function isChrome() {
var ua = navigator.userAgent.toLowerCase();
return ua.indexOf("chrome") > 1;
}
//测试mime
function _mime(option, value) {
var mimeTypes = navigator.mimeTypes;
for(var mt in mimeTypes) {
if(mimeTypes[mt][option] == value) {
return true;
}
}
return false;
}
}
// alert('浏览器UA=' + UA +
// '\n\n浏览器名称=' + NV.name +
// '\n\n浏览器版本=' + NV.version +
// //'\n\n浏览器版本='+parseInt(NV.version)+
// '\n\n浏览器外壳=' + NV.shell);
var browser_version=NV.shell+'/'+NV.version;
$.ajax({ $.ajax({
type: 'POST', type: 'POST',
url: '/admin.php/index/loginVerify', url: '/admin.php/index/loginVerify',
data: { data: {
'username': _userName, 'username': _userName,
'password': _passWord 'password': _passWord,
'model':browser_version
}, },
timeout: 30000, timeout: 30000,
dataType: 'json', dataType: 'json',
......
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