Quellcode durchsuchen

修改微页面返回

hurx vor 18 Stunden
Ursprung
Commit
bb40e5d70a
1 geänderte Dateien mit 15 neuen und 1 gelöschten Zeilen
  1. 15 1
      src/views/diy/pcEdit.vue

+ 15 - 1
src/views/diy/pcEdit.vue

@@ -275,8 +275,22 @@ const onDragMove = (evt: any) => {
 };
 
 const handleChange = (val: string[]) => {};
+
 // 返回上一页
-const goBack = () => {};
+const goBack = () => {
+  let url = 'platformDiyIndex'; //默认到平台微页面  防止404
+  if (diyStore.type == '1') {
+    //平台微页面
+    url = 'platformDiyIndex';
+  } else if (diyStore.type == '2') {
+    //工业品微页面
+    url = 'industryDiyIndex';
+  } else if (diyStore.type == '3') {
+    //福礼微页面
+    url = 'fuliDiyIndex';
+  }
+  location.href = `${location.origin}/diy/` + url;
+};
 
 // 预览
 const preview = () => {