作者 lyh

gx

@@ -36,6 +36,9 @@ class NavLogic extends BaseLogic @@ -36,6 +36,9 @@ class NavLogic extends BaseLogic
36 { 36 {
37 DB::beginTransaction(); 37 DB::beginTransaction();
38 try { 38 try {
  39 + if(isset($this->param['image']) && !empty($this->param['image'])){
  40 + $this->param['image'] = str_replace_url($this->param['image']);
  41 + }
39 if(isset($this->param['id']) && !empty($this->param['id'])){ 42 if(isset($this->param['id']) && !empty($this->param['id'])){
40 $this->handleEditParam();//验证是否可编辑分类 43 $this->handleEditParam();//验证是否可编辑分类
41 $this->model->edit($this->param,['id'=>$this->param['id']]); 44 $this->model->edit($this->param,['id'=>$this->param['id']]);
@@ -50,4 +50,17 @@ class BNav extends Base @@ -50,4 +50,17 @@ class BNav extends Base
50 { 50 {
51 return static::where(['pid'=>$id,'project_id'=>$project_id])->limit(1)->count(); 51 return static::where(['pid'=>$id,'project_id'=>$project_id])->limit(1)->count();
52 } 52 }
  53 +
  54 + /**
  55 + * @remark :获取图片
  56 + * @name :getImageAttribute
  57 + * @author :lyh
  58 + * @method :post
  59 + * @time :2023/9/18 16:20
  60 + */
  61 + public function getImageAttribute($value)
  62 + {
  63 + $value = getImageUrl($value);
  64 + return $value;
  65 + }
53 } 66 }