农机服务 详情页面 图文详情居中显示
This commit is contained in:
@@ -70,9 +70,7 @@ export default {
|
|||||||
favorite: true,
|
favorite: true,
|
||||||
shareList: [],
|
shareList: [],
|
||||||
|
|
||||||
desc: `
|
desc: "",
|
||||||
|
|
||||||
`,
|
|
||||||
skuList: []
|
skuList: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -89,7 +87,12 @@ export default {
|
|||||||
if (data) {
|
if (data) {
|
||||||
let detailData = data;
|
let detailData = data;
|
||||||
this.detailData = detailData;
|
this.detailData = detailData;
|
||||||
this.desc = data.content;
|
|
||||||
|
var richtext= data.content;
|
||||||
|
const regex = new RegExp('<img', 'gi');
|
||||||
|
richtext = richtext.replace(regex, `<img style="max-width:100%;height:auto;display:block;"`);
|
||||||
|
this.desc = richtext;
|
||||||
|
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: detailData.name
|
title: detailData.name
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user