diff --git a/src/containers/content/MembershipContent/InviteBox/QA.tsx b/src/containers/content/MembershipContent/InviteBox/QA.tsx index 6761d033e..1f19c9462 100644 --- a/src/containers/content/MembershipContent/InviteBox/QA.tsx +++ b/src/containers/content/MembershipContent/InviteBox/QA.tsx @@ -12,7 +12,7 @@ const QA: FC = ({ testid = 'membership-qa' }) => { 说明: - 内侧阶段,所有新注册用户都会收到一个额外的朋友码,欢迎将它分享给身边的朋友。 + 内侧阶段所有功能开放,此阶段注册的用户还会收到一个额外的朋友码,欢迎将它分享给身边的朋友。
验证通过后将自动升级为高级账户,为期一年。 diff --git a/src/containers/content/MembershipContent/InviteBox/index.tsx b/src/containers/content/MembershipContent/InviteBox/index.tsx index c6c74ed18..5db93fc91 100644 --- a/src/containers/content/MembershipContent/InviteBox/index.tsx +++ b/src/containers/content/MembershipContent/InviteBox/index.tsx @@ -12,6 +12,7 @@ import { Header, HandIcon, Title, + Content, } from '../styles/invite_box' import { closeInviteBox } from '../logic' @@ -39,16 +40,18 @@ const InviteBox: FC = ({ testid = 'membership-invite-box', show }) => {
- 朋友码 + 交个朋友
- - console.log('v: ', v)} - /> - - + + + console.log('v: ', v)} + /> + + +
) diff --git a/src/containers/content/MembershipContent/QA.tsx b/src/containers/content/MembershipContent/QA.tsx index bc4e92aec..ba37bc557 100644 --- a/src/containers/content/MembershipContent/QA.tsx +++ b/src/containers/content/MembershipContent/QA.tsx @@ -1,7 +1,20 @@ import { FC, memo } from 'react' import { ICON } from '@/config' -import { Wrapper, Header, Icon, Content, QTitle, ABody } from './styles/qa' +import { ROUTE } from '@/constant' +import Linker from '@/widgets/Linker' + +import { + Wrapper, + Header, + Icon, + Content, + QTitle, + ABody, + Bold, + Ul, + Li, +} from './styles/qa' type TProps = { testid?: string @@ -17,17 +30,44 @@ const QA: FC = ({ testid = 'membership-qa' }) => { 为什么要推出付费服务 ? - 简单来讲,为了活下去。总体而言,免费服务和付费服务只有体验上的差别,没有内容上和访问限制上的区别对待。 + 简单来讲,我们希望能够健康的生存下去,物质基础对于社区的维护与功能开发(尤其是这些高级功能) + 是不可缺少的。需要特别说明的是,免费服务和付费服务只有体验上的差别, + 没有内容上和访问限制上的区别对待 + ,你也可以通过 + + 支持我们。 - wip 是什么意思 ? + 这些功能都已经实现了吗 ? - wip(work in progress) - 表示目前正在开发中的功能,周期一般在一个月之内。如果已经购买包含此功能的会员服务,在开发完成后不会重复收费。 + Nope. + 很多高级功能还没有实现或目前还不完善,因此所有功能在内测阶段都是开放的,内测阶段结束后根据完成情况,所列出条目可能会有所调整。 - 不小心手抖订阅后,可以退款吗 ? - 当然可以,付费后若不满意,你可以在 7 天内随时退款。 + 不小心手抖,可以退款吗 ? + + 选择高级服务后的 15 + 以内都是「试吃」阶段,你可以在这段时间内评估体验是否符合你的预期,再决定是否付费。 + + 一些基本承诺 + +
    +
  • 这里遵循古典的互联网精神,尊重并践行 Open Web 的价值观。
  • +
  • + 认同知识共享,不会在任何阶段,以任何形式参与或鼓励「卖课」。 +
  • +
  • + 相信长期主义,会持续用技术、组织形式等各种手段守住社区下限。 +
  • +
+
) diff --git a/src/containers/content/MembershipContent/Support.tsx b/src/containers/content/MembershipContent/Support.tsx index 43f28236a..c5cb14f30 100644 --- a/src/containers/content/MembershipContent/Support.tsx +++ b/src/containers/content/MembershipContent/Support.tsx @@ -1,23 +1,14 @@ import { FC, Fragment, memo } from 'react' -import { ICON, ICON_CMD } from '@/config' +import { ICON } from '@/config' import { PkgItem, PkgItemTitle, PkgItemYesIcon, - PkgItemNoIcon, ArrowIcon, } from './styles/support' -const MarkIcon = ({ not }) => { - return not ? ( - - ) : ( - - ) -} - type TProps = { active: boolean items: any // TODO: @@ -35,7 +26,7 @@ const Support: FC = ({ active, items, not, pkgType }) => ( )} {items.map((item) => ( - + {item.title} ))} diff --git a/src/containers/content/MembershipContent/index.tsx b/src/containers/content/MembershipContent/index.tsx index a92a2999f..6d056c8b4 100755 --- a/src/containers/content/MembershipContent/index.tsx +++ b/src/containers/content/MembershipContent/index.tsx @@ -1,3 +1,4 @@ +/* eslint-disable jsx-a11y/accessible-emoji */ /* * * MembershipContent @@ -10,8 +11,9 @@ import type { TMetric } from '@/spec' import { buildLog } from '@/utils/logger' import { pluggedIn } from '@/utils/mobx' import OrButton from '@/widgets/Buttons/OrButton' -import Button from '@/widgets/Buttons/Button' +// import Button from '@/widgets/Buttons/Button' import Checker from '@/widgets/Checker' +import NoticeBar from '@/widgets/NoticeBar' import type { TStore } from './store' import { PAY, PACKAGE } from './constant' @@ -52,21 +54,21 @@ import { /* eslint-disable-next-line */ const log = buildLog('C:MembershipContent') -const PayButton = ({ pkgType, payType }) => { - if (pkgType === PACKAGE.GIRL) { - return ( - - ) - } +// const PayButton = ({ pkgType, payType }) => { +// if (pkgType === PACKAGE.GIRL) { +// return ( +// +// ) +// } - return ( - - ) -} +// return ( +// +// ) +// } type TProps = { membershipContent?: TStore @@ -87,7 +89,7 @@ const MembershipContentContainer: FC = ({ - Hi, mydearxym + Hi,你好哇 👋 欢迎来到 CoderPlanets,选择一个适合你的会员类型吧 = ({ {item.pkgType === PACKAGE.FREE ? ( 当前为免费账户无需支付 ) : ( - + + // )} diff --git a/src/containers/content/MembershipContent/store.ts b/src/containers/content/MembershipContent/store.ts index 56d7dadf4..7c09e2e0d 100755 --- a/src/containers/content/MembershipContent/store.ts +++ b/src/containers/content/MembershipContent/store.ts @@ -29,21 +29,30 @@ const MembershipContent = T.model('MembershipContent', { yearlyPrice: '0', monthlyPrice: '0', illustration: PACKAGE.FREE, - serviceItems: [{ title: '发布各种内容' }, { title: '创建子社区' }], + serviceItems: [ + { title: '发布各种内容' }, + { title: '参与编辑公共内容' }, + { title: '申请创建子社区' }, + { title: '查看社区基础统计' }, + ], }, { pkgType: PACKAGE.ADVANCE, - desc: '更好更全面的阅读、交互体验。优先参与社区规划共建', - yearlyPrice: '59', - monthlyPrice: '5.9', + desc: '更好更全面的阅读、交互体验。更丰富的交流工具', + yearlyPrice: '99', + monthlyPrice: '9.9', illustration: PACKAGE.ADVANCE, serviceItems: [ { title: '主题设置' }, - { title: '头像特殊标识' }, - { title: '发起投票' }, + { title: '自定义社区布局' }, + { title: '自定义快速跳转' }, + { title: '评论表情包' }, { title: '设置文章打赏' }, - // { title: '订阅栏分组' }, - { title: '需求优先响应' }, + { title: '发起投票' }, + { title: '头像特殊标识' }, + { title: '自定义背景' }, + { title: '社区详细统计数据' }, + { title: '免除广告' }, ], }, { @@ -53,35 +62,43 @@ const MembershipContent = T.model('MembershipContent', { monthlyPrice: '0', illustration: PACKAGE.GIRL, serviceItems: [ - { title: '主题设置' }, - { title: '头像特殊标识' }, + { title: '女生头像标识' }, { title: '发起投票' }, - { title: '设置文章打赏' }, - // { title: '订阅栏分组' }, { title: '需求优先响应' }, + { title: '个别场景更高权重' }, + { title: '不定期周边礼品' }, ], }, { pkgType: PACKAGE.TEAM, - desc: '全部功能。适合独立开发者、小团队等需要独立空间的场景', - yearlyPrice: '199', - monthlyPrice: '19.9', + desc: '社区 SaaS 服务。适合独立开发者、小团队等需要独立社区的场景', + yearlyPrice: '1999', + monthlyPrice: '199.9', illustration: PACKAGE.TEAM, serviceItems: [ + { + title: '看板等个性化版块', + }, { title: '自定义二级域名', }, + { + title: '第三方平台集成', + }, + { + title: '设置自定义广告', + }, { title: '隐藏主站其他入口', }, { - title: '8 小时工单支持', + title: 'Github 主页特别鸣谢', }, { - title: 'Github 主页鸣谢', + title: '站内特别鸣谢', }, { - title: '站内鸣谢', + title: '工作日客服支持', }, ], }, diff --git a/src/containers/content/MembershipContent/styles/index.ts b/src/containers/content/MembershipContent/styles/index.ts index 03c354c7b..da56255d4 100755 --- a/src/containers/content/MembershipContent/styles/index.ts +++ b/src/containers/content/MembershipContent/styles/index.ts @@ -64,7 +64,7 @@ export const Dashboard = styled.div` padding-bottom: 30px; border: 2px solid; border-color: ${({ active }) => - active ? theme('banner.desc') : 'transparent'}; + active ? theme('button.primary') : 'transparent'}; border-radius: 5px; box-shadow: ${({ active }) => active ? '1px 1px 20px 0px rgb(37 37 37 / 42%)' : 'none'}; diff --git a/src/containers/content/MembershipContent/styles/invite_box/index.ts b/src/containers/content/MembershipContent/styles/invite_box/index.ts index f20634e74..fe7701702 100644 --- a/src/containers/content/MembershipContent/styles/invite_box/index.ts +++ b/src/containers/content/MembershipContent/styles/invite_box/index.ts @@ -11,11 +11,16 @@ export const Wrapper = styled.div.attrs(({ testid }: TTestable) => ({ color: ${theme('thread.articleDigest')}; ${css.flexColumn('align-center')}; width: 100%; - padding: 20px; ` export const Header = styled.div` ${css.flex('align-center')}; - margin-bottom: 22px; + filter: ${theme('modal.subPanelShadow')}; + margin-bottom: 15px; + padding-top: 12px; +` +export const Content = styled.div` + background: ${theme('modal.subPanel')}; + padding-top: 20px; ` export const HandIcon = styled(Img)` fill: ${theme('thread.articleTitle')}; diff --git a/src/containers/content/MembershipContent/styles/invite_box/qa.ts b/src/containers/content/MembershipContent/styles/invite_box/qa.ts index db7f16413..5e08cf536 100644 --- a/src/containers/content/MembershipContent/styles/invite_box/qa.ts +++ b/src/containers/content/MembershipContent/styles/invite_box/qa.ts @@ -11,6 +11,7 @@ export const Wrapper = styled.div.attrs(({ testid }: TTestable) => ({ ${css.flexColumn('align-start')}; width: 100%; margin-top: 30px; + margin-bottom: 30px; padding: 0 25px; ` export const Title = styled.div` diff --git a/src/containers/content/MembershipContent/styles/qa.ts b/src/containers/content/MembershipContent/styles/qa.ts index 258f8e332..ea419bab2 100644 --- a/src/containers/content/MembershipContent/styles/qa.ts +++ b/src/containers/content/MembershipContent/styles/qa.ts @@ -32,10 +32,23 @@ export const Content = styled.div` export const QTitle = styled.div` font-size: 16px; color: ${theme('thread.articleTitle')}; - margin-bottom: 8px; + margin-bottom: 15px; ` export const ABody = styled.div` font-size: 14px; color: ${theme('thread.articleDigest')}; margin-bottom: 30px; + line-height: 1.6; +` +export const Ul = styled.ul` + list-style: disc; + margin-left: 16px; +` +export const Li = styled.li` + margin-bottom: 3px; + line-height: 1.6; +` +export const Bold = styled.span` + color: ${theme('thread.articleTitle')}; + font-weight: bold; ` diff --git a/src/containers/content/MembershipContent/styles/support.ts b/src/containers/content/MembershipContent/styles/support.ts index 0d03b1376..ec8673782 100644 --- a/src/containers/content/MembershipContent/styles/support.ts +++ b/src/containers/content/MembershipContent/styles/support.ts @@ -5,6 +5,8 @@ import Img from '@/Img' import { theme } from '@/utils/themes' import css from '@/utils/css' +import CheckedSVG from '@/icons/Checked' + import { Dashboard } from './index' export const PkgItem = styled.div` @@ -24,23 +26,14 @@ export const PkgItemTitle = styled.div<{ not: boolean }>` !not ? theme('thread.articleTitle') : theme('thread.articleDigest')}; font-size: 14px; ` -const PkgItemIcon = styled(Img)` - margin-right: 6px; -` -export const PkgItemYesIcon = styled(PkgItemIcon)` +export const PkgItemYesIcon = styled(CheckedSVG)` fill: ${theme('baseColor.green')}; - ${css.size(12)}; - margin-right: 8px; + ${css.size(15)}; + margin-right: 6px; ` -export const ArrowIcon = styled(PkgItemIcon)` +export const ArrowIcon = styled(Img)` ${css.size(15)}; fill: ${theme('baseColor.green')}; - margin-left: -2px; -` -export const PkgItemNoIcon = styled(PkgItemIcon)` - fill: ${theme('baseColor.red')}; - width: 12px; - height: 10px; - margin-right: 6px; - opacity: 0.6; + margin-left: -1px; + margin-right: 7px; ` diff --git a/src/pages/membership.tsx b/src/pages/membership.tsx index 1239a9c0e..e75226494 100755 --- a/src/pages/membership.tsx +++ b/src/pages/membership.tsx @@ -1,3 +1,4 @@ +import { GetServerSideProps } from 'next' import { Provider } from 'mobx-react' import { METRIC } from '@/constant' @@ -5,7 +6,7 @@ import { METRIC } from '@/constant' import { ssrBaseStates, ssrFetchPrepare, - ssrRescue, + refreshIfneed, membershipSEO, ssrError, } from '@/utils' @@ -17,38 +18,30 @@ import { useStore } from '@/stores/init' const fetchData = async (context, opt = {}) => { const { gqClient } = ssrFetchPrepare(context, opt) - const sessionState = gqClient.request(P.sessionState) - const subscribedCommunities = gqClient.request(P.subscribedCommunities, { - filter: { - page: 1, - size: 30, - }, - }) return { ...(await sessionState), - ...(await subscribedCommunities), } } -export const getServerSideProps = async (context) => { +export const getServerSideProps: GetServerSideProps = async (context) => { let resp try { resp = await fetchData(context) - } catch ({ response: { errors } }) { - if (ssrRescue.hasLoginError(errors)) { - resp = await fetchData(context, { tokenExpired: true }) - } else { - return ssrError(context, 'fetch', 500) - } - } + const { sessionState } = resp - const initProps = { ...ssrBaseStates(resp) } + refreshIfneed(sessionState, '/trending', context) + } catch (e) { + console.log('#### error from server: ', e) + return ssrError(context, 'fetch', 500) + } - return { - props: { errorCode: null, namespacesRequired: ['general'], ...initProps }, + const initProps = { + ...ssrBaseStates(resp), } + + return { props: { errorCode: null, ...initProps } } } const MembershipPage = (props) => {