103 lines
2.9 KiB
PHP
103 lines
2.9 KiB
PHP
@extends('layouts.app')
|
||
@section('content')
|
||
<section class="padding_btm" >
|
||
<!--我的粉丝-->
|
||
<div class="fans_account">
|
||
我的课粉<span>{{ $listsCount }}人</span>
|
||
</div>
|
||
@if($lists->isEmpty())
|
||
<!--无粉丝-->
|
||
<div class="empty">
|
||
<img src="/assets/home/img/k_null2.jpg">
|
||
<p>您还没有课粉</p>
|
||
</div>
|
||
<!--end 无粉丝-->
|
||
@else
|
||
<ul class="fans_list">
|
||
@include('team.item')
|
||
</ul>
|
||
@endif
|
||
|
||
</section>
|
||
|
||
@endsection
|
||
@section('script')
|
||
<script type="text/javascript">
|
||
function copy(str)
|
||
{
|
||
var save = function (e){
|
||
e.clipboardData.setData('text/plain',str);
|
||
e.preventDefault();
|
||
}
|
||
document.addEventListener('copy',save);
|
||
document.execCommand("copy");
|
||
}
|
||
|
||
function refjs()
|
||
{
|
||
$(".wechat").on("click",function(){
|
||
var wechat=$(this).data('wechat');
|
||
if(wechat==''){
|
||
updateAlert('没有推荐人或推荐人没有绑定微信');
|
||
}else{
|
||
copy(wechat);
|
||
updateAlert('微信号已复制,长按粘贴去微信联系ta吧');
|
||
}
|
||
});
|
||
|
||
$("#node").change(function(data){
|
||
var node = $(this).val();
|
||
location.href = "{{ route('team.index') }}/" + node;
|
||
});
|
||
|
||
$('[data-href]').on('click', function(event) {
|
||
event.preventDefault();
|
||
if ($(this).hasClass('ajax-get') || $(this).hasClass('ajax-post')) {
|
||
return;
|
||
}
|
||
location.href = $(this).data('href');
|
||
});
|
||
}
|
||
|
||
$(function(){
|
||
refjs();
|
||
})
|
||
|
||
|
||
$(".nextpage").on('click',function(){
|
||
var $this = $(this);
|
||
if($this.data('end')==1){
|
||
updateAlert('已经到最后一页',false);
|
||
return false;
|
||
}
|
||
$this.removeClass('bg_see');
|
||
$this.addClass('loading');
|
||
$this.addClass('loading-light');
|
||
$this.addClass('gray');
|
||
var page=$this.data('page');
|
||
var content=$this.data('content');
|
||
var href=$this.data('posturl');
|
||
var query=$this.data('qkey')+"&page="+(page+1);
|
||
$.get(href,query,function(data){
|
||
if(data.statusCode==200){
|
||
$("#"+content).append(data.message);
|
||
$this.data('page',(page+1));
|
||
$this.removeClass('loading');
|
||
$this.removeClass('loading-light');
|
||
$this.removeClass('gray');
|
||
$this.addClass('bg_see');
|
||
if($this.hasClass('refjs')){
|
||
refjs();
|
||
}
|
||
} else {
|
||
updateAlert(data.msg,false);
|
||
$this.data('end',1);
|
||
$this.removeClass('loading');
|
||
$this.removeClass('loading-light');
|
||
$this.text('已经到最后一页');
|
||
}
|
||
});
|
||
});
|
||
</script>
|
||
@endsection
|