作者 王晓刚
1 个管道 的构建 通过 耗费 1 秒

商户申请

... ... @@ -28,6 +28,10 @@ class Collect extends WechatBase
}
public function index(){
$user = Db::name('user')->where(['id'=>$this->user_id])->find();
if(empty($user)){
$this->error('查无此人');
}
$data = Db::name('collect')
->alias('c')
->field('g.*,c.id as c_id')
... ... @@ -36,6 +40,7 @@ class Collect extends WechatBase
foreach($data as $key => $vo){
$data[$key]['end_time'] = date('Y-m-d',$vo['end_time']);
}
$this->assign('user',$user);
$this->assign('data',$data);
$this->assign('title','我的收藏');
return $this->fetch();
... ...
... ... @@ -48,11 +48,12 @@
//加载更多
$(".load_more").click(function () {
var page = $('#page').val();
var user_id = "{$user.id}";
page++;
$.ajax({
url:"{:url('home/collect/more')}",
type:"POST",
data:{'page':page},
data:{'page':page,'user_id':user_id},
success:function(res){
if(res.code == 1){
if(res.data == ''){
... ...