data($result); } /** * @notes 首页轮播图列表 * @return \think\response\Json * @author 胥聪 * @date 2025/11/11 14:07 */ public function carouselLists(){ $result = IndexLogic::carouselLists(); return $this->success('查询成功', $result, 1, 1); } /** * @notes 全局配置 * @return Json * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException * @author 段誉 * @date 2022/9/21 19:41 */ public function config() { $result = IndexLogic::getConfigData(); return $this->data($result); } /** * @notes 政策协议 * @return Json * @author 段誉 * @date 2022/9/20 20:00 */ public function policy() { $type = $this->request->get('type/s', ''); $result = IndexLogic::getPolicyByType($type); return $this->data($result); } /** * @notes 装修信息 * @return Json * @author 段誉 * @date 2022/9/21 18:37 */ public function decorate() { $id = $this->request->get('id/d'); $result = IndexLogic::getDecorate($id); return $this->data($result); } public function test() { $result = StoreUser::select(); foreach($result as $key=>$value){ $r = TeaStore::where("id","in",$value['store_ids'])->select(); $rstore_user_id = $r['store_user_id']; foreach($r as $k=>$v){ if( $rstore_user_id == 0){ $rstore_user_id = $value['id']; }else{ $rstore_user_id.=",".$value['id']; } TeaStore::where("id",$v['id'])->update(['store_user_id'=>$rstore_user_id]); } } } }