|
@@ -1,108 +0,0 @@
|
|
|
-<?php
|
|
|
|
|
-
|
|
|
|
|
-namespace App\Http\Controllers\Api\v1;
|
|
|
|
|
-
|
|
|
|
|
-use App\Http\Controllers\Api\webApp;
|
|
|
|
|
-use App\Services\Api\MeetingService;
|
|
|
|
|
-use App\Services\MpService;
|
|
|
|
|
-
|
|
|
|
|
-/**
|
|
|
|
|
- * 会议管理
|
|
|
|
|
- * @package App\Http\Controllers\Api
|
|
|
|
|
- */
|
|
|
|
|
-class MeetingController extends webApp
|
|
|
|
|
-{
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- * 列表
|
|
|
|
|
- * @return array
|
|
|
|
|
- */
|
|
|
|
|
- public function index()
|
|
|
|
|
- {
|
|
|
|
|
- $params =request()->post();
|
|
|
|
|
- $pageSize = request()->post('pageSize', 15);
|
|
|
|
|
- $params['user_id'] = $this->userId;
|
|
|
|
|
- $datas = MeetingService::make()->getDataList($params, $pageSize);
|
|
|
|
|
- return message(1010, true, $datas);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- * 详情
|
|
|
|
|
- */
|
|
|
|
|
- public function info()
|
|
|
|
|
- {
|
|
|
|
|
- $params = request()->all();
|
|
|
|
|
- $id = isset($params['id'])? intval($params['id']) : 0;
|
|
|
|
|
- $type = isset($params['type']) && $params['type']? intval($params['type']) : 1;
|
|
|
|
|
- if(empty($id)){
|
|
|
|
|
- return message(1036, false);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if($info = MeetingService::make()->getInfo($id,$this->userId,$type)){
|
|
|
|
|
- return message(1010, true, $info);
|
|
|
|
|
- }else{
|
|
|
|
|
- return message(1009, false);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- * 会议链接
|
|
|
|
|
- */
|
|
|
|
|
- public function getLink()
|
|
|
|
|
- {
|
|
|
|
|
- $params = request()->all();
|
|
|
|
|
- $id = isset($params['id'])? intval($params['id']) : 0;
|
|
|
|
|
- if(empty($id)){
|
|
|
|
|
- return message(1036, false);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- if($link = MpService::make()->getMiniShareLink('pagesSub/pages/meeting/books?id='.$id,'邀请您参加会议')){
|
|
|
|
|
- return message(1010, true, $link);
|
|
|
|
|
- }else{
|
|
|
|
|
- return message(MpService::make()->getError(), false);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- * 签到
|
|
|
|
|
- */
|
|
|
|
|
- public function books()
|
|
|
|
|
- {
|
|
|
|
|
- $params = request()->post();
|
|
|
|
|
- try {
|
|
|
|
|
- if ($result = MeetingService::make()->books($this->userId, $params)) {
|
|
|
|
|
- return showJson(MeetingService::make()->getError(), true, $result);
|
|
|
|
|
- } else {
|
|
|
|
|
- return showJson(MeetingService::make()->getError(), false);
|
|
|
|
|
- }
|
|
|
|
|
- } catch (\Exception $exception) {
|
|
|
|
|
- $error = ['data' => $exception->getTrace(), 'err' => $exception->getMessage()];
|
|
|
|
|
- return showJson(1046, false, $error);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- * 签到记录
|
|
|
|
|
- */
|
|
|
|
|
- public function records()
|
|
|
|
|
- {
|
|
|
|
|
- $params = request()->post();
|
|
|
|
|
- $pageSize = request()->post('pageSize',20);
|
|
|
|
|
- try {
|
|
|
|
|
- if ($datas = MeetingService::make()->records($params,$pageSize)) {
|
|
|
|
|
- return showJson(1010, true, $datas);
|
|
|
|
|
- } else {
|
|
|
|
|
- return showJson(1009, false);
|
|
|
|
|
- }
|
|
|
|
|
- } catch (\Exception $exception) {
|
|
|
|
|
- $error = ['data' => $exception->getTrace(), 'err' => $exception->getMessage()];
|
|
|
|
|
- return showJson(1046, false, $error);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
-}
|
|
|