xieruidong il y a 2 ans
Parent
commit
cc114626ef
2 fichiers modifiés avec 2 ajouts et 3 suppressions
  1. 1 2
      application/admin/model/Admin.php
  2. 1 1
      application/api/controller/User.php

+ 1 - 2
application/admin/model/Admin.php

@@ -2,14 +2,13 @@
 
 namespace app\admin\model;
 
-use app\common\model\MobileHoldLog;
-use app\common\model\MobileOrderRefundLog;
 use think\db\Query;
 use think\Model;
 use think\Session;
 /**
  *@method static Query|static proxy()
  *@method static Query|static sub()
+ * @property bool is_seller
  */
 class Admin extends Model
 {

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

@@ -174,7 +174,7 @@ class User extends Api
         }
         if(!empty($input['frommanager']) && is_numeric($input['frommanager'])){
             $admin=Admin::find($input['frommanager']);
-            if(!$admin){
+            if(!$admin && !$admin->is_seller){
                 $this->error('无效的销售经理');
             }
         }