|
@@ -867,17 +867,17 @@ class KMMemberCenterManager: NSObject {
|
|
|
var cycle = 0
|
|
|
var code = ""
|
|
|
var cnyPrice = ""
|
|
|
- if let token = dict1["id"] { id = token as! String }
|
|
|
- if let token = dict1["productName"] { productName = token as! String }
|
|
|
- if let token = dict1["price"] { price = token as! String }
|
|
|
- if let token = dict1["maxDeviceNum"] { maxDeviceNum = token as! Int }
|
|
|
- if let token = dict1["levels"] { levels = token as! String }
|
|
|
- if let token = dict1["platforms"] { platforms = token as! String }
|
|
|
- if let token = dict1["productLineId"] { productLineId = token as! Int }
|
|
|
- if let token = dict1["paymentModel"] { paymentModel = token as! Int }
|
|
|
- if let token = dict1["cycle"] { cycle = token as! Int }
|
|
|
- if let token = dict1["code"] { code = token as! String }
|
|
|
- if let token = dict1["cnyPrice"] { cnyPrice = token as! String }
|
|
|
+ if let token = dict1["id"] as? String { id = token }
|
|
|
+ if let token = dict1["productName"] as? String { productName = token }
|
|
|
+ if let token = dict1["price"] as? Double { price = String(format: "%.2f", token) }
|
|
|
+ if let token = dict1["maxDeviceNum"] as? Int { maxDeviceNum = token }
|
|
|
+ if let token = dict1["levels"] as? String { levels = token }
|
|
|
+ if let token = dict1["platforms"] as? String { platforms = token }
|
|
|
+ if let token = dict1["productLineId"] as? Int { productLineId = token }
|
|
|
+ if let token = dict1["paymentModel"] as? Int { paymentModel = token }
|
|
|
+ if let token = dict1["cycle"] as? Int { cycle = token }
|
|
|
+ if let token = dict1["code"] as? String { code = token }
|
|
|
+ if let token = dict1["cnyPrice"] as? String { cnyPrice = token }
|
|
|
let products = KMListingProductsModel(id: id, productName: productName, price: price, maxDeviceNum: maxDeviceNum, levels: levels, platforms: platforms, productLineId: productLineId, paymentModel: paymentModel, cycle: cycle, code: code, cnyPrice: cnyPrice)
|
|
|
results.append(products)
|
|
|
}
|