diff --git a/src/router/index.ts b/src/router/index.ts index 48457f8..a7732ef 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -98,8 +98,8 @@ const router = createRouter({ { path: '/templateMarket', name: 'templateMarket', - meta:{ - pureBGC: true, + meta: { + pureBGC: true }, component: () => import('@/views/Home/components/Market/Index.vue') }, @@ -116,19 +116,21 @@ const router = createRouter({ name: 'ad', meta: { pureBGC: true, - title: "伊调研", - shareAction : true, - shareFunc : () => { - if(window.ReactNativeWebView){ - window.ReactNativeWebView.postMessage(JSON.stringify({ - type: 'shareModal', - title: '分享标题', - description:'分享副标题', - thumbImageUrl:'https://logo.png', - webpageUrl: window.location.href - })); + title: '伊调研', + shareAction: true, + shareFunc: () => { + if (window.ReactNativeWebView) { + window.ReactNativeWebView.postMessage( + JSON.stringify({ + type: 'shareModal', + title: '分享标题', + description: '分享副标题', + thumbImageUrl: 'https://logo.png', + webpageUrl: window.location.href + }) + ); } - } + } }, component: () => import('@/views/AD/Index.vue') } diff --git a/src/stores/Questions/useQuestionStore.ts b/src/stores/Questions/useQuestionStore.ts index 68b0a44..da29e3a 100644 --- a/src/stores/Questions/useQuestionStore.ts +++ b/src/stores/Questions/useQuestionStore.ts @@ -4,7 +4,7 @@ import { AnswerApi } from '@/views/Survey/views/Preview/js/api'; import { getLanguage } from '@/views/Survey/views/Preview/js/language'; export const useQuestionStore = defineStore('questionStore', () => { - const currentSn =ref(''); + const currentSn = ref(''); const questionsData = ref(); @@ -52,8 +52,9 @@ export const useQuestionStore = defineStore('questionStore', () => { let { data } = await AnswerApi.getQuetions({ id: urlParamSearch.get('sn'), data: { - is_preview: 0, - is_template: urlParamSearch.get('is_template') || 0, + is_preview: 1, + is_template: 0, + // is_template: urlParamSearch.get('is_template') || 0, source: urlParamSearch.get('source') ?? '' } }); @@ -72,7 +73,7 @@ export const useQuestionStore = defineStore('questionStore', () => { } return { - fetchQuestions:getQuestions, + fetchQuestions: getQuestions, currentSn, questionsData, styleInfo, diff --git a/src/utils/date.ts b/src/utils/date.ts index 0246b28..1bd981c 100644 --- a/src/utils/date.ts +++ b/src/utils/date.ts @@ -5,9 +5,9 @@ * @param join 连接符 * @returns 格式化后的时间 */ -export function formatTime(time: string, split = ' ', join = ' '){ - // 如果时间不存在,返回自身的值 - if (!time) return time; +export function formatTime(time: string, split = ' ', join = ' ') { + // 如果时间不存在,返回自身的值 + if (!time) return time; - return time.split(split).join(join) -} \ No newline at end of file + return time.split(split).join(join); +} diff --git a/src/views/Home/components/Market/Index.vue b/src/views/Home/components/Market/Index.vue index f8829e8..7e5865b 100644 --- a/src/views/Home/components/Market/Index.vue +++ b/src/views/Home/components/Market/Index.vue @@ -1,27 +1,37 @@