王露 2 vuotta sitten
vanhempi
commit
44fae22d64

+ 2
- 3
digital-park-web/digital-park/src/utils/common.js Näytä tiedosto

@@ -46,9 +46,8 @@ export const sendMsg = (status, msg) => {
* @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
.replace(/^### (.*$)/gim, "<h3>$1</h3>")
.replace(/^## (.*$)/gim, "<h2>$1</h2>")

+ 28
- 3
digital-park-web/digital-park/src/views/investment-service/property-detail/PropertyDetail.vue Näytä tiedosto

@@ -172,6 +172,10 @@ export default {
prop: "showPrice",
label: "单价",
},
{
prop: "showTotalPrice",
label: "总价",
},
],
listingList: [
{
@@ -249,8 +253,29 @@ export default {
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.propertyDetail.housingInformationList = [];
this.propertyDetail.housingInformationList.push({
housingImg:imgList,
type:status,
housingArea,
maxCapacity,
decoration,
canRegister,
showPrice,
showTotalPrice
})
} else if (data.status == 101) {
} else {
this.$message.error(data.msg);
@@ -277,7 +302,7 @@ export default {
return str ? parseMarkdown(str) : "";
},
formatTableImg(imgList) {
let housingImg = imgList ? JSON.parse(imgList)[0] : "";
let housingImg = imgList ? imgList[0] : "";
return formatImg(housingImg);
},
formatImg(url) {
@@ -293,7 +318,7 @@ export default {
if (!fileValue) {
return "";
}
fileValue = JSON.parse(fileValue)[0];
fileValue = fileValue[0];
let index = fileValue.indexOf(".");
let fileValueSuffix = fileValue.substring(index); //截断"."之前的,得到后缀
if (type == "video") {

Loading…
Peruuta
Tallenna