王露 2 年之前
父節點
當前提交
44fae22d64

+ 2
- 3
digital-park-web/digital-park/src/utils/common.js 查看文件

* @returns * @returns
*/ */


export const parseMarkdown = markdownText => {
let imgUrl = `http://192.168.18.236:18888/common/getImg?path=`;
// let imgUrl = `${process.env.VUE_APP_PARK_DOMAIN}/common/getImg?path=`;
export const parseMarkdown = (markdownText) => {
let imgUrl = `${process.env.VUE_APP_PARK_DOMAIN}/common/getImg?path=`;
const htmlText = markdownText const htmlText = markdownText
.replace(/^### (.*$)/gim, "<h3>$1</h3>") .replace(/^### (.*$)/gim, "<h3>$1</h3>")
.replace(/^## (.*$)/gim, "<h2>$1</h2>") .replace(/^## (.*$)/gim, "<h2>$1</h2>")

+ 28
- 3
digital-park-web/digital-park/src/views/investment-service/property-detail/PropertyDetail.vue 查看文件

prop: "showPrice", prop: "showPrice",
label: "单价", label: "单价",
}, },
{
prop: "showTotalPrice",
label: "总价",
},
], ],
listingList: [ listingList: [
{ {
this.$cloneDeep(this.propertyDetail), this.$cloneDeep(this.propertyDetail),
"物业产品详情" "物业产品详情"
); );
let { imgList } = this.propertyDetail;
let {
imgList,
status,
housingArea,
maxCapacity,
decoration,
canRegister,
showPrice,
showTotalPrice
} = this.propertyDetail;
this.mainImg = imgList ? imgList[0] : ""; this.mainImg = imgList ? imgList[0] : "";
// 设置可选房源数据
this.propertyDetail.housingInformationList = [];
this.propertyDetail.housingInformationList.push({
housingImg:imgList,
type:status,
housingArea,
maxCapacity,
decoration,
canRegister,
showPrice,
showTotalPrice
})
} else if (data.status == 101) { } else if (data.status == 101) {
} else { } else {
this.$message.error(data.msg); this.$message.error(data.msg);
return str ? parseMarkdown(str) : ""; return str ? parseMarkdown(str) : "";
}, },
formatTableImg(imgList) { formatTableImg(imgList) {
let housingImg = imgList ? JSON.parse(imgList)[0] : "";
let housingImg = imgList ? imgList[0] : "";
return formatImg(housingImg); return formatImg(housingImg);
}, },
formatImg(url) { formatImg(url) {
if (!fileValue) { if (!fileValue) {
return ""; return "";
} }
fileValue = JSON.parse(fileValue)[0];
fileValue = fileValue[0];
let index = fileValue.indexOf("."); let index = fileValue.indexOf(".");
let fileValueSuffix = fileValue.substring(index); //截断"."之前的,得到后缀 let fileValueSuffix = fileValue.substring(index); //截断"."之前的,得到后缀
if (type == "video") { if (type == "video") {

Loading…
取消
儲存