|
@@ -38,10 +38,11 @@ class Unit {
|
|
|
}
|
|
|
}
|
|
|
class Buyer extends Unit {
|
|
|
- constructor(name, id, { link }) {
|
|
|
+ constructor(name, id, { seoId, link }) {
|
|
|
super(name, id)
|
|
|
this.link = link
|
|
|
this.type ='buyer'
|
|
|
+ this.seoId = seoId || ''
|
|
|
}
|
|
|
}
|
|
|
class Winner extends Unit {
|
|
@@ -82,8 +83,8 @@ class SummaryModel extends BaseModel {
|
|
|
const { baseInfo, abstract } = data
|
|
|
const isProposed = this.isProposedCheck(baseInfo?.subType)
|
|
|
const model = isProposed
|
|
|
- ? this.tranSummaryOfProposed(abstract.proposed)
|
|
|
- : this.tranSummaryOfDefault(abstract.default)
|
|
|
+ ? this.tranSummaryOfProposed(abstract.proposed, baseInfo)
|
|
|
+ : this.tranSummaryOfDefault(abstract.default, baseInfo)
|
|
|
model.isProposed = isProposed
|
|
|
return model
|
|
|
}
|
|
@@ -113,7 +114,7 @@ class SummaryModel extends BaseModel {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- tranSummaryOfDefault(summary) {
|
|
|
+ tranSummaryOfDefault(summary, baseInfo = {}) {
|
|
|
const result = this.createModel()
|
|
|
if (!summary) {
|
|
|
return result
|
|
@@ -128,7 +129,7 @@ class SummaryModel extends BaseModel {
|
|
|
list.push(buyerInfo)
|
|
|
if (summary?.buyer) {
|
|
|
result.buyers.push(
|
|
|
- new Buyer(summary?.buyer, summary?.buyer, { link: summary?.buyerPortraitShow })
|
|
|
+ new Buyer(summary?.buyer, summary?.buyer, { seoId: baseInfo?.buyerSeoId, link: summary?.buyerPortraitShow })
|
|
|
)
|
|
|
}
|
|
|
|
|
@@ -225,7 +226,7 @@ class SummaryModel extends BaseModel {
|
|
|
return result
|
|
|
}
|
|
|
|
|
|
- tranSummaryOfProposed(summary) {
|
|
|
+ tranSummaryOfProposed(summary, baseInfo = {}) {
|
|
|
const result = this.createModel()
|
|
|
if (!summary) {
|
|
|
return result
|
|
@@ -265,7 +266,7 @@ class SummaryModel extends BaseModel {
|
|
|
s.addKey('link', summary?.buyerPortraitShow) // 是否可进行跳转
|
|
|
if (summary?.buyer) {
|
|
|
result.buyers.push(
|
|
|
- new Buyer(summary?.buyer, summary?.buyer, { link: summary?.buyerPortraitShow })
|
|
|
+ new Buyer(summary?.buyer, summary?.buyer, { seoId: baseInfo?.buyerSeoId, link: summary?.buyerPortraitShow })
|
|
|
)
|
|
|
}
|
|
|
} else if (key === 'address') {
|