Repository navigation
feat: 续费一栏显示任意付款周期(5 年、18 个月) - #27
Merged
Merged
Conversation
hub 现在把没有名字的周期存成 `<n>m`,而主题只会认 `monthly`…`triennial` 那六个名字,于是 18 个月会原样显示成「18m」。改成先按名字或 `<n>m` 解析成 月数,再按同一个风格写出来:`5 年`、`18 个月`。 措辞保持我们原来的**纯周期**风格(`/ 年`、`/ 月`,不带「付」),没有采用上游 主题的「年付/月付」:那两行注释写着「付」字正是价格放不下被省略号截掉的原因。 已命名的长度一个字都不变(`两年`、`三年` 仍在表里),只有新长度是新写法。 三处调用(卡片、表格、详情页)一起改;上游只改了详情页,我们的卡片和表格也 渲染周期。测试补一条:同一个长度的名字写法与 `<n>m` 写法读出来一致,认不出的 周期原样显示、不吞掉。
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
hub 现在把没有名字的付款周期存成
<n>m(monitor-probe/monitor#71),而主题只认monthly…triennial六个名字,于是 18 个月会原样显示成「18m」。改成先解析成月数、再按同一个风格写出来:5 年、18 个月。实测:预览环境里把某个节点的周期设成
60m→ 公开页显示128.00 TWD / 5 年;再用面板改成 3 年(保存后 hub 归一成具名triennial)→ 显示128.00 TWD / 三年。与上游 #17 的差异
上游把措辞从「/ 月」改成了「/ 月付」,我们保留纯周期的写法(
/ 月、/ 年、/ 三年):那两行注释是我们主题里既有的取舍(「付」字会把价格挤到省略号),改回去等于撤销它。已命名的长度一个字都不变(
两年、三年仍在表里),只有新长度用新写法。另外上游 #17 只改了详情页,我们的卡片与表格也渲染周期,三处一起改。
校验
npm run lint0 warning 0 error ·npm test全通过(format 里补了一条:同一个长度的名字写法与<n>m写法读出一样,认不出的周期原样显示)·npm run build通过。