/statistic/appdatacollection/saveAppData 接口添加完毕
This commit is contained in:
parent
35621dd1c3
commit
5ebfe28e24
Binary file not shown.
@ -33,13 +33,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
|
|||||||
|
|
||||||
configureFireBase()
|
configureFireBase()
|
||||||
|
|
||||||
do {
|
// do {
|
||||||
try AVAudioSession.sharedInstance().setActive(true)
|
// try AVAudioSession.sharedInstance().setActive(true)
|
||||||
try AVAudioSession.sharedInstance().setCategory(.playback,options: .allowAirPlay)
|
// try AVAudioSession.sharedInstance().setCategory(.playback,options: .allowAirPlay)
|
||||||
}
|
// }
|
||||||
catch {
|
// catch {
|
||||||
print("err: set audiosession:\(error)")
|
// print("err: set audiosession:\(error)")
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
SVProgressHUD.setDefaultStyle(.dark)
|
SVProgressHUD.setDefaultStyle(.dark)
|
||||||
|
|||||||
@ -29,11 +29,12 @@ class ZNetUtil: NSObject {
|
|||||||
var request = URLRequest(url: url)
|
var request = URLRequest(url: url)
|
||||||
request.httpMethod = "POST"
|
request.httpMethod = "POST"
|
||||||
let comParams = getComParams()
|
let comParams = getComParams()
|
||||||
var nparams = params.merging(comParams) { va, ke in
|
let nparams = params.merging(comParams) { va, ke in
|
||||||
|
|
||||||
}
|
}
|
||||||
request.httpBody = try? JSONSerialization.data(withJSONObject: nparams, options: [])
|
let bodyData = try? JSONSerialization.data(withJSONObject: nparams, options: [])
|
||||||
|
request.httpBody = bodyData
|
||||||
|
request.addValue("application/json", forHTTPHeaderField: "Content-Type")
|
||||||
let dataTask = URLSession.shared.dataTask(with: request) { data, response, error in
|
let dataTask = URLSession.shared.dataTask(with: request) { data, response, error in
|
||||||
if let error = error {
|
if let error = error {
|
||||||
print("Error:", error)
|
print("Error:", error)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user