pull/1420/head
lyswhut 2023-05-01 11:47:34 +08:00
parent 1cbe46dc3b
commit 851851a7e6
5 changed files with 6 additions and 12 deletions

View File

@ -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,

View File

@ -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,

View File

@ -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'

View File

@ -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)

View File

@ -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]