Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
774b42e0
Commit
774b42e0
authored
Aug 20, 2018
by
xishifeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录https协议限制
parent
5ddc1f21
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
3 deletions
+23
-3
login.js
public/resource/js/login.js
+19
-2
public.js
public/resource/js/public.js
+4
-1
No files found.
public/resource/js/login.js
View file @
774b42e0
...
@@ -23,6 +23,18 @@ $(function() {
...
@@ -23,6 +23,18 @@ $(function() {
}
}
});
});
//处理微信浏览器
if
(
~
navigator
.
userAgent
.
indexOf
(
'MicroMessenger'
)){
alert
(
'已禁止使用微信浏览器访问,请使用其他浏览器打开'
);
}
else
if
(
location
.
origin
===
'http://api.tonglianjituan.com'
||
location
.
origin
===
'http://pre2.tonglianjituan.com'
||
location
.
origin
===
'http://run.tonglianjituan.com'
){
//必须通过https协议访问
location
.
href
=
location
.
href
.
replace
(
'http'
,
'https'
);
}
else
{
//当满足不是微信浏览器,也不是http协议时,在正常显示
loadMain
();
}
function
loadMain
(){
_loginBtn
.
click
(
function
(
e
)
{
_loginBtn
.
click
(
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
e
.
stopPropagation
();
e
.
stopPropagation
();
...
@@ -37,6 +49,8 @@ $(function() {
...
@@ -37,6 +49,8 @@ $(function() {
alert
(
'请输入登录密码'
);
alert
(
'请输入登录密码'
);
return
false
;
return
false
;
};
};
//登陆的时候 获取电脑端 浏览器的型号和版本信息
//登陆的时候 获取电脑端 浏览器的型号和版本信息
var
NV
=
{};
var
NV
=
{};
var
UA
=
navigator
.
userAgent
.
toLowerCase
();
var
UA
=
navigator
.
userAgent
.
toLowerCase
();
...
@@ -99,7 +113,7 @@ $(function() {
...
@@ -99,7 +113,7 @@ $(function() {
only_id
=
result
;
only_id
=
result
;
//result即为获取到的浏览器指纹值
//result即为获取到的浏览器指纹值
// var browser_version = NV.shell + '/' + NV.version;获取浏览器的类型 及 浏览器版本
// var browser_version = NV.shell + '/' + NV.version;获取浏览器的类型 及 浏览器版本
var
browser_version
=
NV
.
shell
;
//获取浏览器的类型
var
browser_version
=
NV
.
shell
;
//获取浏览器的类型
console
.
log
(
browser_version
);
console
.
log
(
browser_version
);
$
.
ajax
({
$
.
ajax
({
...
@@ -150,5 +164,7 @@ $(function() {
...
@@ -150,5 +164,7 @@ $(function() {
// //'\n\n浏览器版本='+parseInt(NV.version)+
// //'\n\n浏览器版本='+parseInt(NV.version)+
// '\n\n浏览器外壳=' + NV.shell);
// '\n\n浏览器外壳=' + NV.shell);
})
});
};
});
});
\ No newline at end of file
public/resource/js/public.js
View file @
774b42e0
...
@@ -149,7 +149,10 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html', 'layer'], function
...
@@ -149,7 +149,10 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html', 'layer'], function
layerTipsX
=
function
(
n
){
layer
.
open
({
content
:
n
,
skin
:
"msg"
,
time
:
2
})};
//注册一个layer自定义全局函数
layerTipsX
=
function
(
n
){
layer
.
open
({
content
:
n
,
skin
:
"msg"
,
time
:
2
})};
//注册一个layer自定义全局函数
//跳转https协议
if
(
location
.
origin
===
'http://api.tonglianjituan.com'
||
location
.
origin
===
'http://pre2.tonglianjituan.com'
||
location
.
origin
===
'http://run.tonglianjituan.com'
){
location
.
href
=
location
.
href
.
replace
(
'http'
,
'https'
);
};
});
});
var
ServerHost
=
location
.
origin
;
var
ServerHost
=
location
.
origin
;
var
ServerHostTempC
=
'https://pre2.tonglianjituan.com'
;
var
ServerHostTempC
=
'https://pre2.tonglianjituan.com'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment