Commit 27efd6f590a148bef891cd3ad7fbed52fd00c072

Authored by liushiyu
2 parents 81737d08 3bfa39f9
metaCode/Classes/Common/Base/CNLiveBaseTabBarViewController.swift
@@ -36,12 +36,6 @@ class CNLiveBaseTabBarViewController: UITabBarController @@ -36,12 +36,6 @@ class CNLiveBaseTabBarViewController: UITabBarController
36 self.setupBackgroup() 36 self.setupBackgroup()
37 } 37 }
38 38
39 -// override func viewWillAppear(_ animated: Bool) {  
40 -// super.viewWillAppear(animated)  
41 -//  
42 -// self.selectedIndex = 0  
43 -//  
44 -// }  
45 override func viewDidAppear(_ animated: Bool) { 39 override func viewDidAppear(_ animated: Bool) {
46 super.viewDidAppear(animated) 40 super.viewDidAppear(animated)
47 print("获取用户用户数据=====>\(UserInfoManager.shared.userInfo.uid)") 41 print("获取用户用户数据=====>\(UserInfoManager.shared.userInfo.uid)")
@@ -58,9 +52,9 @@ class CNLiveBaseTabBarViewController: UITabBarController @@ -58,9 +52,9 @@ class CNLiveBaseTabBarViewController: UITabBarController
58 // MARK: - 控制器的信息 52 // MARK: - 控制器的信息
59 func setUpTabBar() { 53 func setUpTabBar() {
60 54
61 - let homeVC = CNLiveAuthViewController()  
62 - let authVC = CNMetaCodeHomePageController()  
63 - let mineVC = CNLiveMineViewController() 55 + let homeVC = CNLiveAuthViewController.init()
  56 + let authVC = CNMetaCodeHomePageController.init()
  57 + let mineVC = CNLiveMineViewController.init()
64 58
65 creatTabbarView(viewController: homeVC, image: "tabbar_hoem_icon_default", selectImage: "tabbar_hoem_icon_selected", title: "首页") 59 creatTabbarView(viewController: homeVC, image: "tabbar_hoem_icon_default", selectImage: "tabbar_hoem_icon_selected", title: "首页")
66 creatTabbarView(viewController: authVC, image: "tabbar_authentication_unSelect", selectImage: "tabbar_authentication", title: "认证") 60 creatTabbarView(viewController: authVC, image: "tabbar_authentication_unSelect", selectImage: "tabbar_authentication", title: "认证")
@@ -74,6 +68,11 @@ class CNLiveBaseTabBarViewController: UITabBarController @@ -74,6 +68,11 @@ class CNLiveBaseTabBarViewController: UITabBarController
74 CNLiveBaseNavigationController(rootViewController: mineVC) 68 CNLiveBaseNavigationController(rootViewController: mineVC)
75 ] 69 ]
76 70
  71 + //提前加载认证的viewDidLoad,但是会走两遍
  72 + DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
  73 + authVC.viewDidLoad()
  74 + }
  75 +
77 } 76 }
78 77
79 // MARK: - Tabar 背景图 78 // MARK: - Tabar 背景图
metaCode/Classes/Main/HomePage/Controller/AuthMainController/CNMetaCodeHomePageController.swift
@@ -396,6 +396,11 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel @@ -396,6 +396,11 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
396 }else{ 396 }else{
397 bannerView?.baseScrollView.isScrollEnabled = true 397 bannerView?.baseScrollView.isScrollEnabled = true
398 } 398 }
  399 +
  400 + //未认证&要显示的是电商
  401 + if identityModel.id == 9{
  402 + self.getApplyShopInfo()
  403 + }
399 } 404 }
400 405
401 bannerView?.superScrollView = flowView.scrollView 406 bannerView?.superScrollView = flowView.scrollView
@@ -617,14 +622,30 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel @@ -617,14 +622,30 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
617 self.NetApiStatus = .success 622 self.NetApiStatus = .success
618 let listArray:NSArray = (result as! StandListBaseModel).list as NSArray 623 let listArray:NSArray = (result as! StandListBaseModel).list as NSArray
619 if (listArray.count > 0){ 624 if (listArray.count > 0){
620 -// self.addCertificationView.isHidden = true  
621 -// self.addCertificationView.removeFromSuperview() 625 +
622 self.dataArray = NSMutableArray.init() 626 self.dataArray = NSMutableArray.init()
623 self.dataArray.addObjects(from: listArray as! [Any]) 627 self.dataArray.addObjects(from: listArray as! [Any])
624 self.addPageView() 628 self.addPageView()
625 629
626 -// self.identityStatus = .haveBeenCertified  
627 self.backgroupView.updateData(idArray: listArray as! Array<StandListModel>) 630 self.backgroupView.updateData(idArray: listArray as! Array<StandListModel>)
  631 +
  632 + //请求身份详情,判断是企业认证还是个人认证
  633 + listArray.forEach { standListModel in
  634 + let listModel = standListModel as! StandListModel
  635 + if listModel.auth{
  636 + //已认证
  637 + listModel.isPersonOrEnterprise = 3
  638 + }else{
  639 + //未认证
  640 + self.getStandInfo(identityId: "\(listModel.id)")
  641 +// if self.unStandModelArray.contains(listModel){
  642 +//
  643 +// }else{
  644 +// self.unStandModelArray.add(listModel)
  645 +// }
  646 + }
  647 + }
  648 +
628 }else{ 649 }else{
629 self.NetApiStatus = .apiError 650 self.NetApiStatus = .apiError
630 // self.identityStatus = .notCertified 651 // self.identityStatus = .notCertified
@@ -639,6 +660,77 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel @@ -639,6 +660,77 @@ class CNMetaCodeHomePageController:CNLiveBaseViewController, NewPagedFlowViewDel
639 } 660 }
640 } 661 }
641 662
  663 + // MARK: - 获取身份信息是个人认证还是企业认证
  664 + func getStandInfo(identityId:String){
  665 + CNLiveMineViewModel.requestsStandInfo(identityId: identityId, type: .effect, authType: .person) { result, respStatue in
  666 + hiddenLoading()
  667 + if respStatue == .success{
  668 + let standInfoBaseModel = result as! MineStandInfoBaseModel
  669 + if standInfoBaseModel.authInfos.count > 0{
  670 + //个人认证有值
  671 + if standInfoBaseModel.enterpriseAuthInfos.count > 0{
  672 + //企业认证有值
  673 + self.dataArray.forEach { standListModel in
  674 + let listModel = standListModel as! StandListModel
  675 + if listModel.id == standInfoBaseModel.identityId{
  676 + //目标model,企业+个人
  677 + listModel.isPersonOrEnterprise = 0
  678 + }
  679 + }
  680 +
  681 + }else{
  682 + //企业认证没值
  683 + //只显示个人
  684 + self.dataArray.forEach { standListModel in
  685 + let listModel = standListModel as! StandListModel
  686 + if listModel.id == standInfoBaseModel.identityId{
  687 + //目标model ,个人
  688 + listModel.isPersonOrEnterprise = 1
  689 + }
  690 + }
  691 + }
  692 +
  693 + }else if standInfoBaseModel.enterpriseAuthInfos.count > 0{
  694 + //企业认证有值,个人没值
  695 + //只显示企业
  696 + self.dataArray.forEach { standListModel in
  697 + let listModel = standListModel as! StandListModel
  698 + if listModel.id == standInfoBaseModel.identityId{
  699 + //目标model ,企业
  700 + listModel.isPersonOrEnterprise = 2
  701 + }
  702 + }
  703 +
  704 + }else{
  705 + //企业个人都没值
  706 + self.dataArray.forEach { standListModel in
  707 + let listModel = standListModel as! StandListModel
  708 + if listModel.id == standInfoBaseModel.identityId{
  709 + //目标model ,已认证/无企业和个人
  710 + listModel.isPersonOrEnterprise = 3
  711 + }
  712 + }
  713 + }
  714 + self.pageFlowView.reloadData()
  715 + }else{
  716 + //网络请求失败
  717 + }
  718 + }
  719 + }
  720 +
  721 + // MARK: - 获取电商状态
  722 + func getApplyShopInfo(){
  723 + //获取当前店铺审核状态
  724 + CNLiveMineViewModel.requestApplyShopInfo { [weak self] result, respStatue in
  725 + if respStatue == .success{
  726 + let shopModel = result as! MineApplyShopInfoModel
  727 + self!.dataArray.forEach {listModel in
  728 + let model = listModel as! StandListModel
  729 + model.shopStatus = shopModel.state
  730 + }
  731 + }
  732 + }
  733 + }
