|
@@ -48,16 +48,21 @@ export default defineComponent({
|
|
/** 渲染完成 */
|
|
/** 渲染完成 */
|
|
const handleRendered = async () => {
|
|
const handleRendered = async () => {
|
|
const item = detailData.product.find((item) => item.type === state.musicRenderType);
|
|
const item = detailData.product.find((item) => item.type === state.musicRenderType);
|
|
- if (!item) return;
|
|
|
|
- item.state = true;
|
|
|
|
- item.base64 = await downPng();
|
|
|
|
|
|
+ if (item) {
|
|
|
|
+ item.state = true;
|
|
|
|
+ item.base64 = await downPng();
|
|
|
|
+ }
|
|
const nextItem = detailData.product.find((item: any) => !item.state);
|
|
const nextItem = detailData.product.find((item: any) => !item.state);
|
|
|
|
+ if(!item && nextItem){
|
|
|
|
+ nextItem.state = true
|
|
|
|
+ }
|
|
if (nextItem) {
|
|
if (nextItem) {
|
|
state.musicRenderType = nextItem.type;
|
|
state.musicRenderType = nextItem.type;
|
|
detailData.isLoading = true;
|
|
detailData.isLoading = true;
|
|
setTimeout(() => (detailData.isLoading = false), 500);
|
|
setTimeout(() => (detailData.isLoading = false), 500);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+
|
|
closeToast();
|
|
closeToast();
|
|
console.log(detailData.product);
|
|
console.log(detailData.product);
|
|
window.parent?.postMessage(
|
|
window.parent?.postMessage(
|