diff --git a/.f2e-ai/plans/f2e-workflow.md b/.f2e-ai/plans/f2e-workflow.md new file mode 100644 index 000000000..63bb391a1 --- /dev/null +++ b/.f2e-ai/plans/f2e-workflow.md @@ -0,0 +1,10 @@ +# f2e-ai Workflow + +1. Code analyst: analyze stack, structure, configs, and conventions into `.f2e-ai/handbook/` +2. Requirement analyst: clarify the request and create `.f2e-ai/requirements//requirement.md` +3. UI alignment: when needed, write `.f2e-ai/requirements//ui-notes.md` +4. API alignment: when needed, write `.f2e-ai/requirements//api-notes.md` +5. Plan writing: generate tests first and confirm `plan.md` +6. Plan execution: implement against the confirmed plan +7. i18n: localize changed files when the project requires it +8. E2E and commit: run Playwright, write summaries, then commit and open PR diff --git a/.f2e-ai/templates/change-summary.md.example b/.f2e-ai/templates/change-summary.md.example new file mode 100644 index 000000000..7a52f821b --- /dev/null +++ b/.f2e-ai/templates/change-summary.md.example @@ -0,0 +1,18 @@ +# Change Summary + +## Requirement + +- requirement-id: +- goal: + +## Main Changes + +- + +## Verification + +- + +## Follow-ups + +- diff --git a/.f2e-ai/templates/requirement.md.example b/.f2e-ai/templates/requirement.md.example new file mode 100644 index 000000000..6db34d721 --- /dev/null +++ b/.f2e-ai/templates/requirement.md.example @@ -0,0 +1,20 @@ +# Requirement + +## Source + +- Chat: +- Teambition: + +## Classification + +- Type: +- UI involved: +- API involved: + +## Goals + +- + +## Acceptance Criteria + +- diff --git a/.gitignore b/.gitignore index d7856039b..f79ded3ea 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,5 @@ dist/ AGENTS.md openspec/ scripts/ +.agent/ +.codex/ diff --git a/package-lock.json b/package-lock.json index a45d887e5..24d00f83d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -75,6 +75,7 @@ "eslint-plugin-import": "^2.12.0", "eslint-plugin-react": "^7.8.2", "eslint-plugin-react-hooks": "^4.2.0", + "f2e-ai": "^0.1.4", "jest": "^29.3.1", "jest-environment-jsdom": "^29.5.0", "lint-staged": "^13.2.2", @@ -14552,6 +14553,19 @@ "node >=0.6.0" ] }, + "node_modules/f2e-ai": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/f2e-ai/-/f2e-ai-0.1.4.tgz", + "integrity": "sha512-EqSZs96+AYZfdhmbsJVzsE4IsyGWSD0KTsrHTVO4NAHBA79D4ndCbH53djExNB1CSS5QTpa8XIBTUiT0+Rstig==", + "dev": true, + "license": "ISC", + "bin": { + "f2e-ai": "bin/f2e-ai.js" + }, + "engines": { + "node": ">=20" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -41247,6 +41261,12 @@ "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", "dev": true }, + "f2e-ai": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/f2e-ai/-/f2e-ai-0.1.4.tgz", + "integrity": "sha512-EqSZs96+AYZfdhmbsJVzsE4IsyGWSD0KTsrHTVO4NAHBA79D4ndCbH53djExNB1CSS5QTpa8XIBTUiT0+Rstig==", + "dev": true + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmmirror.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", diff --git a/package.json b/package.json index 408220594..93e2db7db 100644 --- a/package.json +++ b/package.json @@ -114,6 +114,7 @@ "eslint-plugin-import": "^2.12.0", "eslint-plugin-react": "^7.8.2", "eslint-plugin-react-hooks": "^4.2.0", + "f2e-ai": "^0.1.4", "jest": "^29.3.1", "jest-environment-jsdom": "^29.5.0", "lint-staged": "^13.2.2", diff --git a/src/components/sp-goods-price/index.js b/src/components/sp-goods-price/index.js index b6d94ba79..a1e178db8 100644 --- a/src/components/sp-goods-price/index.js +++ b/src/components/sp-goods-price/index.js @@ -54,7 +54,7 @@ function SpGoodsPrice(props) { {isPoint && price == 0 && } {isPoint && price > 0 && ( - + + diff --git a/src/components/sp-goods-price/index.scss b/src/components/sp-goods-price/index.scss index fcf45f3d9..cea1352b4 100644 --- a/src/components/sp-goods-price/index.scss +++ b/src/components/sp-goods-price/index.scss @@ -37,4 +37,8 @@ display: inline-block; margin: 0 10px; } + .point-plus-price-wrap { + display: flex; + align-items: center; + } } diff --git a/src/components/sp-render-goods/compact-card.jsx b/src/components/sp-render-goods/compact-card.jsx index ef937c3a5..58f8bf688 100644 --- a/src/components/sp-render-goods/compact-card.jsx +++ b/src/components/sp-render-goods/compact-card.jsx @@ -117,7 +117,7 @@ function SpGoodsCompactCard(props) { - { showPrice ? ( + {showPrice ? ( <> )} - ) : } + ) : ( + <> + + {Number(info.price || 0) > 0 && ( + <> + + + + + )} + + )} {showPrice && !info.point && info.discountRate && ( diff --git a/src/components/sp-render-goods/hero-card.jsx b/src/components/sp-render-goods/hero-card.jsx index ee04af8e2..c29953c39 100644 --- a/src/components/sp-render-goods/hero-card.jsx +++ b/src/components/sp-render-goods/hero-card.jsx @@ -116,7 +116,23 @@ function SpGoodsHeroCard(props) { )} - ) : } + ) : ( + <> + + {Number(info.price || 0) > 0 && ( + <> + + + + + )} + + )} diff --git a/src/pages/home/wgts/goods/index.jsx b/src/pages/home/wgts/goods/index.jsx index 5f74340c0..cff68446b 100644 --- a/src/pages/home/wgts/goods/index.jsx +++ b/src/pages/home/wgts/goods/index.jsx @@ -210,6 +210,11 @@ export default function WgtGoods(props) { {isPointsmallItems ? ( + {Number(item.price || 0) > 0 && ( + + +¥{(item.price || 0).toFixed(2)} + + )} ) : ( diff --git a/src/pages/home/wgts/goods/index.scss b/src/pages/home/wgts/goods/index.scss index a2ac264e3..6297312f7 100644 --- a/src/pages/home/wgts/goods/index.scss +++ b/src/pages/home/wgts/goods/index.scss @@ -45,7 +45,6 @@ // default 布局:活动商品列表 &__activity-list { display: flex; - align-items: center; gap: 10px; scroll-snap-type: x mandatory; overflow-x: auto; @@ -163,4 +162,5 @@ color: #999; font-size: 28px; } + }