642 //无网络,接口失败 配置 734 //无网络,接口失败 配置
643 func notNetworkSetting(){ 735 func notNetworkSetting(){
644 switch NetApiStatus{ 736 switch NetApiStatus{
metaCode/Classes/Main/HomePage/View/VerticalViews/DownSlide/CNLiveDownSlideTodayRecommendCell.swift
@@ -51,7 +51,7 @@ class CNLiveDownSlideTodayRecommendCell: UITableViewCell { @@ -51,7 +51,7 @@ class CNLiveDownSlideTodayRecommendCell: UITableViewCell {
51 for i in 0..<totalNum{//i是第几行 51 for i in 0..<totalNum{//i是第几行
52 let contentMdl = model.contents[i] 52 let contentMdl = model.contents[i]
53 let imageView = UIImageView(frame: CGRectMake(DownSlideRecommendLeftGap, CGFloat(i)*(DownSlideTodayRecommendH+DownSlideRecommendLeftGap), CGFloat(DownSlideTodayRecommendW), CGFloat(DownSlideTodayRecommendH))) 53 let imageView = UIImageView(frame: CGRectMake(DownSlideRecommendLeftGap, CGFloat(i)*(DownSlideTodayRecommendH+DownSlideRecommendLeftGap), CGFloat(DownSlideTodayRecommendW), CGFloat(DownSlideTodayRecommendH)))
54 - imageView.kf.setImage(with: URL(string:contentMdl.poster!)) 54 + imageView.kf.setImage(with: URL(string:contentMdl.poster ?? ""))
55 imageView.tag = i 55 imageView.tag = i
56 imageView.layer.cornerRadius = 12 56 imageView.layer.cornerRadius = 12
57 imageView.clipsToBounds = true 57 imageView.clipsToBounds = true
metaCode/Classes/Main/HomePage/View/VerticalViews/MainView/CNIDCardView.swift
@@ -17,16 +17,7 @@ class CNIDCardView: UIView{ @@ -17,16 +17,7 @@ class CNIDCardView: UIView{
17 } 17 }
18 set{ 18 set{
19 _idModel = newValue 19 _idModel = newValue
20 - iDCardBGView.kf.setImage(with: URL(string: _idModel!.cardImg), placeholder: UIImage(named: "homePage_idCardBG"))  
21 - nameLabel.textColor = HexColor("\(_idModel!.backgroundColor)")  
22 - sexLabel.textColor = HexColor("\(_idModel!.backgroundColor)")  
23 - dateLabel.textColor = HexColor("\(_idModel!.backgroundColor)")  
24 - IDLabel.textColor = HexColor("\(_idModel!.backgroundColor)")  
25 - nameValueLabel.textColor = HexColor("\(_idModel!.backgroundColor)")  
26 - sexValueLabel.textColor = HexColor("\(_idModel!.backgroundColor)")  
27 - dateValueLabel.textColor = HexColor("\(_idModel!.backgroundColor)")  
28 - IDValueLabel.textColor = HexColor("\(_idModel!.backgroundColor)")  
29 - 20 + self.iDCardBGView.kf.setImage(with: URL(string: _idModel!.cardImg), placeholder: UIImage(named: "homePage_idCardBG"))
30 self.loadIDDetailData() 21 self.loadIDDetailData()
31 } 22 }
32 } 23 }
@@ -34,7 +25,6 @@ class CNIDCardView: UIView{ @@ -34,7 +25,6 @@ class CNIDCardView: UIView{
34 override init(frame: CGRect) { 25 override init(frame: CGRect) {
35 super.init(frame: frame) 26 super.init(frame: frame)
36 self.initUI() 27 self.initUI()
37 - self.makeConstraints()  
38 } 28 }
39 29
40 required init?(coder: NSCoder) { 30 required init?(coder: NSCoder) {
@@ -44,51 +34,61 @@ class CNIDCardView: UIView{ @@ -44,51 +34,61 @@ class CNIDCardView: UIView{
44 func initUI() 34 func initUI()
45 { 35 {
46 self.addSubview(self.contentView) 36 self.addSubview(self.contentView)
47 - self.contentView.addSubview(self.iDCardBGView)  
48 - self.contentView.addSubview(self.nameLabel)  
49 - self.contentView.addSubview(self.sexLabel)  
50 - self.contentView.addSubview(self.dateLabel)  
51 - self.contentView.addSubview(self.IDLabel)  
52 - self.contentView.addSubview(self.nameValueLabel)  
53 - self.contentView.addSubview(self.sexValueLabel)  
54 - self.contentView.addSubview(self.dateValueLabel)  
55 - self.contentView.addSubview(self.IDValueLabel)  
56 - self.contentView.addSubview(self.iDIconImgView)  
57 - 37 + self.contentView.snp.makeConstraints { make in
  38 + make.centerX.equalToSuperview()
  39 + make.centerY.equalToSuperview()
  40 + make.width.equalToSuperview()
  41 + make.height.equalToSuperview()
  42 + }
  43 + self.addSubview(self.iDCardBGView)
  44 + self.iDCardBGView.snp.makeConstraints { make in
  45 + make.centerX.equalToSuperview()
  46 + make.centerY.equalToSuperview()
  47 + make.width.equalToSuperview()
  48 + make.height.equalToSuperview()
  49 + }
58 } 50 }
59 51
60 func loadIDDetailData(){ 52 func loadIDDetailData(){
61 // showLoading(message: "") 53 // showLoading(message: "")
62 - CNLiveMineViewModel.requestsStandInfo(identityId: "\(_idModel!.id)", type: .havedate, authType: .person) { result, respStatue in 54 + self.subviews.forEach { view in
  55 + if view.tag >= 10000{
  56 + view.removeFromSuperview()
  57 + }
  58 + }
  59 + CNLiveMineViewModel.requestsStandInfo(identityId: "\(_idModel!.id)", type: .havedate, authType: .person) { [self] result, respStatue in
63 hiddenLoading() 60 hiddenLoading()
64 if respStatue == .success { 61 if respStatue == .success {
65 let cardArray = result as! NSMutableArray 62 let cardArray = result as! NSMutableArray
  63 + let count = cardArray.count
66 if cardArray.count > 0{ 64 if cardArray.count > 0{
67 for i in (0..<cardArray.count){ 65 for i in (0..<cardArray.count){
68 let idCardModel = cardArray[i] as! MineStandInfoModel 66 let idCardModel = cardArray[i] as! MineStandInfoModel
69 - switch idCardModel.name {  
70 - case "姓名":  
71 - self.nameValueLabel.text = idCardModel.userInfo  
72 - case "性别":  
73 - self.sexValueLabel.text = idCardModel.userInfo  
74 - case "认证时间":  
75 - self.dateValueLabel.text = idCardModel.userInfo  
76 - case "编号":  
77 - self.IDValueLabel.text = idCardModel.userInfo  
78 - case "证件照":  
79 - let str:String = idCardModel.userInfo!  
80 - if(str.isEmpty){  
81 - self.iDIconImgView.isHidden = true  
82 - }else  
83 - {  
84 - self.iDIconImgView.isHidden = false  
85 - self.iDIconImgView.kf.setImage(with: URL(string: str))  
86 - }  
87 -  
88 - self.iDCardBGView.kf.setImage(with: URL(string: self._idModel!.cardImg), placeholder: UIImage(named: "homePage_idCardBG"))  
89 - default:  
90 - break  
91 - } 67 + let siBianGap:CGFloat = 17
  68 + let labelsGap:CGFloat = 10
  69 +
  70 + let keyLabel = UILabel.init()
  71 + keyLabel.textColor = HexColor(_idModel?.backgroundColor ?? "")
  72 + keyLabel.textAlignment = .left
  73 + keyLabel.font = Font(15)
  74 + keyLabel.backgroundColor = .clear
  75 + keyLabel.text = idCardModel.name ?? ""
  76 + keyLabel.frame = CGRect(x: siBianGap, y: siBianGap+CGFloat(i)*21+CGFloat(i)*labelsGap, width: 70, height: 21)
  77 + keyLabel.adjustsFontSizeToFitWidth = true
  78 + keyLabel.tag = 10000+i
  79 + self.addSubview(keyLabel)
  80 +
  81 + let valueLabel = UILabel.init()
  82 + valueLabel.textColor = HexColor(_idModel?.backgroundColor ?? "")
  83 + valueLabel.textAlignment = .left
  84 + valueLabel.font = Font(15)
  85 + valueLabel.backgroundColor = .clear
  86 + valueLabel.text = idCardModel.userInfo ?? ""
  87 + valueLabel.frame = CGRect(x: keyLabel.right+labelsGap+siBianGap, y: siBianGap+CGFloat(i)*21+CGFloat(i)*labelsGap, width: self.width-keyLabel.right-labelsGap-siBianGap-5, height: 21)
  88 + valueLabel.adjustsFontSizeToFitWidth = true
  89 + valueLabel.tag = 20000+i
  90 + self.addSubview(valueLabel)
  91 +
92 } 92 }
93 }else{ 93 }else{
94 //没数据 94 //没数据
@@ -97,170 +97,20 @@ class CNIDCardView: UIView{ @@ -97,170 +97,20 @@ class CNIDCardView: UIView{
97 } 97 }
98 } 98 }
99 99
100 - // MARK: - 约束  
101 - func makeConstraints(){  
102 - self.iDCardBGView.snp.makeConstraints { make in  
103 - make.centerX.equalToSuperview()  
104 - make.centerY.equalToSuperview()  
105 - make.width.equalToSuperview()  
106 - make.height.equalToSuperview()  
107 - }  
108 - //标签  
109 - self.nameLabel.snp.makeConstraints { make in  
110 - make.left.equalToSuperview().offset(20)  
111 - make.top.equalTo(60)  
112 - make.width.equalTo(54)  
113 - }  
114 - self.sexLabel.snp.makeConstraints { make in  
115 - make.left.equalToSuperview().offset(20)  
116 - make.top.equalTo(nameLabel.snp.bottom).offset(10)  
117 - }  
118 - self.dateLabel.snp.makeConstraints { make in  
119 - make.left.equalToSuperview().offset(20)  
120 - make.top.equalTo(sexLabel.snp.bottom).offset(10)  
121 - }  
122 - self.IDLabel.snp.makeConstraints { make in  
123 - make.left.equalToSuperview().offset(20)  
124 - make.top.equalTo(dateLabel.snp.bottom).offset(10)  
125 - }  
126 - //标签值  
127 - self.nameValueLabel.snp.makeConstraints { make in  
128 - make.left.equalTo(nameLabel.snp.right).offset(10)  
129 - make.top.equalTo(nameLabel.snp.top)  
130 - make.right.equalTo(iDIconImgView.snp.left).offset(-5)  
131 - }  
132 - self.sexValueLabel.snp.makeConstraints { make in  
133 - make.left.equalTo(nameLabel.snp.right).offset(10)  
134 - make.top.equalTo(sexLabel.snp.top)  
135 - }  
136 - self.dateValueLabel.snp.makeConstraints { make in  
137 - make.left.equalTo(nameLabel.snp.right).offset(10)  
138 - make.top.equalTo(dateLabel.snp.top)  
139 - }  
140 - self.IDValueLabel.snp.makeConstraints { make in  
141 - make.left.equalTo(nameLabel.snp.right).offset(10)  
142 - make.top.equalTo(IDLabel.snp.top)  
143 - make.right.lessThanOrEqualTo(iDIconImgView.snp.left).offset(-5)  
144 - }  
145 - self.iDIconImgView.snp.makeConstraints { make in  
146 - make.right.equalToSuperview().offset(-15)  
147 - make.top.equalTo(nameLabel.snp.top)  
148 - make.width.equalTo(60)  
149 - make.height.equalTo(85)  
150 - }  
151 - }  
152 -  
153 // MARK: - 懒加载 100 // MARK: - 懒加载
154 ///视图总容器 101 ///视图总容器
155 lazy var contentView : UIView = { 102 lazy var contentView : UIView = {
156 103
157 - let contentView = UIView.init(frame: CGRect(x: 0, y: 0, width: self.width, height: self.height ))  
158 - contentView.backgroundColor = UIColor.white 104 + let contentView = UIView.init(frame: CGRect(x: 0, y: 0, width: 0, height: 0 ))
  105 + contentView.backgroundColor = UIColor.clear
159 return contentView 106 return contentView
160 }() 107 }()
161 108
162 /// 身份卡片-背景图 109 /// 身份卡片-背景图
163 lazy var iDCardBGView:UIImageView = { 110 lazy var iDCardBGView:UIImageView = {
164 111
165 - let iDCardBGView:UIImageView = UIImageView(frame: CGRect(x: 20, y: 25, width: self.width-40, height: (self.width-40) * 0.64)) 112 + let iDCardBGView:UIImageView = UIImageView(frame: CGRect(x: 0, y: 0, width: 0, height: 0))
166 iDCardBGView.backgroundColor = UIColor.clear 113 iDCardBGView.backgroundColor = UIColor.clear
167 return iDCardBGView 114 return iDCardBGView
168 }() 115 }()
169 -  
170 - //姓名Label  
171 - lazy var nameLabel: UILabel = {  
172 - let nameLabel = UILabel.init()  
173 - nameLabel.textColor = .blue  
174 - nameLabel.textAlignment = .left  
175 - nameLabel.font = Font(13)  
176 - nameLabel.backgroundColor = .clear  
177 - nameLabel.text = "姓 名"  
178 - return nameLabel  
179 - }()  
180 -  
181 - //性别Label  
182 - lazy var sexLabel: UILabel = {  
183 - let sexLabel = UILabel.init()  
184 - sexLabel.textColor = .blue//HexColor("#666666")  
185 - sexLabel.textAlignment = .left  
186 - sexLabel.font = Font(13)  
187 - sexLabel.backgroundColor = .clear  
188 - sexLabel.text = "性 别"  
189 - return sexLabel  
190 - }()  
191 -  
192 - //注册日期Label  
193 - lazy var dateLabel: UILabel = {  
194 - let dateLabel = UILabel.init()  
195 - dateLabel.textColor = .blue//HexColor("#666666")  
196 - dateLabel.textAlignment = .left  
197 - dateLabel.font = Font(13)  
198 - dateLabel.backgroundColor = .clear  
199 - dateLabel.text = "注册日期"  
200 - return dateLabel  
201 - }()  
202 -  
203 - //编号Label  
204 - lazy var IDLabel: UILabel = {  
205 - let IDLabel = UILabel.init()  
206 - IDLabel.textColor = .blue//HexColor("#666666")  
207 - IDLabel.textAlignment = .left  
208 - IDLabel.font = Font(13)  
209 - IDLabel.backgroundColor = .clear  
210 - IDLabel.text = "编 号"  
211 - return IDLabel  
212 - }()  
213 -  
214 - //姓名ValueLabel  
215 - lazy var nameValueLabel: UILabel = {  
216 - let nameValueLabel = UILabel.init()  
217 - nameValueLabel.textColor = .blue  
218 - nameValueLabel.textAlignment = .left  
219 - nameValueLabel.font = Font(13)  
220 - nameValueLabel.backgroundColor = .clear  
221 - nameValueLabel.text = "姓名"  
222 - return nameValueLabel  
223 - }()  
224 -  
225 - //性别ValueLabel  
226 - lazy var sexValueLabel: UILabel = {  
227 - let sexValueLabel = UILabel.init()  
228 - sexValueLabel.textColor = .blue//HexColor("#666666")  
229 - sexValueLabel.textAlignment = .left  
230 - sexValueLabel.font = Font(13)  
231 - sexValueLabel.backgroundColor = .clear  
232 - sexValueLabel.text = "男"  
233 - return sexValueLabel  
234 - }()  
235 -  
236 - //注册日期ValueLabel  
237 - lazy var dateValueLabel: UILabel = {  
238 - let dateValueLabel = UILabel.init()  
239 - dateValueLabel.textColor = .blue//HexColor("#666666")  
240 - dateValueLabel.textAlignment = .left  
241 - dateValueLabel.font = Font(13)  
242 - dateValueLabel.backgroundColor = .clear  
243 - dateValueLabel.text = "2022年1月1日"  
244 - return dateValueLabel  
245 - }()  
246 -  
247 - //编号ValueLabel  
248 - lazy var IDValueLabel: UILabel = {  
249 - let IDValueLabel = UILabel.init()  
250 - IDValueLabel.textColor = .blue//HexColor("#666666")  
251 - IDValueLabel.textAlignment = .left  
252 - IDValueLabel.font = Font(13)  
253 - IDValueLabel.backgroundColor = .clear  
254 - IDValueLabel.text = "123"  
255 - return IDValueLabel  
256 - }()  
257 -  
258 - ///证件照  
259 - lazy var iDIconImgView:UIImageView = {  
260 -  
261 - let iDIconImgView:UIImageView = UIImageView(frame: CGRect(x: 20, y: 25, width: 60, height: 85))  
262 - iDIconImgView.backgroundColor = UIColor.clear  
263 - return iDIconImgView  
264 - }()  
265 -  
266 } 116 }
metaCode/Classes/Main/HomePage/View/VerticalViews/MainView/CNMainView.swift
@@ -53,14 +53,14 @@ class CNFrontMainView : UIView{ @@ -53,14 +53,14 @@ class CNFrontMainView : UIView{
53 make.bottom.equalToSuperview() 53 make.bottom.equalToSuperview()
54 } 54 }
55 55
56 - frontDescContentView.addSubview(self.upMoreGIF)  
57 - upMoreGIF.snp.makeConstraints { make in  
58 - make.top.equalToSuperview().offset(5)  
59 - make.right.equalToSuperview().offset(-self.width/2+24)  
60 - make.width.equalTo(48)  
61 - make.height.equalTo(30) 56 + frontDescContentView.addSubview(self.addStandBtn)
  57 + addStandBtn.snp.makeConstraints { make in
  58 + make.centerX.equalToSuperview()
  59 + make.bottom.equalToSuperview().offset(-30)
  60 + make.width.equalTo(150)
  61 + make.height.equalTo(39)
62 } 62 }
63 - 63 +
64 frontDescContentView.addSubview(self.personalStandBtn) 64 frontDescContentView.addSubview(self.personalStandBtn)
65 personalStandBtn.snp.makeConstraints { make in 65 personalStandBtn.snp.makeConstraints { make in
66 make.right.equalToSuperview().offset(-self.width/2) 66 make.right.equalToSuperview().offset(-self.width/2)
@@ -76,13 +76,6 @@ class CNFrontMainView : UIView{ @@ -76,13 +76,6 @@ class CNFrontMainView : UIView{
76 make.height.equalTo(36) 76 make.height.equalTo(36)
77 } 77 }
78 78
79 - frontDescContentView.addSubview(self.downMoreGIF)  
80 - downMoreGIF.snp.makeConstraints { make in  
81 - make.top.equalTo(self.personalStandBtn.snp.bottom).offset((45-30)/2.0)  
82 - make.centerX.equalTo(self.personalStandBtn.snp.right)  
83 - make.width.equalTo(96)  
84 - make.height.equalTo(30)  
85 - }  
86 79
87 frontDescContentView.addSubview(self.textView) 80 frontDescContentView.addSubview(self.textView)
88 textView.snp.makeConstraints { make in 81 textView.snp.makeConstraints { make in
@@ -112,6 +105,19 @@ class CNFrontMainView : UIView{ @@ -112,6 +105,19 @@ class CNFrontMainView : UIView{
112 return textView 105 return textView
113 }() 106 }()
114 107
  108 + ///未认证-店铺认证 按钮
  109 + lazy var addStandBtn: UIButton = {
  110 + let addStandBtn = UIButton(type: .custom)
  111 + addStandBtn.clipsToBounds = true
  112 + addStandBtn.layer.cornerRadius = 19.5
  113 + addStandBtn.backgroundColor = HexColor("#004FE0")
  114 + addStandBtn.setTitle("店铺认证", for: .normal)
  115 + addStandBtn.setTitleColor(.white, for: .normal)
  116 + addStandBtn.titleLabel?.font = UIFont.init(name: "PingFangSC-Medium", size: 14)
  117 + addStandBtn.addTarget(self, action: #selector(addStandBtnAction), for: .touchUpInside)
  118 + return addStandBtn
  119 + }()
  120 +
115 ///未认证-个人认证 按钮 121 ///未认证-个人认证 按钮
116 lazy var personalStandBtn: UIButton = { 122 lazy var personalStandBtn: UIButton = {
117 let personalStandBtn = UIButton(type: .custom) 123 let personalStandBtn = UIButton(type: .custom)
@@ -166,9 +172,9 @@ class CNFrontMainView : UIView{ @@ -166,9 +172,9 @@ class CNFrontMainView : UIView{
166 frontCardContentView.addSubview(self.iDCardView) 172 frontCardContentView.addSubview(self.iDCardView)
167 iDCardView.snp.makeConstraints { make in 173 iDCardView.snp.makeConstraints { make in
168 make.centerX.equalToSuperview() 174 make.centerX.equalToSuperview()
169 - make.top.equalToSuperview().offset(25)  
170 - make.width.equalTo(self.width-40)  
171 - make.height.equalTo((self.width-40) * 0.64) 175 + make.bottom.equalToSuperview().offset(-(45-30)/2.0-30-10)
  176 + make.width.equalTo(262*KSreenWidth/375)
  177 + make.height.equalTo(0.52*262*KSreenWidth/375)
172 } 178 }
173 return frontCardContentView 179 return frontCardContentView
174 180
@@ -176,7 +182,7 @@ class CNFrontMainView : UIView{ @@ -176,7 +182,7 @@ class CNFrontMainView : UIView{
176 /// 已认证-身份卡片 182 /// 已认证-身份卡片
177 lazy var iDCardView:CNIDCardView = { 183 lazy var iDCardView:CNIDCardView = {
178 184
179 - let iDCardView:CNIDCardView = CNIDCardView(frame: CGRect(x: 20, y: 25, width: self.width-40, height: (self.width-40) * 0.64)) 185 + let iDCardView:CNIDCardView = CNIDCardView(frame: CGRect(x: 0, y: 0, width: 262*KSreenWidth/375, height: 0.52*262*KSreenWidth/375))
180 return iDCardView 186 return iDCardView
181 }() 187 }()
182 188
@@ -211,16 +217,34 @@ class CNFrontMainView : UIView{ @@ -211,16 +217,34 @@ class CNFrontMainView : UIView{
211 //已认证身份 217 //已认证身份
212 //显示证件View 218 //显示证件View
213 frontCardContentView.isHidden = false 219 frontCardContentView.isHidden = false
214 - iDCardView.idModel = newValue!  
215 - frontDescContentView.isHidden = true 220 + self.addStandBtn.isHidden = true
  221 + self.iDCardView.idModel = newValue!
216 cardViewBgImgView.kf.setImage(with: URL(string: _idModel!.cardBackgroundImg), placeholder: UIImage(named: "homepage_cardBGImg")) 222 cardViewBgImgView.kf.setImage(with: URL(string: _idModel!.cardBackgroundImg), placeholder: UIImage(named: "homepage_cardBGImg"))
217 - }else  
218 - {//未认证身份  
219 - frontCardContentView.isHidden = true  
220 - //显示textview 添加身份  
221 - frontDescContentView.isHidden = false  
222 - textView.text = newValue!.description  
223 223
  224 +
  225 + //隐藏textview
  226 + textView.isHidden = true
  227 +
  228 + if frontCardContentView.contains(self.upMoreGIF){
  229 + self.upMoreGIF.removeFromSuperview()
  230 + }
  231 + frontCardContentView.addSubview(self.upMoreGIF)
  232 + upMoreGIF.snp.makeConstraints { make in
  233 + make.top.equalToSuperview().offset(5)
  234 + make.right.equalToSuperview().offset(-self.width/2+24)
  235 + make.width.equalTo(48)
  236 + make.height.equalTo(30)
  237 + }
  238 + if frontCardContentView.contains(self.downMoreGIF){
  239 + self.downMoreGIF.removeFromSuperview()
  240 + }
  241 + frontCardContentView.addSubview(self.downMoreGIF)
  242 + downMoreGIF.snp.makeConstraints { make in
  243 + make.top.equalTo(self.iDCardView.snp.bottom).offset((45-30)/2.0)
  244 + make.centerX.equalToSuperview()
  245 + make.width.equalTo(96)
  246 + make.height.equalTo(30)
  247 + }
224 //上滑 下滑引导gif 248 //上滑 下滑引导gif
225 upMoreGIF.kf.setImage(with: URL(string: newValue!.upGuideImg)) 249 upMoreGIF.kf.setImage(with: URL(string: newValue!.upGuideImg))
226 downMoreGIF.kf.setImage(with: URL(string: newValue!.downGuideImg)) 250 downMoreGIF.kf.setImage(with: URL(string: newValue!.downGuideImg))
@@ -233,6 +257,97 @@ class CNFrontMainView : UIView{ @@ -233,6 +257,97 @@ class CNFrontMainView : UIView{
233 upMoreGIF.isHidden = false 257 upMoreGIF.isHidden = false
234 downMoreGIF.isHidden = false 258 downMoreGIF.isHidden = false
235 } 259 }
  260 + }else
  261 + {//未认证身份
  262 + textView.isHidden = false
  263 +
  264 + if idModel?.id == 9{
  265 + //电商
  266 + //隐藏上滑下滑gif
  267 + upMoreGIF.isHidden = true
  268 + downMoreGIF.isHidden = true
  269 + self.addStandBtn.isHidden = false
  270 + self.personalStandBtn.isHidden = true
  271 + self.enterpriseStandBtn.isHidden = true
  272 + self.addStandBtn.isUserInteractionEnabled = true
  273 + if idModel?.shopStatus == "0" || idModel?.shopStatus == "4"{
  274 + //0未申请 //4闭店
  275 + //未认证->店铺认证
  276 + self.addStandBtn.setTitle("店铺认证", for: .normal)
  277 + }else if idModel?.shopStatus == "1"{
  278 + //开店
  279 + //已认证->显示卡片
  280 + }else if idModel?.shopStatus == "2"{
  281 + //申请中
  282 + //"资料审核中"
  283 + self.addStandBtn.setTitle("资料审核中", for: .normal)
  284 + self.addStandBtn.isUserInteractionEnabled = false
  285 + }else if idModel?.shopStatus == "3"{
  286 + //已拒绝
  287 + //"重新修改提交"
  288 + addStandBtn.setTitle("重新修改提交", for: .normal)
  289 + }
  290 + }else{
  291 + //非电商
  292 + //显示上滑下滑gif
  293 + upMoreGIF.isHidden = false
  294 + downMoreGIF.isHidden = false
  295 +
  296 + if idModel?.isPersonOrEnterprise == 0{//企业+个人
  297 + self.addStandBtn.isHidden = true
  298 + self.personalStandBtn.isHidden = false
  299 + self.enterpriseStandBtn.isHidden = false
  300 + }else if idModel?.isPersonOrEnterprise == 1{//个人
  301 + self.addStandBtn.isHidden = false
  302 + self.addStandBtn.setTitle("个人认证", for: .normal)
  303 + self.personalStandBtn.isHidden = true
  304 + self.enterpriseStandBtn.isHidden = true
  305 + }else if idModel?.isPersonOrEnterprise == 2{//企业
  306 + self.addStandBtn.isHidden = false
  307 + self.addStandBtn.setTitle("企业认证", for: .normal)
  308 + self.personalStandBtn.isHidden = true
  309 + self.enterpriseStandBtn.isHidden = true
  310 + }else if idModel?.isPersonOrEnterprise == 3{//已认证/无企业和个人
  311 + //不显示认证按钮
  312 + self.addStandBtn.isHidden = true
  313 + self.personalStandBtn.isHidden = true
  314 + self.enterpriseStandBtn.isHidden = true
  315 + }else{
  316 + //不显示认证按钮
  317 + self.addStandBtn.isHidden = true
  318 + self.personalStandBtn.isHidden = false
  319 + self.enterpriseStandBtn.isHidden = false
  320 + }
  321 + }
  322 +
  323 + self.addStandBtn.backgroundColor = HexColor(newValue!.backgroundColor)
  324 + frontCardContentView.isHidden = true
  325 + //显示textview 添加身份
  326 + textView.text = newValue!.description
  327 +
  328 + if frontDescContentView.contains(self.upMoreGIF){
  329 + self.upMoreGIF.removeFromSuperview()
  330 + }
  331 + frontDescContentView.addSubview(self.upMoreGIF)
  332 + upMoreGIF.snp.makeConstraints { make in
  333 + make.top.equalToSuperview().offset(5)
  334 + make.right.equalToSuperview().offset(-self.width/2+24)
  335 + make.width.equalTo(48)
  336 + make.height.equalTo(30)
  337 + }
  338 + if frontDescContentView.contains(self.downMoreGIF){
  339 + self.downMoreGIF.removeFromSuperview()
  340 + }
  341 + frontDescContentView.addSubview(self.downMoreGIF)
  342 + downMoreGIF.snp.makeConstraints { make in
  343 + make.top.equalTo(self.personalStandBtn.snp.bottom).offset((45-30)/2.0)
  344 + make.centerX.equalTo(self.personalStandBtn.snp.right)
  345 + make.width.equalTo(96)
  346 + make.height.equalTo(30)
  347 + }
  348 + //上滑 下滑引导gif
  349 + upMoreGIF.kf.setImage(with: URL(string: newValue!.upGuideImg))
  350 + downMoreGIF.kf.setImage(with: URL(string: newValue!.downGuideImg))
236 351
237 //个人认证,企业认证 352 //个人认证,企业认证
238 personalStandBtn.backgroundColor = HexColor(newValue!.atPersonageColour) 353 personalStandBtn.backgroundColor = HexColor(newValue!.atPersonageColour)
@@ -251,7 +366,7 @@ class CNFrontMainView : UIView{ @@ -251,7 +366,7 @@ class CNFrontMainView : UIView{
251 self.makeConstraints() 366 self.makeConstraints()
252 } 367 }
253 func makeConstraints(){ 368 func makeConstraints(){
254 - 369 +
255 } 370 }
256 371
257 // MARK: -按钮点击事件 372 // MARK: -按钮点击事件
@@ -259,16 +374,20 @@ class CNFrontMainView : UIView{ @@ -259,16 +374,20 @@ class CNFrontMainView : UIView{
259 tapTransformAciton!() 374 tapTransformAciton!()
260 } 375 }
261 376
  377 + @objc func addStandBtnAction() {
  378 + //跳转到 电商认证 / 个人 / 企业
  379 + self.pushStandVC(isPersonOrEnterprise: 3)
  380 + }
262 @objc func personalStandBtnAction() { 381 @objc func personalStandBtnAction() {
263 //跳转到 个人认证页面 382 //跳转到 个人认证页面
264 - self.pushStandVC() 383 + self.pushStandVC(isPersonOrEnterprise: 1)
265 } 384 }
266 @objc func enterpriseStandBtnAction() { 385 @objc func enterpriseStandBtnAction() {
267 //跳转到 企业认证页面 386 //跳转到 企业认证页面
268 - self.pushStandVC() 387 + self.pushStandVC(isPersonOrEnterprise: 2)
269 } 388 }
270 389
271 - func pushStandVC(){ 390 + func pushStandVC(isPersonOrEnterprise:Int){
272 //跳转到 个人认证&企业认证 页面 391 //跳转到 个人认证&企业认证 页面
273 if _idModel!.id == 9 { 392 if _idModel!.id == 9 {
274 showLoading(message: "") 393 showLoading(message: "")
@@ -279,7 +398,23 @@ class CNFrontMainView : UIView{ @@ -279,7 +398,23 @@ class CNFrontMainView : UIView{
279 } 398 }
280 } 399 }
281 }else{ 400 }else{
282 - navigationViewController().pushViewController(CNLiveMineInputViewController.init(listModel: self._idModel!, authType: .person), animated: pushAnimated) 401 + if self._idModel!.isPersonOrEnterprise == 1{
  402 + //个人
  403 + navigationViewController().pushViewController(CNLiveMineInputViewController.init(listModel: self._idModel!, authType: .person), animated: pushAnimated)
  404 + }else if self._idModel!.isPersonOrEnterprise == 2{
  405 + //企业
  406 + navigationViewController().pushViewController(CNLiveMineInputViewController.init(listModel: self._idModel!, authType: .enterprise), animated: pushAnimated)
  407 +
  408 + }else{
  409 + if isPersonOrEnterprise == 1{
  410 + navigationViewController().pushViewController(CNLiveMineInputViewController.init(listModel: self._idModel!, authType: .person), animated: pushAnimated)
  411 +
  412 + }else if isPersonOrEnterprise == 2{
  413 + navigationViewController().pushViewController(CNLiveMineInputViewController.init(listModel: self._idModel!, authType: .enterprise), animated: pushAnimated)
  414 + }else{
  415 + navigationViewController().pushViewController(CNLiveMineInputViewController.init(listModel: self._idModel!, authType: .person), animated: pushAnimated)
  416 + }
  417 + }
283 } 418 }
284 } 419 }
285 } 420 }
metaCode/Classes/Main/MinePage/ViewModel/CNLiveMineBaseModel.swift
@@ -131,6 +131,7 @@ class StandListBaseModel: BaseModel { @@ -131,6 +131,7 @@ class StandListBaseModel: BaseModel {
131 var navigatePages: Int = 0 131 var navigatePages: Int = 0
132 var pageNum: Int = 0 132 var pageNum: Int = 0
133 var pages: Int = 0 133 var pages: Int = 0
  134 +
134 } 135 }
135 136
136 final class StandListModel: BaseModel {//, TableCodable { 137 final class StandListModel: BaseModel {//, TableCodable {
@@ -159,6 +160,12 @@ final class StandListModel: BaseModel {//, TableCodable { @@ -159,6 +160,12 @@ final class StandListModel: BaseModel {//, TableCodable {
159 var createTimeString: String = ""//- 160 var createTimeString: String = ""//-
160 var timeString: String = "" 161 var timeString: String = ""
161 162
  163 + var shopStatus: String = "0"//电商身份专用状态 0未申请 1开店 2申请中 3已拒绝 4闭店
  164 +
  165 +
  166 + ///自定义 判断是 0个人+企业 , 1个人, 2企业 3已认证/无企业和个人
  167 + var isPersonOrEnterprise: Int = 0
  168 +
162 override func mapping(mapper: HelpingMapper) { 169 override func mapping(mapper: HelpingMapper) {
163 mapper <<< 170 mapper <<<
164 self.createTime <-- TransformOf(fromJSON: { [weak self] (raw) -> Int in 171 self.createTime <-- TransformOf(fromJSON: { [weak self] (raw) -> Int in
@@ -385,7 +392,7 @@ class MineIntegralRecordDescModel: BaseModel { @@ -385,7 +392,7 @@ class MineIntegralRecordDescModel: BaseModel {
385 392
386 // !!!: /api/v1/applyShopInfo 积分明细列表 393 // !!!: /api/v1/applyShopInfo 积分明细列表
387 class MineApplyShopInfoModel: BaseModel { 394 class MineApplyShopInfoModel: BaseModel {
388 - var state: String? = ""//状态 0 未申请 1 开店 2 申请中 3 已拒绝 4 闭店 0没有下列参数 1如果没有下列参数则为店员身份 395 + var state: String = "0"//状态 0 未申请 1 开店 2 申请中 3 已拒绝 4 闭店 0没有下列参数 1如果没有下列参数则为店员身份
389 var identity_stop_time: String? = ""//结束时间 396 var identity_stop_time: String? = ""//结束时间
390 var registered_address: String? = "" //注册地址 397 var registered_address: String? = "" //注册地址
391 var commercial_name: String? = ""//统一社会信用代码 398 var commercial_name: String? = ""//统一社会信用代码
metaCode/Classes/Main/MinePage/ViewModel/CNLiveMineViewModel.swift
@@ -284,7 +284,7 @@ class CNLiveMineViewModel: NSObject { @@ -284,7 +284,7 @@ class CNLiveMineViewModel: NSObject {
284 CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) 284 CNLiveNetworking.setupCustomParam(custom_param as? [String : String])
285 CNLiveNetworking.setAllowRequestDefaultArgument(true) 285 CNLiveNetworking.setAllowRequestDefaultArgument(true)
286 CNLiveNetworking.setupShowDataResult(false) 286 CNLiveNetworking.setupShowDataResult(false)
287 - CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseMCUrl+"/identityApi/allList", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in 287 + CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseMCUrl+"/identityApi/allList", param: param as! [String : String], cacheType: .cacheNetwork) { task, result, error in
288 hiddenLoading() 288 hiddenLoading()
289 if (error == nil) { 289 if (error == nil) {
290 let resp = result as! NSDictionary 290 let resp = result as! NSDictionary
metaCode/Classes/Main/ShopPage/ViewModel/CNLiveShopViewModel.swift
@@ -21,8 +21,8 @@ class CNLiveShopViewModel: NSObject { @@ -21,8 +21,8 @@ class CNLiveShopViewModel: NSObject {
21 param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "uid") 21 param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "uid")
22 param.setValue("\(page)", forKey: "page") 22 param.setValue("\(page)", forKey: "page")
23 let custom_param = NSMutableDictionary() 23 let custom_param = NSMutableDictionary()
24 - custom_param.setValue(APPId_wjj, forKey: "appId")  
25 - custom_param.setValue(APPKey_wjj, forKey: "appKey") 24 + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId")
  25 + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey")
26 CNLiveNetworking.setAllowRequestDefaultArgument(true) 26 CNLiveNetworking.setAllowRequestDefaultArgument(true)
27 CNLiveNetworking.setupShowDataResult(false) 27 CNLiveNetworking.setupShowDataResult(false)
28 CNLiveNetworking.setupDSRequest(true) 28 CNLiveNetworking.setupDSRequest(true)
@@ -67,8 +67,8 @@ class CNLiveShopViewModel: NSObject { @@ -67,8 +67,8 @@ class CNLiveShopViewModel: NSObject {
67 param.setValue(state, forKey: "state") 67 param.setValue(state, forKey: "state")
68 param.setValue(keyword, forKey: "keyword") 68 param.setValue(keyword, forKey: "keyword")
69 let custom_param = NSMutableDictionary() 69 let custom_param = NSMutableDictionary()
70 - custom_param.setValue(APPId_wjj, forKey: "appId")  
71 - custom_param.setValue(APPKey_wjj, forKey: "appKey") 70 + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId")
  71 + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey")
72 CNLiveNetworking.setAllowRequestDefaultArgument(true) 72 CNLiveNetworking.setAllowRequestDefaultArgument(true)
73 CNLiveNetworking.setupShowDataResult(false) 73 CNLiveNetworking.setupShowDataResult(false)
74 CNLiveNetworking.setupDSRequest(true) 74 CNLiveNetworking.setupDSRequest(true)
@@ -116,8 +116,8 @@ class CNLiveShopViewModel: NSObject { @@ -116,8 +116,8 @@ class CNLiveShopViewModel: NSObject {
116 param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "uid") 116 param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "uid")
117 param.setValue(orderId, forKey: "id") 117 param.setValue(orderId, forKey: "id")
118 let custom_param = NSMutableDictionary() 118 let custom_param = NSMutableDictionary()
119 - custom_param.setValue(APPId_wjj, forKey: "appId")  
120 - custom_param.setValue(APPKey_wjj, forKey: "appKey") 119 + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId")
  120 + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey")
121 CNLiveNetworking.setAllowRequestDefaultArgument(true) 121 CNLiveNetworking.setAllowRequestDefaultArgument(true)
122 CNLiveNetworking.setupShowDataResult(false) 122 CNLiveNetworking.setupShowDataResult(false)
123 CNLiveNetworking.setupDSRequest(true) 123 CNLiveNetworking.setupDSRequest(true)
@@ -154,8 +154,8 @@ class CNLiveShopViewModel: NSObject { @@ -154,8 +154,8 @@ class CNLiveShopViewModel: NSObject {
154 let param = NSMutableDictionary() 154 let param = NSMutableDictionary()
155 param.setValue(orderId, forKey: "id") 155 param.setValue(orderId, forKey: "id")
156 let custom_param = NSMutableDictionary() 156 let custom_param = NSMutableDictionary()
157 - custom_param.setValue(APPId_wjj, forKey: "appId")  
158 - custom_param.setValue(APPKey_wjj, forKey: "appKey") 157 + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId")
  158 + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey")
159 CNLiveNetworking.setAllowRequestDefaultArgument(true) 159 CNLiveNetworking.setAllowRequestDefaultArgument(true)
160 CNLiveNetworking.setupShowDataResult(false) 160 CNLiveNetworking.setupShowDataResult(false)
161 CNLiveNetworking.setupDSRequest(true) 161 CNLiveNetworking.setupDSRequest(true)
@@ -203,8 +203,8 @@ class CNLiveShopViewModel: NSObject { @@ -203,8 +203,8 @@ class CNLiveShopViewModel: NSObject {
203 let param = NSMutableDictionary() 203 let param = NSMutableDictionary()
204 param.setValue(orderId, forKey: "id") 204 param.setValue(orderId, forKey: "id")
205 let custom_param = NSMutableDictionary() 205 let custom_param = NSMutableDictionary()
206 - custom_param.setValue(APPId_wjj, forKey: "appId")  
207 - custom_param.setValue(APPKey_wjj, forKey: "appKey") 206 + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId")
  207 + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey")
208 CNLiveNetworking.setAllowRequestDefaultArgument(true) 208 CNLiveNetworking.setAllowRequestDefaultArgument(true)
209 CNLiveNetworking.setupShowDataResult(false) 209 CNLiveNetworking.setupShowDataResult(false)
210 CNLiveNetworking.setupDSRequest(true) 210 CNLiveNetworking.setupDSRequest(true)
@@ -255,8 +255,8 @@ class CNLiveShopViewModel: NSObject { @@ -255,8 +255,8 @@ class CNLiveShopViewModel: NSObject {
255 param.setValue(desc, forKey: "desc") 255 param.setValue(desc, forKey: "desc")
256 } 256 }
257 let custom_param = NSMutableDictionary() 257 let custom_param = NSMutableDictionary()
258 - custom_param.setValue(APPId_wjj, forKey: "appId")  
259 - custom_param.setValue(APPKey_wjj, forKey: "appKey") 258 + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId")
  259 + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey")
260 CNLiveNetworking.setAllowRequestDefaultArgument(true) 260 CNLiveNetworking.setAllowRequestDefaultArgument(true)
261 CNLiveNetworking.setupShowDataResult(false) 261 CNLiveNetworking.setupShowDataResult(false)
262 CNLiveNetworking.setupDSRequest(true) 262 CNLiveNetworking.setupDSRequest(true)
@@ -294,8 +294,8 @@ class CNLiveShopViewModel: NSObject { @@ -294,8 +294,8 @@ class CNLiveShopViewModel: NSObject {
294 let param = NSMutableDictionary() 294 let param = NSMutableDictionary()
295 param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "id") 295 param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "id")
296 let custom_param = NSMutableDictionary() 296 let custom_param = NSMutableDictionary()
297 - custom_param.setValue(APPId_wjj, forKey: "appId")  
298 - custom_param.setValue(APPKey_wjj, forKey: "appKey") 297 + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId")
  298 + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey")
299 CNLiveNetworking.setAllowRequestDefaultArgument(true) 299 CNLiveNetworking.setAllowRequestDefaultArgument(true)
300 CNLiveNetworking.setupShowDataResult(false) 300 CNLiveNetworking.setupShowDataResult(false)
301 CNLiveNetworking.setupDSRequest(true) 301 CNLiveNetworking.setupDSRequest(true)
@@ -354,8 +354,8 @@ class CNLiveShopViewModel: NSObject { @@ -354,8 +354,8 @@ class CNLiveShopViewModel: NSObject {
354 param.setValue(expressId, forKey: "express_id") 354 param.setValue(expressId, forKey: "express_id")
355 param.setValue(expressNum, forKey: "express_num") 355 param.setValue(expressNum, forKey: "express_num")
356 let custom_param = NSMutableDictionary() 356 let custom_param = NSMutableDictionary()
357 - custom_param.setValue(APPId_wjj, forKey: "appId")  
358 - custom_param.setValue(APPKey_wjj, forKey: "appKey") 357 + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId")
  358 + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey")
359 CNLiveNetworking.setAllowRequestDefaultArgument(true) 359 CNLiveNetworking.setAllowRequestDefaultArgument(true)
360 CNLiveNetworking.setupShowDataResult(false) 360 CNLiveNetworking.setupShowDataResult(false)
361 CNLiveNetworking.setupDSRequest(true) 361 CNLiveNetworking.setupDSRequest(true)
@@ -396,8 +396,8 @@ class CNLiveShopViewModel: NSObject { @@ -396,8 +396,8 @@ class CNLiveShopViewModel: NSObject {
396 } catch _ {} 396 } catch _ {}
397 } 397 }
398 let custom_param = NSMutableDictionary() 398 let custom_param = NSMutableDictionary()
399 - custom_param.setValue(APPId_wjj, forKey: "appId")  
400 - custom_param.setValue(APPKey_wjj, forKey: "appKey") 399 + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId")
  400 + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey")
401 CNLiveNetworking.setAllowRequestDefaultArgument(true) 401 CNLiveNetworking.setAllowRequestDefaultArgument(true)
402 CNLiveNetworking.setupShowDataResult(false) 402 CNLiveNetworking.setupShowDataResult(false)
403 CNLiveNetworking.setupDSRequest(true) 403 CNLiveNetworking.setupDSRequest(true)
@@ -430,8 +430,8 @@ class CNLiveShopViewModel: NSObject { @@ -430,8 +430,8 @@ class CNLiveShopViewModel: NSObject {
430 /// - resultBlock: 返回 430 /// - resultBlock: 返回
431 static func requestExpressList(resultBlock: @escaping resultShopBlock) { 431 static func requestExpressList(resultBlock: @escaping resultShopBlock) {
432 let custom_param = NSMutableDictionary() 432 let custom_param = NSMutableDictionary()
433 - custom_param.setValue(APPId_wjj, forKey: "appId")  
434 - custom_param.setValue(APPKey_wjj, forKey: "appKey") 433 + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId")
  434 + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey")
435 CNLiveNetworking.setAllowRequestDefaultArgument(true) 435 CNLiveNetworking.setAllowRequestDefaultArgument(true)
436 CNLiveNetworking.setupShowDataResult(false) 436 CNLiveNetworking.setupShowDataResult(false)
437 CNLiveNetworking.setupDSRequest(true) 437 CNLiveNetworking.setupDSRequest(true)
@@ -478,8 +478,8 @@ class CNLiveShopViewModel: NSObject { @@ -478,8 +478,8 @@ class CNLiveShopViewModel: NSObject {
478 let param = NSMutableDictionary() 478 let param = NSMutableDictionary()
479 param.setValue(orderId, forKey: "id") 479 param.setValue(orderId, forKey: "id")
480 let custom_param = NSMutableDictionary() 480 let custom_param = NSMutableDictionary()
481 - custom_param.setValue(APPId_wjj, forKey: "appId")  
482 - custom_param.setValue(APPKey_wjj, forKey: "appKey") 481 + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId")
  482 + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey")
483 CNLiveNetworking.setAllowRequestDefaultArgument(true) 483 CNLiveNetworking.setAllowRequestDefaultArgument(true)
484 CNLiveNetworking.setupShowDataResult(false) 484 CNLiveNetworking.setupShowDataResult(false)
485 CNLiveNetworking.setupDSRequest(true) 485 CNLiveNetworking.setupDSRequest(true)
@@ -539,8 +539,8 @@ class CNLiveShopViewModel: NSObject { @@ -539,8 +539,8 @@ class CNLiveShopViewModel: NSObject {
539 url = "/api/v1/getRefundExpress" 539 url = "/api/v1/getRefundExpress"
540 } 540 }
541 let custom_param = NSMutableDictionary() 541 let custom_param = NSMutableDictionary()
542 - custom_param.setValue(APPId_wjj, forKey: "appId")  
543 - custom_param.setValue(APPKey_wjj, forKey: "appKey") 542 + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId")
  543 + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey")
544 CNLiveNetworking.setAllowRequestDefaultArgument(true) 544 CNLiveNetworking.setAllowRequestDefaultArgument(true)
545 CNLiveNetworking.setupShowDataResult(false) 545 CNLiveNetworking.setupShowDataResult(false)
546 CNLiveNetworking.setupDSRequest(true) 546 CNLiveNetworking.setupDSRequest(true)
@@ -593,8 +593,8 @@ class CNLiveShopViewModel: NSObject { @@ -593,8 +593,8 @@ class CNLiveShopViewModel: NSObject {
593 param.setValue("2", forKey: "type") 593 param.setValue("2", forKey: "type")
594 } 594 }
595 let custom_param = NSMutableDictionary() 595 let custom_param = NSMutableDictionary()
596 - custom_param.setValue(APPId_wjj, forKey: "appId")  
597 - custom_param.setValue(APPKey_wjj, forKey: "appKey") 596 + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId")
  597 + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey")
598 CNLiveNetworking.setAllowRequestDefaultArgument(true) 598 CNLiveNetworking.setAllowRequestDefaultArgument(true)
599 CNLiveNetworking.setupShowDataResult(false) 599 CNLiveNetworking.setupShowDataResult(false)
600 CNLiveNetworking.setupDSRequest(true) 600 CNLiveNetworking.setupDSRequest(true)
@@ -645,8 +645,8 @@ class CNLiveShopViewModel: NSObject { @@ -645,8 +645,8 @@ class CNLiveShopViewModel: NSObject {
645 param.setValue(keyword, forKey: "keyword") 645 param.setValue(keyword, forKey: "keyword")
646 param.setValue("\(page)", forKey: "page") 646 param.setValue("\(page)", forKey: "page")
647 let custom_param = NSMutableDictionary() 647 let custom_param = NSMutableDictionary()
648 - custom_param.setValue(APPId_wjj, forKey: "appId")  
649 - custom_param.setValue(APPKey_wjj, forKey: "appKey") 648 + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId")
  649 + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey")
650 CNLiveNetworking.setAllowRequestDefaultArgument(true) 650 CNLiveNetworking.setAllowRequestDefaultArgument(true)
651 CNLiveNetworking.setupShowDataResult(false) 651 CNLiveNetworking.setupShowDataResult(false)
652 CNLiveNetworking.setupDSRequest(true) 652 CNLiveNetworking.setupDSRequest(true)
@@ -849,8 +849,8 @@ class CNLiveShopViewModel: NSObject { @@ -849,8 +849,8 @@ class CNLiveShopViewModel: NSObject {
849 param.setValue(goodsId, forKey: "goods_id") 849 param.setValue(goodsId, forKey: "goods_id")
850 print("创建优惠券数据===>\(param)") 850 print("创建优惠券数据===>\(param)")
851 let custom_param = NSMutableDictionary() 851 let custom_param = NSMutableDictionary()
852 - custom_param.setValue(APPId_wjj, forKey: "appId")  
853 - custom_param.setValue(APPKey_wjj, forKey: "appKey") 852 + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId")
  853 + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey")
854 CNLiveNetworking.setAllowRequestDefaultArgument(true) 854 CNLiveNetworking.setAllowRequestDefaultArgument(true)
855 CNLiveNetworking.setupShowDataResult(false) 855 CNLiveNetworking.setupShowDataResult(false)
856 CNLiveNetworking.setupDSRequest(true) 856 CNLiveNetworking.setupDSRequest(true)
@@ -910,8 +910,8 @@ class CNLiveShopViewModel: NSObject { @@ -910,8 +910,8 @@ class CNLiveShopViewModel: NSObject {
910 param.setValue(model.goods_id, forKey: "goods_id") 910 param.setValue(model.goods_id, forKey: "goods_id")
911 print("修改优惠券数据===>\(param)") 911 print("修改优惠券数据===>\(param)")
912 let custom_param = NSMutableDictionary() 912 let custom_param = NSMutableDictionary()
913 - custom_param.setValue(APPId_wjj, forKey: "appId")  
914 - custom_param.setValue(APPKey_wjj, forKey: "appKey") 913 + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId")
  914 + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey")
915 CNLiveNetworking.setAllowRequestDefaultArgument(true) 915 CNLiveNetworking.setAllowRequestDefaultArgument(true)
916 CNLiveNetworking.setupShowDataResult(false) 916 CNLiveNetworking.setupShowDataResult(false)
917 CNLiveNetworking.setupDSRequest(true) 917 CNLiveNetworking.setupDSRequest(true)
@@ -949,8 +949,8 @@ class CNLiveShopViewModel: NSObject { @@ -949,8 +949,8 @@ class CNLiveShopViewModel: NSObject {
949 let param = NSMutableDictionary() 949 let param = NSMutableDictionary()
950 param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "uid") 950 param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "uid")
951 let custom_param = NSMutableDictionary() 951 let custom_param = NSMutableDictionary()
952 - custom_param.setValue(APPId_wjj, forKey: "appId")  
953 - custom_param.setValue(APPKey_wjj, forKey: "appKey") 952 + custom_param.setValue(CNLiveEnvironmentManager.shared.appId_wjj, forKey: "appId")
  953 + custom_param.setValue(CNLiveEnvironmentManager.shared.appKey_wjj, forKey: "appKey")
954 CNLiveNetworking.setAllowRequestDefaultArgument(true) 954 CNLiveNetworking.setAllowRequestDefaultArgument(true)
955 CNLiveNetworking.setupShowDataResult(false) 955 CNLiveNetworking.setupShowDataResult(false)
956 CNLiveNetworking.setupDSRequest(true) 956 CNLiveNetworking.setupDSRequest(true)