Commit e5df757d authored by zL's avatar zL

更改处理数据函数

parent 9e10b9a0
...@@ -60,7 +60,7 @@ function formatProperty2Api(property: Property): TemplateProperty | TmplSelectPr ...@@ -60,7 +60,7 @@ function formatProperty2Api(property: Property): TemplateProperty | TmplSelectPr
if (property.value && property.value !== '') { if (property.value && property.value !== '') {
let dd = Array.from(property.value); let dd = Array.from(property.value);
data = dd.map((value: any) => ({ data = dd.map((value: any) => ({
format: "hash(hash)", format: "hash",
type: "image", type: "image",
value: value.hash || '' value: value.hash || ''
})) }))
...@@ -79,7 +79,7 @@ function formatProperty2Api(property: Property): TemplateProperty | TmplSelectPr ...@@ -79,7 +79,7 @@ function formatProperty2Api(property: Property): TemplateProperty | TmplSelectPr
if (property.value) { if (property.value) {
let dd = Array.from(property.value); let dd = Array.from(property.value);
data = (dd as any).map((value: any) => ({ data = (dd as any).map((value: any) => ({
format: "hash(hash)", format: "hash",
type: "file", type: "file",
value: value value: value
})) }))
...@@ -122,7 +122,7 @@ function formatProperty2Api(property: Property): TemplateProperty | TmplSelectPr ...@@ -122,7 +122,7 @@ function formatProperty2Api(property: Property): TemplateProperty | TmplSelectPr
if (property.value) { if (property.value) {
let dd = Array.from(property.value); let dd = Array.from(property.value);
data = (dd as any).map((value: any) => ({ data = (dd as any).map((value: any) => ({
format: "hash(hash)", format: "hash",
type: "media", type: "media",
value: value value: value
})) }))
...@@ -142,7 +142,7 @@ function formatProperty2Api(property: Property): TemplateProperty | TmplSelectPr ...@@ -142,7 +142,7 @@ function formatProperty2Api(property: Property): TemplateProperty | TmplSelectPr
if (property.value) { if (property.value) {
let dd = Array.from(property.value); let dd = Array.from(property.value);
data = (dd as any).map((value: any) => ({ data = (dd as any).map((value: any) => ({
format: "hash(hash)", format: "hash",
type: "media", type: "media",
value: value value: value
})) }))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment