rabin %!s(int64=3) %!d(string=hai) anos
pai
achega
63506df8ed
Modificáronse 2 ficheiros con 17 adicións e 0 borrados
  1. 14 0
      service/agent/database/member.php
  2. 3 0
      service/agent/src/My.php

+ 14 - 0
service/agent/database/member.php

@@ -946,5 +946,19 @@ return array
             'type' => 'all',
             'col' => '*',
         ),
+
+        'getOne' => array
+        (
+            # 匹配的正则或函数 选填项
+            'option' => array
+            (
+                'role' => 'yes',
+                'area' => 'yes',
+                'status' => 2,
+                'state' => 1,
+            ),
+            'type' => 'one',
+            'col' => '*',
+        ),
     ),
 );

+ 3 - 0
service/agent/src/My.php

@@ -311,6 +311,9 @@ class My extends Core
         $this->data = Dever::load('agent/lib/order')->getPrice();
         $this->data['area_string'] = Dever::load("area/api.string", $where['area'], ' / ');
         $info = Dever::db('agent/member_area')->getOne($where);
+        if (!$info) {
+            $info = Dever::db('agent/member')->getOne($where);
+        }
 
         # 1已被代理 2未被代理
         if ($info) {