Prechádzať zdrojové kódy

减少控制台报错

Guos 3 týždňov pred
rodič
commit
318c0796aa

+ 2 - 2
src/store/modules/permission.js

@@ -16,12 +16,12 @@ const permission = {
       const cachedStoreRouter = localStorage.getItem('store_router')
       const defaultArray = storeRouter || [];
       let constantRoutes = defaultArray;
-      console.log("打印数据-----------》", cachedStoreRouter);
+      // console.log("打印数据-----------》", cachedStoreRouter);
       if (cachedStoreRouter) {
         try {
           const temp = JSON.parse(cachedStoreRouter);
           constantRoutes = Array.isArray(temp) ? temp : defaultArray;
-          console.log("打印数据-----------》", constantRoutes);
+          // console.log("打印数据-----------》", constantRoutes);
         } catch (error) {
           console.error('localStorage 数据解析失败,使用默认数组:', error);
           localStorage.removeItem('store_router');

+ 11 - 4
src/views/store/storeConfig/userInfo.vue

@@ -552,6 +552,7 @@ import { getStoreInfo, businessLicenseCheck} from '@/api/hisStore/store'
 export default {
   data() {
     return {
+      isViewMode: false, // 添加这一行
       reportFileList:[],
       fileList:[],
       previewImageUrl: '', // 添加预览图片URL
@@ -717,8 +718,14 @@ export default {
     },
 
     close() {
+      //原有方法
+      // this.$store.dispatch('tagsView/delView', this.$route)
+      // this.$router.push({ path: '/index' })
       this.$store.dispatch('tagsView/delView', this.$route)
-      this.$router.push({ path: '/index' })
+      // 检查当前路径,避免重复跳转
+      if (this.$route.path !== '/index') {
+        this.$router.replace({ path: '/index' })
+      }
     },
     // 通用文件上传成功处理函数
     handleFileSuccess(response, file, field) {
@@ -1026,7 +1033,7 @@ export default {
     },
     //长期有效营业执照选择
     switchChange(){
-      console.log(this.form.isBusinessLicensePermanent);
+      // console.log(this.form.isBusinessLicensePermanent);
     },
     // 优化所有图片的删除逻辑,避免冗余代码、阅读困难
     handleDeleteLogo() {
@@ -1067,10 +1074,10 @@ export default {
       });
     },
     handleRemove(file, fileList) {
-      console.log(file, fileList);
+      // console.log(file, fileList);
     },
     handlePreview(file) {
-      console.log(file);
+      // console.log(file);
     },
     handleExceed(files, fileList) {
       this.$message.warning(`当前限制选择 1 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);

+ 2 - 2
src/views/store/storeProduct/index.vue

@@ -2516,10 +2516,10 @@ export default {
       });
     },
     handleReviewAudit(){
-      console.log("aaaaaaaaaaaaaaa->",this.form.reviewAudit);
+      // console.log("aaaaaaaaaaaaaaa->",this.form.reviewAudit);
     },
     switchChange(){
-      console.log(this.form.isBusinessLicensePermanent);
+      // console.log(this.form.isBusinessLicensePermanent);
     },
     showOperLog(row){
       getProductrAuthInfo({productId : row.productId}).then(response => {