dever 6 years ago
parent
commit
84c5024e27
2 changed files with 12 additions and 3 deletions
  1. 1 1
      database/user.php
  2. 11 2
      src/Applet.php

+ 1 - 1
database/user.php

@@ -229,7 +229,7 @@ return array
 			'match' 	=> 'is_numeric',
 			'option' 	=> $sex,
 			'update'	=> 'radio',
-			'list'		=> true,
+			//'list'		=> true,
 		),
 
 		'level'		=> array

+ 11 - 2
src/Applet.php

@@ -239,7 +239,7 @@ class Applet extends Base
         $country = Dever::input('country');
         $vid = Dever::input('vid');
 
-        $update['set_temp'] = 3;
+        $update['temp'] = 3;
         if ($vid) {
             $vinfo = Dever::load('passport/wechat-one', $vid);
 
@@ -264,7 +264,7 @@ class Applet extends Base
                     Dever::load('passport/wechat-update', $wechat);
                 }
                 
-                $update['set_temp'] = 2;
+                $update['temp'] = 2;
             }
         }
 
@@ -279,9 +279,18 @@ class Applet extends Base
                 $update['set_username'] = $name;
             }
             
+            if ($sex == 1) {
+                $update['set_sex'] = 1;
+            } elseif ($sex == 2) {
+                $update['set_sex'] = 2;
+            } else {
+                $update['set_sex'] = 3;
+            }
+            /*
             if ($sex || $sex == 0) {
                 $update['set_sex'] = $this->saveSex($sex);
             }
+            */
             
             if ($pic) {
                 //$update['set_avatar'] = $this->saveAvatar($pic);