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