Commit a050a6477a539a05c6e91278b93800883484e0b4

Authored by liushiyu
1 parent 44b78735

源码相关界面实现

Showing 36 changed files with 1710 additions and 83 deletions
metaCode.xcodeproj/project.pbxproj
@@ -59,6 +59,10 @@ @@ -59,6 +59,10 @@
59 790D01A32A2DDBA300C5978D /* CNLiveConfigManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D01A22A2DDBA300C5978D /* CNLiveConfigManager.swift */; }; 59 790D01A32A2DDBA300C5978D /* CNLiveConfigManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D01A22A2DDBA300C5978D /* CNLiveConfigManager.swift */; };
60 790D01A52A2DF65E00C5978D /* CNLiveLoginPickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D01A42A2DF65E00C5978D /* CNLiveLoginPickerView.swift */; }; 60 790D01A52A2DF65E00C5978D /* CNLiveLoginPickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 790D01A42A2DF65E00C5978D /* CNLiveLoginPickerView.swift */; };
61 790D01A72A2DF84C00C5978D /* countries.plist in Resources */ = {isa = PBXBuildFile; fileRef = 790D01A62A2DF84C00C5978D /* countries.plist */; }; 61 790D01A72A2DF84C00C5978D /* countries.plist in Resources */ = {isa = PBXBuildFile; fileRef = 790D01A62A2DF84C00C5978D /* countries.plist */; };
  62 + 791C1C862AFB2EB4003E6362 /* CNLiveShopOrderExpressViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 791C1C852AFB2EB4003E6362 /* CNLiveShopOrderExpressViewController.swift */; };
  63 + 791C1C882AFB6FD7003E6362 /* CNLiveShopOrderExpressFirmViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 791C1C872AFB6FD7003E6362 /* CNLiveShopOrderExpressFirmViewController.swift */; };
  64 + 791C1C8A2AFB84EE003E6362 /* CNLiveShopOrderExpressListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 791C1C892AFB84EE003E6362 /* CNLiveShopOrderExpressListViewController.swift */; };
  65 + 791C1C8C2AFB85F8003E6362 /* CNLiveShopBodyExpressView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 791C1C8B2AFB85F8003E6362 /* CNLiveShopBodyExpressView.swift */; };
62 79282A3C2A2EDC2500B5F8CF /* NSString+CNLiveExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79282A3B2A2EDC2500B5F8CF /* NSString+CNLiveExtensions.swift */; }; 66 79282A3C2A2EDC2500B5F8CF /* NSString+CNLiveExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79282A3B2A2EDC2500B5F8CF /* NSString+CNLiveExtensions.swift */; };
63 79282A402A2F055100B5F8CF /* CNLiveConfigUserInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79282A3F2A2F055100B5F8CF /* CNLiveConfigUserInfo.swift */; }; 67 79282A402A2F055100B5F8CF /* CNLiveConfigUserInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79282A3F2A2F055100B5F8CF /* CNLiveConfigUserInfo.swift */; };
64 79282A442A2F1C1E00B5F8CF /* CNLiveLoginAuthView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79282A432A2F1C1E00B5F8CF /* CNLiveLoginAuthView.swift */; }; 68 79282A442A2F1C1E00B5F8CF /* CNLiveLoginAuthView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79282A432A2F1C1E00B5F8CF /* CNLiveLoginAuthView.swift */; };
@@ -216,6 +220,10 @@ @@ -216,6 +220,10 @@
216 790D01A22A2DDBA300C5978D /* CNLiveConfigManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveConfigManager.swift; sourceTree = "<group>"; }; 220 790D01A22A2DDBA300C5978D /* CNLiveConfigManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveConfigManager.swift; sourceTree = "<group>"; };
217 790D01A42A2DF65E00C5978D /* CNLiveLoginPickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveLoginPickerView.swift; sourceTree = "<group>"; }; 221 790D01A42A2DF65E00C5978D /* CNLiveLoginPickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveLoginPickerView.swift; sourceTree = "<group>"; };
218 790D01A62A2DF84C00C5978D /* countries.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = countries.plist; sourceTree = "<group>"; }; 222 790D01A62A2DF84C00C5978D /* countries.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = countries.plist; sourceTree = "<group>"; };
  223 + 791C1C852AFB2EB4003E6362 /* CNLiveShopOrderExpressViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopOrderExpressViewController.swift; sourceTree = "<group>"; };
  224 + 791C1C872AFB6FD7003E6362 /* CNLiveShopOrderExpressFirmViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopOrderExpressFirmViewController.swift; sourceTree = "<group>"; };
  225 + 791C1C892AFB84EE003E6362 /* CNLiveShopOrderExpressListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopOrderExpressListViewController.swift; sourceTree = "<group>"; };
  226 + 791C1C8B2AFB85F8003E6362 /* CNLiveShopBodyExpressView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveShopBodyExpressView.swift; sourceTree = "<group>"; };
219 79282A3B2A2EDC2500B5F8CF /* NSString+CNLiveExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSString+CNLiveExtensions.swift"; sourceTree = "<group>"; }; 227 79282A3B2A2EDC2500B5F8CF /* NSString+CNLiveExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSString+CNLiveExtensions.swift"; sourceTree = "<group>"; };
220 79282A3F2A2F055100B5F8CF /* CNLiveConfigUserInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveConfigUserInfo.swift; sourceTree = "<group>"; }; 228 79282A3F2A2F055100B5F8CF /* CNLiveConfigUserInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveConfigUserInfo.swift; sourceTree = "<group>"; };
221 79282A432A2F1C1E00B5F8CF /* CNLiveLoginAuthView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveLoginAuthView.swift; sourceTree = "<group>"; }; 229 79282A432A2F1C1E00B5F8CF /* CNLiveLoginAuthView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CNLiveLoginAuthView.swift; sourceTree = "<group>"; };
@@ -683,6 +691,9 @@ @@ -683,6 +691,9 @@
683 799172392AF091E100DC01A8 /* CNLiveShopOrderListViewController.swift */, 691 799172392AF091E100DC01A8 /* CNLiveShopOrderListViewController.swift */,
684 79BB96A52AF21E2800AEA4AC /* CNLiveShopOrderDetailViewController.swift */, 692 79BB96A52AF21E2800AEA4AC /* CNLiveShopOrderDetailViewController.swift */,
685 794BC1642AF9E70D00A68C74 /* CNLiveShopOrderSendViewController.swift */, 693 794BC1642AF9E70D00A68C74 /* CNLiveShopOrderSendViewController.swift */,
  694 + 791C1C852AFB2EB4003E6362 /* CNLiveShopOrderExpressViewController.swift */,
  695 + 791C1C872AFB6FD7003E6362 /* CNLiveShopOrderExpressFirmViewController.swift */,
  696 + 791C1C892AFB84EE003E6362 /* CNLiveShopOrderExpressListViewController.swift */,
686 ); 697 );
687 path = Controller; 698 path = Controller;
688 sourceTree = "<group>"; 699 sourceTree = "<group>";
@@ -701,6 +712,7 @@ @@ -701,6 +712,7 @@
701 799172372AF090CD00DC01A8 /* CNLiveShopBodyListView.swift */, 712 799172372AF090CD00DC01A8 /* CNLiveShopBodyListView.swift */,
702 79BB96A92AF2330900AEA4AC /* CNLiveShopBodyDetailView.swift */, 713 79BB96A92AF2330900AEA4AC /* CNLiveShopBodyDetailView.swift */,
703 79A267822AF8D7BC0088D9F6 /* CNLiveShopBodyCustomView.swift */, 714 79A267822AF8D7BC0088D9F6 /* CNLiveShopBodyCustomView.swift */,
  715 + 791C1C8B2AFB85F8003E6362 /* CNLiveShopBodyExpressView.swift */,
704 ); 716 );
705 path = View; 717 path = View;
706 sourceTree = "<group>"; 718 sourceTree = "<group>";
@@ -1167,6 +1179,7 @@ @@ -1167,6 +1179,7 @@
1167 7CD675402A2740B0008354C1 /* CNDownSlideView.swift in Sources */, 1179 7CD675402A2740B0008354C1 /* CNDownSlideView.swift in Sources */,
1168 19BB1FE32AEB8B7C0094D962 /* CNLiveShopConsoleViewModel.swift in Sources */, 1180 19BB1FE32AEB8B7C0094D962 /* CNLiveShopConsoleViewModel.swift in Sources */,
1169 792E57D92A3AA2F2005834DB /* CNLiveCommonBaseModel.swift in Sources */, 1181 792E57D92A3AA2F2005834DB /* CNLiveCommonBaseModel.swift in Sources */,
  1182 + 791C1C862AFB2EB4003E6362 /* CNLiveShopOrderExpressViewController.swift in Sources */,
1170 7CD6753E2A2740B0008354C1 /* CNUpSlideView.swift in Sources */, 1183 7CD6753E2A2740B0008354C1 /* CNUpSlideView.swift in Sources */,
1171 7CD675402A2740B0008354C1 /* CNDownSlideView.swift in Sources */, 1184 7CD675402A2740B0008354C1 /* CNDownSlideView.swift in Sources */,
1172 79B2E3602AF39191002A8524 /* NSObject+CNLiveConfigModuleInline.swift in Sources */, 1185 79B2E3602AF39191002A8524 /* NSObject+CNLiveConfigModuleInline.swift in Sources */,
@@ -1204,6 +1217,7 @@ @@ -1204,6 +1217,7 @@
1204 7905BB492AB0588B0089BC50 /* CNLiveMineAuthResultViewController.swift in Sources */, 1217 7905BB492AB0588B0089BC50 /* CNLiveMineAuthResultViewController.swift in Sources */,
1205 19565EC22AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift in Sources */, 1218 19565EC22AF616CA007D6727 /* CNLiveShopDetailOrderAssetCell.swift in Sources */,
1206 798A44EC2A302DBE00815935 /* CNLiveMineAddInfoViewController.swift in Sources */, 1219 798A44EC2A302DBE00815935 /* CNLiveMineAddInfoViewController.swift in Sources */,
  1220 + 791C1C882AFB6FD7003E6362 /* CNLiveShopOrderExpressFirmViewController.swift in Sources */,
1207 7CD675422A2740F8008354C1 /* CNCustomIndexView.swift in Sources */, 1221 7CD675422A2740F8008354C1 /* CNCustomIndexView.swift in Sources */,
1208 794BC1652AF9E70D00A68C74 /* CNLiveShopOrderSendViewController.swift in Sources */, 1222 794BC1652AF9E70D00A68C74 /* CNLiveShopOrderSendViewController.swift in Sources */,
1209 79BB96AA2AF2330900AEA4AC /* CNLiveShopBodyDetailView.swift in Sources */, 1223 79BB96AA2AF2330900AEA4AC /* CNLiveShopBodyDetailView.swift in Sources */,
@@ -1216,6 +1230,7 @@ @@ -1216,6 +1230,7 @@
1216 7CD675422A2740F8008354C1 /* CNCustomIndexView.swift in Sources */, 1230 7CD675422A2740F8008354C1 /* CNCustomIndexView.swift in Sources */,
1217 7C4931292A2D8BA8000E44B4 /* CNLiveBaseTabBarViewController.swift in Sources */, 1231 7C4931292A2D8BA8000E44B4 /* CNLiveBaseTabBarViewController.swift in Sources */,
1218 79F4B1162A32B96B00993C03 /* CNLiveMineInfoViewController.swift in Sources */, 1232 79F4B1162A32B96B00993C03 /* CNLiveMineInfoViewController.swift in Sources */,
  1233 + 791C1C8A2AFB84EE003E6362 /* CNLiveShopOrderExpressListViewController.swift in Sources */,
1219 7CD6753F2A2740B0008354C1 /* CNDownSlideViewRemindView.swift in Sources */, 1234 7CD6753F2A2740B0008354C1 /* CNDownSlideViewRemindView.swift in Sources */,
1220 19565ECF2AF8D8F6007D6727 /* CNLiveShopGoodsListCell.swift in Sources */, 1235 19565ECF2AF8D8F6007D6727 /* CNLiveShopGoodsListCell.swift in Sources */,
1221 7CD6753C2A2740B0008354C1 /* CNUpSlideViewRemindView.swift in Sources */, 1236 7CD6753C2A2740B0008354C1 /* CNUpSlideViewRemindView.swift in Sources */,
@@ -1223,6 +1238,7 @@ @@ -1223,6 +1238,7 @@
1223 798A44E82A30134400815935 /* CNLiveMineHeaderView.swift in Sources */, 1238 798A44E82A30134400815935 /* CNLiveMineHeaderView.swift in Sources */,
1224 7C49312D2A2DB9FA000E44B4 /* UITabBar+CNLiveExtensions.swift in Sources */, 1239 7C49312D2A2DB9FA000E44B4 /* UITabBar+CNLiveExtensions.swift in Sources */,
1225 79A267832AF8D7BC0088D9F6 /* CNLiveShopBodyCustomView.swift in Sources */, 1240 79A267832AF8D7BC0088D9F6 /* CNLiveShopBodyCustomView.swift in Sources */,
  1241 + 791C1C8C2AFB85F8003E6362 /* CNLiveShopBodyExpressView.swift in Sources */,
1226 790D019A2A2DCAE400C5978D /* CNLiveViewController.swift in Sources */, 1242 790D019A2A2DCAE400C5978D /* CNLiveViewController.swift in Sources */,
1227 79803E272AD68D3100F05F68 /* CNLiveMineShopViewController.swift in Sources */, 1243 79803E272AD68D3100F05F68 /* CNLiveMineShopViewController.swift in Sources */,
1228 79A68C4C2A26EA6000DC3B43 /* (null) in Sources */, 1244 79A68C4C2A26EA6000DC3B43 /* (null) in Sources */,
metaCode/Classes/Config/CNLiveConfigManager.swift
@@ -67,4 +67,10 @@ extension Notification.Name { @@ -67,4 +67,10 @@ extension Notification.Name {
67 //WIFI状态通知 67 //WIFI状态通知
68 public static let CNLiveNetworkStatusNotificationReachableViaWiFi = Notification.Name("CNLiveNetworkStatusNotificationReachableViaWiFi") 68 public static let CNLiveNetworkStatusNotificationReachableViaWiFi = Notification.Name("CNLiveNetworkStatusNotificationReachableViaWiFi")
69 } 69 }
  70 + struct ShopOrderStatue {
  71 + //修改发货成功通知
  72 + public static let CNLiveShopOrderEditExpressNotification = Notification.Name("CNLiveShopOrderEditExpressNotification")
  73 + //发货成功通知
  74 + public static let CNLiveShopOrderSendExpressNotification = Notification.Name("CNLiveShopOrderSendExpressNotification")
  75 + }
