pull/1420/head
parent
1cbe46dc3b
commit
851851a7e6
|
@ -1,6 +1,7 @@
|
|||
import { httpFetch } from '../../request'
|
||||
import { decodeName, formatPlayTime, sizeFormate } from '../../index'
|
||||
import { formatSingerName } from '@renderer/utils/musicSdk/utils'
|
||||
import { formatSingerName } from '../utils'
|
||||
|
||||
|
||||
export default {
|
||||
limit: 30,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { formatSingerName } from '@renderer/utils/musicSdk/utils'
|
||||
import { decodeName, formatPlayTime, sizeFormate } from '../../index'
|
||||
import { signatureParams, createHttpFetch } from './util'
|
||||
import { formatSingerName } from '../../utils'
|
||||
|
||||
export default {
|
||||
limit: 30,
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import { httpFetch } from '../../request'
|
||||
import { sizeFormate, formatPlayTime } from '../../index'
|
||||
import { toMD5 } from '../utils'
|
||||
import { formatSingerName } from '@renderer/utils/musicSdk/utils'
|
||||
import { toMD5, formatSingerName } from '../utils'
|
||||
|
||||
const sign = (time, str) => {
|
||||
const deviceId = '963B7AA0D21511ED807EE5846EC87D20'
|
||||
|
|
|
@ -119,7 +119,7 @@ export default {
|
|||
this._requestObj_list = httpFetch(
|
||||
this.getListUrl(sortId, tagId, page),
|
||||
)
|
||||
console.log(this.getListUrl(sortId, tagId, page))
|
||||
// console.log(this.getListUrl(sortId, tagId, page))
|
||||
return this._requestObj_list.promise.then(({ body }) => {
|
||||
if (body.code !== this.successCode) return this.getList(sortId, tagId, page, ++tryNum)
|
||||
return tagId ? this.filterList2(body.playlist.data, page) : this.filterList(body.playlist.data, page)
|
||||
|
|
|
@ -37,13 +37,7 @@ export const dnsLookup = (hostname, options, callback) => {
|
|||
* @param join 歌手分割字符
|
||||
*/
|
||||
export const formatSingerName = (singers, nameKey = 'name', join = '、') => {
|
||||
if (typeof singers == 'string') {
|
||||
try {
|
||||
singers = JSON.parse(singers)
|
||||
} catch (err) {
|
||||
return decodeName(singers)
|
||||
}
|
||||
} else if (Array.isArray(singers)) {
|
||||
if (Array.isArray(singers)) {
|
||||
const singer = []
|
||||
singers.forEach(item => {
|
||||
let name = item[nameKey]
|
||||
|
|
Loading…
Reference in New Issue