This commit is contained in:
zhangjing1
2026-03-16 15:04:36 +08:00
parent 3f95a69f20
commit 719237371e
12 changed files with 117 additions and 5 deletions

View File

@@ -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/<id>/requirement.md`
3. UI alignment: when needed, write `.f2e-ai/requirements/<id>/ui-notes.md`
4. API alignment: when needed, write `.f2e-ai/requirements/<id>/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

View File

@@ -0,0 +1,18 @@
# Change Summary
## Requirement
- requirement-id:
- goal:
## Main Changes
-
## Verification
-
## Follow-ups
-

View File

@@ -0,0 +1,20 @@
# Requirement
## Source
- Chat:
- Teambition:
## Classification
- Type:
- UI involved:
- API involved:
## Goals
-
## Acceptance Criteria
-

2
.gitignore vendored
View File

@@ -17,3 +17,5 @@ dist/
AGENTS.md
openspec/
scripts/
.agent/
.codex/

20
package-lock.json generated
View File

@@ -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",

View File

@@ -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",

View File

@@ -54,7 +54,7 @@ function SpGoodsPrice(props) {
<View className='goods-price'>
{isPoint && price == 0 && <SpPoint className='sale-point' value={point} />}
{isPoint && price > 0 && (
<View>
<View className='point-plus-price-wrap'>
<SpPoint className='sale-point' value={point} />
<Text className='point-plus-price'>+</Text>
<SpPrice size={42} className='sale-price' value={price} />

View File

@@ -37,4 +37,8 @@
display: inline-block;
margin: 0 10px;
}
.point-plus-price-wrap {
display: flex;
align-items: center;
}
}

View File

@@ -117,7 +117,7 @@ function SpGoodsCompactCard(props) {
<View className='sp-goods-compact-card__price'>
<View className='price-wrapper'>
{ showPrice ? (
{showPrice ? (
<>
<SpPrice
className='current-price'
@@ -137,7 +137,23 @@ function SpGoodsCompactCard(props) {
/>
)}
</>
) : <SpPoint value={info.point} />}
) : (
<>
<SpPoint value={info.point} />
{Number(info.price || 0) > 0 && (
<>
<Text style={{ margin: '0 4px' }}>+</Text>
<SpPrice
className='current-price'
size={34}
value={info.price}
style={{ marginRight: '6px' }}
weight={600}
/>
</>
)}
</>
)}
</View>
{showPrice && !info.point && info.discountRate && (

View File

@@ -116,7 +116,23 @@ function SpGoodsHeroCard(props) {
</View>
)}
</>
) : <SpPoint value={info.point} />}
) : (
<>
<SpPoint value={info.point} />
{Number(info.price || 0) > 0 && (
<>
<Text style={{ margin: '0 4px' }}>+</Text>
<SpPrice
className='current-price'
size={34}
value={info.price}
style={{ marginRight: '6px' }}
weight={600}
/>
</>
)}
</>
)}
</View>
</View>
</View>

View File

@@ -210,6 +210,11 @@ export default function WgtGoods(props) {
{isPointsmallItems ? (
<View className='wgt-goods__activity-item-point'>
<SpPoint value={item.point ?? item.point_exchange ?? 0} />
{Number(item.price || 0) > 0 && (
<Text className='wgt-goods__activity-item-price__unit' style={{ marginLeft: '4px' }}>
+{(item.price || 0).toFixed(2)}
</Text>
)}
</View>
) : (
<View className='wgt-goods__activity-item-price'>

View File

@@ -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;
}
}