ApiJson(); } /** * 获取公告列表 * * @author 许祖兴 < zuxing.xu@lettered.cn> * @date 2020/7/6 11:55 * * @return \think\response\Json * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\ModelNotFoundException * @throws \think\exception\DbException */ public function getNoticeList() { // 分类 1 是公告 $article = model('common/Article') ->where(['category_id' => 1]) ->select(); return $this->ApiJson(0,'获取列表成功', $article); } /** * 获取详细信息 * * @author 许祖兴 < zuxing.xu@lettered.cn> * @date 2020/7/6 11:56 * * @param $id * @return \think\response\Json */ public function getNoticeInfo($id) { return $this->ApiJson(0,"OK",model('common/Article')->getBy(['id' => $id])); } /** * 获取商城配置 * * @author 许祖兴 < zuxing.xu@lettered.cn> * @date 2020/7/7 15:02 * * @return \think\response\Json */ public function getSetting() { // 加载用户 $config['user'] = sys_config('','user'); // 加载基础配置 $config['store'] = sys_config('','store'); // 加载条款 $config['clause'] = sys_config('','clause'); $config['agent'] = sys_config('','agent'); $config['driver'] = sys_config('','driver'); return $this->ApiJson(0,"OK", $config); } /** * 获取关于我们 * * @author 许祖兴 < zuxing.xu@lettered.cn> * @date 2020/7/7 14:46 * * @return \think\response\Json */ public function getAbout() { return $this->ApiJson(0,"OK", sys_config('about','store')); } /** * 获取关于我们 * * @author 许祖兴 < zuxing.xu@lettered.cn> * @date 2020/7/7 14:46 * * @return \think\response\Json */ public function getContact() { return $this->ApiJson(0,"OK", sys_config('about','store')); } }