Prechádzať zdrojové kódy

wesmiler 报恩寺项目提交

wesmiler 3 rokov pred
rodič
commit
fdf983ca3b

+ 2 - 2
app/Services/ArticleCatesService.php

@@ -55,11 +55,11 @@ class ArticleCatesService extends BaseService
         $params = request()->all();
         $num = isset($params['num'])? $params['num'] : 0;
         $type = isset($params['type'])? $params['type'] : 0;
-        $where = ['status'=> 1];
+        $where = ['status'=>1];
         if($type>0){
             $where['type'] = $type;
         }
-        $datas = $this->model->where($type)
+        $datas = $this->model->where($where)
             ->select(['id','pid','name','status'])
             ->orderBy('sort','asc')
             ->limit($num? $num : 999999)

+ 3 - 1
app/Services/ArticleService.php

@@ -250,11 +250,13 @@ class ArticleService extends BaseService
         if (strpos($image, "temp")) {
             $data['thumb'] = save_image($image, 'item');
         } else {
-            $data['thumb'] = str_replace(IMG_URL, "", $data['thumb']);
+            $data['thumb'] = is_array($data['thumb'])? '' : str_replace(IMG_URL, "", $data['thumb']);
         }
 
         $data['update_time'] = time();
         $data['publish_at'] = isset($data['publish_at']) && $data['publish_at']? $data['publish_at'] : date('Y-m-d H:i:s');
+        var_dump($data);
+        return false;
         return parent::edit($data); // TODO: Change the autogenerated stub
     }
 

+ 1 - 1
app/Services/MemberService.php

@@ -73,7 +73,7 @@ class MemberService extends BaseService
             $data['avatar'] = str_replace(IMG_URL, "", $data['avatar']);
         }
         // 出生日期
-        if ($data['birthday']) {
+        if (isset($data['birthday']) &&  $data['birthday']) {
             $data['birthday'] = strtotime($data['birthday']);
         }
         // 城市处理

BIN
public/uploads/img/20210901/612f3e57d5852.jpg


BIN
public/uploads/img/20210901/612f3ec614175.jpg


BIN
public/uploads/img/20210901/612f4619184de.jpg


BIN
public/uploads/img/20210901/612f46738f136.jpg


BIN
public/uploads/img/20210901/612f475aaf702.jpg