xiaogang 4 năm trước cách đây
mục cha
commit
ad26739039

+ 1 - 0
app/Http/Controllers/Api/UserController.php

xqd
@@ -53,6 +53,7 @@ class UserController extends Controller
         if ($validator->fails()) {
             return $this->response()->errorForbidden($validator->messages()->first());
         }
+        dd($user);
         $user->sex = $request->sex;
         if (!$user->save()) {
             return $this->response->errorForbidden('设置性别失败');

+ 13 - 0
app/Models/UserLookModel.php

xqd
@@ -0,0 +1,13 @@
+<?php
+
+
+namespace App\Models;
+
+
+class UserLookModel extends BaseModel
+{
+    protected $table = 'users_look';
+    public $timestamps = false;
+    protected $fillable = ['user_id', 'look_id','atime'];
+
+}

+ 1 - 0
app/Services/DynamicService.php

xqd
@@ -107,6 +107,7 @@ class DynamicService
             $dynamic['data'][$k]['img_url'] = json_decode($v['img_url'],true);
             //$dynamic['data'][$k]['tag'] = json_decode($v['tag'],true);
             if(!empty($v['site'])){
+                $dynamic['data'][$k]['atime'] = uc_time_ago(strtotime($v['created_at']));
                 $dynamic['data'][$k]['site'] = json_decode($v['site'],true);
                 $site = json_decode($v['site'],true);
             }else{