作者 郭静帆
1 个管道 的构建 通过 耗费 0 秒

公众号

@@ -393,6 +393,7 @@ class Index extends Api @@ -393,6 +393,7 @@ class Index extends Api
393 $deposit = new Inform; 393 $deposit = new Inform;
394 $info['inform'] = $deposit->where(['status'=>'1','job_id'=>$job_id,'deletetime'=>null])->order('id desc')->field('id,content,status,job_id')->find(); 394 $info['inform'] = $deposit->where(['status'=>'1','job_id'=>$job_id,'deletetime'=>null])->order('id desc')->field('id,content,status,job_id')->find();
395 $info->visible(['id','images','job_name','factory_price_total','factory_price','subsidy_price','salary','content','lng','lat','label_ids'])->append(['is_collect','inform']); 395 $info->visible(['id','images','job_name','factory_price_total','factory_price','subsidy_price','salary','content','lng','lat','label_ids'])->append(['is_collect','inform']);
  396 +
396 $this->success('成功',$info); 397 $this->success('成功',$info);
397 } 398 }
398 399
@@ -46,4 +46,13 @@ class Job extends Model @@ -46,4 +46,13 @@ class Job extends Model
46 } 46 }
47 return $arr; 47 return $arr;
48 } 48 }
  49 +
  50 + public function getContentAttr($value, $data)
  51 + {
  52 + $content = $data['content'];
  53 + $content = str_replace("<img src=\"/uploads", "<img src=\"" . request()->domain() . "/uploads", $content);
  54 + $content = str_replace("<video src=\"/uploads", "<video style=\"width: 100%;!important\" src=\"" . request()->domain() . "/uploads", $content);
  55 + return $content;
  56 +
  57 + }
49 } 58 }