70 } 76 }
metaCode/Classes/Config/CNLiveConfigUserInfo.swift
@@ -242,8 +242,11 @@ class StandSortManager: NSObject { @@ -242,8 +242,11 @@ class StandSortManager: NSObject {
242 let no_auths = NSMutableArray() 242 let no_auths = NSMutableArray()
243 for item in stands { 243 for item in stands {
244 let listModel = item as! StandListModel 244 let listModel = item as! StandListModel
245 - //这里需要及时去刷新认证状态 如果没有及时刷新这里回出现已经认证的状态不会进行排序  
246 - listModel.auth && have_id_auths.contains(listModel.id) ? have_auths.add(listModel) : no_auths.add(listModel) 245 +// print("listModel.auth==>\(listModel.auth)")
  246 +// print("listModel.id==>\(listModel.id)")
  247 +// print("have_id_auths==>\(have_id_auths)")
  248 + //这里需要及时去刷新认证状态 如果没有及时刷新这里回出现已经认证的状态不会进行排序 listModel.auth &&
  249 + have_id_auths.contains(listModel.id) ? have_auths.add(listModel) : no_auths.add(listModel)
247 } 250 }
248 let tempArray = NSMutableArray() 251 let tempArray = NSMutableArray()
249 for item in have_auths { 252 for item in have_auths {
metaCode/Classes/Extensions/NSString+CNLiveExtensions.swift
@@ -80,4 +80,14 @@ extension NSString { @@ -80,4 +80,14 @@ extension NSString {
80 } 80 }
81 return mSelf.copy() as! String 81 return mSelf.copy() as! String
82 } 82 }
  83 +
  84 + /// 查看允不允许输入 例如 允许输入1、2时传入12
  85 + /// - Parameter string: 输入字符串
  86 + /// - Returns: 返回
  87 + func allowWriteString(string: String) -> Bool {
  88 + let cs = NSCharacterSet.init(charactersIn: string)
  89 + let filtered_array = components(separatedBy: cs as CharacterSet) as NSArray
  90 + let filtered = filtered_array.componentsJoined(by: "")
  91 + return self as String == filtered
  92 + }
83 } 93 }
metaCode/Classes/Main/MinePage/Controller/CNLiveMineViewController.swift
@@ -151,8 +151,7 @@ extension CNLiveMineViewController { @@ -151,8 +151,7 @@ extension CNLiveMineViewController {
151 151
152 func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 152 func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
153 if indexPath.section == 0 { 153 if indexPath.section == 0 {
154 -// self.navigationController?.pushViewController(CNLiveMineQuestViewController.init(checkModel: checkModel), animated: true)  
155 - self.navigationController?.pushViewController(CNLiveShopOrderViewController.init(), animated: true) 154 + self.navigationController?.pushViewController(CNLiveMineQuestViewController.init(checkModel: checkModel), animated: true)
156 } 155 }
157 if indexPath.section == 1 { 156 if indexPath.section == 1 {
158 self.navigationController?.pushViewController(CNLiveMineAddInfoViewController.init(show_type: .info), animated: true) 157 self.navigationController?.pushViewController(CNLiveMineAddInfoViewController.init(show_type: .info), animated: true)
metaCode/Classes/Main/MinePage/View/CNLiveMineInfoAlertView.swift
@@ -546,6 +546,7 @@ enum CNLiveStandListAlertShowType { @@ -546,6 +546,7 @@ enum CNLiveStandListAlertShowType {
546 case custom 546 case custom
547 case text 547 case text
548 case date 548 case date
  549 + case string
549 } 550 }
550 class MineStandListAlertView: UIView, UIPickerViewDelegate, UIPickerViewDataSource { 551 class MineStandListAlertView: UIView, UIPickerViewDelegate, UIPickerViewDataSource {
551 552
@@ -648,6 +649,8 @@ class MineStandListAlertView: UIView, UIPickerViewDelegate, UIPickerViewDataSour @@ -648,6 +649,8 @@ class MineStandListAlertView: UIView, UIPickerViewDelegate, UIPickerViewDataSour
648 text = (infos.firstObject as! MineStandInfoModel).name 649 text = (infos.firstObject as! MineStandInfoModel).name
649 } else if _show_type == .text { 650 } else if _show_type == .text {
650 text = infos.firstObject as? Dictionary<String, String> 651 text = infos.firstObject as? Dictionary<String, String>
  652 + } else if _show_type == .string {
  653 + text = infos.firstObject as? String
651 }else{ 654 }else{
652 let formatter = DateFormatter() 655 let formatter = DateFormatter()
653 formatter.dateFormat = "yyyy-MM-dd" 656 formatter.dateFormat = "yyyy-MM-dd"
@@ -748,6 +751,9 @@ class MineStandListAlertView: UIView, UIPickerViewDelegate, UIPickerViewDataSour @@ -748,6 +751,9 @@ class MineStandListAlertView: UIView, UIPickerViewDelegate, UIPickerViewDataSour
748 let dict = _infos![row] as? Dictionary<String, String> 751 let dict = _infos![row] as? Dictionary<String, String>
749 return dict?["title"] ?? "" 752 return dict?["title"] ?? ""
750 } 753 }
  754 + if _show_type == .string {
  755 + return _infos![row] as? String
  756 + }
751 return "" 757 return ""
752 } 758 }
753 759
metaCode/Classes/Main/MinePage/ViewModel/CNLiveMineViewModel.swift
@@ -267,40 +267,40 @@ class CNLiveMineViewModel: NSObject { @@ -267,40 +267,40 @@ class CNLiveMineViewModel: NSObject {
267 if (errorCode == "0") { 267 if (errorCode == "0") {
268 let listModel = dictionaryToModel(resp as! [String : Any], StandListBaseModel.self,"data") as! StandListBaseModel 268 let listModel = dictionaryToModel(resp as! [String : Any], StandListBaseModel.self,"data") as! StandListBaseModel
269 if page == 1 && listModel.list.count > 0 { 269 if page == 1 && listModel.list.count > 0 {
270 -// CNLiveSaveStandDB.shared.insertObjects(objects: listModel.list) 270 + CNLiveSaveStandDB.shared.insertObjects(objects: listModel.list)
271 } 271 }
272 listModel.list = StandSortManager.sortAllListData(stands: listModel.list as NSArray) as! [StandListModel] 272 listModel.list = StandSortManager.sortAllListData(stands: listModel.list as NSArray) as! [StandListModel]
273 resultBlock(listModel,.success) 273 resultBlock(listModel,.success)
274 } else { 274 } else {
275 -// let tempArray = CNLiveSaveStandDB.shared.searchAllObject()  
276 -// if tempArray.count > 0 {  
277 -// let listModel = StandListBaseModel.init()  
278 -// listModel.pageNum = page  
279 -// listModel.total = page  
280 -// listModel.list = StandSortManager.sortAllListData(stands: tempArray as NSArray) as! [StandListModel]  
281 -// resultBlock(listModel,.success)  
282 -// }else{  
283 -// showMessage(message: resp["errorMessage"] as! String)  
284 -// resultBlock(NSNull(),.failed)  
285 -// } 275 + let tempArray = CNLiveSaveStandDB.shared.searchAllObject()
  276 + if tempArray.count > 0 {
  277 + let listModel = StandListBaseModel.init()
  278 + listModel.pageNum = page
  279 + listModel.total = page
  280 + listModel.list = StandSortManager.sortAllListData(stands: tempArray as NSArray) as! [StandListModel]
  281 + resultBlock(listModel,.success)
  282 + }else{
  283 + showMessage(message: resp["errorMessage"] as! String)
  284 + resultBlock(NSNull(),.failed)
  285 + }
286 } 286 }
287 } else { 287 } else {
288 -// let tempArray = CNLiveSaveStandDB.shared.searchAllObject()  
289 -// if tempArray.count > 0 {  
290 -// let listModel = StandListBaseModel.init()  
291 -// listModel.pageNum = page  
292 -// listModel.total = page  
293 -// listModel.list = StandSortManager.sortAllListData(stands: tempArray as NSArray) as! [StandListModel]  
294 -// resultBlock(listModel,.success)  
295 -// }else{  
296 -// if CNLiveNetworking.isNetworking() {  
297 -// showMessage(message: "获取失败")  
298 -// resultBlock(NSNull(),.failed)  
299 -// } else {  
300 -// showMessage(message: "似乎与网络断开链接")  
301 -// resultBlock(NSNull(),.noNetwork)  
302 -// }  
303 -// } 288 + let tempArray = CNLiveSaveStandDB.shared.searchAllObject()
  289 + if tempArray.count > 0 {
  290 + let listModel = StandListBaseModel.init()
  291 + listModel.pageNum = page
  292 + listModel.total = page
  293 + listModel.list = StandSortManager.sortAllListData(stands: tempArray as NSArray) as! [StandListModel]
  294 + resultBlock(listModel,.success)
  295 + }else{
  296 + if CNLiveNetworking.isNetworking() {
  297 + showMessage(message: "获取失败")
  298 + resultBlock(NSNull(),.failed)
  299 + } else {
  300 + showMessage(message: "似乎与网络断开链接")
  301 + resultBlock(NSNull(),.noNetwork)
  302 + }
  303 + }
304 } 304 }
305 } 305 }
306 } 306 }
@@ -325,40 +325,40 @@ class CNLiveMineViewModel: NSObject { @@ -325,40 +325,40 @@ class CNLiveMineViewModel: NSObject {
325 if (errorCode == "0" && !(resp["data"] is NSNull)) { 325 if (errorCode == "0" && !(resp["data"] is NSNull)) {
326 let listModel = dictionaryToModel(resp as! [String : Any], MineAuthListBaseModel.self,"data") as! MineAuthListBaseModel 326 let listModel = dictionaryToModel(resp as! [String : Any], MineAuthListBaseModel.self,"data") as! MineAuthListBaseModel
327 if page == 1 && listModel.list.count > 0 { 327 if page == 1 && listModel.list.count > 0 {
328 -// CNLiveSaveAuthDB.shared.insertObjects(objects: listModel.list) 328 + CNLiveSaveAuthDB.shared.insertObjects(objects: listModel.list)
329 } 329 }
330 listModel.list = StandSortManager.sortMyListData(auths: listModel.list as NSArray) as! [MineAuthListModel] 330 listModel.list = StandSortManager.sortMyListData(auths: listModel.list as NSArray) as! [MineAuthListModel]
331 resultBlock(listModel,.success) 331 resultBlock(listModel,.success)
332 } else { 332 } else {
333 -// let tempArray = CNLiveSaveAuthDB.shared.searchAllObject()  
334 -// if tempArray.count > 0 {  
335 -// let listModel = MineAuthListBaseModel.init()  
336 -// listModel.pageNum = page  
337 -// listModel.total = page  
338 -// listModel.list = StandSortManager.sortMyListData(auths: tempArray as NSArray) as! [MineAuthListModel]  
339 -// resultBlock(listModel,.success)  
340 -// }else{  
341 -// showMessage(message: resp["errorMessage"] as! String)  
342 -// resultBlock(NSNull(),.failed)  
343 -// } 333 + let tempArray = CNLiveSaveAuthDB.shared.searchAllObject()
  334 + if tempArray.count > 0 {
  335 + let listModel = MineAuthListBaseModel.init()
  336 + listModel.pageNum = page
  337 + listModel.total = page
  338 + listModel.list = StandSortManager.sortMyListData(auths: tempArray as NSArray) as! [MineAuthListModel]
  339 + resultBlock(listModel,.success)
  340 + }else{
  341 + showMessage(message: resp["errorMessage"] as! String)
  342 + resultBlock(NSNull(),.failed)
  343 + }
344 } 344 }
345 } else { 345 } else {
346 -// let tempArray = CNLiveSaveAuthDB.shared.searchAllObject()  
347 -// if tempArray.count > 0 {  
348 -// let listModel = MineAuthListBaseModel.init()  
349 -// listModel.pageNum = page  
350 -// listModel.total = page  
351 -// listModel.list = StandSortManager.sortMyListData(auths: tempArray as NSArray) as! [MineAuthListModel]  
352 -// resultBlock(listModel,.success)  
353 -// }else{  
354 -// if CNLiveNetworking.isNetworking() {  
355 -// showMessage(message: "获取失败")  
356 -// resultBlock(NSNull(),.failed)  
357 -// } else {  
358 -// showMessage(message: "似乎与网络断开链接")  
359 -// resultBlock(NSNull(),.noNetwork)  
360 -// }  
361 -// } 346 + let tempArray = CNLiveSaveAuthDB.shared.searchAllObject()
  347 + if tempArray.count > 0 {
  348 + let listModel = MineAuthListBaseModel.init()
  349 + listModel.pageNum = page
  350 + listModel.total = page
  351 + listModel.list = StandSortManager.sortMyListData(auths: tempArray as NSArray) as! [MineAuthListModel]
  352 + resultBlock(listModel,.success)
  353 + }else{
  354 + if CNLiveNetworking.isNetworking() {
  355 + showMessage(message: "获取失败")
  356 + resultBlock(NSNull(),.failed)
  357 + } else {
  358 + showMessage(message: "似乎与网络断开链接")
  359 + resultBlock(NSNull(),.noNetwork)
  360 + }
  361 + }
362 } 362 }
363 } 363 }
364 } 364 }
@@ -603,8 +603,9 @@ class CNLiveMineViewModel: NSObject { @@ -603,8 +603,9 @@ class CNLiveMineViewModel: NSObject {
603 custom_param.setValue(APPKey_wjj, forKey: "appKey") 603 custom_param.setValue(APPKey_wjj, forKey: "appKey")
604 CNLiveNetworking.setAllowRequestDefaultArgument(true) 604 CNLiveNetworking.setAllowRequestDefaultArgument(true)
605 CNLiveNetworking.setupShowDataResult(false) 605 CNLiveNetworking.setupShowDataResult(false)
  606 + CNLiveNetworking.setupDSRequest(true)
606 CNLiveNetworking.setupCustomParam(custom_param as? [String : String]) 607 CNLiveNetworking.setupCustomParam(custom_param as? [String : String])
607 - CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/Api/Index3/myOrderCount", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in 608 + CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjShopUrl+"/Api/Index3/myOrderCount", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in
608 hiddenLoading() 609 hiddenLoading()
609 if (error == nil) { 610 if (error == nil) {
610 let resp = result as! NSDictionary 611 let resp = result as! NSDictionary
metaCode/Classes/Main/ShopPage/Controller/CNLiveShopOrderDetailViewController.swift
@@ -154,17 +154,18 @@ extension CNLiveShopOrderDetailViewController { @@ -154,17 +154,18 @@ extension CNLiveShopOrderDetailViewController {
154 case "通知自提": 154 case "通知自提":
155 notifyOrder(detailModel: detailModel) 155 notifyOrder(detailModel: detailModel)
156 case "快递发货": 156 case "快递发货":
157 - self.navigationController?.pushViewController(CNLiveShopOrderSendViewController.init(orderId: detailModel.orderid! as NSString, show_type: .splite), animated: true) 157 + self.navigationController?.pushViewController(CNLiveShopOrderSendViewController.init(orderId: detailModel.id! as NSString, show_type: .splite), animated: true)
158 case "查看进度": 158 case "查看进度":
159 print("查看进度") 159 print("查看进度")
160 case "物流详情": 160 case "物流详情":
161 print("物流详情") 161 print("物流详情")
  162 + pushExpressVC(detailModel: detailModel)
162 case "退款详情": 163 case "退款详情":
163 print("退款详情") 164 print("退款详情")
164 let vc = CNLiveShopOrderDetailViewController(orderId: detailModel.id!, show_type: .sale, form_type: .order) 165 let vc = CNLiveShopOrderDetailViewController(orderId: detailModel.id!, show_type: .sale, form_type: .order)
165 self.navigationController?.pushViewController(vc, animated: true) 166 self.navigationController?.pushViewController(vc, animated: true)
166 case "订单详情": 167 case "订单详情":
167 - self.navigationController?.pushViewController(CNLiveShopOrderDetailViewController(orderId: refuundModel.orderid!, show_type: .order, form_type: .afterSale), animated: true) 168 + self.navigationController?.pushViewController(CNLiveShopOrderDetailViewController(orderId: refuundModel.id!, show_type: .order, form_type: .afterSale), animated: true)
168 case "确认退款": 169 case "确认退款":
169 ConfigAlertManager.shared.presentAlert(title: "提示", message: "确认给用户退款?", actionTitles: ["取消","确认"]) { [weak self] index in 170 ConfigAlertManager.shared.presentAlert(title: "提示", message: "确认给用户退款?", actionTitles: ["取消","确认"]) { [weak self] index in
170 if index == 1 { 171 if index == 1 {
@@ -190,12 +191,22 @@ extension CNLiveShopOrderDetailViewController { @@ -190,12 +191,22 @@ extension CNLiveShopOrderDetailViewController {
190 } 191 }
191 } 192 }
192 193
  194 + /// 跳转物流相关界面
  195 + /// - Parameter detailModel: 数据源
  196 + private func pushExpressVC(detailModel: ShopOrderDetailModel) {
  197 + if detailModel.send_num > 1 || detailModel.is_send == "0" {
  198 + self.navigationController?.pushViewController(CNLiveShopOrderExpressListViewController.init(orderId: detailModel.orderid! as NSString), animated: true)
  199 + } else {
  200 +
  201 + }
  202 + }
  203 +
193 /// 通知用户自提 204 /// 通知用户自提
194 /// - Parameter listModel: 数据源 205 /// - Parameter listModel: 数据源
195 private func notifyOrder(detailModel: ShopOrderDetailModel) { 206 private func notifyOrder(detailModel: ShopOrderDetailModel) {
196 ConfigAlertManager.shared.presentAlert(title: "提示", message: "确认通知用户自提?", actionTitles: ["取消","确认"]) { index in 207 ConfigAlertManager.shared.presentAlert(title: "提示", message: "确认通知用户自提?", actionTitles: ["取消","确认"]) { index in
197 if index == 1 { 208 if index == 1 {
198 - CNLiveShopViewModel.requestNotifyOrder(orderId: detailModel.orderid!) { result, respStatue in 209 + CNLiveShopViewModel.requestNotifyOrder(orderId: detailModel.id!) { result, respStatue in
199 if respStatue == .success { 210 if respStatue == .success {
200 showMessage(message: "通知成功") 211 showMessage(message: "通知成功")
201 } 212 }
metaCode/Classes/Main/ShopPage/Controller/CNLiveShopOrderExpressFirmViewController.swift 0 → 100644
  1 +//
  2 +// CNLiveShopOrderExpressListViewController.swift
  3 +// metaCode
  4 +//
  5 +// Created by open on 2023/11/8.
  6 +//
  7 +
  8 +import Foundation
  9 +import EmptyDataSet_Swift
  10 +
  11 +typealias CNLiveShopOrderExpressFirmCompleterBlock = (_ model: ShopOrderExpressModel) -> Void
  12 +class CNLiveShopOrderExpressFirmViewController: CNLiveBaseViewController, UITableViewDelegate, UITableViewDataSource, EmptyDataSetSource, EmptyDataSetDelegate {
  13 +
  14 + let kShopBodyOrderExpressListTableViewCellIdentifier = "kShopBodyOrderExpressListTableViewCellIdentifier"
  15 + lazy var tableView : UITableView = {
  16 + let tableView = UITableView(frame: .zero, style: .plain)
  17 + tableView.dataSource = self
  18 + tableView.delegate = self
  19 + tableView.emptyDataSetSource = self
  20 + tableView.emptyDataSetDelegate = self
  21 + tableView.backgroundColor = HexColor("#f1f2f6")
  22 + tableView.tableFooterView = UIView.init()
  23 + tableView.separatorStyle = .none
  24 + tableView.register(ShopBodyOrderExpressFirmTableViewCell.self, forCellReuseIdentifier: kShopBodyOrderExpressListTableViewCellIdentifier)
  25 + return tableView
  26 + }()
  27 +
  28 + lazy var dataArray: NSMutableArray = {
  29 + let dataArray = NSMutableArray.init()
  30 + return dataArray
  31 + }()
  32 +
  33 +
  34 + var network_type: CNLiveMineResponseType!
  35 + var completerBlock: CNLiveShopOrderExpressFirmCompleterBlock!
  36 + override func viewDidLoad() {
  37 + super.viewDidLoad()
  38 + navigationBarHidden = false
  39 + titleName = "选择快递公司"
  40 +
  41 + loadDataSourceAction()
  42 +
  43 + view.addSubview(tableView)
  44 + tableView.snp.makeConstraints { make in
  45 + make.top.equalTo(KNavigationHeight)
  46 + make.left.right.equalToSuperview()
  47 + make.bottom.equalToSuperview().offset(get_system_tabbar_height() - get_system_tabbar_ui_height())
  48 + }
  49 + }
  50 +
  51 + func loadDataSourceAction() {
  52 + showLoading(message: "")
  53 + CNLiveShopViewModel.requestExpressList { [weak self] result, respStatue in
  54 + if respStatue == .success {
  55 + self!.dataArray.addObjects(from: (result as! NSMutableArray) as! [Any])
  56 + self!.tableView.reloadData()
  57 + }else if (respStatue == .noNetwork) {
  58 + self!.network_type = .noNetwork
  59 + self!.tableView.reloadEmptyDataSet()
  60 + } else {
  61 + self!.network_type = .failed
  62 + self!.tableView.reloadEmptyDataSet()
  63 + }
  64 + }
  65 + }
  66 +
  67 +}
  68 +extension CNLiveShopOrderExpressFirmViewController {
  69 + func numberOfSections(in tableView: UITableView) -> Int {
  70 + return 1
  71 + }
  72 + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  73 + return self.dataArray.count
  74 + }
  75 + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  76 + guard let cell = tableView.dequeueReusableCell(withIdentifier: kShopBodyOrderExpressListTableViewCellIdentifier) as? ShopBodyOrderExpressFirmTableViewCell else {
  77 + return ShopBodyOrderExpressFirmTableViewCell()
  78 + }
  79 + cell.lineLabel.isHidden = (indexPath.row == dataArray.count-1)
  80 + cell.setupDataSource(model: dataArray[indexPath.row] as! ShopOrderExpressModel)
  81 + return cell
  82 + }
  83 + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
  84 + return adapt_length(length: 70)
  85 + }
  86 + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
  87 + let expressModel = self.dataArray[indexPath.row] as! ShopOrderExpressModel
  88 + if (completerBlock != nil) {
  89 + completerBlock(expressModel)
  90 + }
  91 + self.navigationController?.popViewController(animated: true)
  92 + }
  93 +}
  94 +
  95 +extension CNLiveShopOrderExpressFirmViewController {
  96 +
  97 + func image(forEmptyDataSet scrollView: UIScrollView) -> UIImage? {
  98 + if network_type == .failed || network_type == .unkonw {
  99 + return UIImage(named: "mine_list_source_unusual_failed")
  100 + }
  101 + if dataArray.count == 0 {
  102 + return UIImage(named: "mine_list_source_unusual_empty")
  103 + }
  104 + if network_type == .noNetwork {
  105 + return UIImage(named: "mine_list_source_unusual_noNet")
  106 + }
  107 + return UIImage(named: "mine_list_source_unusual_empty")
  108 + }
  109 +
  110 + func title(forEmptyDataSet scrollView: UIScrollView) -> NSAttributedString? {
  111 + var defult_string = ""
  112 + if network_type == .failed || network_type == .unkonw {
  113 + defult_string = "接口请求错误,刷新试试~"
  114 + }
  115 + if network_type == .noNetwork {
  116 + defult_string = "网络开小差了,刷新试试~"
  117 + }
  118 + if dataArray.count == 0 {
  119 + defult_string = "暂时没有数据~"
  120 + }
  121 + return NSAttributedString(string: defult_string, attributes: [.font: Font_17,.foregroundColor: HexColor("#666666")!])
  122 + }
  123 +
  124 + func buttonTitle(forEmptyDataSet scrollView: UIScrollView, for state: UIControl.State) -> NSAttributedString? {
  125 + if network_type == .failed || network_type == .noNetwork {
  126 + let attributes = [NSAttributedString.Key.font:Font_16_Fit,
  127 + NSAttributedString.Key.foregroundColor: HexColor("#609BFF")]
  128 + return NSAttributedString(string: "刷一刷", attributes: attributes as [NSAttributedString.Key : Any])
  129 + }
  130 + return nil
  131 + }
  132 +
  133 + func emptyDataSet(_ scrollView: UIScrollView, didTapView view: UIView) {
  134 + if network_type == .failed || network_type == .noNetwork {
  135 + loadDataSourceAction()
  136 + }
  137 + }
  138 +}
metaCode/Classes/Main/ShopPage/Controller/CNLiveShopOrderExpressListViewController.swift 0 → 100644
  1 +//
  2 +// CNLiveShopOrderExpressListViewController.swift
  3 +// metaCode
  4 +//
  5 +// Created by open on 2023/11/8.
  6 +//
  7 +
  8 +import Foundation
  9 +import EmptyDataSet_Swift
  10 +
  11 +class CNLiveShopOrderExpressListViewController: CNLiveBaseViewController, UITableViewDelegate, UITableViewDataSource, EmptyDataSetSource, EmptyDataSetDelegate{
  12 +
  13 + let kShopBodyOrderExpressListTableViewCellIdentifier = "kShopBodyOrderExpressListTableViewCellIdentifier"
  14 + lazy var tableView: UITableView = {
  15 + let tableView = UITableView.init(frame: CGRect.zero, style: .plain)
  16 + tableView.dataSource = self
  17 + tableView.delegate = self
  18 + tableView.emptyDataSetSource = self
  19 + tableView.emptyDataSetDelegate = self
  20 + tableView.backgroundColor = .clear
  21 + tableView.tableFooterView = UIView.init()
  22 + tableView.separatorStyle = .none
  23 + tableView.register(ShopBodyOrderExpressListTableViewCell.self, forCellReuseIdentifier: kShopBodyOrderExpressListTableViewCellIdentifier)
  24 + return tableView
  25 + }()
  26 +
  27 + lazy var dataArray: NSMutableArray = {
  28 + let dataArray = NSMutableArray.init()
  29 + return dataArray
  30 + }()
  31 +
  32 + var _orderId: NSString!
  33 + var network_type: CNLiveMineResponseType!
  34 + init(orderId: NSString) {
  35 + _orderId = orderId
  36 + super.init(nibName:nil, bundle:nil)
  37 + }
  38 +
  39 + override func viewDidLoad() {
  40 + super.viewDidLoad()
  41 + navigationBarHidden = false
  42 + titleName = "物流详情"
  43 +
  44 +// loadDataSourceAction()
  45 +
  46 + view.addSubview(tableView)
  47 + tableView.snp.makeConstraints { make in
  48 + make.top.equalTo(KNavigationHeight)
  49 + make.left.right.equalToSuperview()
  50 + make.bottom.equalToSuperview().offset(get_system_tabbar_height() - get_system_tabbar_ui_height())
  51 + }
  52 + }
  53 +
  54 + func loadDataSourceAction() {
  55 + showLoading(message: "")
  56 + CNLiveShopViewModel.requestExpressList(orderId: _orderId) { [weak self] result, respStatue in
  57 + if respStatue == .success {
  58 + self!.dataArray.addObjects(from: result as! [ShopOrderExpressListModel])
  59 + self!.tableView.reloadData()
  60 + }else if (respStatue == .noNetwork) {
  61 + self!.network_type = .noNetwork
  62 + self!.tableView.reloadEmptyDataSet()
  63 + } else {
  64 + self!.network_type = .failed
  65 + self!.tableView.reloadEmptyDataSet()
  66 + }
  67 + }
  68 + }
  69 +
  70 + required init?(coder: NSCoder) {
  71 + fatalError("init(coder:) has not been implemented")
  72 + }
  73 +
  74 +}
  75 +extension CNLiveShopOrderExpressListViewController {
  76 + func numberOfSections(in tableView: UITableView) -> Int {
  77 + return 1
  78 + }
  79 + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  80 + return self.dataArray.count
  81 + }
  82 + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  83 + guard let cell = tableView.dequeueReusableCell(withIdentifier: kShopBodyOrderExpressListTableViewCellIdentifier) as? ShopBodyOrderExpressFirmTableViewCell else {
  84 + return ShopBodyOrderExpressFirmTableViewCell()
  85 + }
  86 + return cell
  87 + }
  88 + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
  89 + return adapt_length(length: 0.01)//130)
  90 + }
  91 + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
  92 +
  93 + }
  94 +}
  95 +
  96 +extension CNLiveShopOrderExpressListViewController {
  97 +
  98 + func image(forEmptyDataSet scrollView: UIScrollView) -> UIImage? {
  99 + if network_type == .failed || network_type == .unkonw {
  100 + return UIImage(named: "mine_list_source_unusual_failed")
  101 + }
  102 + if dataArray.count == 0 {
  103 + return UIImage(named: "mine_list_source_unusual_empty")
  104 + }
  105 + if network_type == .noNetwork {
  106 + return UIImage(named: "mine_list_source_unusual_noNet")
  107 + }
  108 + return UIImage(named: "mine_list_source_unusual_empty")
  109 + }
  110 +
  111 + func title(forEmptyDataSet scrollView: UIScrollView) -> NSAttributedString? {
  112 + var defult_string = ""
  113 + if network_type == .failed || network_type == .unkonw {
  114 + defult_string = "接口请求错误,刷新试试~"
  115 + }
  116 + if network_type == .noNetwork {
  117 + defult_string = "网络开小差了,刷新试试~"
  118 + }
  119 + if dataArray.count == 0 {
  120 + defult_string = "暂时没有数据~"
  121 + }
  122 + return NSAttributedString(string: defult_string, attributes: [.font: Font_17,.foregroundColor: HexColor("#666666")!])
  123 + }
  124 +
  125 + func buttonTitle(forEmptyDataSet scrollView: UIScrollView, for state: UIControl.State) -> NSAttributedString? {
  126 + if network_type == .failed || network_type == .noNetwork {
  127 + let attributes = [NSAttributedString.Key.font:Font_16_Fit,
  128 + NSAttributedString.Key.foregroundColor: HexColor("#609BFF")]
  129 + return NSAttributedString(string: "刷一刷", attributes: attributes as [NSAttributedString.Key : Any])
  130 + }
  131 + return nil
  132 + }
  133 +
  134 + func emptyDataSet(_ scrollView: UIScrollView, didTapView view: UIView) {
  135 + if network_type == .failed || network_type == .noNetwork {
  136 + loadDataSourceAction()
  137 + }
  138 + }
  139 +}
metaCode/Classes/Main/ShopPage/Controller/CNLiveShopOrderExpressViewController.swift 0 → 100644
  1 +//
  2 +// CNLiveShopOrderExpressViewController.swift
  3 +// metaCode
  4 +//
  5 +// Created by open on 2023/11/8.
  6 +//
  7 +
  8 +import Foundation
  9 +
  10 +typealias CNLiveShopOrderExpressCompleterBlock = () -> Void
  11 +class CNLiveShopOrderExpressViewController: CNLiveBaseViewController, UITableViewDelegate, UITableViewDataSource {
  12 +
  13 + let kShopBodyOrderExpressTableViewCellIdentifier = "kShopBodyOrderExpressTableViewCellIdentifier"
  14 + lazy var tableView: UITableView = {
  15 + let tableView = UITableView.init(frame: CGRect.zero, style: .plain)
  16 + tableView.dataSource = self
  17 + tableView.delegate = self
  18 + tableView.backgroundColor = HexColor("f1f2f6")
  19 + tableView.tableFooterView = UIView.init()
  20 + tableView.separatorStyle = .none
  21 + tableView.rowHeight = adapt_length(length: 50)
  22 + tableView.register(ShopBodyOrderExpressTableViewCell.self, forCellReuseIdentifier: kShopBodyOrderExpressTableViewCellIdentifier)
  23 + return tableView
  24 + }()
  25 +
  26 + lazy var footerView: UIView = {
  27 + let footerView = UIView.init(frame: CGRect(x: 0, y: KSreenHeight - get_system_tabbar_height(), width: KSreenWidth, height: get_system_tabbar_height()))
  28 + footerView.backgroundColor = .white
  29 + footerView.addSubview(cancelBtn)
  30 + cancelBtn.snp.makeConstraints { make in
  31 + make.width.equalTo(adapt_length(length: 130))
  32 + make.height.equalTo(get_system_tabbar_ui_height())
  33 + make.left.equalToSuperview()
  34 + make.top.equalToSuperview()
  35 + }
  36 + footerView.addSubview(deliveryBtn)
  37 + deliveryBtn.snp.makeConstraints { make in
  38 + make.width.equalTo(KSreenWidth - adapt_length(length: 130))
  39 + make.height.equalTo(get_system_tabbar_ui_height())
  40 + make.right.equalToSuperview()
  41 + make.top.equalToSuperview()
  42 + }
  43 + return footerView
  44 + }()
  45 +
  46 + lazy var cancelBtn: UIButton = {
  47 + let cancelBtn = UIButton.init(type: .custom)
  48 + cancelBtn.backgroundColor = .white
  49 + cancelBtn.setTitle("取消", for: .normal)
  50 + cancelBtn.setTitleColor(HexColor("#3A3A3A"), for: .normal)
  51 + cancelBtn.titleLabel?.font = medium_adapt_font(pointSize: 14)
  52 + cancelBtn.addTarget(self, action: #selector(cancelBtnClick), for: .touchUpInside)
  53 + return cancelBtn
  54 + }()
  55 +
  56 + lazy var deliveryBtn: UIButton = {
  57 + let deliveryBtn = UIButton.init()
  58 + deliveryBtn.backgroundColor = HexColor("#65C368")
  59 + deliveryBtn.setTitle(hiddenShop ? "确认修改" : "确认发货", for: .normal)
  60 + deliveryBtn.titleLabel?.font = regular_adapt_font(pointSize: 15)
  61 + deliveryBtn.setTitleColor(HexColor("#FFFFFF"), for: .normal)
  62 + deliveryBtn.addTarget(self, action: #selector(sendBtnClick), for: .touchUpInside)
  63 + return deliveryBtn
  64 + }()
  65 +
  66 + lazy var dataArray: NSMutableArray = {
  67 + let dataArray = NSMutableArray.init()
  68 + return dataArray
  69 + }()
  70 +
  71 + lazy var textArray: NSMutableArray = {
  72 + let textArray = NSMutableArray.init()
  73 + return textArray
  74 + }()
  75 +
  76 + var selectStoreModel: ShopOrderStoreModel!
  77 + var selectExpressModel: ShopOrderExpressModel!
  78 + var hiddenShop: Bool! = false//是否隐藏店铺名称
  79 + var _isExp: Bool! = false
  80 + var expId: String! = ""// 发货单id (多物流快递有用)
  81 + var expressModel: ShopOrderExpressModel!// 快递model
  82 + var express_num: String! = ""
  83 + var _goods_arr: NSArray!
  84 + var _orderId: String!
  85 + init(orderId: NSString,isExp: Bool,goods_arr: NSArray) {
  86 + super.init(nibName:nil, bundle:nil)
  87 + _orderId = orderId as String
  88 + _isExp = isExp
  89 + _goods_arr = goods_arr
  90 + }
  91 +
  92 + override func viewDidLoad() {
  93 + super.viewDidLoad()
  94 + navigationBarHidden = false
  95 + titleName = "快递信息"
  96 +
  97 + loadDataSourceAction {}
  98 +
  99 + view.addSubview(tableView)
  100 + tableView.snp.makeConstraints { make in
  101 + make.top.equalTo(KNavigationHeight)
  102 + make.left.right.equalToSuperview()
  103 + make.bottom.equalToSuperview().offset(-get_system_tabbar_height())
  104 + }
  105 +
  106 + view.addSubview(footerView)
  107 + }
  108 +
  109 + func loadDataSourceAction(completerBlock: @escaping CNLiveShopOrderExpressCompleterBlock) {
  110 + showMessage(message: "")
  111 + CNLiveShopViewModel.requestSellerStore { [weak self] result, respStatue in
  112 + if respStatue == .success {
  113 + self!.dataArray.addObjects(from: (result as! [NSMutableArray]).first! as! [ShopOrderStoreModel])
  114 + self!.textArray.addObjects(from: (result as! [NSMutableArray]).last as! [String])
  115 + self!.tableView.reloadData()
  116 + completerBlock()
  117 + }
  118 + }
  119 + }
  120 +
  121 + @objc func sendBtnClick() {
  122 + if !hiddenShop && (selectStoreModel == nil) {
  123 + showMessage(message: "请选择店铺")
  124 + return
  125 + } else if (selectExpressModel == nil) {
  126 + showMessage(message: "请选择快递公司")
  127 + return
  128 + } else if (!selectExpressModel.no!.isNotBlank()) {
  129 + showMessage(message: "请输入快递单号")
  130 + return
  131 + } else if (!selectExpressModel.no!.allowWriteString(string: "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHRJKLMNOPQRSTUVWXYZ")) {
  132 + showMessage(message: "请输入正确快递单号")
  133 + return
  134 + }
  135 + showLoading(message: "")
  136 + CNLiveShopViewModel.requestExpress(orderId: _orderId, expressId: selectExpressModel.id!, expressNum: selectExpressModel.no!, hiddenSop: hiddenShop, expId: expId, goodsList: _goods_arr, storeId: selectStoreModel.id!) { [weak self] result, respStatue in
  137 + if respStatue == .success {
  138 + showMessage(message: result as! String)
  139 + if !self!.hiddenShop {
  140 + var dic: NSDictionary = [:]
  141 + if self!._isExp {
  142 + dic = ["selectNum":NSNumber(integerLiteral: 1)]
  143 + }
  144 + if self!.hiddenShop {
  145 + NotificationCenter.default.post(name: Notification.Name.ShopOrderStatue.CNLiveShopOrderEditExpressNotification, object: nil)
  146 + } else {
  147 + NotificationCenter.default.post(name: Notification.Name.ShopOrderStatue.CNLiveShopOrderSendExpressNotification, object: dic)
  148 + }
  149 + }
  150 + }
  151 + }
  152 + }
  153 +
  154 + @objc func cancelBtnClick() {
  155 + self.navigationController?.popViewController(animated: true)
  156 + }
  157 +
  158 + required init?(coder: NSCoder) {
  159 + fatalError("init(coder:) has not been implemented")
  160 + }
  161 +}
  162 +
  163 +extension CNLiveShopOrderExpressViewController {
  164 + func numberOfSections(in tableView: UITableView) -> Int {
  165 + return 1
  166 + }
  167 + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  168 + return hiddenShop ? 2 : 3
  169 + }
  170 + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  171 + guard let cell = tableView.dequeueReusableCell(withIdentifier: kShopBodyOrderExpressTableViewCellIdentifier) as? ShopBodyOrderExpressTableViewCell else {
  172 + return ShopBodyOrderExpressTableViewCell()
  173 + }
  174 + var title: String = ""
  175 + var content: String = ""
  176 + var placeHolder: String = ""
  177 + var contentIsEdit: Bool = false
  178 + var isShowArrowImage: Bool = false
  179 + var isShowLine: Bool = false
  180 + if !hiddenShop && indexPath.row == 0 {
  181 + title = "店铺名称"
  182 + if selectStoreModel != nil {
  183 + content = selectStoreModel.title!.isNotBlank() ? selectStoreModel.title! as String : "" as String
  184 + }
  185 + placeHolder = "请选择店铺"
  186 + isShowArrowImage = true
  187 + isShowLine = true
  188 + } else if (indexPath.row == (hiddenShop ? 0 : 1)) {
  189 + title = "快递公司"
  190 + if selectExpressModel != nil {
  191 + content = selectExpressModel.com!.isNotBlank() ? selectExpressModel.com! as String : "" as String
  192 + }
  193 + placeHolder = "请选择快递公司"
  194 + isShowArrowImage = true
  195 + isShowLine = true
  196 + } else {
  197 + title = "快递单号"
  198 + if express_num.isNotBlank() {
  199 + content = express_num! as String
  200 + selectExpressModel.no = express_num as String
  201 + } else {
  202 + if selectExpressModel != nil {
  203 + content = (selectExpressModel.no != nil) ? selectExpressModel.no! : ""
  204 + }
  205 + }
  206 + placeHolder = "请输入单号"
  207 + contentIsEdit = true
  208 + }
  209 + cell.row = indexPath.row
  210 + cell.setup(title: title, content: content, placeHolder: placeHolder, contentIsEdit: contentIsEdit, isShowArrowImage: isShowArrowImage, isShowLine: isShowLine)
  211 + cell.clickBlock = {[weak self] content, row in
  212 + if row == (self!.hiddenShop ? 1 : 2) {
  213 + self!.selectExpressModel.no = content
  214 + }
  215 + }
  216 + return cell
  217 + }
  218 + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
  219 + return adapt_length(length: 50)
  220 + }
  221 + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
  222 + if !hiddenShop && indexPath.row == 0 {
  223 + if dataArray.count > 0 {
  224 + MineStandListAlertView.showStandListView(infos: textArray, name: "请选择店铺", show_type: .string) { [weak self] text in
  225 + let index = self!.textArray.index(of: text)
  226 + self!.selectStoreModel = (self!.dataArray[index] as! ShopOrderStoreModel)
  227 + self!.tableView.reloadData()
  228 + }
  229 + } else {
  230 + loadDataSourceAction { [weak self] in
  231 + MineStandListAlertView.showStandListView(infos: self!.textArray, name: "请选择店铺", show_type: .string) { text in
  232 + let index = self!.textArray.index(of: text)
  233 + self!.selectStoreModel = (self!.dataArray[index] as! ShopOrderStoreModel)
  234 + self!.tableView.reloadData()
  235 + }
  236 + }
  237 + }
  238 + } else if (indexPath.row == (self.hiddenShop ? 0 : 1)) {
  239 + let vc = CNLiveShopOrderExpressFirmViewController.init()
  240 + vc.completerBlock = {[weak self] model in
  241 + self!.selectExpressModel = model
  242 + self!.tableView.reloadData()
  243 + }
  244 + self.navigationController?.pushViewController(vc, animated: true)
  245 + }
  246 + }
  247 +}
  248 +
metaCode/Classes/Main/ShopPage/Controller/CNLiveShopOrderListViewController.swift
@@ -178,8 +178,8 @@ extension CNLiveShopOrderListViewController { @@ -178,8 +178,8 @@ extension CNLiveShopOrderListViewController {
178 let footerView = tableView.dequeueReusableHeaderFooterView(withIdentifier: kShopBodyOrderFooterViewCellIdentifier) as! ShopBodyOrderFooterViewCell 178 let footerView = tableView.dequeueReusableHeaderFooterView(withIdentifier: kShopBodyOrderFooterViewCellIdentifier) as! ShopBodyOrderFooterViewCell
179 let listModel = (dataArray[section] as! ShopOrderListModel) 179 let listModel = (dataArray[section] as! ShopOrderListModel)
180 footerView.setupDataSource(listModel: listModel) 180 footerView.setupDataSource(listModel: listModel)
181 - footerView.clickRightBtnCallBack = { [weak self] clickEvent, listModel in  
182 - self?.orderOperation(clickEvent: clickEvent, listModel: listModel) 181 + footerView.clickRightBtnCallBack = { [weak self] title, clickEvent, listModel in
  182 + self?.orderOperation(title: title, event: clickEvent, listModel: listModel)
183 } 183 }
184 return footerView 184 return footerView
185 } 185 }
@@ -241,10 +241,14 @@ extension CNLiveShopOrderListViewController { @@ -241,10 +241,14 @@ extension CNLiveShopOrderListViewController {
241 /// - Parameters: 241 /// - Parameters:
242 /// - clickEvent: 按钮类型 242 /// - clickEvent: 按钮类型
243 /// - listModel: 数据源 243 /// - listModel: 数据源
244 - private func orderOperation(clickEvent: CNDSOrderListSectionFooterBtnClickEvent, listModel: ShopOrderListModel) {  
245 - switch clickEvent { 244 + private func orderOperation(title: String, event: CNDSOrderListSectionFooterBtnClickEvent, listModel: ShopOrderListModel) {
  245 + switch event {
246 case .delivery: 246 case .delivery:
247 - self.navigationController?.pushViewController(CNLiveShopOrderSendViewController.init(orderId: listModel.id! as NSString, show_type: .splite), animated: true) 247 + if listModel.is_tui == "2" {
  248 + showMessage(message: "此为退款订单")
  249 + return
  250 + }
  251 + delivery(listModel: listModel)
248 break 252 break
249 case .notifyOrder: 253 case .notifyOrder:
250 if listModel.is_tui == "2" { 254 if listModel.is_tui == "2" {
@@ -256,11 +260,41 @@ extension CNLiveShopOrderListViewController { @@ -256,11 +260,41 @@ extension CNLiveShopOrderListViewController {
256 case .connection: 260 case .connection:
257 pushOrderDetail(listModel: listModel) 261 pushOrderDetail(listModel: listModel)
258 break 262 break
  263 + case .expDetail:
  264 + delivery(listModel: listModel)
  265 + break
  266 + case .checkExpress:
  267 + pushExpressVC(listModel: listModel)
  268 + break
  269 + case .express:
  270 + pushExpressVC(listModel: listModel)
  271 + break
259 default: 272 default:
260 break 273 break
261 } 274 }
262 } 275 }
263 276
  277 + /// 跳转物流相关界面
  278 + /// - Parameter detailModel: 数据源
  279 + private func pushExpressVC(listModel: ShopOrderListModel) {
  280 + if listModel.send_num > 1 || listModel.is_send == "0" {
  281 +// self.navigationController?.pushViewController(CNLiveShopOrderExpressListViewController.init(orderId: listModel.id! as NSString), animated: true)
  282 + self.navigationController?.pushViewController(CNLiveShopOrderExpressListViewController.init(orderId: "1000073435"), animated: true)
  283 + } else {
  284 +
  285 + }
  286 + }
  287 +
  288 + /// 选取商品及拆单
  289 + /// - Parameter listModel: 数据源
  290 + private func delivery(listModel: ShopOrderListModel) {
  291 + var type: CNLiveShopOrderSpliteSendViewType = .splite
  292 + if listModel.is_send == "0" {
  293 + type = .select
  294 + }
  295 + self.navigationController?.pushViewController(CNLiveShopOrderSendViewController.init(orderId: listModel.id! as NSString, show_type: type), animated: true)
  296 + }
  297 +
264 /// 通知用户自提 298 /// 通知用户自提
265 /// - Parameter listModel: 数据源 299 /// - Parameter listModel: 数据源
266 private func notifyOrder(listModel: ShopOrderListModel) { 300 private func notifyOrder(listModel: ShopOrderListModel) {
metaCode/Classes/Main/ShopPage/Controller/CNLiveShopOrderSendViewController.swift
@@ -34,16 +34,66 @@ class CNLiveShopOrderSendViewController: CNLiveBaseViewController, UITableViewDe @@ -34,16 +34,66 @@ class CNLiveShopOrderSendViewController: CNLiveBaseViewController, UITableViewDe
34 lazy var saveButton: UIButton = { 34 lazy var saveButton: UIButton = {
35 let saveButton = UIButton.init(type: .custom) 35 let saveButton = UIButton.init(type: .custom)
36 saveButton.frame = CGRect(x: KSreenWidth - 70, y: (get_system_nav_height() - (get_system_statusBar_height() + 25))/2 + get_system_statusBar_height(), width: 60, height: 25) 36 saveButton.frame = CGRect(x: KSreenWidth - 70, y: (get_system_nav_height() - (get_system_statusBar_height() + 25))/2 + get_system_statusBar_height(), width: 60, height: 25)
37 - saveButton.setTitle("拆单", for: .normal) 37 + saveButton.setTitle("拆 单", for: .normal)
38 saveButton.titleLabel?.font = semibold_adapt_font(pointSize: 15) 38 saveButton.titleLabel?.font = semibold_adapt_font(pointSize: 15)
39 saveButton.setTitleColor(HexColor("#F5A623"), for: .normal) 39 saveButton.setTitleColor(HexColor("#F5A623"), for: .normal)
40 saveButton.backgroundColor = .clear 40 saveButton.backgroundColor = .clear
41 saveButton.layer.masksToBounds = true 41 saveButton.layer.masksToBounds = true
42 saveButton.layer.cornerRadius = 5 42 saveButton.layer.cornerRadius = 5
43 - saveButton.addTarget(self, action: #selector(spliteBtnClick), for: .touchUpInside) 43 + saveButton.addTarget(self, action: #selector(bottomBtnClick), for: .touchUpInside)
  44 + saveButton.tag = 1000
44 return saveButton 45 return saveButton
45 }() 46 }()
46 47
  48 + lazy var footerView: UIView = {
  49 + let footerView = UIView.init(frame: CGRect(x: 0, y: KSreenHeight - get_system_tabbar_height(), width: KSreenWidth, height: get_system_tabbar_height()))
  50 + footerView.backgroundColor = .white
  51 + footerView.addSubview(allSelectBtn)
  52 + allSelectBtn.snp.makeConstraints { make in
  53 + make.width.equalTo(65)
  54 + make.height.equalTo(30)
  55 + make.left.equalToSuperview().offset(adapt_length(length: 20))
  56 + make.top.equalToSuperview().offset(adapt_length(length: 9.5))
  57 + }
  58 + footerView.addSubview(deliveryBtn)
  59 + deliveryBtn.snp.makeConstraints { make in
  60 + make.width.equalTo(77)
  61 + make.height.equalTo(30)
  62 + make.right.equalToSuperview().offset(-adapt_length(length: 20))
  63 + make.top.equalToSuperview().offset(adapt_length(length: 9.5))
  64 + }
  65 + return footerView
  66 + }()
  67 +
  68 + lazy var allSelectBtn: UIButton = {
  69 + let allSelectBtn = UIButton.init(type: .custom)
  70 + allSelectBtn.backgroundColor = .white
  71 + allSelectBtn.setImage(UIImage(named: "DS_goods_select_no"), for: .normal)
  72 + allSelectBtn.setImage(UIImage(named: "DS_goods_select_yes"), for: .selected)
  73 + allSelectBtn.setTitle(" 全选", for: .normal)
  74 + allSelectBtn.setTitleColor(HexColor("#3A3A3A"), for: .normal)
  75 + allSelectBtn.setTitle(" 全选", for: .selected)
  76 + allSelectBtn.setTitleColor(HexColor("#3A3A3A"), for: .selected)
  77 + allSelectBtn.titleLabel?.font = medium_adapt_font(pointSize: 14)
  78 + allSelectBtn.addTarget(self, action: #selector(bottomBtnClick), for: .touchUpInside)
  79 + allSelectBtn.isHidden = _show_type == .splite
  80 + allSelectBtn.tag = 1001
  81 + return allSelectBtn
  82 + }()
  83 +
  84 + lazy var deliveryBtn: UIButton = {
  85 + let deliveryBtn = UIButton.init()
  86 + deliveryBtn.backgroundColor = HexColor("#65C368")
  87 + deliveryBtn.layer.cornerRadius = 4
  88 + deliveryBtn.layer.masksToBounds = true
  89 + deliveryBtn.setTitle("快递发货", for: .normal)
  90 + deliveryBtn.titleLabel?.font = regular_adapt_font(pointSize: 14)
  91 + deliveryBtn.setTitleColor(HexColor("#FFFFFF"), for: .normal)
  92 + deliveryBtn.addTarget(self, action: #selector(bottomBtnClick), for: .touchUpInside)
  93 + deliveryBtn.tag = 1002
  94 + return deliveryBtn
  95 + }()
  96 +
47 lazy var dataArray: NSMutableArray = { 97 lazy var dataArray: NSMutableArray = {
48 let dataArray = NSMutableArray.init() 98 let dataArray = NSMutableArray.init()
49 return dataArray 99 return dataArray
@@ -71,14 +121,16 @@ class CNLiveShopOrderSendViewController: CNLiveBaseViewController, UITableViewDe @@ -71,14 +121,16 @@ class CNLiveShopOrderSendViewController: CNLiveBaseViewController, UITableViewDe
71 topNavView.addSubview(saveButton) 121 topNavView.addSubview(saveButton)
72 } 122 }
73 123
74 - loadDataSourceAction()  
75 -  
76 view.addSubview(tableView) 124 view.addSubview(tableView)
77 tableView.snp.makeConstraints { make in 125 tableView.snp.makeConstraints { make in
78 make.top.equalTo(KNavigationHeight) 126 make.top.equalTo(KNavigationHeight)
79 make.left.right.equalToSuperview() 127 make.left.right.equalToSuperview()
80 make.bottom.equalToSuperview().offset(-get_system_tabbar_height()) 128 make.bottom.equalToSuperview().offset(-get_system_tabbar_height())
81 } 129 }
  130 +
  131 + loadDataSourceAction()
  132 +
  133 + view.addSubview(footerView)
82 } 134 }
83 135
84 func loadDataSourceAction() { 136 func loadDataSourceAction() {
@@ -112,8 +164,44 @@ class CNLiveShopOrderSendViewController: CNLiveBaseViewController, UITableViewDe @@ -112,8 +164,44 @@ class CNLiveShopOrderSendViewController: CNLiveBaseViewController, UITableViewDe
112 } 164 }
113 } 165 }
114 166
115 - @objc func spliteBtnClick() {  
116 - 167 + @objc func bottomBtnClick(button: UIButton) {
  168 + //拆单
  169 + if button.tag == 1000 {
  170 + self.navigationController?.pushViewController(CNLiveShopOrderSendViewController.init(orderId: _orderId, show_type: .select), animated: true)
  171 + }
  172 + //全选
  173 + if button.tag == 1001 {
  174 + button.isSelected = !button.isSelected
  175 + for model in self.dataArray {
  176 + (model as! ShopOrderListGoodsModel).select = button.isSelected
  177 + }
  178 + tableView.reloadData()
  179 + }
  180 + //快递发货
  181 + if button.tag == 1002 {
  182 + var goods_array: NSArray = []
  183 + var isExp: Bool = false
  184 + if _show_type == .select {
  185 + let array = NSMutableArray.init()
  186 + for item in dataArray {
  187 + let model = item as! ShopOrderListGoodsModel
  188 + if (model.select == false || (model.selectNum! < ((model.send_num != 0 ? model.send_num : model.num)!))) {
  189 + isExp = true
  190 + }
  191 + if model.select == true {
  192 + let dic = ["id":model.goods_id,"num":"\(model.selectNum ?? 0)"]
  193 + array.add(dic)
  194 + }
  195 + }
  196 + goods_array = array.copy() as! NSArray
  197 + if goods_array.count <= 0 {
  198 + showMessage(message: "请选择发货商品")
  199 + return
  200 + }
  201 + }
  202 + let vc = CNLiveShopOrderExpressViewController.init(orderId: _orderId,isExp: isExp, goods_arr: goods_array)
  203 + self.navigationController?.pushViewController(vc, animated: true)
  204 + }
117 } 205 }
118 } 206 }
119 extension CNLiveShopOrderSendViewController { 207 extension CNLiveShopOrderSendViewController {
@@ -128,13 +216,28 @@ extension CNLiveShopOrderSendViewController { @@ -128,13 +216,28 @@ extension CNLiveShopOrderSendViewController {
128 guard let cell = tableView.dequeueReusableCell(withIdentifier: kShopBodyOrderSelectTableViewCellIdentifier) as? ShopBodyOrderSelectTableViewCell else { 216 guard let cell = tableView.dequeueReusableCell(withIdentifier: kShopBodyOrderSelectTableViewCellIdentifier) as? ShopBodyOrderSelectTableViewCell else {
129 return ShopBodyOrderSelectTableViewCell() 217 return ShopBodyOrderSelectTableViewCell()
130 } 218 }
131 - 219 + cell.setupDataSource(goodsModel: self.dataArray[indexPath.row] as! ShopOrderListGoodsModel)
  220 + cell.clickCallBack = { [self] isSelected in
  221 + if isSelected {
  222 + var select :Bool = true
  223 + for model in dataArray {
  224 + if !(model as! ShopOrderListGoodsModel).select {
  225 + select = false
  226 + }
  227 + }
  228 + allSelectBtn.isSelected = select
  229 + } else {
  230 + allSelectBtn.isSelected = false
  231 + }
  232 + }
  233 + cell.lineLabel.isHidden = (indexPath.row == dataArray.count-1)
132 return cell 234 return cell
133 } else { 235 } else {
134 guard let cell = tableView.dequeueReusableCell(withIdentifier: kShopBodyOrderSpliteTableViewCellIdentifier) as? ShopBodyOrderSpliteTableViewCell else { 236 guard let cell = tableView.dequeueReusableCell(withIdentifier: kShopBodyOrderSpliteTableViewCellIdentifier) as? ShopBodyOrderSpliteTableViewCell else {
135 return ShopBodyOrderSpliteTableViewCell() 237 return ShopBodyOrderSpliteTableViewCell()
136 } 238 }
137 cell.setupDataSource(goodsModel: self.dataArray[indexPath.row] as! ShopOrderListGoodsModel) 239 cell.setupDataSource(goodsModel: self.dataArray[indexPath.row] as! ShopOrderListGoodsModel)
  240 + cell.lineLabel.isHidden = (indexPath.row == dataArray.count-1)
138 return cell 241 return cell
139 } 242 }
140 } 243 }
@@ -142,7 +245,22 @@ extension CNLiveShopOrderSendViewController { @@ -142,7 +245,22 @@ extension CNLiveShopOrderSendViewController {
142 return adapt_length(length: 130) 245 return adapt_length(length: 130)
143 } 246 }
144 func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 247 func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
145 - 248 + if _show_type == .select {
  249 + let goodsModel = dataArray[indexPath.row] as! ShopOrderListGoodsModel
  250 + goodsModel.select = !goodsModel.select
  251 + if goodsModel.select {
  252 + var select: Bool = true
  253 + for model in dataArray {
  254 + if !(model as! ShopOrderListGoodsModel).select {
  255 + select = false
  256 + }
  257 + }
  258 + allSelectBtn.isSelected = select
  259 + } else {
  260 + allSelectBtn.isSelected = false
  261 + }
  262 + tableView.reloadRows(at: [indexPath], with: .none)
  263 + }
146 } 264 }
147 } 265 }
148 266
metaCode/Classes/Main/ShopPage/Model/CNLiveShopBaseModel.swift
@@ -36,7 +36,7 @@ class ShopOrderListModel: BaseModel { @@ -36,7 +36,7 @@ class ShopOrderListModel: BaseModel {
36 var express_state: String? = "" // 2在途 3签收 36 var express_state: String? = "" // 2在途 3签收
37 var order_detail = [ShopOrderListGoodsModel]() // 商品 37 var order_detail = [ShopOrderListGoodsModel]() // 商品
38 var is_send: String? = "" // state为3时 is_send为 0时为部分发货 1已发货 38 var is_send: String? = "" // state为3时 is_send为 0时为部分发货 1已发货
39 - var send_num: String? = "" // 发货数量 39 + var send_num: Int = 0 // 发货数量
40 40
41 override func mapping(mapper: HelpingMapper) { 41 override func mapping(mapper: HelpingMapper) {
42 mapper <<< 42 mapper <<<
@@ -86,7 +86,7 @@ class ShopOrderDetailModel: BaseModel { @@ -86,7 +86,7 @@ class ShopOrderDetailModel: BaseModel {
86 var order_detail = [ShopOrderListGoodsModel]() // 商品 86 var order_detail = [ShopOrderListGoodsModel]() // 商品
87 var username: String? = "" // 用户名 87 var username: String? = "" // 用户名
88 var is_send: String? = "" // 是否拆单,state = 3时判断 88 var is_send: String? = "" // 是否拆单,state = 3时判断
89 - var send_num: String? = "" // 物流数量 89 + var send_num: Int = 0 // 物流数量
90 var refund_num: String? = "" // 已经退款数量 90 var refund_num: String? = "" // 已经退款数量
91 var is_send_all: Bool = true // 是否是全部发货,这是自己设置的属性 91 var is_send_all: Bool = true // 是否是全部发货,这是自己设置的属性
92 92
@@ -192,3 +192,48 @@ class ShopOrderListGoodsModel: BaseModel { @@ -192,3 +192,48 @@ class ShopOrderListGoodsModel: BaseModel {
192 192
193 var select: Bool = false // 商品是否被选中 193 var select: Bool = false // 商品是否被选中
194 } 194 }
  195 +
  196 +//!!!: 快递公司model
  197 +class ShopOrderExpressModel: BaseModel {
  198 + var id: String? = ""// 快递公司id
  199 + var com: String? = ""// 名称
  200 + var no: String? = ""// 编号
  201 + var tel: String? = ""// 电话
  202 + var simg: String? = ""// logo
  203 + var address: String? = ""// 收货地址
  204 + var state: String? = ""// 3为已完成 其他为运输中
  205 +}
  206 +
  207 +//!!!: 店铺model
  208 +class ShopOrderStoreModel: BaseModel {
  209 + var id: String? = ""// 店铺id
  210 + var title: String? = ""// 名称
  211 + var address: String? = ""// 地址
  212 + var phone: String? = ""// 电话
  213 + var longitude: String? = ""// 经度
  214 + var latitude: String? = ""// 维度
  215 + var state: String? = ""// 状态
  216 +}
  217 +
  218 +//!!!: 多物流数据源
  219 +class ShopOrderExpressListModel: BaseModel {
  220 + var id: String? = ""// 发货单id
  221 + var order_id: String? = ""// 订单id
  222 + var express: String? = ""// 快递名称
  223 + var express_num: String? = ""// 快递单号
  224 + var simg: String? = ""// 快递logo
  225 + var detail_goods = [ShopOrderListGoodsModel]()// 发货单内商品
  226 + var expressNew = ShopOrderExpressDetailDateModel()// 快递信息
  227 +}
  228 +//!!!: 物流详情数据
  229 +class ShopOrderExpressDetailModel: BaseModel {
  230 + var express = ShopOrderExpressModel()// 快递公司信息
  231 + var data = [ShopOrderExpressDetailDateModel]()// 数据
  232 +}
  233 +
  234 +//!!!: 物流详情数据
  235 +class ShopOrderExpressDetailDateModel: BaseModel {
  236 + var AcceptTime: String? = ""// 时间
  237 + var AcceptStation: String? = ""// 内容
  238 + var accept_time: String? = ""// 时间戳
  239 +}
metaCode/Classes/Main/ShopPage/View/CNLiveShopBodyCustomView.swift
@@ -10,6 +10,8 @@ import SnapKit @@ -10,6 +10,8 @@ import SnapKit
10 import Kingfisher 10 import Kingfisher
11 11
12 typealias clickAgreeCallBack = (_ refundView: ShopBodyOrderRefundView,_ desc: String) -> Void 12 typealias clickAgreeCallBack = (_ refundView: ShopBodyOrderRefundView,_ desc: String) -> Void
  13 +typealias clickButtonCallBack = (_ isSelected: Bool) -> Void
  14 +typealias clickInputCallBack = (_ content: String, _ row: NSInteger) -> Void
13 class ShopBodyOrderRefundView: UIView, UITextViewDelegate { 15 class ShopBodyOrderRefundView: UIView, UITextViewDelegate {
14 16
15 var clickBlock: clickAgreeCallBack! 17 var clickBlock: clickAgreeCallBack!
@@ -235,7 +237,6 @@ class ShopBodyOrderSpliteTableViewCell: UITableViewCell { @@ -235,7 +237,6 @@ class ShopBodyOrderSpliteTableViewCell: UITableViewCell {
235 contentView.backgroundColor = .clear 237 contentView.backgroundColor = .clear
236 selectionStyle = .none 238 selectionStyle = .none
237 239
238 -  
239 addSubview(goodsImageView) 240 addSubview(goodsImageView)
240 goodsImageView.snp.makeConstraints { make in 241 goodsImageView.snp.makeConstraints { make in
241 make.left.top.equalToSuperview().offset(adapt_length(length: 15)) 242 make.left.top.equalToSuperview().offset(adapt_length(length: 15))
@@ -284,10 +285,400 @@ class ShopBodyOrderSpliteTableViewCell: UITableViewCell { @@ -284,10 +285,400 @@ class ShopBodyOrderSpliteTableViewCell: UITableViewCell {
284 285
285 class ShopBodyOrderSelectTableViewCell: UITableViewCell { 286 class ShopBodyOrderSelectTableViewCell: UITableViewCell {
286 287
  288 + lazy var goodsImageView: UIImageView = {
  289 + let goodsImageView = UIImageView.init()
  290 + goodsImageView.backgroundColor = .white
  291 + goodsImageView.contentMode = .scaleAspectFill
  292 + goodsImageView.layer.masksToBounds = true
  293 + return goodsImageView
  294 + }()
  295 +
  296 + lazy var goodsTitle: UILabel = {
  297 + let goodsTitle = UILabel.init()
  298 + goodsTitle.lineBreakMode = .byClipping
  299 + goodsTitle.numberOfLines = 2
  300 + goodsTitle.textColor = HexColor("#333333")
  301 + goodsTitle.font = regular_adapt_font(pointSize: 14)
  302 + return goodsTitle
  303 + }()
  304 +
  305 + lazy var priceLabel: UILabel = {
  306 + let priceLabel = UILabel.init()
  307 + priceLabel.textColor = HexColor("#FC1541")
  308 + priceLabel.font = medium_adapt_font(pointSize: 21)
  309 + return priceLabel
  310 + }()
  311 +
  312 + lazy var numberLabel: UILabel = {
  313 + let numberLabel = UILabel.init()
  314 + numberLabel.textAlignment = .right
  315 + numberLabel.textColor = HexColor("#222833")
  316 + numberLabel.font = regular_adapt_font(pointSize: 15)
  317 + return numberLabel
  318 + }()
  319 +
  320 + lazy var unNumberLabel: UILabel = {
  321 + let unNumberLabel = UILabel.init()
  322 + unNumberLabel.textAlignment = .right
  323 + unNumberLabel.textColor = HexColor("#222833")
  324 + unNumberLabel.font = regular_adapt_font(pointSize: 15)
  325 + return unNumberLabel
  326 + }()
  327 +
  328 + lazy var lineLabel: UILabel = {
  329 + let lineLabel = UILabel.init()
  330 + lineLabel.backgroundColor = HexColor("#EAEAEA")
  331 + return lineLabel
  332 + }()
  333 +
  334 + lazy var selectButton: UIButton = {
  335 + let selectButton = UIButton.init(type: .custom)
  336 + selectButton.setImage(UIImage(named: "DS_goods_select_no"), for: .normal)
  337 + selectButton.setImage(UIImage(named: "DS_goods_select_yes"), for: .selected)
  338 + selectButton.addTarget(self, action: #selector(buttonClick), for: .touchUpInside)
  339 + selectButton.tag = 1001
  340 + return selectButton
  341 + }()
  342 +
  343 + lazy var addButton: UIButton = {
  344 + let addButton = UIButton.init(type: .custom)
  345 + addButton.setImage(UIImage(named: "DS_goods_add_yes"), for: .normal)
  346 + addButton.setImage(UIImage(named: "DS_goods_add_no"), for: .selected)
  347 + addButton.addTarget(self, action: #selector(buttonClick), for: .touchUpInside)
  348 + addButton.tag = 1002
  349 + return addButton
  350 + }()
  351 +
  352 + lazy var minusButton: UIButton = {
  353 + let minusButton = UIButton(type: .custom)
  354 + minusButton.setImage(UIImage(named: "DS_goods_sub_yes"), for: .normal)
  355 + minusButton.setImage(UIImage(named: "DS_goods_sub_no"), for: .selected)
  356 + minusButton.addTarget(self, action: #selector(buttonClick), for: .touchUpInside)
  357 + minusButton.tag = 1003
  358 + return minusButton
  359 + }()
  360 +
  361 + var clickCallBack: clickButtonCallBack!
  362 + var _goodsModel: ShopOrderListGoodsModel!
287 override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { 363 override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
288 super.init(style: style, reuseIdentifier: reuseIdentifier) 364 super.init(style: style, reuseIdentifier: reuseIdentifier)
  365 + contentView.backgroundColor = .clear
  366 + selectionStyle = .none
289 367
  368 + addSubview(selectButton)
  369 + selectButton.snp.makeConstraints { make in
  370 + make.centerY.equalToSuperview()
  371 + make.left.equalToSuperview().offset(adapt_length(length: 15))
  372 + make.size.equalTo(adapt_length(length: 17))
  373 + }
  374 + addSubview(goodsImageView)
  375 + goodsImageView.snp.makeConstraints { make in
  376 + make.centerY.equalToSuperview()
  377 + make.left.equalTo(selectButton.snp.right).offset(adapt_length(length: 15))
  378 + make.size.equalTo(adapt_length(length: 100))
  379 + }
  380 + addSubview(goodsTitle)
  381 + goodsTitle.snp.makeConstraints { make in
  382 + make.top.equalTo(goodsImageView)
  383 + make.left.equalTo(goodsImageView.snp.right).offset(adapt_length(length: 15))
  384 + make.right.equalToSuperview().offset(-adapt_length(length: 15))
  385 + }
  386 + addSubview(unNumberLabel)
  387 + unNumberLabel.snp.makeConstraints { make in
  388 + make.left.equalTo(goodsTitle)
  389 + make.top.equalTo(goodsTitle.snp.bottom).offset(adapt_length(length: 5))
  390 + }
  391 + addSubview(addButton)
  392 + addButton.snp.makeConstraints { make in
  393 + make.right.bottom.equalToSuperview().offset(-adapt_length(length: 15))
  394 + make.size.equalTo(adapt_length(length: 29))
  395 + }
  396 + addSubview(numberLabel)
  397 + numberLabel.snp.makeConstraints { make in
  398 + make.right.equalTo(addButton.snp.left).offset(-adapt_length(length: 6))
  399 + make.centerY.equalTo(addButton)
  400 + }
  401 + addSubview(minusButton)
  402 + minusButton.snp.makeConstraints { make in
  403 + make.right.equalTo(numberLabel.snp.left).offset(-adapt_length(length: 6))
  404 + make.centerY.equalTo(addButton)
  405 + }
  406 + addSubview(priceLabel)
  407 + priceLabel.snp.makeConstraints { make in
  408 + make.left.equalTo(goodsTitle)
  409 + make.bottom.equalTo(goodsImageView)
  410 + }
  411 + addSubview(lineLabel)
  412 + lineLabel.snp.makeConstraints { make in
  413 + make.left.equalTo(goodsImageView)
  414 + make.right.equalTo(numberLabel)
  415 + make.bottom.equalToSuperview().offset(-adapt_length(length: 0.5))
  416 + make.height.equalTo(adapt_length(length: 0.5))
  417 + }
  418 + }
  419 +
  420 + @objc func buttonClick(sender: UIButton) {
  421 + if sender.tag - 1000 != 1 {
  422 + if sender.isSelected {
  423 + return
  424 + }
  425 + var selectNum = _goodsModel.selectNum
  426 + switch sender.tag - 1001 {
  427 + case 1:
  428 + selectNum! += 1
  429 + break
  430 + case 2:
  431 + selectNum! -= 1
  432 + default:
  433 + break
  434 + }
  435 + _goodsModel.selectNum = selectNum
  436 + numberLabel.text = "\(_goodsModel.selectNum ?? 0)"
  437 + numberLabel.sizeToFit()
  438 + setNeedsLayout()
  439 + if unNumberLabel.isHidden {
  440 + if _goodsModel.num! <= _goodsModel.selectNum! {
  441 + addButton.isSelected = true
  442 + } else {
  443 + addButton.isSelected = false
  444 + }
  445 + } else {
  446 + if _goodsModel.send_num! - _goodsModel.refund_num! <= _goodsModel.selectNum! {
  447 + addButton.isSelected = true
  448 + } else {
  449 + addButton.isSelected = false
  450 + }
  451 + }
  452 + if _goodsModel.selectNum! > 1 {
  453 + minusButton.isSelected = false
  454 + } else {
  455 + minusButton.isSelected = true
  456 + }
  457 + } else {
  458 + sender.isSelected = !sender.isSelected
  459 + _goodsModel.select = sender.isSelected
  460 + if (clickCallBack != nil) {
  461 + self.clickCallBack(sender.isSelected)
  462 + }
  463 + }
  464 + }
  465 +
  466 + func setupDataSource(goodsModel: ShopOrderListGoodsModel) {
  467 + _goodsModel = goodsModel
  468 + goodsImageView.kf.setImage(with: URL(string: goodsModel.simg!))
  469 + goodsTitle.text = goodsModel.title
  470 + unNumberLabel.text = "剩余发货数量:\(Int(goodsModel.send_num!)-Int(goodsModel.refund_num!))"
  471 + unNumberLabel.isHidden = (Int(goodsModel.send_num!)-Int(goodsModel.refund_num!) == 0)
  472 + unNumberLabel.sizeToFit()
  473 + priceLabel.text = "¥ \(goodsModel.price!)"
  474 + priceLabel.sizeToFit()
  475 + numberLabel.text = "\(goodsModel.selectNum ?? 0)"
  476 + numberLabel.sizeToFit()
  477 +
  478 + setNeedsLayout()
290 479
  480 + if unNumberLabel.isHidden {
  481 + if goodsModel.num! > goodsModel.selectNum! {
  482 + addButton.isSelected = false
  483 + } else {
  484 + addButton.isSelected = true
  485 + }
  486 + } else {
  487 + if (goodsModel.send_num! - goodsModel.refund_num! > goodsModel.selectNum!) {
  488 + addButton.isSelected = false
  489 + } else {
  490 + addButton.isSelected = true
  491 + }
  492 + }
  493 + if goodsModel.selectNum! > 1 {
  494 + minusButton.isSelected = false
  495 + } else {
  496 + minusButton.isSelected = true
  497 + }
  498 + selectButton.isSelected = goodsModel.select
  499 + }
  500 +
  501 + required init?(coder: NSCoder) {
  502 + fatalError("init(coder:) has not been implemented")
  503 + }
  504 +}
  505 +
  506 +class ShopBodyOrderExpressTableViewCell: UITableViewCell, UITextFieldDelegate {
  507 +
  508 + lazy var titleLab: UILabel = {
  509 + let titleLab = UILabel.init()
  510 + titleLab.textColor = HexColor("#3a3a3a")
  511 + titleLab.font = medium_adapt_font(pointSize: 14)
  512 + return titleLab
  513 + }()
  514 +
  515 + lazy var contentTextField: UITextField = {
  516 + let contentTextField = UITextField.init()
  517 + contentTextField.textColor = HexColor("#3a3a3a")
  518 + contentTextField.font = medium_adapt_font(pointSize: 14)
  519 + contentTextField.textAlignment = .left
  520 + contentTextField.clipsToBounds = true
  521 + contentTextField.keyboardType = .default
  522 + contentTextField.delegate = self
  523 + contentTextField.returnKeyType = .done
  524 + return contentTextField
  525 + }()
  526 +
  527 + lazy var rightArrowImageView: UIImageView = {
  528 + let rightArrowImageView = UIImageView.init()
  529 + rightArrowImageView.image = UIImage(named: "mine_header_message_gray_more")
  530 + return rightArrowImageView
  531 + }()
  532 +
  533 + lazy var lineLabel: UILabel = {
  534 + let lineLabel = UILabel.init()
  535 + lineLabel.backgroundColor = HexColor("#EAEAEA")
  536 + return lineLabel
  537 + }()
  538 +
  539 + var row: NSInteger!
  540 + var clickBlock: clickInputCallBack!
  541 + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
  542 + super.init(style: style, reuseIdentifier: reuseIdentifier)
  543 + contentView.backgroundColor = .clear
  544 + selectionStyle = .none
  545 +
  546 + addSubview(titleLab)
  547 + titleLab.snp.makeConstraints { make in
  548 + make.centerY.equalToSuperview()
  549 + make.width.equalTo(adapt_length(length: 100))
  550 + make.left.equalToSuperview().offset(adapt_length(length: 15))
  551 + }
  552 + addSubview(rightArrowImageView)
  553 + rightArrowImageView.snp.makeConstraints { make in
  554 + make.centerY.equalToSuperview()
  555 + make.right.equalToSuperview().offset(-adapt_length(length: 15))
  556 + make.size.equalTo(adapt_length(length: 12))
  557 + }
  558 + addSubview(contentTextField)
  559 + contentTextField.snp.makeConstraints { make in
  560 + make.centerY.equalToSuperview()
  561 + make.left.equalTo(titleLab.snp.right).offset(adapt_length(length: 15))
  562 + make.right.equalTo(rightArrowImageView.snp.left).offset(-adapt_length(length: 10))
  563 + }
  564 + addSubview(lineLabel)
  565 + lineLabel.snp.makeConstraints { make in
  566 + make.left.equalTo(adapt_length(length: 10))
  567 + make.right.equalTo(-adapt_length(length: 10))
  568 + make.bottom.equalToSuperview().offset(-adapt_length(length: 0.5))
  569 + make.height.equalTo(adapt_length(length: 0.5))
  570 + }
  571 + }
  572 +
  573 + func setup(title: String, content: String, placeHolder: String, contentIsEdit: Bool, isShowArrowImage: Bool, isShowLine: Bool) {
  574 + titleLab.text = title
  575 + contentTextField.text = content
  576 + contentTextField.placeholder = placeHolder
  577 + contentTextField.isUserInteractionEnabled = contentIsEdit
  578 + rightArrowImageView.isHidden = !isShowArrowImage
  579 + lineLabel.isHidden = !isShowLine
  580 +
  581 + let size = contentTextField.sizeThatFits(CGSize(width: KSreenWidth - adapt_length(length: 145), height: CGFLOAT_MAX))
  582 +
  583 + contentTextField.snp.remakeConstraints { make in
  584 + make.left.equalTo(titleLab.snp.right).offset(adapt_length(length: 15))
  585 + make.top.equalToSuperview().offset(adapt_length(length: 15))
  586 + if rightArrowImageView.isHidden {
  587 + make.right.equalToSuperview().offset(-adapt_length(length: 15))
  588 + make.height.equalTo(size.height > adapt_length(length: 20) ? size.height : adapt_length(length: 20))
  589 + } else {
  590 + make.bottom.equalToSuperview().offset(-adapt_length(length: 15))
  591 + make.right.equalTo(rightArrowImageView.snp.left).offset(-adapt_length(length: 5))
  592 + }
  593 + }
  594 + }
  595 +
  596 + func textFieldDidEndEditing(_ textField: UITextField) {
  597 + if textField == contentTextField {
  598 + if (clickBlock != nil) {
  599 + clickBlock(contentTextField.text!,row)
  600 + }
  601 + }
  602 + }
  603 + func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
  604 + if string == "\n" || contentTextField.text!.count > 20 {
  605 + return false
  606 + } else {
  607 + return true
  608 + }
  609 + }
  610 +
  611 +
  612 + required init?(coder: NSCoder) {
  613 + fatalError("init(coder:) has not been implemented")
  614 + }
  615 +}
  616 +
  617 +
  618 +class ShopBodyOrderExpressFirmTableViewCell: UITableViewCell {
  619 +
  620 + lazy var headerImageView: UIImageView = {
  621 + let headerImageView = UIImageView.init()
  622 + headerImageView.backgroundColor = .white
  623 + headerImageView.contentMode = .scaleAspectFill
  624 + headerImageView.layer.masksToBounds = true
  625 + return headerImageView
  626 + }()
  627 +
  628 + lazy var titleLabel: UILabel = {
  629 + let titleLabel = UILabel.init()
  630 + titleLabel.textColor = HexColor("#383838")
  631 + titleLabel.font = regular_adapt_font(pointSize: 15)
  632 + return titleLabel
  633 + }()
  634 +
  635 + lazy var descLabel: UILabel = {
  636 + let descLabel = UILabel.init()
  637 + descLabel.textColor = HexColor("#a5a5a5")
  638 + descLabel.font = light_adapt_font(pointSize: 14)
  639 + return descLabel
  640 + }()
  641 +
  642 + lazy var lineLabel: UILabel = {
  643 + let lineLabel = UILabel.init()
  644 + lineLabel.backgroundColor = HexColor("#EAEAEA")
  645 + return lineLabel
  646 + }()
  647 +
  648 + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
  649 + super.init(style: style, reuseIdentifier: reuseIdentifier)
  650 + contentView.backgroundColor = .clear
  651 + selectionStyle = .none
  652 +
  653 + addSubview(headerImageView)
  654 + headerImageView.snp.makeConstraints { make in
  655 + make.centerY.equalToSuperview()
  656 + make.left.equalToSuperview().offset(adapt_length(length: 15))
  657 + make.size.equalTo(adapt_length(length: 36))
  658 + }
  659 + addSubview(titleLabel)
  660 + titleLabel.snp.makeConstraints { make in
  661 + make.top.equalTo(headerImageView.snp.top)
  662 + make.left.equalTo(headerImageView.snp.right).offset(adapt_length(length: 10))
  663 + }
  664 + addSubview(descLabel)
  665 + descLabel.snp.makeConstraints { make in
  666 + make.bottom.equalTo(headerImageView.snp.bottom)
  667 + make.left.equalTo(headerImageView.snp.right).offset(adapt_length(length: 10))
  668 + }
  669 + addSubview(lineLabel)
  670 + lineLabel.snp.makeConstraints { make in
  671 + make.left.equalTo(adapt_length(length: 10))
  672 + make.right.equalTo(-adapt_length(length: 10))
  673 + make.bottom.equalToSuperview().offset(-adapt_length(length: 0.5))
  674 + make.height.equalTo(adapt_length(length: 0.5))
  675 + }
  676 + }
  677 +
  678 + func setupDataSource(model: ShopOrderExpressModel) {
  679 + headerImageView.kf.setImage(with: URL(string: model.simg!))
  680 + titleLabel.text = model.com
  681 + descLabel.text = model.tel
291 } 682 }
292 683
293 required init?(coder: NSCoder) { 684 required init?(coder: NSCoder) {
metaCode/Classes/Main/ShopPage/View/CNLiveShopBodyExpressView.swift 0 → 100644
  1 +//
  2 +// CNLiveShopBodyExpressView.swift
  3 +// metaCode
  4 +//
  5 +// Created by open on 2023/11/8.
  6 +//
  7 +
  8 +import Foundation
  9 +
  10 +class ShopBodyOrderExpressListTableViewCell: UITableViewCell {
  11 +
  12 + lazy var logoImageView: UIImageView = {
  13 + let logoImageView = UIImageView.init()
  14 + logoImageView.backgroundColor = .white
  15 + return logoImageView
  16 + }()
  17 +
  18 + lazy var expressName: UILabel = {
  19 + let expressName = UILabel.init()
  20 + expressName.textColor = HexColor("#333333")
  21 + expressName.font = medium_font(pointSize: 14)
  22 + return expressName
  23 + }()
  24 +
  25 + lazy var expressNo: UILabel = {
  26 + let expressNo = UILabel.init()
  27 + expressNo.textColor = HexColor("#b4b4b4")
  28 + expressNo.font = regular_font(pointSize: 12)
  29 + return expressNo
  30 + }()
  31 +
  32 + lazy var expressCopy: UIButton = {
  33 + let expressCopy = UIButton.init(type: .custom)
  34 + expressCopy.backgroundColor = .white
  35 + expressCopy.setTitle("复制单号", for: .normal)
  36 + expressCopy.layer.cornerRadius = 4
  37 + expressCopy.titleLabel?.font = medium_font(pointSize: 14)
  38 + expressCopy.setTitleColor(HexColor("#28c1c6"), for: .normal)
  39 + expressCopy.contentHorizontalAlignment = .center
  40 + expressCopy.layer.borderWidth = 1
  41 + expressCopy.layer.borderColor = HexColor("#28c1c6")?.cgColor
  42 + expressCopy.addTarget(self, action: #selector(actionClick), for: .touchUpInside)
  43 + return expressCopy
  44 + }()
  45 +
  46 + lazy var expressTime: UILabel = {
  47 + let expressTime = UILabel.init()
  48 + expressTime.font = regular_font(pointSize: 12)
  49 + expressTime.textColor = HexColor("#333333")
  50 + return expressTime
  51 + }()
  52 +
  53 + lazy var expressAddress: UILabel = {
  54 + let expressAddress = UILabel.init()
  55 + expressAddress.font = regular_font(pointSize: 12)
  56 + expressAddress.textColor = HexColor("#333333")
  57 + expressAddress.numberOfLines = 0
  58 + return expressAddress
  59 + }()
  60 +
  61 + lazy var totleExpress: UILabel = {
  62 + let totleExpress = UILabel.init()
  63 + totleExpress.textColor = HexColor("#9b9b9b")
  64 + totleExpress.font = regular_font(pointSize: 12)
  65 + return totleExpress
  66 + }()
  67 +
  68 + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
  69 + super.init(style: style, reuseIdentifier: reuseIdentifier)
  70 + contentView.backgroundColor = .clear
  71 + selectionStyle = .none
  72 +
  73 + addSubview(logoImageView)
  74 + logoImageView.snp.makeConstraints { make in
  75 + make.left.top.equalToSuperview().offset(adapt_length(length: 15))
  76 + make.size.equalTo(adapt_length(length: 39.68))
  77 + }
  78 + addSubview(expressName)
  79 + expressName.snp.makeConstraints { make in
  80 + make.top.equalTo(logoImageView.snp.top).offset(adapt_length(length: 0.5))
  81 +
  82 + }
  83 + }
  84 +
  85 + var _listModel: ShopOrderExpressListModel!
  86 + func setupDataSource(listModel: ShopOrderExpressListModel) {
  87 + _listModel = listModel
  88 +
  89 + }
  90 +
  91 + @objc func actionClick() {
  92 +
  93 + }
  94 +
  95 + required init?(coder: NSCoder) {
  96 + fatalError("init(coder:) has not been implemented")
  97 + }
  98 +
  99 +
  100 +}
metaCode/Classes/Main/ShopPage/View/CNLiveShopBodyListView.swift
@@ -19,7 +19,7 @@ enum CNDSOrderListSectionFooterBtnClickEvent { @@ -19,7 +19,7 @@ enum CNDSOrderListSectionFooterBtnClickEvent {
19 case expDetail //物流详情 19 case expDetail //物流详情
20 case none 20 case none
21 } 21 }
22 -typealias clickRightBtnCallBack = (_ event: CNDSOrderListSectionFooterBtnClickEvent,_ listModel :ShopOrderListModel) -> Void 22 +typealias clickRightBtnCallBack = (_ title: String,_ event: CNDSOrderListSectionFooterBtnClickEvent,_ listModel :ShopOrderListModel) -> Void
23 class ShopBodyOrderFooterViewCell: UITableViewHeaderFooterView { 23 class ShopBodyOrderFooterViewCell: UITableViewHeaderFooterView {
24 24
25 lazy var addressLabel: UILabel = { 25 lazy var addressLabel: UILabel = {
@@ -118,7 +118,7 @@ class ShopBodyOrderFooterViewCell: UITableViewHeaderFooterView { @@ -118,7 +118,7 @@ class ShopBodyOrderFooterViewCell: UITableViewHeaderFooterView {
118 @objc func rightBtnClick(button: UIButton) { 118 @objc func rightBtnClick(button: UIButton) {
119 119
120 var clickEvent: CNDSOrderListSectionFooterBtnClickEvent! = CNDSOrderListSectionFooterBtnClickEvent.none 120 var clickEvent: CNDSOrderListSectionFooterBtnClickEvent! = CNDSOrderListSectionFooterBtnClickEvent.none
121 - 121 +
122 if button.titleLabel?.text == "快递发货" { 122 if button.titleLabel?.text == "快递发货" {
123 if _listModel.state == "2" { 123 if _listModel.state == "2" {
124 if _listModel.order_detail.count > 1 { 124 if _listModel.order_detail.count > 1 {
@@ -159,7 +159,7 @@ class ShopBodyOrderFooterViewCell: UITableViewHeaderFooterView { @@ -159,7 +159,7 @@ class ShopBodyOrderFooterViewCell: UITableViewHeaderFooterView {
159 } 159 }
160 160
161 if (_listModel != nil) && (clickRightBtnCallBack != nil) { 161 if (_listModel != nil) && (clickRightBtnCallBack != nil) {
162 - self.clickRightBtnCallBack(clickEvent, _listModel) 162 + self.clickRightBtnCallBack((button.titleLabel?.text)!, clickEvent, _listModel)
163 } 163 }
164 } 164 }
165 165
metaCode/Classes/Main/ShopPage/ViewModel/CNLiveShopViewModel.swift
@@ -288,5 +288,235 @@ class CNLiveShopViewModel: NSObject { @@ -288,5 +288,235 @@ class CNLiveShopViewModel: NSObject {
288 } 288 }
289 } 289 }
290 290
  291 + /// 获取商家店铺列表
  292 + /// - Parameter resultBlock: 返回
  293 + static func requestSellerStore(resultBlock: @escaping resultShopBlock) {
  294 + let param = NSMutableDictionary()
  295 + param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "id")
  296 + let custom_param = NSMutableDictionary()
  297 + custom_param.setValue(APPId_wjj, forKey: "appId")
  298 + custom_param.setValue(APPKey_wjj, forKey: "appKey")
  299 + CNLiveNetworking.setAllowRequestDefaultArgument(true)
  300 + CNLiveNetworking.setupShowDataResult(false)
  301 + CNLiveNetworking.setupDSRequest(true)
  302 + CNLiveNetworking.setupCustomParam(custom_param as? [String : String])
  303 + CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/api/v1/sellerStore", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in
  304 + hiddenLoading()
  305 + if (error == nil) {
  306 + let resp = result as! NSDictionary
  307 + let errorCode = "\(resp["code"] ?? "0")"
  308 + if (errorCode == "200") {
  309 + if resp["data"] is NSNull {
  310 + resultBlock(NSNull(),.failed)
  311 + } else {
  312 + let resp_dict = resp["data"] as! NSDictionary
  313 + let array = resp_dict["data"] as! NSArray
  314 + let tempArray = NSMutableArray()
  315 + let textArray = NSMutableArray()
  316 + for item in array {
  317 + let listModel = dictionaryToModel(item as! [String : Any], ShopOrderStoreModel.self,"") as! ShopOrderStoreModel
  318 + tempArray.add(listModel)
  319 + textArray.add(listModel.title! as String)
  320 + }
  321 + resultBlock([tempArray,textArray], .success)
  322 + }
  323 + } else {
  324 + showMessage(message: resp["message"] as! String)
  325 + resultBlock(NSNull(),.failed)
  326 + }
  327 + } else {
  328 + if CNLiveNetworking.isNetworking() {
  329 + showMessage(message: "请求失败")
  330 + resultBlock(NSNull(),.failed)
  331 + } else {
  332 + showMessage(message: "似乎与网络断开链接")
  333 + resultBlock(NSNull(),.noNetwork)
  334 + }
  335 + }
  336 + }
  337 + }
  338 +
  339 + /// 发快递 && 编辑快递
  340 + /// - Parameters:
  341 + /// - orderId: 订单号
  342 + /// - expressId: 快递id
  343 + /// - expressNum: 快递数量
  344 + /// - hiddenSop: true为修改快递 false为发快递
  345 + /// - expId: 扩展id (hiddenSop为true时必传)
  346 + /// - goodsList: 商品列表 (hiddenSop为false时必传)
  347 + /// - storeId: 店铺id (hiddenSop为false时必传)
  348 + /// - resultBlock: 返回
  349 + static func requestExpress(orderId: String, expressId: String, expressNum: String, hiddenSop: Bool, expId: String, goodsList: NSArray, storeId: String, resultBlock: @escaping resultShopBlock) {
  350 + if hiddenSop {
  351 + let param = NSMutableDictionary()
  352 + param.setValue(orderId, forKey: "id")
  353 + param.setValue(expId, forKey: "exp_id")
  354 + param.setValue(expressId, forKey: "express_id")
  355 + param.setValue(expressNum, forKey: "express_num")
  356 + let custom_param = NSMutableDictionary()
  357 + custom_param.setValue(APPId_wjj, forKey: "appId")
  358 + custom_param.setValue(APPKey_wjj, forKey: "appKey")
  359 + CNLiveNetworking.setAllowRequestDefaultArgument(true)
  360 + CNLiveNetworking.setupShowDataResult(false)
  361 + CNLiveNetworking.setupDSRequest(true)
  362 + CNLiveNetworking.setupCustomParam(custom_param as? [String : String])
  363 + CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/editExpress", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in
  364 + hiddenLoading()
  365 + if (error == nil) {
  366 + let resp = result as! NSDictionary
  367 + let errorCode = "\(resp["code"] ?? "0")"
  368 + if (errorCode == "200") {
  369 + resultBlock("修改成功", .success)
  370 + } else {
  371 + showMessage(message: resp["message"] as! String)
  372 + resultBlock(NSNull(),.failed)
  373 + }
  374 + } else {
  375 + if CNLiveNetworking.isNetworking() {
  376 + showMessage(message: "修改快递信息失败")
  377 + resultBlock(NSNull(),.failed)
  378 + } else {
  379 + showMessage(message: "似乎与网络断开链接")
  380 + resultBlock(NSNull(),.noNetwork)
  381 + }
  382 + }
  383 + }
  384 + } else {
  385 + let param = NSMutableDictionary()
  386 + param.setValue(orderId, forKey: "id")
  387 + param.setValue(storeId, forKey: "store_id")
  388 + param.setValue(expressId, forKey: "express_id")
  389 + param.setValue(expressNum, forKey: "express_num")
  390 + param.setValue(UserInfoManager.shared.userInfo.uid, forKey: "id")
  391 + if goodsList.count > 0 {
  392 + do {
  393 + let jsonData = try JSONSerialization.data(withJSONObject: goodsList, options: .prettyPrinted)
  394 + let jsonString = NSString.init(data: jsonData, encoding: NSUTF8StringEncoding)
  395 + param.setValue(jsonString, forKey: "goods_arr")
  396 + } catch _ {}
  397 + }
  398 + let custom_param = NSMutableDictionary()
  399 + custom_param.setValue(APPId_wjj, forKey: "appId")
  400 + custom_param.setValue(APPKey_wjj, forKey: "appKey")
  401 + CNLiveNetworking.setAllowRequestDefaultArgument(true)
  402 + CNLiveNetworking.setupShowDataResult(false)
  403 + CNLiveNetworking.setupDSRequest(true)
  404 + CNLiveNetworking.setupCustomParam(custom_param as? [String : String])
  405 + CNLiveNetworking.requestNetwork(with: .POST, urlString: APPBaseWjjBUrl+"/api/v1/express", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in
  406 + hiddenLoading()
  407 + if (error == nil) {
  408 + let resp = result as! NSDictionary
  409 + let errorCode = "\(resp["code"] ?? "0")"
  410 + if (errorCode == "200") {
  411 + resultBlock("发货成功", .success)
  412 + } else {
  413 + showMessage(message: resp["message"] as! String)
  414 + resultBlock(NSNull(),.failed)
  415 + }
  416 + } else {
  417 + if CNLiveNetworking.isNetworking() {
  418 + showMessage(message: "发货失败")
  419 + resultBlock(NSNull(),.failed)
  420 + } else {
  421 + showMessage(message: "似乎与网络断开链接")
  422 + resultBlock(NSNull(),.noNetwork)
  423 + }
  424 + }
  425 + }
  426 + }
  427 + }
  428 +
  429 + /// 快递公司列表
  430 + /// - resultBlock: 返回
  431 + static func requestExpressList(resultBlock: @escaping resultShopBlock) {
  432 + let custom_param = NSMutableDictionary()
  433 + custom_param.setValue(APPId_wjj, forKey: "appId")
  434 + custom_param.setValue(APPKey_wjj, forKey: "appKey")
  435 + CNLiveNetworking.setAllowRequestDefaultArgument(true)
  436 + CNLiveNetworking.setupShowDataResult(false)
  437 + CNLiveNetworking.setupDSRequest(true)
  438 + CNLiveNetworking.setupCustomParam(custom_param as? [String : String])
  439 + CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/api/v1/expressList", param: [ : ], cacheType: .networkOnly) { task, result, error in
  440 + hiddenLoading()
  441 + if (error == nil) {
  442 + let resp = result as! NSDictionary
  443 + let errorCode = "\(resp["code"] ?? "0")"
  444 + if (errorCode == "200") {
  445 + if resp["data"] is NSNull {
  446 + resultBlock(NSNull(),.failed)
  447 + } else {
  448 + let resp_dict = resp["data"] as! NSDictionary
  449 + let array = resp_dict["data"] as! NSArray
  450 + let tempArray = NSMutableArray()
  451 + for item in array {
  452 + let listModel = dictionaryToModel(item as! [String : Any], ShopOrderExpressModel.self,"") as! ShopOrderExpressModel
  453 + tempArray.add(listModel)
  454 + }
  455 + resultBlock(tempArray, .success)
  456 + }
  457 + } else {
  458 + showMessage(message: resp["message"] as! String)
  459 + resultBlock(NSNull(),.failed)
  460 + }
  461 + } else {
  462 + if CNLiveNetworking.isNetworking() {
  463 + showMessage(message: "请求失败")
  464 + resultBlock(NSNull(),.failed)
  465 + } else {
  466 + showMessage(message: "似乎与网络断开链接")
  467 + resultBlock(NSNull(),.noNetwork)
  468 + }
  469 + }
  470 + }
  471 + }
  472 +
  473 + /// 获取部分发货物流详情
  474 + /// - Parameters:
  475 + /// - orderId: 订单id
  476 + /// - resultBlock: 返回
  477 + static func requestExpressList(orderId: NSString, resultBlock: @escaping resultShopBlock) {
  478 + let param = NSMutableDictionary()
  479 + param.setValue(orderId, forKey: "id")
  480 + let custom_param = NSMutableDictionary()
  481 + custom_param.setValue(APPId_wjj, forKey: "appId")
  482 + custom_param.setValue(APPKey_wjj, forKey: "appKey")
  483 + CNLiveNetworking.setAllowRequestDefaultArgument(true)
  484 + CNLiveNetworking.setupShowDataResult(false)
  485 + CNLiveNetworking.setupDSRequest(true)
  486 + CNLiveNetworking.setupCustomParam(custom_param as? [String : String])
  487 + CNLiveNetworking.requestNetwork(with: .GET, urlString: APPBaseWjjBUrl+"/api/v1/orderMoreExp", param: param as! [String : String], cacheType: .networkOnly) { task, result, error in
  488 + hiddenLoading()
  489 + if (error == nil) {
  490 + let resp = result as! NSDictionary
  491 + let errorCode = "\(resp["code"] ?? "0")"
  492 + if (errorCode == "200") {
  493 + if resp["data"] is NSNull {
  494 + resultBlock(NSNull(),.failed)
  495 + } else {
  496 + let array = resp["data"] as! NSArray
  497 + let tempArray = NSMutableArray()
  498 + for item in array {
  499 + let listModel = dictionaryToModel(item as! [String : Any], ShopOrderExpressListModel.self,"") as! ShopOrderExpressListModel
  500 + if listModel.id != "0" {
  501 + tempArray.add(listModel)
  502 + }
  503 + }
  504 + resultBlock(tempArray, .success)
  505 + }
  506 + } else {
  507 + showMessage(message: resp["message"] as! String)
  508 + resultBlock(NSNull(),.failed)
  509 + }
  510 + } else {
  511 + if CNLiveNetworking.isNetworking() {
  512 + showMessage(message: "请求失败")
  513 + resultBlock(NSNull(),.failed)
  514 + } else {
  515 + showMessage(message: "似乎与网络断开链接")
  516 + resultBlock(NSNull(),.noNetwork)
  517 + }
  518 + }
  519 + }
  520 + }
291 521
292 } 522 }
metaCode/Supporting Files/Assets.xcassets/Shop/DS_goods_add_no.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "filename" : "加@2x.png",
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "filename" : "加@3x.png",
  14 + "idiom" : "universal",
  15 + "scale" : "3x"
  16 + }
  17 + ],
  18 + "info" : {
  19 + "author" : "xcode",
  20 + "version" : 1
  21 + }
  22 +}
metaCode/Supporting Files/Assets.xcassets/Shop/DS_goods_add_no.imageset/加@2x.png 0 → 100644

1.82 KB

metaCode/Supporting Files/Assets.xcassets/Shop/DS_goods_add_no.imageset/加@3x.png 0 → 100644

2.78 KB

metaCode/Supporting Files/Assets.xcassets/Shop/DS_goods_add_yes.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "filename" : "加@2x.png",
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "filename" : "加@3x.png",
  14 + "idiom" : "universal",
  15 + "scale" : "3x"
  16 + }
  17 + ],
  18 + "info" : {
  19 + "author" : "xcode",
  20 + "version" : 1
  21 + }
  22 +}
metaCode/Supporting Files/Assets.xcassets/Shop/DS_goods_add_yes.imageset/加@2x.png 0 → 100644

2.43 KB

metaCode/Supporting Files/Assets.xcassets/Shop/DS_goods_add_yes.imageset/加@3x.png 0 → 100644

3.77 KB

metaCode/Supporting Files/Assets.xcassets/Shop/DS_goods_select_no.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "filename" : "未选中@2x.png",
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "filename" : "未选中@3x.png",
  14 + "idiom" : "universal",
  15 + "scale" : "3x"
  16 + }
  17 + ],
  18 + "info" : {
  19 + "author" : "xcode",
  20 + "version" : 1
  21 + }
  22 +}
metaCode/Supporting Files/Assets.xcassets/Shop/DS_goods_select_no.imageset/未选中@2x.png 0 → 100644

1.08 KB

metaCode/Supporting Files/Assets.xcassets/Shop/DS_goods_select_no.imageset/未选中@3x.png 0 → 100644

1.76 KB

metaCode/Supporting Files/Assets.xcassets/Shop/DS_goods_select_yes.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "filename" : "选中@2x.png",
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "filename" : "选中@3x.png",
  14 + "idiom" : "universal",
  15 + "scale" : "3x"
  16 + }
  17 + ],
  18 + "info" : {
  19 + "author" : "xcode",
  20 + "version" : 1
  21 + }
  22 +}
metaCode/Supporting Files/Assets.xcassets/Shop/DS_goods_select_yes.imageset/选中@2x.png 0 → 100644

1.37 KB

metaCode/Supporting Files/Assets.xcassets/Shop/DS_goods_select_yes.imageset/选中@3x.png 0 → 100644

2.13 KB

metaCode/Supporting Files/Assets.xcassets/Shop/DS_goods_sub_no.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "filename" : "减@2x.png",
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "filename" : "减@3x.png",
  14 + "idiom" : "universal",
  15 + "scale" : "3x"
  16 + }
  17 + ],
  18 + "info" : {
  19 + "author" : "xcode",
  20 + "version" : 1
  21 + }
  22 +}
metaCode/Supporting Files/Assets.xcassets/Shop/DS_goods_sub_no.imageset/减@2x.png 0 → 100644

1.87 KB

metaCode/Supporting Files/Assets.xcassets/Shop/DS_goods_sub_no.imageset/减@3x.png 0 → 100644

3.22 KB

metaCode/Supporting Files/Assets.xcassets/Shop/DS_goods_sub_yes.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "filename" : "减@2x.png",
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "filename" : "减@3x.png",
  14 + "idiom" : "universal",
  15 + "scale" : "3x"
  16 + }
  17 + ],
  18 + "info" : {
  19 + "author" : "xcode",
  20 + "version" : 1
  21 + }
  22 +}
metaCode/Supporting Files/Assets.xcassets/Shop/DS_goods_sub_yes.imageset/减@2x.png 0 → 100644

1.84 KB

metaCode/Supporting Files/Assets.xcassets/Shop/DS_goods_sub_yes.imageset/减@3x.png 0 → 100644

3.44 KB