소스 검색

chore(views): 暂时注释掉部分代码中的未登录校验

wangcong 1 주 전
부모
커밋
c17485a650
4개의 변경된 파일17개의 추가작업 그리고 17개의 파일을 삭제
  1. 5 5
      src/services/common.ts
  2. 4 4
      src/views/components/FileProps.vue
  3. 4 4
      src/views/components/Graphics.vue
  4. 4 4
      src/views/components/PenProps.vue

+ 5 - 5
src/services/common.ts

@@ -183,11 +183,11 @@ export const save = async (
     MessagePlugin.warning($t('画布为空,无法保存!'));
     return;
   }
-  if (!(user && user.id)) {
-    MessagePlugin.warning(noLoginTip);
-    localforage.setItem(localStorageName, JSON.stringify(data));
-    return;
-  }
+  // if (!(user && user.id)) {
+  //   MessagePlugin.warning(noLoginTip);
+  //   localforage.setItem(localStorageName, JSON.stringify(data));
+  //   return;
+  // }
   // 保存为组件
   if (
     vType === 'v.component' &&

+ 4 - 4
src/views/components/FileProps.vue

@@ -378,10 +378,10 @@ const selectedSreen = (item: any) => {
 };
 
 const beforeUpload = (file: any) => {
-  if (!(user && user.id)) {
-    MessagePlugin.warning($t('请先登录!'));
-    return false;
-  }
+  // if (!(user && user.id)) {
+  //   MessagePlugin.warning($t('请先登录!'));
+  //   return false;
+  // }
   return true;
 };
 

+ 4 - 4
src/views/components/Graphics.vue

@@ -2271,10 +2271,10 @@ const onSelectFiles = (item: any) => {
 };
 
 const beforeUpload = (file: any) => {
-  if (!(user && user.id)) {
-    MessagePlugin.warning('请先登录!');
-    return false;
-  }
+  // if (!(user && user.id)) {
+  //   MessagePlugin.warning('请先登录!');
+  //   return false;
+  // }
   return true;
 };
 

+ 4 - 4
src/views/components/PenProps.vue

@@ -1666,10 +1666,10 @@ const beforeUpload = (file: any) => {
   //   MessagePlugin.warning($t('上传的图片不能大于5M'));
   //   return false;
   // }
-  if (!(user && user.id)) {
-    MessagePlugin.warning($t('请先登录!'));
-    return false;
-  }
+  // if (!(user && user.id)) {
+  //   MessagePlugin.warning($t('请先登录!'));
+  //   return false;
+  // }
   return true;
 };