let culturalRelicsDataUrl = ip +"/runinto/culturalRelicsData" let models3DDataUrl = ip +"/runinto/models3DData" let introductionDataUrl = ip +"/runinto/introductionData" let paintingModeslDataUrl = ip +"/runinto/paintingModelsData" let paintinggRomanceDataUrl = ip +"/runinto/paintingRomanceData" let stylePredictDataUrl = ip +"/runinto/stylePredictData" /// 介绍接口 let introductionPovider =MoyaProvider<IntroductionAPI>()
enumIntroductionAPI{ case culturalRelicsData case models3DData case introductionData case paintingModeslData case paintinggRomanceData case stylePredictData }
var path: String { switchself { case .culturalRelicsData: return"/runinto/culturalRelicsData" case .models3DData: return"/runinto/models3DData" case .introductionData: return"/runinto/introductionData" case .paintingModeslData: return"/runinto/paintingModelsData" case .paintinggRomanceData: return"/runinto/paintingRomanceData" case .stylePredictData: return"/runinto/stylePredictData" } }
var method: Moya.Method { return .get } var task: Task { let parameters: [String: Any] = [:] return .requestParameters(parameters: parameters, encoding: URLEncoding.default) }
var sampleData: Data { return"".data(using: .utf8)!} var headers: [String: String]? { returnnil } }