huangsijun
2025-09-22 a78c011de350b188afb03beb2f26a73f35f71986
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
 
namespace app\shop\controller\plus\live;
 
use app\shop\controller\Controller;
use app\shop\model\plus\live\WxLive as WxLiveModel;
 
/**
 * 微信小程序直播控制器
 */
class Wx extends Controller
{
    /**
     *直播列表
     */
    public function index()
    {
        $model = new WxLiveModel();
        $list = $model->getList($this->postData());
        return $this->renderSuccess('', compact('list'));
    }
 
    /**
     *直播列表同步
     */
    public function syn()
    {
        $model = new WxLiveModel();
        if($model->syn()){
            return $this->renderSuccess('操作成功');
        }
        return $this->renderError($model->getError() ?: '操作失败');
 
 
    }
 
    /**
     * 修改直播间置顶状态
     */
    public function settop($live_id)
    {
        // 直播间详情
        $model = WxLiveModel::detail($live_id);
        if (!$model->setTop($this->postData())) {
            return $this->renderError('操作失败');
        }
        return $this->renderSuccess('操作成功');
    }
}