Browse Source

试课的资料放到注册里来

lizhen_gitee 1 year ago
parent
commit
5fdfa06155
2 changed files with 9 additions and 4 deletions
  1. 4 3
      application/api/controller/Trylesson.php
  2. 5 1
      application/api/controller/User.php

+ 4 - 3
application/api/controller/Trylesson.php

@@ -62,8 +62,8 @@ class Trylesson extends Api
         }
 
         //试课数据
-        $field = ['firstname','lastname','mobile','email','height','age','weight','address','health','emergency','comefrom','is_first'];
-        $data = request_post_hub($field);
+//        $field = ['firstname','lastname','mobile','email','height','age','weight','address','health','emergency','comefrom','is_first'];
+//        $data = request_post_hub($field);
 
         $sysdata = [
             'order_no'     => createUniqueNo('T',$this->auth->id),
@@ -77,7 +77,8 @@ class Trylesson extends Api
             'starttime'   => time(),
             'endtime'     => time() + (30 * 86400),
         ];
-        $data = array_merge($data,$sysdata);
+//        $data = array_merge($data,$sysdata);
+        $data = $sysdata;
 
         //支付订单数据
         $pay_order = [];

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

@@ -168,7 +168,11 @@ class User extends Api
             'age'          => input('age',''),
             'weight'       => input('weight',''),
             'address'      => input('address',''),
-            'knowus'       => input('knowus','')
+            'knowus'       => input('knowus',''),
+
+            'health'       => input('health',''),
+            'emergency'    => input('emergency',''),
+            'is_first'     => input('is_first',''),
         ];
         $ret = $this->auth->register('', $password, $email, $fullmobile, $extend);
         if ($ret) {