|
|
@@ -1,6 +1,7 @@
|
|
|
import { Get, Post } from "../../lib/request/method";
|
|
|
import { createHealthIndex } from "./tools/health-index";
|
|
|
import dayjs from "dayjs";
|
|
|
+import { getFullImageUrl } from "../../utils/util";
|
|
|
|
|
|
import { healthAnalysisModel, healthReportModel } from "./model/health.model";
|
|
|
|
|
|
@@ -87,7 +88,7 @@ export function healthSchemeMethod(id: string) {
|
|
|
return {
|
|
|
buyUrl: item?.buyUrl || '',
|
|
|
buyType: item?.buyType || '',
|
|
|
- shortImageUrl: item?.miniprogram || '',
|
|
|
+ shortImageUrl: getFullImageUrl(item?.miniprogram),
|
|
|
title: item?.name || '',
|
|
|
descriptions: item?.attrs?.map((attr: AnyArray, k: number) => {
|
|
|
return { ...attr, id: `description-${i}-${j}-${k}`, }
|
|
|
@@ -98,8 +99,8 @@ export function healthSchemeMethod(id: string) {
|
|
|
return {
|
|
|
id: `${item?.type}-${i}-${j}-${k}`,
|
|
|
type: item.imgUrl ? 'image' : null,
|
|
|
- poster: item.imgUrl,
|
|
|
- url: item.mediaUrl ?? item.imgUrl,
|
|
|
+ poster: getFullImageUrl(item.imgUrl),
|
|
|
+ url: getFullImageUrl(item.mediaUrl ?? item.imgUrl),
|
|
|
title: item.name,
|
|
|
description: item.description,
|
|
|
}
|
|
|
@@ -107,8 +108,8 @@ export function healthSchemeMethod(id: string) {
|
|
|
return {
|
|
|
id: `${item?.type}-${i}-${j}-${k}`,
|
|
|
type: item.mediaUrl ? 'video' : null,
|
|
|
- poster: item.imgUrl,
|
|
|
- url: item.mediaUrl,
|
|
|
+ poster: getFullImageUrl(item.imgUrl),
|
|
|
+ url: getFullImageUrl(item.mediaUrl),
|
|
|
title: item.name,
|
|
|
description: item.description,
|
|
|
}
|
|
|
@@ -116,8 +117,8 @@ export function healthSchemeMethod(id: string) {
|
|
|
return {
|
|
|
id: `${item?.type}-${i}-${j}-${k}`,
|
|
|
type: item.imgUrl ? 'image' : item.name ? 'text' : null,
|
|
|
- poster: item.imgUrl,
|
|
|
- url: item.mediaUrl ?? item.imgUrl,
|
|
|
+ poster: getFullImageUrl(item.imgUrl),
|
|
|
+ url: getFullImageUrl(item.mediaUrl ?? item.imgUrl),
|
|
|
title: [item.name, `${item.doase || ''}${item.unit || ''}`].filter(Boolean).join(' '),
|
|
|
description: item.description,
|
|
|
}
|
|
|
@@ -125,8 +126,8 @@ export function healthSchemeMethod(id: string) {
|
|
|
return {
|
|
|
id: `${item?.type}-${i}-${j}-${k}`,
|
|
|
type: item.imgUrl ? 'image' : item.name ? 'text' : null,
|
|
|
- poster: item.imgUrl,
|
|
|
- url: item.mediaUrl ?? item.imgUrl,
|
|
|
+ poster: getFullImageUrl(item.imgUrl),
|
|
|
+ url: getFullImageUrl(item.mediaUrl ?? item.imgUrl),
|
|
|
title: [item.name, `${item.doase || ''}${item.unit || ''}`].filter(Boolean).join(' '),
|
|
|
description: item.description,
|
|
|
}
|