Commit 2eee3612 authored by lujunye's avatar lujunye

修复bug

parent e16d0f5e
......@@ -1221,15 +1221,25 @@ class ProductDetailViewController: BaseViewController,UITableViewDelegate,UITabl
var model : GuiGeModel? = nil
var skuArr:Array<Any> = []
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 {
let peiceP = Float(md.price)! //第n个售价(n > 1)
let peiceP = Float(pData)! //第n个售价(n > 1)
if peiceP < price {
price = peiceP
model = md
}
}else {
price = Float(md.price)! //第一个售价
price = Float(pData)! //第一个售价
model = md
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