├── mock └── .gitkeep ├── src ├── models │ ├── .gitkeep │ ├── ad.js │ ├── report.js │ ├── article │ │ ├── reward.js │ │ └── user.js │ ├── software │ │ ├── group.js │ │ ├── reward.js │ │ └── user.js │ ├── answer │ │ ├── group-user.js │ │ ├── reward.js │ │ └── user.js │ ├── question │ │ └── user.js │ ├── column │ │ └── member.js │ ├── path.js │ ├── doc │ │ └── version.js │ └── user │ │ ├── bank.js │ │ └── third-account.js ├── pages │ ├── user │ │ ├── settings │ │ │ ├── profile │ │ │ │ └── index.less │ │ │ ├── account │ │ │ │ ├── components │ │ │ │ │ ├── Path │ │ │ │ │ │ └── formMap.js │ │ │ │ │ ├── Email │ │ │ │ │ │ └── formMap.js │ │ │ │ │ ├── Mobile │ │ │ │ │ │ └── formMap.js │ │ │ │ │ ├── Third │ │ │ │ │ │ └── index.less │ │ │ │ │ └── Password │ │ │ │ │ │ └── formMap.js │ │ │ │ └── index.less │ │ │ ├── notifications │ │ │ │ └── service.js │ │ │ └── components │ │ │ │ └── Layout │ │ │ │ ├── sider.js │ │ │ │ └── index.js │ │ ├── dashboard │ │ │ ├── analytics │ │ │ │ ├── components │ │ │ │ │ ├── Content │ │ │ │ │ │ ├── Chart │ │ │ │ │ │ │ ├── index.less │ │ │ │ │ │ │ └── Line.js │ │ │ │ │ │ ├── DateSelect │ │ │ │ │ │ │ └── index.less │ │ │ │ │ │ ├── index.less │ │ │ │ │ │ └── index.js │ │ │ │ │ └── Total │ │ │ │ │ │ └── index.less │ │ │ │ └── service.js │ │ │ ├── income │ │ │ │ ├── components │ │ │ │ │ ├── Content │ │ │ │ │ │ ├── Chart │ │ │ │ │ │ │ ├── index.less │ │ │ │ │ │ │ └── Line.js │ │ │ │ │ │ ├── DateSelect │ │ │ │ │ │ │ └── index.less │ │ │ │ │ │ ├── index.less │ │ │ │ │ │ └── index.js │ │ │ │ │ └── Total │ │ │ │ │ │ └── index.less │ │ │ │ └── service.js │ │ │ ├── history │ │ │ │ ├── service.js │ │ │ │ ├── model.js │ │ │ │ └── index.less │ │ │ ├── wallet │ │ │ │ ├── components │ │ │ │ │ └── Access │ │ │ │ │ │ ├── index.less │ │ │ │ │ │ └── Withdraw │ │ │ │ │ │ └── index.less │ │ │ │ └── index.js │ │ │ ├── recent │ │ │ │ └── service.js │ │ │ ├── column │ │ │ │ └── index.less │ │ │ ├── follows │ │ │ │ └── index.less │ │ │ └── components │ │ │ │ ├── Layout │ │ │ │ ├── index.js │ │ │ │ └── Nav │ │ │ │ │ ├── index.less │ │ │ │ │ └── index.js │ │ │ │ └── CardMenu │ │ │ │ └── index.less │ │ ├── register │ │ │ ├── service.js │ │ │ ├── formMap.js │ │ │ ├── model.js │ │ │ └── index.less │ │ ├── notifications │ │ │ └── components │ │ │ │ └── Layout │ │ │ │ ├── index.js │ │ │ │ └── sider.js │ │ ├── login │ │ │ ├── service.js │ │ │ ├── formMap.js │ │ │ └── index.less │ │ └── locales │ │ │ └── zh-CN.js │ ├── path │ │ ├── components │ │ │ ├── column │ │ │ │ └── components │ │ │ │ │ ├── setting │ │ │ │ │ ├── index.less │ │ │ │ │ └── formMap.js │ │ │ │ │ └── member │ │ │ │ │ └── index.js │ │ │ └── user │ │ │ │ ├── components │ │ │ │ ├── Column.less │ │ │ │ └── Activity.less │ │ │ │ └── menu.js │ │ ├── services │ │ │ └── user │ │ │ │ └── service.js │ │ └── models │ │ │ └── user │ │ │ └── model.js │ ├── home │ │ ├── locales │ │ │ └── zh-CN.js │ │ ├── service.js │ │ ├── index.less │ │ └── components │ │ │ ├── Writer │ │ │ └── index.js │ │ │ └── Answerer │ │ │ └── index.js │ ├── yun │ │ └── locales │ │ │ └── zh-CN.js │ ├── Search │ │ ├── locales │ │ │ └── zh-CN.js │ │ ├── service.js │ │ ├── menus.js │ │ └── index.less │ ├── search │ │ ├── locales │ │ │ └── zh-CN.js │ │ ├── service.js │ │ ├── menus.js │ │ └── index.less │ ├── knowledge │ │ ├── locales │ │ │ └── zh-CN.js │ │ └── index.js │ ├── question │ │ ├── detail │ │ │ └── components │ │ │ │ ├── Related │ │ │ │ └── index.less │ │ │ │ ├── Answer │ │ │ │ ├── index.js │ │ │ │ └── index.less │ │ │ │ ├── Comment │ │ │ │ └── index.less │ │ │ │ └── Author │ │ │ │ └── index.less │ │ ├── components │ │ │ ├── GroupUser │ │ │ │ └── index.less │ │ │ └── HistoryExtra │ │ │ │ ├── index.less │ │ │ │ └── index.js │ │ ├── locales │ │ │ └── zh-CN.js │ │ ├── Edit │ │ │ └── components │ │ │ │ ├── Reward │ │ │ │ └── index.less │ │ │ │ └── Alert │ │ │ │ ├── index.less │ │ │ │ └── index.js │ │ └── edit │ │ │ └── components │ │ │ ├── Reward │ │ │ └── index.less │ │ │ └── Alert │ │ │ ├── index.less │ │ │ └── index.js │ ├── Column │ │ ├── locales │ │ │ └── zh-CN.js │ │ └── index.less │ ├── column │ │ ├── locales │ │ │ └── zh-CN.js │ │ ├── apply │ │ │ ├── index.less │ │ │ └── formMap.js │ │ └── index.less │ ├── Tag │ │ ├── locales │ │ │ └── zh-CN.js │ │ ├── detail │ │ │ ├── components │ │ │ │ ├── Intro.js │ │ │ │ ├── Column.less │ │ │ │ ├── RelatedArticle │ │ │ │ │ └── index.less │ │ │ │ └── RelatedColumn │ │ │ │ │ └── index.less │ │ │ ├── index.less │ │ │ └── menu.js │ │ └── list │ │ │ └── index.less │ ├── tag │ │ ├── locales │ │ │ └── zh-CN.js │ │ ├── detail │ │ │ ├── components │ │ │ │ ├── Intro.js │ │ │ │ ├── Column.less │ │ │ │ ├── RelatedArticle │ │ │ │ │ └── index.less │ │ │ │ └── RelatedColumn │ │ │ │ │ └── index.less │ │ │ ├── index.less │ │ │ └── menu.js │ │ └── list │ │ │ └── index.less │ ├── preview │ │ ├── service.js │ │ ├── index.less │ │ ├── model.js │ │ └── index.js │ ├── software │ │ ├── detail │ │ │ └── components │ │ │ │ └── Action │ │ │ │ ├── index.js │ │ │ │ └── Delete.js │ │ ├── edit │ │ │ └── components │ │ │ │ ├── Group │ │ │ │ ├── index.less │ │ │ │ └── index.js │ │ │ │ ├── Manage │ │ │ │ └── index.less │ │ │ │ └── Setting │ │ │ │ └── formMap.js │ │ ├── locales │ │ │ └── zh-CN.js │ │ └── index.less │ ├── article │ │ ├── Edit │ │ │ └── components │ │ │ │ ├── Column │ │ │ │ └── index.less │ │ │ │ └── Source │ │ │ │ └── index.less │ │ ├── edit │ │ │ └── components │ │ │ │ ├── Column │ │ │ │ └── index.less │ │ │ │ ├── Source │ │ │ │ └── index.less │ │ │ │ └── Setting │ │ │ │ └── formMap.js │ │ ├── locales │ │ │ └── zh-CN.js │ │ ├── components │ │ │ ├── HistoryExtra │ │ │ │ ├── index.less │ │ │ │ └── index.js │ │ │ ├── HotTag │ │ │ │ └── index.js │ │ │ └── HotColumn │ │ │ │ └── index.less │ │ └── detail │ │ │ └── Related.js │ ├── Article │ │ └── locales │ │ │ └── zh-CN.js │ ├── Question │ │ └── locales │ │ │ └── zh-CN.js │ ├── 404.js │ ├── 403.js │ ├── 500.js │ ├── document.ejs │ └── User │ │ └── locales │ │ └── zh-CN.js ├── components │ ├── Editor │ │ ├── Section │ │ │ ├── paidcontent │ │ │ │ ├── SubEditor │ │ │ │ │ ├── index.js │ │ │ │ │ └── index.less │ │ │ │ ├── Setting.js │ │ │ │ ├── Content │ │ │ │ │ └── index.js │ │ │ │ └── index.less │ │ │ └── index.js │ │ ├── Plugin │ │ │ ├── index.js │ │ │ └── PaidContent.js │ │ ├── Collab │ │ │ ├── ot │ │ │ │ ├── logger │ │ │ │ │ ├── index.js │ │ │ │ │ └── logger.js │ │ │ │ ├── snapshot.js │ │ │ │ ├── client │ │ │ │ │ ├── index.js │ │ │ │ │ └── snapshot-request │ │ │ │ │ │ ├── snapshot-version-request.js │ │ │ │ │ │ └── snapshot-timestamp-request.js │ │ │ │ ├── error.js │ │ │ │ ├── types.js │ │ │ │ ├── emitter.js │ │ │ │ └── util.js │ │ │ └── constant │ │ │ │ └── index.js │ │ └── utils.js │ ├── Form │ │ ├── index.less │ │ ├── WrapItem │ │ │ ├── Default.less │ │ │ ├── Capthcha.less │ │ │ └── index.js │ │ ├── formContext.js │ │ ├── Submit.js │ │ ├── map.less │ │ └── Tab.js │ ├── Loading │ │ ├── Button.less │ │ ├── index.less │ │ ├── Button.js │ │ └── index.js │ ├── Content │ │ ├── Question │ │ │ └── Action │ │ │ │ ├── index.js │ │ │ │ ├── Favorite.js │ │ │ │ └── Delete.js │ │ ├── index.js │ │ ├── Article │ │ │ └── Action │ │ │ │ ├── index.js │ │ │ │ ├── Favorite.js │ │ │ │ └── Delete.js │ │ └── Answer │ │ │ └── Action │ │ │ ├── index.js │ │ │ ├── Favorite.js │ │ │ └── Adopt.js │ ├── Tag │ │ ├── Selector.less │ │ ├── Create │ │ │ └── formMap.js │ │ ├── Brand │ │ │ └── index.less │ │ └── Star │ │ │ └── index.js │ ├── User │ │ ├── Verify │ │ │ └── formMap.js │ │ ├── index.js │ │ ├── Actors │ │ │ ├── index.less │ │ │ └── index.js │ │ ├── Brand │ │ │ └── index.less │ │ └── Star │ │ │ └── index.js │ ├── Button │ │ ├── RewardButton │ │ │ ├── index.js │ │ │ └── Button │ │ │ │ └── index.less │ │ ├── ReportButton │ │ │ ├── Form │ │ │ │ ├── index.less │ │ │ │ └── formMap.js │ │ │ ├── Modal.less │ │ │ └── index.js │ │ ├── FavoriteButton.js │ │ ├── OpposeButton.js │ │ ├── ShareButton │ │ │ └── index.less │ │ ├── EllipsisButton.js │ │ ├── AdoptButton.js │ │ ├── HistoryButton.js │ │ ├── ReplyButton.js │ │ ├── EditButton.js │ │ ├── DeleteButton.js │ │ ├── CommentButton.js │ │ ├── BackTopButton.js │ │ ├── SupportButton.js │ │ ├── BaseButton.js │ │ ├── index.less │ │ └── index.js │ ├── PaidRead │ │ ├── index.js │ │ ├── Purchase │ │ │ └── index.less │ │ └── Setting │ │ │ └── index.less │ ├── Column │ │ ├── index.js │ │ ├── Brand │ │ │ └── index.less │ │ └── Star │ │ │ └── index.js │ ├── ThirdParty │ │ ├── index.less │ │ ├── index.js │ │ ├── GithubIcon.js │ │ ├── AlipayIcon.js │ │ ├── AlipayLogin.js │ │ └── GithubLogin.js │ ├── List │ │ ├── index.js │ │ ├── Default.js │ │ └── More.js │ ├── Header │ │ ├── Logo.js │ │ ├── index.js │ │ ├── Container.js │ │ ├── Burger │ │ │ └── index.less │ │ ├── Search │ │ │ ├── index.less │ │ │ └── index.js │ │ └── User │ │ │ └── ActionMenu.js │ ├── Ad │ │ ├── index.less │ │ ├── Baidu.js │ │ └── AdSense.js │ ├── Footer │ │ └── index.less │ ├── Timer │ │ └── index.js │ ├── Pay │ │ └── QrCode │ │ │ └── index.less │ ├── AvatarCropper │ │ ├── ImageCropper.less │ │ └── index.less │ ├── Container │ │ ├── index.less │ │ ├── Sider.js │ │ └── Layout.js │ ├── Exception │ │ └── index.js │ └── Comment │ │ └── Detail.js ├── context │ ├── index.js │ └── RouteContext.js ├── services │ ├── path.js │ ├── answer │ │ ├── user.js │ │ ├── group-user.js │ │ ├── star.js │ │ └── comment.js │ ├── article │ │ ├── user.js │ │ ├── star.js │ │ ├── comment.js │ │ └── index.js │ ├── column │ │ ├── member.js │ │ ├── star.js │ │ └── index.js │ ├── question │ │ ├── user.js │ │ ├── star.js │ │ ├── index.js │ │ └── comment.js │ ├── software │ │ ├── user.js │ │ ├── group.js │ │ ├── file.js │ │ ├── index.js │ │ └── comment.js │ ├── user │ │ ├── oauth.js │ │ ├── bank.js │ │ ├── third-account.js │ │ ├── verify.js │ │ ├── withdraw.js │ │ ├── pay.js │ │ ├── star.js │ │ └── index.js │ ├── report.js │ ├── system │ │ └── index.js │ ├── doc │ │ ├── version.js │ │ └── index.js │ ├── tag │ │ ├── star.js │ │ └── index.js │ ├── reward.js │ ├── notifications.js │ └── validation.js ├── app.js ├── locales │ └── zh-CN.js ├── wrappers │ └── auth.js ├── layouts │ ├── BasicLayout.js │ ├── PassportLayout.less │ └── PassportLayout.js └── access.js ├── .env ├── .eslintrc ├── dump.rdb ├── .gitattributes ├── .prettierignore ├── .prettierrc ├── jsconfig.json ├── .editorconfig ├── .gitignore └── config └── defaultSettings.js /mock/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/models/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | BROWSER=none 2 | ESLINT=1 3 | -------------------------------------------------------------------------------- /src/pages/user/settings/profile/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "eslint-config-umi" 3 | } 4 | -------------------------------------------------------------------------------- /src/components/Editor/Section/paidcontent/SubEditor/index.js: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/Editor/Section/paidcontent/SubEditor/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/pages/path/components/column/components/setting/index.less: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /dump.rdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/big-camel/itellyou/HEAD/dump.rdb -------------------------------------------------------------------------------- /src/components/Form/index.less: -------------------------------------------------------------------------------- 1 | .tabs { 2 | text-align: center; 3 | } 4 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /src/pages/home/locales/zh-CN.js: -------------------------------------------------------------------------------- 1 | 2 | export default { 3 | 'home.page.index':"首页" 4 | } -------------------------------------------------------------------------------- /src/pages/yun/locales/zh-CN.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'yun.page.index': '云服务', 3 | }; 4 | -------------------------------------------------------------------------------- /src/components/Loading/Button.less: -------------------------------------------------------------------------------- 1 | .default { 2 | width: 100%; 3 | margin: 10px 0; 4 | } -------------------------------------------------------------------------------- /src/pages/Search/locales/zh-CN.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'search.page.index': '搜索', 3 | }; 4 | -------------------------------------------------------------------------------- /src/pages/search/locales/zh-CN.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'search.page.index': '搜索', 3 | }; 4 | -------------------------------------------------------------------------------- /src/context/index.js: -------------------------------------------------------------------------------- 1 | import RouteContext from './RouteContext'; 2 | 3 | export { RouteContext }; 4 | -------------------------------------------------------------------------------- /src/pages/knowledge/locales/zh-CN.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'knowledge.page.index': '知识', 3 | }; 4 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | **/*.md 2 | **/*.svg 3 | **/*.ejs 4 | **/*.html 5 | package.json 6 | .umi 7 | .umi-production 8 | -------------------------------------------------------------------------------- /src/context/RouteContext.js: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react'; 2 | 3 | export default createContext({}); 4 | -------------------------------------------------------------------------------- /src/pages/user/dashboard/analytics/components/Content/Chart/index.less: -------------------------------------------------------------------------------- 1 | .chart { 2 | padding: 16px; 3 | } 4 | -------------------------------------------------------------------------------- /src/pages/user/dashboard/income/components/Content/Chart/index.less: -------------------------------------------------------------------------------- 1 | .chart { 2 | padding: 16px; 3 | } 4 | -------------------------------------------------------------------------------- /src/components/Editor/Plugin/index.js: -------------------------------------------------------------------------------- 1 | import PaidContent from './PaidContent'; 2 | 3 | export { PaidContent }; 4 | -------------------------------------------------------------------------------- /src/components/Editor/Section/index.js: -------------------------------------------------------------------------------- 1 | import PaidContent from './paidcontent'; 2 | 3 | export { PaidContent }; 4 | -------------------------------------------------------------------------------- /src/pages/question/detail/components/Related/index.less: -------------------------------------------------------------------------------- 1 | .related-list { 2 | .related-link { 3 | color: #262626; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/components/Editor/Collab/ot/logger/index.js: -------------------------------------------------------------------------------- 1 | var Logger = require('./logger'); 2 | var logger = new Logger(); 3 | module.exports = logger; 4 | -------------------------------------------------------------------------------- /src/components/Form/WrapItem/Default.less: -------------------------------------------------------------------------------- 1 | .hidden { 2 | :global(.ant-form-item-control-input) { 3 | display: none; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /src/pages/user/dashboard/income/components/Content/DateSelect/index.less: -------------------------------------------------------------------------------- 1 | .radio-date { 2 | text-align: center; 3 | margin: 16px auto; 4 | } 5 | -------------------------------------------------------------------------------- /src/components/Form/formContext.js: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react'; 2 | 3 | const FormContext = createContext(); 4 | export default FormContext; 5 | -------------------------------------------------------------------------------- /src/pages/user/dashboard/analytics/components/Content/DateSelect/index.less: -------------------------------------------------------------------------------- 1 | .radio-date { 2 | text-align: center; 3 | margin: 16px auto; 4 | } 5 | -------------------------------------------------------------------------------- /src/components/Content/Question/Action/index.js: -------------------------------------------------------------------------------- 1 | import Favorite from './Favorite'; 2 | import Delete from './Delete'; 3 | 4 | export { Favorite, Delete }; 5 | -------------------------------------------------------------------------------- /src/components/Tag/Selector.less: -------------------------------------------------------------------------------- 1 | .tag-selector { 2 | flex-wrap: wrap; 3 | 4 | :global(.ant-space-item) { 5 | margin-bottom: 8px; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/components/User/Verify/formMap.js: -------------------------------------------------------------------------------- 1 | import formMap from '@/components/Form/map'; 2 | const { Captcha } = formMap; 3 | export default { 4 | Captcha, 5 | }; 6 | -------------------------------------------------------------------------------- /src/components/Button/RewardButton/index.js: -------------------------------------------------------------------------------- 1 | import RewardButton from './Button'; 2 | import RewardPanel from './Panel'; 3 | 4 | export { RewardButton, RewardPanel }; 5 | -------------------------------------------------------------------------------- /src/pages/Column/locales/zh-CN.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'column.page.index': '专栏', 3 | 'column.page.apply': '专栏申请', 4 | 'column.page.detail': '专栏详情', 5 | }; 6 | -------------------------------------------------------------------------------- /src/pages/column/locales/zh-CN.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'column.page.index': '专栏', 3 | 'column.page.apply': '专栏申请', 4 | 'column.page.detail': '专栏详情', 5 | }; 6 | -------------------------------------------------------------------------------- /src/components/PaidRead/index.js: -------------------------------------------------------------------------------- 1 | import PaidReadSetting from './Setting'; 2 | import PaidReadPurchase from './Purchase'; 3 | 4 | export { PaidReadSetting, PaidReadPurchase }; 5 | -------------------------------------------------------------------------------- /src/pages/question/components/GroupUser/index.less: -------------------------------------------------------------------------------- 1 | .group-item{ 2 | flex: 1 1; 3 | display: flex; 4 | align-items: center; 5 | justify-content: space-between; 6 | } -------------------------------------------------------------------------------- /src/components/Editor/Section/paidcontent/Setting.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Modal } from 'antd'; 3 | 4 | export default () => { 5 | return ; 6 | }; 7 | -------------------------------------------------------------------------------- /src/components/Loading/index.less: -------------------------------------------------------------------------------- 1 | .loading { 2 | padding: 20px; 3 | text-align: center; 4 | display: block; 5 | } 6 | 7 | .icon { 8 | font-size: 16px; 9 | } 10 | -------------------------------------------------------------------------------- /src/pages/user/dashboard/income/components/Content/index.less: -------------------------------------------------------------------------------- 1 | .card-content { 2 | :global { 3 | .ant-card-body { 4 | padding: 0; 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/pages/user/settings/account/components/Path/formMap.js: -------------------------------------------------------------------------------- 1 | import formMap from '@/components/Form/map'; 2 | const { Path } = formMap; 3 | 4 | export default { 5 | Path, 6 | }; 7 | -------------------------------------------------------------------------------- /src/components/Content/index.js: -------------------------------------------------------------------------------- 1 | import Answer from './Answer'; 2 | import Article from './Article'; 3 | import Question from './Question'; 4 | 5 | export { Answer, Article, Question }; 6 | -------------------------------------------------------------------------------- /src/pages/Tag/locales/zh-CN.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'tag.page.index': '常用标签', 3 | 'tag.page.list': '全部标签', 4 | 'tag.page.edit': '标签编辑', 5 | 'tag.page.detail': '标签详情', 6 | }; 7 | -------------------------------------------------------------------------------- /src/pages/tag/locales/zh-CN.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'tag.page.index': '常用标签', 3 | 'tag.page.list': '全部标签', 4 | 'tag.page.edit': '标签编辑', 5 | 'tag.page.detail': '标签详情', 6 | }; 7 | -------------------------------------------------------------------------------- /src/pages/user/dashboard/analytics/components/Content/index.less: -------------------------------------------------------------------------------- 1 | .card-content { 2 | :global { 3 | .ant-card-body { 4 | padding: 0; 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/services/path.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function find(params) { 4 | return request('/api/path/find', { 5 | params, 6 | }); 7 | } 8 | -------------------------------------------------------------------------------- /src/pages/Search/service.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function list(params) { 4 | return request(`/api/search`, { 5 | params, 6 | }); 7 | } 8 | -------------------------------------------------------------------------------- /src/pages/preview/service.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function getURL(params) { 4 | return request(`/api/preview`, { 5 | params, 6 | }); 7 | } 8 | -------------------------------------------------------------------------------- /src/pages/search/service.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function list(params) { 4 | return request(`/api/search`, { 5 | params, 6 | }); 7 | } 8 | -------------------------------------------------------------------------------- /src/pages/software/detail/components/Action/index.js: -------------------------------------------------------------------------------- 1 | import Vote from './Vote'; 2 | import Comment from './Comment'; 3 | import Delete from './Delete'; 4 | 5 | export { Vote, Comment, Delete }; 6 | -------------------------------------------------------------------------------- /src/services/answer/user.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function list(params) { 4 | return request(`/api/user/answer`, { 5 | params, 6 | }); 7 | } 8 | -------------------------------------------------------------------------------- /src/services/article/user.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function list(params) { 4 | return request(`/api/user/article`, { 5 | params, 6 | }); 7 | } 8 | -------------------------------------------------------------------------------- /src/services/column/member.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function list(params) { 4 | return request(`/api/column/member`, { 5 | params, 6 | }); 7 | } 8 | -------------------------------------------------------------------------------- /src/services/question/user.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function list(params) { 4 | return request(`/api/user/question`, { 5 | params, 6 | }); 7 | } 8 | -------------------------------------------------------------------------------- /src/services/software/user.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function list(params) { 4 | return request(`/api/user/software`, { 5 | params, 6 | }); 7 | } 8 | -------------------------------------------------------------------------------- /src/services/user/oauth.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export const oauthURL = async ({ type, action }) => { 4 | return request(`/api/oauth/${type}?action=${action}`); 5 | }; 6 | -------------------------------------------------------------------------------- /src/components/Column/index.js: -------------------------------------------------------------------------------- 1 | import ColumnDetail from './Detail'; 2 | import ColumnBrand from './Brand'; 3 | import ColumnStar from './Star'; 4 | 5 | export { ColumnDetail, ColumnBrand, ColumnStar }; 6 | -------------------------------------------------------------------------------- /src/pages/article/Edit/components/Column/index.less: -------------------------------------------------------------------------------- 1 | .column { 2 | :global(.ant-radio-wrapper) { 3 | display: block; 4 | height: 30px; 5 | line-height: 30px; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/pages/article/Edit/components/Source/index.less: -------------------------------------------------------------------------------- 1 | .source { 2 | :global(.ant-radio-wrapper) { 3 | display: block; 4 | height: 30px; 5 | line-height: 30px; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/pages/article/edit/components/Column/index.less: -------------------------------------------------------------------------------- 1 | .column { 2 | :global(.ant-radio-wrapper) { 3 | display: block; 4 | height: 30px; 5 | line-height: 30px; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/pages/article/edit/components/Source/index.less: -------------------------------------------------------------------------------- 1 | .source { 2 | :global(.ant-radio-wrapper) { 3 | display: block; 4 | height: 30px; 5 | line-height: 30px; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/pages/software/edit/components/Group/index.less: -------------------------------------------------------------------------------- 1 | .column { 2 | :global(.ant-radio-wrapper) { 3 | display: block; 4 | height: 30px; 5 | line-height: 30px; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/pages/user/settings/account/components/Email/formMap.js: -------------------------------------------------------------------------------- 1 | import formMap from '@/components/Form/map' 2 | const { Email , Captcha } = formMap 3 | export default { 4 | Email, 5 | Captcha 6 | } 7 | -------------------------------------------------------------------------------- /src/pages/user/settings/account/components/Mobile/formMap.js: -------------------------------------------------------------------------------- 1 | import formMap from '@/components/Form/map' 2 | const { Mobile , Captcha } = formMap 3 | export default { 4 | Mobile, 5 | Captcha 6 | } 7 | -------------------------------------------------------------------------------- /src/pages/Article/locales/zh-CN.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'article.page.new': '新建文章', 3 | 'article.page.edit': '文章编辑', 4 | 'article.page.index': '文章列表', 5 | 'article.page.detail': '文章详情', 6 | }; 7 | -------------------------------------------------------------------------------- /src/pages/article/locales/zh-CN.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'article.page.new': '新建文章', 3 | 'article.page.edit': '文章编辑', 4 | 'article.page.index': '文章列表', 5 | 'article.page.detail': '文章详情', 6 | }; 7 | -------------------------------------------------------------------------------- /src/pages/path/services/user/service.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function list(params) { 4 | return request(`/api/user/activity`, { 5 | params, 6 | }); 7 | } 8 | -------------------------------------------------------------------------------- /src/pages/user/dashboard/history/service.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function list(params) { 4 | return request(`/api/view/list`, { 5 | params, 6 | }); 7 | } 8 | -------------------------------------------------------------------------------- /src/services/answer/group-user.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function list(params) { 4 | return request(`/api/answer/group-user`, { 5 | params, 6 | }); 7 | } 8 | -------------------------------------------------------------------------------- /src/services/software/group.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function list(params) { 4 | return request(`/api/software/group/list`, { 5 | params, 6 | }); 7 | } 8 | -------------------------------------------------------------------------------- /src/pages/Question/locales/zh-CN.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'question.page.index': '问答列表', 3 | 'question.page.new': '新建提问', 4 | 'question.page.edit': '提问编辑', 5 | 'question.page.detail': '提问详情', 6 | }; 7 | -------------------------------------------------------------------------------- /src/pages/article/components/HistoryExtra/index.less: -------------------------------------------------------------------------------- 1 | .version-extra { 2 | margin-bottom: 24px; 3 | 4 | .tags { 5 | .tag { 6 | margin-right: 8px; 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/pages/question/components/HistoryExtra/index.less: -------------------------------------------------------------------------------- 1 | .version-extra { 2 | margin-bottom: 24px; 3 | 4 | .tags { 5 | .tag { 6 | margin-right: 8px; 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/pages/question/locales/zh-CN.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'question.page.index': '问答列表', 3 | 'question.page.new': '新建提问', 4 | 'question.page.edit': '提问编辑', 5 | 'question.page.detail': '提问详情', 6 | }; 7 | -------------------------------------------------------------------------------- /src/pages/software/locales/zh-CN.js: -------------------------------------------------------------------------------- 1 | export default { 2 | 'download.page.index': '下载', 3 | 'software.page.edit': '软件编辑', 4 | 'software.page.new': '新建软件', 5 | 'download.page.detail': '下载详情', 6 | }; 7 | -------------------------------------------------------------------------------- /src/services/report.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | export async function post(params) { 4 | return request(`/api/report/post`,{ 5 | method:"POST", 6 | data:params 7 | }) 8 | } 9 | -------------------------------------------------------------------------------- /src/components/Editor/Section/paidcontent/Content/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export default () => { 4 | return ( 5 |
6 |

7 |
8 | ); 9 | }; 10 | -------------------------------------------------------------------------------- /src/pages/Tag/detail/components/Intro.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Editor from '@/components/Editor'; 3 | 4 | export default ({ content, html }) => { 5 | return ; 6 | }; 7 | -------------------------------------------------------------------------------- /src/pages/tag/detail/components/Intro.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Editor from '@/components/Editor'; 3 | 4 | export default ({ content, html }) => { 5 | return ; 6 | }; 7 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "trailingComma": "all", 4 | "printWidth": 100, 5 | "overrides": [ 6 | { 7 | "files": ".prettierrc", 8 | "options": { "parser": "json" } 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /src/components/Content/Article/Action/index.js: -------------------------------------------------------------------------------- 1 | import Vote from './Vote'; 2 | import Favorite from './Favorite'; 3 | import Comment from './Comment'; 4 | import Delete from './Delete'; 5 | 6 | export { Vote, Favorite, Comment, Delete }; 7 | -------------------------------------------------------------------------------- /src/pages/user/register/service.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | export async function register(params) { 4 | return request('/api/user/register',{ 5 | method: 'POST', 6 | data: params, 7 | }); 8 | } -------------------------------------------------------------------------------- /src/pages/user/register/formMap.js: -------------------------------------------------------------------------------- 1 | import formMap from '@/components/Form/map' 2 | 3 | const { Name , Mobile , Password , Captcha } = formMap 4 | 5 | export default { 6 | Name, 7 | Password, 8 | Mobile, 9 | Captcha, 10 | } 11 | -------------------------------------------------------------------------------- /src/pages/preview/index.less: -------------------------------------------------------------------------------- 1 | .preview-container { 2 | margin-top: 0; 3 | height: 100vh; 4 | 5 | iframe { 6 | border: 0; 7 | width: 100%; 8 | height: 100%; 9 | background: none; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/components/Editor/Collab/ot/snapshot.js: -------------------------------------------------------------------------------- 1 | module.exports = Snapshot; 2 | function Snapshot(id, version, type, data, meta) { 3 | this.id = id; 4 | this.v = version; 5 | this.type = type; 6 | this.data = data; 7 | this.m = meta; 8 | } 9 | -------------------------------------------------------------------------------- /src/pages/question/detail/components/Answer/index.js: -------------------------------------------------------------------------------- 1 | import List from './List'; 2 | import View from './View'; 3 | import { Answer } from '@/components/Content'; 4 | 5 | export default { 6 | List, 7 | View, 8 | Edit: Answer.Edit, 9 | }; 10 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "emitDecoratorMetadata": true, 4 | "experimentalDecorators": true, 5 | "baseUrl": ".", 6 | "paths": { 7 | "@/*": ["./src/*"] 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/components/ThirdParty/index.less: -------------------------------------------------------------------------------- 1 | .third-icon { 2 | font-size: 28px; 3 | } 4 | 5 | .github { 6 | color: #262626; 7 | } 8 | 9 | .alipay { 10 | color: @primary-color; 11 | } 12 | 13 | .third-link { 14 | display: inline-block; 15 | } 16 | -------------------------------------------------------------------------------- /src/services/system/index.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function getSetting() { 4 | return request('/api/system/setting'); 5 | } 6 | 7 | export async function getLink() { 8 | return request('/api/system/link'); 9 | } 10 | -------------------------------------------------------------------------------- /src/components/ThirdParty/index.js: -------------------------------------------------------------------------------- 1 | import AlipayIcon from './AlipayIcon'; 2 | import GithubIcon from './GithubIcon'; 3 | import AlipayLogin from './AlipayLogin'; 4 | import GithubLogin from './GithubLogin'; 5 | 6 | export { AlipayIcon, GithubIcon, GithubLogin, AlipayLogin }; 7 | -------------------------------------------------------------------------------- /src/pages/path/components/user/components/Column.less: -------------------------------------------------------------------------------- 1 | .column { 2 | .info { 3 | padding-left: 48px; 4 | 5 | .status { 6 | margin-top: 12px; 7 | color: #8590a6; 8 | font-size: 12px; 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/pages/question/Edit/components/Reward/index.less: -------------------------------------------------------------------------------- 1 | .reward { 2 | .current { 3 | line-height: 32px; 4 | 5 | strong { 6 | margin: 0 2px; 7 | } 8 | } 9 | 10 | .type { 11 | margin-bottom: 16px; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/pages/question/edit/components/Reward/index.less: -------------------------------------------------------------------------------- 1 | .reward { 2 | .current { 3 | line-height: 32px; 4 | 5 | strong { 6 | margin: 0 2px; 7 | } 8 | } 9 | 10 | .type { 11 | margin-bottom: 16px; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/components/List/index.js: -------------------------------------------------------------------------------- 1 | import Default from './Default' 2 | import PageList from './Page' 3 | import ScrollList from './Scroll' 4 | import MoreList from './More' 5 | 6 | export default Default 7 | 8 | export { 9 | PageList, 10 | ScrollList, 11 | MoreList 12 | } -------------------------------------------------------------------------------- /src/components/Editor/Collab/ot/client/index.js: -------------------------------------------------------------------------------- 1 | exports.Connection = require('./connection'); 2 | exports.Doc = require('./doc'); 3 | exports.Error = require('../error'); 4 | exports.Query = require('./query'); 5 | exports.types = require('../types'); 6 | exports.logger = require('../logger'); 7 | -------------------------------------------------------------------------------- /src/components/Editor/Collab/ot/error.js: -------------------------------------------------------------------------------- 1 | var makeError = require('make-error'); 2 | 3 | function ShareDBError(code, message) { 4 | ShareDBError.super.call(this, message); 5 | this.code = code; 6 | } 7 | 8 | makeError(ShareDBError); 9 | 10 | module.exports = ShareDBError; 11 | -------------------------------------------------------------------------------- /src/components/User/index.js: -------------------------------------------------------------------------------- 1 | import UserAuthor from './Author'; 2 | import UserBrand from './Brand'; 3 | import UserVerify from './Verify'; 4 | import UserStar from './Star'; 5 | import UserActors from './Actors'; 6 | 7 | export { UserAuthor, UserBrand, UserVerify, UserStar, UserActors }; 8 | -------------------------------------------------------------------------------- /src/services/software/file.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function recommend({ softwareId, fileId, ...params }) { 4 | return request(`/api/software/${softwareId}/file/${fileId}/recommend`, { 5 | data: params, 6 | method: 'POST', 7 | }); 8 | } 9 | -------------------------------------------------------------------------------- /src/components/Form/WrapItem/Capthcha.less: -------------------------------------------------------------------------------- 1 | .capthcha-item { 2 | display: flex; 3 | 4 | .input { 5 | flex: 1 1; 6 | } 7 | 8 | .btn { 9 | position: relative; 10 | min-width: 120px; 11 | margin-left: 8px; 12 | font-size: 14px; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/components/Form/WrapItem/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Capthcha from './Capthcha'; 3 | import Default from './Default'; 4 | 5 | export default ({ type, tabUtil, ...props }) => { 6 | if (type === 'Captcha') return ; 7 | return ; 8 | }; 9 | -------------------------------------------------------------------------------- /src/pages/user/settings/account/components/Third/index.less: -------------------------------------------------------------------------------- 1 | .third-warpper { 2 | :global { 3 | .ant-card { 4 | > .ant-card-body { 5 | display: block; 6 | } 7 | } 8 | } 9 | 10 | .content { 11 | margin-top: 24px; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/components/Header/Logo.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import logo from '@/assets/logo.svg' 3 | import styles from './index.less' 4 | 5 | export default () => { 6 | return ( 7 |
8 | 9 |
10 | ) 11 | } -------------------------------------------------------------------------------- /src/models/ad.js: -------------------------------------------------------------------------------- 1 | export default { 2 | namespace: 'ad', 3 | 4 | state: {}, 5 | effects: {}, 6 | reducers: { 7 | setAd(state, { payload }) { 8 | return { 9 | ...state, 10 | detail: { ...payload }, 11 | }; 12 | }, 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /src/services/user/bank.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function info(params) { 4 | return request(`/api/bank`, { 5 | params, 6 | }); 7 | } 8 | 9 | export async function log(params) { 10 | return request(`/api/bank/log`, { 11 | params, 12 | }); 13 | } 14 | -------------------------------------------------------------------------------- /src/components/Button/ReportButton/Form/index.less: -------------------------------------------------------------------------------- 1 | .form { 2 | 3 | .footer { 4 | display: flex; 5 | justify-content: space-between; 6 | 7 | button{ 8 | width: 100%; 9 | } 10 | 11 | button:first-child{ 12 | margin-right: 16px; 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /src/components/Editor/Collab/ot/types.js: -------------------------------------------------------------------------------- 1 | exports.defaultType = require('ot-json0').type; 2 | 3 | exports.map = {}; 4 | 5 | exports.register = function(type) { 6 | if (type.name) exports.map[type.name] = type; 7 | if (type.uri) exports.map[type.uri] = type; 8 | }; 9 | 10 | exports.register(exports.defaultType); 11 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 4 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | 15 | [Makefile] 16 | indent_style = tab 17 | -------------------------------------------------------------------------------- /src/components/ThirdParty/GithubIcon.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classNames from 'classnames'; 3 | import { GithubOutlined } from '@ant-design/icons'; 4 | import styles from './index.less'; 5 | 6 | export default () => { 7 | return ; 8 | }; 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /npm-debug.log* 6 | /yarn-error.log 7 | /yarn.lock 8 | /package-lock.json 9 | 10 | # production 11 | /dist 12 | 13 | # misc 14 | .DS_Store 15 | 16 | # umi 17 | .umi 18 | .umi-production 19 | -------------------------------------------------------------------------------- /src/components/Header/index.js: -------------------------------------------------------------------------------- 1 | import Default from './Default'; 2 | import HeaderLogo from './Logo'; 3 | import HeaderSearch from './Search'; 4 | import HeaderUser from './User'; 5 | import HeaderContainer from './Container'; 6 | 7 | export default Default; 8 | 9 | export { HeaderLogo, HeaderSearch, HeaderUser, HeaderContainer }; 10 | -------------------------------------------------------------------------------- /src/components/User/Actors/index.less: -------------------------------------------------------------------------------- 1 | .user-actors { 2 | .user-author { 3 | .user-author-name { 4 | font-size: 14px; 5 | } 6 | } 7 | 8 | .user-actors-authors { 9 | display: flex; 10 | 11 | .user-actors-item { 12 | display: flex; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/pages/question/detail/components/Comment/index.less: -------------------------------------------------------------------------------- 1 | .modal-warpper{ 2 | 3 | :global(.ant-modal-body){ 4 | padding: 0; 5 | } 6 | 7 | .modal-content{ 8 | .modal-comment-list{ 9 | margin-top: 0; 10 | border: 0 none; 11 | box-shadow: none; 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /src/components/Editor/Collab/ot/emitter.js: -------------------------------------------------------------------------------- 1 | var EventEmitter = require('events').EventEmitter; 2 | 3 | exports.EventEmitter = EventEmitter; 4 | exports.mixin = mixin; 5 | 6 | function mixin(Constructor) { 7 | for (var key in EventEmitter.prototype) { 8 | Constructor.prototype[key] = EventEmitter.prototype[key]; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/pages/user/dashboard/wallet/components/Access/index.less: -------------------------------------------------------------------------------- 1 | .warpper { 2 | margin-bottom: 20px; 3 | 4 | .body { 5 | display: flex; 6 | justify-content: space-between; 7 | 8 | .action { 9 | :global(.ant-btn) { 10 | width: 100px; 11 | } 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/app.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { ConfigProvider } from 'antd'; 3 | import locale from 'antd/es/locale/zh_CN'; 4 | 5 | export const rootContainer = (container) => { 6 | return ( 7 | 8 | {container} 9 | 10 | ); 11 | }; 12 | -------------------------------------------------------------------------------- /src/pages/user/settings/notifications/service.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request' 2 | 3 | export async function list() { 4 | return request('/api/notifications/settings') 5 | } 6 | 7 | export async function set(params) { 8 | return request('/api/notifications/settings',{ 9 | method: 'PUT', 10 | data:params 11 | }) 12 | } -------------------------------------------------------------------------------- /src/models/report.js: -------------------------------------------------------------------------------- 1 | import { post } from '@/services/report'; 2 | export default { 3 | namespace: 'report', 4 | 5 | state: {}, 6 | effects: { 7 | *post({ payload }, { call, put }) { 8 | const response = yield call(post, payload); 9 | return response; 10 | }, 11 | }, 12 | reducers: {}, 13 | }; 14 | -------------------------------------------------------------------------------- /src/pages/user/register/model.js: -------------------------------------------------------------------------------- 1 | 2 | import { register } from './service' 3 | 4 | export default { 5 | namespace: 'register', 6 | 7 | state: { 8 | }, 9 | 10 | effects: { 11 | *submit({ payload }, { call }){ 12 | const response = yield call(register,payload) 13 | return response 14 | }, 15 | } 16 | } -------------------------------------------------------------------------------- /src/pages/404.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Exception from '@/components/Exception'; 3 | 4 | const NotFound = () => { 5 | return ; 6 | }; 7 | 8 | NotFound.getInitialProps = async ({ isServer, store }) => { 9 | const { getState } = store; 10 | 11 | if (isServer) return getState(); 12 | }; 13 | 14 | export default NotFound; 15 | -------------------------------------------------------------------------------- /src/services/user/third-account.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function find(params) { 4 | return request(`/api/third_account`, { 5 | params, 6 | }); 7 | } 8 | 9 | export async function del(params) { 10 | return request(`/api/third_account`, { 11 | method: 'DELETE', 12 | params, 13 | }); 14 | } 15 | -------------------------------------------------------------------------------- /src/components/Button/RewardButton/Button/index.less: -------------------------------------------------------------------------------- 1 | .reward-warpper { 2 | text-align: center; 3 | margin: 16px 0; 4 | 5 | .reward-desc { 6 | font-weight: 500; 7 | } 8 | 9 | .reward-btn { 10 | color: @primary-color; 11 | cursor: pointer; 12 | } 13 | 14 | .reward-list { 15 | line-height: 1; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/pages/403.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Exception from '@/components/Exception'; 3 | 4 | const NotAccess = () => { 5 | return ; 6 | }; 7 | 8 | NotAccess.getInitialProps = async ({ isServer, store }) => { 9 | const { getState } = store; 10 | 11 | if (isServer) return getState(); 12 | }; 13 | 14 | export default NotAccess; 15 | -------------------------------------------------------------------------------- /src/pages/user/dashboard/recent/service.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function draft(params) { 4 | return request(`/api/user/draft`, { 5 | params, 6 | }); 7 | } 8 | 9 | export async function del(params) { 10 | return request(`/api/user/draft`, { 11 | method: 'DELETE', 12 | data: params, 13 | }); 14 | } 15 | -------------------------------------------------------------------------------- /config/defaultSettings.js: -------------------------------------------------------------------------------- 1 | const { NODE_ENV } = process.env; 2 | export default { 3 | primaryColor: '#347EFF', 4 | title: 'ITELLYOU,我告诉你', 5 | defaultAvatar: 'https://cdn-object.aomao.com/avatar/default.png', 6 | ws: 7 | NODE_ENV === 'production' 8 | ? 'wss://www.aomao.com/api/websocket' 9 | : 'ws://localhost:8082/websocket', 10 | }; 11 | -------------------------------------------------------------------------------- /src/components/Content/Answer/Action/index.js: -------------------------------------------------------------------------------- 1 | import Vote from './Vote'; 2 | import Favorite from './Favorite'; 3 | import Comment from './Comment'; 4 | import Adopt from './Adopt'; 5 | import Delete from './Delete'; 6 | import Edit from './Edit'; 7 | 8 | export default { 9 | Edit, 10 | Comment, 11 | }; 12 | 13 | export { Vote, Favorite, Comment, Adopt, Delete, Edit }; 14 | -------------------------------------------------------------------------------- /src/pages/Tag/detail/index.less: -------------------------------------------------------------------------------- 1 | .layout { 2 | .header { 3 | padding: 0; 4 | margin-bottom: 24px; 5 | 6 | .description { 7 | margin-bottom: 16px; 8 | } 9 | } 10 | 11 | .body { 12 | :global { 13 | .ant-card-head-title { 14 | padding: 0; 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/pages/question/Edit/components/Alert/index.less: -------------------------------------------------------------------------------- 1 | .alert { 2 | background: #f9fbfb; 3 | 4 | .message { 5 | font-size: 12px; 6 | 7 | .title { 8 | font-size: 14px; 9 | } 10 | 11 | .item { 12 | color: #595959; 13 | line-height: 12px; 14 | margin-bottom: 8px; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/pages/question/edit/components/Alert/index.less: -------------------------------------------------------------------------------- 1 | .alert { 2 | background: #f9fbfb; 3 | 4 | .message { 5 | font-size: 12px; 6 | 7 | .title { 8 | font-size: 14px; 9 | } 10 | 11 | .item { 12 | color: #595959; 13 | line-height: 12px; 14 | margin-bottom: 8px; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/pages/tag/detail/index.less: -------------------------------------------------------------------------------- 1 | .layout { 2 | .header { 3 | padding: 0; 4 | margin-bottom: 24px; 5 | 6 | .description { 7 | margin-bottom: 16px; 8 | } 9 | } 10 | 11 | .body { 12 | :global { 13 | .ant-card-head-title { 14 | padding: 0; 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/components/Form/Submit.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Button, Form } from 'antd'; 3 | 4 | const SubmitButton = ({ className, noStyle, ...rest }) => { 5 | return ( 6 | 7 | 19 | } -------------------------------------------------------------------------------- /src/services/user/withdraw.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function config(params) { 4 | return request(`/api/withdraw/config`, { 5 | params, 6 | }); 7 | } 8 | 9 | export async function post(params) { 10 | return request(`/api/withdraw`, { 11 | method: 'POST', 12 | data: params, 13 | }); 14 | } 15 | 16 | export async function log(params) { 17 | return request(`/api/withdraw/log`, { 18 | params, 19 | }); 20 | } 21 | -------------------------------------------------------------------------------- /src/pages/500.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Exception from '@/components/Exception'; 3 | 4 | const PageException = ({ location: { query } }) => { 5 | const msg = query.m; 6 | const title = query.t; 7 | return ; 8 | }; 9 | 10 | PageException.getInitialProps = async ({ isServer, store }) => { 11 | const { getState } = store; 12 | 13 | if (isServer) return getState(); 14 | }; 15 | 16 | export default PageException; 17 | -------------------------------------------------------------------------------- /src/pages/software/index.less: -------------------------------------------------------------------------------- 1 | .software-menu:global(.ant-menu) { 2 | border: 0 none; 3 | 4 | :global { 5 | li.ant-menu-item { 6 | margin-bottom: 0; 7 | border-right: 3px solid transparent; 8 | } 9 | 10 | li.ant-menu-item:hover { 11 | border-right-color: @primary-color; 12 | background-color: #f0f8ff; 13 | } 14 | } 15 | } 16 | 17 | .item-card { 18 | .title a { 19 | color: #262626; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/services/user/pay.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function alipayPrecreate(params) { 4 | return request(`/api/pay/alipay`, { 5 | method: 'POST', 6 | data: params, 7 | }); 8 | } 9 | 10 | export async function alipayQuery(params) { 11 | return request(`/api/pay/alipay`, { 12 | params, 13 | }); 14 | } 15 | 16 | export async function log(params) { 17 | return request(`/api/pay/log`, { 18 | params, 19 | }); 20 | } 21 | -------------------------------------------------------------------------------- /src/components/Editor/Section/paidcontent/index.less: -------------------------------------------------------------------------------- 1 | .itellyou-paidcontent { 2 | border-radius: 8px; 3 | background-color: rgb(246, 246, 247); 4 | cursor: default; 5 | border: 1px solid rgba(17, 31, 44, 0); 6 | padding: 12px; 7 | position: relative; 8 | 9 | .sub-editor { 10 | position: absolute; 11 | background: #fff; 12 | top: 1px; 13 | left: 1px; 14 | width: 100%; 15 | cursor: text; 16 | min-height: 60px; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/components/Button/ReportButton/Form/formMap.js: -------------------------------------------------------------------------------- 1 | import { Input } from 'antd'; 2 | 3 | export default { 4 | Desc: { 5 | component: Input.TextArea, 6 | props: { 7 | autoSize: { minRows: 5, maxRows: 20 }, 8 | maxLength: 500, 9 | placeholder: '举报原因(字数不多于 500)', 10 | }, 11 | rules: [ 12 | { 13 | required: true, 14 | message: '请输入举报原因,(字数不多于 500)', 15 | }, 16 | ], 17 | }, 18 | }; 19 | -------------------------------------------------------------------------------- /src/pages/question/detail/components/Answer/index.less: -------------------------------------------------------------------------------- 1 | .answer-title { 2 | display: inline-block; 3 | font-size: 15px; 4 | font-weight: 600; 5 | color: #1a1a1a; 6 | margin-bottom: 0; 7 | } 8 | 9 | .editor-warpper { 10 | .footer { 11 | display: flex; 12 | 13 | .status { 14 | margin-right: auto; 15 | } 16 | 17 | .action { 18 | display: flex; 19 | } 20 | } 21 | } 22 | 23 | .adopted-card { 24 | margin-bottom: 8px; 25 | } 26 | -------------------------------------------------------------------------------- /src/components/PaidRead/Setting/index.less: -------------------------------------------------------------------------------- 1 | .paid-setting { 2 | margin-left: 24px; 3 | 4 | > div { 5 | margin-bottom: 1em; 6 | 7 | .desc { 8 | color: #888888; 9 | } 10 | 11 | .paid-value, 12 | .paid-type { 13 | width: 120px; 14 | } 15 | } 16 | } 17 | 18 | .scale-setting { 19 | margin-top: 1em; 20 | padding-top: 1em; 21 | border-top: 1px solid #fafafa; 22 | 23 | :global(.ant-slider) { 24 | margin: 0; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/pages/home/index.less: -------------------------------------------------------------------------------- 1 | .home-carousel { 2 | border-radius: 3px; 3 | overflow: hidden; 4 | :global(.ant-card-body) { 5 | padding: 0; 6 | } 7 | } 8 | 9 | @media only screen and (max-width: 575px) { 10 | .recommends { 11 | :global(.ant-card-body) { 12 | padding: 16px; 13 | } 14 | } 15 | } 16 | 17 | .recruit-card { 18 | :global(.ant-card-body) { 19 | padding: 6px 10px; 20 | } 21 | 22 | p { 23 | margin-bottom: 6px; 24 | line-height: 24px; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/components/Button/HistoryButton.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import BaseButton from './BaseButton'; 3 | import { HistoryOutlined } from '@ant-design/icons'; 4 | 5 | export default ({ children, onlyIcon, text, ...props }) => { 6 | text = text || '历史版本'; 7 | const renderContent = () => { 8 | if (children) return children; 9 | return text; 10 | }; 11 | 12 | return ( 13 | } {...props}> 14 | {!onlyIcon && renderContent()} 15 | 16 | ); 17 | }; 18 | -------------------------------------------------------------------------------- /src/components/Button/ReplyButton.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import BaseButton from './BaseButton'; 3 | import { RollbackOutlined } from '@ant-design/icons'; 4 | 5 | function ReplyButton({ text, children, ...props }) { 6 | text = text || '回复'; 7 | const renderContent = () => { 8 | if (children) return children; 9 | return text; 10 | }; 11 | return ( 12 | } {...props}> 13 | {renderContent()} 14 | 15 | ); 16 | } 17 | export default ReplyButton; 18 | -------------------------------------------------------------------------------- /src/pages/Search/menus.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | key: 'all', 4 | title: '全部', 5 | }, 6 | { 7 | key: 'question', 8 | title: '问题', 9 | }, 10 | { 11 | key: 'answer', 12 | title: '回答', 13 | }, 14 | { 15 | key: 'article', 16 | title: '文章', 17 | }, 18 | { 19 | key: 'column', 20 | title: '专栏', 21 | }, 22 | { 23 | key: 'tag', 24 | title: '标签', 25 | }, 26 | { 27 | key: 'user', 28 | title: '用户', 29 | }, 30 | ]; 31 | -------------------------------------------------------------------------------- /src/pages/search/menus.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | key: 'all', 4 | title: '全部', 5 | }, 6 | { 7 | key: 'question', 8 | title: '问题', 9 | }, 10 | { 11 | key: 'answer', 12 | title: '回答', 13 | }, 14 | { 15 | key: 'article', 16 | title: '文章', 17 | }, 18 | { 19 | key: 'column', 20 | title: '专栏', 21 | }, 22 | { 23 | key: 'tag', 24 | title: '标签', 25 | }, 26 | { 27 | key: 'user', 28 | title: '用户', 29 | }, 30 | ]; 31 | -------------------------------------------------------------------------------- /src/components/Button/EditButton.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import BaseButton from './BaseButton'; 3 | import { EditOutlined } from '@ant-design/icons'; 4 | 5 | function EditButton({ children, onlyIcon, text, ...props }) { 6 | text = text || '编辑'; 7 | const renderContent = () => { 8 | if (children) return children; 9 | return text; 10 | }; 11 | 12 | return ( 13 | } {...props}> 14 | {!onlyIcon && renderContent()} 15 | 16 | ); 17 | } 18 | export default EditButton; 19 | -------------------------------------------------------------------------------- /src/components/Button/DeleteButton.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import BaseButton from './BaseButton'; 3 | import { DeleteOutlined } from '@ant-design/icons'; 4 | 5 | function DeleteButton({ text, onlyIcon, children, ...props }) { 6 | text = text || '删除'; 7 | const renderContent = () => { 8 | if (children) return children; 9 | return text; 10 | }; 11 | return ( 12 | } {...props}> 13 | {!onlyIcon && renderContent()} 14 | 15 | ); 16 | } 17 | export default DeleteButton; 18 | -------------------------------------------------------------------------------- /src/services/tag/star.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function list(params) { 4 | return request(`/api/tag/star`, { 5 | params, 6 | }); 7 | } 8 | 9 | export async function follow({ id }) { 10 | return request(`/api/tag/star`, { 11 | method: 'POST', 12 | data: { 13 | id, 14 | }, 15 | }); 16 | } 17 | 18 | export async function unfollow({ id }) { 19 | return request(`/api/tag/star`, { 20 | method: 'DELETE', 21 | data: { 22 | id, 23 | }, 24 | }); 25 | } 26 | -------------------------------------------------------------------------------- /src/pages/user/dashboard/income/components/Total/index.less: -------------------------------------------------------------------------------- 1 | .ratio { 2 | font-size: 12px; 3 | margin-left: 5px; 4 | 5 | .label { 6 | color: rgba(0, 0, 0, 0.45); 7 | } 8 | 9 | :global { 10 | .ant-statistic { 11 | font-size: 12px; 12 | 13 | .ant-statistic-content { 14 | font-size: 14px; 15 | 16 | .ant-statistic-content-value-decimal, 17 | .ant-statistic-content-suffix { 18 | font-size: 14px; 19 | } 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/pages/user/notifications/components/Layout/index.js: -------------------------------------------------------------------------------- 1 | import React, { useContext } from 'react'; 2 | import { Layout, Sider } from '@/components/Container'; 3 | import { RouteContext } from '@/context'; 4 | import siderData from './sider'; 5 | 6 | export default ({ children, defaultKey }) => { 7 | const { isMobile } = useContext(RouteContext); 8 | 9 | return ( 10 | 11 | {!isMobile && } 12 | {children} 13 | 14 | ); 15 | }; 16 | -------------------------------------------------------------------------------- /src/services/answer/star.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | export async function list(params) { 3 | return request(`/api/answer/star`, { 4 | params, 5 | }); 6 | } 7 | 8 | export async function follow({ id }) { 9 | return request(`/api/answer/star`, { 10 | method: 'POST', 11 | data: { 12 | id, 13 | }, 14 | }); 15 | } 16 | 17 | export async function unfollow({ id }) { 18 | return request(`/api/answer/star`, { 19 | method: 'DELETE', 20 | data: { 21 | id, 22 | }, 23 | }); 24 | } 25 | -------------------------------------------------------------------------------- /src/components/Editor/Plugin/PaidContent.js: -------------------------------------------------------------------------------- 1 | const PLUGIN_NAME = 'paid-content'; 2 | export default { 3 | initialize: function () { 4 | // 创建命令 5 | this.command.add(PLUGIN_NAME, { 6 | execute: () => { 7 | this.change.insertSection(PLUGIN_NAME); 8 | }, 9 | }); 10 | // 快捷键 11 | const options = this.options[PLUGIN_NAME] || { 12 | hotkey: 'mod+shift+m', 13 | }; 14 | 15 | if (!!options.hotkey) { 16 | this.hotkey.set(options.hotkey, PLUGIN_NAME); 17 | } 18 | }, 19 | }; 20 | -------------------------------------------------------------------------------- /src/pages/user/dashboard/analytics/components/Total/index.less: -------------------------------------------------------------------------------- 1 | .ratio { 2 | font-size: 12px; 3 | margin-left: 5px; 4 | 5 | .label { 6 | color: rgba(0, 0, 0, 0.45); 7 | } 8 | 9 | :global { 10 | .ant-statistic { 11 | font-size: 12px; 12 | 13 | .ant-statistic-content { 14 | font-size: 14px; 15 | 16 | .ant-statistic-content-value-decimal, 17 | .ant-statistic-content-suffix { 18 | font-size: 14px; 19 | } 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/services/column/star.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function list(params) { 4 | return request(`/api/column/star`, { 5 | params, 6 | }); 7 | } 8 | 9 | export async function follow({ id }) { 10 | return request(`/api/column/star`, { 11 | method: 'POST', 12 | data: { 13 | id, 14 | }, 15 | }); 16 | } 17 | 18 | export async function unfollow({ id }) { 19 | return request(`/api/column/star`, { 20 | method: 'DELETE', 21 | data: { 22 | id, 23 | }, 24 | }); 25 | } 26 | -------------------------------------------------------------------------------- /src/components/Button/ReportButton/Modal.less: -------------------------------------------------------------------------------- 1 | .container { 2 | .title { 3 | font-size: 16px; 4 | font-weight: 700; 5 | } 6 | 7 | .sub-title{ 8 | color: #8c8c8c; 9 | margin: 10px 0; 10 | } 11 | 12 | .content { 13 | font-weight: 700; 14 | 15 | ul,li{ 16 | padding: 0; 17 | margin: 0; 18 | } 19 | 20 | .content-item { 21 | display: block; 22 | cursor: pointer; 23 | border-bottom: 1px solid #e8e8e8; 24 | padding: 12px 0; 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /src/services/article/star.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function list(params) { 4 | return request(`/api/article/star`, { 5 | params, 6 | }); 7 | } 8 | 9 | export async function follow({ id }) { 10 | return request(`/api/article/star`, { 11 | method: 'POST', 12 | data: { 13 | id, 14 | }, 15 | }); 16 | } 17 | 18 | export async function unfollow({ id }) { 19 | return request(`/api/article/star`, { 20 | method: 'DELETE', 21 | data: { 22 | id, 23 | }, 24 | }); 25 | } 26 | -------------------------------------------------------------------------------- /src/pages/user/dashboard/analytics/service.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function searchByDate({ type, ...params }) { 4 | return request(`/api/statistics/search/${type}/group`, { 5 | params, 6 | }); 7 | } 8 | 9 | export async function searchByContent({ type, ...params }) { 10 | return request(`/api/statistics/search/content/${type}`, { 11 | params, 12 | }); 13 | } 14 | 15 | export async function searchByTotal({ type, ...params }) { 16 | return request(`/api/statistics/search/${type}/total`, { 17 | params, 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /src/services/question/star.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function list(params) { 4 | return request(`/api/question/star`, { 5 | params, 6 | }); 7 | } 8 | 9 | export async function follow({ id }) { 10 | return request(`/api/question/star`, { 11 | method: 'POST', 12 | data: { 13 | id, 14 | }, 15 | }); 16 | } 17 | 18 | export async function unfollow({ id }) { 19 | return request(`/api/question/star`, { 20 | method: 'DELETE', 21 | data: { 22 | id, 23 | }, 24 | }); 25 | } 26 | -------------------------------------------------------------------------------- /src/pages/user/dashboard/income/components/Content/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Card } from 'antd'; 3 | import List from './List'; 4 | import styles from './index.less'; 5 | 6 | const Content = () => { 7 | return ( 8 | 9 | 10 | 11 | ); 12 | }; 13 | Content.getInitialProps = async ({ isServer, store, params }) => { 14 | const { getState } = store; 15 | await List.getInitialProps({ isServer, store, params }); 16 | if (isServer) return getState(); 17 | }; 18 | 19 | export default Content; 20 | -------------------------------------------------------------------------------- /src/components/Button/CommentButton.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import BaseButton from './BaseButton'; 3 | import { MessageOutlined } from '@ant-design/icons'; 4 | 5 | const CommentButton = React.forwardRef(({ count, children, ...props }, ref) => { 6 | const getContent = () => { 7 | if (children) return children; 8 | return count === 0 || !count ? '添加评论' : `${count}条评论`; 9 | }; 10 | 11 | return ( 12 | } {...props} ref={ref}> 13 | {getContent()} 14 | 15 | ); 16 | }); 17 | export default CommentButton; 18 | -------------------------------------------------------------------------------- /src/locales/zh-CN.js: -------------------------------------------------------------------------------- 1 | export default { 2 | keywords: 3 | 'itellyou,itellyou官网,我告诉你,MSDN我告诉你,itellyou我告诉你,windows原版系统iso文件下载', 4 | description: 5 | 'itellyou,我告诉你,提供windows11、windows10、windows7、windows8、Linux、macOs、Chromiumos、等微软原版系统iso文件下载', 6 | 'sys.path': '无标题', 7 | 'preview.page': '预览', 8 | '403.page': '403 - No Access', 9 | 403: 'Sorry, you are not authorized to access this page.', 10 | '404.page': '404 - Not Found', 11 | 404: 'Sorry, the page you visited does not exist.', 12 | '500.page': '500 - Error', 13 | 500: 'An error occurred in the service', 14 | }; 15 | -------------------------------------------------------------------------------- /src/components/List/Default.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { List, Empty } from 'antd'; 3 | 4 | const Default = ({ loading, dataSource, renderHeader, ...props }) => { 5 | renderHeader = renderHeader || function() {}; 6 | 7 | const renderList = () => { 8 | return ( 9 | 10 | ); 11 | }; 12 | 13 | if (dataSource && dataSource.length === 0) return ; 14 | 15 | return renderList(); 16 | }; 17 | 18 | Default.Item = List.Item; 19 | export default Default; 20 | -------------------------------------------------------------------------------- /src/components/Loading/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Spin } from 'antd'; 3 | import LoadingButton from './Button'; 4 | import styles from './index.less'; 5 | import { LoadingOutlined } from '@ant-design/icons'; 6 | 7 | export default ({ tip, loading, children }) => ( 8 | } 11 | tip={tip || '加载中...'} 12 | spinning={loading === undefined || loading === null ? true : loading} 13 | > 14 | {children} 15 | 16 | ); 17 | 18 | export { LoadingButton }; 19 | -------------------------------------------------------------------------------- /src/components/Tag/Create/formMap.js: -------------------------------------------------------------------------------- 1 | export default { 2 | TagName: { 3 | props: { 4 | placeholder: '标签名称', 5 | }, 6 | rules: [ 7 | { 8 | required: true, 9 | message: '标签名称不可以为空', 10 | }, 11 | { 12 | min: 1, 13 | max: 32, 14 | message: '长度为1-32个字符', 15 | }, 16 | /**{ 17 | pattern: /^[\u4e00-\u9fa5_A-Za-z0-9-\.#&@+]*$/, 18 | message: '名称只支持中英文、数字、_、-、.、#、&、@、+', 19 | },**/ 20 | ], 21 | }, 22 | }; 23 | -------------------------------------------------------------------------------- /src/pages/user/login/service.js: -------------------------------------------------------------------------------- 1 | import request from '@/utils/request'; 2 | 3 | export async function loginByAccount(params) { 4 | return request('/api/user/login/account', { 5 | method: 'POST', 6 | data: params, 7 | }); 8 | } 9 | 10 | export async function loginByMobile(params) { 11 | return request('/api/user/login/mobile', { 12 | method: 'POST', 13 | data: params, 14 | }); 15 | } 16 | 17 | export async function loginByOauth({ type, ...params }) { 18 | return request(`/api/oauth/${type}/login`, { 19 | method: 'POST', 20 | data: params, 21 | }); 22 | } 23 | -------------------------------------------------------------------------------- /src/components/Header/Container.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import classNames from 'classnames'; 3 | import Container from '@/components/Container'; 4 | import styles from './index.less'; 5 | 6 | export default ({ className, mode, isMobile, children, before, after }) => { 7 | return ( 8 |
9 | 10 | {before} 11 | {children} 12 | {after &&
{after}
} 13 |
14 |
15 | ); 16 | }; 17 | -------------------------------------------------------------------------------- /src/wrappers/auth.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { useAccess, Redirect } from 'umi'; 3 | import { getRoute } from '@/utils/page'; 4 | 5 | export default ({ children, route, location: { pathname } }) => { 6 | const { routes = [] } = route || {}; 7 | 8 | if (route && !route.routes) { 9 | routes.push(route); 10 | } 11 | const routeData = getRoute(pathname, routes); 12 | if (routeData && routeData.unaccessible) { 13 | const access = useAccess(); 14 | if (!access.isLogin) return ; 15 | return ; 16 | } 17 | return children; 18 | }; 19 | -------------------------------------------------------------------------------- /src/pages/article/components/HistoryExtra/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Tag from '@/components/Tag'; 3 | import styles from './index.less'; 4 | 5 | export default ({ title, tags }) => { 6 | let rewardMessage = ''; 7 | return ( 8 |
9 |

{title}

10 |
11 | {tags.map(({ id, name }) => ( 12 | 13 | ))} 14 |
15 |
{rewardMessage}
16 |
17 | ); 18 | }; 19 | -------------------------------------------------------------------------------- /src/pages/path/components/user/components/Activity.less: -------------------------------------------------------------------------------- 1 | .verb { 2 | margin-bottom: 16px; 3 | } 4 | 5 | h2 { 6 | font-size: 18px; 7 | margin-bottom: 0; 8 | 9 | a, 10 | a:hover, 11 | a:focus { 12 | color: #262626; 13 | } 14 | } 15 | 16 | .column { 17 | display: flex; 18 | 19 | .avatar { 20 | margin-right: 16px; 21 | margin-top: 10px; 22 | } 23 | 24 | .content { 25 | p { 26 | margin-bottom: 0; 27 | } 28 | } 29 | } 30 | 31 | .tag { 32 | p { 33 | margin-bottom: 0; 34 | } 35 | } 36 | 37 | .question-title { 38 | margin-bottom: 16px; 39 | } 40 | -------------------------------------------------------------------------------- /src/pages/user/notifications/components/Layout/sider.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | { 3 | key: 'default', 4 | title: '全部消息', 5 | to: '/notifications', 6 | }, 7 | { 8 | key: 'follow', 9 | title: '关注我的', 10 | to: '/notifications/follow', 11 | }, 12 | { 13 | key: 'like', 14 | title: '赞我的', 15 | to: '/notifications/like', 16 | }, 17 | { 18 | key: 'comment', 19 | title: '评论与回复', 20 | to: '/notifications/comment', 21 | }, 22 | { 23 | key: 'publish', 24 | title: '关注的动态', 25 | to: '/notifications/publish', 26 | }, 27 | ]; 28 | -------------------------------------------------------------------------------- /src/pages/user/settings/components/Layout/index.js: -------------------------------------------------------------------------------- 1 | import React, { useContext } from 'react'; 2 | import Container, { Layout, Sider } from '@/components/Container'; 3 | import { RouteContext } from '@/context'; 4 | import siderData from './sider'; 5 | 6 | export default ({ children, defaultKey }) => { 7 | const { isMobile } = useContext(RouteContext); 8 | 9 | return ( 10 | 11 | 12 | {!isMobile && } 13 | {children} 14 | 15 | 16 | ); 17 | }; 18 | -------------------------------------------------------------------------------- /src/pages/Tag/detail/components/Column.less: -------------------------------------------------------------------------------- 1 | .column { 2 | display: flex; 3 | 4 | .avatar { 5 | margin-right: 16px; 6 | } 7 | 8 | .info { 9 | .title { 10 | margin: 0; 11 | font-size: 18px; 12 | font-weight: 600; 13 | line-height: 1.6; 14 | } 15 | 16 | .desc { 17 | color: #646464; 18 | overflow: hidden; 19 | text-overflow: ellipsis; 20 | white-space: nowrap; 21 | font-size: 15px; 22 | } 23 | 24 | .status { 25 | color: #8590a6; 26 | font-size: 14px; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/pages/Tag/detail/menu.js: -------------------------------------------------------------------------------- 1 | import Intro from './components/Intro'; 2 | import Question from './components/Question'; 3 | import Article from './components/Article'; 4 | import Column from './components/Column'; 5 | 6 | export default [ 7 | { 8 | key: 'intro', 9 | title: '简介', 10 | component: Intro, 11 | }, 12 | { 13 | key: 'question', 14 | title: '问题', 15 | component: Question, 16 | }, 17 | { 18 | key: 'article', 19 | title: '文章', 20 | component: Article, 21 | }, 22 | { 23 | key: 'column', 24 | title: '专栏', 25 | component: Column, 26 | }, 27 | ]; 28 | -------------------------------------------------------------------------------- /src/pages/tag/detail/components/Column.less: -------------------------------------------------------------------------------- 1 | .column { 2 | display: flex; 3 | 4 | .avatar { 5 | margin-right: 16px; 6 | } 7 | 8 | .info { 9 | .title { 10 | margin: 0; 11 | font-size: 18px; 12 | font-weight: 600; 13 | line-height: 1.6; 14 | } 15 | 16 | .desc { 17 | color: #646464; 18 | overflow: hidden; 19 | text-overflow: ellipsis; 20 | white-space: nowrap; 21 | font-size: 15px; 22 | } 23 | 24 | .status { 25 | color: #8590a6; 26 | font-size: 14px; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/pages/tag/detail/menu.js: -------------------------------------------------------------------------------- 1 | import Intro from './components/Intro'; 2 | import Question from './components/Question'; 3 | import Article from './components/Article'; 4 | import Column from './components/Column'; 5 | 6 | export default [ 7 | { 8 | key: 'intro', 9 | title: '简介', 10 | component: Intro, 11 | }, 12 | { 13 | key: 'question', 14 | title: '问题', 15 | component: Question, 16 | }, 17 | { 18 | key: 'article', 19 | title: '文章', 20 | component: Article, 21 | }, 22 | { 23 | key: 'column', 24 | title: '专栏', 25 | component: Column, 26 | }, 27 | ]; 28 | -------------------------------------------------------------------------------- /src/pages/user/dashboard/components/Layout/index.js: -------------------------------------------------------------------------------- 1 | import React, { useContext } from 'react'; 2 | import Container, { Layout } from '@/components/Container'; 3 | import { RouteContext } from '@/context'; 4 | import Nav from './Nav'; 5 | import siderData from './sider'; 6 | 7 | export default ({ children, defaultKey }) => { 8 | const { isMobile } = useContext(RouteContext); 9 | return ( 10 | 11 | 12 | {!isMobile &&