diff --git a/app/Models/UserBot.php b/app/Models/UserBot.php index 2b264ea19..359ce7a30 100644 --- a/app/Models/UserBot.php +++ b/app/Models/UserBot.php @@ -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': return [ [ diff --git a/resources/assets/js/pages/manage/components/DialogWrapper.vue b/resources/assets/js/pages/manage/components/DialogWrapper.vue index bea975658..0b4e282ce 100644 --- a/resources/assets/js/pages/manage/components/DialogWrapper.vue +++ b/resources/assets/js/pages/manage/components/DialogWrapper.vue @@ -1755,40 +1755,61 @@ export default { * @param item */ sendQuick(item) { - if (item.key === "locat-checkin") { - this.$store.dispatch('openAppMapPage', { - key: item.config.key, - point: `${item.config.lng},${item.config.lat}`, - }).then(data => { - if (!$A.isJson(data)) { - return - } - if (data.distance > item.config.radius) { - $A.modalError(`你选择的位置「${data.title}」不在签到范围内`) - return - } - const thumb = $A.urlAddParams('https://api.map.baidu.com/staticimage/v2', { - ak: item.config.key, - center: `${data.point.lng},${data.point.lat}`, - markers: `${data.point.lng},${data.point.lat}`, - width: 800, - height: 480, - zoom: 19, - copyright: 1, + switch (item.key) { + // 位置签到 + case "locat-checkin": + this.$store.dispatch('openAppMapPage', { + key: item.config.key, + point: `${item.config.lng},${item.config.lat}`, + }).then(data => { + if (!$A.isJson(data)) { + return + } + if (data.distance > item.config.radius) { + $A.modalError(`你选择的位置「${data.title}」不在签到范围内`) + return + } + const thumb = $A.urlAddParams('https://api.map.baidu.com/staticimage/v2', { + ak: item.config.key, + center: `${data.point.lng},${data.point.lat}`, + markers: `${data.point.lng},${data.point.lat}`, + width: 800, + 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({ - type: 'bd', - lng: data.point.lng, - lat: data.point.lat, - title: data.title, - distance: data.distance, - address: data.address || '', - thumb - }) - }) - return; + break; + + // 创建会议 + case "meeting-create": + Store.set('addMeeting', { + type: 'create', + userids: [this.userId], + }); + break; + + // 加入会议 + case "meeting-join": + Store.set('addMeeting', { + type: 'join', + }); + break; + + // 发送快捷指令 + default: + this.sendMsg(`

${item.label}

`) + break; } - this.sendMsg(`

${item.label}

`) }, /**