Commit 8e1124364b865a0d6db7c0c4713171d57ed54953
1 parent
4736d036
商品 , 店铺分类跳转 ;
所有vc true
Showing
15 changed files
with
94 additions
and
89 deletions
metaCode/Classes/CustomView/CNLiveAlertTool.swift
| @@ -21,7 +21,7 @@ class AlertTool: NSObject { | @@ -21,7 +21,7 @@ class AlertTool: NSObject { | ||
| 21 | static func showSystemAlert(title:String?, message:String?, actionTitles:Array<String>, cancelTitle:String="", style:UIAlertController.Style, actionStyles:Array<UIAlertAction.Style>=[], completion: @escaping ((_ index: Int) -> ())) { | 21 | static func showSystemAlert(title:String?, message:String?, actionTitles:Array<String>, cancelTitle:String="", style:UIAlertController.Style, actionStyles:Array<UIAlertAction.Style>=[], completion: @escaping ((_ index: Int) -> ())) { |
| 22 | 22 | ||
| 23 | let vc = UIApplication.shared.keyWindow?.rootViewController | 23 | let vc = UIApplication.shared.keyWindow?.rootViewController |
| 24 | - vc?.dismiss(animated: false) | 24 | + vc?.dismiss(animated: true) |
| 25 | 25 | ||
| 26 | DispatchQueue.main.async { | 26 | DispatchQueue.main.async { |
| 27 | let alertController = UIAlertController(title: title, message: message, preferredStyle: style) | 27 | let alertController = UIAlertController(title: title, message: message, preferredStyle: style) |
metaCode/Classes/Main/HomePage/Controller/CNLiveShopConsoleController.swift
| @@ -87,11 +87,11 @@ class CNLiveShopConsoleController: CNLiveBaseViewController, UICollectionViewDel | @@ -87,11 +87,11 @@ class CNLiveShopConsoleController: CNLiveBaseViewController, UICollectionViewDel | ||
| 87 | let itemModel = listMdl.list[indexPath.item] | 87 | let itemModel = listMdl.list[indexPath.item] |
| 88 | if itemModel.type == CNLiveShopConsoleType.XZSP.rawValue{ | 88 | if itemModel.type == CNLiveShopConsoleType.XZSP.rawValue{ |
| 89 | //商城新增商品 | 89 | //商城新增商品 |
| 90 | - | 90 | + currentViewController()?.navigationController?.pushViewController(CNLiveShopNewProductController.init(), animated: true) |
| 91 | 91 | ||
| 92 | }else if itemModel.type == CNLiveShopConsoleType.SPGL.rawValue{ | 92 | }else if itemModel.type == CNLiveShopConsoleType.SPGL.rawValue{ |
| 93 | //商城商品管理 | 93 | //商城商品管理 |
| 94 | - currentViewController()?.navigationController?.pushViewController(CNLiveShopProductManagerController.init(), animated: false) | 94 | + currentViewController()?.navigationController?.pushViewController(CNLiveShopProductManagerController.init(), animated: true) |
| 95 | }else if itemModel.type == CNLiveShopConsoleType.XZYHQ.rawValue{ | 95 | }else if itemModel.type == CNLiveShopConsoleType.XZYHQ.rawValue{ |
| 96 | //新增优惠券 | 96 | //新增优惠券 |
| 97 | 97 | ||
| @@ -100,7 +100,9 @@ class CNLiveShopConsoleController: CNLiveBaseViewController, UICollectionViewDel | @@ -100,7 +100,9 @@ class CNLiveShopConsoleController: CNLiveBaseViewController, UICollectionViewDel | ||
| 100 | 100 | ||
| 101 | }else if itemModel.type == CNLiveShopConsoleType.CreateShopClassify.rawValue{ | 101 | }else if itemModel.type == CNLiveShopConsoleType.CreateShopClassify.rawValue{ |
| 102 | //创建店铺分类 | 102 | //创建店铺分类 |
| 103 | - | 103 | + let vc = CNLiveCreateShopClassifyViewController() |
| 104 | + vc.classifyType = .oneLevelClassify | ||
| 105 | + currentViewController()?.navigationController?.pushViewController(vc, animated: true) | ||
| 104 | }else if itemModel.type == CNLiveShopConsoleType.ShopClassifyManager.rawValue{ | 106 | }else if itemModel.type == CNLiveShopConsoleType.ShopClassifyManager.rawValue{ |
| 105 | //店铺分类管理 | 107 | //店铺分类管理 |
| 106 | 108 | ||
| @@ -112,7 +114,7 @@ class CNLiveShopConsoleController: CNLiveBaseViewController, UICollectionViewDel | @@ -112,7 +114,7 @@ class CNLiveShopConsoleController: CNLiveBaseViewController, UICollectionViewDel | ||
| 112 | 114 | ||
| 113 | }else if itemModel.type == CNLiveShopConsoleType.DDGL.rawValue{ | 115 | }else if itemModel.type == CNLiveShopConsoleType.DDGL.rawValue{ |
| 114 | //订单管理 | 116 | //订单管理 |
| 115 | - currentViewController()?.navigationController?.pushViewController(CNLiveShopOrderViewController.init(), animated: false) | 117 | + currentViewController()?.navigationController?.pushViewController(CNLiveShopOrderViewController.init(), animated: true) |
| 116 | } | 118 | } |
| 117 | // else if itemModel.type == CNLiveShopConsoleType.SH.rawValue{ | 119 | // else if itemModel.type == CNLiveShopConsoleType.SH.rawValue{ |
| 118 | // //退款/售后 | 120 | // //退款/售后 |
| @@ -120,12 +122,12 @@ class CNLiveShopConsoleController: CNLiveBaseViewController, UICollectionViewDel | @@ -120,12 +122,12 @@ class CNLiveShopConsoleController: CNLiveBaseViewController, UICollectionViewDel | ||
| 120 | // } | 122 | // } |
| 121 | else if itemModel.type == CNLiveShopConsoleType.JYJL.rawValue{ | 123 | else if itemModel.type == CNLiveShopConsoleType.JYJL.rawValue{ |
| 122 | //交易记录 | 124 | //交易记录 |
| 123 | - | 125 | + self.navigationController?.pushViewController(CNLiveShopTransViewController.init(), animated: true) |
| 124 | }else if itemModel.type == CNLiveShopConsoleType.OnManagerment.rawValue{ | 126 | }else if itemModel.type == CNLiveShopConsoleType.OnManagerment.rawValue{ |
| 125 | //直播管理 | 127 | //直播管理 |
| 126 | let webVC = CNWebViewController() | 128 | let webVC = CNWebViewController() |
| 127 | webVC.url = URL(string: "http://wjjh5.cnlive.com/apkdownloadShop.php") | 129 | webVC.url = URL(string: "http://wjjh5.cnlive.com/apkdownloadShop.php") |
| 128 | - currentViewController()?.navigationController?.pushViewController(webVC, animated: false) | 130 | + currentViewController()?.navigationController?.pushViewController(webVC, animated: true) |
| 129 | } | 131 | } |
| 130 | } | 132 | } |
| 131 | 133 |
metaCode/Classes/Main/HomePage/Controller/CNUpSlideCardPresentationController.swift
| @@ -22,7 +22,7 @@ class CNUpSlideCardPresentationController: UIPresentationController { | @@ -22,7 +22,7 @@ class CNUpSlideCardPresentationController: UIPresentationController { | ||
| 22 | blurView.edges(to: container) | 22 | blurView.edges(to: container) |
| 23 | blurView.alpha = 0.0 | 23 | blurView.alpha = 0.0 |
| 24 | 24 | ||
| 25 | - presentingViewController.beginAppearanceTransition(false, animated: false) | 25 | + presentingViewController.beginAppearanceTransition(false, animated: true) |
| 26 | presentedViewController.transitionCoordinator!.animate(alongsideTransition: { (ctx) in | 26 | presentedViewController.transitionCoordinator!.animate(alongsideTransition: { (ctx) in |
| 27 | self.blurView.effect = UIBlurEffect(style: .light) | 27 | self.blurView.effect = UIBlurEffect(style: .light) |
| 28 | self.blurView.alpha = 1 | 28 | self.blurView.alpha = 1 |
metaCode/Classes/Main/HomePage/Controller/GoodsManager/CNLiveCreateShopClassifyViewController.swift
| @@ -324,7 +324,9 @@ class CNLiveCreateShopClassifyViewController:CNLiveBaseViewController, UITableVi | @@ -324,7 +324,9 @@ class CNLiveCreateShopClassifyViewController:CNLiveBaseViewController, UITableVi | ||
| 324 | if status == .success{ | 324 | if status == .success{ |
| 325 | showMessage(message: "保存成功") | 325 | showMessage(message: "保存成功") |
| 326 | self.navigationController?.popViewController(animated: true) | 326 | self.navigationController?.popViewController(animated: true) |
| 327 | - self.successCompleteBlock!() | 327 | + if (self.successCompleteBlock?()) != nil{ |
| 328 | + self.successCompleteBlock!() | ||
| 329 | + } | ||
| 328 | }else{ | 330 | }else{ |
| 329 | showMessage(message: "保存失败") | 331 | showMessage(message: "保存失败") |
| 330 | } | 332 | } |
metaCode/Classes/Main/HomePage/Controller/GoodsManager/CNLiveGoodsCategoryController.swift
| @@ -278,6 +278,7 @@ class CNLiveGoodsCategoryController: CNLiveBaseViewController, UITableViewDataSo | @@ -278,6 +278,7 @@ class CNLiveGoodsCategoryController: CNLiveBaseViewController, UITableViewDataSo | ||
| 278 | 278 | ||
| 279 | // MARK: - 显示/隐藏方法 | 279 | // MARK: - 显示/隐藏方法 |
| 280 | public func display(){ | 280 | public func display(){ |
| 281 | + | ||
| 281 | self.view.isUserInteractionEnabled = true | 282 | self.view.isUserInteractionEnabled = true |
| 282 | UIView.animate(withDuration: 0.2) { | 283 | UIView.animate(withDuration: 0.2) { |
| 283 | self.shadowView?.alpha = 1 | 284 | self.shadowView?.alpha = 1 |
| @@ -478,7 +479,7 @@ class CNLiveGoodsCategoryController: CNLiveBaseViewController, UITableViewDataSo | @@ -478,7 +479,7 @@ class CNLiveGoodsCategoryController: CNLiveBaseViewController, UITableViewDataSo | ||
| 478 | vc.successCompleteBlock = { | 479 | vc.successCompleteBlock = { |
| 479 | self.postShopClassify() | 480 | self.postShopClassify() |
| 480 | } | 481 | } |
| 481 | - self.navigationController?.pushViewController(vc, animated: false) | 482 | + self.navigationController?.pushViewController(vc, animated: true) |
| 482 | } | 483 | } |
| 483 | 484 | ||
| 484 | // MARK: - 数据请求 | 485 | // MARK: - 数据请求 |
metaCode/Classes/Main/HomePage/Controller/GoodsManager/CNLiveShopNewProductController.swift
| @@ -58,12 +58,11 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | @@ -58,12 +58,11 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | ||
| 58 | singleView1.layoutSubviews() | 58 | singleView1.layoutSubviews() |
| 59 | } | 59 | } |
| 60 | self.addChild(vc) | 60 | self.addChild(vc) |
| 61 | - vc.view.frame = CGRect(x: 0, y: KNavigationHeight, width: self.view.width, height: self.view.height-KNavigationHeight) | 61 | + vc.view.frame = CGRect(x: 0, y: 0, width: self.view.width, height: self.view.height) |
| 62 | vc.didMove(toParent: self) | 62 | vc.didMove(toParent: self) |
| 63 | self.view.addSubview(vc.view) | 63 | self.view.addSubview(vc.view) |
| 64 | _selectCategoryVC = vc | 64 | _selectCategoryVC = vc |
| 65 | } | 65 | } |
| 66 | - | ||
| 67 | return _selectCategoryVC | 66 | return _selectCategoryVC |
| 68 | } | 67 | } |
| 69 | set{ | 68 | set{ |
| @@ -72,56 +71,62 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | @@ -72,56 +71,62 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | ||
| 72 | 71 | ||
| 73 | } | 72 | } |
| 74 | } | 73 | } |
| 75 | - | ||
| 76 | - // lazy var selectCategoryVC :CNLiveGoodsCategoryController = { | 74 | + |
| 75 | + var _selectShopClassifyVC:CNLiveGoodsCategoryController? | ||
| 76 | + var selectShopClassifyVC:CNLiveGoodsCategoryController?{ | ||
| 77 | + get{ | ||
| 78 | + if _selectShopClassifyVC == nil{ | ||
| 79 | + let vc = CNLiveGoodsCategoryController() | ||
| 80 | + | ||
| 81 | + vc.categoryType = .shop | ||
| 82 | + if self.shopGoodsDetailsModel.id?.count ?? 0 > 0{ | ||
| 83 | + vc.firCategoryId = self.shopGoodsDetailsModel.category_id | ||
| 84 | + vc.secCategoryId = self.shopGoodsDetailsModel.category_id2 | ||
| 85 | + } | ||
| 86 | + vc.finishBlock = { | ||
| 87 | + var singleView = self.getShopClassifyView() | ||
| 88 | + singleView?.contentTextField.text = "\(self.selectShopClassifyVC!.firCategoryName ?? "") \(self.selectShopClassifyVC!.secCategoryName ?? "")" | ||
| 89 | + singleView?.layoutSubviews() | ||
| 90 | + } | ||
| 91 | + self.addChild(vc) | ||
| 92 | + vc.view.frame = CGRect(x: 0, y: 0, width: self.view.width, height: self.view.height) | ||
| 93 | + self.view.addSubview(vc.view) | ||
| 94 | + vc.didMove(toParent: self) | ||
| 95 | + _selectShopClassifyVC = vc | ||
| 96 | + _selectShopClassifyVC!.hideView() | ||
| 97 | + } | ||
| 98 | + return _selectShopClassifyVC | ||
| 99 | + } | ||
| 100 | + set{ | ||
| 101 | + _selectShopClassifyVC = newValue | ||
| 102 | + } | ||
| 103 | + } | ||
| 104 | +// lazy var selectShopClassifyVC:CNLiveGoodsCategoryController = { | ||
| 105 | +// if selectShopClassifyVC == nil{ | ||
| 77 | // let vc = CNLiveGoodsCategoryController() | 106 | // let vc = CNLiveGoodsCategoryController() |
| 78 | -// vc.categoryType = .goods | 107 | +// |
| 108 | +// vc.categoryType = .shop | ||
| 79 | // if self.shopGoodsDetailsModel.id?.count ?? 0 > 0{ | 109 | // if self.shopGoodsDetailsModel.id?.count ?? 0 > 0{ |
| 80 | -// vc.firCategoryId = self.shopGoodsDetailsModel.groupid | ||
| 81 | -// vc.secCategoryId = self.shopGoodsDetailsModel.groupid2 | ||
| 82 | -// vc.thiCategoryId = self.shopGoodsDetailsModel.groupid3 | 110 | +// vc.firCategoryId = self.shopGoodsDetailsModel.category_id |
| 111 | +// vc.secCategoryId = self.shopGoodsDetailsModel.category_id2 | ||
| 83 | // } | 112 | // } |
| 84 | // vc.finishBlock = { | 113 | // vc.finishBlock = { |
| 85 | -// //商品分类 | ||
| 86 | -// let singleView1 = self.bgScrollView.viewWithTag(1) as! CNLiveShopAddGoodsSingleView | ||
| 87 | -// singleView1.contentTextField.text = "\(self.selectCategoryVC.firCategoryName ?? "") \(self.selectCategoryVC.secCategoryName ?? "")" | ||
| 88 | -// singleView1.layoutSubviews() | 114 | +// var singleView = self.getShopClassifyView() |
| 115 | +// singleView?.contentTextField.text = "\(self.selectShopClassifyVC.firCategoryName ?? "") \(self.selectShopClassifyVC.secCategoryName ?? "")" | ||
| 116 | +// singleView?.layoutSubviews() | ||
| 89 | // } | 117 | // } |
| 90 | -//// self.addChild(vc) | ||
| 91 | -//// vc.view.frame = CGRect(x: 0, y: 0, width: self.view.width, height: self.view.height) | ||
| 92 | -//// vc.didMove(toParent: self) | ||
| 93 | -//// self.view.addSubview(vc.view) | ||
| 94 | -// self.selectCategoryVC = vc | ||
| 95 | -// | ||
| 96 | -// return selectCategoryVC | 118 | +// self.addChild(vc) |
| 119 | +// vc.view.frame = CGRect(x: 0, y: 0, width: self.view.width, height: self.view.height) | ||
| 120 | +// self.view.addSubview(vc.view) | ||
| 121 | +// vc.didMove(toParent: self) | ||
| 122 | +// self.selectShopClassifyVC = vc | ||
| 123 | +// self.selectShopClassifyVC.hideView() | ||
| 124 | +// } | ||
| 125 | +// return self.selectShopClassifyVC | ||
| 126 | +// | ||
| 97 | // }() | 127 | // }() |
| 98 | 128 | ||
| 99 | 129 | ||
| 100 | - lazy var selectShopClassifyVC:CNLiveGoodsCategoryController = { | ||
| 101 | - | ||
| 102 | - let vc = CNLiveGoodsCategoryController() | ||
| 103 | - | ||
| 104 | - vc.categoryType = .shop | ||
| 105 | - if self.shopGoodsDetailsModel.id?.count ?? 0 > 0{ | ||
| 106 | - vc.firCategoryId = self.shopGoodsDetailsModel.category_id | ||
| 107 | - vc.secCategoryId = self.shopGoodsDetailsModel.category_id2 | ||
| 108 | - } | ||
| 109 | - vc.finishBlock = { | ||
| 110 | - var singleView = self.getShopClassifyView() | ||
| 111 | - singleView?.contentTextField.text = "\(self.selectShopClassifyVC.firCategoryName ?? "") \(self.selectShopClassifyVC.secCategoryName ?? "")" | ||
| 112 | - singleView?.layoutSubviews() | ||
| 113 | - } | ||
| 114 | - self.addChild(vc) | ||
| 115 | - vc.view.frame = CGRect(x: 0, y: 0, width: self.view.width, height: self.view.height) | ||
| 116 | - self.view.addSubview(vc.view) | ||
| 117 | - vc.didMove(toParent: self) | ||
| 118 | - self.selectShopClassifyVC = vc | ||
| 119 | - self.selectShopClassifyVC.hideView() | ||
| 120 | - return self.selectShopClassifyVC | ||
| 121 | - | ||
| 122 | - }() | ||
| 123 | - | ||
| 124 | - | ||
| 125 | lazy var bottomNavView :UIView = { | 130 | lazy var bottomNavView :UIView = { |
| 126 | let bottomNavView = UIView(frame: CGRect(x: 0, y: KSreenHeight-KTabBarHeight, width: self.view.width, height: KTabBarHeight)) | 131 | let bottomNavView = UIView(frame: CGRect(x: 0, y: KSreenHeight-KTabBarHeight, width: self.view.width, height: KTabBarHeight)) |
| 127 | bottomNavView.backgroundColor = HexColor("F2F2F2") | 132 | bottomNavView.backgroundColor = HexColor("F2F2F2") |
| @@ -144,23 +149,21 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | @@ -144,23 +149,21 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | ||
| 144 | self.bgScrollView.frame = CGRect(x: 0, y: KNavigationHeight, width: KSreenWidth, height: KSreenHeight-KNavigationHeight-KTabBarHeight) | 149 | self.bgScrollView.frame = CGRect(x: 0, y: KNavigationHeight, width: KSreenWidth, height: KSreenHeight-KNavigationHeight-KTabBarHeight) |
| 145 | var lastView:UIView? = nil | 150 | var lastView:UIView? = nil |
| 146 | for i in 0..<self.dataModel.list.count{ | 151 | for i in 0..<self.dataModel.list.count{ |
| 147 | - if let singleView = self.view.viewWithTag(i+1) as? CNLiveShopAddGoodsSingleView{ | 152 | + let singleView = self.bgScrollView.viewWithTag(i+1) as! CNLiveShopAddGoodsSingleView |
| 148 | singleView.frame = CGRect(x: 0, y: lastView?.bottom ?? 0, width: self.bgScrollView.width, height: singleView.height) | 153 | singleView.frame = CGRect(x: 0, y: lastView?.bottom ?? 0, width: self.bgScrollView.width, height: singleView.height) |
| 149 | if i+1 == 15{ | 154 | if i+1 == 15{ |
| 150 | singleView.frame = CGRect(x: 0, y: lastView?.bottom ?? 0, width: self.bgScrollView.width, height: 0.001) | 155 | singleView.frame = CGRect(x: 0, y: lastView?.bottom ?? 0, width: self.bgScrollView.width, height: 0.001) |
| 151 | } | 156 | } |
| 152 | lastView = singleView | 157 | lastView = singleView |
| 153 | - }else{ | ||
| 154 | - | ||
| 155 | - } | 158 | + |
| 156 | } | 159 | } |
| 157 | self.bgScrollView.contentSize = CGSize(width: self.bgScrollView.width, height: lastView?.bottom ?? 0) | 160 | self.bgScrollView.contentSize = CGSize(width: self.bgScrollView.width, height: lastView?.bottom ?? 0) |
| 158 | - self.selectCategoryVC!.view.frame = CGRect(x: 0, y: KNavigationHeight, width: self.view.width, height: self.view.height-KNavigationHeight) | 161 | + self.selectCategoryVC!.view.frame = CGRect(x: 0, y: 0, width: self.view.width, height: self.view.height) |
| 159 | } | 162 | } |
| 160 | 163 | ||
| 161 | deinit { | 164 | deinit { |
| 162 | for i in 0..<self.dataModel.list.count{ | 165 | for i in 0..<self.dataModel.list.count{ |
| 163 | - let singleView = self.view.viewWithTag(i+1) as! CNLiveShopAddGoodsSingleView | 166 | + let singleView = self.bgScrollView.viewWithTag(i+1) as! CNLiveShopAddGoodsSingleView |
| 164 | if singleView.addEditGoodsListModel?.style == "3"{ | 167 | if singleView.addEditGoodsListModel?.style == "3"{ |
| 165 | singleView.uploadImageView.deleteUploadImageUrlAfterCancelUploadThings() | 168 | singleView.uploadImageView.deleteUploadImageUrlAfterCancelUploadThings() |
| 166 | } | 169 | } |
| @@ -324,10 +327,7 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | @@ -324,10 +327,7 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | ||
| 324 | 327 | ||
| 325 | // MARK: - 显示选取分类界面 | 328 | // MARK: - 显示选取分类界面 |
| 326 | func displaySelectCategoryVC(){ | 329 | func displaySelectCategoryVC(){ |
| 327 | -// self.addChild(self.selectCategoryVC!) | ||
| 328 | -// self.selectCategoryVC!.view.frame = CGRect(x: 0, y: 0, width: self.view.width, height: self.view.height) | ||
| 329 | -// self.selectCategoryVC!.didMove(toParent: self) | ||
| 330 | -// self.view.addSubview(self.selectCategoryVC!.view) | 330 | + self.view.bringSubviewToFront(self.selectCategoryVC!.view) |
| 331 | self.selectCategoryVC!.display() | 331 | self.selectCategoryVC!.display() |
| 332 | } | 332 | } |
| 333 | 333 | ||
| @@ -345,7 +345,7 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | @@ -345,7 +345,7 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | ||
| 345 | } | 345 | } |
| 346 | // MARK: - 显示选取店铺分类界面 | 346 | // MARK: - 显示选取店铺分类界面 |
| 347 | func displaySelectShopClassifyVC(){ | 347 | func displaySelectShopClassifyVC(){ |
| 348 | - self.selectShopClassifyVC.display() | 348 | + self.selectShopClassifyVC!.display() |
| 349 | } | 349 | } |
| 350 | 350 | ||
| 351 | // MARK: - 字符串trim处理 | 351 | // MARK: - 字符串trim处理 |
| @@ -415,7 +415,7 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | @@ -415,7 +415,7 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | ||
| 415 | showMessage(message: "请选择商品详情图") | 415 | showMessage(message: "请选择商品详情图") |
| 416 | return | 416 | return |
| 417 | } | 417 | } |
| 418 | - else if (self.selectShopClassifyVC.firCategoryId == 0) { | 418 | + else if (self.selectShopClassifyVC!.firCategoryId == 0) { |
| 419 | showMessage(message: "请选择店铺分类") | 419 | showMessage(message: "请选择店铺分类") |
| 420 | return | 420 | return |
| 421 | } | 421 | } |
| @@ -440,8 +440,8 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | @@ -440,8 +440,8 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | ||
| 440 | goodsDetailsModel.ads = singleView6.contentTextView.text | 440 | goodsDetailsModel.ads = singleView6.contentTextView.text |
| 441 | goodsDetailsModel.price = singleView7.contentTextField.text | 441 | goodsDetailsModel.price = singleView7.contentTextField.text |
| 442 | goodsDetailsModel.prices = singleView8.contentTextField.text | 442 | goodsDetailsModel.prices = singleView8.contentTextField.text |
| 443 | - goodsDetailsModel.category_id = self.selectShopClassifyVC.firCategoryId | ||
| 444 | - goodsDetailsModel.category_id2 = self.selectShopClassifyVC.secCategoryId | 443 | + goodsDetailsModel.category_id = self.selectShopClassifyVC!.firCategoryId |
| 444 | + goodsDetailsModel.category_id2 = self.selectShopClassifyVC!.secCategoryId | ||
| 445 | let contentDetailsImage = NSMutableArray() | 445 | let contentDetailsImage = NSMutableArray() |
| 446 | for imageUrl in contentDetailsSelectImageUrls{ | 446 | for imageUrl in contentDetailsSelectImageUrls{ |
| 447 | let model = CNLiveGoodsDetailsContentModel() | 447 | let model = CNLiveGoodsDetailsContentModel() |
| @@ -473,7 +473,7 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | @@ -473,7 +473,7 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | ||
| 473 | vc.type = .preview | 473 | vc.type = .preview |
| 474 | vc.detailsModel = goodsDetailsModel | 474 | vc.detailsModel = goodsDetailsModel |
| 475 | vc.goodsId = self.goodsId | 475 | vc.goodsId = self.goodsId |
| 476 | - self.navigationController?.pushViewController(vc, animated: false) | 476 | + self.navigationController?.pushViewController(vc, animated: true) |
| 477 | } | 477 | } |
| 478 | @objc func saveBtnClick(){ | 478 | @objc func saveBtnClick(){ |
| 479 | //商品轮播 | 479 | //商品轮播 |
| @@ -542,7 +542,7 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | @@ -542,7 +542,7 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | ||
| 542 | if self.type == .add && self.selectCategoryVC!.thiCategoryId == 0{ | 542 | if self.type == .add && self.selectCategoryVC!.thiCategoryId == 0{ |
| 543 | showMessage(message: "请选择商品分类") | 543 | showMessage(message: "请选择商品分类") |
| 544 | return | 544 | return |
| 545 | - }else if self.selectShopClassifyVC.firCategoryId == 0{ | 545 | + }else if self.selectShopClassifyVC!.firCategoryId == 0{ |
| 546 | showMessage(message: "请选择店铺分类") | 546 | showMessage(message: "请选择店铺分类") |
| 547 | return | 547 | return |
| 548 | }else if bannersSelectImageUrls.count == 0 && bannerSelectVideoUrl.count == 0{ | 548 | }else if bannersSelectImageUrls.count == 0 && bannerSelectVideoUrl.count == 0{ |
| @@ -629,10 +629,10 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | @@ -629,10 +629,10 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | ||
| 629 | } | 629 | } |
| 630 | } | 630 | } |
| 631 | var category_id = 0 | 631 | var category_id = 0 |
| 632 | - if self.selectShopClassifyVC.secCategoryId != 0 { | ||
| 633 | - category_id = self.selectShopClassifyVC.secCategoryId | 632 | + if self.selectShopClassifyVC!.secCategoryId != 0 { |
| 633 | + category_id = self.selectShopClassifyVC!.secCategoryId | ||
| 634 | }else{ | 634 | }else{ |
| 635 | - category_id = self.selectShopClassifyVC.firCategoryId | 635 | + category_id = self.selectShopClassifyVC!.firCategoryId |
| 636 | } | 636 | } |
| 637 | showLoading(message: "") | 637 | showLoading(message: "") |
| 638 | if self.type == .add{ | 638 | if self.type == .add{ |
| @@ -646,7 +646,7 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | @@ -646,7 +646,7 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | ||
| 646 | showMessage(message: "发布成功") | 646 | showMessage(message: "发布成功") |
| 647 | NotificationCenter.default.post(name: NSNotification.Name.ShopGoodsManage.kDSGoodsManageAddNotification, object: nil) | 647 | NotificationCenter.default.post(name: NSNotification.Name.ShopGoodsManage.kDSGoodsManageAddNotification, object: nil) |
| 648 | for i in 0..<self.dataModel.list.count{ | 648 | for i in 0..<self.dataModel.list.count{ |
| 649 | - let singleView = self.view.viewWithTag(i+1) as! CNLiveShopAddGoodsSingleView | 649 | + let singleView = self.bgScrollView.viewWithTag(i+1) as! CNLiveShopAddGoodsSingleView |
| 650 | if singleView.addEditGoodsListModel?.style == "3"{ | 650 | if singleView.addEditGoodsListModel?.style == "3"{ |
| 651 | singleView.uploadImageView.deleteReplaceImageUrlAfterSuccessUploadThings() | 651 | singleView.uploadImageView.deleteReplaceImageUrlAfterSuccessUploadThings() |
| 652 | } | 652 | } |
| @@ -678,11 +678,11 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | @@ -678,11 +678,11 @@ class CNLiveShopNewProductController:CNLiveBaseViewController{ | ||
| 678 | showMessage(message: "修改成功") | 678 | showMessage(message: "修改成功") |
| 679 | NotificationCenter.default.post(name: NSNotification.Name.ShopGoodsManage.kDSGoodsManageEditNotification, object: nil, userInfo: (result as! Dictionary)) | 679 | NotificationCenter.default.post(name: NSNotification.Name.ShopGoodsManage.kDSGoodsManageEditNotification, object: nil, userInfo: (result as! Dictionary)) |
| 680 | for i in 0..<self.dataModel.list.count{ | 680 | for i in 0..<self.dataModel.list.count{ |
| 681 | - if let singleView = self.view.viewWithTag(i+1) as? CNLiveShopAddGoodsSingleView{ | 681 | + let singleView = self.bgScrollView.viewWithTag(i+1) as! CNLiveShopAddGoodsSingleView |
| 682 | if singleView.addEditGoodsListModel?.style == "3"{ | 682 | if singleView.addEditGoodsListModel?.style == "3"{ |
| 683 | singleView.uploadImageView.deleteReplaceImageUrlAfterSuccessUploadThings() | 683 | singleView.uploadImageView.deleteReplaceImageUrlAfterSuccessUploadThings() |
| 684 | } | 684 | } |
| 685 | - } | 685 | + |
| 686 | } | 686 | } |
| 687 | self.navigationController?.popViewController(animated: true) | 687 | self.navigationController?.popViewController(animated: true) |
| 688 | } | 688 | } |
metaCode/Classes/Main/HomePage/Controller/GoodsManager/CNLiveShopProductManagerController.swift
| @@ -180,7 +180,7 @@ class CNLiveShopProductManagerController:CNLiveBaseViewController, UITableViewDa | @@ -180,7 +180,7 @@ class CNLiveShopProductManagerController:CNLiveBaseViewController, UITableViewDa | ||
| 180 | let vc = CNLiveShopNewProductController.init() | 180 | let vc = CNLiveShopNewProductController.init() |
| 181 | vc.type = .edit | 181 | vc.type = .edit |
| 182 | vc.goodsId = goodsModel.id! | 182 | vc.goodsId = goodsModel.id! |
| 183 | - self.navigationController?.pushViewController(vc, animated: false) | 183 | + self.navigationController?.pushViewController(vc, animated: true) |
| 184 | } | 184 | } |
| 185 | 185 | ||
| 186 | // MARK: - 编辑商品库存 | 186 | // MARK: - 编辑商品库存 |
metaCode/Classes/Main/HomePage/View/CNCustomIndexView.swift
| @@ -260,7 +260,7 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange | @@ -260,7 +260,7 @@ class CNCustomIndexView:PGIndexBannerSubiew, UIScrollViewDelegate, WJColorChange | ||
| 260 | self.baseScrollView.addSubview(self.upSlideView) | 260 | self.baseScrollView.addSubview(self.upSlideView) |
| 261 | self.addSubview(self.topNavView) | 261 | self.addSubview(self.topNavView) |
| 262 | //默认偏移到中间 | 262 | //默认偏移到中间 |
| 263 | - self.baseScrollView.setContentOffset(CGPointMake(0, self.frame.size.height), animated: false) | 263 | + self.baseScrollView.setContentOffset(CGPointMake(0, self.frame.size.height), animated: true) |
| 264 | } | 264 | } |
| 265 | 265 | ||
| 266 | // func addCustomGestureRecognizer(){ | 266 | // func addCustomGestureRecognizer(){ |
metaCode/Classes/Main/HomePage/View/CNLiveShopDetailBtnsCell.swift
| @@ -74,10 +74,10 @@ class CNLiveShopDetailBtnsCell: UICollectionViewCell { | @@ -74,10 +74,10 @@ class CNLiveShopDetailBtnsCell: UICollectionViewCell { | ||
| 74 | ///push VC | 74 | ///push VC |
| 75 | if tag == 100 { | 75 | if tag == 100 { |
| 76 | //商品管理 | 76 | //商品管理 |
| 77 | - currentViewController()?.navigationController?.pushViewController(CNLiveShopProductManagerController.init(), animated: false) | 77 | + currentViewController()?.navigationController?.pushViewController(CNLiveShopProductManagerController.init(), animated: true) |
| 78 | }else if tag == 101 { | 78 | }else if tag == 101 { |
| 79 | //订单管理 | 79 | //订单管理 |
| 80 | - currentViewController()?.navigationController?.pushViewController(CNLiveShopOrderViewController.init(), animated: false) | 80 | + currentViewController()?.navigationController?.pushViewController(CNLiveShopOrderViewController.init(), animated: true) |
| 81 | } | 81 | } |
| 82 | // if tag == 100 { | 82 | // if tag == 100 { |
| 83 | // //发布动态 | 83 | // //发布动态 |
| @@ -85,7 +85,7 @@ class CNLiveShopDetailBtnsCell: UICollectionViewCell { | @@ -85,7 +85,7 @@ class CNLiveShopDetailBtnsCell: UICollectionViewCell { | ||
| 85 | // //商品管理 | 85 | // //商品管理 |
| 86 | // let webVC = CNWebViewController() | 86 | // let webVC = CNWebViewController() |
| 87 | // webVC.url = URL(string:"https://www.baidu.com") | 87 | // webVC.url = URL(string:"https://www.baidu.com") |
| 88 | -// currentViewController()?.navigationController?.pushViewController(webVC, animated: false) | 88 | +// currentViewController()?.navigationController?.pushViewController(webVC, animated: true) |
| 89 | // | 89 | // |
| 90 | // }else if tag == 102 { | 90 | // }else if tag == 102 { |
| 91 | // //订单管理 | 91 | // //订单管理 |
metaCode/Classes/Main/HomePage/View/CNLiveShopDetailOrderAssetCell.swift
| @@ -125,7 +125,7 @@ class CNLiveShopDetailOrderAssetCell:UICollectionViewCell{ | @@ -125,7 +125,7 @@ class CNLiveShopDetailOrderAssetCell:UICollectionViewCell{ | ||
| 125 | @objc func navsubBtnAction(_ sender: UIButton){ | 125 | @objc func navsubBtnAction(_ sender: UIButton){ |
| 126 | if self.displayType == .CNLiveShopDetailDisplayTypeOrder{ | 126 | if self.displayType == .CNLiveShopDetailDisplayTypeOrder{ |
| 127 | //push订单VC | 127 | //push订单VC |
| 128 | - currentViewController()?.navigationController?.pushViewController(CNLiveShopOrderViewController.init(), animated: false) | 128 | + currentViewController()?.navigationController?.pushViewController(CNLiveShopOrderViewController.init(), animated: true) |
| 129 | }else if self.displayType == .CNLiveShopDetailDisplayTypeAsset{ | 129 | }else if self.displayType == .CNLiveShopDetailDisplayTypeAsset{ |
| 130 | //push余额VC | 130 | //push余额VC |
| 131 | } | 131 | } |
metaCode/Classes/Main/HomePage/View/CNLliveShopDetailBannerCell.swift
| @@ -99,6 +99,6 @@ class CNLliveShopDetailBannerCell:UICollectionViewCell,FSPagerViewDataSource,FSP | @@ -99,6 +99,6 @@ class CNLliveShopDetailBannerCell:UICollectionViewCell,FSPagerViewDataSource,FSP | ||
| 99 | let bannerMdl = self.shopDetailModel?.banner[index] | 99 | let bannerMdl = self.shopDetailModel?.banner[index] |
| 100 | let webVC = CNWebViewController() | 100 | let webVC = CNWebViewController() |
| 101 | webVC.url = URL(string: bannerMdl?.url ?? "") | 101 | webVC.url = URL(string: bannerMdl?.url ?? "") |
| 102 | - currentViewController()?.navigationController?.pushViewController(webVC, animated: false) | 102 | + currentViewController()?.navigationController?.pushViewController(webVC, animated: true) |
| 103 | } | 103 | } |
| 104 | } | 104 | } |
metaCode/Classes/Main/HomePage/View/CNMainView.swift
| @@ -197,18 +197,18 @@ class CNFrontMainView : UIView{ | @@ -197,18 +197,18 @@ class CNFrontMainView : UIView{ | ||
| 197 | 197 | ||
| 198 | @objc func addStandBtnAction() { | 198 | @objc func addStandBtnAction() { |
| 199 | //跳转到添加身份页面 | 199 | //跳转到添加身份页面 |
| 200 | -// currentViewController()?.navigationController?.pushViewController(CNLiveMineInputViewController.init(listModel: _idModel!), animated: false) | 200 | +// currentViewController()?.navigationController?.pushViewController(CNLiveMineInputViewController.init(listModel: _idModel!), animated: true) |
| 201 | // DispatchQueue.main.asyncAfter(deadline: .now()+0.25){ | 201 | // DispatchQueue.main.asyncAfter(deadline: .now()+0.25){ |
| 202 | if _idModel!.id == 9 { | 202 | if _idModel!.id == 9 { |
| 203 | showLoading(message: "") | 203 | showLoading(message: "") |
| 204 | CNLiveMineViewModel.requestApplyShopInfo { [weak self] result, respStatue in | 204 | CNLiveMineViewModel.requestApplyShopInfo { [weak self] result, respStatue in |
| 205 | 205 | ||
| 206 | if respStatue == .success { | 206 | if respStatue == .success { |
| 207 | - currentViewController()?.navigationController?.pushViewController(CNLiveMineShopViewController.init(showType: .one, listModel: (self?.idModel)!, tempArray: []), animated: false) | 207 | + currentViewController()?.navigationController?.pushViewController(CNLiveMineShopViewController.init(showType: .one, listModel: (self?.idModel)!, tempArray: []), animated: true) |
| 208 | } | 208 | } |
| 209 | } | 209 | } |
| 210 | }else{ | 210 | }else{ |
| 211 | - currentViewController()?.navigationController?.pushViewController(CNLiveMineInputViewController.init(listModel: self._idModel!), animated: false) | 211 | + currentViewController()?.navigationController?.pushViewController(CNLiveMineInputViewController.init(listModel: self._idModel!), animated: true) |
| 212 | } | 212 | } |
| 213 | 213 | ||
| 214 | // } | 214 | // } |
metaCode/Classes/Main/HomePage/View/GoodsManager/CNLiveAddGoodsSelectUploadImageView.swift
| @@ -401,7 +401,7 @@ class CNLiveAddGoodsSelectUploadImageView: UIView,UIImagePickerControllerDelegat | @@ -401,7 +401,7 @@ class CNLiveAddGoodsSelectUploadImageView: UIView,UIImagePickerControllerDelegat | ||
| 401 | if self.height != 0 && self.height != height{ | 401 | if self.height != 0 && self.height != height{ |
| 402 | isNeedCallBack = true | 402 | isNeedCallBack = true |
| 403 | } | 403 | } |
| 404 | - super.frame = CGRect(x: frame.origin.x, y: frame.origin.y, width: frame.size.width, height: height == 0 ? frame.size.height : height) | 404 | + super.frame = CGRect(x: frame.origin.x, y: frame.origin.y, width: frame.size.width, height: height == 10 ? frame.size.height : height) |
| 405 | if isNeedCallBack{ | 405 | if isNeedCallBack{ |
| 406 | if (self.changeFrameCallBack?()) != nil{ | 406 | if (self.changeFrameCallBack?()) != nil{ |
| 407 | self.changeFrameCallBack!() | 407 | self.changeFrameCallBack!() |
metaCode/Classes/Main/Util/CNLiveCommonManager.swift
| @@ -21,6 +21,6 @@ class CNLiveCommonManager: NSObject{ | @@ -21,6 +21,6 @@ class CNLiveCommonManager: NSObject{ | ||
| 21 | let vc = CNLivePlayerViewController() | 21 | let vc = CNLivePlayerViewController() |
| 22 | vc.setPlayUrl(playUrl: playURL, isLive: false) | 22 | vc.setPlayUrl(playUrl: playURL, isLive: false) |
| 23 | vc.coverImageUrl = coverImageUrl | 23 | vc.coverImageUrl = coverImageUrl |
| 24 | - currentViewController()?.navigationController?.pushViewController(vc, animated: false) | 24 | + currentViewController()?.navigationController?.pushViewController(vc, animated: true) |
| 25 | } | 25 | } |
| 26 | } | 26 | } |
metaCode/Classes/Main/Util/CNLivePlayer/CNLivePlayerView.swift
| @@ -101,7 +101,7 @@ class CNLivePlayerView:UIView,PLPlayerDelegate{ | @@ -101,7 +101,7 @@ class CNLivePlayerView:UIView,PLPlayerDelegate{ | ||
| 101 | self?.currentOrientation = .portrait | 101 | self?.currentOrientation = .portrait |
| 102 | }else{ | 102 | }else{ |
| 103 | self?.popCallBack!() | 103 | self?.popCallBack!() |
| 104 | - currentViewController()?.navigationController?.popViewController(animated: false) | 104 | + currentViewController()?.navigationController?.popViewController(animated: true) |
| 105 | } | 105 | } |
| 106 | } | 106 | } |
| 107 | controlView.clickFrameBtnAction = {[weak self] in | 107 | controlView.clickFrameBtnAction = {[weak self] in |