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

98 lines
3.1 KiB
PHP
Raw 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')
<link rel="stylesheet" href="css/user.css" type="text/css" />
<section class="padding_btm">
<!--我的粉丝-->
<div class="j_account_money">
我的关注<span>{{ $children_count }}</span>
&nbsp;&nbsp;<button class="btn yellow circle" type="button" data-href="{{ route('team.index') }}">我的粉丝</button>
</div>
<ul class="j_people_list" id="content-page">
@include('team.item')
</ul>
<!--end 我的粉丝-->
<div class="btn fluid nextpage refjs more_27 bg_see" data-posturl="{{ route('team.novip') }}" data-page="1" data-qkey="" data-content="content-page">查看更多内容</div>
</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