Commit 3cbba7bae7069c7ebd64b42da7ad0166f69ab035

Authored by “张旭”
1 parent 9465d7c9

部分 认证-电商的身份判断

metaCode/Classes/Main/HomePage/Controller/AuthMainController/CNMetaCodeHomePageController.swift
... ... @@ -396,6 +396,11 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
396 396 }else{
397 397 bannerView?.baseScrollView.isScrollEnabled = true
398 398 }
  399 +
  400 + //未认证&要显示的是电商
  401 + if identityModel.id == 9{
  402 + self.getApplyShopInfo()
  403 + }
399 404 }
400 405  
401 406 bannerView?.superScrollView = flowView.scrollView
... ... @@ -617,14 +622,13 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
617 622 self.NetApiStatus = .success
618 623 let listArray:NSArray = (result as! StandListBaseModel).list as NSArray
619 624 if (listArray.count > 0){
620   -// self.addCertificationView.isHidden = true
621   -// self.addCertificationView.removeFromSuperview()
  625 +
622 626 self.dataArray = NSMutableArray.init()
623 627 self.dataArray.addObjects(from: listArray as! [Any])
624 628 self.addPageView()
625 629  
626   -// self.identityStatus = .haveBeenCertified
627 630 self.backgroupView.updateData(idArray: listArray as! Array<StandListModel>)
  631 +
628 632 }else{
629 633 self.NetApiStatus = .apiError
630 634 // self.identityStatus = .notCertified
... ... @@ -639,6 +643,32 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
639 643 }
640 644 }
641 645  
  646 + func getApplyShopInfo(){
  647 + //获取当前店铺审核状态
  648 + CNLiveMineViewModel.requestApplyShopInfo { [weak self] result, respStatue in
  649 + if respStatue == .success{
  650 + let shopModel = result as! MineApplyShopInfoModel
  651 +// if shopModel.state == "0" || shopModel.state == "4"{
  652 +// //0未申请 //4闭店
  653 +// //未认证->店铺认证
  654 +//
  655 +// }else if shopModel.state == "1"{
  656 +// //开店
  657 +// //已认证->显示卡片
  658 +// }else if shopModel.state == "2"{
  659 +// //申请中
  660 +// //"资料审核中"
  661 +// }else if shopModel.state == "3"{
  662 +// //已拒绝
  663 +// //"重新修改提交"
  664 +// }
  665 + self!.dataArray.forEach {listModel in
  666 + let model = listModel as! StandListModel
  667 + model.shopStatus = shopModel.state
  668 + }
  669 + }
  670 + }
  671 + }
642 672 //无网络,接口失败 配置
643 673 func notNetworkSetting(){
644 674 switch NetApiStatus{
... ...
metaCode/Classes/Main/HomePage/View/VerticalViews/MainView/CNMainView.swift
... ... @@ -61,6 +61,14 @@ class CNFrontMainView : UIView{
61 61 make.height.equalTo(30)
62 62 }
63 63  
  64 + frontDescContentView.addSubview(self.addStandBtn)
  65 + addStandBtn.snp.makeConstraints { make in
  66 + make.centerX.equalToSuperview()
  67 + make.bottom.equalToSuperview().offset(-30)
  68 + make.width.equalTo(150)
  69 + make.height.equalTo(39)
  70 + }
  71 +
64 72 frontDescContentView.addSubview(self.personalStandBtn)
65 73 personalStandBtn.snp.makeConstraints { make in
66 74 make.right.equalToSuperview().offset(-self.width/2)
... ... @@ -112,6 +120,19 @@ class CNFrontMainView : UIView{
112 120 return textView
113 121 }()
114 122  
  123 + ///未认证-点击添加身份 按钮
  124 + lazy var addStandBtn: UIButton = {
  125 + let addStandBtn = UIButton(type: .custom)
  126 + addStandBtn.clipsToBounds = true
  127 + addStandBtn.layer.cornerRadius = 19.5
  128 + addStandBtn.backgroundColor = HexColor("#004FE0")
  129 + addStandBtn.setTitle("店铺认证", for: .normal)
  130 + addStandBtn.setTitleColor(.white, for: .normal)
  131 + addStandBtn.titleLabel?.font = UIFont.init(name: "PingFangSC-Medium", size: 14)
  132 + addStandBtn.addTarget(self, action: #selector(addStandBtnAction), for: .touchUpInside)
  133 + return addStandBtn
  134 + }()
  135 +
115 136 ///未认证-个人认证 按钮
116 137 lazy var personalStandBtn: UIButton = {
117 138 let personalStandBtn = UIButton(type: .custom)
... ... @@ -228,10 +249,17 @@ class CNFrontMainView : UIView{
228 249 //电商 ,隐藏上滑下滑gif
229 250 upMoreGIF.isHidden = true
230 251 downMoreGIF.isHidden = true
  252 + self.addStandBtn.backgroundColor = HexColor(newValue!.backgroundColor)
  253 + self.addStandBtn.isHidden = false
  254 + self.personalStandBtn.isHidden = true
  255 + self.enterpriseStandBtn.isHidden = true
231 256 }else{
232 257 //非电商 ,显示上滑下滑gif
233 258 upMoreGIF.isHidden = false
234 259 downMoreGIF.isHidden = false
  260 + self.addStandBtn.isHidden = true
  261 + self.personalStandBtn.isHidden = false
  262 + self.enterpriseStandBtn.isHidden = false
235 263 }
236 264  
237 265 //个人认证,企业认证
... ... @@ -259,6 +287,10 @@ class CNFrontMainView : UIView{
259 287 tapTransformAciton!()
260 288 }
261 289  
  290 + @objc func addStandBtnAction() {
  291 + //跳转到电商认证页面
  292 + self.pushStandVC()
  293 + }
262 294 @objc func personalStandBtnAction() {
263 295 //跳转到 个人认证页面
264 296 self.pushStandVC()
... ...