Browse Source

首页基础数据

afa 4 months ago
parent
commit
c3e846e01f

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

@@ -48,7 +48,7 @@ class Home extends Api
             ->where('is_show', $announcement::Normal)
             ->where('to_lang', $this->lan)
             ->limit(0,10)
-            ->order('id DESC,weigh desc')
+            ->order('weigh desc,id DESC')
             ->select();
 
         // 最新公告

+ 0 - 1
application/api/controller/User.php

@@ -153,7 +153,6 @@ class User extends Api
             if(isset($param['area_code']) && isset($param['area_name'])){
                 $resp = $userArea::setUserAddress($this->auth->id, $param['area_code'], $param['area_name']);
             }else{
-
                 $resp = $userModel::where('id', $this->auth->id)->update($param);
             }
             // 提交事务

+ 1 - 7
application/common/model/Synthesis.php

@@ -58,13 +58,7 @@ class Synthesis extends Model
 
 
 
-    protected static function init()
-    {
-        self::afterInsert(function ($row) {
-            $pk = $row->getPk();
-            $row->getQuery()->where($pk, $row[$pk])->update(['weigh' => $row[$pk]]);
-        });
-    }
+   
 
 
     public function getStartTimeTextAttr($value, $data)