feat: 问卷字段调整和样式调整
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<view class="survey-questionnaire">
|
||||
<view class="w-full 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="survey-questionnaire w-vw-24">
|
||||
<view class="bg-white border-box border-ff overflow-hidden rounded-20">
|
||||
<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>
|
||||
<image class="w-102 h-72" src="./sq_edit.png" mode="widthFix" />
|
||||
<image class="w-102 h-72" :src="surveyData.logoUrl" mode="widthFix" />
|
||||
</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"
|
||||
@click="handleCall">
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
<script setup>
|
||||
import { getAccessToken } from "@/constant/token";
|
||||
import { defineProps } from "vue";
|
||||
import { defineProps, computed } from "vue";
|
||||
import { navigateTo } from "../../router";
|
||||
|
||||
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 token = getAccessToken();
|
||||
navigateTo(props.toolCall.data || props.toolCall.toolResult, { token: token });
|
||||
navigateTo(surveyData.value.jumpUrl, { token: token });
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 664 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 38 KiB |
@@ -14,6 +14,7 @@ export function navigateTo(url, args) {
|
||||
targetUrl += paramString;
|
||||
}
|
||||
}
|
||||
console.log("Navigating to URL:", targetUrl);
|
||||
uni.navigateTo({
|
||||
url: "/pages/webview/index?url=" + encodeURIComponent(targetUrl),
|
||||
});
|
||||
|
||||
@@ -6,6 +6,10 @@
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
.w-vw-24 {
|
||||
width: calc(100vw - 24px);
|
||||
}
|
||||
|
||||
.w-24 {
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user