|
| 1 | +/* |
| 2 | + * |
| 3 | + * UserBilling |
| 4 | + * |
| 5 | + */ |
| 6 | + |
| 7 | +importReactfrom'react' |
| 8 | +import{inject,observer}from'mobx-react' |
| 9 | + |
| 10 | +import{ICON_CMD}from'../../config' |
| 11 | + |
| 12 | +import{SectionLabel,Button}from'../../components' |
| 13 | +import{ |
| 14 | +Wrapper, |
| 15 | +PlanWrapper, |
| 16 | +PlanDivider, |
| 17 | +PlanTitle, |
| 18 | +PlanDesc, |
| 19 | +PurchaseButton, |
| 20 | +DescLine, |
| 21 | +BadPrice, |
| 22 | +GoodPrice, |
| 23 | +}from'./styles' |
| 24 | + |
| 25 | +import{makeDebugger,storePlug}from'../../utils' |
| 26 | +import*aslogicfrom'./logic' |
| 27 | + |
| 28 | +/* eslint-disable no-unused-vars */ |
| 29 | +constdebug=makeDebugger('C:UserBilling') |
| 30 | +/* eslint-enable no-unused-vars */ |
| 31 | + |
| 32 | +classUserBillingContainerextendsReact.Component{ |
| 33 | +componentWillMount(){ |
| 34 | +const{ userBilling}=this.props |
| 35 | +logic.init(userBilling) |
| 36 | +} |
| 37 | + |
| 38 | +render(){ |
| 39 | +return( |
| 40 | +<Wrapper> |
| 41 | +<SectionLabel |
| 42 | +title="账单概况" |
| 43 | +iconSrc={`${ICON_CMD}/bill.svg`} |
| 44 | +desc="当前账户为免费账户,欢迎升级账户以获得更好的体验/服务, 同时支持社区的发展。" |
| 45 | +/> |
| 46 | + |
| 47 | +<PlanWrapper> |
| 48 | +<PlanTitle>高级用户</PlanTitle> |
| 49 | +<PlanDesc> |
| 50 | +<DescLine> |
| 51 | +<BadPrice>¥102.4</BadPrice> /<GoodPrice>¥69</GoodPrice> |
| 52 | + 无限期有效 |
| 53 | +</DescLine> |
| 54 | +<DescLine>将获得区别于免费用户的 10+ 项功能/服务</DescLine> |
| 55 | +</PlanDesc> |
| 56 | +<PurchaseButton> |
| 57 | +<Buttontype="primary"ghostonClick={logic.upgradeHepler}> |
| 58 | + 升级成高级用户 |
| 59 | +</Button> |
| 60 | +</PurchaseButton> |
| 61 | +</PlanWrapper> |
| 62 | +<PlanDivider/> |
| 63 | +<PlanWrapper> |
| 64 | +<PlanTitle>赞助商</PlanTitle> |
| 65 | +<PlanDesc> |
| 66 | +<DescLine> |
| 67 | +<BadPrice>¥2999起</BadPrice> /<GoodPrice>¥1999起</GoodPrice> |
| 68 | + 无限期有效 |
| 69 | +</DescLine> |
| 70 | +<DescLine>高级用户所有功能,以及企业/产品推广等</DescLine> |
| 71 | +</PlanDesc> |
| 72 | +<PurchaseButton> |
| 73 | +<Buttontype="primary"ghostonClick={logic.upgradeHepler}> |
| 74 | + 升级成赞助商 |
| 75 | +</Button> |
| 76 | +</PurchaseButton> |
| 77 | +</PlanWrapper> |
| 78 | +<PlanDivider/> |
| 79 | +<PlanWrapper> |
| 80 | +<PlanTitle>打赏用户</PlanTitle> |
| 81 | +<PlanDesc> |
| 82 | +<DescLine> |
| 83 | +<BadPrice>¥15</BadPrice> /<GoodPrice>¥10.24</GoodPrice> |
| 84 | + 无限期有效 |
| 85 | +</DescLine> |
| 86 | +<DescLine>打赏任意金额可解锁全部主题</DescLine> |
| 87 | +</PlanDesc> |
| 88 | +<PurchaseButton> |
| 89 | +<Buttontype="primary"ghostonClick={logic.sponsorHepler}> |
| 90 | + 打赏一下 |
| 91 | +</Button> |
| 92 | +</PurchaseButton> |
| 93 | +</PlanWrapper> |
| 94 | + |
| 95 | +<br/> |
| 96 | +<SectionLabel |
| 97 | +title="付费历史" |
| 98 | +iconSrc={`${ICON_CMD}/bill_history.svg`} |
| 99 | +desc="没有查询到付费记录, 欢迎升级体验。" |
| 100 | +/> |
| 101 | +</Wrapper> |
| 102 | +) |
| 103 | +} |
| 104 | +} |
| 105 | + |
| 106 | +exportdefaultinject(storePlug('userBilling'))(observer(UserBillingContainer)) |