forked from yangjunpeng1993/Afcat-Node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintcache
1 lines (1 loc) · 37.5 KB
/
.eslintcache
1
[{"D:\\myapp\\Afcat-Node\\src\\index.js":"1","D:\\myapp\\Afcat-Node\\src\\App.js":"2","D:\\myapp\\Afcat-Node\\src\\store\\index.js":"3","D:\\myapp\\Afcat-Node\\src\\routers\\index.js":"4","D:\\myapp\\Afcat-Node\\src\\component\\header.js":"5","D:\\myapp\\Afcat-Node\\src\\store\\reducer\\guards.js":"6","D:\\myapp\\Afcat-Node\\src\\store\\reducer\\topics.js":"7","D:\\myapp\\Afcat-Node\\src\\component\\nav.js":"8","D:\\myapp\\Afcat-Node\\src\\routers\\router.config.js":"9","D:\\myapp\\Afcat-Node\\src\\routers\\index\\index.js":"10","D:\\myapp\\Afcat-Node\\src\\routers\\404\\index.js":"11","D:\\myapp\\Afcat-Node\\src\\routers\\api\\index.js":"12","D:\\myapp\\Afcat-Node\\src\\routers\\about\\index.js":"13","D:\\myapp\\Afcat-Node\\src\\routers\\login\\index.js":"14","D:\\myapp\\Afcat-Node\\src\\routers\\getstart\\index.js":"15","D:\\myapp\\Afcat-Node\\src\\routers\\index\\index_pagination.js":"16","D:\\myapp\\Afcat-Node\\src\\component\\popup.js":"17","D:\\myapp\\Afcat-Node\\src\\routers\\api\\inner.js":"18","D:\\myapp\\Afcat-Node\\src\\routers\\about\\inner.js":"19","D:\\myapp\\Afcat-Node\\src\\routers\\index\\indexNav.js":"20","D:\\myapp\\Afcat-Node\\src\\routers\\index\\indexList.js":"21","D:\\myapp\\Afcat-Node\\src\\routers\\getstart\\inner.js":"22","D:\\myapp\\Afcat-Node\\src\\store\\action\\topics.js":"23","D:\\myapp\\Afcat-Node\\src\\store\\action\\config.js":"24","D:\\myapp\\Afcat-Node\\src\\component\\indexComponent\\noAnswer.js":"25","D:\\myapp\\Afcat-Node\\src\\component\\indexComponent\\gitLogin.js":"26","D:\\myapp\\Afcat-Node\\src\\component\\indexComponent\\friends.js":"27","D:\\myapp\\Afcat-Node\\src\\routers\\article\\index.js":"28","D:\\myapp\\Afcat-Node\\src\\routers\\topic\\index.js":"29","D:\\myapp\\Afcat-Node\\src\\routers\\topic\\topicComment.js":"30","D:\\myapp\\Afcat-Node\\src\\routers\\topic\\addTopicComment.js":"31","D:\\myapp\\Afcat-Node\\src\\store\\action\\topic.js":"32","D:\\myapp\\Afcat-Node\\src\\store\\reducer\\topic.js":"33","D:\\myapp\\Afcat-Node\\src\\routers\\unread\\unread.js":"34","D:\\myapp\\Afcat-Node\\src\\routers\\signup\\index.js":"35"},{"size":350,"mtime":1628343667584,"results":"36","hashOfConfig":"37"},{"size":516,"mtime":1628522281929,"results":"38","hashOfConfig":"37"},{"size":262,"mtime":1628512514473,"results":"39","hashOfConfig":"37"},{"size":1370,"mtime":1628564160535,"results":"40","hashOfConfig":"37"},{"size":1226,"mtime":1628410073611,"results":"41","hashOfConfig":"37"},{"size":501,"mtime":1628438507673,"results":"42","hashOfConfig":"37"},{"size":447,"mtime":1628512247999,"results":"43","hashOfConfig":"37"},{"size":600,"mtime":1628343667579,"results":"44","hashOfConfig":"37"},{"size":2619,"mtime":1628564445498,"results":"45","hashOfConfig":"37"},{"size":1213,"mtime":1628438325316,"results":"46","hashOfConfig":"37"},{"size":157,"mtime":1628343667586,"results":"47","hashOfConfig":"37"},{"size":716,"mtime":1628435968322,"results":"48","hashOfConfig":"37"},{"size":1469,"mtime":1628435993215,"results":"49","hashOfConfig":"37"},{"size":1808,"mtime":1628564160536,"results":"50","hashOfConfig":"37"},{"size":819,"mtime":1628435994217,"results":"51","hashOfConfig":"37"},{"size":547,"mtime":1628343667601,"results":"52","hashOfConfig":"37"},{"size":912,"mtime":1628343667581,"results":"53","hashOfConfig":"37"},{"size":13019,"mtime":1628343667592,"results":"54","hashOfConfig":"37"},{"size":1392,"mtime":1628343667590,"results":"55","hashOfConfig":"37"},{"size":833,"mtime":1628512248254,"results":"56","hashOfConfig":"37"},{"size":2765,"mtime":1628520552099,"results":"57","hashOfConfig":"37"},{"size":2388,"mtime":1628343667595,"results":"58","hashOfConfig":"37"},{"size":568,"mtime":1628343667612,"results":"59","hashOfConfig":"37"},{"size":121,"mtime":1628343667611,"results":"60","hashOfConfig":"37"},{"size":874,"mtime":1628431873800,"results":"61","hashOfConfig":"37"},{"size":399,"mtime":1628436389205,"results":"62","hashOfConfig":"37"},{"size":837,"mtime":1628432155170,"results":"63","hashOfConfig":"37"},{"size":3362,"mtime":1628512661401,"results":"64","hashOfConfig":"37"},{"size":1792,"mtime":1628521453720,"results":"65","hashOfConfig":"37"},{"size":2117,"mtime":1628512247983,"results":"66","hashOfConfig":"37"},{"size":1027,"mtime":1628512247983,"results":"67","hashOfConfig":"37"},{"size":512,"mtime":1628521470393,"results":"68","hashOfConfig":"37"},{"size":264,"mtime":1628512247999,"results":"69","hashOfConfig":"37"},{"size":312,"mtime":1628519057771,"results":"70","hashOfConfig":"37"},{"size":1532,"mtime":1628564160539,"results":"71","hashOfConfig":"37"},{"filePath":"72","messages":"73","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},"5e5b07",{"filePath":"75","messages":"76","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"77"},{"filePath":"78","messages":"79","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"80","messages":"81","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"82","messages":"83","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"84","messages":"85","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"86","usedDeprecatedRules":"74"},{"filePath":"87","messages":"88","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"89","usedDeprecatedRules":"74"},{"filePath":"90","messages":"91","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"92","messages":"93","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"94","messages":"95","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"96","messages":"97","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"98","messages":"99","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"100","messages":"101","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"102","messages":"103","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"104","usedDeprecatedRules":"74"},{"filePath":"105","messages":"106","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"107","messages":"108","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"109","messages":"110","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"111","usedDeprecatedRules":"74"},{"filePath":"112","messages":"113","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"114","messages":"115","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"116","messages":"117","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"118","usedDeprecatedRules":"74"},{"filePath":"119","messages":"120","errorCount":0,"fatalErrorCount":0,"warningCount":8,"fixableErrorCount":0,"fixableWarningCount":0,"source":"121","usedDeprecatedRules":"74"},{"filePath":"122","messages":"123","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"124","messages":"125","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"126","usedDeprecatedRules":"74"},{"filePath":"127","messages":"128","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"129","messages":"130","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"131","messages":"132","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"133","usedDeprecatedRules":"74"},{"filePath":"134","messages":"135","errorCount":0,"fatalErrorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"136","usedDeprecatedRules":"74"},{"filePath":"137","messages":"138","errorCount":0,"fatalErrorCount":0,"warningCount":4,"fixableErrorCount":0,"fixableWarningCount":0,"source":"139","usedDeprecatedRules":"74"},{"filePath":"140","messages":"141","errorCount":0,"fatalErrorCount":0,"warningCount":2,"fixableErrorCount":0,"fixableWarningCount":0,"source":"142","usedDeprecatedRules":"74"},{"filePath":"143","messages":"144","errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"145","usedDeprecatedRules":"74"},{"filePath":"146","messages":"147","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"148","usedDeprecatedRules":"74"},{"filePath":"149","messages":"150","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"151","usedDeprecatedRules":"74"},{"filePath":"152","messages":"153","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"154","usedDeprecatedRules":"74"},{"filePath":"155","messages":"156","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"74"},{"filePath":"157","messages":"158","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"D:\\myapp\\Afcat-Node\\src\\index.js",[],["159","160"],"D:\\myapp\\Afcat-Node\\src\\App.js",["161","162"],"import RootRoutes from \"./routers/index\";\r\nimport { Layout,Row,Col} from \"antd\";\r\nimport \"antd/dist/antd.css\";\r\nimport \"./static/css/style.css\";\r\nimport Header from \"./component/header\";\r\n/*\r\n 入场动画\r\n*/\r\nfunction App() {\r\n return <Layout>\r\n <Header/>\r\n <Layout.Content className=\"main\">\r\n <RootRoutes />\r\n </Layout.Content >\r\n {\r\n /*\r\n <Layout.Footer className=\"footer\">\r\n 6454654\r\n </Layout.Footer>\r\n \r\n */\r\n\r\n }\r\n </Layout>;\r\n}\r\n\r\nexport default App;\r\n","D:\\myapp\\Afcat-Node\\src\\store\\index.js",[],"D:\\myapp\\Afcat-Node\\src\\routers\\index.js",[],"D:\\myapp\\Afcat-Node\\src\\component\\header.js",[],"D:\\myapp\\Afcat-Node\\src\\store\\reducer\\guards.js",["163"],"function guards(guards={\r\n isLogin:false,\r\n prevPath:\"\"\r\n},action) {\r\n switch (action.type) {\r\n case \"GUARDS_LOGIN\":\r\n return {\r\n isLogin:true,\r\n prevPath:guards.prevPath\r\n }\r\n case \"GUARDS_PATH\":\r\n return {\r\n isLogin:false,\r\n prevPath:action.path\r\n }\r\n }\r\n return guards;\r\n}\r\n\r\nexport default guards;\r\n\r\n\r\n/**\r\n * \r\n * reducer(prevState,action)\r\n * prevState 是上次计算的值\r\n * action是操作类型\r\n */","D:\\myapp\\Afcat-Node\\src\\store\\reducer\\topics.js",["164"],"function topics(topics={\r\n data:[],\r\n loading:true\r\n},action) {\r\n switch (action.type) {\r\n case \"TOPICS_LOADING\":\r\n return {\r\n data:[],\r\n loading:true\r\n }\r\n case \"TOPICS_LOAD\":\r\n return {\r\n data:action.data,\r\n loading:false\r\n }\r\n }\r\n return topics;\r\n}\r\n\r\nexport default topics;","D:\\myapp\\Afcat-Node\\src\\component\\nav.js",[],"D:\\myapp\\Afcat-Node\\src\\routers\\router.config.js",["165"],"D:\\myapp\\Afcat-Node\\src\\routers\\index\\index.js",[],"D:\\myapp\\Afcat-Node\\src\\routers\\404\\index.js",[],"D:\\myapp\\Afcat-Node\\src\\routers\\api\\index.js",[],"D:\\myapp\\Afcat-Node\\src\\routers\\about\\index.js",[],"D:\\myapp\\Afcat-Node\\src\\routers\\login\\index.js",["166"],"import { useEffect } from \"react\";\r\nimport { useDispatch,useSelector } from \"react-redux\";\r\nimport { useHistory } from \"react-router-dom\";\r\n\r\nfunction LoginPage() {\r\n const dispatch = useDispatch();\r\n const {isLogin,prevPath} = useSelector(state=>state.guards);\r\n const {replace} = useHistory();\r\n useEffect(()=>{\r\n if(isLogin){\r\n replace(prevPath?prevPath:\"/\");\r\n }\r\n },[isLogin])\r\n return <div className=\"view\">\r\n <div className=\"wrap\">\r\n <h1>登陆视图</h1>\r\n <button onClick={()=>{\r\n dispatch({\r\n type: \"GUARDS_LOGIN\"\r\n })\r\n }}>登陆</button>\r\n </div>\r\n</div>\r\n}\r\nexport default LoginPage;","D:\\myapp\\Afcat-Node\\src\\routers\\getstart\\index.js",[],"D:\\myapp\\Afcat-Node\\src\\routers\\index\\index_pagination.js",[],"D:\\myapp\\Afcat-Node\\src\\component\\popup.js",["167"],"import { useEffect, useRef, useState } from \"react\";\r\n\r\n//弹窗组件\r\nfunction Popup(props) {\r\n const {render,afterClos} = props;\r\n const [show,setShow] = useState(true);\r\n const mask = useRef();\r\n const popup = useRef();\r\n //关闭弹窗的方法\r\n const clos = ()=>{\r\n setShow(false);\r\n }\r\n useEffect(()=>{\r\n if(show){\r\n popup.current.style.transform = \"translateY(0)\";\r\n mask.current.style.opacity = 1;\r\n console.log(popup);\r\n } else {\r\n mask.current.style.opacity = 0;\r\n popup.current.style.transform =\"translateY(-1000px)\";\r\n setTimeout(() => {\r\n afterClos();\r\n }, 500);\r\n }\r\n },[show])\r\n return <>\r\n <div className=\"mask\" ref={mask}></div>\r\n <div className=\"popup\" ref={popup}>\r\n {render(clos)}\r\n </div>\r\n </>\r\n}\r\n\r\nexport default Popup;","D:\\myapp\\Afcat-Node\\src\\routers\\api\\inner.js",[],"D:\\myapp\\Afcat-Node\\src\\routers\\about\\inner.js",[],"D:\\myapp\\Afcat-Node\\src\\routers\\index\\indexNav.js",["168"],"import Nav from \"../../component/nav\";\r\nimport qs from \"qs\";\r\nconst indexNavs = [\r\n {\r\n to: \"/?tab=all\",\r\n title: \"全部\"\r\n }, {\r\n to: \"/?tab=good\",\r\n title: \"精华\"\r\n }, {\r\n to: \"/?tab=share\",\r\n title: \"分享\"\r\n }, {\r\n to: \"/?tab=ask\",\r\n title: \"问答\"\r\n },{\r\n to: \"/?tab=job\",\r\n title: \"招聘\"\r\n },{\r\n to: \"/?tab=dev\",\r\n title: \"客户端测试\"\r\n }\r\n];\r\nfunction IndexNav(props) {\r\n const {tab} = props;\r\n return <Nav\r\n data={indexNavs}\r\n getSelectedKey={() => { //获取选中!!\r\n\r\n //换另外一种写法\r\n return indexNavs.findIndex(item => {\r\n /*let { tab: itemTab } = qs.parse(item.to.substr(2));\r\n return tab === itemTab;*/\r\n return '?tab='+tab ===item.to;\r\n })\r\n }}\r\n theme=\"light\"\r\n />\r\n}\r\n\r\nexport default IndexNav;","D:\\myapp\\Afcat-Node\\src\\routers\\index\\indexList.js",["169","170","171","172","173","174","175","176"],"import { List, Switch } from \"antd\";\r\nimport { useEffect } from \"react\";\r\nimport { useSelector,useDispatch } from \"react-redux\";\r\nimport { useLoadTopics } from \"../../store/action/topics\";\r\nimport { Link } from \"react-router-dom\";\r\n\r\nfunction tabNode(tab){\r\n switch(tab){\r\n case 'share':return '分享';\r\n case 'ask':return '问答';\r\n case 'job':return '';\r\n case 'dev':return '';\r\n }\r\n}\r\n\r\nfunction IndexList(props) {\r\n const { tab, page } = props;\r\n const { loading, data } = useSelector(state => state.topics);\r\n const getData = useLoadTopics();\r\n const dispatch = useDispatch();\r\n\r\n useEffect(() => {\r\n getData(page, tab)\r\n }, [tab, page])\r\n\r\n return <List\r\n className=\"index_list\"\r\n loading={loading}\r\n dataSource={data}\r\n renderItem={item => {\r\n return <List.Item>\r\n <div>\r\n <Link to=\"/\"><img src={item.author.avatar_url} className=\"author_img\"/></Link>\r\n <span class=\"commentCount\"><em style={{ color:'#9e78c0'}}>{item.reply_count}</em>/<em>{item.visit_count}</em></span>\r\n <span className={item.top?'top':(item.good?'good':item.tab)}>\r\n {\r\n item.top?\"置顶\":(item.good?'精华':tabNode(item.tab))\r\n }\r\n </span>\r\n <Link to={'/topic/'+item.id}> {item.title} </Link>\r\n {item.top ?\r\n <span class=\"put_top\" onClick={() => { cancelTop(item.id) }}>取消置顶</span> :\r\n <span class=\"put_end\" onClick={() => { top(item.id) }}>置顶</span>\r\n }\r\n </div>\r\n </List.Item>\r\n }}\r\n />\r\n function cancelTop(id) {\r\n //获取当前页面的data,然后重新排序\r\n const topData = [];//置顶data\r\n const endData = [];//非置顶data\r\n data.map((item, index) => {\r\n if (item.id == id) {\r\n item.top = false;\r\n endData.push(item);\r\n } else {\r\n item.top ? topData.push(item) :\r\n endData.push(item);\r\n }\r\n })\r\n const lastData = [...topData, ...endData];\r\n console.log(lastData);\r\n dispatch({\r\n type: \"TOPICS_SAVE\",\r\n data: lastData\r\n })\r\n }\r\n function top(id) {\r\n //获取当前页面的data,然后重新排序\r\n const topData = [];//置顶data\r\n const endData = [];//非置顶data\r\n data.map((item, index) => {\r\n if (item.id == id) {\r\n item.top = true;\r\n topData.push(item);\r\n } else {\r\n item.top ? topData.push(item) :\r\n endData.push(item);\r\n }\r\n })\r\n const lastData = [...topData, ...endData];\r\n console.log(lastData);\r\n\r\n dispatch({\r\n type: \"TOPICS_SAVE\",\r\n data: lastData\r\n })\r\n }\r\n}\r\n\r\nexport default IndexList;","D:\\myapp\\Afcat-Node\\src\\routers\\getstart\\inner.js",[],"D:\\myapp\\Afcat-Node\\src\\store\\action\\topics.js",["177"],"import { useEffect } from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { http } from \"./config\";\r\n// hooks 放在组件最外层,数据请求,要放在副作用中\r\nfunction useLoadTopics() { \r\n const dispatch = useDispatch();\r\n return async (page=1,tab=\"all\",limit=20)=>{\r\n dispatch({\r\n type: \"TOPICS_LOADING\"\r\n })\r\n const {data} = await http.get(`/topics?page=${page}&tab=${tab}&limit=${limit}`);\r\n //console.log(data);\r\n dispatch({\r\n type: \"TOPICS_LOAD\",\r\n data: data.data\r\n })\r\n }\r\n}\r\nexport {useLoadTopics};","D:\\myapp\\Afcat-Node\\src\\store\\action\\config.js",[],"D:\\myapp\\Afcat-Node\\src\\component\\indexComponent\\noAnswer.js",[],"D:\\myapp\\Afcat-Node\\src\\component\\indexComponent\\gitLogin.js",["178"],"import {Button} from 'antd';\r\nimport {Link} from 'react-router-dom';\r\n\r\nexport default function GitLogin(){\r\n return <div className=\"gitLogin\">\r\n <h6>CNode:Node.js专业中文社区</h6>\r\n <p>您可以 登录 或 注册 , 也可以</p>\r\n <Button type=\"primary\">\r\n <a href=\"https://github.com/login\" replace=\"true\">通过 GitHub 登录</a></Button>\r\n </div>\r\n}","D:\\myapp\\Afcat-Node\\src\\component\\indexComponent\\friends.js",["179","180","181","182"],"import erweima from '../../static/image/erweima.png';\r\nimport rubyChina from '../../static/image/ruby-china.png';\r\nimport {Card} from 'antd';\r\n\r\nexport default function Friends(){\r\n return <div className=\"friends\">\r\n <div>\r\n <Card type=\"inner\" size=\"small\" title=\"友情社区\">\r\n <ul>\r\n <li>\r\n <img src={rubyChina}/>\r\n </li>\r\n <li><img src={rubyChina}/></li>\r\n <li><img src={rubyChina}/></li>\r\n </ul>\r\n </Card>\r\n </div>\r\n <div>\r\n <Card type=\"inner\" size=\"small\" title=\"客户端二维码\">\r\n <div className=\"erweima\">\r\n <img src={erweima}/>\r\n </div>\r\n </Card>\r\n </div>\r\n </div>\r\n}","D:\\myapp\\Afcat-Node\\src\\routers\\article\\index.js",["183","184","185","186"],"import { Button, Card } from \"antd\";\r\nimport { useState } from \"react\";\r\nimport {Link,useHistory} from \"react-router-dom\";\r\nfunction CreateArticlePage(props) {\r\n const [types,setTypes] =useState(\"\");\r\n const [title,setTitle] =useState(\"\");\r\n const [content,setContent] =useState(\"\");\r\n const {push} = useHistory();\r\n return <div className=\"view\">\r\n <div className=\"wrap\">\r\n <Card\r\n title=\"发布话题\"\r\n >\r\n <span className=\"tab-selector\">选择版块:</span>\r\n <select name=\"tab\" id=\"tab-value\" value={types} onChange={(e)=>getSelectedOption(e)}>\r\n <option value=\"\">请选择</option>\r\n <option value=\"share\">分享</option>\r\n <option value=\"ask\">问答</option>\r\n <option value=\"job\">招聘</option>\r\n <option value=\"dev\">客户端测试</option>\r\n </select>\r\n <span id=\"topic_create_warn\"></span>\r\n \r\n <div>\r\n <textarea id=\"article_title\" value={title} placeholder=\"标题字数10字以上\" \r\n onChange={(e)=>{setTitle(e.target.value)}}></textarea>\r\n </div>\r\n <div>\r\n <textarea id=\"article_content\" value={content} placeholder=\"内容输入\" \r\n onChange={(e)=>{setContent(e.target.value)}}></textarea>\r\n </div>\r\n \r\n <Button type=\"primary\" onClick={()=>{\r\n insertArticle();\r\n }}>提交</Button>\r\n </Card>\r\n </div>\r\n </div>\r\n function getSelectedOption(e){\r\n let types=e.target.value;\r\n console.log(types);\r\n let wranSpan = document.querySelector(\"#topic_create_warn\");\r\n if(types=='ask'){\r\n wranSpan.innerHTML = \"<strong>提问时,请遵循《提问的智慧》中提及的要点,以便您更接收到高质量回复。</strong>\";\r\n }else if(types=='job'){\r\n wranSpan.innerHTML = \"<strong>为避免被管理员删帖,发帖时请好好阅读《招聘帖规范》。</strong>\";\r\n }else{\r\n wranSpan.innerHTML = \"\";\r\n }\r\n setTypes(e.target.value);\r\n }\r\n function insertArticle(){\r\n types==\"\"?\r\n alert(\"必须选择一个版块!\")\r\n :\r\n title.length>=10?\r\n fetch('https://cnodejs.org/api/v1/topics',{\r\n method:'post',\r\n headers:{\r\n 'Accept':'application/json,text/plain,*/*',/* 格式限制:json、文本、其他格式 */\r\n 'Content-Type':'application/x-www-form-urlencoded'/* 请求内容类型 */\r\n },\r\n body:`accesstoken=f7b513a6-fdce-472b-a23f-4ecd5a4fa230&tab=${types}&title=${title}&content=${content}`\r\n }).then((response)=>{\r\n //由于找不到真实请求response对应的id,发帖成功后直接返回到?tab=dev\r\n console.log(response);\r\n response.status===200 ?\r\n push(`/?tab=${types}`)\r\n :\r\n console.log(\"发帖失败\");\r\n })\r\n :alert(\"标题字数少于10个字\");\r\n \r\n }\r\n}\r\n\r\nexport default CreateArticlePage;","D:\\myapp\\Afcat-Node\\src\\routers\\topic\\index.js",["187","188"],"import { Card,Divider } from \"antd\";\r\nimport { useEffect } from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { useLoadTopic } from \"../../store/action/topic\";\r\nimport TopicComment from \"./topicComment\";\r\nimport AddTopicComment from \"./addTopicComment\";\r\nimport \"../../static/css/topic.css\"; \r\nimport { useLocation } from \"react-router-dom\";\r\n\r\nfunction TopicPage(props) {\r\n //const { id } = props;\r\n const id = useLocation().pathname.split('/')[2];\r\n \r\n const {data} = useSelector(state=>state.topic);\r\n \r\n const getData = useLoadTopic();\r\n useEffect(() => {\r\n getData(id);\r\n }, [id])\r\n console.log(data);\r\n const content_inner = data.content ;\r\n //const author = data.author;\r\n \r\n return <div className=\"view\">\r\n <div className=\"wrap\">\r\n <div className=\"topic_top\">\r\n <div className=\"topic_title\">\r\n <h1>{data.title}</h1>\r\n </div>\r\n <div className=\"topic_list\">\r\n <ul>\r\n <li>发布于 {data.create_at}</li>\r\n {/* <li>作者 {data.author.loginname}</li> */}\r\n <li>{data.visit_count} 次浏览</li>\r\n <li>来自{data.tab}</li>\r\n </ul>\r\n </div>\r\n\r\n </div>\r\n <Divider />\r\n <div className=\"topic_content\" \r\n dangerouslySetInnerHTML={{\r\n __html: content_inner\r\n }}\r\n >\r\n \r\n </div>\r\n </div>\r\n\r\n <TopicComment \r\n value = {data.replies}\r\n />\r\n <AddTopicComment />\r\n\r\n \r\n </div>\r\n\r\n\r\n \r\n}\r\nexport default TopicPage;\r\n\r\n\r\n\r\n\r\n","D:\\myapp\\Afcat-Node\\src\\routers\\topic\\topicComment.js",["189","190","191"],"import { Card, Divider } from \"antd\";\r\nimport React, { createElement, useState } from 'react';\r\nimport { Comment, Tooltip, Avatar } from 'antd';\r\nimport moment from 'moment';\r\nimport { DislikeOutlined, LikeOutlined, DislikeFilled, LikeFilled } from '@ant-design/icons';\r\n\r\nfunction Comments(props) {\r\n const [likes, setLikes] = useState(0);\r\n const [dislikes, setDislikes] = useState(0);\r\n const [action, setAction] = useState(null);\r\n const topicComment = props.value;\r\n\r\n const like = () => {\r\n setLikes(1);\r\n setDislikes(0);\r\n setAction('liked');\r\n };\r\n\r\n const dislike = () => {\r\n setLikes(0);\r\n setDislikes(1);\r\n setAction('disliked');\r\n };\r\n\r\n const actions = [\r\n <Tooltip key=\"comment-basic-like\" title=\"Like\">\r\n <span onClick={like}>\r\n {createElement(action === 'liked' ? LikeFilled : LikeOutlined)}\r\n <span className=\"comment-action\">{likes}</span>\r\n </span>\r\n </Tooltip>,\r\n <Tooltip key=\"comment-basic-dislike\" title=\"Dislike\">\r\n <span onClick={dislike}>\r\n {React.createElement(action === 'disliked' ? DislikeFilled : DislikeOutlined)}\r\n <span className=\"comment-action\">{dislikes}</span>\r\n </span>\r\n </Tooltip>,\r\n <span key=\"comment-basic-reply-to\">Reply to</span>,\r\n ];\r\n\r\n return (\r\n\r\n // {topicComment.map((item,i)=>{\r\n // return <div key={i} > </div>\r\n // })} \r\n\r\n <Comment\r\n actions={actions}\r\n author={<a>Han Solo</a>}\r\n avatar={\r\n <Avatar\r\n src=\"https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png\"\r\n alt=\"Han Solo\"\r\n />\r\n }\r\n content={\r\n <p>\r\n 哈哈哈哈哈\r\n </p>\r\n }\r\n datetime={\r\n <Tooltip title={moment().format('YYYY-MM-DD HH:mm:ss')}>\r\n <span>{moment().fromNow()}</span>\r\n </Tooltip>\r\n }\r\n />\r\n\r\n )\r\n\r\n}\r\nfunction TopicComment(props) {\r\n\r\n return (\r\n <div className=\"wrap\">\r\n <Card\r\n type=\"inner\"\r\n title=\"回复\"\r\n >\r\n\r\n <Comments />\r\n\r\n\r\n\r\n </Card>\r\n </div>\r\n );\r\n}\r\nexport default TopicComment;","D:\\myapp\\Afcat-Node\\src\\routers\\topic\\addTopicComment.js",["192"],"import ReactDom from 'react-dom';\r\nimport { Card } from \"antd\";\r\nimport { Button } from 'antd';\r\nimport { useState } from \"react\";\r\n//import E from \"wangeditor\";\r\n \r\n\r\nfunction AddTopicComment( ){\r\n const [content,setContent] =useState(\"\");\r\n \r\n function addComment(){\r\n \r\n \r\n }\r\n return (\r\n <div className=\"wrap\">\r\n <Card\r\n type=\"inner\"\r\n title=\"添加回复\"\r\n >\r\n <div>\r\n <textarea className=\"comment_content\" \r\n rows=\"6\" \r\n cols=\"120\"\r\n placeholder=\"评论内容\"\r\n value={content}\r\n onChange={(e)=>{setContent(e.target.value)}}\r\n ></textarea>\r\n \r\n </div>\r\n \r\n <Button type=\"primary\" \r\n onClick={()=>{ addComment();}}\r\n >提交</Button>\r\n </Card>\r\n </div>\r\n )\r\n}\r\nexport default AddTopicComment;\r\n\r\n\r\n","D:\\myapp\\Afcat-Node\\src\\store\\action\\topic.js",["193"],"import { useEffect } from \"react\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { http } from \"./config\";\r\n// hooks 放在组件最外层,数据请求,要放在副作用中\r\nfunction useLoadTopic() { \r\n const dispatch = useDispatch();\r\n //return async (id = '6100f54de3e67140e158fe63')=>{\r\n return async (id)=>{ \r\n const {data} = await http.get(`/topic/${id}`);\r\n console.log(data);\r\n dispatch({\r\n type: \"TOPIC_LOAD\",\r\n data: data.data\r\n })\r\n }\r\n}\r\n\r\nexport {useLoadTopic};","D:\\myapp\\Afcat-Node\\src\\store\\reducer\\topic.js",["194"],"function topic(topic={\r\n data:[] \r\n },action) {\r\n console.log(action.data );\r\n switch (action.type) {\r\n case \"TOPIC_LOAD\":\r\n return {\r\n data:action.data \r\n }\r\n }\r\n return topic;\r\n }\r\n \r\n export default topic;\r\n","D:\\myapp\\Afcat-Node\\src\\routers\\unread\\unread.js",[],"D:\\myapp\\Afcat-Node\\src\\routers\\signup\\index.js",[],{"ruleId":"195","replacedBy":"196"},{"ruleId":"197","replacedBy":"198"},{"ruleId":"199","severity":1,"message":"200","line":2,"column":17,"nodeType":"201","messageId":"202","endLine":2,"endColumn":20},{"ruleId":"199","severity":1,"message":"203","line":2,"column":21,"nodeType":"201","messageId":"202","endLine":2,"endColumn":24},{"ruleId":"204","severity":1,"message":"205","line":5,"column":5,"nodeType":"206","messageId":"207","endLine":16,"endColumn":6},{"ruleId":"204","severity":1,"message":"205","line":5,"column":3,"nodeType":"206","messageId":"207","endLine":16,"endColumn":4},{"ruleId":"199","severity":1,"message":"208","line":10,"column":8,"nodeType":"201","messageId":"202","endLine":10,"endColumn":14},{"ruleId":"209","severity":1,"message":"210","line":13,"column":5,"nodeType":"211","endLine":13,"endColumn":14,"suggestions":"212"},{"ruleId":"209","severity":1,"message":"213","line":25,"column":7,"nodeType":"211","endLine":25,"endColumn":13,"suggestions":"214"},{"ruleId":"199","severity":1,"message":"215","line":2,"column":8,"nodeType":"201","messageId":"202","endLine":2,"endColumn":10},{"ruleId":"199","severity":1,"message":"216","line":1,"column":16,"nodeType":"201","messageId":"202","endLine":1,"endColumn":22},{"ruleId":"204","severity":1,"message":"205","line":8,"column":3,"nodeType":"206","messageId":"207","endLine":13,"endColumn":4},{"ruleId":"209","severity":1,"message":"217","line":24,"column":6,"nodeType":"211","endLine":24,"endColumn":17,"suggestions":"218"},{"ruleId":"219","severity":1,"message":"220","line":33,"column":27,"nodeType":"221","endLine":33,"endColumn":85},{"ruleId":"222","severity":1,"message":"223","line":53,"column":28,"nodeType":"224","messageId":"225","endLine":53,"endColumn":30},{"ruleId":"226","severity":1,"message":"227","line":54,"column":19,"nodeType":"228","messageId":"229","endLine":54,"endColumn":21},{"ruleId":"222","severity":1,"message":"223","line":73,"column":28,"nodeType":"224","messageId":"225","endLine":73,"endColumn":30},{"ruleId":"226","severity":1,"message":"227","line":74,"column":19,"nodeType":"228","messageId":"229","endLine":74,"endColumn":21},{"ruleId":"199","severity":1,"message":"230","line":1,"column":10,"nodeType":"201","messageId":"202","endLine":1,"endColumn":19},{"ruleId":"199","severity":1,"message":"231","line":2,"column":9,"nodeType":"201","messageId":"202","endLine":2,"endColumn":13},{"ruleId":"219","severity":1,"message":"220","line":11,"column":25,"nodeType":"221","endLine":11,"endColumn":47},{"ruleId":"219","severity":1,"message":"220","line":13,"column":25,"nodeType":"221","endLine":13,"endColumn":47},{"ruleId":"219","severity":1,"message":"220","line":14,"column":25,"nodeType":"221","endLine":14,"endColumn":47},{"ruleId":"219","severity":1,"message":"220","line":21,"column":21,"nodeType":"221","endLine":21,"endColumn":41},{"ruleId":"199","severity":1,"message":"231","line":3,"column":9,"nodeType":"201","messageId":"202","endLine":3,"endColumn":13},{"ruleId":"226","severity":1,"message":"227","line":43,"column":17,"nodeType":"228","messageId":"229","endLine":43,"endColumn":19},{"ruleId":"226","severity":1,"message":"227","line":45,"column":23,"nodeType":"228","messageId":"229","endLine":45,"endColumn":25},{"ruleId":"226","severity":1,"message":"227","line":53,"column":14,"nodeType":"228","messageId":"229","endLine":53,"endColumn":16},{"ruleId":"199","severity":1,"message":"232","line":1,"column":10,"nodeType":"201","messageId":"202","endLine":1,"endColumn":14},{"ruleId":"209","severity":1,"message":"217","line":19,"column":8,"nodeType":"211","endLine":19,"endColumn":12,"suggestions":"233"},{"ruleId":"199","severity":1,"message":"234","line":1,"column":16,"nodeType":"201","messageId":"202","endLine":1,"endColumn":23},{"ruleId":"199","severity":1,"message":"235","line":11,"column":9,"nodeType":"201","messageId":"202","endLine":11,"endColumn":21},{"ruleId":"236","severity":1,"message":"237","line":49,"column":15,"nodeType":"221","endLine":49,"endColumn":18},{"ruleId":"199","severity":1,"message":"238","line":1,"column":8,"nodeType":"201","messageId":"202","endLine":1,"endColumn":16},{"ruleId":"199","severity":1,"message":"230","line":1,"column":10,"nodeType":"201","messageId":"202","endLine":1,"endColumn":19},{"ruleId":"204","severity":1,"message":"205","line":5,"column":5,"nodeType":"206","messageId":"207","endLine":10,"endColumn":6},"no-native-reassign",["239"],"no-negated-in-lhs",["240"],"no-unused-vars","'Row' is defined but never used.","Identifier","unusedVar","'Col' is defined but never used.","default-case","Expected a default case.","SwitchStatement","missingDefaultCase","'UnRead' is defined but never used.","react-hooks/exhaustive-deps","React Hook useEffect has missing dependencies: 'prevPath' and 'replace'. Either include them or remove the dependency array.","ArrayExpression",["241"],"React Hook useEffect has a missing dependency: 'afterClos'. Either include it or remove the dependency array.",["242"],"'qs' is defined but never used.","'Switch' is defined but never used.","React Hook useEffect has a missing dependency: 'getData'. Either include it or remove the dependency array.",["243"],"jsx-a11y/alt-text","img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.","JSXOpeningElement","array-callback-return","Array.prototype.map() expects a return value from arrow function.","ArrowFunctionExpression","expectedInside","eqeqeq","Expected '===' and instead saw '=='.","BinaryExpression","unexpected","'useEffect' is defined but never used.","'Link' is defined but never used.","'Card' is defined but never used.",["244"],"'Divider' is defined but never used.","'topicComment' is assigned a value but never used.","jsx-a11y/anchor-is-valid","The href attribute is required for an anchor to be keyboard accessible. Provide a valid, navigable address as the href value. If you cannot provide an href, but still need the element to resemble a link, use a button and change it with appropriate styles. Learn more: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md","'ReactDom' is defined but never used.","no-global-assign","no-unsafe-negation",{"desc":"245","fix":"246"},{"desc":"247","fix":"248"},{"desc":"249","fix":"250"},{"desc":"251","fix":"252"},"Update the dependencies array to be: [isLogin, prevPath, replace]",{"range":"253","text":"254"},"Update the dependencies array to be: [afterClos, show]",{"range":"255","text":"256"},"Update the dependencies array to be: [tab, page, getData]",{"range":"257","text":"258"},"Update the dependencies array to be: [getData, id]",{"range":"259","text":"260"},[387,396],"[isLogin, prevPath, replace]",[693,699],"[afterClos, show]",[655,666],"[tab, page, getData]",[630,634],"[getData, id]"]