wupengfei 2 years ago
parent
commit
a0c05a927c
2 changed files with 3 additions and 3 deletions
  1. 2 2
      .idea/workspace.xml
  2. 1 1
      application/api/controller/UserCenter.php

+ 2 - 2
.idea/workspace.xml

@@ -3,7 +3,7 @@
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/user/controller/Member.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/user/controller/Member.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/UserCenter.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/UserCenter.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -202,7 +202,7 @@
       <workItem from="1670547445908" duration="12147000" />
       <workItem from="1670633686675" duration="15717000" />
       <workItem from="1670719843429" duration="8446000" />
-      <workItem from="1670807412269" duration="2513000" />
+      <workItem from="1670807412269" duration="3351000" />
     </task>
     <servers />
   </component>

+ 1 - 1
application/api/controller/UserCenter.php

@@ -216,7 +216,7 @@ class UserCenter extends Base
     {
         $list = UserMessage::where(['user_id'=>$this->user_id])
             ->limit($this->off_set,$this->page_num)
-            ->order(['id'=>'desc'])
+            ->order(['is_read'=>'desc','id'=>'desc'])
             ->select()->toArray();
         //if(!empty($list)) UserMessage::where('id','in',array_column($list,'id'))->update(['is_read'=>1]);
         $this->success('ok',['list'=>$list]);