|
|
@ -291,7 +291,7 @@ const { safeAreaInsets } = uni.getSystemInfoSync(); |
|
|
import { ref, computed, onMounted, onUnmounted, watch, nextTick } from "vue"; |
|
|
import { ref, computed, onMounted, onUnmounted, watch, nextTick } from "vue"; |
|
|
import footerBar from "../../components/footerBar"; |
|
|
import footerBar from "../../components/footerBar"; |
|
|
import marked from "marked"; // 引入 marked 库 |
|
|
import marked from "marked"; // 引入 marked 库 |
|
|
import { onPageScroll } from "@dcloudio/uni-app"; |
|
|
|
|
|
|
|
|
import { onPageScroll, onLoad } from "@dcloudio/uni-app"; |
|
|
import { |
|
|
import { |
|
|
postStock, |
|
|
postStock, |
|
|
postIntent, |
|
|
postIntent, |
|
|
@ -358,6 +358,25 @@ const hotTopics = ref([ |
|
|
}, |
|
|
}, |
|
|
]); |
|
|
]); |
|
|
|
|
|
|
|
|
|
|
|
// 处理页面加载时的路由参数 |
|
|
|
|
|
onLoad((options) => { |
|
|
|
|
|
console.log('deepMate页面接收到参数:', options); |
|
|
|
|
|
|
|
|
|
|
|
// 如果有query参数,自动发送消息 |
|
|
|
|
|
if (options.query) { |
|
|
|
|
|
const decodedQuery = decodeURIComponent(options.query); |
|
|
|
|
|
console.log('解码后的查询内容:', decodedQuery); |
|
|
|
|
|
|
|
|
|
|
|
// 设置输入框内容并自动发送 |
|
|
|
|
|
inputMessage.value = decodedQuery; |
|
|
|
|
|
|
|
|
|
|
|
// 延迟一下再发送,确保页面已经完全加载 |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
sendMessage(); |
|
|
|
|
|
}, 500); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
// 初始化 |
|
|
// 初始化 |
|
|
onMounted(() => { |
|
|
onMounted(() => { |
|
|
const sys = uni.getSystemInfoSync(); |
|
|
const sys = uni.getSystemInfoSync(); |
|
|
|