Commit 2eee3612 authored by lujunye's avatar lujunye

修复bug

parent e16d0f5e
...@@ -1221,15 +1221,25 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl ...@@ -1221,15 +1221,25 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
var model : GuiGeModel? = nil var model : GuiGeModel? = nil
var skuArr:Array<Any> = [] var skuArr:Array<Any> = []
dataArr.forEach { (md) in dataArr.forEach { (md) in
if isPurnNumber(str: md.price) {
var pData = ""
if md.price.contains(","){
let arr = md.price.components(separatedBy: ",")
pData = arr.joined(separator: "")
}else{
pData = md.price
}
if isPurnNumber(str: pData) {
if isgetP { if isgetP {
let peiceP = Float(md.price)! //第n个售价(n > 1) let peiceP = Float(pData)! //第n个售价(n > 1)
if peiceP < price { if peiceP < price {
price = peiceP price = peiceP
model = md model = md
} }
}else { }else {
price = Float(md.price)! //第一个售价 price = Float(pData)! //第一个售价
model = md model = md
isgetP = true isgetP = true
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment