diff --git a/apps/miniapp/components/modules/brand-hero/brand-hero.js b/apps/miniapp/components/modules/brand-hero/brand-hero.js new file mode 100644 index 0000000..53180fa --- /dev/null +++ b/apps/miniapp/components/modules/brand-hero/brand-hero.js @@ -0,0 +1 @@ +Component({ properties: { hero: { type: Object, value: {} } }, methods: { explore() { this.triggerEvent("explore"); } } }); diff --git a/apps/miniapp/components/modules/brand-hero/brand-hero.json b/apps/miniapp/components/modules/brand-hero/brand-hero.json new file mode 100644 index 0000000..d80dd20 --- /dev/null +++ b/apps/miniapp/components/modules/brand-hero/brand-hero.json @@ -0,0 +1 @@ +{"component":true} diff --git a/apps/miniapp/components/modules/brand-hero/brand-hero.wxml b/apps/miniapp/components/modules/brand-hero/brand-hero.wxml new file mode 100644 index 0000000..220f5c0 --- /dev/null +++ b/apps/miniapp/components/modules/brand-hero/brand-hero.wxml @@ -0,0 +1 @@ +{{hero.eyebrow}}{{hero.title}}{{hero.slogan}} diff --git a/apps/miniapp/components/modules/brand-hero/brand-hero.wxss b/apps/miniapp/components/modules/brand-hero/brand-hero.wxss new file mode 100644 index 0000000..c2fc59f --- /dev/null +++ b/apps/miniapp/components/modules/brand-hero/brand-hero.wxss @@ -0,0 +1 @@ +.hero{position:relative;overflow:hidden;margin-top:22rpx;height:560rpx;border-radius:16rpx;background:#202221}.hero-image{width:100%;height:100%;display:block}.hero-shade{position:absolute;inset:0;background:linear-gradient(180deg,transparent 30%,rgba(32,34,33,.9))}.hero-copy{position:absolute;left:28rpx;right:28rpx;bottom:28rpx;color:#fff}.eyebrow{display:block;color:#d9c8b2;font-size:20rpx;letter-spacing:3rpx}.hero-title{display:block;margin-top:14rpx;font:40rpx serif}.hero-slogan{display:block;margin-top:10rpx;color:#ddd5cb;font-size:23rpx}.hero-button{margin:24rpx 0 0 0;padding:0 22rpx;border:1rpx solid #d9c8b2;border-radius:0;background:transparent;color:#fff;font-size:24rpx} diff --git a/apps/miniapp/components/modules/trust-manifesto/trust-manifesto.js b/apps/miniapp/components/modules/trust-manifesto/trust-manifesto.js new file mode 100644 index 0000000..a940b20 --- /dev/null +++ b/apps/miniapp/components/modules/trust-manifesto/trust-manifesto.js @@ -0,0 +1 @@ +Component({ properties: { content: { type: Object, value: {} } } }); diff --git a/apps/miniapp/components/modules/trust-manifesto/trust-manifesto.json b/apps/miniapp/components/modules/trust-manifesto/trust-manifesto.json new file mode 100644 index 0000000..d80dd20 --- /dev/null +++ b/apps/miniapp/components/modules/trust-manifesto/trust-manifesto.json @@ -0,0 +1 @@ +{"component":true} diff --git a/apps/miniapp/components/modules/trust-manifesto/trust-manifesto.wxml b/apps/miniapp/components/modules/trust-manifesto/trust-manifesto.wxml new file mode 100644 index 0000000..bcdd1dd --- /dev/null +++ b/apps/miniapp/components/modules/trust-manifesto/trust-manifesto.wxml @@ -0,0 +1 @@ +林境门作品质宣言拒绝流水线拼装{{item.title}}{{item.desc}} diff --git a/apps/miniapp/components/modules/trust-manifesto/trust-manifesto.wxss b/apps/miniapp/components/modules/trust-manifesto/trust-manifesto.wxss new file mode 100644 index 0000000..edf0ffa --- /dev/null +++ b/apps/miniapp/components/modules/trust-manifesto/trust-manifesto.wxss @@ -0,0 +1 @@ +.trust{margin-top:22rpx;padding:32rpx;background:#202221;color:#fff;border-radius:16rpx}.eyebrow{display:block;color:#d9c8b2;font-size:20rpx;letter-spacing:3rpx}.section-title{display:block;margin-top:12rpx;font:42rpx serif}.light{color:#fff}.work-name{display:block;margin-top:24rpx;font:29rpx serif}.body{display:block;margin-top:8rpx;color:#77736b;font-size:24rpx;line-height:1.7}.light-body{color:#c8c5bf} diff --git a/apps/miniapp/pages/index/index.js b/apps/miniapp/pages/index/index.js index 5df3645..c443f87 100644 --- a/apps/miniapp/pages/index/index.js +++ b/apps/miniapp/pages/index/index.js @@ -1,7 +1,7 @@ const { brand, trustContent, offerings } = require("../../utils/linjing-data"); const { loadWorkspaceWithFallback } = require("../../utils/runtime-workspace"); Page({ - data: { brand, trustContent, offerings, modules: [], theme: {}, loading: false }, + data: { brand, trustContent, offerings, modules: [], theme: {}, hero: { image: "https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=900&q=80", eyebrow: "年度落成实景 · 莫干山庄园", title: "万籁系列 · 铸铜冷锻双轴入户门", slogan: "门高 3.4m · 德国静音地轴", cta: "探索全系作品 →" }, loading: false }, onLoad() { this.setData({ loading: true }); loadWorkspaceWithFallback().then((workspace) => { this.setData({ brand: workspace.brand, trustContent: workspace.trustContent || trustContent, offerings: workspace.offerings || offerings, modules: workspace.modules || [], theme: workspace.theme || {}, loading: false }); wx.setNavigationBarTitle({ title: workspace.brand.name || brand.name }); }); }, selectOffering(e) { const id = e.detail ? e.detail.id : e.currentTarget.dataset.id; wx.navigateTo({ url: "/pages/offering/detail?id=" + id }); }, goWorks() { wx.switchTab({ url: "/pages/services/index" }); }, diff --git a/apps/miniapp/pages/index/index.json b/apps/miniapp/pages/index/index.json index 9eeb046..4131a16 100644 --- a/apps/miniapp/pages/index/index.json +++ b/apps/miniapp/pages/index/index.json @@ -1 +1 @@ -{"navigationBarTitleText":"品牌首页","usingComponents":{"founder-card":"/components/modules/founder-card/founder-card","trust-proof":"/components/modules/trust-proof/trust-proof","offering-list":"/components/modules/offering-list/offering-list"}} +{"navigationBarTitleText":"品牌首页","usingComponents":{"founder-card":"/components/modules/founder-card/founder-card","brand-hero":"/components/modules/brand-hero/brand-hero","trust-proof":"/components/modules/trust-proof/trust-proof","trust-manifesto":"/components/modules/trust-manifesto/trust-manifesto","offering-list":"/components/modules/offering-list/offering-list"}} diff --git a/apps/miniapp/pages/index/index.wxml b/apps/miniapp/pages/index/index.wxml index 00680ae..1a663f6 100644 --- a/apps/miniapp/pages/index/index.wxml +++ b/apps/miniapp/pages/index/index.wxml @@ -1,7 +1,7 @@ - 年度落成实景 · 莫干山庄园万籁系列 · 铸铜冷锻双轴入户门门高 3.4m · 德国静音地轴 + - 林境门作品质宣言拒绝流水线拼装{{item.title}}{{item.desc}} +