فهرست منبع

个人资料接口

lizhen_gitee 1 سال پیش
والد
کامیت
ea8c138fd9
3فایلهای تغییر یافته به همراه14 افزوده شده و 6 حذف شده
  1. 10 0
      application/api/controller/User.php
  2. 1 1
      application/common/library/Auth.php
  3. 3 5
      application/extra/site.php

+ 10 - 0
application/api/controller/User.php

@@ -349,6 +349,16 @@ class User extends Api
         }
     }
 
+    //用户详细资料
+    public function getUserinfo($type = 1){
+        $info = $this->auth->getUserinfo();
+        if($type == 'return'){
+            return $info;
+        }
+        $this->success(__('success'),$info);
+    }
+
+
     /**
      * 获取用户openid
      */

+ 1 - 1
application/common/library/Auth.php

@@ -26,7 +26,7 @@ class Auth
     //默认配置
     protected $config = [];
     protected $options = [];
-    protected $allowFields = ['id', 'username', 'nickname', 'mobile', 'avatar', 'score'];
+    protected $allowFields = ['id', 'username', 'nickname', 'avatar','mini_openid'];
 
     public function __construct($options = [])
     {

+ 3 - 5
application/extra/site.php

@@ -1,7 +1,7 @@
 <?php
 
 return array (
-  'name' => '视频教育',
+  'name' => '研学报名',
   'beian' => '',
   'cdnurl' => '',
   'version' => '1.0.1',
@@ -24,8 +24,8 @@ return array (
   array (
     'basic' => '基础配置',
     'dictionary' => '字典配置',
-    'service' => '金钱配置',
     'website' => '站点配置',
+    'service' => '系统配置',
   ),
   'mail_type' => '1',
   'mail_smtp_host' => 'smtp.qq.com',
@@ -40,7 +40,5 @@ return array (
     'category2' => '分类二',
     'custom' => '自定义',
   ),
-  'withdrawal_service_fee' => '2',
-  'min_withdrawal_money' => '0.3',
-  'max_withdrawal_money' => '1000000',
+  'contactus' => '400123456',
 );