From 24ba61f0343bfbbdb678d2a5765eb3686c4394d6 Mon Sep 17 00:00:00 2001 From: "du.meimei" Date: Sat, 22 Mar 2025 18:56:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=A7=BB=E5=8A=A8=E7=AB=AF=E9=97=AE?= =?UTF-8?q?=E5=8D=B7=E5=A4=8D=E5=88=B6=EF=BC=8C=E6=A0=87=E9=A2=98=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E3=80=81=E6=8A=95=E6=94=BE=E6=95=B0=E9=87=8F=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.d.ts | 9 +++++++++ src/api/home/index.js | 3 ++- src/layouts/redirect.vue | 12 +++++++----- src/views/Survey/Index.vue | 2 +- src/views/Survey/views/Create/Index.vue | 11 ++++++++--- 5 files changed, 27 insertions(+), 10 deletions(-) diff --git a/components.d.ts b/components.d.ts index fab8e77..cc91605 100644 --- a/components.d.ts +++ b/components.d.ts @@ -8,9 +8,14 @@ export {} declare module 'vue' { export interface GlobalComponents { Contenteditable: typeof import('./src/components/contenteditable.vue')['default'] + ElButton: typeof import('element-plus/es')['ElButton'] + ElDropdown: typeof import('element-plus/es')['ElDropdown'] + ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] + ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] ElInput: typeof import('element-plus/es')['ElInput'] ElOption: typeof import('element-plus/es')['ElOption'] ElSelect: typeof import('element-plus/es')['ElSelect'] + ElSpace: typeof import('element-plus/es')['ElSpace'] ElTable: typeof import('element-plus/es')['ElTable'] ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] ElText: typeof import('element-plus/es')['ElText'] @@ -29,6 +34,7 @@ declare module 'vue' { VanGrid: typeof import('vant/es')['Grid'] VanGridItem: typeof import('vant/es')['GridItem'] VanIcon: typeof import('vant/es')['Icon'] + VanList: typeof import('vant/es')['List'] VanNavBar: typeof import('vant/es')['NavBar'] VanPicker: typeof import('vant/es')['Picker'] VanPopover: typeof import('vant/es')['Popover'] @@ -36,8 +42,11 @@ declare module 'vue' { VanRadio: typeof import('vant/es')['Radio'] VanRadioGroup: typeof import('vant/es')['RadioGroup'] VanRow: typeof import('vant/es')['Row'] + VanSearch: typeof import('vant/es')['Search'] VanStepper: typeof import('vant/es')['Stepper'] VanSwitch: typeof import('vant/es')['Switch'] + VanTab: typeof import('vant/es')['Tab'] + VanTabs: typeof import('vant/es')['Tabs'] YLCascader: typeof import('./src/components/YLCascader.vue')['default'] YLInput: typeof import('./src/components/YLInput.vue')['default'] YLPicker: typeof import('./src/components/YLPicker.vue')['default'] diff --git a/src/api/home/index.js b/src/api/home/index.js index 0dd135f..02ae6e1 100644 --- a/src/api/home/index.js +++ b/src/api/home/index.js @@ -24,8 +24,9 @@ export function getSurveysPage(params) { } // 复制问卷 export function copySurveys(sn) { + // source=1 表明是移动端问卷 return request({ - url: `/console/surveys/${sn}`, + url: `/console/surveys/${sn}?source=1`, method: 'post' }); } diff --git a/src/layouts/redirect.vue b/src/layouts/redirect.vue index 1edecef..5ba6a1d 100644 --- a/src/layouts/redirect.vue +++ b/src/layouts/redirect.vue @@ -29,11 +29,13 @@ const route = useRoute(); const router = useRouter(); function goBack() { - if (window.history.length > 1 && route.name !== 'home') { - router.go(-1); - } else { - appBridge.navigateBack(); - } + setTimeout(() => { + if (window.history.length > 1 && route.name !== 'home') { + router.go(-1); + } else { + appBridge.navigateBack(); + } + }, 500); }