mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-14 04:32:49 +00:00
feat:强化分享链接 - 适配手机端
This commit is contained in:
parent
aa03c00dd5
commit
f57d3cf02c
@ -1215,13 +1215,41 @@ class UsersController extends AbstractController
|
|||||||
$data['nickname'] = $sharekey ? $username : $user?->nickname;
|
$data['nickname'] = $sharekey ? $username : $user?->nickname;
|
||||||
$data['token'] = $token;
|
$data['token'] = $token;
|
||||||
$data['msgs'] = $msgs;
|
$data['msgs'] = $msgs;
|
||||||
$data['sharelink'] = $meeting->getShareLink();
|
|
||||||
//
|
//
|
||||||
Meeting::setTouristInfo($data);
|
Meeting::setTouristInfo($data);
|
||||||
//
|
//
|
||||||
return Base::retSuccess('success', $data);
|
return Base::retSuccess('success', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @api {get} api/users/meeting/link 16. 【会议】获取分享链接
|
||||||
|
*
|
||||||
|
* @apiDescription 需要token身份
|
||||||
|
* @apiVersion 1.0.0
|
||||||
|
* @apiGroup users
|
||||||
|
* @apiName meeting__link
|
||||||
|
*
|
||||||
|
* @apiParam {String} meetingid 频道ID(不是数字)
|
||||||
|
* @apiParam {String} [sharekey] 分享的key
|
||||||
|
*
|
||||||
|
* @apiSuccess {Number} ret 返回状态码(1正确、0错误)
|
||||||
|
* @apiSuccess {String} msg 返回信息(错误描述)
|
||||||
|
* @apiSuccess {Object} data 返回数据
|
||||||
|
*/
|
||||||
|
public function meeting__link()
|
||||||
|
{
|
||||||
|
$meetingid = trim(Request::input('meetingid'));
|
||||||
|
$sharekey = trim(Request::input('sharekey'));
|
||||||
|
if(empty($sharekey) || !Meeting::getShareInfo($sharekey)){
|
||||||
|
User::auth();
|
||||||
|
}
|
||||||
|
$meeting = Meeting::whereMeetingid($meetingid)->first();
|
||||||
|
if (empty($meeting)) {
|
||||||
|
return Base::retError('频道ID不存在');
|
||||||
|
}
|
||||||
|
return Base::retSuccess('success', $meeting->getShareLink());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @api {get} api/users/meeting/tourist 16. 【会议】游客信息
|
* @api {get} api/users/meeting/tourist 16. 【会议】游客信息
|
||||||
*
|
*
|
||||||
|
|||||||
@ -334,43 +334,25 @@ export default {
|
|||||||
switch (act) {
|
switch (act) {
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
case "getInfo":
|
case "getInfo":
|
||||||
if( (uuid+'').indexOf('88888') !== -1 ){
|
const isTourist = (uuid+'').indexOf('88888') !== -1;
|
||||||
this.$store.dispatch("call", {
|
this.$store.dispatch("call", {
|
||||||
url: 'users/meeting/tourist',
|
url: isTourist ? 'users/meeting/tourist' : 'users/basic',
|
||||||
data: {
|
data: {
|
||||||
tourist_id: uuid
|
userid: uuid,
|
||||||
|
tourist_id: uuid,
|
||||||
|
}
|
||||||
|
}).then(({data}) => {
|
||||||
|
$A.eeuiAppSendMessage({
|
||||||
|
action: 'updateMeetingInfo',
|
||||||
|
infos: {
|
||||||
|
uuid: uuid,
|
||||||
|
avatar: isTourist ? data?.userimg : data[0]?.userimg,
|
||||||
|
username: isTourist ? data?.nickname : data[0]?.nickname,
|
||||||
}
|
}
|
||||||
}).then(({data}) => {
|
|
||||||
$A.eeuiAppSendMessage({
|
|
||||||
action: 'updateMeetingInfo',
|
|
||||||
infos: {
|
|
||||||
uuid: uuid,
|
|
||||||
avatar: data?.userimg,
|
|
||||||
username: data?.nickname,
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}).catch(({msg}) => {
|
|
||||||
$A.modalError(msg);
|
|
||||||
});
|
});
|
||||||
}else{
|
}).catch(({msg}) => {
|
||||||
this.$store.dispatch("call", {
|
$A.modalError(msg);
|
||||||
url: 'users/basic',
|
});
|
||||||
data: {
|
|
||||||
userid: [ (uuid+"").substring(5) ]
|
|
||||||
}
|
|
||||||
}).then(({data}) => {
|
|
||||||
$A.eeuiAppSendMessage({
|
|
||||||
action: 'updateMeetingInfo',
|
|
||||||
infos: {
|
|
||||||
uuid: uuid,
|
|
||||||
avatar: data[0]?.userimg,
|
|
||||||
username: data[0]?.nickname,
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}).catch(({msg}) => {
|
|
||||||
$A.modalError(msg);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
//加入成功
|
//加入成功
|
||||||
case "success":
|
case "success":
|
||||||
|
|||||||
@ -73,7 +73,7 @@
|
|||||||
<i class="taskfont" v-html="localUser.videoTrack ? '' : ''"></i>
|
<i class="taskfont" v-html="localUser.videoTrack ? '' : ''"></i>
|
||||||
</Button>
|
</Button>
|
||||||
<template v-if="windowPortrait">
|
<template v-if="windowPortrait">
|
||||||
<Button type="primary" @click="onInvitation('open')">
|
<Button type="primary" :loading="linkCopyLoad" @click="onInvitation('open')">
|
||||||
<i class="taskfont"></i>
|
<i class="taskfont"></i>
|
||||||
</Button>
|
</Button>
|
||||||
<Button type="primary" v-if="!addData.sharekey" @click="meetingMini = true">
|
<Button type="primary" v-if="!addData.sharekey" @click="meetingMini = true">
|
||||||
@ -113,7 +113,7 @@
|
|||||||
</FormItem>
|
</FormItem>
|
||||||
</Form>
|
</Form>
|
||||||
<div slot="footer" class="adaption">
|
<div slot="footer" class="adaption">
|
||||||
<Button type="default" @click="linkCopy">{{$L('复制链接')}}</Button>
|
<Button type="default" :loading="linkCopyLoad" @click="linkCopy">{{$L('复制链接')}}</Button>
|
||||||
<Button type="primary" :loading="invitationLoad" @click="onInvitation('submit')">{{$L('发送邀请')}}</Button>
|
<Button type="primary" :loading="invitationLoad" @click="onInvitation('submit')">{{$L('发送邀请')}}</Button>
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
@ -172,6 +172,8 @@ export default {
|
|||||||
audioTrack: null,
|
audioTrack: null,
|
||||||
videoTrack: null,
|
videoTrack: null,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
linkCopyLoad: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -279,7 +281,6 @@ export default {
|
|||||||
}).then(({data}) => {
|
}).then(({data}) => {
|
||||||
this.$set(this.addData, 'name', data.name);
|
this.$set(this.addData, 'name', data.name);
|
||||||
this.$set(this.addData, 'meetingid', data.meetingid);
|
this.$set(this.addData, 'meetingid', data.meetingid);
|
||||||
this.$set(this.addData, 'sharelink', data.sharelink);
|
|
||||||
this.$set(this.localUser, 'nickname', data.nickname);
|
this.$set(this.localUser, 'nickname', data.nickname);
|
||||||
this.$set(this.localUser, 'userimg', data.userimg);
|
this.$set(this.localUser, 'userimg', data.userimg);
|
||||||
this.$store.dispatch("saveDialogMsg", data.msgs);
|
this.$store.dispatch("saveDialogMsg", data.msgs);
|
||||||
@ -539,12 +540,25 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
linkCopy() {
|
linkCopy() {
|
||||||
this.$copyText(this.addData.sharelink).then(_ => {
|
this.linkCopyLoad = true;
|
||||||
$A.messageSuccess('已复制会议邀请链接');
|
this.$store.dispatch("call", {
|
||||||
}).catch(_ => {
|
url: 'users/meeting/link',
|
||||||
$A.messageError('复制失败');
|
data: {
|
||||||
|
meetingid: this.addData.meetingid || this.invitationData.meetingid,
|
||||||
|
sharekey: this.addData.sharekey
|
||||||
|
},
|
||||||
|
}).then(({ data }) => {
|
||||||
|
this.$copyText(data).then(_ => {
|
||||||
|
$A.messageSuccess('已复制会议邀请链接');
|
||||||
|
}).catch(_ => {
|
||||||
|
$A.messageError('复制失败');
|
||||||
|
});
|
||||||
|
this.invitationShow = false;
|
||||||
|
}).catch(({ msg }) => {
|
||||||
|
$A.modalError(msg);
|
||||||
|
}).finally(_ => {
|
||||||
|
this.linkCopyLoad = false;
|
||||||
});
|
});
|
||||||
this.invitationShow = false;
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user