0
0
Files
Babyclass/resources/views/team/index.blade.php
2020-08-04 10:17:22 +08:00

103 lines
2.9 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@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