|
@@ -139,7 +139,8 @@ export const save = async (
|
|
|
type: SaveType = SaveType.Save,
|
|
|
vType?: string,
|
|
|
notice?: boolean,
|
|
|
- userFlag?:number
|
|
|
+ userFlag?:number,
|
|
|
+ onlyJson?:boolean
|
|
|
) => {
|
|
|
if (!saveFlag) {
|
|
|
return;
|
|
@@ -295,6 +296,7 @@ export const save = async (
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
+ if(!onlyJson){
|
|
|
// if (!data.id || (data.ownerId === user.id)) {
|
|
|
// 图纸不是创建用户的图纸 先不改缩略图
|
|
|
for (const pen of meta2d.store.data.pens) {
|
|
@@ -345,7 +347,9 @@ export const save = async (
|
|
|
(meta2d.store.data as Meta2dBackData).image = data.image;
|
|
|
(meta2d.store.data as Meta2dBackData).filename = data.filename;
|
|
|
// }
|
|
|
-
|
|
|
+ }{
|
|
|
+ data.image = undefined;
|
|
|
+ }
|
|
|
let ret: any;
|
|
|
|
|
|
!data.version && (data.version = baseVer);
|
|
@@ -543,7 +547,7 @@ export function autoSave(force = false) {
|
|
|
if (data.isTemplate) {
|
|
|
_vType = 'v-template';
|
|
|
}
|
|
|
- save(SaveType.Save, _vType);
|
|
|
+ save(SaveType.Save, _vType, false, undefined, true);
|
|
|
} else {
|
|
|
// data.updateAt = dayjs().format();
|
|
|
localforage.setItem(localStorageName, JSON.stringify(data));
|