Commit e25659c6 by libai

测试

parent 8f6e812a
......@@ -1049,6 +1049,7 @@
border-radius: 0.1rem;
}
.fml-ul li {
margin: 0 auto;
width: 10rem;
height: 2.2rem;
}
......@@ -1112,3 +1113,35 @@
border-radius: 1rem;
margin-bottom: 0.5rem;
}
.input-box {
height: 0.9rem;
width: 8rem;
background: #F5F5F5;
color: #8A8B8D;
margin: 0 auto;
border-radius: 1rem;
position: relative;
}
.input-box .input-btn {
background: linear-gradient(to right, #F6E7B3, #F0CC78);
font-size: 0.3rem;
width: 1.5rem;
height: 0.7rem;
line-height: 0.7rem;
text-align: center;
color: #6C4014;
border-radius: 1rem;
position: absolute;
top: 0.1rem;
right: 0.1rem;
}
.input-box input {
background: #F5F5F5;
width: 6rem;
height: 0.9rem;
position: absolute;
top: 0;
left: 0.4rem;
border-radius: 1rem;
color: #6C4014;
}
......@@ -1074,7 +1074,9 @@
}
}
.fml-ul{
li{
margin: 0 auto;
width: 10rem;
height: 2.2rem;
}
......@@ -1138,4 +1140,36 @@
border:1px solid #f0f0f0 ;
border-radius: 1rem;
margin-bottom: 0.5rem;
}
.input-box{
height: 0.9rem;
width: 8rem;
background: #F5F5F5;
color: #8A8B8D;
margin: 0 auto;
border-radius:1rem;
position: relative;
.input-btn{
background: linear-gradient(to right, #F6E7B3, #F0CC78);
font-size: 0.3rem;
width: 1.5rem;
height: 0.7rem;
line-height: 0.7rem;
text-align: center;
color: #6C4014;
border-radius: 1rem;
position: absolute;
top: 0.1rem;
right: 0.1rem;
}
input{
background: #F5F5F5;
width: 6rem;
height: 0.9rem;
position: absolute;
top: 0;
left: 0.4rem;
border-radius: 1rem;
color: #6C4014;
}
}
\ No newline at end of file
......@@ -17,6 +17,8 @@
<script src="lib/fsize.js"></script>
</head>
<body>
<div style="height: 0.2rem;"></div>
<div class="input-box"><input type="text" placeholder="请输入家族名称" maxlength="8"><div class="input-btn">搜索</div></div>
<ul class="fml-ul">
<!-- <li>
<span class="fml-span1">
......@@ -68,17 +70,77 @@
$(".exc").on("click",function(){
list()
})
function list(){
$(".input-box input").on("input",function(){
if($(".input-box input").val().length==0)list()
console.log(11)
})
$(".input-btn").on("click",function(){
$.ajax({
url:$ip+'weblive/webfamily/find.html',
data:{
family: $(".input-box input").val(),
debug:'debug'
},
type:"post",
success:function(msg){
var data=JSON.parse(msg);
console.log('主播申请列表',data)
var html=[];
$(".exc").hide()
for(var i=0;i<data.data.length;i++){
var list=data.data[i];
html+='<li>';
html+='<span class="fml-span1">';
html+='<img class="fml-face" src="https://zhibocdn.lvdou66.com/comm'+list.logo+'?x-oss-process=image/resize,w_80" alt="">';
html+='<p class="fml-p1">'+list.familyname+'</p>';
html+='<p class="fml-p2">族长:'+list.member.nickname+'</p>';
html+='</span>';
html+='<span class="fml-span2">';
if(list.isapply==1)html+='<div class="fml-btn fml-btn-yes">申请中</div>';
else html+='<div data-type='+list.familyid+' class="fml-btn fml-btn-no">申请加入</div>';
html+='</span>';
html+='</li>';
}
$(".fml-ul").html(html);
$(".fml-btn-no").unbind("click").on("click",function(){
var _self=$(this).attr("data-type")
var _this=$(this)
$.ajax({
url:$ip+'weblive/webfamily/applyadd.html',
data:{
debug:localStorage.token,
familyid:_self
},
success:function(msg){
var data=JSON.parse(msg);
console.log('家族申请入口',data)
if(data.code==1){
layer.msg("已申请成功,请等待申请结果")
_this.addClass("fml-btn-yes")
_this.text("申请中")
_this.unbind("click")
}else{
layer.msg(decodeURIComponent(data.msg));
}
}
})
})
}
})
})
function list(){
$.ajax({
url:$ip+'weblive/webfamily/lists.html',
data:{
debug:localStorage.token,
debug:'debug',
},
success:function(msg){
var data=JSON.parse(msg);
console.log('主播申请列表',data)
var html=[];
$(".exc").show()
for(var i=0;i<data.data.length;i++){
var list=data.data[i];
html+='<li>';
......
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 sign in to comment