Commit 11658a08 authored by lujunye's avatar lujunye

商家信息点击查看图片

parent 03ea462f
...@@ -31,7 +31,6 @@ class ShopInfoViewController: BaseViewController { ...@@ -31,7 +31,6 @@ class ShopInfoViewController: BaseViewController {
shopInfo(["user_token":UserToken as Any], success: { (data) in shopInfo(["user_token":UserToken as Any], success: { (data) in
self.dataModel = (data as! ShopInfoModel) self.dataModel = (data as! ShopInfoModel)
// self.shopImgV.kf.setImage(with: URL(string: SERVERCE_ImageHost + (self.dataModel?.data?.shop_img)!))
self.shopNameLbl.text = self.dataModel?.data?.shop_name self.shopNameLbl.text = self.dataModel?.data?.shop_name
self.compAddressLbl.text = self.dataModel?.data?.addr_str self.compAddressLbl.text = self.dataModel?.data?.addr_str
self.addressDetLbl.text = self.dataModel?.data?.address self.addressDetLbl.text = self.dataModel?.data?.address
...@@ -65,16 +64,46 @@ class ShopInfoViewController: BaseViewController { ...@@ -65,16 +64,46 @@ class ShopInfoViewController: BaseViewController {
leftChangeImgBtn.setImage(UIImage.init(named: "idCard3"), for: .normal) leftChangeImgBtn.setImage(UIImage.init(named: "idCard3"), for: .normal)
} }
@IBAction func checkBtnAction(_ sender: UIButton) { @IBAction func checkBtnAction(_ sender: UIButton) {
let browser = JXPhotoBrowser()
browser.numberOfItems = {
1
}
var url:URL?
print("查看==\(sender.tag)") print("查看==\(sender.tag)")
if sender.tag == 1001 { if sender.tag == 1001 {
//商家协议 //商家协议
url = URL(string:SERVERCE_ImageHost + (self.dataModel?.data?.agreement)!)
print(SERVERCE_ImageHost + (self.dataModel?.data?.agreement)!)
browser.reloadCellAtIndex = { context in
let browserCell = context.cell as? JXPhotoBrowserImageCell
// 用SDWebImage加载
browserCell?.imageView.sd_setImage(with: url, placeholderImage: nil, options: [], completed: { (_, _, _, _) in
browserCell?.setNeedsLayout()
})
}
}else if sender.tag == 1002 { }else if sender.tag == 1002 {
//营业执照电子版: //营业执照电子版:
url = URL(string:SERVERCE_ImageHost + (self.dataModel?.data?.zhizhao)!)
browser.reloadCellAtIndex = { context in
let browserCell = context.cell as? JXPhotoBrowserImageCell
// 用SDWebImage加载
browserCell?.imageView.sd_setImage(with: url, placeholderImage: nil, options: [], completed: { (_, _, _, _) in
browserCell?.setNeedsLayout()
})
}
}else if sender.tag == 1003 { }else if sender.tag == 1003 {
//流通许可证: //流通许可证:
url = URL(string:SERVERCE_ImageHost + (self.dataModel?.data?.food_production_license)!)
browser.reloadCellAtIndex = { context in
let browserCell = context.cell as? JXPhotoBrowserImageCell
// 用SDWebImage加载
browserCell?.imageView.sd_setImage(with: url, placeholderImage: nil, options: [], completed: { (_, _, _, _) in
browserCell?.setNeedsLayout()
})
}
} }
browser.show()
} }
@IBOutlet weak var leftChangeImgBtn: UIButton! @IBOutlet weak var leftChangeImgBtn: UIButton!
......
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