|
@@ -14,8 +14,40 @@ class ViewController: UIViewController {
|
|
|
override func viewDidLoad() {
|
|
|
super.viewDidLoad()
|
|
|
// Do any additional setup after loading the view, typically from a nib.
|
|
|
+ BFNetRequestAdaptor.postRequestData(url: "https://speed.piaoquantv.com/longvideoapi/sys/app/config", parames: nil,commonParams: commonParams()) { respose, extData, error, duration in
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ public func commonParams() -> [String: Any] {
|
|
|
+ let model = UIDevice.current.model
|
|
|
+ let systemName = UIDevice.current.systemName
|
|
|
+ let systemVersion = UIDevice.current.systemVersion
|
|
|
+ let localizedModel = UIDevice.current.localizedModel
|
|
|
+ let machineInfo: [String: Any] = [
|
|
|
+ "model": model, "system": systemName + " " + systemVersion, "brand": localizedModel, "platform": "iOS", "networkType": SWNetRequest.networkStatusDescription(), "clientIp": SWNetRequest.ipAddressDescription(),
|
|
|
+ ]
|
|
|
+ let commParams: [String: Any] = [
|
|
|
+ "appVersionCode": "1.1.0",
|
|
|
+ "versionCode": "1.1.0",
|
|
|
+ "system": systemName + " " + systemVersion,
|
|
|
+ "systemVersion": systemName + " " + systemVersion,
|
|
|
+ "appType": 13,
|
|
|
+ "appId": 111111,
|
|
|
+ "machineCode": "getMachineCode()sdsdsdsdsd",
|
|
|
+ "networkType": SWNetRequest.networkStatusDescription(),
|
|
|
+ "ipAddress": SWNetRequest.ipAddressDescription(),
|
|
|
+ "clientTimestamp": Int64(Date().timeIntervalSince1970 * 1000),
|
|
|
+ "platform": "iOS",
|
|
|
+ "versionName": "1.1.0",
|
|
|
+ // "sessionId": PQSingletoMemoryUtil.shared.sessionId,
|
|
|
+ // "subSessionId": PQSingletoMemoryUtil.shared.subSessionid ?? PQSingletoMemoryUtil.shared.sessionId,
|
|
|
+ "mid": "getMachineCode()sdsdsdsdsd",
|
|
|
+ "machineInfo": "",
|
|
|
+ // "abInfoData": dictionaryToJsonString(PQSingletoMemoryUtil.shared.abInfoData) ?? "",
|
|
|
+ "requestId": "423232323232323",
|
|
|
+ "idfv": UIDevice.current.identifierForVendor?.uuidString ?? ""]
|
|
|
+ return commParams
|
|
|
}
|
|
|
-
|
|
|
override func didReceiveMemoryWarning() {
|
|
|
super.didReceiveMemoryWarning()
|
|
|
// Dispose of any resources that can be recreated.
|