rabin 6 tahun lalu
induk
melakukan
f487373ac2
2 mengubah file dengan 19 tambahan dan 2 penghapusan
  1. 12 0
      database/wechat.php
  2. 7 2
      lib/Base.php

+ 12 - 0
database/wechat.php

@@ -42,6 +42,18 @@ return array
 			//'list'		=> true,
 		),
 
+		'account_id'		=> array
+		(
+			'type' 		=> 'int-11',
+			'name' 		=> '所属账户',
+			'default' 	=> '1',
+			'desc' 		=> '所属账户',
+			'match' 	=> 'is_numeric',
+			//'option' 	=> $level,
+			//'update'	=> 'select',
+			//'list'		=> true,
+		),
+
 		'uid'		=> array
 		(
 			'type' 		=> 'int-11',

+ 7 - 2
lib/Base.php

@@ -144,7 +144,10 @@ class Base
             $wechat['openid'] = $data['openid'];
             $wechat['expires_in'] = $data['expires_in'];
             $wechat['refresh_token'] = $data['refresh_token'];
-            $wechat['account_id'] = $account;
+            if ($account) {
+                $wechat['account_id'] = $account;
+            }
+            
             if ($system) {
                 $wechat['system_id'] = $system;
             }
@@ -176,7 +179,9 @@ class Base
             $wechat['expires_in'] = $data['expires_in'];
             $wechat['refresh_token'] = $data['refresh_token'];
             $wechat['where_id'] = $info['id'];
-            $wechat['account_id'] = $account;
+            if ($account) {
+                $wechat['account_id'] = $account;
+            }
             if ($system) {
                 $wechat['system_id'] = $system;
             }