|
|
@ -75,6 +75,7 @@ import { useRouter, useRoute } from 'vue-router'; |
|
|
|
import { ElMessage } from 'element-plus'; |
|
|
|
import { Plus } from '@element-plus/icons-vue'; |
|
|
|
import { myBookApi } from '@/api/bookshelf'; |
|
|
|
import { homeApi } from '@/api/modules.js'; |
|
|
|
import { useMainStore } from '@/store'; |
|
|
|
import { ossService } from '@/utils/oss'; |
|
|
|
|
|
|
@ -131,18 +132,14 @@ export default defineComponent({ |
|
|
|
const loadWorkData = async () => { |
|
|
|
try { |
|
|
|
loading.value = true; |
|
|
|
const response = await myBookApi.getMyShopPage({ |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 1, |
|
|
|
id: workId |
|
|
|
}); |
|
|
|
|
|
|
|
if (response.success && response.result?.records?.length > 0) { |
|
|
|
const workData = response.result.records[0]; |
|
|
|
const response = await homeApi.getBookDetail({ id: workId }); |
|
|
|
|
|
|
|
if (response.success && response.result) { |
|
|
|
const workData = response.result; |
|
|
|
Object.assign(workForm, { |
|
|
|
name: workData.name, |
|
|
|
image: workData.image, |
|
|
|
shopClass: workData.shopClass ? workData.shopClass.split(',').map(id => parseInt(id)) : [], // 将逗号分隔的字符串转换为数组 |
|
|
|
shopClass: workData.shopClass ? workData.shopClass.split(',') : [], // 将逗号分隔的字符串转换为数组 |
|
|
|
details: workData.details, |
|
|
|
status: workData.status |
|
|
|
}); |
|
|
@ -351,4 +348,4 @@ export default defineComponent({ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |