Commit aaaac4f0 authored by lujunye's avatar lujunye

修复显示bug

parent e6eefa72
...@@ -436,6 +436,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo ...@@ -436,6 +436,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
let UserToken = UserDefaults.standard.value(forKey: "user_token") let UserToken = UserDefaults.standard.value(forKey: "user_token")
goodsDetail(["user_token":UserToken,"goods_id":goods_id], success: { (data) in goodsDetail(["user_token":UserToken,"goods_id":goods_id], success: { (data) in
//MARK: - 获取详情 //MARK: - 获取详情
self.listTbv.isHidden = false
let model = data as! GoodsDetailModel let model = data as! GoodsDetailModel
self.goodsDetailModel = model self.goodsDetailModel = model
//商品名 //商品名
...@@ -671,7 +672,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo ...@@ -671,7 +672,7 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
navbar.title = "商品详情" navbar.title = "商品详情"
self.view.addSubview(navbar) self.view.addSubview(navbar)
SetTopFrameView(view: listTbv, btmView: btmBtnBGView) SetTopFrameView(view: listTbv, btmView: btmBtnBGView)
listTbv.isHidden = true
loadData() loadData()
self.listTbv.separatorStyle = .none self.listTbv.separatorStyle = .none
...@@ -689,11 +690,15 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo ...@@ -689,11 +690,15 @@ class EPViewController: BaseViewController,UITableViewDelegate,UITableViewDataSo
} }
func getResponseArr(str:String)->Array<String>{ func getResponseArr(str:String)->Array<String>{
let a = str.replacingOccurrences(of: "{", with: "")
let b = a.replacingOccurrences(of: "}", with: "") let dict = getDictionaryFromJSONString(jsonString: str)
let c = b.replacingOccurrences(of: ":", with: "_") var arr:Array<String> = []
let d = c.replacingOccurrences(of: "\"", with: "") for key in dict.allKeys{
return d.components(separatedBy: ",") let k = key as! String
let str = k + "_" + (dict[k] as! String)
arr.append(str)
}
return arr
} }
//MARK: - cell delegate //MARK: - cell delegate
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
......
...@@ -414,6 +414,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl ...@@ -414,6 +414,7 @@ class CreatNewSpecsViewController: BaseViewController,UITableViewDelegate,UITabl
} }
if item != "" { if item != "" {
//MARK:--阶梯价格切割 //MARK:--阶梯价格切割
// print("sjklasd",item)
let arr = item.components(separatedBy: "_") let arr = item.components(separatedBy: "_")
cell.priceTF.text = arr[0] cell.priceTF.text = arr[0]
cell.countTF.text = arr[1] cell.countTF.text = arr[1]
......
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