mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-12 03:01:12 +00:00
no message
This commit is contained in:
parent
ee9ad65e18
commit
0a26361724
@ -2301,7 +2301,7 @@ class ProjectController extends AbstractController
|
|||||||
$project = Project::userProject($task->project_id);
|
$project = Project::userProject($task->project_id);
|
||||||
ProjectPermission::userTaskPermission($project, ProjectPermission::TASK_MOVE, $task);
|
ProjectPermission::userTaskPermission($project, ProjectPermission::TASK_MOVE, $task);
|
||||||
//
|
//
|
||||||
if( $task->project_id == $project_id && $task->column_id == $column_id){
|
if ($task->project_id == $project_id && $task->column_id == $column_id) {
|
||||||
return Base::retSuccess('移动成功', ['id' => $task_id]);
|
return Base::retSuccess('移动成功', ['id' => $task_id]);
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -2310,7 +2310,7 @@ class ProjectController extends AbstractController
|
|||||||
if (empty($column)) {
|
if (empty($column)) {
|
||||||
return Base::retError('列表不存在');
|
return Base::retError('列表不存在');
|
||||||
}
|
}
|
||||||
if($flow_item_id){
|
if ($flow_item_id) {
|
||||||
$flowItem = projectFlowItem::whereProjectId($project->id)->whereId($flow_item_id)->first();
|
$flowItem = projectFlowItem::whereProjectId($project->id)->whereId($flow_item_id)->first();
|
||||||
if (empty($flowItem)) {
|
if (empty($flowItem)) {
|
||||||
return Base::retError('任务状态不存在');
|
return Base::retError('任务状态不存在');
|
||||||
|
|||||||
@ -615,7 +615,7 @@ class UsersController extends AbstractController
|
|||||||
public function basic()
|
public function basic()
|
||||||
{
|
{
|
||||||
$sharekey = Request::header('sharekey');
|
$sharekey = Request::header('sharekey');
|
||||||
if(empty($sharekey) || !Meeting::getShareInfo($sharekey)){
|
if (empty($sharekey) || !Meeting::getShareInfo($sharekey)) {
|
||||||
User::auth();
|
User::auth();
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
@ -768,7 +768,7 @@ class UsersController extends AbstractController
|
|||||||
//
|
//
|
||||||
if ($getCheckinMac) {
|
if ($getCheckinMac) {
|
||||||
$list->transform(function (User $user) use ($getCheckinMac) {
|
$list->transform(function (User $user) use ($getCheckinMac) {
|
||||||
if($getCheckinMac){
|
if ($getCheckinMac) {
|
||||||
$user->checkin_macs = UserCheckinMac::select(['id', 'mac', 'remark'])->whereUserid($user->userid)->orderBy('id')->get();
|
$user->checkin_macs = UserCheckinMac::select(['id', 'mac', 'remark'])->whereUserid($user->userid)->orderBy('id')->get();
|
||||||
}
|
}
|
||||||
return $user;
|
return $user;
|
||||||
@ -1149,11 +1149,11 @@ class UsersController extends AbstractController
|
|||||||
$sharekey = trim(Request::input('sharekey'));
|
$sharekey = trim(Request::input('sharekey'));
|
||||||
$username = trim(Request::input('username'));
|
$username = trim(Request::input('username'));
|
||||||
$user = null;
|
$user = null;
|
||||||
if(!empty($sharekey) && $type === 'join'){
|
if (!empty($sharekey) && $type === 'join') {
|
||||||
if(!Meeting::getShareInfo($sharekey)){
|
if (!Meeting::getShareInfo($sharekey)) {
|
||||||
return Base::retError('分享链接已过期');
|
return Base::retError('分享链接已过期');
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
$user = User::auth();
|
$user = User::auth();
|
||||||
}
|
}
|
||||||
$isCreate = false;
|
$isCreate = false;
|
||||||
@ -1187,9 +1187,9 @@ class UsersController extends AbstractController
|
|||||||
if (empty($meetingSetting['appid']) || empty($meetingSetting['app_certificate'])) {
|
if (empty($meetingSetting['appid']) || empty($meetingSetting['app_certificate'])) {
|
||||||
return Base::retError('会议功能配置错误,请联系管理员');
|
return Base::retError('会议功能配置错误,请联系管理员');
|
||||||
}
|
}
|
||||||
$uid = intval(str_pad(Base::generatePassword(4,1), 9, 8, STR_PAD_LEFT));
|
$uid = intval(str_pad(Base::generatePassword(4, 1), 9, 8, STR_PAD_LEFT));
|
||||||
if($user){
|
if ($user) {
|
||||||
$uid = intval(str_pad(Base::generatePassword(5,1), 6, 9, STR_PAD_LEFT).$user->userid);
|
$uid = intval(str_pad(Base::generatePassword(5, 1), 6, 9, STR_PAD_LEFT) . $user->userid);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
$service = new AgoraTokenGenerator($meetingSetting['appid'], $meetingSetting['app_certificate'], $meeting->channel, $uid);
|
$service = new AgoraTokenGenerator($meetingSetting['appid'], $meetingSetting['app_certificate'], $meeting->channel, $uid);
|
||||||
@ -1220,7 +1220,7 @@ class UsersController extends AbstractController
|
|||||||
//
|
//
|
||||||
$data['appid'] = $meetingSetting['appid'];
|
$data['appid'] = $meetingSetting['appid'];
|
||||||
$data['uid'] = $uid;
|
$data['uid'] = $uid;
|
||||||
$data['userimg'] = $sharekey ? Base::fillUrl('avatar/'.$username.'.png') : $user?->userimg;
|
$data['userimg'] = $sharekey ? Base::fillUrl('avatar/' . $username . '.png') : $user?->userimg;
|
||||||
$data['nickname'] = $sharekey ? $username : $user?->nickname;
|
$data['nickname'] = $sharekey ? $username : $user?->nickname;
|
||||||
$data['token'] = $token;
|
$data['token'] = $token;
|
||||||
$data['msgs'] = $msgs;
|
$data['msgs'] = $msgs;
|
||||||
@ -1249,7 +1249,7 @@ class UsersController extends AbstractController
|
|||||||
{
|
{
|
||||||
$meetingid = trim(Request::input('meetingid'));
|
$meetingid = trim(Request::input('meetingid'));
|
||||||
$sharekey = trim(Request::input('sharekey'));
|
$sharekey = trim(Request::input('sharekey'));
|
||||||
if(empty($sharekey) || !Meeting::getShareInfo($sharekey)){
|
if (empty($sharekey) || !Meeting::getShareInfo($sharekey)) {
|
||||||
User::auth();
|
User::auth();
|
||||||
}
|
}
|
||||||
$meeting = Meeting::whereMeetingid($meetingid)->first();
|
$meeting = Meeting::whereMeetingid($meetingid)->first();
|
||||||
@ -1970,7 +1970,7 @@ class UsersController extends AbstractController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if($type == 'file'){
|
if ($type == 'file') {
|
||||||
$lists[] = [
|
$lists[] = [
|
||||||
'type' => 'children',
|
'type' => 'children',
|
||||||
'url' => Base::fillUrl("api/users/share/list") . "?pid=0",
|
'url' => Base::fillUrl("api/users/share/list") . "?pid=0",
|
||||||
|
|||||||
@ -44,12 +44,12 @@ class Meeting extends AbstractModel
|
|||||||
public function getShareLink()
|
public function getShareLink()
|
||||||
{
|
{
|
||||||
$code = base64_encode("{$this->meetingid}" . Base::generatePassword());
|
$code = base64_encode("{$this->meetingid}" . Base::generatePassword());
|
||||||
Cache::put(self::CACHE_KEY.'_'.$code, [
|
Cache::put(self::CACHE_KEY . '_' . $code, [
|
||||||
'id' => $this->id,
|
'id' => $this->id,
|
||||||
'meetingid' => $this->meetingid,
|
'meetingid' => $this->meetingid,
|
||||||
'channel' => $this->channel,
|
'channel' => $this->channel,
|
||||||
], Carbon::now()->addHours(self::CACHE_EXPIRED_TIME));
|
], Carbon::now()->addHours(self::CACHE_EXPIRED_TIME));
|
||||||
return Base::fillUrl("meeting/{$this->meetingid}/".$code);
|
return Base::fillUrl("meeting/{$this->meetingid}/" . $code);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -58,19 +58,19 @@ class Meeting extends AbstractModel
|
|||||||
*/
|
*/
|
||||||
public static function getShareInfo($code)
|
public static function getShareInfo($code)
|
||||||
{
|
{
|
||||||
if(Cache::has(self::CACHE_KEY.'_'.$code)){
|
if (Cache::has(self::CACHE_KEY . '_' . $code)) {
|
||||||
return Cache::get(self::CACHE_KEY.'_'.$code);
|
return Cache::get(self::CACHE_KEY . '_' . $code);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存访客信息
|
* 保存访客信息
|
||||||
* @return mixed
|
* @return void
|
||||||
*/
|
*/
|
||||||
public static function setTouristInfo($data)
|
public static function setTouristInfo($data)
|
||||||
{
|
{
|
||||||
Cache::put(Meeting::CACHE_KEY.'_'.$data['uid'], [
|
Cache::put(Meeting::CACHE_KEY . '_' . $data['uid'], [
|
||||||
'uid' => $data['uid'],
|
'uid' => $data['uid'],
|
||||||
'userimg' => $data['userimg'],
|
'userimg' => $data['userimg'],
|
||||||
'nickname' => $data['nickname'],
|
'nickname' => $data['nickname'],
|
||||||
@ -83,8 +83,8 @@ class Meeting extends AbstractModel
|
|||||||
*/
|
*/
|
||||||
public static function getTouristInfo($touristId)
|
public static function getTouristInfo($touristId)
|
||||||
{
|
{
|
||||||
if(Cache::has(Meeting::CACHE_KEY.'_'.$touristId)){
|
if (Cache::has(Meeting::CACHE_KEY . '_' . $touristId)) {
|
||||||
return Cache::get(Meeting::CACHE_KEY.'_'.$touristId);
|
return Cache::get(Meeting::CACHE_KEY . '_' . $touristId);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user