Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wechat-common
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
wechat-common
Commits
6d2dad50
Commit
6d2dad50
authored
Aug 01, 2021
by
zhujian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商有
parent
36a38734
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
16 deletions
+36
-16
public/h5.html
+36
-16
No files found.
public/h5.html
View file @
6d2dad50
<!--
* @Author: 吴文洁
* @Date: 2020-08-24 12:20:57
...
...
@@ -20,7 +19,7 @@
<title>
小麦企培
</title>
<script
type=
"text/javascript"
charset=
"utf-8"
src=
"./jquery.min.js"
></script>
<script
src=
"./lottie.js"
></script>
<script
type=
"text/javascript"
src=
'./animation.json'
></script>
<script
type=
"text/javascript"
src=
'./animation.json'
></script>
<style
type=
"text/css"
>
.box
{
width
:
100%
;
...
...
@@ -41,20 +40,24 @@
line-height
:
24px
;
margin-top
:
12px
;
}
.desc
{
font-size
:
14px
;
color
:
#999
;
.desc
{
font-size
:
14px
;
color
:
#999
;
}
.hide
{
display
:
none
;
text-align
:
center
;
}
#lottie
{
#lottie
{
width
:
150px
;
height
:
150px
;
margin
:
0
auto
;
}
#tenant-config-error-message
{
#tenant-config-error-message
{
max-width
:
70%
;
margin
:
25px
auto
;
font-size
:
14px
;
...
...
@@ -109,10 +112,10 @@
const
code
=
getParameterByName
(
'code'
);
const
ticket
=
getParameterByName
(
'ticket'
);
const
storeId
=
getParameterByName
(
'storeId'
);
const
corpType
=
getParameterByName
(
'corpType'
);
if
(
!
code
)
{
pos
tJSON
(
'hades/anon/hades/getCorpTrainSuiteId'
,
{},
(
res
)
=>
{
Ge
tJSON
(
'hades/anon/hades/getCorpTrainSuiteId'
,
{},
(
res
)
=>
{
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
})
...
...
@@ -123,27 +126,44 @@
appTermEnum
:
'XIAOMAI_CLOUD_CLASS_PC_WEB_CUSTOMER'
,
code
:
code
,
ticket
:
ticket
,
storeId
:
storeId
storeId
:
storeId
},
(
res
)
=>
{
if
(
res
.
code
==
200
)
{
$
(
'#success'
).
show
()
}
else
if
(
res
.
code
===
'DEPLOY_CROP_ADD_USER_NO'
)
{
}
else
if
(
res
.
code
===
'DEPLOY_CROP_ADD_USER_NO'
)
{
//租户配置到限,跳转空白提示缺省页
$
(
'#tenant-config-error'
).
show
();
$
(
'#tenant-config-error-message'
).
html
(
res
.
message
)
emptyAnimation
()
}
else
{
emptyAnimation
()
}
else
{
$
(
'#error'
).
show
();
var
message
=
res
.
message
.
split
(
','
).
join
(
'<br />'
)
if
(
message
===
"非当前企业学院"
)
{
if
(
message
===
"非当前企业学院"
)
{
$
(
'#message'
).
html
(
"<div><div>非当前企业学院</div><div class='desc'>尝试扫描「企业外部客户」二维码登录</div></div>"
);
}
else
{
}
else
{
$
(
'#message'
).
html
(
message
);
}
}
})
}
function
GetJSON
(
url
,
data
,
callback
)
{
const
ajaxOptions
=
{
data
:
JSON
.
stringify
(
data
),
type
:
'GET'
,
url
:
BASIC_HOST_MAP
[
env
]
+
url
+
`?corpType=
${
corpType
}
`
,
contentType
:
'application/x-www-form-urlencoded; charset=UTF-8'
,
timeout
:
20000
,
success
(
res
,
status
,
xhr
)
{
callback
(
res
)
},
};
$
.
ajax
(
ajaxOptions
)
}
function
postJSON
(
url
,
data
,
callback
)
{
const
ajaxOptions
=
{
data
:
JSON
.
stringify
(
data
),
...
...
@@ -160,7 +180,7 @@
$
.
ajax
(
ajaxOptions
)
}
function
emptyAnimation
(){
function
emptyAnimation
()
{
let
params
=
{
container
:
document
.
getElementById
(
'lottie'
),
renderer
:
'svg'
,
...
...
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