mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-16 22:22:49 +00:00
perf: 添加会议机器人快捷菜单
This commit is contained in:
parent
ab61715973
commit
bd7228a378
@ -146,6 +146,21 @@ class UserBot extends AbstractModel
|
|||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
|
case 'meeting-alert@bot.system':
|
||||||
|
if (!Base::judgeClientVersion('0.39.89')) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
return [
|
||||||
|
[
|
||||||
|
'key' => 'meeting-create',
|
||||||
|
'label' => Doo::translate('新会议')
|
||||||
|
],
|
||||||
|
[
|
||||||
|
'key' => 'meeting-join',
|
||||||
|
'label' => Doo::translate('加入会议')
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
case 'bot-manager@bot.system':
|
case 'bot-manager@bot.system':
|
||||||
return [
|
return [
|
||||||
[
|
[
|
||||||
|
|||||||
@ -1755,40 +1755,61 @@ export default {
|
|||||||
* @param item
|
* @param item
|
||||||
*/
|
*/
|
||||||
sendQuick(item) {
|
sendQuick(item) {
|
||||||
if (item.key === "locat-checkin") {
|
switch (item.key) {
|
||||||
this.$store.dispatch('openAppMapPage', {
|
// 位置签到
|
||||||
key: item.config.key,
|
case "locat-checkin":
|
||||||
point: `${item.config.lng},${item.config.lat}`,
|
this.$store.dispatch('openAppMapPage', {
|
||||||
}).then(data => {
|
key: item.config.key,
|
||||||
if (!$A.isJson(data)) {
|
point: `${item.config.lng},${item.config.lat}`,
|
||||||
return
|
}).then(data => {
|
||||||
}
|
if (!$A.isJson(data)) {
|
||||||
if (data.distance > item.config.radius) {
|
return
|
||||||
$A.modalError(`你选择的位置「${data.title}」不在签到范围内`)
|
}
|
||||||
return
|
if (data.distance > item.config.radius) {
|
||||||
}
|
$A.modalError(`你选择的位置「${data.title}」不在签到范围内`)
|
||||||
const thumb = $A.urlAddParams('https://api.map.baidu.com/staticimage/v2', {
|
return
|
||||||
ak: item.config.key,
|
}
|
||||||
center: `${data.point.lng},${data.point.lat}`,
|
const thumb = $A.urlAddParams('https://api.map.baidu.com/staticimage/v2', {
|
||||||
markers: `${data.point.lng},${data.point.lat}`,
|
ak: item.config.key,
|
||||||
width: 800,
|
center: `${data.point.lng},${data.point.lat}`,
|
||||||
height: 480,
|
markers: `${data.point.lng},${data.point.lat}`,
|
||||||
zoom: 19,
|
width: 800,
|
||||||
copyright: 1,
|
height: 480,
|
||||||
|
zoom: 19,
|
||||||
|
copyright: 1,
|
||||||
|
})
|
||||||
|
this.sendLocationMsg({
|
||||||
|
type: 'bd',
|
||||||
|
lng: data.point.lng,
|
||||||
|
lat: data.point.lat,
|
||||||
|
title: data.title,
|
||||||
|
distance: data.distance,
|
||||||
|
address: data.address || '',
|
||||||
|
thumb
|
||||||
|
})
|
||||||
})
|
})
|
||||||
this.sendLocationMsg({
|
break;
|
||||||
type: 'bd',
|
|
||||||
lng: data.point.lng,
|
// 创建会议
|
||||||
lat: data.point.lat,
|
case "meeting-create":
|
||||||
title: data.title,
|
Store.set('addMeeting', {
|
||||||
distance: data.distance,
|
type: 'create',
|
||||||
address: data.address || '',
|
userids: [this.userId],
|
||||||
thumb
|
});
|
||||||
})
|
break;
|
||||||
})
|
|
||||||
return;
|
// 加入会议
|
||||||
|
case "meeting-join":
|
||||||
|
Store.set('addMeeting', {
|
||||||
|
type: 'join',
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
|
||||||
|
// 发送快捷指令
|
||||||
|
default:
|
||||||
|
this.sendMsg(`<p><span data-quick-key="${item.key}">${item.label}</span></p>`)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
this.sendMsg(`<p><span data-quick-key="${item.key}">${item.label}</span></p>`)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user