|
|
@@ -78,6 +78,8 @@
|
|
|
<rich-media-viewer
|
|
|
ref="richMediaViewerCommon"
|
|
|
:content="common_previewContent"
|
|
|
+ :startScroll="300"
|
|
|
+ :threshold="450"
|
|
|
/>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -171,15 +173,15 @@ export default {
|
|
|
this.data = res.data;
|
|
|
|
|
|
//商品描述
|
|
|
- this.title = res.data.picTextGoods.title || "";
|
|
|
+ this.title = res.data.picTextGoods && res.data.picTextGoods.title || "";
|
|
|
// 字符串转换为数组
|
|
|
- let content = res.data.picTextGoods.content || "";
|
|
|
+ let content = res.data.picTextGoods && res.data.picTextGoods.content || "[]";
|
|
|
this.previewContent =
|
|
|
typeof content === "string" ? JSON.parse(content) : content || [];
|
|
|
|
|
|
//通用说明
|
|
|
- this.common_title = res.data.picText.title || "";
|
|
|
- content = res.data.picText.content || "";
|
|
|
+ this.common_title = res.data.picText && res.data.picText.title || "";
|
|
|
+ content = res.data.picText && res.data.picText.content || "[]";
|
|
|
this.common_previewContent =
|
|
|
typeof content === "string" ? JSON.parse(content) : content || [];
|
|
|
});
|