|
@@ -912,7 +912,7 @@ const getPrivateGroups = async () => {
|
|
// name: 1,
|
|
// name: 1,
|
|
// list: 1,
|
|
// list: 1,
|
|
// },
|
|
// },
|
|
- projection:'image,_id,name,list',
|
|
|
|
|
|
+ projection:'image,id,name,list',
|
|
// query: {
|
|
// query: {
|
|
// type: `v-components`,
|
|
// type: `v-components`,
|
|
// },
|
|
// },
|
|
@@ -959,7 +959,7 @@ const getUserComponents = async () => {
|
|
// name: 1,
|
|
// name: 1,
|
|
// list: 1,
|
|
// list: 1,
|
|
// },
|
|
// },
|
|
- projection:'image,_id,name,list',
|
|
|
|
|
|
+ projection:'image,id,name,list',
|
|
// query: {
|
|
// query: {
|
|
// type: `v.component`,
|
|
// type: `v.component`,
|
|
// },
|
|
// },
|
|
@@ -1000,7 +1000,7 @@ const getUserProjects = async (type: string) => {
|
|
// name: 1,
|
|
// name: 1,
|
|
// list: 1,
|
|
// list: 1,
|
|
// },
|
|
// },
|
|
- projection:'image,_id,name,list',
|
|
|
|
|
|
+ projection:'image,id,name,list',
|
|
// query: {
|
|
// query: {
|
|
// type,
|
|
// type,
|
|
// },
|
|
// },
|
|
@@ -1035,7 +1035,7 @@ const getPrivateProjects = async (type: string) => {
|
|
// name: 1,
|
|
// name: 1,
|
|
// tags: 1,
|
|
// tags: 1,
|
|
// },
|
|
// },
|
|
- projection:'image,_id,name,tags'
|
|
|
|
|
|
+ projection:'image,id,name,tags'
|
|
};
|
|
};
|
|
const config = {
|
|
const config = {
|
|
params: {
|
|
params: {
|
|
@@ -1182,14 +1182,6 @@ const open = async (item: any) => {
|
|
if (!item || item.draggable !== false) {
|
|
if (!item || item.draggable !== false) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- const ret: any = await getLe5leV(item._id || item.id);
|
|
|
|
- if (!ret) {
|
|
|
|
- if (item.price > 0) {
|
|
|
|
- chargeDialog.data = item;
|
|
|
|
- chargeDialog.show = true;
|
|
|
|
- }
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
|
|
|
|
if (activeAssets.value === 'user') {
|
|
if (activeAssets.value === 'user') {
|
|
router.push({
|
|
router.push({
|
|
@@ -1200,6 +1192,14 @@ const open = async (item: any) => {
|
|
},
|
|
},
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
|
|
+ const ret: any = await getLe5leV(item._id || item.id);
|
|
|
|
+ if (!ret) {
|
|
|
|
+ if (item.price > 0) {
|
|
|
|
+ chargeDialog.data = item;
|
|
|
|
+ chargeDialog.show = true;
|
|
|
|
+ }
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
sessionStorage.setItem('opening', '1');
|
|
sessionStorage.setItem('opening', '1');
|
|
router.push({
|
|
router.push({
|
|
path: '/',
|
|
path: '/',
|
|
@@ -1231,7 +1231,7 @@ const getPrivateGraphics = async () => {
|
|
// name: 1,
|
|
// name: 1,
|
|
// component: 1,
|
|
// component: 1,
|
|
// },
|
|
// },
|
|
- projection:'image,_id,name,component'
|
|
|
|
|
|
+ projection:'image,id,name,component'
|
|
};
|
|
};
|
|
const config = {
|
|
const config = {
|
|
params: {
|
|
params: {
|
|
@@ -1639,11 +1639,11 @@ const onMenu = async (val: string) => {
|
|
// list: group.list,
|
|
// list: group.list,
|
|
// });
|
|
// });
|
|
// }
|
|
// }
|
|
- let filename: string =
|
|
|
|
- contextmenu.component.filename || contextmenu.component.image;
|
|
|
|
- if (imageDrive && filename.startsWith(imageDrive)) {
|
|
|
|
- filename = filename.slice(imageDrive.length);
|
|
|
|
- }
|
|
|
|
|
|
+ // let filename: string =
|
|
|
|
+ // contextmenu.component.filename || contextmenu.component.image;
|
|
|
|
+ // if (imageDrive && filename.startsWith(imageDrive)) {
|
|
|
|
+ // filename = filename.slice(imageDrive.length);
|
|
|
|
+ // }
|
|
let path: string =
|
|
let path: string =
|
|
contextmenu.component.filename || contextmenu.component.image;
|
|
contextmenu.component.filename || contextmenu.component.image;
|
|
//更新缩略图位置
|
|
//更新缩略图位置
|
|
@@ -1653,8 +1653,12 @@ const onMenu = async (val: string) => {
|
|
// });
|
|
// });
|
|
// 原接口路径是 /api/file/{fullname}
|
|
// 原接口路径是 /api/file/{fullname}
|
|
// 因为img的路径中包含file,所以做如下拼接
|
|
// 因为img的路径中包含file,所以做如下拼接
|
|
- if(!path.startsWith('/api')) {
|
|
|
|
- path = '/api' + path;
|
|
|
|
|
|
+
|
|
|
|
+ if (imageDrive && path.startsWith(imageDrive)) {
|
|
|
|
+ path = path.slice(imageDrive.length);
|
|
|
|
+ }
|
|
|
|
+ if(!path.startsWith('/api/file')) {
|
|
|
|
+ path = '/api/file' + path;
|
|
}
|
|
}
|
|
await axios.patch(`${path}`, {
|
|
await axios.patch(`${path}`, {
|
|
// filenames: [filename],
|
|
// filenames: [filename],
|