|
@@ -89,15 +89,10 @@ class Keepbrand extends Base
|
|
|
if(!$info) {
|
|
|
return error_show(1002, "未找到对应数据");
|
|
|
}
|
|
|
- $data = Db::name("brand")->alias('a')
|
|
|
- ->join("brand_book b","b.brand_id=a.id")
|
|
|
- ->field("b.*,a.brand_name")
|
|
|
- ->where(["b.id"=>$info['brand_id']])->find();
|
|
|
- if($data){
|
|
|
- return app_show(0,"获取成功",$data);
|
|
|
- }else{
|
|
|
- return app_show(1002,"获取失败",$data);
|
|
|
- }
|
|
|
+ $info['brand_name'] = Db::name("brand")->where(["id"=>$info['brand_id']])->value("brand_name",'');
|
|
|
+
|
|
|
+ return app_show(0,"获取成功",$info);
|
|
|
+
|
|
|
}
|
|
|
public function status(){
|
|
|
$id = isset($this->post['id']) && $this->post['id'] !==""? intval($this->post['id']):"";
|