feat: 完善后台可视化模板编辑与区域绑定
This commit is contained in:
1 parent
0b14b5a814
commit
5b85fe769f
18 files changed
+1620
-239
No files matched your search
@@ -65,6 +65,8 @@ function Home({ workspace }: { workspace: RuntimeWorkspace }) {
|
||||
<View
|
||||
className="dish"
|
||||
key={item.id}
|
||||
data-editor-target="acheng-campus-food.home.offering"
|
||||
data-editor-record-id={item.id}
|
||||
onClick={() => navigate("detail", { id: item.id })}
|
||||
>
|
||||
<Image src={item.image} mode="aspectFill" />
|
||||
@@ -82,7 +84,12 @@ function Home({ workspace }: { workspace: RuntimeWorkspace }) {
|
||||
{workspace.trustItems
|
||||
.filter((item) => ["promise", "case"].includes(item.type))
|
||||
.map((item) => (
|
||||
<View className="promise" key={item.id}>
|
||||
<View
|
||||
className="promise"
|
||||
key={item.id}
|
||||
data-editor-target={`trust:${item.type}`}
|
||||
data-editor-record-id={item.id}
|
||||
>
|
||||
<Text className="eyebrow light">{item.title}</Text>
|
||||
{item.summary && <Text className="promise-title">{item.summary}</Text>}
|
||||
<Text className="quote">{item.content}</Text>
|
||||
@@ -119,7 +126,11 @@ function Service({ workspace }: { workspace: RuntimeWorkspace }) {
|
||||
<View className="food-service" data-editor-target="acheng-campus-food.service.service">
|
||||
<View className="page service-page">
|
||||
{schedule && scheduleRows.length > 0 && (
|
||||
<View className="service-card schedule-card">
|
||||
<View
|
||||
className="service-card schedule-card"
|
||||
data-editor-target="trust:schedule"
|
||||
data-editor-record-id={schedule.id}
|
||||
>
|
||||
<View className="card-head">
|
||||
<View className="head-title">
|
||||
<Image className="icon" src={asset("service/clock.png")} />
|
||||
@@ -152,7 +163,11 @@ function Service({ workspace }: { workspace: RuntimeWorkspace }) {
|
||||
</View>
|
||||
)}
|
||||
{c && text(c.config.pickupDetail) && text(c.config.deliveryDetail) && (
|
||||
<View className="service-card coverage-card">
|
||||
<View
|
||||
className="service-card coverage-card"
|
||||
data-editor-target="trust:coverage"
|
||||
data-editor-record-id={c.id}
|
||||
>
|
||||
<View className="simple-title">
|
||||
<Image className="icon" src={asset("service/bike.png")} />
|
||||
<Text>{c.title}</Text>
|
||||
@@ -176,7 +191,11 @@ function Service({ workspace }: { workspace: RuntimeWorkspace }) {
|
||||
</View>
|
||||
)}
|
||||
{process && steps.length > 0 && (
|
||||
<View className="service-card process-card">
|
||||
<View
|
||||
className="service-card process-card"
|
||||
data-editor-target="trust:process"
|
||||
data-editor-record-id={process.id}
|
||||
>
|
||||
<View className="simple-title">
|
||||
<Image className="icon" src={asset("service/list.png")} />
|
||||
<Text>{process.title}</Text>
|
||||
@@ -237,7 +256,12 @@ function Profile({ workspace }: { workspace: RuntimeWorkspace }) {
|
||||
{text(brand.description) && <Text className="bio">{text(brand.description)}</Text>}
|
||||
{credentials.map((item) =>
|
||||
rows(item.config.standards).length ? (
|
||||
<View className="standards" key={item.id}>
|
||||
<View
|
||||
className="standards"
|
||||
key={item.id}
|
||||
data-editor-target="trust:credential"
|
||||
data-editor-record-id={item.id}
|
||||
>
|
||||
{rows(item.config.standards).map((standard, index) => (
|
||||
<View className="standard" key={index}>
|
||||
<Image
|
||||
@@ -252,7 +276,12 @@ function Profile({ workspace }: { workspace: RuntimeWorkspace }) {
|
||||
))}
|
||||
</View>
|
||||
) : (
|
||||
<View className="credential-copy" key={item.id}>
|
||||
<View
|
||||
className="credential-copy"
|
||||
key={item.id}
|
||||
data-editor-target="trust:credential"
|
||||
data-editor-record-id={item.id}
|
||||
>
|
||||
<Text className="credential-title">{item.title}</Text>
|
||||
{item.summary && <Text className="bio">{item.summary}</Text>}
|
||||
<Text className="bio">{item.content}</Text>
|
||||
@@ -264,7 +293,12 @@ function Profile({ workspace }: { workspace: RuntimeWorkspace }) {
|
||||
{workspace.trustItems
|
||||
.filter((item) => item.type === "case")
|
||||
.map((item) => (
|
||||
<View className="case-card" key={item.id}>
|
||||
<View
|
||||
className="case-card"
|
||||
key={item.id}
|
||||
data-editor-target="trust:case"
|
||||
data-editor-record-id={item.id}
|
||||
>
|
||||
<View className="section-heading">
|
||||
<Image className="heading-icon" src={asset("owner/handshake.png")} />
|
||||
<Text>{item.title}</Text>
|
||||
@@ -291,7 +325,12 @@ function Profile({ workspace }: { workspace: RuntimeWorkspace }) {
|
||||
{workspace.trustItems
|
||||
.filter((item) => item.type === "promise")
|
||||
.map((item) => (
|
||||
<View className="promise-card" key={item.id}>
|
||||
<View
|
||||
className="promise-card"
|
||||
key={item.id}
|
||||
data-editor-target="trust:promise"
|
||||
data-editor-record-id={item.id}
|
||||
>
|
||||
<View className="section-heading">
|
||||
<Image className="promise-icon" src={asset("owner/clock.png")} />
|
||||
<Text>{item.title}</Text>
|
||||
@@ -409,6 +448,8 @@ function OfferingList({ workspace }: { workspace: RuntimeWorkspace }) {
|
||||
<View
|
||||
className="offering-card"
|
||||
key={item.id}
|
||||
data-editor-target="acheng-campus-food.offerings.item"
|
||||
data-editor-record-id={item.id}
|
||||
onClick={() => navigate("detail", { id: item.id })}
|
||||
>
|
||||
<View className="dish-media">
|
||||
@@ -447,7 +488,11 @@ function Detail({ workspace, id }: { workspace: RuntimeWorkspace; id?: string })
|
||||
const item = offering(found);
|
||||
const p = presentation(workspace, "detail");
|
||||
return (
|
||||
<View className="food-detail" data-editor-target="acheng-campus-food.detail.dishDetail">
|
||||
<View
|
||||
className="food-detail"
|
||||
data-editor-target="acheng-campus-food.detail.dishDetail"
|
||||
data-editor-record-id={item.id}
|
||||
>
|
||||
<View className="detail">
|
||||
<View className="hero-wrap">
|
||||
<Image
|
||||
|
||||
Reference in new issue
Block a user