feat: 消息字段对接

This commit is contained in:
2026-04-05 13:10:26 +08:00
parent 33e04802dd
commit 272d2ea130
6 changed files with 68 additions and 13 deletions

View File

@@ -4,19 +4,18 @@
<view class="w-vw"></view>
<view class="content flex flex-col m-4 border-box rounded-24">
<view class="flex flex-col p-6 border-box flex-items-center justify-center">
<image class="w-full rounded-20" src="./images/g_image.png" mode="widthFix" />
<image class="w-full rounded-20" :src="props.toolCall.componentNameParams.background" mode="widthFix" />
<image class="g_title mt-20" src="./images/g_title.png" />
<image class="g_title mt-20" :src="props.toolCall.componentNameParams.title" />
<text class="font-size-14 font-400 color-white my-12 text-center">
生成合照写真一键出片 \n
来到小七孔不打个卡再走吗
{{ props.toolCall.componentNameParams.description }}
</text>
<view class="w-full border-box px-12 pb-8 flex flex-row">
<view class="w-full border-box px-12 pb-8 flex flex-row" @click="jumpClick">
<view class="btn-bg w-full border-box p-4 rounded-24 flex flex-row">
<view class="btn-bg-sub w-full border-box p-16 rounded-20 flex flex-row flex-items-center flex-justify-center color-white text-center font-size-18 font-800">
参加活动
{{ props.toolCall.componentNameParams.buttonName }}
</view>
</view>
</view>
@@ -26,6 +25,35 @@
</template>
<script setup>
import { defineProps, nextTick, onMounted, computed } from "vue";
import {
SCROLL_TO_BOTTOM,
} from "@/constant/constant";
import { getAccessToken } from "@/constant/token";
import { navigateTo } from "@/router";
const props = defineProps({
toolCall: {
type: Object,
default: {},
},
});
onMounted(() => {
nextTick(() => {
setTimeout(() => {
uni.$emit(SCROLL_TO_BOTTOM, true);
}, 300);
});
});
const jumpClick = () => {
const token = getAccessToken();
if (props.toolCall.componentNameParams.jumpUrl) {
navigateTo(props.toolCall.componentNameParams.jumpUrl, { token: token });
}
};
</script>