You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
448 lines
14 KiB
448 lines
14 KiB
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
|
<link rel="icon" href="favicon.ico">
|
|
<title>供应商资质应用管理系统</title>
|
|
<script src="jquery.min.js"></script>
|
|
</head>
|
|
<style>
|
|
html,body,h1,h2,h3,h4,h5,h6,div,dl,dt,dd,ul,ol,li,p,blockquote,pre,hr,figure,table,caption,th,td,form,fieldset,legend,input,button,textarea,menu {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
body {
|
|
height: 100%;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
-webkit-font-smoothing: antialiased;
|
|
text-rendering: optimizeLegibility;
|
|
font-family: Helvetica Neue, Helvetica, Arial, Microsoft Yahei, Hiragino Sans GB, Heiti SC, WenQuanYi Micro Hei, sans-serif;
|
|
}
|
|
|
|
label {
|
|
font-weight: 700;
|
|
}
|
|
|
|
html {
|
|
height: 100%;
|
|
box-sizing: border-box;
|
|
}
|
|
*,
|
|
*:before,
|
|
*:after {
|
|
box-sizing: inherit;
|
|
}
|
|
.flex-box {
|
|
display: -webkit-box;
|
|
display: -webkit-flex;
|
|
/* Safari */
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
.flex-box-column {
|
|
display: -webkit-box;
|
|
display: -webkit-flex;
|
|
/* Safari */
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
flex-direction: column;
|
|
}
|
|
.search-container {
|
|
position: relative;
|
|
width: 100vw;
|
|
min-height: 100%;
|
|
background-image: url('bg-invitation.png');
|
|
background-repeat: no-repeat;
|
|
background-size: 100% 100%;
|
|
}
|
|
.content-block {
|
|
position: relative;
|
|
margin-top: 42vh;
|
|
width: 320px;
|
|
width: 93.5%;
|
|
color: #fff;
|
|
}
|
|
.content-box {
|
|
position: relative;
|
|
top:0;
|
|
width: 100%;
|
|
min-height: 200px;
|
|
padding: 15px;
|
|
margin-bottom: 15px;
|
|
word-wrap:break-word;
|
|
background: #FFFFFF;
|
|
border-radius: 10px;
|
|
box-shadow: 0px 4px 20px 0px rgba(65, 194, 252, 0.14), 0px 7px 13px 0px rgba(50, 147, 255, 0.52);
|
|
}
|
|
.content-box .content-title{
|
|
margin-bottom: 8px;
|
|
font-size: 20px;
|
|
font-weight: 400;
|
|
color: #1F5C99;
|
|
line-height: 54px;
|
|
border-bottom: 1px dashed #D2E1EA;
|
|
}
|
|
.content-box .content-text {
|
|
font-size: 16px;
|
|
line-height: 44px;
|
|
color: #666666;
|
|
border-bottom: 1px dashed #D2E1EA;
|
|
overflow: hidden;
|
|
}
|
|
.content-box .content-text label{
|
|
line-height: 34px;
|
|
font-weight: normal;
|
|
vertical-align: top;
|
|
}
|
|
.content-box .content-text span{
|
|
display: block;
|
|
float: right;
|
|
/* max-width: 60%; */
|
|
padding-right: 5px;
|
|
line-height: 34px;
|
|
color: #222222;
|
|
text-align: right;
|
|
}
|
|
.content-box .content-btn{
|
|
margin-top: 70px;
|
|
}
|
|
.content-box .content-btn a{
|
|
display: block;
|
|
width: 100%;
|
|
padding: 15px 0;
|
|
margin-bottom: 25px;
|
|
font-size: 18px;
|
|
color: #FFFFFF;
|
|
text-align: center;
|
|
text-decoration: none;
|
|
background: #30E3D8;
|
|
border-radius: 80px;
|
|
}
|
|
.content-box .content-btn a.btn-register{
|
|
background: #3293FF;
|
|
}
|
|
.text-indent-1 {
|
|
text-indent:1em;
|
|
}
|
|
.beinvited-popup{
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: rgba(0, 0, 0, 0.5);
|
|
}
|
|
.beinvited-popup .content-box{
|
|
position: absolute;
|
|
left: 8%;
|
|
top: 25%;
|
|
width: 84%;
|
|
box-shadow: none;
|
|
}
|
|
.content-box .content-text:last-child{
|
|
border-bottom: 0 none;
|
|
}
|
|
.content-box .content-text span input{
|
|
height: 30px;
|
|
text-align: right;
|
|
border: 0 none;
|
|
}
|
|
.content-box .content-text .num-code{
|
|
float: right;
|
|
display: block;
|
|
width: 30%;
|
|
height: 44px;
|
|
margin-left: 8px;
|
|
}
|
|
.content-box .content-text .num-code img{
|
|
width: 100%;
|
|
margin-top: 4px;
|
|
}
|
|
.content-box .content-text .input-code{
|
|
width: 39%;
|
|
}
|
|
.content-box .content-text .input-code input{
|
|
width: 100%;
|
|
}
|
|
.content-box{
|
|
position: relative;
|
|
}
|
|
.content-box .content-close{
|
|
position: absolute;
|
|
left: 50%;
|
|
margin-left: -18px;
|
|
bottom: -20%;
|
|
width: 36px;
|
|
}
|
|
.content-box .content-close a img{
|
|
width: 100%;
|
|
}
|
|
.success-popup{
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: rgba(0, 0, 0, 0.5);
|
|
}
|
|
.success-popup .content-box{
|
|
position: absolute;
|
|
left: 8%;
|
|
top: 25%;
|
|
width: 84%;
|
|
background: none;
|
|
box-shadow: none;
|
|
}
|
|
.success-popup .content-box .content-info img{
|
|
width: 100%;
|
|
}
|
|
.success-popup .content-box .content-close {
|
|
position: absolute;
|
|
left: 50%;
|
|
margin-left: -18px;
|
|
bottom: -20%;
|
|
width: 36px;
|
|
}
|
|
</style>
|
|
<body>
|
|
<div class="search-container flex-box-column">
|
|
<div class="content-block">
|
|
<div class="content-box">
|
|
<h3 class="content-title">申请企业信息</h3>
|
|
<div class="content-info" id="enterprise-info">
|
|
|
|
</div>
|
|
<div class="content-btn">
|
|
<a href="javascript:;" class="btn-invitate">登录并接受申请</a>
|
|
<!-- <a href="javascript:;" class="btn-register">去注册</a> -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 受邀企业弹窗 -->
|
|
<div class="beinvited-popup" id="beinvited-popup" style="display: none;">
|
|
<div class="content-box">
|
|
<h3 class="content-title">受邀企业</h3>
|
|
<div class="content-info">
|
|
<form class="content-form" action="#" method="GET" name="content-form">
|
|
<p class="content-text"><label>用户名:</label><span><input type="text" name="name" id="name" placeholder="请输入用户名"></span></p>
|
|
<p class="content-text"><label>密码:<label><span><input type="password" name="password" id="password" placeholder="请输入密码"></span></p>
|
|
<p class="content-text">
|
|
<label>验证码:</label>
|
|
<span class="input-code"><input type="text" name="vcode" id="vcode" placeholder="请输入验证码"></span>
|
|
<strong class="num-code"></strong>
|
|
</p>
|
|
</form>
|
|
</div>
|
|
<div class="content-btn">
|
|
<a href="javascript:;" class="btn-accept">接受申请</a>
|
|
</div>
|
|
<div class="content-close">
|
|
<a href="javascript:;" class="btn-close"><img src="close.png" alt=""></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 受邀企业注册成功提示弹窗 -->
|
|
<div class="success-popup" id="success-popup" style="display: none;">
|
|
<div class="content-box">
|
|
<div class="content-info">
|
|
<img src="bg-success-popup.png" alt="">
|
|
</div>
|
|
<div class="content-close">
|
|
<a href="javascript:;" class="btn-close"><img src="close.png" alt=""></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
<script>
|
|
var code = '';
|
|
var uuid = "";
|
|
var enterpriseid= "";
|
|
var infoOpen = '';
|
|
var baseUrlIp = "http://121.36.65.171:9527";
|
|
var registerIP = "http://121.36.65.171:8778"
|
|
|
|
// 点击 去注册 按钮,复制链接并去浏览器打开
|
|
$(".btn-register").click(function(){
|
|
var input = $("<input value = "+ registerIP +">");
|
|
$("body").prepend(input);
|
|
$("body").find("input").eq(0).select();
|
|
document.execCommand("copy");
|
|
$("body").find("input").eq(0).remove();
|
|
alert("请到浏览器粘贴并打开链接 "+ registerIP);
|
|
});
|
|
// 点击 登录并接受邀请 按钮,打开受邀企业弹窗
|
|
$(".btn-invitate").click(function(){
|
|
if($("#beinvited-popup").css("display")=="none"){
|
|
$("#beinvited-popup").show();
|
|
}
|
|
});
|
|
// 点击 接受邀请弹窗-关闭按钮,关闭弹窗
|
|
$(".beinvited-popup .btn-close").click(function(){
|
|
if($("#beinvited-popup").css("display")=="block"){
|
|
$("#beinvited-popup").hide();
|
|
}
|
|
});
|
|
// 点击 受邀企业成功提示弹窗-关闭按钮,关闭弹窗
|
|
$(".success-popup .btn-close").click(function(){
|
|
if($("#success-popup").css("display")=="block"){
|
|
$("#success-popup").hide();
|
|
}
|
|
});
|
|
// 默认加载验证码
|
|
$(document).ready(function(res){
|
|
$.ajax({
|
|
url: baseUrlIp + "/captchaImage",//调用获取验证码接口
|
|
type: "get", // 请求方式get / post
|
|
dataType: "json", // 数据类型
|
|
// 请求成功后的回调函数
|
|
success: function(res) {
|
|
uuid=res.uuid;
|
|
if(res.code == 200){
|
|
// data后台返回来的数据
|
|
var html = '';
|
|
html +='<img id="imgUrl" src="data:gif;base64,'+ res.img +'" alt="">'
|
|
} else {
|
|
html +='<span style="color:#000;">error</span>';
|
|
}
|
|
// append 结尾插入内容
|
|
$(".num-code").append(html);
|
|
|
|
},
|
|
error: function(err) {
|
|
console.log(err);
|
|
}
|
|
});
|
|
})
|
|
// 刷新验证码
|
|
$(".num-code").click(function(){
|
|
$.ajax({
|
|
url: baseUrlIp + "/captchaImage",
|
|
type: "get", // 请求方式get / post
|
|
dataType: "json", // 数据类型
|
|
// 请求成功后的回调函数
|
|
success: function(res) {
|
|
$("#imgUrl").attr("src","data:gif;base64,"+ res.img)
|
|
uuid=res.uuid;
|
|
},
|
|
error: function(err) {
|
|
console.log(err);
|
|
}
|
|
});
|
|
});
|
|
// 点击 接受邀请 按钮,提交验证
|
|
$(".btn-accept").click(function(){
|
|
var name = $('input[name=name]').val();
|
|
var password = $('input[name=password]').val();
|
|
var vcode = $('input[name=vcode]').val();
|
|
if($.trim(name)==''){
|
|
alert("请输入用户名")
|
|
$('input[name=name]').focus()
|
|
return false
|
|
}
|
|
if($.trim(password)==''){
|
|
alert("请输入密码")
|
|
$('input[name=password]').focus()
|
|
return false
|
|
}
|
|
if($.trim(vcode)==''){
|
|
alert("请输入验证码")
|
|
$('input[name=vcode]').focus()
|
|
return false
|
|
}
|
|
|
|
const data = {
|
|
username:name,
|
|
password,
|
|
code:vcode,
|
|
uuid
|
|
}
|
|
|
|
$.ajax({
|
|
url: baseUrlIp + "/login",//调用登录接口
|
|
type: "post", // 请求方式get / post
|
|
dataType: "json", // 数据类型
|
|
contentType : "application/json;charset=utf-8",
|
|
data : JSON.stringify(data),
|
|
// 请求成功后的回调函数
|
|
success: function(res) {
|
|
var token = res.token;
|
|
if(res.code == 200){
|
|
const dataT = {
|
|
enterpriseId:parseInt(enterpriseid),
|
|
isItPublic:infoOpen
|
|
}
|
|
$.ajax({
|
|
url: baseUrlIp + "/system/enterprise/acceptInvitation",//调用接受邀请接口
|
|
type: "post", // 请求方式get / post
|
|
dataType: "json", // 数据类型
|
|
contentType : "application/json;charset=utf-8",
|
|
data: JSON.stringify(dataT ),
|
|
headers: {
|
|
'Authorization': token,
|
|
},
|
|
// 请求成功后的回调函数
|
|
success: function(res) {
|
|
if(res.code == 200){
|
|
$("#success-popup").show()
|
|
$("#beinvited-popup").hide()
|
|
} else {
|
|
alert(res.msg)
|
|
}
|
|
},
|
|
error: function(err) {
|
|
console.log(err);
|
|
}
|
|
});
|
|
} else {
|
|
alert(res.msg)
|
|
}
|
|
},
|
|
error: function(err) {
|
|
console.log(err);
|
|
}
|
|
});
|
|
});
|
|
|
|
function enterpriseInfo(){
|
|
var str = window.location.href.split('?')[1];
|
|
if (!str) {return};
|
|
enterpriseid=str.split('&')[0];
|
|
if(enterpriseid.indexOf('=') == -1) {
|
|
return
|
|
}
|
|
enterpriseid = enterpriseid.split('=')[1]
|
|
infoOpen=str.split('&')[1];
|
|
if(infoOpen.indexOf('=') == -1) {
|
|
return
|
|
}
|
|
infoOpen = infoOpen.split('=')[1]
|
|
$.ajax({
|
|
url: baseUrlIp + "/system/enterpriseManager/selectEnterpriseByIdForH5?enterpriseid=" + enterpriseid,//调用根据企业ID获取企业信息接口
|
|
type: "get", // 请求方式get / post
|
|
dataType: "json", // 数据类型
|
|
// 请求成功后的回调函数
|
|
success: function(res) {
|
|
if(res.code == 200){
|
|
// data后台返回来的数据
|
|
var html = '';
|
|
html +='<p class="content-text"><label>企业名称:</label><span id="enterprise_name">'+ res.data.name +'</span></p>'
|
|
+'<p class="content-text"><label>法定代表人名称:</label><span id="enterprise_person">'+ res.data.nameLegalRepresentative +'</span></p>'
|
|
} else {
|
|
html +='<span style="color:#000;">error</span>';
|
|
}
|
|
// append 结尾插入内容
|
|
$('#enterprise-info').append(html);
|
|
},
|
|
error: function(err) {
|
|
console.log(err);
|
|
}
|
|
});
|
|
}
|
|
enterpriseInfo()
|
|
</script>
|
|
</html>
|