Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
7f3699f2
Commit
7f3699f2
authored
Jan 16, 2021
by
zhujian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'fixed'
parent
905a7460
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
18 deletions
+38
-18
public/h5.html
+38
-18
No files found.
public/h5.html
View file @
7f3699f2
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
background
:
rgba
(
244
,
246
,
250
,
1
)
;
background
:
rgba
(
244
,
246
,
250
,
1
)
;
}
}
...
@@ -104,25 +104,22 @@
...
@@ -104,25 +104,22 @@
const
appTermEnum
=
getParameterByName
(
'appTermEnum'
);
const
appTermEnum
=
getParameterByName
(
'appTermEnum'
);
const
code
=
getParameterByName
(
'code'
);
const
code
=
getParameterByName
(
'code'
);
const
ticket
=
getParameterByName
(
'ticket'
);
const
ticket
=
getParameterByName
(
'ticket'
);
console
.
log
(
appTermEnum
,
code
,
ticket
);
if
(
!
code
)
{
if
(
!
code
)
{
const
url
=
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=
${
APPID_MAP
[
env
]}
&redirect_uri=
${
encodeURIComponent
(
location
.
href
)}
&response_type=code&scope=snsapi_privateinfo&state=STATE#wechat_redirect`
postJSON
(
'hades/anon/hades/getCorpTrainSuiteId'
,
{},
(
res
)
=>
{
location
.
href
=
url
const
url
=
`https://open.weixin.qq.com/connect/oauth2/authorize?appid=
${
res
.
result
}
&redirect_uri=
${
encodeURIComponent
(
location
.
href
)}
&response_type=code&scope=snsapi_privateinfo&state=STATE#wechat_redirect`
location
.
href
=
url
})
return
return
}
}
else
{
const
ajaxOptions
=
{
postJSON
(
"hades/anon/hades/wXWorkUserTicketLogin"
,
{
data
:
JSON
.
stringify
({
appTermEnum
:
appTermEnum
,
appTermEnum
:
appTermEnum
,
code
:
code
,
code
:
code
,
ticket
:
ticket
ticket
:
ticket
}),
},
(
res
)
=>
{
type
:
'POST'
,
url
:
BASIC_HOST_MAP
[
env
]
+
"hades/anon/hades/wXWorkUserTicketLogin"
,
contentType
:
'application/json; charset=UTF-8'
,
timeout
:
20000
,
dataType
:
'json'
,
success
(
res
,
status
,
xhr
)
{
if
(
res
.
code
==
200
)
{
if
(
res
.
code
==
200
)
{
$
(
'#success'
).
show
()
$
(
'#success'
).
show
()
}
else
{
}
else
{
...
@@ -132,10 +129,33 @@
...
@@ -132,10 +129,33 @@
$
(
'#message'
).
html
(
message
)
$
(
'#message'
).
html
(
message
)
}
}
},
})
};
}
function
postJSON
(
url
,
data
,
callback
)
{
const
ajaxOptions
=
{
data
:
JSON
.
stringify
(),
type
:
'POST'
,
url
:
BASIC_HOST_MAP
[
env
]
+
url
,
contentType
:
'application/json; charset=UTF-8'
,
timeout
:
20000
,
dataType
:
'json'
,
success
(
res
,
status
,
xhr
)
{
callback
(
res
)
},
};
$
.
ajax
(
ajaxOptions
)
}
$
.
ajax
(
ajaxOptions
)
});
});
</script>
</script>
...
...
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