|
@@ -858,7 +858,7 @@ class KMMemberCenterManager: NSObject {
|
|
|
for dict1 in result_Array {
|
|
|
var id = ""
|
|
|
var productName = ""
|
|
|
- var price = ""
|
|
|
+ var price = NSNumber(value: 0.0)
|
|
|
var maxDeviceNum = 0
|
|
|
var levels = ""
|
|
|
var platforms = ""
|
|
@@ -866,18 +866,18 @@ class KMMemberCenterManager: NSObject {
|
|
|
var paymentModel = 0
|
|
|
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 }
|
|
|
+ var cnyPrice = NSNumber(value: 0.0)
|
|
|
+ if let token = dict1["id"] { id = token as? String ?? id }
|
|
|
+ if let token = dict1["productName"] { productName = token as? String ?? productName }
|
|
|
+ if let token = dict1["price"] { price = token as? NSNumber ?? price }
|
|
|
+ if let token = dict1["maxDeviceNum"] { maxDeviceNum = token as? Int ?? maxDeviceNum }
|
|
|
+ if let token = dict1["levels"] { levels = token as? String ?? levels }
|
|
|
+ if let token = dict1["platforms"] { platforms = token as? String ?? platforms }
|
|
|
+ if let token = dict1["productLineId"] { productLineId = token as? Int ?? productLineId }
|
|
|
+ if let token = dict1["paymentModel"] { paymentModel = token as? Int ?? paymentModel }
|
|
|
+ if let token = dict1["cycle"] { cycle = token as? Int ?? cycle }
|
|
|
+ if let token = dict1["code"] { code = token as? String ?? code }
|
|
|
+ if let token = dict1["cnyPrice"] { cnyPrice = token as? NSNumber ?? cnyPrice }
|
|
|
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)
|
|
|
}
|
|
@@ -926,7 +926,7 @@ class KMMemberCenterManager: NSObject {
|
|
|
for dict1 in result_Array {
|
|
|
var id = ""
|
|
|
var productName = ""
|
|
|
- var price = ""
|
|
|
+ var price = NSNumber(value: 0.0)
|
|
|
var maxDeviceNum = 0
|
|
|
var levels = ""
|
|
|
var platforms = ""
|
|
@@ -934,10 +934,10 @@ class KMMemberCenterManager: NSObject {
|
|
|
var paymentModel = 0
|
|
|
var cycle = 0
|
|
|
var code = ""
|
|
|
- var cnyPrice = ""
|
|
|
+ var cnyPrice = NSNumber(value: 0.0)
|
|
|
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["price"] { price = token as! NSNumber }
|
|
|
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 }
|
|
@@ -945,7 +945,7 @@ class KMMemberCenterManager: NSObject {
|
|
|
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["cnyPrice"] { cnyPrice = token as! NSNumber }
|
|
|
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)
|
|
|
}
|