Commit 6d2dad50 by zhujian

商有

parent 36a38734
<!--
* @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) {
postJSON('hades/anon/hades/getCorpTrainSuiteId', {}, (res) => {
GetJSON('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',
......
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