Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wechat_lung
Project
Overview
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
hanpeng
wechat_lung
Commits
31e99d76
Commit
31e99d76
authored
Aug 28, 2019
by
hanpeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-mark- 论坛增加登录拦截
parent
f3f814cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
0 deletions
+85
-0
rukou.js
medtap_bbs_lung/javaScript/rukou.js
+57
-0
rukou.html
medtap_bbs_lung/rukou.html
+28
-0
No files found.
medtap_bbs_lung/javaScript/rukou.js
0 → 100644
View file @
31e99d76
define
([
'zepto'
,
'medtap'
],
function
(
$
,
medtap
){
var
rukou
=
{
wechatId
:
medtap
.
getRequest
(
'wechatId'
),
init
:
function
(){
rukou
.
getToken
()
},
checkUser
:
function
(){
medtap
.
loading
(
1
);
medtap
.
submitAjax
({
url
:
'https://testdevgw.medtap.cn/wechat/user/getWechatUser'
,
type
:
'GET'
,
async
:
false
,
data
:{
wechatId
:
rukou
.
wechatId
},
success
:
function
(
res
){
medtap
.
loading
(
0
);
var
info
=
res
.
content
.
wechatUser
;
if
(
info
.
hasOwnProperty
(
'userId'
)){
//medtap.pushWindow('index.html?wechatId=' + rukou.wechatId)
window
.
location
.
replace
(
'index.html?wechatId='
+
rukou
.
wechatId
)
}
else
{
window
.
location
.
replace
(
'https://review-formal.iplusmed.com/wechatForLungCancer/dev/wechat_lung_login/login.html?wechatId='
+
rukou
.
wechatId
)
}
}
})
},
getToken
:
function
(){
localStorage
.
wxLungToken
=
''
;
medtap
.
loading
(
1
);
medtap
.
submitAjax
({
url
:
'https://testdevgw.medtap.cn/user/auth/token'
,
type
:
'POST'
,
async
:
false
,
contentType
:
'application/json'
,
data
:
{
wechatId
:
rukou
.
wechatId
},
success
:
function
(
res
)
{
medtap
.
loading
(
0
);
if
(
res
.
success
==
true
)
{
var
token
=
res
.
content
.
token
;
localStorage
.
setItem
(
'wxLungToken'
,
token
);
rukou
.
checkUser
();
}
else
{
}
},
error
:
function
(
res
)
{
console
.
log
(
res
.
resultDesc
);
}
})
}
}
rukou
.
init
();
})
\ No newline at end of file
medtap_bbs_lung/rukou.html
0 → 100644
View file @
31e99d76
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
加载中...
</title>
<script
src=
"https://review-formal.iplusmed.com/Common/javaScript/require.min.js"
></script>
<script
type=
"text/javascript"
>
require
.
config
({
baseUrl
:
"./"
,
paths
:
{
"zepto"
:
"https://review-formal.iplusmed.com/Common/javaScript/zepto.min"
,
"medtap"
:
"https://review-formal.iplusmed.com/Common/javaScript/medtap_core_wx"
,
"md5"
:
"https://review-formal.iplusmed.com/Common/javaScript/md5.min"
},
shim
:
{
"zepto"
:
{
exports
:
"$"
}
}
});
</script>
</head>
<body>
</body>
<script
type=
"text/javascript"
>
require
([
'javaScript/rukou.js'
])
</script>
</html>
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