|
@@ -28,7 +28,7 @@ public class PQBaseViewModel: NSObject {
|
|
|
/// - completeHander: completeHander description
|
|
|
/// - Returns: <#description#>
|
|
|
public class func searchBGMListData(_ keyWord: String?, _ pageNum: Int = 1, _ pageSize: Int = 30,videoCount: Int = 0, imageCount: Int = 0, totalDuration: Float64 = 0, completeHander: @escaping (_ bgmList: [PQVoiceModel], _ msg: String?) -> Void) {
|
|
|
- BFNetRequestAdaptor.postRequestData(url: PQENVUtil.shared.materialSearchApi + searchBGMMaterialUrl, parames: ["keyWord": keyWord ?? "", "pageNo": pageNum, "pageSize": pageSize], commonParams: commonParams(), encoding: JSONEncoding.default) { response, _, error, _ in
|
|
|
+ BFNetRequestAdaptor.postRequestData(url: PQENVUtil.shared.materialSearchApi + searchBGMMaterialUrl, parames: ["keyWord": keyWord ?? "", "pageNo": pageNum, "pageSize": pageSize], commonParams: commonParams(), encoding: JSONEncoding.default, isJsonEncodingNormal: true) { response, _, error, _ in
|
|
|
DispatchQueue.global().async {
|
|
|
var bgmList = Array<PQVoiceModel>.init()
|
|
|
if response is NSNull || response == nil {
|
|
@@ -357,7 +357,7 @@ public class PQBaseViewModel: NSObject {
|
|
|
/// 获取白名单设置
|
|
|
/// - Returns: <#description#>
|
|
|
public class func datashowAllowData(completeHander: @escaping (_ isShowInfo: Bool, _ msg: String?) -> Void) {
|
|
|
- BFNetRequestAdaptor.postRequestData(url: PQENVUtil.shared.longvideoapi + datashowAllowUrl, parames: ["mid": getMachineCode()], commonParams: commonParams(), encoding: JSONEncoding.default) { response, _, _, _ in
|
|
|
+ BFNetRequestAdaptor.postRequestData(url: PQENVUtil.shared.longvideoapi + datashowAllowUrl, parames: ["mid": getMachineCode()], commonParams: commonParams(), encoding: JSONEncoding.default, isJsonEncodingNormal: true) { response, _, _, _ in
|
|
|
if response is NSNull || response == nil {
|
|
|
completeHander(false, "获取白名单数据失败")
|
|
|
return
|