quanwei
2025-12-04 12913c1069347ea4b1f6ab87f480da0f8d8c646a
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
<?php
 
namespace app\shop\controller\plus;
 
use app\shop\controller\Controller;
use app\shop\model\settings\Setting as SettingModel;
 
/**
 * 引导收藏控制器
 */
class Collection extends Controller
{
    /**
     * 引导收藏设置
     */
    public function index()
    {
        $key = 'collection';
        if($this->request->isGet()){
            $vars['values'] = SettingModel::getItem($key);
            return $this->renderSuccess('', compact('vars'));
        }
        $model = new SettingModel;
        if ($model->edit($key, $this->postData())) {
            return $this->renderSuccess('操作成功');
        }
    }
}