1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?php
-
-
- namespace app\api\controller;
-
-
- use app\api\logic\CommunityUserLogic;
- use app\common\basics\Api;
- use app\common\server\JsonServer;
-
-
- class CommunityUser extends Api
- {
-
-
-
- public function center()
- {
- $get = $this->request->get();
- $result = CommunityUserLogic::getCenterInfo($this->user_id, $get);
- return JsonServer::success('', $result);
- }
-
-
-
-
-
- public function getSetting()
- {
- $result = CommunityUserLogic::getSetting($this->user_id);
- return JsonServer::success('', $result);
- }
-
-
-
-
-
- public function setSetting()
- {
- $post = $this->request->post();
- $result = CommunityUserLogic::setSetting($this->user_id, $post);
- if (false === $result) {
- return JsonServer::error(CommunityUserLogic::getError() ?: '设置失败');
- }
- return JsonServer::success('操作成功');
- }
-
-
- }
|