-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintcache
1 lines (1 loc) · 18.7 KB
/
.eslintcache
1
[{"/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/index.js":"1","/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/utils/http.js":"2","/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/App.jsx":"3","/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/pages/Layout.jsx":"4","/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/router/router.js":"5","/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/router/Routerview.jsx":"6","/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/pages/Recommed/Recommed.jsx":"7","/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/pages/play/Play.jsx":"8","/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/pages/Hot/Hot.jsx":"9","/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/pages/Serch/Serch.jsx":"10","/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/pages/songlist/Songlist.jsx":"11","/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/hooks/useDebounce.js":"12","/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/hooks/index.js":"13","/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/hooks/useMount.js":"14","/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/hooks/useStateSync.js":"15","/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/hooks/useSyncCallback.js":"16"},{"size":245,"mtime":1672906599982,"results":"17","hashOfConfig":"18"},{"size":523,"mtime":1672906798142,"results":"19","hashOfConfig":"18"},{"size":197,"mtime":1612084230000,"results":"20","hashOfConfig":"18"},{"size":1872,"mtime":1672907106107,"results":"21","hashOfConfig":"18"},{"size":901,"mtime":1613182412000,"results":"22","hashOfConfig":"18"},{"size":671,"mtime":1613013664000,"results":"23","hashOfConfig":"18"},{"size":3790,"mtime":1613225284000,"results":"24","hashOfConfig":"18"},{"size":3607,"mtime":1613192958000,"results":"25","hashOfConfig":"18"},{"size":1811,"mtime":1672892158455,"results":"26","hashOfConfig":"18"},{"size":3662,"mtime":1672906820810,"results":"27","hashOfConfig":"18"},{"size":2752,"mtime":1613226276000,"results":"28","hashOfConfig":"18"},{"size":918,"mtime":1672903617905,"results":"29","hashOfConfig":"18"},{"size":125,"mtime":1672902463239,"results":"30","hashOfConfig":"18"},{"size":131,"mtime":1672901089366,"results":"31","hashOfConfig":"18"},{"size":649,"mtime":1672902539949,"results":"32","hashOfConfig":"18"},{"size":592,"mtime":1672902452938,"results":"33","hashOfConfig":"18"},{"filePath":"34","messages":"35","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1etnhoj",{"filePath":"36","messages":"37","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"38","messages":"39","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"40","usedDeprecatedRules":"41"},{"filePath":"42","messages":"43","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"44","messages":"45","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"41"},{"filePath":"46","messages":"47","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"41"},{"filePath":"48","messages":"49","errorCount":0,"fatalErrorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":"50","usedDeprecatedRules":"41"},{"filePath":"51","messages":"52","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"53","usedDeprecatedRules":"41"},{"filePath":"54","messages":"55","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"56","usedDeprecatedRules":"41"},{"filePath":"57","messages":"58","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"59","messages":"60","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"41"},{"filePath":"61","messages":"62","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"41"},{"filePath":"63","messages":"64","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"41"},{"filePath":"65","messages":"66","errorCount":0,"fatalErrorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"67","usedDeprecatedRules":"41"},{"filePath":"68","messages":"69","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"41"},{"filePath":"70","messages":"71","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"41"},"/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/index.js",[],"/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/utils/http.js",["72"],"/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/App.jsx",["73"],"import logo from './logo.svg';\nimport './App.css';\n\nimport Layout from './pages/Layout'\nfunction App() {\n return (\n <div className=\"App\">\n <Layout/>\n </div>\n );\n}\n\nexport default App;\n",["74","75"],"/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/pages/Layout.jsx",[],"/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/router/router.js",[],"/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/router/Routerview.jsx",[],"/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/pages/Recommed/Recommed.jsx",["76","77","78"],"import React, { Component } from 'react'\r\n\r\n\r\nimport { Carousel, List, Card } from 'antd';\r\nimport {RightCircleOutlined} from '@ant-design/icons'\r\n\r\n\r\n\r\nexport default class Recommed extends Component {\r\n state = {\r\n // 轮播\r\n banners :[],\r\n // 推荐\r\n recommmedList : [],\r\n // 新歌\r\n newSong: []\r\n }\r\n \r\n render() {\r\n return (\r\n <div>\r\n {/* 轮播 */}\r\n <Carousel \r\n className=\"lun\" \r\n afterChange={(event) => this.onChange(event)}\r\n autoplay={true}\r\n >\r\n { \r\n // 这里为什么不是引号了??\r\n this.state.banners.map(item =>(\r\n <div key={item.encodeId}>\r\n <img src={item.imageUrl} alt=\"\"/>\r\n </div>\r\n ))\r\n }\r\n </Carousel>\r\n <div className=\"wrap\">\r\n <div className=\"selet\"></div>\r\n <h3>推荐歌单</h3>\r\n </div>\r\n <List\r\n grid={{ gutter: 16, column: 3 }}\r\n dataSource={this.state.recommmedList}\r\n renderItem={item => (\r\n <List.Item>\r\n {/* 这里不加箭头函数绑定this,会直接跳转,而不是点击跳转 */}\r\n <Card onClick={()=>this.props.history.push(`/songlist/${item.id}`)}>\r\n <img src={item.picUrl} alt=\"\" />\r\n <p>{item.name.substr(0,6)}...</p>\r\n </Card>\r\n </List.Item>\r\n )}\r\n />\r\n <div className=\"wrap\">\r\n <div className=\"selet\"></div>\r\n <h3>最新音乐</h3>\r\n </div>\r\n <List\r\n size=\"large\" \r\n bordered\r\n dataSource={this.state.newSong}\r\n renderItem={item => \r\n <List.Item\r\n onClick={()=>this.props.history.push(`/play/${item.id}`)}\r\n actions={[<RightCircleOutlined style={{fontSize:24}}/>]}\r\n >\r\n {item.name}\r\n </List.Item>}\r\n />\r\n </div>\r\n )\r\n }\r\n // 注意这个回调要放在类组件里面,\r\n // 这里还有问题\r\n onChange(event) {\r\n console.log(event);\r\n }\r\n componentWillMount(){\r\n // console.log(this.$http)\r\n this.getBanners()\r\n this.getRecommedList()\r\n this.getNewSong()\r\n }\r\n async getBanners(){\r\n // 这为什么加了api?\r\n const res = await this.$http.get('/banner');\r\n // console.log(res)\r\n // 没有写code\r\n if(res.code == 200){\r\n this.setState({banners:res.banners})\r\n }\r\n }\r\n async getRecommedList(){\r\n const res = await this.$http.get(`/personalized`)\r\n // console.log(res)\r\n if(res.code == 200){\r\n this.setState({recommmedList:res.result})\r\n }\r\n }\r\n async getNewSong(){\r\n const res = await this.$http.get(`/personalized/newsong`)\r\n // console.log(res)\r\n if(res.code == 200){\r\n this.setState({newSong:res.result})\r\n }\r\n }\r\n // 卸载\r\n componentWillUnmount(){\r\n this.setState = () =>false\r\n }\r\n}\r\n","/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/pages/play/Play.jsx",["79"],"import React, { Component } from 'react'\r\n\r\nimport '../../assets/css/play.css'\r\nexport default class Play extends Component {\r\n constructor(){\r\n super()\r\n this.state = {\r\n // true是当前未播放,点击后播放的按钮\r\n // false是当前正播放,点击后暂停按钮\r\n status : true,\r\n deg:'15deg',\r\n // 歌曲信息\r\n info:{},\r\n // 歌词\r\n lyric:[],\r\n // 音乐播放地址\r\n playUrl:[]\r\n }\r\n }\r\n render() {\r\n return (\r\n <>\r\n <div className=\"play-container\">\r\n {/* 音乐播放控件 */}\r\n <div className=\"play-control\" style={{transform: `rotate(${this.state.deg})`}}></div>\r\n <div className=\"play-box\">\r\n <img className={this.state.status ? '' : 'rotate'} src={this.state.info.picUrl}></img>\r\n <div \r\n onClick={()=>this.toggle()}\r\n className={[\"btn\",this.state.status?\"play-btn\":\"pause-btn\"].join(' ')}></div>\r\n </div>\r\n <audio src={this.state.playUrl} controls ref={(dom)=>this.music=dom} style={{display:'none'}}></audio>\r\n <div className=\"content\">\r\n <h3>{this.state.info.name}</h3>\r\n <div>\r\n {\r\n this.state.lyric.map((item, index) => <p key={index}>{item}</p>)\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </>\r\n )\r\n }\r\n componentDidMount(){\r\n this.getDetail()\r\n this.getPlayUrl()\r\n this.getLyric()\r\n }\r\n // 控制音乐的播放状态\r\n toggle(){\r\n /**\r\n * 1-按钮图标的变化\r\n * 2-音乐的播放暂停\r\n */\r\n const deg = this.state.status ? 0 : '15deg'\r\n this.setState({status :!this.state.status,deg})\r\n // if(this.state.status){}\r\n if(!this.state.status){\r\n // 如果是播放状态 ,点击后暂停\r\n // 为什么audio标签虚拟dom对象上有播放和暂停\r\n this.music.pause()\r\n }else{\r\n this.music.play()\r\n }\r\n }\r\n\r\n // 获取音乐详情\r\n async getDetail(){\r\n const ids = this.props.match.params.id\r\n // 这里为什么请求错误呢?因为params写错了\r\n const res = await this.$http.get('/song/detail',{ params : { ids } })\r\n // console.log(res)\r\n if(res.code === 200){\r\n this.setState({info:res.songs[0].al})\r\n }\r\n }\r\n\r\n // 获取音乐播放地址\r\n async getPlayUrl(){\r\n const id = this.props.match.params.id\r\n const res = await this.$http.get('/song/url',{ params : {id} })\r\n // console.log(res)\r\n if(res.code === 200){\r\n const playUrl = res.data[0].url\r\n this.setState({playUrl})\r\n }\r\n }\r\n\r\n // 获取歌词\r\n async getLyric(){\r\n const id = this.props.match.params.id\r\n const res = await this.$http.get(`/lyric`,{ params : { id } })\r\n // console.log(res.lrc.lyric)\r\n const lyric = this.lyricFmt(res.lrc.lyric)\r\n this.setState({lyric})\r\n }\r\n // 格式化歌词\r\n lyricFmt(lyric){\r\n const reg=/\\[(.*)\\](.*)/g;\r\n const arr=[];\r\n lyric.replace(reg,(a,b,c)=>{\r\n arr.push(c);\r\n });\r\n return arr;\r\n }\r\n}\r\n","/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/pages/Hot/Hot.jsx",["80"],"import React, { Component } from 'react'\r\n\r\nimport '../../assets/css/hot.css'\r\n\r\nimport { Skeleton , List} from 'antd';\r\nimport {RightCircleOutlined} from '@ant-design/icons'\r\nexport default class Hot extends Component {\r\n\r\n constructor(){\r\n super()\r\n }\r\n state = {\r\n loading:true,\r\n hotList:[],\r\n banners:''\r\n }\r\n render() {\r\n // 这里不能是字符串,必须是对象键值对\r\n const bannerStyle = {\r\n backgroundImage:`url(${this.state.banners})`\r\n }\r\n return (\r\n <Skeleton loading={this.state.loading} active={true}> \r\n <div className=\"hot-contain\">\r\n {/* 这种样式写法,需要记一下 */}\r\n <div className=\"banners\" style={bannerStyle}></div>\r\n {/* 歌单列表 */}\r\n <List\r\n size=\"large\" \r\n dataSource={this.state.hotList}\r\n renderItem={item => \r\n <List.Item\r\n onClick={()=>this.props.history.push(`/play/${item.id}`)}\r\n actions={[<RightCircleOutlined style={{fontSize:24}}/>]}\r\n >\r\n {item.name}\r\n </List.Item>}\r\n />\r\n </div>\r\n </Skeleton>\r\n )\r\n }\r\n componentWillMount(){\r\n this.getHotsongList()\r\n }\r\n // 请求热歌列表\r\n async getHotsongList(){\r\n const res = await this.$http.get(`/top/list?idx=1`)\r\n this.setState({hotList:res.playlist.tracks, banners:res.playlist.coverImgUrl,loading:false})\r\n }\r\n // 组件将要卸载\r\n componentWillUnmount(){\r\n this.setState = ()=>false\r\n }\r\n}\r\n","/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/pages/Serch/Serch.jsx",["81"],"/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/pages/songlist/Songlist.jsx",[],"/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/hooks/useDebounce.js",[],"/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/hooks/index.js",[],"/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/hooks/useMount.js",["82"],"import { useEffect } from \"react\";\n\nexport const useMount = (callBack) => {\n useEffect(() => {\n callBack();\n }, []);\n};\n","/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/hooks/useStateSync.js",[],"/Users/lixiaofei/Documents/React/youmi-music/youmi-music/src/hooks/useSyncCallback.js",[],{"ruleId":"83","severity":1,"message":"84","line":14,"column":9,"nodeType":"85","messageId":"86","endLine":14,"endColumn":15},{"ruleId":"87","severity":1,"message":"88","line":1,"column":8,"nodeType":"85","messageId":"89","endLine":1,"endColumn":12},{"ruleId":"90","replacedBy":"91"},{"ruleId":"92","replacedBy":"93"},{"ruleId":"94","severity":1,"message":"95","line":89,"column":21,"nodeType":"96","messageId":"97","endLine":89,"endColumn":23},{"ruleId":"94","severity":1,"message":"95","line":96,"column":21,"nodeType":"96","messageId":"97","endLine":96,"endColumn":23},{"ruleId":"94","severity":1,"message":"95","line":103,"column":21,"nodeType":"96","messageId":"97","endLine":103,"endColumn":23},{"ruleId":"98","severity":1,"message":"99","line":27,"column":25,"nodeType":"100","endLine":27,"endColumn":105},{"ruleId":"101","severity":1,"message":"102","line":9,"column":5,"nodeType":"103","messageId":"104","endLine":11,"endColumn":6},{"ruleId":"105","severity":1,"message":"106","line":32,"column":8,"nodeType":"107","endLine":32,"endColumn":34,"suggestions":"108"},{"ruleId":"105","severity":1,"message":"109","line":6,"column":8,"nodeType":"107","endLine":6,"endColumn":10,"suggestions":"110"},"no-redeclare","'basURL' is already defined.","Identifier","redeclared","no-unused-vars","'logo' is defined but never used.","unusedVar","no-native-reassign",["111"],"no-negated-in-lhs",["112"],"eqeqeq","Expected '===' and instead saw '=='.","BinaryExpression","unexpected","jsx-a11y/alt-text","img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.","JSXOpeningElement","no-useless-constructor","Useless constructor.","MethodDefinition","noUselessConstructor","react-hooks/exhaustive-deps","React Hook useMemo has an unnecessary dependency: '$http'. Either exclude it or remove the dependency array. Outer scope values like '$http' aren't valid dependencies because mutating them doesn't re-render the component.","ArrayExpression",["113"],"React Hook useEffect has a missing dependency: 'callBack'. Either include it or remove the dependency array. If 'callBack' changes too often, find the parent component that defines it and wrap that definition in useCallback.",["114"],"no-global-assign","no-unsafe-negation",{"desc":"115","fix":"116"},{"desc":"117","fix":"118"},"Update the dependencies array to be: [debouncedKeywords]",{"range":"119","text":"120"},"Update the dependencies array to be: [callBack]",{"range":"121","text":"122"},[1116,1142],"[debouncedKeywords]",[123,125],"[callBack]"]