425 lines
17 KiB
HTML
425 lines
17 KiB
HTML
<link rel="stylesheet" type="text/css" href="__CDN__/assets/css/door/css/flyer.css">
|
||
<link rel="stylesheet" type="text/css" href="__CDN__/assets/css/door/css/public.css">
|
||
<link rel="stylesheet" type="text/css" href="__CDN__/assets/css/door/layui-v2.9.3/layui/css/layui.css">
|
||
<link rel="stylesheet" type="text/css" href="__CDN__/assets/css/door/css/newClub.css?v={$site.version}">
|
||
<style>
|
||
.clublist{
|
||
margin-top: 0;
|
||
padding: 20px 10%;
|
||
}
|
||
.clublist .list .item{
|
||
align-items: center;
|
||
cursor: pointer;
|
||
margin-top: 0;
|
||
padding-top: 15px;
|
||
}
|
||
.clublist .list .item:hover{
|
||
background:#EEEEEE;
|
||
}
|
||
.clublist .list .item>div{
|
||
display: flex;
|
||
}
|
||
.clublist .head>div{
|
||
flex: 1;
|
||
}
|
||
.clublist .list .item p{
|
||
white-space: nowrap;
|
||
flex: 1;
|
||
}
|
||
.clublist .list .item .w160{
|
||
width: 160px;
|
||
}
|
||
.clublist .list .item button{
|
||
width: 70px;
|
||
padding: 0;
|
||
height: 30px;
|
||
margin: 0 5px;
|
||
}
|
||
.clublist .list .item .rejuse{
|
||
background: #aaa;
|
||
}
|
||
.layui-layer-btn0{
|
||
background: #000!important;
|
||
}
|
||
.tips1{
|
||
text-align: center;
|
||
/*display: none;*/
|
||
padding: 0 15px;
|
||
}
|
||
.tips1 a{
|
||
text-decoration: underline;
|
||
}
|
||
.tips2{
|
||
text-align: center;
|
||
margin-top: 10px;
|
||
}
|
||
.upbox{
|
||
text-align: center;
|
||
padding: 30px 60px 20px;
|
||
}
|
||
.upbox p{
|
||
line-height: 50px;
|
||
font-weight: bold;
|
||
}
|
||
.upbox .layui-upload-drag{
|
||
padding: 10px 40px;
|
||
}
|
||
@media screen and (max-width: 768px){
|
||
.clublist{
|
||
padding: 0 2% 20px;
|
||
}
|
||
.clublist .head p:last-child{
|
||
display: none;
|
||
}
|
||
.clublist .list .item button{
|
||
width: 40px;
|
||
margin: 0 2px;
|
||
}
|
||
.clublist .list .item .w160{
|
||
width: 86px;
|
||
}
|
||
.tips2{
|
||
margin-bottom: 15px;
|
||
}
|
||
.clublist .list .item .upload{
|
||
width: 60px;
|
||
}
|
||
.upbox{
|
||
padding: 30px 30px 20px;
|
||
}
|
||
.upbox p{
|
||
line-height: 26px;
|
||
margin: 15px 0;
|
||
}
|
||
.clublist .list .item .lastbtn{
|
||
text-align: center;
|
||
}
|
||
.clublist .list .item p:nth-child(2){
|
||
flex: 2;
|
||
}
|
||
.clublist .list .item p:nth-child(3){
|
||
flex: 2.2;
|
||
}
|
||
}
|
||
</style>
|
||
|
||
|
||
<div class="fly-right">
|
||
<div class="fr-wrap">
|
||
<p class="my-event">俱乐部飞手 | Club Members</p>
|
||
<!--<p class="tips1">提示:须上传与飞手签约协议,才能完成关联。-->
|
||
<!--<a href="" download>签约协议模板下载</a>-->
|
||
<!--</p>-->
|
||
<p class="tips2">审核问题请致电 <a href="tel:13136225305">13136225305</a></p>
|
||
<div class="clublist">
|
||
<div class="head">
|
||
<div>
|
||
<p>飞手姓名</p>
|
||
<p>Pilot Name</p>
|
||
</div>
|
||
<div>
|
||
<p>申请时间</p>
|
||
<p>Application Time</p>
|
||
</div>
|
||
<!--<div>-->
|
||
<!-- <p>申请事项</p>-->
|
||
<!-- <p>Application Item</p>-->
|
||
<!--</div>-->
|
||
<div>
|
||
<p>状态</p>
|
||
<p>Status</p>
|
||
</div>
|
||
</div>
|
||
<div class="list"></div>
|
||
<div id="page"></div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<script src="__CDN__/assets/css/door/js/jquery.form.min.js"></script>
|
||
<script src="__CDN__/assets/css/door/layui/layui.js"></script>
|
||
<script>
|
||
layui.use(['layer','laypage','upload'],function(){
|
||
const laypage=layui.laypage;
|
||
const layer=layui.layer;
|
||
const upload=layui.upload;
|
||
// 更新列表
|
||
function getlist(res){
|
||
$('.clublist .head>div').show()
|
||
$('.clublist .list').empty()
|
||
let itemhtml=''
|
||
let status='';
|
||
res.forEach((item)=>{
|
||
switch(item.status){
|
||
case 1:
|
||
status='等待飞手同意';
|
||
break;
|
||
case 3:
|
||
status='飞手已拒绝';
|
||
item.color='redtext';
|
||
break;
|
||
case 5:
|
||
status='等待联赛组委会审核';
|
||
break;
|
||
case 6:
|
||
status='通过'
|
||
item.color='greentext'
|
||
break;
|
||
case 7:
|
||
status='系统已拒绝';
|
||
item.color='redtext';
|
||
break;
|
||
// case 9:
|
||
// status=`<button class="upload" player_id="${item.player.id}">上传协议</button>`;
|
||
// // $('.tips1').show()
|
||
// break;
|
||
// case 8:
|
||
// status=`<button class="upload" player_id="${item.player.id}">重新上传</button>`;
|
||
// break;
|
||
}
|
||
if(item.player){
|
||
itemhtml+=`
|
||
<div class="item">
|
||
<p>${item.player.real_name}</p>
|
||
<p>${item.createtime}</p>
|
||
<p class="${item.color} lastbtn">
|
||
${status}
|
||
</p>
|
||
</div>
|
||
`
|
||
}
|
||
})
|
||
$('.clublist .list').append(itemhtml)
|
||
// 点击获取飞手详细信息
|
||
$('.clublist .list .item>p:not(".lastbtn")').click(function(){
|
||
const item=res[$(this).parent().index()];
|
||
console.log(item)
|
||
if(item.status==1||item.status==3){
|
||
return false;
|
||
}else{
|
||
let pic =''
|
||
let pic2 =''
|
||
if(item.player.player_pic.includes('ydool2017')){
|
||
pic = item.player.player_pic
|
||
}else{
|
||
pic = "https://fpvone.cn"+item.player.player_pic
|
||
pic2 ='https://ydoo12017.oss-cn-shanghai.aliyuncs.com'+item.player.player_pic
|
||
}
|
||
layer.open({
|
||
title:false,
|
||
type:1,
|
||
content:`
|
||
<div class="playerinfo">
|
||
<div class="boxs">
|
||
<p class="my-event">飞手信息 | Pilot Information</p>
|
||
<div class="list">
|
||
<div class="item">
|
||
<div class="pcitem">
|
||
<div>
|
||
<p>姓名</p>
|
||
<p>Name</p>
|
||
</div>
|
||
<div>${item.player.real_name}</div>
|
||
</div>
|
||
<div class="pcitem">
|
||
<div>
|
||
<p>性别</p>
|
||
<p>Gender</p>
|
||
</div>
|
||
<div>${item.player.gender}</div>
|
||
</div>
|
||
</div>
|
||
<div class="item">
|
||
<div class="pcitem">
|
||
<div>
|
||
<p>出生日期</p>
|
||
<p>Birth</p>
|
||
</div>
|
||
<div>${item.player.birthday}</div>
|
||
</div>
|
||
<div class="pcitem">
|
||
<div>
|
||
<p>国籍</p>
|
||
<p>Nationality</p>
|
||
</div>
|
||
<div>${item.player.country}</div>
|
||
</div>
|
||
</div>
|
||
<div class="item">
|
||
<div class="pcitem">
|
||
<div>
|
||
<p>居住地</p>
|
||
<p>To Live</p>
|
||
</div>
|
||
<div>${item.player.province}${item.player.city=='选择'?'':item.player.city}${item.player.district=='选择'?'':item.player.district}</div>
|
||
</div>
|
||
<div class="pcitem">
|
||
<div>
|
||
<p>地址</p>
|
||
<p>Address</p>
|
||
</div>
|
||
<div>${item.player.address}</div>
|
||
</div>
|
||
</div>
|
||
<div class="item">
|
||
<div class="pcitem">
|
||
<div>
|
||
<p>照片</p>
|
||
<p>Photo</p>
|
||
</div>
|
||
<div><img src="${pic}" width="150" onerror="javascript:this.src=${pic2}"></div>
|
||
</div>
|
||
<div class="pcitem">
|
||
<div>
|
||
<p>辅导员姓名</p>
|
||
<p>Counselor Name</p>
|
||
</div>
|
||
<div>${item.player.counselor_name}</div>
|
||
</div>
|
||
</div>
|
||
<div class="item">
|
||
<div class="pcitem">
|
||
<div>
|
||
<p>ASFC会员</p>
|
||
<p>ASFC User</p>
|
||
</div>
|
||
<div>${item.player.asfc_user?'是':'否'}</div>
|
||
</div>
|
||
<div class="pcitem">
|
||
<div>
|
||
<p>飞行证号</p>
|
||
<p>Flight Number</p>
|
||
</div>
|
||
<div>${item.player.flight_number}</div>
|
||
</div>
|
||
</div>
|
||
<div class="item">
|
||
|
||
<div class="pcitem">
|
||
<div>
|
||
<p>联系电话</p>
|
||
<p>Contact</p>
|
||
</div>
|
||
<div>${item.player.phone}</div>
|
||
</div>
|
||
<div class="pcitem">
|
||
|
||
</div>
|
||
</div>
|
||
<div class="item">
|
||
<div class="pcitem">
|
||
<div>
|
||
<p>参赛获奖经历</p>
|
||
<p>Entries And Awards</p>
|
||
</div>
|
||
<div>${item.player.experience}</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
`,
|
||
shadeClose: true,
|
||
closeBtn:0,
|
||
area:['60%','80%']
|
||
})
|
||
|
||
}
|
||
})
|
||
// 上传协议
|
||
$('.upload').click(function(){
|
||
const thats=$(this);
|
||
layer.open({
|
||
title:false,
|
||
type:1,
|
||
content:`<div class="upbox">
|
||
<p>运动员签字并加盖参赛主体公章的《2024中国无人机竞速联赛运动员参赛协议》,以PDF格式文件上传。</p>
|
||
<div class="layui-upload-drag upfile" input-id="promise_stuff">
|
||
<i class="layui-icon"></i>
|
||
<p>上传文件</p>
|
||
</div>
|
||
<input type="hidden" name="promise_stuff" id="promise_stuff">
|
||
<p><a href="" download>参赛协议模板下载</a></p>
|
||
</div>
|
||
`,
|
||
|
||
shadeClose: false,
|
||
closeBtn:0,
|
||
btn:['提交','取消'],
|
||
maxWidth:'auto',
|
||
yes:function(){
|
||
$.post('/index/club/send_protocol',{
|
||
protocol:$('#promise_stuff').val(),
|
||
player_id:thats.attr('player_id')
|
||
},function(res){
|
||
if(res.code){
|
||
location.reload();
|
||
}
|
||
layer.msg(res.msg)
|
||
})
|
||
},
|
||
btn2:function(){
|
||
layer.confirm('您还未提交,确定要取消吗?',{
|
||
title:'',
|
||
closeBtn:0
|
||
},function(){
|
||
layer.closeAll()
|
||
});
|
||
return false;
|
||
}
|
||
})
|
||
|
||
//文件上传
|
||
upload.render({
|
||
elem: '.upfile'
|
||
,url: '{:url("/api/common/upload")}'
|
||
,multiple: true
|
||
,accept:"file",
|
||
size:20480,
|
||
exts:'pdf'
|
||
,done: function(res,index){
|
||
layer.msg('上传成功');
|
||
var element = this.item[0];
|
||
var input = element.getAttribute("input-id");
|
||
element.innerHTML = "<img width=120 height=120 src='/assets/addons/cms/img/fulesuccess.png'>";
|
||
$("#"+input).val(res.data.fullurl);
|
||
layer.closeAll('loading');
|
||
}
|
||
,error: function(index, upload){
|
||
layer.msg('上传失败');
|
||
layer.closeAll('loading');
|
||
}
|
||
});
|
||
})
|
||
}
|
||
// 获取飞手列表
|
||
let page=1;
|
||
$.get('/index/club/myplayer_data',{
|
||
page
|
||
},function(res){
|
||
if(res.total>0){
|
||
getlist(res.data)
|
||
// 分页
|
||
laypage.render({
|
||
elem: 'page',
|
||
limit: 10,
|
||
count: res.total,
|
||
layout: ['count', 'prev', 'page', 'next'],
|
||
prev: '<em><</em>',
|
||
next: '<em>></em>',
|
||
theme: '#C2C2C2',
|
||
curr: page,
|
||
jump: function(obj){
|
||
$.get('/index/club/myplayer_data',{
|
||
page:obj.curr
|
||
},function(data){
|
||
getlist(data.data)
|
||
})
|
||
}
|
||
})
|
||
}else{
|
||
$('.clublist .list').html('<div class="nofly"><p>飞手公会栏目邀请飞手加入队伍,飞手同意后可管理飞手</p></div>')
|
||
}
|
||
})
|
||
})
|
||
|
||
</script> |