$this->auth->company_id, ]; $store = Db::name('banner')->where($where)->order('weigh asc,id asc')->select(); $store = list_domain_image($store,['image']); $this->success(1,$store); } //设置轮播图 public function edit(){ $index = input('images',''); Db::name('banner')->where('company_id',$this->auth->company_id)->delete(); $data = []; if(!empty($index)){ $index = explode(',',$index); foreach($index as $key => $val){ $data[] = [ 'company_id' => $this->auth->company_id, 'image' => $val, 'position' => 0, 'status' => 1, 'createtime' => time(), 'updatetime' => time(), ]; } } if(!empty($data)){ Db::name('banner')->insertAll($data); } $this->success(); } }