Browse Source

Merge branch 'master' of http://git.9026.com/roobe/miao

YanaDH 7 years ago
parent
commit
fbde8c0bc1

+ 4 - 0
miaomiao/www/js/controllers/account.js

xqd
@@ -111,6 +111,10 @@
                         $http.defaults.headers.common["Authorization"] = 'Bearer ' + result.data.data.token;
                         $scope.user=storage.getObject('user');
                         $state.go('app.home');
+                        if(localStorage['jpush']){
+                            console.log("jpush: " + localStorage['jpush']);
+                            userService.jpush({ jpush: localStorage['jpush']}).then(function (result) {}, function (error) {});
+                        }
                     }, function (error) {
                         
                     });

+ 9 - 0
server/app/Http/Controllers/Api/V1/AuthController.php

xqd
@@ -29,6 +29,15 @@ class AuthController extends Controller
             return $this->api(1);
         }
     }
+
+    public function info(Request $request){
+        if($request->type==1){
+            return $this->api('用户隐私');
+        }else{
+            return $this->api('关于我们');
+        }
+    }
+
     /**
      * @api {post} /api/auth/login 登陆(login)
      * @apiDescription 登陆(login)

+ 1 - 1
server/app/Http/Controllers/Api/V1/Controller.php

xqd
@@ -30,7 +30,7 @@ class Controller extends BaseController
         $this->middleware('auth:api', [
             'except' => [
                 'upload', 'getCode', 'login', 'wechatLogin', 'alipayNotify', 'wechatpayNotify',
-                'download',  'test',
+                'download',  'test', 'info',
             ]
         ]);
 

+ 6 - 0
server/routes/api.php

xqd
@@ -52,6 +52,12 @@ $api->version('v1', ['namespace' => 'App\Http\Controllers\Api\V1'], function ($a
         'as' => 'test',
         'uses' => 'AuthController@test',
     ]);
+    // info
+    $api->get('info', [
+        'as' => 'info',
+        'uses' => 'AuthController@info',
+    ]);
+
     // Auth
     // signin
     $api->post('auth/login', [