更新依赖到最新,更新electron到7.0.0

pull/96/head
lyswhut 2019-10-27 17:34:11 +08:00
parent 3a033b66c4
commit 501231adff
13 changed files with 461 additions and 544 deletions

View File

@ -35,7 +35,7 @@
所用技术栈:
- Electron 6.x
- Electron 7.x
- Vue 2.x
已支持的平台:

955
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -138,7 +138,7 @@
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
"@babel/polyfill": "^7.6.0",
"@babel/preset-env": "^7.6.3",
"autoprefixer": "^9.6.5",
"autoprefixer": "^9.7.0",
"babel-eslint": "^10.0.3",
"babel-loader": "^8.0.6",
"babel-minify-webpack-plugin": "^0.3.1",
@ -147,16 +147,16 @@
"chalk": "^2.4.2",
"changelog-parser": "^2.8.0",
"copy-webpack-plugin": "^5.0.4",
"core-js": "^3.3.2",
"core-js": "^3.3.4",
"cos-nodejs-sdk-v5": "^2.5.12",
"cross-env": "^6.0.3",
"css-loader": "^3.2.0",
"del": "^5.1.0",
"electron": "^6.0.12",
"electron": "^7.0.0",
"electron-builder": "^21.2.0",
"electron-debug": "^3.0.1",
"electron-devtools-installer": "^2.2.4",
"eslint": "^6.5.1",
"eslint": "^6.6.0",
"eslint-config-standard": "^14.1.0",
"eslint-formatter-friendly": "^7.0.0",
"eslint-loader": "^3.0.2",
@ -182,14 +182,14 @@
"rimraf": "^3.0.0",
"stylus": "^0.54.7",
"stylus-loader": "^3.0.2",
"terser-webpack-plugin": "^2.1.3",
"terser-webpack-plugin": "^2.2.1",
"url-loader": "^2.2.0",
"vue-loader": "^15.7.1",
"vue-style-loader": "^4.1.2",
"vue-template-compiler": "^2.6.10",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.9",
"webpack-dev-server": "^3.8.2",
"webpack-dev-server": "^3.9.0",
"webpack-hot-middleware": "^2.25.0",
"webpack-merge": "^4.2.2"
},

View File

@ -2,16 +2,12 @@ import Vue from 'vue'
import upperFirst from 'lodash/upperFirst'
import camelCase from 'lodash/camelCase'
const requireComponent = require.context(
'./', true, /\.vue$/
)
const requireComponent = require.context('./', true, /\.vue$/)
requireComponent.keys().forEach(fileName => {
const componentConfig = requireComponent(fileName)
const componentName = upperFirst(
camelCase(fileName.replace(/^\.\//, '').replace(/\.\w+$/, ''))
)
const componentName = upperFirst(camelCase(fileName.replace(/^\.\//, '').replace(/\.\w+$/, '')))
Vue.component(componentName, componentConfig.default || componentConfig)
})

View File

@ -10,9 +10,7 @@ function route(path, view, name, meta, props) {
path,
meta,
props,
component: (resovle) => import(
`../views/${view}.vue`
).then(resovle),
component: (resovle) => import(`../views/${view}.vue`).then(resovle),
}
}

View File

@ -14,11 +14,11 @@ export const pauseResumeTimer = (_dl, wait) => {
setTimeout(() => {
if (!_dl.isResumable()) {
console.warn(
"This URL doesn't support resume, it will start from the beginning"
"This URL doesn't support resume, it will start from the beginning",
)
}
return _dl.resume()
}, wait)
}, wait),
)
}, wait)
}

View File

@ -145,9 +145,7 @@ export default {
getList(sortId, tagId, page, tryNum = 0) {
if (this._requestObj_list) this._requestObj_list.cancelHttp()
if (tryNum > 2) return Promise.reject(new Error('try max num'))
this._requestObj_list = httpFetch(
this.getListUrl(sortId, tagId, page)
)
this._requestObj_list = httpFetch(this.getListUrl(sortId, tagId, page))
return this._requestObj_list.promise.then(({ body }) => {
if (body.error_code !== this.successCode) return this.getList(sortId, tagId, page, ++tryNum)
return {

View File

@ -32,7 +32,7 @@ export default {
userid: 2626431536,
vip: 1,
},
}
},
)
requestObj.promise = requestObj.promise.then(({ body }) => {
if (body.error_code !== 0) return Promise.reject('图片获取失败')

View File

@ -92,7 +92,7 @@ export default {
if (this._requestObj_list) this._requestObj_list.cancelHttp()
if (tryNum > 2) return Promise.reject(new Error('try max num'))
this._requestObj_list = httpFetch(
this.getSongListUrl(sortId, tagId, page)
this.getSongListUrl(sortId, tagId, page),
)
return this._requestObj_list.promise.then(({ body }) => {
if (body.status !== 1) return this.getSongList(sortId, tagId, page, ++tryNum)
@ -120,7 +120,7 @@ export default {
return_min: 6,
return_max: 15,
},
}
},
)
return this._requestObj_listRecommend.promise.then(({ body }) => {
if (body.status !== 1) return this.getSongListRecommend(++tryNum)
@ -253,7 +253,7 @@ export default {
this.currentTagInfo.id = tagId
this.currentTagInfo.info = Object.assign({}, info)
return info
})
}),
)
if (!tagId && page === 1 && sortId === this.sortList[0].id) tasks.push(this.getSongListRecommend()) // 如果是所有类别,则顺便获取推荐列表
return Promise.all(tasks).then(([list, info, recommendList]) => {

View File

@ -109,7 +109,7 @@ export default {
if (this._requestObj_list) this._requestObj_list.cancelHttp()
if (tryNum > 2) return Promise.reject(new Error('try max num'))
this._requestObj_list = httpFetch(
this.getListUrl(sortId, tagId, page)
this.getListUrl(sortId, tagId, page),
)
return this._requestObj_list.promise.then(({ body }) => {
if (body.code !== this.successCode) return this.getList(sortId, tagId, page, ++tryNum)

View File

@ -95,7 +95,7 @@ export default {
this.listAdd({ id: 'default', musicInfo: targetSong })
}
let targetIndex = this.defaultList.list.findIndex(
s => s.songmid === targetSong.songmid
s => s.songmid === targetSong.songmid,
)
if (targetIndex > -1) {
this.setList({

View File

@ -194,7 +194,7 @@ export default {
this.listAdd({ id: 'default', musicInfo: targetSong })
}
let targetIndex = this.defaultList.list.findIndex(
s => s.songmid === targetSong.songmid
s => s.songmid === targetSong.songmid,
)
if (targetIndex > -1) {
this.setList({

View File

@ -190,7 +190,7 @@ export default {
this.listAdd({ id: 'default', musicInfo: targetSong })
}
let targetIndex = this.defaultList.list.findIndex(
s => s.songmid === targetSong.songmid
s => s.songmid === targetSong.songmid,
)
if (targetIndex > -1) {
this.setList({