feat: 添加上banner 的点击事件
This commit is contained in:
@@ -2,4 +2,7 @@
|
|||||||
export const SCROLL_TO_BOTTOM = 'SCROLL_TO_BOTTOM'
|
export const SCROLL_TO_BOTTOM = 'SCROLL_TO_BOTTOM'
|
||||||
|
|
||||||
// 推荐帖子
|
// 推荐帖子
|
||||||
export const RECOMMEND_POSTS_TITLE = 'RECOMMEND_POSTS_TITLE'
|
export const RECOMMEND_POSTS_TITLE = 'RECOMMEND_POSTS_TITLE'
|
||||||
|
|
||||||
|
// 发送命令
|
||||||
|
export const SEND_COMMAND_TEXT = 'SEND_COMMAND_TEXT'
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
import { defineEmits } from 'vue'
|
import { defineEmits } from 'vue'
|
||||||
import { onLoad } from '@dcloudio/uni-app';
|
import { onLoad } from '@dcloudio/uni-app';
|
||||||
import { SCROLL_TO_BOTTOM, RECOMMEND_POSTS_TITLE } from '@/constant/constant'
|
import { SCROLL_TO_BOTTOM, RECOMMEND_POSTS_TITLE, SEND_COMMAND_TEXT } from '@/constant/constant'
|
||||||
import { MessageRole, MessageType, CompName } from '../../model/ChatModel';
|
import { MessageRole, MessageType, CompName } from '../../model/ChatModel';
|
||||||
|
|
||||||
import ChatTopWelcome from './ChatTopWelcome.vue';
|
import ChatTopWelcome from './ChatTopWelcome.vue';
|
||||||
@@ -269,6 +269,15 @@
|
|||||||
handleReply(value)
|
handleReply(value)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
uni.$on(SEND_COMMAND_TEXT, (value) => {
|
||||||
|
console.log('SEND_COMMAND_TEXT:', value)
|
||||||
|
if(value && value.length > 0) {
|
||||||
|
commonType = 'Command.quickBooking'
|
||||||
|
sendMessage(value, true)
|
||||||
|
setTimeoutScrollToBottom()
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 获取最近一次的会话id
|
/// 获取最近一次的会话id
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
:interval="interval"
|
:interval="interval"
|
||||||
:duration="duration">
|
:duration="duration">
|
||||||
<swiper-item v-for="item in activityList" :key="item.id">
|
<swiper-item v-for="item in activityList" :key="item.id">
|
||||||
<view class="swiper-item">
|
<view class="swiper-item" @click="handleClick(item)">
|
||||||
<image :src="item.activityCover" mode="aspectFill"></image>
|
<image :src="item.activityCover" mode="aspectFill"></image>
|
||||||
<view class="corner-btn">快速预定</view>
|
<view class="corner-btn">快速预定</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
import { SEND_COMMAND_TEXT } from '@/constant/constant'
|
||||||
|
|
||||||
const autoplay = ref(true)
|
const autoplay = ref(true)
|
||||||
const interval = ref(3000)
|
const interval = ref(3000)
|
||||||
@@ -32,6 +33,10 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const handleClick = (item) => {
|
||||||
|
uni.$emit(SEND_COMMAND_TEXT, '快速预定')
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
Reference in New Issue
Block a user