feat: 问卷字段调整和样式调整

This commit is contained in:
2026-02-04 15:01:11 +08:00
parent 2da15786c8
commit 4e92ec2000
5 changed files with 20 additions and 7 deletions

View File

@@ -1,14 +1,14 @@
<template> <template>
<view class="survey-questionnaire"> <view class="survey-questionnaire w-vw-24">
<view class="w-full bg-white border-box border-ff overflow-hidden rounded-20"> <view class="bg-white border-box border-ff overflow-hidden rounded-20">
<view class="border-box w-vw flex flex-items-center flex-justify-between bg-EEF8FF"> <view class="border-box flex flex-items-center flex-justify-between bg-EEF8FF">
<text class="font-size-18 font-500 color-171717 text-left ml-12"> <text class="font-size-18 font-500 color-171717 text-left ml-12">
调查问卷 调查问卷
</text> </text>
<image class="w-102 h-72" src="./sq_edit.png" mode="widthFix" /> <image class="w-102 h-72" :src="surveyData.logoUrl" mode="widthFix" />
</view> </view>
<image class="w-full" src="./sq_banner.png" mode="widthFix" /> <image class="w-full" :src="surveyData.bannerUrl" mode="widthFix" />
<view class="h-44 m-12 rounded-50 bg-button color-white flex flex-items-center flex-justify-center" <view class="h-44 m-12 rounded-50 bg-button color-white flex flex-items-center flex-justify-center"
@click="handleCall"> @click="handleCall">
@@ -20,7 +20,7 @@
<script setup> <script setup>
import { getAccessToken } from "@/constant/token"; import { getAccessToken } from "@/constant/token";
import { defineProps } from "vue"; import { defineProps, computed } from "vue";
import { navigateTo } from "../../router"; import { navigateTo } from "../../router";
const props = defineProps({ const props = defineProps({
@@ -30,9 +30,17 @@ const props = defineProps({
}, },
}); });
const surveyData = computed(() => {
if (props.toolCall?.data) {
return JSON.parse(props.toolCall?.data);
} else {
return {};
}
});
const handleCall = () => { const handleCall = () => {
const token = getAccessToken(); const token = getAccessToken();
navigateTo(props.toolCall.data || props.toolCall.toolResult, { token: token }); navigateTo(surveyData.value.jumpUrl, { token: token });
}; };
</script> </script>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 664 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -14,6 +14,7 @@ export function navigateTo(url, args) {
targetUrl += paramString; targetUrl += paramString;
} }
} }
console.log("Navigating to URL:", targetUrl);
uni.navigateTo({ uni.navigateTo({
url: "/pages/webview/index?url=" + encodeURIComponent(targetUrl), url: "/pages/webview/index?url=" + encodeURIComponent(targetUrl),
}); });

View File

@@ -6,6 +6,10 @@
width: 100vw; width: 100vw;
} }
.w-vw-24 {
width: calc(100vw - 24px);
}
.w-24 { .w-24 {
width: 24px; width: 24px;
} }