更新依赖到最新,更新electron到7.0.0
parent
3a033b66c4
commit
501231adff
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
所用技术栈:
|
所用技术栈:
|
||||||
|
|
||||||
- Electron 6.x
|
- Electron 7.x
|
||||||
- Vue 2.x
|
- Vue 2.x
|
||||||
|
|
||||||
已支持的平台:
|
已支持的平台:
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
12
package.json
12
package.json
|
@ -138,7 +138,7 @@
|
||||||
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
|
||||||
"@babel/polyfill": "^7.6.0",
|
"@babel/polyfill": "^7.6.0",
|
||||||
"@babel/preset-env": "^7.6.3",
|
"@babel/preset-env": "^7.6.3",
|
||||||
"autoprefixer": "^9.6.5",
|
"autoprefixer": "^9.7.0",
|
||||||
"babel-eslint": "^10.0.3",
|
"babel-eslint": "^10.0.3",
|
||||||
"babel-loader": "^8.0.6",
|
"babel-loader": "^8.0.6",
|
||||||
"babel-minify-webpack-plugin": "^0.3.1",
|
"babel-minify-webpack-plugin": "^0.3.1",
|
||||||
|
@ -147,16 +147,16 @@
|
||||||
"chalk": "^2.4.2",
|
"chalk": "^2.4.2",
|
||||||
"changelog-parser": "^2.8.0",
|
"changelog-parser": "^2.8.0",
|
||||||
"copy-webpack-plugin": "^5.0.4",
|
"copy-webpack-plugin": "^5.0.4",
|
||||||
"core-js": "^3.3.2",
|
"core-js": "^3.3.4",
|
||||||
"cos-nodejs-sdk-v5": "^2.5.12",
|
"cos-nodejs-sdk-v5": "^2.5.12",
|
||||||
"cross-env": "^6.0.3",
|
"cross-env": "^6.0.3",
|
||||||
"css-loader": "^3.2.0",
|
"css-loader": "^3.2.0",
|
||||||
"del": "^5.1.0",
|
"del": "^5.1.0",
|
||||||
"electron": "^6.0.12",
|
"electron": "^7.0.0",
|
||||||
"electron-builder": "^21.2.0",
|
"electron-builder": "^21.2.0",
|
||||||
"electron-debug": "^3.0.1",
|
"electron-debug": "^3.0.1",
|
||||||
"electron-devtools-installer": "^2.2.4",
|
"electron-devtools-installer": "^2.2.4",
|
||||||
"eslint": "^6.5.1",
|
"eslint": "^6.6.0",
|
||||||
"eslint-config-standard": "^14.1.0",
|
"eslint-config-standard": "^14.1.0",
|
||||||
"eslint-formatter-friendly": "^7.0.0",
|
"eslint-formatter-friendly": "^7.0.0",
|
||||||
"eslint-loader": "^3.0.2",
|
"eslint-loader": "^3.0.2",
|
||||||
|
@ -182,14 +182,14 @@
|
||||||
"rimraf": "^3.0.0",
|
"rimraf": "^3.0.0",
|
||||||
"stylus": "^0.54.7",
|
"stylus": "^0.54.7",
|
||||||
"stylus-loader": "^3.0.2",
|
"stylus-loader": "^3.0.2",
|
||||||
"terser-webpack-plugin": "^2.1.3",
|
"terser-webpack-plugin": "^2.2.1",
|
||||||
"url-loader": "^2.2.0",
|
"url-loader": "^2.2.0",
|
||||||
"vue-loader": "^15.7.1",
|
"vue-loader": "^15.7.1",
|
||||||
"vue-style-loader": "^4.1.2",
|
"vue-style-loader": "^4.1.2",
|
||||||
"vue-template-compiler": "^2.6.10",
|
"vue-template-compiler": "^2.6.10",
|
||||||
"webpack": "^4.41.2",
|
"webpack": "^4.41.2",
|
||||||
"webpack-cli": "^3.3.9",
|
"webpack-cli": "^3.3.9",
|
||||||
"webpack-dev-server": "^3.8.2",
|
"webpack-dev-server": "^3.9.0",
|
||||||
"webpack-hot-middleware": "^2.25.0",
|
"webpack-hot-middleware": "^2.25.0",
|
||||||
"webpack-merge": "^4.2.2"
|
"webpack-merge": "^4.2.2"
|
||||||
},
|
},
|
||||||
|
|
|
@ -2,16 +2,12 @@ import Vue from 'vue'
|
||||||
import upperFirst from 'lodash/upperFirst'
|
import upperFirst from 'lodash/upperFirst'
|
||||||
import camelCase from 'lodash/camelCase'
|
import camelCase from 'lodash/camelCase'
|
||||||
|
|
||||||
const requireComponent = require.context(
|
const requireComponent = require.context('./', true, /\.vue$/)
|
||||||
'./', true, /\.vue$/
|
|
||||||
)
|
|
||||||
|
|
||||||
requireComponent.keys().forEach(fileName => {
|
requireComponent.keys().forEach(fileName => {
|
||||||
const componentConfig = requireComponent(fileName)
|
const componentConfig = requireComponent(fileName)
|
||||||
|
|
||||||
const componentName = upperFirst(
|
const componentName = upperFirst(camelCase(fileName.replace(/^\.\//, '').replace(/\.\w+$/, '')))
|
||||||
camelCase(fileName.replace(/^\.\//, '').replace(/\.\w+$/, ''))
|
|
||||||
)
|
|
||||||
|
|
||||||
Vue.component(componentName, componentConfig.default || componentConfig)
|
Vue.component(componentName, componentConfig.default || componentConfig)
|
||||||
})
|
})
|
||||||
|
|
|
@ -10,9 +10,7 @@ function route(path, view, name, meta, props) {
|
||||||
path,
|
path,
|
||||||
meta,
|
meta,
|
||||||
props,
|
props,
|
||||||
component: (resovle) => import(
|
component: (resovle) => import(`../views/${view}.vue`).then(resovle),
|
||||||
`../views/${view}.vue`
|
|
||||||
).then(resovle),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,11 +14,11 @@ export const pauseResumeTimer = (_dl, wait) => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (!_dl.isResumable()) {
|
if (!_dl.isResumable()) {
|
||||||
console.warn(
|
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()
|
return _dl.resume()
|
||||||
}, wait)
|
}, wait),
|
||||||
)
|
)
|
||||||
}, wait)
|
}, wait)
|
||||||
}
|
}
|
||||||
|
|
|
@ -145,9 +145,7 @@ export default {
|
||||||
getList(sortId, tagId, page, tryNum = 0) {
|
getList(sortId, tagId, page, tryNum = 0) {
|
||||||
if (this._requestObj_list) this._requestObj_list.cancelHttp()
|
if (this._requestObj_list) this._requestObj_list.cancelHttp()
|
||||||
if (tryNum > 2) return Promise.reject(new Error('try max num'))
|
if (tryNum > 2) return Promise.reject(new Error('try max num'))
|
||||||
this._requestObj_list = httpFetch(
|
this._requestObj_list = httpFetch(this.getListUrl(sortId, tagId, page))
|
||||||
this.getListUrl(sortId, tagId, page)
|
|
||||||
)
|
|
||||||
return this._requestObj_list.promise.then(({ body }) => {
|
return this._requestObj_list.promise.then(({ body }) => {
|
||||||
if (body.error_code !== this.successCode) return this.getList(sortId, tagId, page, ++tryNum)
|
if (body.error_code !== this.successCode) return this.getList(sortId, tagId, page, ++tryNum)
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -32,7 +32,7 @@ export default {
|
||||||
userid: 2626431536,
|
userid: 2626431536,
|
||||||
vip: 1,
|
vip: 1,
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
requestObj.promise = requestObj.promise.then(({ body }) => {
|
requestObj.promise = requestObj.promise.then(({ body }) => {
|
||||||
if (body.error_code !== 0) return Promise.reject('图片获取失败')
|
if (body.error_code !== 0) return Promise.reject('图片获取失败')
|
||||||
|
|
|
@ -92,7 +92,7 @@ export default {
|
||||||
if (this._requestObj_list) this._requestObj_list.cancelHttp()
|
if (this._requestObj_list) this._requestObj_list.cancelHttp()
|
||||||
if (tryNum > 2) return Promise.reject(new Error('try max num'))
|
if (tryNum > 2) return Promise.reject(new Error('try max num'))
|
||||||
this._requestObj_list = httpFetch(
|
this._requestObj_list = httpFetch(
|
||||||
this.getSongListUrl(sortId, tagId, page)
|
this.getSongListUrl(sortId, tagId, page),
|
||||||
)
|
)
|
||||||
return this._requestObj_list.promise.then(({ body }) => {
|
return this._requestObj_list.promise.then(({ body }) => {
|
||||||
if (body.status !== 1) return this.getSongList(sortId, tagId, page, ++tryNum)
|
if (body.status !== 1) return this.getSongList(sortId, tagId, page, ++tryNum)
|
||||||
|
@ -120,7 +120,7 @@ export default {
|
||||||
return_min: 6,
|
return_min: 6,
|
||||||
return_max: 15,
|
return_max: 15,
|
||||||
},
|
},
|
||||||
}
|
},
|
||||||
)
|
)
|
||||||
return this._requestObj_listRecommend.promise.then(({ body }) => {
|
return this._requestObj_listRecommend.promise.then(({ body }) => {
|
||||||
if (body.status !== 1) return this.getSongListRecommend(++tryNum)
|
if (body.status !== 1) return this.getSongListRecommend(++tryNum)
|
||||||
|
@ -253,7 +253,7 @@ export default {
|
||||||
this.currentTagInfo.id = tagId
|
this.currentTagInfo.id = tagId
|
||||||
this.currentTagInfo.info = Object.assign({}, info)
|
this.currentTagInfo.info = Object.assign({}, info)
|
||||||
return info
|
return info
|
||||||
})
|
}),
|
||||||
)
|
)
|
||||||
if (!tagId && page === 1 && sortId === this.sortList[0].id) tasks.push(this.getSongListRecommend()) // 如果是所有类别,则顺便获取推荐列表
|
if (!tagId && page === 1 && sortId === this.sortList[0].id) tasks.push(this.getSongListRecommend()) // 如果是所有类别,则顺便获取推荐列表
|
||||||
return Promise.all(tasks).then(([list, info, recommendList]) => {
|
return Promise.all(tasks).then(([list, info, recommendList]) => {
|
||||||
|
|
|
@ -109,7 +109,7 @@ export default {
|
||||||
if (this._requestObj_list) this._requestObj_list.cancelHttp()
|
if (this._requestObj_list) this._requestObj_list.cancelHttp()
|
||||||
if (tryNum > 2) return Promise.reject(new Error('try max num'))
|
if (tryNum > 2) return Promise.reject(new Error('try max num'))
|
||||||
this._requestObj_list = httpFetch(
|
this._requestObj_list = httpFetch(
|
||||||
this.getListUrl(sortId, tagId, page)
|
this.getListUrl(sortId, tagId, page),
|
||||||
)
|
)
|
||||||
return this._requestObj_list.promise.then(({ body }) => {
|
return this._requestObj_list.promise.then(({ body }) => {
|
||||||
if (body.code !== this.successCode) return this.getList(sortId, tagId, page, ++tryNum)
|
if (body.code !== this.successCode) return this.getList(sortId, tagId, page, ++tryNum)
|
||||||
|
|
|
@ -95,7 +95,7 @@ export default {
|
||||||
this.listAdd({ id: 'default', musicInfo: targetSong })
|
this.listAdd({ id: 'default', musicInfo: targetSong })
|
||||||
}
|
}
|
||||||
let targetIndex = this.defaultList.list.findIndex(
|
let targetIndex = this.defaultList.list.findIndex(
|
||||||
s => s.songmid === targetSong.songmid
|
s => s.songmid === targetSong.songmid,
|
||||||
)
|
)
|
||||||
if (targetIndex > -1) {
|
if (targetIndex > -1) {
|
||||||
this.setList({
|
this.setList({
|
||||||
|
|
|
@ -194,7 +194,7 @@ export default {
|
||||||
this.listAdd({ id: 'default', musicInfo: targetSong })
|
this.listAdd({ id: 'default', musicInfo: targetSong })
|
||||||
}
|
}
|
||||||
let targetIndex = this.defaultList.list.findIndex(
|
let targetIndex = this.defaultList.list.findIndex(
|
||||||
s => s.songmid === targetSong.songmid
|
s => s.songmid === targetSong.songmid,
|
||||||
)
|
)
|
||||||
if (targetIndex > -1) {
|
if (targetIndex > -1) {
|
||||||
this.setList({
|
this.setList({
|
||||||
|
|
|
@ -190,7 +190,7 @@ export default {
|
||||||
this.listAdd({ id: 'default', musicInfo: targetSong })
|
this.listAdd({ id: 'default', musicInfo: targetSong })
|
||||||
}
|
}
|
||||||
let targetIndex = this.defaultList.list.findIndex(
|
let targetIndex = this.defaultList.list.findIndex(
|
||||||
s => s.songmid === targetSong.songmid
|
s => s.songmid === targetSong.songmid,
|
||||||
)
|
)
|
||||||
if (targetIndex > -1) {
|
if (targetIndex > -1) {
|
||||||
this.setList({
|
this.setList({
|
||||||
|
|
Loading…
Reference in New Issue