feat(router): 优化模板预览页面的头部样式

- 为模板预览页面添加绿色背景的头部
- 调整搜索页面模板标题的显示逻辑
- 优化 AD 页面按钮的点击事件
- 移除 Analysis 页面的 nextTick 包装
This commit is contained in:
Huangzhe
2025-05-27 20:48:55 +08:00
parent 44bf17d47b
commit 94330b1f01
4 changed files with 26 additions and 11 deletions

View File

@@ -54,9 +54,11 @@ watch(
if (!series.value.data?.length) return;
console.log(`series.value.data`, series.value.data);
nextTick(() => {
// nextTick(() => {
// setTimeout(() => {
useSetPieChart(pieChart, series, { title: false, legend: false });
});
// }, 1000);
// });
},
{ immediate: true }
);

View File

@@ -68,7 +68,11 @@ const router = createRouter({
path: '/templatePreview',
name: 'templatePreview',
meta: {
title: '模板预览'
title: '模板预览',
header: {
bgc: 'green',
pureBGC: false
}
},
component: () => import('@/views/Design/Preview.vue')
},
@@ -104,7 +108,9 @@ const router = createRouter({
{
path: '/search',
name: 'search',
meta: {},
meta: {
},
component: () => import('@/views/HomeSearch/Index.vue')
},
{

View File

@@ -60,10 +60,12 @@ function handleButtonClick() {
"
>
<!-- 立即进入 -->
<el-button style="width: 95%; height: 50px; border-radius: 15px" color="#70b937">
<el-text style="color: white" @click="handleButtonClick">{{
bannerInfo.button_name
}}</el-text>
<el-button
style="width: 95%; height: 50px; border-radius: 15px"
color="#70b937"
@click="handleButtonClick"
>
<el-text style="color: white">{{ bannerInfo.button_name }}</el-text>
</el-button>
</section>
</section>

View File

@@ -4,12 +4,13 @@ import MarketItem from '@/components/TemplateMarketItem/Index.vue';
import { templates } from '../../Hooks/useSurveySearch';
import { consoleSurveys, useTemplate } from '@/api/home';
import { saveQuestions, snQuestions } from '@/api/design';
import { useRouter } from 'vue-router';
import { useRoute, useRouter } from 'vue-router';
import { useCounterStore } from '@/stores/counter';
import { storeToRefs } from 'pinia';
import { computed } from 'vue';
const router = useRouter();
const route = useRoute();
// 获取 Store 实例
const counterStore = useCounterStore();
@@ -19,6 +20,9 @@ const limit = defineModel<number>('limit');
const currentTemplate = computed(() => templates.value.slice(0, limit.value));
function handleTemplateClick(template: any) {
// ?sn=4O5xanLV&is_template=1&source=4O5xanLV&title=报名签到&parentCode=1&scene_code_info=11&user=苗闻博&quote_nums=3
const isSearch = route.path.includes('/search');
router.push({
path: '/templatePreview',
query: {
@@ -26,7 +30,8 @@ function handleTemplateClick(template: any) {
user: template.creater_user,
is_template: 1,
source: template.sn,
title: template.title,
// H5TITLE 是为搜索页面传入的参数做兼容
title: isSearch ? template.h5_title : template.title,
parentCode: template.parentCode,
scene_code_info: template.scene_code_info,
quote_nums: template.quote_nums