Commit 4607f7d4 authored by Sandy's avatar Sandy

增加商品列表对象属性、更多热门标签、更多热门品牌界面搭建

parent 6e8c7fc8
......@@ -14,6 +14,11 @@
1900A34A1CB6306600B2B7C4 /* HotBrandModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1900A3491CB6306600B2B7C4 /* HotBrandModel.m */; };
1912FCD71CCDC945004CF976 /* JavenReseller.m in Sources */ = {isa = PBXBuildFile; fileRef = 1912FCD61CCDC945004CF976 /* JavenReseller.m */; };
1912FCDA1CCDC955004CF976 /* JavenResellerModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1912FCD91CCDC955004CF976 /* JavenResellerModel.m */; };
1912FCFB1CD08166004CF976 /* CommotityListBrand.m in Sources */ = {isa = PBXBuildFile; fileRef = 1912FCF61CD08166004CF976 /* CommotityListBrand.m */; };
1912FCFC1CD08166004CF976 /* CommotityListCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = 1912FCF81CD08166004CF976 /* CommotityListCategory.m */; };
1912FCFD1CD08166004CF976 /* CommotityListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1912FCFA1CD08166004CF976 /* CommotityListModel.m */; };
1912FD031CD0907D004CF976 /* MoreHotTagViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1912FD021CD0907D004CF976 /* MoreHotTagViewController.m */; };
1912FD061CD090A6004CF976 /* MoreHotBrandViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1912FD051CD090A6004CF976 /* MoreHotBrandViewController.m */; };
191383351CAB95F5005F6440 /* NoPaymentTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 191383341CAB95F5005F6440 /* NoPaymentTableViewController.m */; };
1913833A1CAB96D4005F6440 /* OrderTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 191383381CAB96D4005F6440 /* OrderTableViewCell.m */; };
1913833B1CAB96D4005F6440 /* OrderTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 191383391CAB96D4005F6440 /* OrderTableViewCell.xib */; };
......@@ -28,13 +33,6 @@
191AEE151CBB818600F5E535 /* UserInfoPasswordControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE0C1CBB818600F5E535 /* UserInfoPasswordControl.m */; };
191AEE161CBB818600F5E535 /* UserInfoShop.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE0E1CBB818600F5E535 /* UserInfoShop.m */; };
191AEE191CBB83EF00F5E535 /* UserInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE181CBB83EF00F5E535 /* UserInfo.m */; };
191AEE2A1CBB86C600F5E535 /* CommotityListBrand.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE1C1CBB86C600F5E535 /* CommotityListBrand.m */; };
191AEE2B1CBB86C600F5E535 /* CommotityListCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE1E1CBB86C600F5E535 /* CommotityListCategory.m */; };
191AEE2C1CBB86C600F5E535 /* CommotityListCreateInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE201CBB86C600F5E535 /* CommotityListCreateInfo.m */; };
191AEE2D1CBB86C600F5E535 /* CommotityListLastModifyInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE221CBB86C600F5E535 /* CommotityListLastModifyInfo.m */; };
191AEE2E1CBB86C600F5E535 /* CommotityListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE241CBB86C600F5E535 /* CommotityListModel.m */; };
191AEE2F1CBB86C600F5E535 /* CommotityListOperator.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE261CBB86C600F5E535 /* CommotityListOperator.m */; };
191AEE301CBB86C600F5E535 /* CommotityListUpper.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE281CBB86C600F5E535 /* CommotityListUpper.m */; };
191AEE5C1CBCC6D100F5E535 /* addCommodityRequestModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE4A1CBCC6D100F5E535 /* addCommodityRequestModel.m */; };
191AEE5D1CBCC6D100F5E535 /* CommotityRequestModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE4C1CBCC6D100F5E535 /* CommotityRequestModel.m */; };
191AEE5E1CBCC6D100F5E535 /* Conditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE4E1CBCC6D100F5E535 /* Conditions.m */; };
......@@ -266,6 +264,16 @@
1912FCD61CCDC945004CF976 /* JavenReseller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenReseller.m; sourceTree = "<group>"; };
1912FCD81CCDC955004CF976 /* JavenResellerModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenResellerModel.h; sourceTree = "<group>"; };
1912FCD91CCDC955004CF976 /* JavenResellerModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenResellerModel.m; sourceTree = "<group>"; };
1912FCF51CD08166004CF976 /* CommotityListBrand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommotityListBrand.h; sourceTree = "<group>"; };
1912FCF61CD08166004CF976 /* CommotityListBrand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommotityListBrand.m; sourceTree = "<group>"; };
1912FCF71CD08166004CF976 /* CommotityListCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommotityListCategory.h; sourceTree = "<group>"; };
1912FCF81CD08166004CF976 /* CommotityListCategory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommotityListCategory.m; sourceTree = "<group>"; };
1912FCF91CD08166004CF976 /* CommotityListModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommotityListModel.h; sourceTree = "<group>"; };
1912FCFA1CD08166004CF976 /* CommotityListModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommotityListModel.m; sourceTree = "<group>"; };
1912FD011CD0907D004CF976 /* MoreHotTagViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MoreHotTagViewController.h; sourceTree = "<group>"; };
1912FD021CD0907D004CF976 /* MoreHotTagViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MoreHotTagViewController.m; sourceTree = "<group>"; };
1912FD041CD090A6004CF976 /* MoreHotBrandViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MoreHotBrandViewController.h; sourceTree = "<group>"; };
1912FD051CD090A6004CF976 /* MoreHotBrandViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MoreHotBrandViewController.m; sourceTree = "<group>"; };
191383331CAB95F5005F6440 /* NoPaymentTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NoPaymentTableViewController.h; path = ../NoPaymentTableViewController.h; sourceTree = "<group>"; };
191383341CAB95F5005F6440 /* NoPaymentTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NoPaymentTableViewController.m; path = ../NoPaymentTableViewController.m; sourceTree = "<group>"; };
191383371CAB96D4005F6440 /* OrderTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OrderTableViewCell.h; sourceTree = "<group>"; };
......@@ -293,20 +301,6 @@
191AEE0E1CBB818600F5E535 /* UserInfoShop.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UserInfoShop.m; sourceTree = "<group>"; };
191AEE171CBB83EF00F5E535 /* UserInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserInfo.h; sourceTree = "<group>"; };
191AEE181CBB83EF00F5E535 /* UserInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UserInfo.m; sourceTree = "<group>"; };
191AEE1B1CBB86C600F5E535 /* CommotityListBrand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommotityListBrand.h; sourceTree = "<group>"; };
191AEE1C1CBB86C600F5E535 /* CommotityListBrand.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommotityListBrand.m; sourceTree = "<group>"; };
191AEE1D1CBB86C600F5E535 /* CommotityListCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommotityListCategory.h; sourceTree = "<group>"; };
191AEE1E1CBB86C600F5E535 /* CommotityListCategory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommotityListCategory.m; sourceTree = "<group>"; };
191AEE1F1CBB86C600F5E535 /* CommotityListCreateInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommotityListCreateInfo.h; sourceTree = "<group>"; };
191AEE201CBB86C600F5E535 /* CommotityListCreateInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommotityListCreateInfo.m; sourceTree = "<group>"; };
191AEE211CBB86C600F5E535 /* CommotityListLastModifyInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommotityListLastModifyInfo.h; sourceTree = "<group>"; };
191AEE221CBB86C600F5E535 /* CommotityListLastModifyInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommotityListLastModifyInfo.m; sourceTree = "<group>"; };
191AEE231CBB86C600F5E535 /* CommotityListModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommotityListModel.h; sourceTree = "<group>"; };
191AEE241CBB86C600F5E535 /* CommotityListModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommotityListModel.m; sourceTree = "<group>"; };
191AEE251CBB86C600F5E535 /* CommotityListOperator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommotityListOperator.h; sourceTree = "<group>"; };
191AEE261CBB86C600F5E535 /* CommotityListOperator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommotityListOperator.m; sourceTree = "<group>"; };
191AEE271CBB86C600F5E535 /* CommotityListUpper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommotityListUpper.h; sourceTree = "<group>"; };
191AEE281CBB86C600F5E535 /* CommotityListUpper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CommotityListUpper.m; sourceTree = "<group>"; };
191AEE491CBCC6D100F5E535 /* addCommodityRequestModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = addCommodityRequestModel.h; sourceTree = "<group>"; };
191AEE4A1CBCC6D100F5E535 /* addCommodityRequestModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = addCommodityRequestModel.m; sourceTree = "<group>"; };
191AEE4B1CBCC6D100F5E535 /* CommotityRequestModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommotityRequestModel.h; sourceTree = "<group>"; };
......@@ -831,20 +825,12 @@
191AEE1A1CBB86C600F5E535 /* CommodityListModel */ = {
isa = PBXGroup;
children = (
191AEE1B1CBB86C600F5E535 /* CommotityListBrand.h */,
191AEE1C1CBB86C600F5E535 /* CommotityListBrand.m */,
191AEE1D1CBB86C600F5E535 /* CommotityListCategory.h */,
191AEE1E1CBB86C600F5E535 /* CommotityListCategory.m */,
191AEE1F1CBB86C600F5E535 /* CommotityListCreateInfo.h */,
191AEE201CBB86C600F5E535 /* CommotityListCreateInfo.m */,
191AEE211CBB86C600F5E535 /* CommotityListLastModifyInfo.h */,
191AEE221CBB86C600F5E535 /* CommotityListLastModifyInfo.m */,
191AEE231CBB86C600F5E535 /* CommotityListModel.h */,
191AEE241CBB86C600F5E535 /* CommotityListModel.m */,
191AEE251CBB86C600F5E535 /* CommotityListOperator.h */,
191AEE261CBB86C600F5E535 /* CommotityListOperator.m */,
191AEE271CBB86C600F5E535 /* CommotityListUpper.h */,
191AEE281CBB86C600F5E535 /* CommotityListUpper.m */,
1912FCF51CD08166004CF976 /* CommotityListBrand.h */,
1912FCF61CD08166004CF976 /* CommotityListBrand.m */,
1912FCF71CD08166004CF976 /* CommotityListCategory.h */,
1912FCF81CD08166004CF976 /* CommotityListCategory.m */,
1912FCF91CD08166004CF976 /* CommotityListModel.h */,
1912FCFA1CD08166004CF976 /* CommotityListModel.m */,
);
path = CommodityListModel;
sourceTree = "<group>";
......@@ -1263,6 +1249,10 @@
197975211CA8DA8200407E3F /* CommodityDetailViewController.m */,
191AEE851CBCF8E000F5E535 /* CommoditySearchViewController.h */,
191AEE861CBCF8E000F5E535 /* CommoditySearchViewController.m */,
1912FD011CD0907D004CF976 /* MoreHotTagViewController.h */,
1912FD021CD0907D004CF976 /* MoreHotTagViewController.m */,
1912FD041CD090A6004CF976 /* MoreHotBrandViewController.h */,
1912FD051CD090A6004CF976 /* MoreHotBrandViewController.m */,
);
path = Commodity;
sourceTree = "<group>";
......@@ -2023,7 +2013,6 @@
19DCCBD21C9AA0450072C3BF /* UIResponder+FirstResponder.m in Sources */,
19DCCB5A1C9A9EB30072C3BF /* IBTAudioRecorder.m in Sources */,
19DCCBD11C9AA0450072C3BF /* UILabel+SizeCalculate.m in Sources */,
191AEE301CBB86C600F5E535 /* CommotityListUpper.m in Sources */,
19DCCB751C9A9EB30072C3BF /* IBTUITextField.m in Sources */,
197975481CAA4DAD00407E3F /* CommodityMutipleSelectBottomView.m in Sources */,
199B4D741CABE4B300451E0E /* NSString+Category.m in Sources */,
......@@ -2037,7 +2026,6 @@
19DCCBFB1C9AA2180072C3BF /* UIAlertView+Blocks.m in Sources */,
19DCCBDE1C9AA0450072C3BF /* ICRBaseViewController.m in Sources */,
19DCCBDA1C9AA0450072C3BF /* GXFBottomView.m in Sources */,
191AEE2B1CBB86C600F5E535 /* CommotityListCategory.m in Sources */,
19DCCBCF1C9AA0450072C3BF /* UIImage+Helper.m in Sources */,
19DCCB721C9A9EB30072C3BF /* IBTUINavigationController.m in Sources */,
19DCCB641C9A9EB30072C3BF /* IBTTableViewUserInfo.m in Sources */,
......@@ -2081,6 +2069,7 @@
1913833A1CAB96D4005F6440 /* OrderTableViewCell.m in Sources */,
191383401CAB9DD4005F6440 /* OrderCellView.m in Sources */,
199BC7C71C9BA2A300E4E0B8 /* ResetPasswordViewController.m in Sources */,
1912FD061CD090A6004CF976 /* MoreHotBrandViewController.m in Sources */,
19DCCB5B1C9A9EB30072C3BF /* IBTAudioServicesManager.m in Sources */,
199BC7C31C9B9B7700E4E0B8 /* UIButton+countDown.m in Sources */,
1940D3281C9A58150080678C /* BaseViewController.m in Sources */,
......@@ -2088,7 +2077,6 @@
1929F1921CA11472000E9B26 /* HomeCollectionViewCell.m in Sources */,
19ADD38A1CA4E4BD00EE6E5A /* AddCommodityHeaderView.m in Sources */,
191AEE5F1CBCC6D100F5E535 /* Defintion.m in Sources */,
191AEE2A1CBB86C600F5E535 /* CommotityListBrand.m in Sources */,
199BC7CC1C9BA5BA00E4E0B8 /* NextResetPasswordViewController.m in Sources */,
19DCCB591C9A9EB30072C3BF /* IBTAudioController.m in Sources */,
191AEE641CBCC6D100F5E535 /* Parameters.m in Sources */,
......@@ -2097,6 +2085,7 @@
19DCCB661C9A9EB30072C3BF /* IBTCommon.m in Sources */,
197975421CAA23BC00407E3F /* UITableView+Category.m in Sources */,
19DCCB611C9A9EB30072C3BF /* IBTTableViewCellInfo.m in Sources */,
1912FD031CD0907D004CF976 /* MoreHotTagViewController.m in Sources */,
1912FCDA1CCDC955004CF976 /* JavenResellerModel.m in Sources */,
191AEE121CBB818600F5E535 /* UserInfoLastModifyInfo.m in Sources */,
191AEE5E1CBCC6D100F5E535 /* Conditions.m in Sources */,
......@@ -2112,7 +2101,6 @@
19632DAE1CB38FFC0024A8A1 /* HTTPCilent.m in Sources */,
19DCCB6D1C9A9EB30072C3BF /* IBTTableView.m in Sources */,
191AEE7F1CBCEE6B00F5E535 /* JavenCreateInfo.m in Sources */,
191AEE2D1CBB86C600F5E535 /* CommotityListLastModifyInfo.m in Sources */,
19DCCB731C9A9EB30072C3BF /* IBTUIScrollView.m in Sources */,
199BC7D91C9BBE1A00E4E0B8 /* MassageViewController.m in Sources */,
1979754D1CAB6E1300407E3F /* JavenMultipleViewWithHeader.m in Sources */,
......@@ -2136,7 +2124,6 @@
19DCCB5E1C9A9EB30072C3BF /* IBTModel.m in Sources */,
19DCCBD51C9AA0450072C3BF /* UITableViewCell+Helper.m in Sources */,
19DC6B2C1CC0CEDD0064A9FD /* MBTextViewWithFontAdapter.m in Sources */,
191AEE2C1CBB86C600F5E535 /* CommotityListCreateInfo.m in Sources */,
19DCCBE01C9AA0450072C3BF /* JTOptionCell.m in Sources */,
19DCCBE11C9AA0450072C3BF /* JTOptionsEntity.m in Sources */,
19D906AC1CC7898C00CD42DC /* MineViewController.m in Sources */,
......@@ -2149,15 +2136,16 @@
199BC7A11C9AA7DF00E4E0B8 /* HomeViewController.m in Sources */,
19632DA41CB350F80024A8A1 /* StoreQRCodeViewController.m in Sources */,
197975451CAA2FAB00407E3F /* ManagementViewController.m in Sources */,
1912FCFB1CD08166004CF976 /* CommotityListBrand.m in Sources */,
19DCCBF01C9AA1D50072C3BF /* GTOCommonTools.m in Sources */,
19DCCBF11C9AA1D50072C3BF /* ICRUserUtil.m in Sources */,
191AEE2E1CBB86C600F5E535 /* CommotityListModel.m in Sources */,
19DCCB6C1C9A9EB30072C3BF /* IBTTabBarController.m in Sources */,
19632DB11CB39B190024A8A1 /* SelectPhotoView.m in Sources */,
19DCCB621C9A9EB30072C3BF /* IBTTableViewInfo.m in Sources */,
19ADD38E1CA4EC1000EE6E5A /* AddCommodityHeaderCollectionReusableView.m in Sources */,
191383351CAB95F5005F6440 /* NoPaymentTableViewController.m in Sources */,
19DCCB6B1C9A9EB30072C3BF /* IBTSegmentedControl.m in Sources */,
1912FCFD1CD08166004CF976 /* CommotityListModel.m in Sources */,
19ADD3841CA4D3C400EE6E5A /* AddCommodityCollectionViewCell.m in Sources */,
199BC7D31C9BBE0100E4E0B8 /* StoreViewController.m in Sources */,
19DCCBD71C9AA0450072C3BF /* UIView+ViewFrameGeometry.m in Sources */,
......@@ -2179,10 +2167,10 @@
19DCCB781C9A9EB30072C3BF /* IBTWebProgressBar.m in Sources */,
19DCCBFE1C9AA2A90072C3BF /* ICRDataBaseController.m in Sources */,
191AEE5D1CBCC6D100F5E535 /* CommotityRequestModel.m in Sources */,
191AEE2F1CBB86C600F5E535 /* CommotityListOperator.m in Sources */,
19ADD36E1CA3B88A00EE6E5A /* CommodityListViewController.m in Sources */,
19DCCBD41C9AA0450072C3BF /* UITabBarItem+Universal.m in Sources */,
19DCCBE51C9AA0450072C3BF /* ICRFunctionItemControl.m in Sources */,
1912FCFC1CD08166004CF976 /* CommotityListCategory.m in Sources */,
1929F18E1CA10C94000E9B26 /* HomeCollectionViewController.m in Sources */,
191AEE601CBCC6D100F5E535 /* Operator.m in Sources */,
);
......
{
"images" : [
{
"idiom" : "universal",
"filename" : "allCategory.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "allCategory@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "hotTagIcon.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "hotTagIcon@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
//
// CommotityListBrand.h
//
// Created by Z on 16/4/11
// Created by Z on 16/4/27
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
@class CommotityListLastModifyInfo, CommotityListCreateInfo;
@interface CommotityListBrand : NSObject <NSCoding, NSCopying>
@property (nonatomic, strong) NSString *name;
@property (nonatomic, strong) NSString *uuid;
@property (nonatomic, strong) NSString *brandDescription;
@property (nonatomic, strong) NSString *state;
@property (nonatomic, assign) double version;
@property (nonatomic, strong) NSString *domain;
@property (nonatomic, strong) CommotityListLastModifyInfo *lastModifyInfo;
@property (nonatomic, strong) NSString *code;
@property (nonatomic, strong) NSString *location;
@property (nonatomic, assign) double order;
@property (nonatomic, strong) NSString *logo;
@property (nonatomic, strong) CommotityListCreateInfo *createInfo;
@property (nonatomic, strong) NSString *website;
@property (nonatomic, strong) NSString *name;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
......
//
// CommotityListBrand.m
//
// Created by Z on 16/4/11
// Created by Z on 16/4/27
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import "CommotityListBrand.h"
#import "CommotityListLastModifyInfo.h"
#import "CommotityListCreateInfo.h"
NSString *const kCommotityListBrandName = @"name";
NSString *const kCommotityListBrandUuid = @"uuid";
NSString *const kCommotityListBrandDescription = @"description";
NSString *const kCommotityListBrandState = @"state";
NSString *const kCommotityListBrandVersion = @"version";
NSString *const kCommotityListBrandDomain = @"domain";
NSString *const kCommotityListBrandLastModifyInfo = @"lastModifyInfo";
NSString *const kCommotityListBrandCode = @"code";
NSString *const kCommotityListBrandLocation = @"location";
NSString *const kCommotityListBrandOrder = @"order";
NSString *const kCommotityListBrandLogo = @"logo";
NSString *const kCommotityListBrandCreateInfo = @"createInfo";
NSString *const kCommotityListBrandWebsite = @"website";
NSString *const kCommotityListBrandName = @"name";
@interface CommotityListBrand ()
......@@ -33,19 +21,9 @@ NSString *const kCommotityListBrandName = @"name";
@implementation CommotityListBrand
@synthesize name = _name;
@synthesize uuid = _uuid;
@synthesize brandDescription = _brandDescription;
@synthesize state = _state;
@synthesize version = _version;
@synthesize domain = _domain;
@synthesize lastModifyInfo = _lastModifyInfo;
@synthesize code = _code;
@synthesize location = _location;
@synthesize order = _order;
@synthesize logo = _logo;
@synthesize createInfo = _createInfo;
@synthesize website = _website;
@synthesize name = _name;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
......@@ -60,19 +38,9 @@ NSString *const kCommotityListBrandName = @"name";
// This check serves to make sure that a non-NSDictionary object
// passed into the model class doesn't break the parsing.
if(self && [dict isKindOfClass:[NSDictionary class]]) {
self.name = [self objectOrNilForKey:kCommotityListBrandName fromDictionary:dict];
self.uuid = [self objectOrNilForKey:kCommotityListBrandUuid fromDictionary:dict];
self.brandDescription = [self objectOrNilForKey:kCommotityListBrandDescription fromDictionary:dict];
self.state = [self objectOrNilForKey:kCommotityListBrandState fromDictionary:dict];
self.version = [[self objectOrNilForKey:kCommotityListBrandVersion fromDictionary:dict] doubleValue];
self.domain = [self objectOrNilForKey:kCommotityListBrandDomain fromDictionary:dict];
self.lastModifyInfo = [CommotityListLastModifyInfo modelObjectWithDictionary:[dict objectForKey:kCommotityListBrandLastModifyInfo]];
self.code = [self objectOrNilForKey:kCommotityListBrandCode fromDictionary:dict];
self.location = [self objectOrNilForKey:kCommotityListBrandLocation fromDictionary:dict];
self.order = [[self objectOrNilForKey:kCommotityListBrandOrder fromDictionary:dict] doubleValue];
self.logo = [self objectOrNilForKey:kCommotityListBrandLogo fromDictionary:dict];
self.createInfo = [CommotityListCreateInfo modelObjectWithDictionary:[dict objectForKey:kCommotityListBrandCreateInfo]];
self.website = [self objectOrNilForKey:kCommotityListBrandWebsite fromDictionary:dict];
self.name = [self objectOrNilForKey:kCommotityListBrandName fromDictionary:dict];
}
......@@ -83,19 +51,9 @@ NSString *const kCommotityListBrandName = @"name";
- (NSDictionary *)dictionaryRepresentation
{
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:self.name forKey:kCommotityListBrandName];
[mutableDict setValue:self.uuid forKey:kCommotityListBrandUuid];
[mutableDict setValue:self.brandDescription forKey:kCommotityListBrandDescription];
[mutableDict setValue:self.state forKey:kCommotityListBrandState];
[mutableDict setValue:[NSNumber numberWithDouble:self.version] forKey:kCommotityListBrandVersion];
[mutableDict setValue:self.domain forKey:kCommotityListBrandDomain];
[mutableDict setValue:[self.lastModifyInfo dictionaryRepresentation] forKey:kCommotityListBrandLastModifyInfo];
[mutableDict setValue:self.code forKey:kCommotityListBrandCode];
[mutableDict setValue:self.location forKey:kCommotityListBrandLocation];
[mutableDict setValue:[NSNumber numberWithDouble:self.order] forKey:kCommotityListBrandOrder];
[mutableDict setValue:self.logo forKey:kCommotityListBrandLogo];
[mutableDict setValue:[self.createInfo dictionaryRepresentation] forKey:kCommotityListBrandCreateInfo];
[mutableDict setValue:self.website forKey:kCommotityListBrandWebsite];
[mutableDict setValue:self.name forKey:kCommotityListBrandName];
return [NSDictionary dictionaryWithDictionary:mutableDict];
}
......@@ -119,38 +77,18 @@ NSString *const kCommotityListBrandName = @"name";
{
self = [super init];
self.name = [aDecoder decodeObjectForKey:kCommotityListBrandName];
self.uuid = [aDecoder decodeObjectForKey:kCommotityListBrandUuid];
self.brandDescription = [aDecoder decodeObjectForKey:kCommotityListBrandDescription];
self.state = [aDecoder decodeObjectForKey:kCommotityListBrandState];
self.version = [aDecoder decodeDoubleForKey:kCommotityListBrandVersion];
self.domain = [aDecoder decodeObjectForKey:kCommotityListBrandDomain];
self.lastModifyInfo = [aDecoder decodeObjectForKey:kCommotityListBrandLastModifyInfo];
self.code = [aDecoder decodeObjectForKey:kCommotityListBrandCode];
self.location = [aDecoder decodeObjectForKey:kCommotityListBrandLocation];
self.order = [aDecoder decodeDoubleForKey:kCommotityListBrandOrder];
self.logo = [aDecoder decodeObjectForKey:kCommotityListBrandLogo];
self.createInfo = [aDecoder decodeObjectForKey:kCommotityListBrandCreateInfo];
self.website = [aDecoder decodeObjectForKey:kCommotityListBrandWebsite];
self.name = [aDecoder decodeObjectForKey:kCommotityListBrandName];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
[aCoder encodeObject:_name forKey:kCommotityListBrandName];
[aCoder encodeObject:_uuid forKey:kCommotityListBrandUuid];
[aCoder encodeObject:_brandDescription forKey:kCommotityListBrandDescription];
[aCoder encodeObject:_state forKey:kCommotityListBrandState];
[aCoder encodeDouble:_version forKey:kCommotityListBrandVersion];
[aCoder encodeObject:_domain forKey:kCommotityListBrandDomain];
[aCoder encodeObject:_lastModifyInfo forKey:kCommotityListBrandLastModifyInfo];
[aCoder encodeObject:_code forKey:kCommotityListBrandCode];
[aCoder encodeObject:_location forKey:kCommotityListBrandLocation];
[aCoder encodeDouble:_order forKey:kCommotityListBrandOrder];
[aCoder encodeObject:_logo forKey:kCommotityListBrandLogo];
[aCoder encodeObject:_createInfo forKey:kCommotityListBrandCreateInfo];
[aCoder encodeObject:_website forKey:kCommotityListBrandWebsite];
[aCoder encodeObject:_name forKey:kCommotityListBrandName];
}
- (id)copyWithZone:(NSZone *)zone
......@@ -159,19 +97,9 @@ NSString *const kCommotityListBrandName = @"name";
if (copy) {
copy.name = [self.name copyWithZone:zone];
copy.uuid = [self.uuid copyWithZone:zone];
copy.brandDescription = [self.brandDescription copyWithZone:zone];
copy.state = [self.state copyWithZone:zone];
copy.version = self.version;
copy.domain = [self.domain copyWithZone:zone];
copy.lastModifyInfo = [self.lastModifyInfo copyWithZone:zone];
copy.code = [self.code copyWithZone:zone];
copy.location = [self.location copyWithZone:zone];
copy.order = self.order;
copy.logo = [self.logo copyWithZone:zone];
copy.createInfo = [self.createInfo copyWithZone:zone];
copy.website = [self.website copyWithZone:zone];
copy.name = [self.name copyWithZone:zone];
}
return copy;
......
//
// CommotityListCategory.h
//
// Created by Z on 16/4/11
// Created by Z on 16/4/27
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
@class CommotityListUpper, CommotityListLastModifyInfo, CommotityListCreateInfo;
@interface CommotityListCategory : NSObject <NSCoding, NSCopying>
@property (nonatomic, strong) NSString *name;
@property (nonatomic, strong) NSString *uuid;
@property (nonatomic, strong) NSString *categoryDescription;
@property (nonatomic, strong) NSString *state;
@property (nonatomic, assign) double version;
@property (nonatomic, strong) CommotityListUpper *upper;
@property (nonatomic, strong) NSString *domain;
@property (nonatomic, strong) NSString *path;
@property (nonatomic, strong) CommotityListLastModifyInfo *lastModifyInfo;
@property (nonatomic, strong) NSString *code;
@property (nonatomic, assign) double order;
@property (nonatomic, assign) double level;
@property (nonatomic, strong) NSString *pictures;
@property (nonatomic, strong) CommotityListCreateInfo *createInfo;
@property (nonatomic, strong) NSString *name;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
......
//
// CommotityListCategory.m
//
// Created by Z on 16/4/11
// Created by Z on 16/4/27
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import "CommotityListCategory.h"
#import "CommotityListUpper.h"
#import "CommotityListLastModifyInfo.h"
#import "CommotityListCreateInfo.h"
NSString *const kCommotityListCategoryName = @"name";
NSString *const kCommotityListCategoryUuid = @"uuid";
NSString *const kCommotityListCategoryDescription = @"description";
NSString *const kCommotityListCategoryState = @"state";
NSString *const kCommotityListCategoryVersion = @"version";
NSString *const kCommotityListCategoryUpper = @"upper";
NSString *const kCommotityListCategoryDomain = @"domain";
NSString *const kCommotityListCategoryPath = @"path";
NSString *const kCommotityListCategoryLastModifyInfo = @"lastModifyInfo";
NSString *const kCommotityListCategoryCode = @"code";
NSString *const kCommotityListCategoryOrder = @"order";
NSString *const kCommotityListCategoryLevel = @"level";
NSString *const kCommotityListCategoryPictures = @"pictures";
NSString *const kCommotityListCategoryCreateInfo = @"createInfo";
NSString *const kCommotityListCategoryName = @"name";
@interface CommotityListCategory ()
......@@ -35,20 +21,9 @@ NSString *const kCommotityListCategoryName = @"name";
@implementation CommotityListCategory
@synthesize name = _name;
@synthesize uuid = _uuid;
@synthesize categoryDescription = _categoryDescription;
@synthesize state = _state;
@synthesize version = _version;
@synthesize upper = _upper;
@synthesize domain = _domain;
@synthesize path = _path;
@synthesize lastModifyInfo = _lastModifyInfo;
@synthesize code = _code;
@synthesize order = _order;
@synthesize level = _level;
@synthesize pictures = _pictures;
@synthesize createInfo = _createInfo;
@synthesize name = _name;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
......@@ -63,20 +38,9 @@ NSString *const kCommotityListCategoryName = @"name";
// This check serves to make sure that a non-NSDictionary object
// passed into the model class doesn't break the parsing.
if(self && [dict isKindOfClass:[NSDictionary class]]) {
self.name = [self objectOrNilForKey:kCommotityListCategoryName fromDictionary:dict];
self.uuid = [self objectOrNilForKey:kCommotityListCategoryUuid fromDictionary:dict];
self.categoryDescription = [self objectOrNilForKey:kCommotityListCategoryDescription fromDictionary:dict];
self.state = [self objectOrNilForKey:kCommotityListCategoryState fromDictionary:dict];
self.version = [[self objectOrNilForKey:kCommotityListCategoryVersion fromDictionary:dict] doubleValue];
self.upper = [CommotityListUpper modelObjectWithDictionary:[dict objectForKey:kCommotityListCategoryUpper]];
self.domain = [self objectOrNilForKey:kCommotityListCategoryDomain fromDictionary:dict];
self.path = [self objectOrNilForKey:kCommotityListCategoryPath fromDictionary:dict];
self.lastModifyInfo = [CommotityListLastModifyInfo modelObjectWithDictionary:[dict objectForKey:kCommotityListCategoryLastModifyInfo]];
self.code = [self objectOrNilForKey:kCommotityListCategoryCode fromDictionary:dict];
self.order = [[self objectOrNilForKey:kCommotityListCategoryOrder fromDictionary:dict] doubleValue];
self.level = [[self objectOrNilForKey:kCommotityListCategoryLevel fromDictionary:dict] doubleValue];
self.pictures = [self objectOrNilForKey:kCommotityListCategoryPictures fromDictionary:dict];
self.createInfo = [CommotityListCreateInfo modelObjectWithDictionary:[dict objectForKey:kCommotityListCategoryCreateInfo]];
self.name = [self objectOrNilForKey:kCommotityListCategoryName fromDictionary:dict];
}
......@@ -87,20 +51,9 @@ NSString *const kCommotityListCategoryName = @"name";
- (NSDictionary *)dictionaryRepresentation
{
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:self.name forKey:kCommotityListCategoryName];
[mutableDict setValue:self.uuid forKey:kCommotityListCategoryUuid];
[mutableDict setValue:self.categoryDescription forKey:kCommotityListCategoryDescription];
[mutableDict setValue:self.state forKey:kCommotityListCategoryState];
[mutableDict setValue:[NSNumber numberWithDouble:self.version] forKey:kCommotityListCategoryVersion];
[mutableDict setValue:[self.upper dictionaryRepresentation] forKey:kCommotityListCategoryUpper];
[mutableDict setValue:self.domain forKey:kCommotityListCategoryDomain];
[mutableDict setValue:self.path forKey:kCommotityListCategoryPath];
[mutableDict setValue:[self.lastModifyInfo dictionaryRepresentation] forKey:kCommotityListCategoryLastModifyInfo];
[mutableDict setValue:self.code forKey:kCommotityListCategoryCode];
[mutableDict setValue:[NSNumber numberWithDouble:self.order] forKey:kCommotityListCategoryOrder];
[mutableDict setValue:[NSNumber numberWithDouble:self.level] forKey:kCommotityListCategoryLevel];
[mutableDict setValue:self.pictures forKey:kCommotityListCategoryPictures];
[mutableDict setValue:[self.createInfo dictionaryRepresentation] forKey:kCommotityListCategoryCreateInfo];
[mutableDict setValue:self.name forKey:kCommotityListCategoryName];
return [NSDictionary dictionaryWithDictionary:mutableDict];
}
......@@ -124,40 +77,18 @@ NSString *const kCommotityListCategoryName = @"name";
{
self = [super init];
self.name = [aDecoder decodeObjectForKey:kCommotityListCategoryName];
self.uuid = [aDecoder decodeObjectForKey:kCommotityListCategoryUuid];
self.categoryDescription = [aDecoder decodeObjectForKey:kCommotityListCategoryDescription];
self.state = [aDecoder decodeObjectForKey:kCommotityListCategoryState];
self.version = [aDecoder decodeDoubleForKey:kCommotityListCategoryVersion];
self.upper = [aDecoder decodeObjectForKey:kCommotityListCategoryUpper];
self.domain = [aDecoder decodeObjectForKey:kCommotityListCategoryDomain];
self.path = [aDecoder decodeObjectForKey:kCommotityListCategoryPath];
self.lastModifyInfo = [aDecoder decodeObjectForKey:kCommotityListCategoryLastModifyInfo];
self.code = [aDecoder decodeObjectForKey:kCommotityListCategoryCode];
self.order = [aDecoder decodeDoubleForKey:kCommotityListCategoryOrder];
self.level = [aDecoder decodeDoubleForKey:kCommotityListCategoryLevel];
self.pictures = [aDecoder decodeObjectForKey:kCommotityListCategoryPictures];
self.createInfo = [aDecoder decodeObjectForKey:kCommotityListCategoryCreateInfo];
self.name = [aDecoder decodeObjectForKey:kCommotityListCategoryName];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
[aCoder encodeObject:_name forKey:kCommotityListCategoryName];
[aCoder encodeObject:_uuid forKey:kCommotityListCategoryUuid];
[aCoder encodeObject:_categoryDescription forKey:kCommotityListCategoryDescription];
[aCoder encodeObject:_state forKey:kCommotityListCategoryState];
[aCoder encodeDouble:_version forKey:kCommotityListCategoryVersion];
[aCoder encodeObject:_upper forKey:kCommotityListCategoryUpper];
[aCoder encodeObject:_domain forKey:kCommotityListCategoryDomain];
[aCoder encodeObject:_path forKey:kCommotityListCategoryPath];
[aCoder encodeObject:_lastModifyInfo forKey:kCommotityListCategoryLastModifyInfo];
[aCoder encodeObject:_code forKey:kCommotityListCategoryCode];
[aCoder encodeDouble:_order forKey:kCommotityListCategoryOrder];
[aCoder encodeDouble:_level forKey:kCommotityListCategoryLevel];
[aCoder encodeObject:_pictures forKey:kCommotityListCategoryPictures];
[aCoder encodeObject:_createInfo forKey:kCommotityListCategoryCreateInfo];
[aCoder encodeObject:_name forKey:kCommotityListCategoryName];
}
- (id)copyWithZone:(NSZone *)zone
......@@ -166,20 +97,9 @@ NSString *const kCommotityListCategoryName = @"name";
if (copy) {
copy.name = [self.name copyWithZone:zone];
copy.uuid = [self.uuid copyWithZone:zone];
copy.categoryDescription = [self.categoryDescription copyWithZone:zone];
copy.state = [self.state copyWithZone:zone];
copy.version = self.version;
copy.upper = [self.upper copyWithZone:zone];
copy.domain = [self.domain copyWithZone:zone];
copy.path = [self.path copyWithZone:zone];
copy.lastModifyInfo = [self.lastModifyInfo copyWithZone:zone];
copy.code = [self.code copyWithZone:zone];
copy.order = self.order;
copy.level = self.level;
copy.pictures = [self.pictures copyWithZone:zone];
copy.createInfo = [self.createInfo copyWithZone:zone];
copy.name = [self.name copyWithZone:zone];
}
return copy;
......
//
// CommotityListCreateInfo.h
//
// Created by Z on 16/4/11
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
@class CommotityListOperator;
@interface CommotityListCreateInfo : NSObject <NSCoding, NSCopying>
@property (nonatomic, strong) CommotityListOperator *operator;
@property (nonatomic, assign) double time;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
- (NSDictionary *)dictionaryRepresentation;
@end
//
// CommotityListCreateInfo.m
//
// Created by Z on 16/4/11
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import "CommotityListCreateInfo.h"
#import "CommotityListOperator.h"
NSString *const kCommotityListCreateInfoOperator = @"operator";
NSString *const kCommotityListCreateInfoTime = @"time";
@interface CommotityListCreateInfo ()
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
@end
@implementation CommotityListCreateInfo
@synthesize operator = _operator;
@synthesize time = _time;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
{
return [[self alloc] initWithDictionary:dict];
}
- (instancetype)initWithDictionary:(NSDictionary *)dict
{
self = [super init];
// This check serves to make sure that a non-NSDictionary object
// passed into the model class doesn't break the parsing.
if(self && [dict isKindOfClass:[NSDictionary class]]) {
self.operator = [CommotityListOperator modelObjectWithDictionary:[dict objectForKey:kCommotityListCreateInfoOperator]];
self.time = [[self objectOrNilForKey:kCommotityListCreateInfoTime fromDictionary:dict] doubleValue];
}
return self;
}
- (NSDictionary *)dictionaryRepresentation
{
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:[self.operator dictionaryRepresentation] forKey:kCommotityListCreateInfoOperator];
[mutableDict setValue:[NSNumber numberWithDouble:self.time] forKey:kCommotityListCreateInfoTime];
return [NSDictionary dictionaryWithDictionary:mutableDict];
}
- (NSString *)description
{
return [NSString stringWithFormat:@"%@", [self dictionaryRepresentation]];
}
#pragma mark - Helper Method
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict
{
id object = [dict objectForKey:aKey];
return [object isEqual:[NSNull null]] ? nil : object;
}
#pragma mark - NSCoding Methods
- (id)initWithCoder:(NSCoder *)aDecoder
{
self = [super init];
self.operator = [aDecoder decodeObjectForKey:kCommotityListCreateInfoOperator];
self.time = [aDecoder decodeDoubleForKey:kCommotityListCreateInfoTime];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
[aCoder encodeObject:_operator forKey:kCommotityListCreateInfoOperator];
[aCoder encodeDouble:_time forKey:kCommotityListCreateInfoTime];
}
- (id)copyWithZone:(NSZone *)zone
{
CommotityListCreateInfo *copy = [[CommotityListCreateInfo alloc] init];
if (copy) {
copy.operator = [self.operator copyWithZone:zone];
copy.time = self.time;
}
return copy;
}
@end
//
// CommotityListLastModifyInfo.h
//
// Created by Z on 16/4/11
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
@class CommotityListOperator;
@interface CommotityListLastModifyInfo : NSObject <NSCoding, NSCopying>
@property (nonatomic, strong) CommotityListOperator *operator;
@property (nonatomic, assign) double time;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
- (NSDictionary *)dictionaryRepresentation;
@end
//
// CommotityListLastModifyInfo.m
//
// Created by Z on 16/4/11
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import "CommotityListLastModifyInfo.h"
#import "CommotityListOperator.h"
NSString *const kCommotityListLastModifyInfoOperator = @"operator";
NSString *const kCommotityListLastModifyInfoTime = @"time";
@interface CommotityListLastModifyInfo ()
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
@end
@implementation CommotityListLastModifyInfo
@synthesize operator = _operator;
@synthesize time = _time;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
{
return [[self alloc] initWithDictionary:dict];
}
- (instancetype)initWithDictionary:(NSDictionary *)dict
{
self = [super init];
// This check serves to make sure that a non-NSDictionary object
// passed into the model class doesn't break the parsing.
if(self && [dict isKindOfClass:[NSDictionary class]]) {
self.operator = [CommotityListOperator modelObjectWithDictionary:[dict objectForKey:kCommotityListLastModifyInfoOperator]];
self.time = [[self objectOrNilForKey:kCommotityListLastModifyInfoTime fromDictionary:dict] doubleValue];
}
return self;
}
- (NSDictionary *)dictionaryRepresentation
{
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:[self.operator dictionaryRepresentation] forKey:kCommotityListLastModifyInfoOperator];
[mutableDict setValue:[NSNumber numberWithDouble:self.time] forKey:kCommotityListLastModifyInfoTime];
return [NSDictionary dictionaryWithDictionary:mutableDict];
}
- (NSString *)description
{
return [NSString stringWithFormat:@"%@", [self dictionaryRepresentation]];
}
#pragma mark - Helper Method
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict
{
id object = [dict objectForKey:aKey];
return [object isEqual:[NSNull null]] ? nil : object;
}
#pragma mark - NSCoding Methods
- (id)initWithCoder:(NSCoder *)aDecoder
{
self = [super init];
self.operator = [aDecoder decodeObjectForKey:kCommotityListLastModifyInfoOperator];
self.time = [aDecoder decodeDoubleForKey:kCommotityListLastModifyInfoTime];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
[aCoder encodeObject:_operator forKey:kCommotityListLastModifyInfoOperator];
[aCoder encodeDouble:_time forKey:kCommotityListLastModifyInfoTime];
}
- (id)copyWithZone:(NSZone *)zone
{
CommotityListLastModifyInfo *copy = [[CommotityListLastModifyInfo alloc] init];
if (copy) {
copy.operator = [self.operator copyWithZone:zone];
copy.time = self.time;
}
return copy;
}
@end
//
// CommotityListModel.h
//
// Created by Z on 16/4/11
// Created by Z on 16/4/27
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
......@@ -11,17 +11,23 @@
@interface CommotityListModel : NSObject <NSCoding, NSCopying>
@property (nonatomic, strong) CommotityListCategory *category;
@property (nonatomic, assign) double brokerageRate;
@property (nonatomic, assign) double originalPrice;
@property (nonatomic, assign) double inv;
@property (nonatomic, assign) double price;
@property (nonatomic, strong) NSString *uuid;
@property (nonatomic, strong) NSString *engName;
@property (nonatomic, strong) CommotityListCategory *category;
@property (nonatomic, assign) double salesVolume;
@property (nonatomic, assign) double visited;
@property (nonatomic, strong) CommotityListBrand *brand;
@property (nonatomic, assign) id engName;
@property (nonatomic, strong) NSString *pictures;
@property (nonatomic, strong) NSString *name;
@property (nonatomic, assign) double price;
@property (nonatomic, assign) double originalPrice;
@property (nonatomic, strong) NSString *specName;
@property (nonatomic, assign) double favorited;
@property (nonatomic, strong) NSString *cover;
@property (nonatomic, assign) double commission;
@property (nonatomic, strong) NSString *tranferType;
@property (nonatomic, assign) double inv;
@property (nonatomic, strong) NSString *name;
@property (nonatomic, assign) double score;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
......
//
// CommotityListModel.m
//
// Created by Z on 16/4/11
// Created by Z on 16/4/27
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
......@@ -10,17 +10,23 @@
#import "CommotityListBrand.h"
NSString *const kCommotityListModelCategory = @"category";
NSString *const kCommotityListModelBrokerageRate = @"brokerageRate";
NSString *const kCommotityListModelOriginalPrice = @"originalPrice";
NSString *const kCommotityListModelInv = @"inv";
NSString *const kCommotityListModelPrice = @"price";
NSString *const kCommotityListModelUuid = @"uuid";
NSString *const kCommotityListModelEngName = @"engName";
NSString *const kCommotityListModelCategory = @"category";
NSString *const kCommotityListModelSalesVolume = @"salesVolume";
NSString *const kCommotityListModelVisited = @"visited";
NSString *const kCommotityListModelBrand = @"brand";
NSString *const kCommotityListModelEngName = @"engName";
NSString *const kCommotityListModelPictures = @"pictures";
NSString *const kCommotityListModelName = @"name";
NSString *const kCommotityListModelPrice = @"price";
NSString *const kCommotityListModelOriginalPrice = @"originalPrice";
NSString *const kCommotityListModelSpecName = @"specName";
NSString *const kCommotityListModelFavorited = @"favorited";
NSString *const kCommotityListModelCover = @"cover";
NSString *const kCommotityListModelCommission = @"commission";
NSString *const kCommotityListModelTranferType = @"tranferType";
NSString *const kCommotityListModelInv = @"inv";
NSString *const kCommotityListModelName = @"name";
NSString *const kCommotityListModelScore = @"score";
@interface CommotityListModel ()
......@@ -31,17 +37,23 @@ NSString *const kCommotityListModelTranferType = @"tranferType";
@implementation CommotityListModel
@synthesize category = _category;
@synthesize brokerageRate = _brokerageRate;
@synthesize originalPrice = _originalPrice;
@synthesize inv = _inv;
@synthesize price = _price;
@synthesize uuid = _uuid;
@synthesize engName = _engName;
@synthesize category = _category;
@synthesize salesVolume = _salesVolume;
@synthesize visited = _visited;
@synthesize brand = _brand;
@synthesize engName = _engName;
@synthesize pictures = _pictures;
@synthesize name = _name;
@synthesize price = _price;
@synthesize originalPrice = _originalPrice;
@synthesize specName = _specName;
@synthesize favorited = _favorited;
@synthesize cover = _cover;
@synthesize commission = _commission;
@synthesize tranferType = _tranferType;
@synthesize inv = _inv;
@synthesize name = _name;
@synthesize score = _score;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
......@@ -56,17 +68,23 @@ NSString *const kCommotityListModelTranferType = @"tranferType";
// This check serves to make sure that a non-NSDictionary object
// passed into the model class doesn't break the parsing.
if(self && [dict isKindOfClass:[NSDictionary class]]) {
self.category = [CommotityListCategory modelObjectWithDictionary:[dict objectForKey:kCommotityListModelCategory]];
self.brokerageRate = [[self objectOrNilForKey:kCommotityListModelBrokerageRate fromDictionary:dict] doubleValue];
self.originalPrice = [[self objectOrNilForKey:kCommotityListModelOriginalPrice fromDictionary:dict] doubleValue];
self.inv = [[self objectOrNilForKey:kCommotityListModelInv fromDictionary:dict] doubleValue];
self.price = [[self objectOrNilForKey:kCommotityListModelPrice fromDictionary:dict] doubleValue];
self.uuid = [self objectOrNilForKey:kCommotityListModelUuid fromDictionary:dict];
self.engName = [self objectOrNilForKey:kCommotityListModelEngName fromDictionary:dict];
self.category = [CommotityListCategory modelObjectWithDictionary:[dict objectForKey:kCommotityListModelCategory]];
self.salesVolume = [[self objectOrNilForKey:kCommotityListModelSalesVolume fromDictionary:dict] doubleValue];
self.visited = [[self objectOrNilForKey:kCommotityListModelVisited fromDictionary:dict] doubleValue];
self.brand = [CommotityListBrand modelObjectWithDictionary:[dict objectForKey:kCommotityListModelBrand]];
self.engName = [self objectOrNilForKey:kCommotityListModelEngName fromDictionary:dict];
self.pictures = [self objectOrNilForKey:kCommotityListModelPictures fromDictionary:dict];
self.name = [self objectOrNilForKey:kCommotityListModelName fromDictionary:dict];
self.price = [[self objectOrNilForKey:kCommotityListModelPrice fromDictionary:dict] doubleValue];
self.originalPrice = [[self objectOrNilForKey:kCommotityListModelOriginalPrice fromDictionary:dict] doubleValue];
self.specName = [self objectOrNilForKey:kCommotityListModelSpecName fromDictionary:dict];
self.favorited = [[self objectOrNilForKey:kCommotityListModelFavorited fromDictionary:dict] doubleValue];
self.cover = [self objectOrNilForKey:kCommotityListModelCover fromDictionary:dict];
self.commission = [[self objectOrNilForKey:kCommotityListModelCommission fromDictionary:dict] doubleValue];
self.tranferType = [self objectOrNilForKey:kCommotityListModelTranferType fromDictionary:dict];
self.inv = [[self objectOrNilForKey:kCommotityListModelInv fromDictionary:dict] doubleValue];
self.name = [self objectOrNilForKey:kCommotityListModelName fromDictionary:dict];
self.score = [[self objectOrNilForKey:kCommotityListModelScore fromDictionary:dict] doubleValue];
}
......@@ -77,17 +95,23 @@ NSString *const kCommotityListModelTranferType = @"tranferType";
- (NSDictionary *)dictionaryRepresentation
{
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:[self.category dictionaryRepresentation] forKey:kCommotityListModelCategory];
[mutableDict setValue:[NSNumber numberWithDouble:self.brokerageRate] forKey:kCommotityListModelBrokerageRate];
[mutableDict setValue:[NSNumber numberWithDouble:self.originalPrice] forKey:kCommotityListModelOriginalPrice];
[mutableDict setValue:[NSNumber numberWithDouble:self.inv] forKey:kCommotityListModelInv];
[mutableDict setValue:[NSNumber numberWithDouble:self.price] forKey:kCommotityListModelPrice];
[mutableDict setValue:self.uuid forKey:kCommotityListModelUuid];
[mutableDict setValue:self.engName forKey:kCommotityListModelEngName];
[mutableDict setValue:[self.category dictionaryRepresentation] forKey:kCommotityListModelCategory];
[mutableDict setValue:[NSNumber numberWithDouble:self.salesVolume] forKey:kCommotityListModelSalesVolume];
[mutableDict setValue:[NSNumber numberWithDouble:self.visited] forKey:kCommotityListModelVisited];
[mutableDict setValue:[self.brand dictionaryRepresentation] forKey:kCommotityListModelBrand];
[mutableDict setValue:self.engName forKey:kCommotityListModelEngName];
[mutableDict setValue:self.pictures forKey:kCommotityListModelPictures];
[mutableDict setValue:self.name forKey:kCommotityListModelName];
[mutableDict setValue:[NSNumber numberWithDouble:self.price] forKey:kCommotityListModelPrice];
[mutableDict setValue:[NSNumber numberWithDouble:self.originalPrice] forKey:kCommotityListModelOriginalPrice];
[mutableDict setValue:self.specName forKey:kCommotityListModelSpecName];
[mutableDict setValue:[NSNumber numberWithDouble:self.favorited] forKey:kCommotityListModelFavorited];
[mutableDict setValue:self.cover forKey:kCommotityListModelCover];
[mutableDict setValue:[NSNumber numberWithDouble:self.commission] forKey:kCommotityListModelCommission];
[mutableDict setValue:self.tranferType forKey:kCommotityListModelTranferType];
[mutableDict setValue:[NSNumber numberWithDouble:self.inv] forKey:kCommotityListModelInv];
[mutableDict setValue:self.name forKey:kCommotityListModelName];
[mutableDict setValue:[NSNumber numberWithDouble:self.score] forKey:kCommotityListModelScore];
return [NSDictionary dictionaryWithDictionary:mutableDict];
}
......@@ -111,34 +135,46 @@ NSString *const kCommotityListModelTranferType = @"tranferType";
{
self = [super init];
self.category = [aDecoder decodeObjectForKey:kCommotityListModelCategory];
self.brokerageRate = [aDecoder decodeDoubleForKey:kCommotityListModelBrokerageRate];
self.originalPrice = [aDecoder decodeDoubleForKey:kCommotityListModelOriginalPrice];
self.inv = [aDecoder decodeDoubleForKey:kCommotityListModelInv];
self.price = [aDecoder decodeDoubleForKey:kCommotityListModelPrice];
self.uuid = [aDecoder decodeObjectForKey:kCommotityListModelUuid];
self.engName = [aDecoder decodeObjectForKey:kCommotityListModelEngName];
self.category = [aDecoder decodeObjectForKey:kCommotityListModelCategory];
self.salesVolume = [aDecoder decodeDoubleForKey:kCommotityListModelSalesVolume];
self.visited = [aDecoder decodeDoubleForKey:kCommotityListModelVisited];
self.brand = [aDecoder decodeObjectForKey:kCommotityListModelBrand];
self.engName = [aDecoder decodeObjectForKey:kCommotityListModelEngName];
self.pictures = [aDecoder decodeObjectForKey:kCommotityListModelPictures];
self.name = [aDecoder decodeObjectForKey:kCommotityListModelName];
self.price = [aDecoder decodeDoubleForKey:kCommotityListModelPrice];
self.originalPrice = [aDecoder decodeDoubleForKey:kCommotityListModelOriginalPrice];
self.specName = [aDecoder decodeObjectForKey:kCommotityListModelSpecName];
self.favorited = [aDecoder decodeDoubleForKey:kCommotityListModelFavorited];
self.cover = [aDecoder decodeObjectForKey:kCommotityListModelCover];
self.commission = [aDecoder decodeDoubleForKey:kCommotityListModelCommission];
self.tranferType = [aDecoder decodeObjectForKey:kCommotityListModelTranferType];
self.inv = [aDecoder decodeDoubleForKey:kCommotityListModelInv];
self.name = [aDecoder decodeObjectForKey:kCommotityListModelName];
self.score = [aDecoder decodeDoubleForKey:kCommotityListModelScore];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
[aCoder encodeObject:_category forKey:kCommotityListModelCategory];
[aCoder encodeDouble:_brokerageRate forKey:kCommotityListModelBrokerageRate];
[aCoder encodeDouble:_originalPrice forKey:kCommotityListModelOriginalPrice];
[aCoder encodeDouble:_inv forKey:kCommotityListModelInv];
[aCoder encodeDouble:_price forKey:kCommotityListModelPrice];
[aCoder encodeObject:_uuid forKey:kCommotityListModelUuid];
[aCoder encodeObject:_engName forKey:kCommotityListModelEngName];
[aCoder encodeObject:_category forKey:kCommotityListModelCategory];
[aCoder encodeDouble:_salesVolume forKey:kCommotityListModelSalesVolume];
[aCoder encodeDouble:_visited forKey:kCommotityListModelVisited];
[aCoder encodeObject:_brand forKey:kCommotityListModelBrand];
[aCoder encodeObject:_engName forKey:kCommotityListModelEngName];
[aCoder encodeObject:_pictures forKey:kCommotityListModelPictures];
[aCoder encodeObject:_name forKey:kCommotityListModelName];
[aCoder encodeDouble:_price forKey:kCommotityListModelPrice];
[aCoder encodeDouble:_originalPrice forKey:kCommotityListModelOriginalPrice];
[aCoder encodeObject:_specName forKey:kCommotityListModelSpecName];
[aCoder encodeDouble:_favorited forKey:kCommotityListModelFavorited];
[aCoder encodeObject:_cover forKey:kCommotityListModelCover];
[aCoder encodeDouble:_commission forKey:kCommotityListModelCommission];
[aCoder encodeObject:_tranferType forKey:kCommotityListModelTranferType];
[aCoder encodeDouble:_inv forKey:kCommotityListModelInv];
[aCoder encodeObject:_name forKey:kCommotityListModelName];
[aCoder encodeDouble:_score forKey:kCommotityListModelScore];
}
- (id)copyWithZone:(NSZone *)zone
......@@ -147,17 +183,23 @@ NSString *const kCommotityListModelTranferType = @"tranferType";
if (copy) {
copy.category = [self.category copyWithZone:zone];
copy.brokerageRate = self.brokerageRate;
copy.originalPrice = self.originalPrice;
copy.inv = self.inv;
copy.price = self.price;
copy.uuid = [self.uuid copyWithZone:zone];
copy.engName = [self.engName copyWithZone:zone];
copy.category = [self.category copyWithZone:zone];
copy.salesVolume = self.salesVolume;
copy.visited = self.visited;
copy.brand = [self.brand copyWithZone:zone];
copy.engName = [self.engName copyWithZone:zone];
copy.pictures = [self.pictures copyWithZone:zone];
copy.name = [self.name copyWithZone:zone];
copy.price = self.price;
copy.originalPrice = self.originalPrice;
copy.specName = [self.specName copyWithZone:zone];
copy.favorited = self.favorited;
copy.cover = [self.cover copyWithZone:zone];
copy.commission = self.commission;
copy.tranferType = [self.tranferType copyWithZone:zone];
copy.inv = self.inv;
copy.name = [self.name copyWithZone:zone];
copy.score = self.score;
}
return copy;
......
//
// CommotityListOperator.h
//
// Created by Z on 16/4/11
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface CommotityListOperator : NSObject <NSCoding, NSCopying>
@property (nonatomic, strong) NSString *operatorIdentifier;
@property (nonatomic, strong) NSString *fullName;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
- (NSDictionary *)dictionaryRepresentation;
@end
//
// CommotityListOperator.m
//
// Created by Z on 16/4/11
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import "CommotityListOperator.h"
NSString *const kCommotityListOperatorId = @"id";
NSString *const kCommotityListOperatorFullName = @"fullName";
@interface CommotityListOperator ()
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
@end
@implementation CommotityListOperator
@synthesize operatorIdentifier = _operatorIdentifier;
@synthesize fullName = _fullName;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
{
return [[self alloc] initWithDictionary:dict];
}
- (instancetype)initWithDictionary:(NSDictionary *)dict
{
self = [super init];
// This check serves to make sure that a non-NSDictionary object
// passed into the model class doesn't break the parsing.
if(self && [dict isKindOfClass:[NSDictionary class]]) {
self.operatorIdentifier = [self objectOrNilForKey:kCommotityListOperatorId fromDictionary:dict];
self.fullName = [self objectOrNilForKey:kCommotityListOperatorFullName fromDictionary:dict];
}
return self;
}
- (NSDictionary *)dictionaryRepresentation
{
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:self.operatorIdentifier forKey:kCommotityListOperatorId];
[mutableDict setValue:self.fullName forKey:kCommotityListOperatorFullName];
return [NSDictionary dictionaryWithDictionary:mutableDict];
}
- (NSString *)description
{
return [NSString stringWithFormat:@"%@", [self dictionaryRepresentation]];
}
#pragma mark - Helper Method
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict
{
id object = [dict objectForKey:aKey];
return [object isEqual:[NSNull null]] ? nil : object;
}
#pragma mark - NSCoding Methods
- (id)initWithCoder:(NSCoder *)aDecoder
{
self = [super init];
self.operatorIdentifier = [aDecoder decodeObjectForKey:kCommotityListOperatorId];
self.fullName = [aDecoder decodeObjectForKey:kCommotityListOperatorFullName];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
[aCoder encodeObject:_operatorIdentifier forKey:kCommotityListOperatorId];
[aCoder encodeObject:_fullName forKey:kCommotityListOperatorFullName];
}
- (id)copyWithZone:(NSZone *)zone
{
CommotityListOperator *copy = [[CommotityListOperator alloc] init];
if (copy) {
copy.operatorIdentifier = [self.operatorIdentifier copyWithZone:zone];
copy.fullName = [self.fullName copyWithZone:zone];
}
return copy;
}
@end
//
// CommotityListUpper.h
//
// Created by Z on 16/4/11
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface CommotityListUpper : NSObject <NSCoding, NSCopying>
@property (nonatomic, strong) NSString *name;
@property (nonatomic, strong) NSString *code;
@property (nonatomic, strong) NSString *uuid;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
- (NSDictionary *)dictionaryRepresentation;
@end
//
// CommotityListUpper.m
//
// Created by Z on 16/4/11
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import "CommotityListUpper.h"
NSString *const kCommotityListUpperName = @"name";
NSString *const kCommotityListUpperCode = @"code";
NSString *const kCommotityListUpperUuid = @"uuid";
@interface CommotityListUpper ()
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
@end
@implementation CommotityListUpper
@synthesize name = _name;
@synthesize code = _code;
@synthesize uuid = _uuid;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict
{
return [[self alloc] initWithDictionary:dict];
}
- (instancetype)initWithDictionary:(NSDictionary *)dict
{
self = [super init];
// This check serves to make sure that a non-NSDictionary object
// passed into the model class doesn't break the parsing.
if(self && [dict isKindOfClass:[NSDictionary class]]) {
self.name = [self objectOrNilForKey:kCommotityListUpperName fromDictionary:dict];
self.code = [self objectOrNilForKey:kCommotityListUpperCode fromDictionary:dict];
self.uuid = [self objectOrNilForKey:kCommotityListUpperUuid fromDictionary:dict];
}
return self;
}
- (NSDictionary *)dictionaryRepresentation
{
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:self.name forKey:kCommotityListUpperName];
[mutableDict setValue:self.code forKey:kCommotityListUpperCode];
[mutableDict setValue:self.uuid forKey:kCommotityListUpperUuid];
return [NSDictionary dictionaryWithDictionary:mutableDict];
}
- (NSString *)description
{
return [NSString stringWithFormat:@"%@", [self dictionaryRepresentation]];
}
#pragma mark - Helper Method
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict
{
id object = [dict objectForKey:aKey];
return [object isEqual:[NSNull null]] ? nil : object;
}
#pragma mark - NSCoding Methods
- (id)initWithCoder:(NSCoder *)aDecoder
{
self = [super init];
self.name = [aDecoder decodeObjectForKey:kCommotityListUpperName];
self.code = [aDecoder decodeObjectForKey:kCommotityListUpperCode];
self.uuid = [aDecoder decodeObjectForKey:kCommotityListUpperUuid];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
[aCoder encodeObject:_name forKey:kCommotityListUpperName];
[aCoder encodeObject:_code forKey:kCommotityListUpperCode];
[aCoder encodeObject:_uuid forKey:kCommotityListUpperUuid];
}
- (id)copyWithZone:(NSZone *)zone
{
CommotityListUpper *copy = [[CommotityListUpper alloc] init];
if (copy) {
copy.name = [self.name copyWithZone:zone];
copy.code = [self.code copyWithZone:zone];
copy.uuid = [self.uuid copyWithZone:zone];
}
return copy;
}
@end
......@@ -14,12 +14,4 @@
- (void)cellWithModel:(CatgoryModel *)model indexPath:(NSIndexPath *)indexPath;
- (void)cellWithHotTagsModel:(JavenHotTagsModel *)model indexPath:(NSIndexPath *)indexPath;
- (void)hideTopLine;
- (void)showTopLine;
- (void)hideRightLine;
- (void)showRightLine;
- (void)hideLeftLine;
- (void)showLeftLine;
@end
......@@ -9,79 +9,27 @@
#import "AddCommodityCollectionViewCell.h"
@interface AddCommodityCollectionViewCell ()
@property (weak, nonatomic) IBOutlet UIView *viewTopLine;
@property (weak, nonatomic) IBOutlet UIView *viewLeftLine;
@property (weak, nonatomic) IBOutlet UIView *viewRightLine;
@property (weak, nonatomic) IBOutlet UIImageView *imgView;
@property (weak, nonatomic) IBOutlet UILabel *labelTItle;
@property (weak, nonatomic) IBOutlet UILabel *labelDsc;
@property (weak, nonatomic) IBOutlet UITextField *textFieldTitle;
@end
@implementation AddCommodityCollectionViewCell
- (void)cellWithModel:(CatgoryModel *)model indexPath:(NSIndexPath *)indexPath {
[self.imgView sd_setImageWithURL:[NSURL URLWithString:model.pictures] placeholderImage:kPlaceHolderImage];
self.labelDsc.text = model.adescription;
self.labelTItle.text = model.name;
if ((int)indexPath.row / 4 == 0) {
[self showTopLine];
}else{
[self hideTopLine];
}
- (void)awakeFromNib {
self.textFieldTitle.enabled = NO;
if ((int)indexPath.row % 4 == 0) {
[self showLeftLine];
}else{
[self hideLeftLine];
}
}
- (void)cellWithHotTagsModel:(JavenHotTagsModel *)model indexPath:(NSIndexPath *)indexPath
- (void)cellWithModel:(CatgoryModel *)model indexPath:(NSIndexPath *)indexPath
{
//[self.imgView sd_setImageWithURL:[NSURL URLWithString:model.pictures] placeholderImage:nil];
//self.labelDsc.text = model.adescription;
self.labelTItle.text = model.name;
if ((int)indexPath.row / 4 == 0) {
[self showTopLine];
}else{
[self hideTopLine];
}
if ((int)indexPath.row % 4 == 0) {
[self showLeftLine];
}else{
[self hideLeftLine];
}
}
self.textFieldTitle.text = model.name;
- (void)hideTopLine {
self.viewTopLine.hidden = YES;
}
- (void)hideRightLine {
self.viewRightLine.hidden = YES;
}
- (void)showTopLine {
self.viewTopLine.hidden = NO;
}
- (void)showRightLine {
self.viewRightLine.hidden = NO;
- (void)cellWithHotTagsModel:(JavenHotTagsModel *)model indexPath:(NSIndexPath *)indexPath
{
self.textFieldTitle.text = model.name;
}
- (void)hideLeftLine {
self.viewLeftLine.hidden = YES;
}
- (void)showLeftLine {
self.viewLeftLine.hidden = NO;
}
- (void)awakeFromNib {
// Initialization code
}
@end
......@@ -8,103 +8,31 @@
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" id="gTV-IL-0wX" customClass="AddCommodityCollectionViewCell">
<rect key="frame" x="0.0" y="0.0" width="226" height="260"/>
<rect key="frame" x="0.0" y="0.0" width="226" height="75"/>
<autoresizingMask key="autoresizingMask"/>
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="226" height="260"/>
<rect key="frame" x="0.0" y="0.0" width="226" height="75"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="add_commodityIcon0" translatesAutoresizingMaskIntoConstraints="NO" id="VbO-vM-Oi6">
<rect key="frame" x="10" y="0.0" width="206" height="207"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="产品分类" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iW3-33-j9z">
<rect key="frame" x="79" y="205" width="68" height="21"/>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="热门标签" borderStyle="roundedRect" textAlignment="center" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="HQp-oR-4tI">
<rect key="frame" x="5" y="10" width="216" height="55"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="简单说明文字" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JTo-s2-j2V">
<rect key="frame" x="3" y="226" width="220" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Bnp-YW-t2r">
<rect key="frame" x="225" y="0.0" width="1" height="260"/>
<color key="backgroundColor" red="0.86666666670000003" green="0.86666666670000003" blue="0.86666666670000003" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" constant="1" id="ujO-4Z-hRU"/>
</constraints>
</view>
<view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="hqW-Bi-eFK">
<rect key="frame" x="0.0" y="0.0" width="1" height="283"/>
<color key="backgroundColor" red="0.86666666670000003" green="0.86666666670000003" blue="0.86666666670000003" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" constant="1" id="9wt-oB-BgM"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="J9w-w0-0Ry">
<rect key="frame" x="0.0" y="0.0" width="226" height="1"/>
<color key="backgroundColor" red="0.86666666670000003" green="0.86666666670000003" blue="0.86666666670000003" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="IJv-Ir-sHp"/>
</constraints>
</view>
<view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="B1f-gb-Nqk">
<rect key="frame" x="1" y="259" width="224" height="1"/>
<color key="backgroundColor" red="0.86666666670000003" green="0.86666666670000003" blue="0.86666666670000003" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="Ofc-Mg-21c"/>
</constraints>
</view>
<textInputTraits key="textInputTraits"/>
</textField>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="Bnp-YW-t2r" secondAttribute="trailing" id="0o1-iL-DRb"/>
<constraint firstAttribute="bottom" secondItem="hqW-Bi-eFK" secondAttribute="bottom" id="1SV-5a-rwU"/>
<constraint firstAttribute="bottom" secondItem="VbO-vM-Oi6" secondAttribute="bottom" constant="53" id="2O3-ul-Lhg"/>
<constraint firstItem="VbO-vM-Oi6" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="3Kc-Cg-BDM"/>
<constraint firstItem="J9w-w0-0Ry" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="3hw-cc-Voc"/>
<constraint firstItem="iW3-33-j9z" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="89M-yh-IKG"/>
<constraint firstItem="B1f-gb-Nqk" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="8e3-id-8qb"/>
<constraint firstItem="Bnp-YW-t2r" firstAttribute="leading" secondItem="B1f-gb-Nqk" secondAttribute="trailing" id="Bzz-JX-XmH"/>
<constraint firstItem="Bnp-YW-t2r" firstAttribute="leading" secondItem="JTo-s2-j2V" secondAttribute="trailing" constant="2" id="EnA-gs-Itk"/>
<constraint firstItem="J9w-w0-0Ry" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="G1O-3f-WhQ"/>
<constraint firstItem="VbO-vM-Oi6" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="10" id="Go3-TY-US1"/>
<constraint firstAttribute="bottom" secondItem="B1f-gb-Nqk" secondAttribute="bottom" id="KXo-CP-tCl"/>
<constraint firstItem="Bnp-YW-t2r" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="Ni4-0H-opg"/>
<constraint firstItem="JTo-s2-j2V" firstAttribute="top" secondItem="iW3-33-j9z" secondAttribute="bottom" id="Ok3-KB-BTo"/>
<constraint firstAttribute="bottom" secondItem="iW3-33-j9z" secondAttribute="bottom" constant="34" id="RKM-iA-5RX"/>
<constraint firstItem="JTo-s2-j2V" firstAttribute="centerX" secondItem="gTV-IL-0wX" secondAttribute="centerX" id="TaH-n4-lmk"/>
<constraint firstAttribute="bottom" secondItem="Bnp-YW-t2r" secondAttribute="bottom" id="Z5h-g4-SZt"/>
<constraint firstItem="hqW-Bi-eFK" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="azw-Kd-8yr"/>
<constraint firstAttribute="trailing" secondItem="B1f-gb-Nqk" secondAttribute="trailing" id="dHY-QN-XGE"/>
<constraint firstAttribute="trailing" secondItem="VbO-vM-Oi6" secondAttribute="trailing" constant="10" id="hxc-Ei-6zf"/>
<constraint firstAttribute="trailing" secondItem="J9w-w0-0Ry" secondAttribute="trailing" id="j3H-pc-fZM"/>
<constraint firstItem="B1f-gb-Nqk" firstAttribute="leading" secondItem="hqW-Bi-eFK" secondAttribute="trailing" id="kUQ-de-bIZ"/>
<constraint firstItem="hqW-Bi-eFK" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="qPr-Mi-woO"/>
<constraint firstItem="JTo-s2-j2V" firstAttribute="leading" secondItem="hqW-Bi-eFK" secondAttribute="trailing" constant="2" id="yAk-6g-3yQ"/>
<constraint firstAttribute="bottom" secondItem="HQp-oR-4tI" secondAttribute="bottom" constant="10" id="hjg-6M-D3H"/>
<constraint firstAttribute="trailing" secondItem="HQp-oR-4tI" secondAttribute="trailing" constant="5" id="qtC-WK-tXx"/>
<constraint firstItem="HQp-oR-4tI" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="10" id="rDi-TA-3mC"/>
<constraint firstItem="HQp-oR-4tI" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="5" id="vcx-ed-2op"/>
</constraints>
<size key="customSize" width="383" height="260"/>
<variation key="default">
<mask key="constraints">
<exclude reference="Bzz-JX-XmH"/>
<exclude reference="kUQ-de-bIZ"/>
</mask>
</variation>
<size key="customSize" width="383" height="75"/>
<connections>
<outlet property="imgView" destination="VbO-vM-Oi6" id="c46-Su-F7z"/>
<outlet property="labelDsc" destination="JTo-s2-j2V" id="IdG-eU-H9d"/>
<outlet property="labelTItle" destination="iW3-33-j9z" id="IOU-xT-CpD"/>
<outlet property="viewLeftLine" destination="hqW-Bi-eFK" id="Jzf-jU-90j"/>
<outlet property="viewRightLine" destination="Bnp-YW-t2r" id="xNo-A8-H0t"/>
<outlet property="viewTopLine" destination="J9w-w0-0Ry" id="jWz-4K-zES"/>
<outlet property="textFieldTitle" destination="HQp-oR-4tI" id="9M8-YJ-eQO"/>
</connections>
<point key="canvasLocation" x="336" y="302"/>
<point key="canvasLocation" x="336" y="209.5"/>
</collectionViewCell>
</objects>
<resources>
<image name="add_commodityIcon0" width="74" height="68"/>
</resources>
</document>
......@@ -9,8 +9,13 @@
#import <UIKit/UIKit.h>
@interface AddCommodityHeaderCollectionReusableView : UICollectionReusableView
@property (weak, nonatomic) IBOutlet UIButton *buttonMore;
- (void)sectionHot;
- (void)sectionHotTag;
- (void)sectionCategory;
- (void)sectionNormalWithTitle:(NSString *)title;
@end
......@@ -20,6 +20,19 @@
[self.icon setImage:[UIImage imageNamed:@"hotBrand"]];
self.labelTitle.text = @"热门品牌";
}
- (void)sectionHotTag {
[self.icon setImage:[UIImage imageNamed:@"hotTagIcon"]];
self.labelTitle.text = @"热门标签";
}
- (void)sectionCategory {
[self.icon setImage:[UIImage imageNamed:@"allCategory"]];
self.labelTitle.text = @"所有分类";
}
- (void)sectionNormalWithTitle:(NSString *)title {
[self.icon setImage:[UIImage imageNamed:@"classify"]];
self.labelTitle.text = title;
......
......@@ -24,10 +24,19 @@
<color key="textColor" red="0.066666666669999999" green="0.066666666669999999" blue="0.066666666669999999" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fgT-hs-GFX">
<rect key="frame" x="262" y="6" width="48" height="33"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<state key="normal" title="更多…">
<color key="titleColor" red="0.75686274509999996" green="0.75686274509999996" blue="0.75686274509999996" alpha="1" colorSpace="calibratedRGB"/>
</state>
</button>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="fgT-hs-GFX" secondAttribute="trailing" constant="10" id="BmH-F5-fVq"/>
<constraint firstItem="WtT-uw-0m7" firstAttribute="leading" secondItem="U6b-Vx-4bR" secondAttribute="leading" constant="10" id="FfV-VQ-99C"/>
<constraint firstItem="fgT-hs-GFX" firstAttribute="centerY" secondItem="bpK-m4-bmM" secondAttribute="centerY" id="Kos-e7-eeP"/>
<constraint firstItem="WtT-uw-0m7" firstAttribute="centerY" secondItem="U6b-Vx-4bR" secondAttribute="centerY" id="Nju-Hc-tFE"/>
<constraint firstItem="bpK-m4-bmM" firstAttribute="centerY" secondItem="U6b-Vx-4bR" secondAttribute="centerY" id="SvN-l1-9vC"/>
<constraint firstItem="bpK-m4-bmM" firstAttribute="leading" secondItem="WtT-uw-0m7" secondAttribute="trailing" constant="8" id="fqp-RR-E9w"/>
......@@ -41,10 +50,11 @@
</mask>
</variation>
<connections>
<outlet property="buttonMore" destination="fgT-hs-GFX" id="edT-0c-gdp"/>
<outlet property="icon" destination="WtT-uw-0m7" id="3DK-Ih-GMv"/>
<outlet property="labelTitle" destination="bpK-m4-bmM" id="aoa-SR-gL3"/>
</connections>
<point key="canvasLocation" x="328" y="401"/>
<point key="canvasLocation" x="215" y="387"/>
</collectionReusableView>
</objects>
<resources>
......
......@@ -9,5 +9,8 @@
#import <UIKit/UIKit.h>
@interface CommodityDetailBottomView : UIView
@property (weak, nonatomic) IBOutlet UIButton *buttonPhone;
@property (weak, nonatomic) IBOutlet UIButton *buttonShop;
@property (weak, nonatomic) IBOutlet UIButton *buttonShare;
@end
......@@ -9,9 +9,6 @@
#import "CommodityDetailBottomView.h"
@interface CommodityDetailBottomView ()
@property (weak, nonatomic) IBOutlet UIButton *buttonPhone;
@property (weak, nonatomic) IBOutlet UIButton *buttonShop;
@property (weak, nonatomic) IBOutlet UIButton *buttonShare;
@end
......
......@@ -9,14 +9,15 @@
#import "CommodityListCollectionViewCell.h"
#import "NSDate+FormatterAdditions.h"
#import "addCommodityRequestModel.h"
#import "MBLabelWithFontAdapter.h"
@interface CommodityListCollectionViewCell ()
@property (weak, nonatomic) IBOutlet UIImageView *imageViewTop;
@property (weak, nonatomic) IBOutlet UILabel *labelTitle;
@property (weak, nonatomic) IBOutlet UILabel *labelCommission;
@property (weak, nonatomic) IBOutlet MBLabelWithFontAdapter *labelTitle;
@property (weak, nonatomic) IBOutlet UILabel *labelPrice;
@property (weak, nonatomic) IBOutlet UILabel *labelOriginalPrice;
@property (weak, nonatomic) IBOutlet UILabel *labelBrokerageRate;
@property (nonatomic, strong) CommotityListModel *model;
@property (weak, nonatomic) IBOutlet MBLabelWithFontAdapter *labelBrokerageRate; //佣金
@property (weak, nonatomic) IBOutlet UILabel *labelSalesVolume; //销量
@end
......@@ -24,9 +25,11 @@
- (void)cellWithModel:(CommotityListModel *)model {
self.labelPrice.text = [NSString stringWithFormat:@"%.0f",model.price];
[self.imageViewTop sd_setImageWithURL:[NSURL URLWithString:model.pictures] placeholderImage:kPlaceHolderImage];
self.labelOriginalPrice.text = [NSString stringWithFormat:@"%.0f", model.originalPrice];
self.labelBrokerageRate.text = [NSString stringWithFormat:@"%.2f", model.brokerageRate];
[self.imageViewTop sd_setImageWithURL:[NSURL URLWithString:model.cover] placeholderImage:kPlaceHolderImage];
self.labelOriginalPrice.text = [NSString stringWithFormat:@"¥%.0f", model.originalPrice];
self.labelBrokerageRate.text = [NSString stringWithFormat:@"¥%.2f", model.commission];
self.labelSalesVolume.text = [NSString stringWithFormat:@"销量:%.0f", model.salesVolume];
self.labelTitle.text = model.name;
self.model = model;
}
......@@ -52,7 +55,6 @@
if ([responseObject[@"code"] isEqualToNumber: @0]) {
[weakSelf addSUccess];
weakSelf.successBlock();
}
} failure:^(NSURLSessionDataTask *task, NSError *error) {
......
......@@ -13,116 +13,124 @@
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="200" height="407"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" image="commodityImage" translatesAutoresizingMaskIntoConstraints="NO" id="cBw-zL-p9z">
<rect key="frame" x="0.0" y="0.0" width="195" height="174"/>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="commodityImage" translatesAutoresizingMaskIntoConstraints="NO" id="cBw-zL-p9z">
<rect key="frame" x="0.0" y="0.0" width="200" height="247"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text="Bloem天然草本更年期综合营养胶囊100粒" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vlk-5l-QDd">
<rect key="frame" x="10" y="182" width="175" height="43"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Bloem天然草本更年期综合营养胶囊100粒" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vlk-5l-QDd" customClass="MBLabelWithFontAdapter">
<rect key="frame" x="10" y="255" width="180" height="41"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.066666666666666666" green="0.066666666666666666" blue="0.066666666666666666" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" ¥" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FUs-8c-aeb">
<rect key="frame" x="5" y="311" width="26" height="24"/>
<rect key="frame" x="5" y="309" width="26" height="24"/>
<fontDescription key="fontDescription" type="system" pointSize="20"/>
<color key="textColor" red="1" green="0.39215686274509803" blue="0.39215686274509803" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="239" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ig6-43-sUi">
<rect key="frame" x="31" y="311" width="37" height="24"/>
<rect key="frame" x="31" y="309" width="37" height="24"/>
<fontDescription key="fontDescription" type="system" pointSize="20"/>
<color key="textColor" red="1" green="0.3921568627" blue="0.3921568627" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥239ddfdfd" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JDW-37-wfV">
<rect key="frame" x="75" y="315" width="94" height="20"/>
<rect key="frame" x="75" y="313" width="94" height="20"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" 佣金:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PoN-DX-HOp">
<rect key="frame" x="5" y="336" width="57" height="20"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥4.88" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LFM-Hc-7OR">
<rect key="frame" x="62" y="335" width="55" height="22"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<color key="textColor" red="0.2666666667" green="0.2666666667" blue="0.2666666667" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pU7-bv-8QS" userLabel="bottom">
<rect key="frame" x="0.0" y="363" width="200" height="44"/>
<subviews>
<view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="IC1-ZB-9GI">
<rect key="frame" x="0.0" y="0.0" width="195" height="1"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="IC1-ZB-9GI">
<rect key="frame" x="0.0" y="0.0" width="200" height="1"/>
<color key="backgroundColor" red="0.81603126986821495" green="0.81603126986821495" blue="0.81603126986821495" alpha="0.60299278846153848" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="qzP-Z6-Apx"/>
</constraints>
</view>
<button opaque="NO" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="aRu-lu-Ec8" customClass="MBButtonWithFontAdapter">
<rect key="frame" x="6" y="9" width="115" height="25"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<state key="normal" title="添加到店铺" image="commodityUnAdded">
<color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<action selector="actionAdd:" destination="gTV-IL-0wX" eventType="touchUpInside" id="pkV-cN-vIR"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleAspectFit" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dLe-Tm-qm6">
<rect key="frame" x="161" y="11" width="22" height="23"/>
<button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="dLe-Tm-qm6">
<rect key="frame" x="166" y="11" width="22" height="23"/>
<constraints>
<constraint firstAttribute="height" constant="23" id="0Qy-LF-bxd"/>
<constraint firstAttribute="width" constant="22" id="yua-IV-f6J"/>
</constraints>
<state key="normal" image="commodityShare"/>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" 佣金:" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="i9h-vh-UNx">
<rect key="frame" x="1" y="12" width="45" height="20"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="¥4.88" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dmy-Qd-kYj" customClass="MBLabelWithFontAdapter">
<rect key="frame" x="46" y="12" width="50" height="20"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.2666666667" green="0.2666666667" blue="0.2666666667" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="jQe-Fs-DSQ">
<rect key="frame" x="157" y="1" width="1" height="43"/>
<color key="backgroundColor" red="0.91271875000000002" green="0.91271875000000002" blue="0.91271875000000002" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" constant="1" id="c7w-gt-9yw"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="jQe-Fs-DSQ" secondAttribute="bottom" id="3nM-vQ-8cc"/>
<constraint firstAttribute="height" constant="44" id="92V-hY-tjv"/>
<constraint firstItem="i9h-vh-UNx" firstAttribute="centerY" secondItem="pU7-bv-8QS" secondAttribute="centerY" id="9om-3B-esf"/>
<constraint firstItem="IC1-ZB-9GI" firstAttribute="top" secondItem="pU7-bv-8QS" secondAttribute="top" id="Bup-dM-Axi"/>
<constraint firstAttribute="trailing" secondItem="dLe-Tm-qm6" secondAttribute="trailing" constant="12" id="DMY-ta-tB1"/>
<constraint firstItem="IC1-ZB-9GI" firstAttribute="leading" secondItem="pU7-bv-8QS" secondAttribute="leading" id="JVz-Qb-8fs"/>
<constraint firstItem="aRu-lu-Ec8" firstAttribute="centerY" secondItem="pU7-bv-8QS" secondAttribute="centerY" id="KdK-b2-Phl"/>
<constraint firstItem="aRu-lu-Ec8" firstAttribute="leading" secondItem="pU7-bv-8QS" secondAttribute="leading" constant="6" id="Sk9-53-nyg"/>
<constraint firstItem="dLe-Tm-qm6" firstAttribute="centerY" secondItem="pU7-bv-8QS" secondAttribute="centerY" id="XM2-R2-Z3p"/>
<constraint firstItem="dLe-Tm-qm6" firstAttribute="leading" secondItem="jQe-Fs-DSQ" secondAttribute="trailing" constant="8" id="Xpu-V6-rWH"/>
<constraint firstAttribute="trailing" secondItem="IC1-ZB-9GI" secondAttribute="trailing" id="dzj-Dv-VRD"/>
<constraint firstItem="jQe-Fs-DSQ" firstAttribute="top" secondItem="IC1-ZB-9GI" secondAttribute="bottom" id="hME-fp-gwQ"/>
<constraint firstItem="dmy-Qd-kYj" firstAttribute="centerY" secondItem="i9h-vh-UNx" secondAttribute="centerY" id="k7R-QY-Mdy"/>
<constraint firstItem="dmy-Qd-kYj" firstAttribute="leading" secondItem="i9h-vh-UNx" secondAttribute="trailing" id="xcE-hG-ica"/>
</constraints>
</view>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DLG-sh-uU2">
<rect key="frame" x="75" y="325" width="94" height="1"/>
<rect key="frame" x="75" y="324" width="94" height="1"/>
<color key="backgroundColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="xRA-b9-Nsa"/>
</constraints>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="249" text="销量:120" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4sA-5e-zpi">
<rect key="frame" x="14" y="337" width="75" height="22"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</view>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="i9h-vh-UNx" firstAttribute="leading" secondItem="FUs-8c-aeb" secondAttribute="leading" constant="-4" id="09G-JC-AXp"/>
<constraint firstItem="cBw-zL-p9z" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="1Yu-wi-HgC"/>
<constraint firstItem="4sA-5e-zpi" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="14" id="4L0-Gu-xfw"/>
<constraint firstItem="ig6-43-sUi" firstAttribute="centerY" secondItem="FUs-8c-aeb" secondAttribute="centerY" id="5JQ-Rz-YcG"/>
<constraint firstAttribute="bottom" secondItem="pU7-bv-8QS" secondAttribute="bottom" id="6nt-pW-mCL"/>
<constraint firstItem="FUs-8c-aeb" firstAttribute="top" secondItem="vlk-5l-QDd" secondAttribute="bottom" constant="13" id="6o1-q3-rPs"/>
<constraint firstAttribute="trailing" secondItem="vlk-5l-QDd" secondAttribute="trailing" constant="10" id="9iV-bh-YX2"/>
<constraint firstItem="JDW-37-wfV" firstAttribute="width" secondItem="DLG-sh-uU2" secondAttribute="width" id="ABU-DF-D10"/>
<constraint firstItem="LFM-Hc-7OR" firstAttribute="top" secondItem="DLG-sh-uU2" secondAttribute="bottom" constant="9" id="ACq-Fb-ZQy"/>
<constraint firstItem="PoN-DX-HOp" firstAttribute="leading" secondItem="FUs-8c-aeb" secondAttribute="leading" id="FwR-VT-5sa"/>
<constraint firstItem="pU7-bv-8QS" firstAttribute="top" secondItem="4sA-5e-zpi" secondAttribute="bottom" constant="4" id="AKU-zp-dNe"/>
<constraint firstItem="4sA-5e-zpi" firstAttribute="top" secondItem="JDW-37-wfV" secondAttribute="bottom" constant="4" id="CNr-5k-ogc"/>
<constraint firstItem="FUs-8c-aeb" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="5" id="Gap-ae-3qZ"/>
<constraint firstItem="JDW-37-wfV" firstAttribute="bottom" secondItem="ig6-43-sUi" secondAttribute="bottom" id="I9c-HN-6Vj"/>
<constraint firstItem="PoN-DX-HOp" firstAttribute="top" secondItem="ig6-43-sUi" secondAttribute="bottom" constant="1" id="IKe-FV-TzR"/>
<constraint firstItem="FUs-8c-aeb" firstAttribute="leading" secondItem="vlk-5l-QDd" secondAttribute="leading" id="IdZ-yI-Aba"/>
<constraint firstAttribute="trailing" secondItem="cBw-zL-p9z" secondAttribute="trailing" id="LMr-oe-Zgo"/>
<constraint firstItem="DLG-sh-uU2" firstAttribute="centerY" secondItem="FUs-8c-aeb" secondAttribute="centerY" constant="3" id="Lk7-4I-6zG"/>
<constraint firstItem="ig6-43-sUi" firstAttribute="leading" secondItem="FUs-8c-aeb" secondAttribute="trailing" constant="7" id="ORt-QK-sOe"/>
<constraint firstItem="pU7-bv-8QS" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="Ozj-J8-BYp"/>
<constraint firstItem="JDW-37-wfV" firstAttribute="leading" secondItem="DLG-sh-uU2" secondAttribute="leading" id="QAj-TL-HVc"/>
<constraint firstItem="LFM-Hc-7OR" firstAttribute="leading" secondItem="PoN-DX-HOp" secondAttribute="trailing" id="QGV-Jy-acr"/>
<constraint firstItem="LFM-Hc-7OR" firstAttribute="centerY" secondItem="PoN-DX-HOp" secondAttribute="centerY" id="Shh-A4-awY"/>
<constraint firstItem="4sA-5e-zpi" firstAttribute="leading" secondItem="vlk-5l-QDd" secondAttribute="leading" id="U8z-Bp-PqG"/>
<constraint firstItem="ig6-43-sUi" firstAttribute="leading" secondItem="FUs-8c-aeb" secondAttribute="trailing" id="Ywz-KP-UiI"/>
<constraint firstAttribute="bottom" secondItem="cBw-zL-p9z" secondAttribute="bottom" constant="160" id="Z6c-Ut-Ydg"/>
<constraint firstItem="cBw-zL-p9z" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="cVC-4e-gej"/>
......@@ -138,16 +146,17 @@
<exclude reference="IdZ-yI-Aba"/>
<exclude reference="ORt-QK-sOe"/>
<exclude reference="jQQ-3k-JFb"/>
<exclude reference="U8z-Bp-PqG"/>
</mask>
</variation>
<connections>
<outlet property="imageViewTop" destination="cBw-zL-p9z" id="zPI-ay-h1c"/>
<outlet property="labelBrokerageRate" destination="LFM-Hc-7OR" id="65C-IR-cp1"/>
<outlet property="labelCommission" destination="LFM-Hc-7OR" id="DT7-sD-Mww"/>
<outlet property="labelBrokerageRate" destination="dmy-Qd-kYj" id="q7H-Qk-eYC"/>
<outlet property="labelOriginalPrice" destination="JDW-37-wfV" id="FFB-9Z-rJw"/>
<outlet property="labelPrice" destination="ig6-43-sUi" id="d63-fZ-UmH"/>
<outlet property="labelRealPrice" destination="JDW-37-wfV" id="eBM-3D-ezH"/>
<outlet property="labelSalePrice" destination="ig6-43-sUi" id="NaO-uj-sLU"/>
<outlet property="labelSalesVolume" destination="4sA-5e-zpi" id="B4d-u6-bO0"/>
<outlet property="labelTitle" destination="vlk-5l-QDd" id="FAQ-2a-zdq"/>
</connections>
<point key="canvasLocation" x="-105" y="369.5"/>
......@@ -155,7 +164,6 @@
</objects>
<resources>
<image name="commodityImage" width="176" height="201"/>
<image name="commodityShare" width="28" height="30"/>
<image name="commodityUnAdded" width="25" height="25"/>
<image name="commodityShare" width="29" height="31"/>
</resources>
</document>
......@@ -13,25 +13,25 @@
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
<rect key="frame" x="0.0" y="0.0" width="315" height="220"/>
<subviews>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleAspectFit" misplaced="YES" image="hotIcon" translatesAutoresizingMaskIntoConstraints="NO" id="JCd-BI-c3c">
<rect key="frame" x="74" y="56" width="142" height="110"/>
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleAspectFit" image="hotIcon" translatesAutoresizingMaskIntoConstraints="NO" id="JCd-BI-c3c">
<rect key="frame" x="10" y="0.0" width="295" height="220"/>
</imageView>
<view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="S8b-kg-0m9" customClass="HotCommodityCell">
<rect key="frame" x="95" y="189" width="98" height="23"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="S8b-kg-0m9" customClass="HotCommodityCell">
<rect key="frame" x="0.0" y="219" width="315" height="1"/>
<color key="backgroundColor" red="0.86666666670000003" green="0.86666666670000003" blue="0.86666666670000003" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="u30-NM-gWn"/>
</constraints>
</view>
<view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bSo-Z3-jeB">
<rect key="frame" x="93" y="7" width="98" height="23"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bSo-Z3-jeB">
<rect key="frame" x="0.0" y="0.0" width="315" height="1"/>
<color key="backgroundColor" red="0.86666666670000003" green="0.86666666670000003" blue="0.86666666670000003" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="Qhj-QZ-2YV"/>
</constraints>
</view>
<view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="f0P-VR-27O">
<rect key="frame" x="256" y="46" width="37" height="118"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="f0P-VR-27O">
<rect key="frame" x="314" y="0.0" width="1" height="220"/>
<color key="backgroundColor" red="0.86666666670000003" green="0.86666666670000003" blue="0.86666666670000003" alpha="1" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="1" id="cAO-73-Oaw"/>
......
......@@ -24,10 +24,10 @@
- (void)cellWithModel:(CommotityListModel *)model
{
[self.imgViewCommodity sd_setImageWithURL:[NSURL URLWithString:model.pictures] placeholderImage:kPlaceHolderImage];
[self.imgViewCommodity sd_setImageWithURL:[NSURL URLWithString:model.cover] placeholderImage:kPlaceHolderImage];
self.labelTitle.text = model.name;
self.labelPrice.text = [NSString stringWithFormat:@"¥%.0f",model.price];
self.labelBrokerageRate.text = [NSString stringWithFormat:@"%.2f",model.brokerageRate];
self.labelBrokerageRate.text = [NSString stringWithFormat:@"%.2f",model.commission];
}
......
......@@ -17,6 +17,8 @@
#import "CatgoryModel.h"
#import "JavenHotTagsModel.h"
#import "CommoditySearchViewController.h"
#import "MoreHotTagViewController.h"
#import "MoreHotBrandViewController.h"
#define kHotCellId @"addCommodityCellHot"
#define kCellId @"addCommodityCell"
......@@ -50,18 +52,47 @@
return _arrData;
}
#pragma mark =========== actions ===========
- (void)searchAct {
CLog(@"搜索");
CommoditySearchViewController *searchVC = [[CommoditySearchViewController alloc] init];
searchVC.isShowNavigationBar = YES;
IBTUINavigationController *nc = [[IBTUINavigationController alloc] initWithRootViewController:searchVC];
// [self.navigationController presentModalViewController:nc animated:NO];
[self.navigationController presentViewController:nc animated:YES completion:nil];
[self.navigationController presentViewController:nc animated:YES completion:nil];
}
- (void)moreAction:(UIButton *)btn {
switch (btn.tag) {
case 0:
{
MoreHotBrandViewController *moreHotBrandVC = [[MoreHotBrandViewController alloc] init];
moreHotBrandVC.isShowNavigationBar = YES;
moreHotBrandVC.arrItems = self.arrData[0];
[self.navigationController pushViewController:moreHotBrandVC animated:YES];
}
break;
case 1:
{
MoreHotTagViewController *moreHotTagVC = [[MoreHotTagViewController alloc] init];
moreHotTagVC.arrItems = self.arrData[1];
moreHotTagVC.isShowNavigationBar = YES;
[self.navigationController pushViewController:moreHotTagVC animated:YES];
}
break;
case 2:
{
}
break;
default:
break;
}
}
- (void)setUpdata {
WS(weakSelf)
......@@ -113,12 +144,6 @@
return UIStatusBarStyleDefault;
}
//隐藏navigationbar
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO];
}
- (void)setUpCollectionView {
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
......@@ -154,12 +179,17 @@
if (kind == UICollectionElementKindSectionHeader) {
AddCommodityHeaderCollectionReusableView *reuseHeaderView = [collectionView dequeueReusableSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:kHeaderId forIndexPath:indexPath];
reuseHeaderView.buttonMore.tag = indexPath.section;
[reuseHeaderView.buttonMore addTarget:self action:@selector(moreAction:) forControlEvents:UIControlEventTouchUpInside];
if (indexPath.section == 0) {
[reuseHeaderView sectionHot];
[reuseHeaderView sectionHot];//设置图标
}else if(indexPath.section == 1){
[reuseHeaderView sectionNormalWithTitle:@"标签"];
[reuseHeaderView sectionHotTag];
}else{
[reuseHeaderView sectionNormalWithTitle:@"分类"];
reuseHeaderView.buttonMore.hidden = YES;
[reuseHeaderView sectionCategory];
}
return reuseHeaderView;
......@@ -182,8 +212,10 @@
- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
return CGSizeMake((ScreenSize.width - kMargin * 2)/3, kAutoValue(100));
}else if(indexPath.section == 1){
return CGSizeMake((ScreenSize.width - kMargin * 2)/3, kAutoValue(70));
}else{
return CGSizeMake((ScreenSize.width - kMargin * 2)/4, kAutoValue(160));
return CGSizeMake((ScreenSize.width - kMargin * 2)/2, kAutoValue(70));
}
}
......@@ -207,7 +239,9 @@
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
if (section == 1 && [self.arrData[section] count] > 3 ) {
return 3;
}
return [self.arrData[section] count];
}
......@@ -242,6 +276,7 @@
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
CommodityListViewController *commodityVC = [[CommodityListViewController alloc] init];
commodityVC.hidesBottomBarWhenPushed = YES;
commodityVC.isShowNavigationBar = YES;
commodityVC.model = self.arrData[indexPath.section][indexPath.row];
[self.navigationController pushViewController:commodityVC animated:YES];
}
......
......@@ -7,7 +7,8 @@
//
#import "IBTUIViewController.h"
#import "CommodityListModel/CommotityListModel.h"
@interface CommodityDetailViewController : IBTUIViewController
@property (nonatomic, strong) CommotityListModel *model;
@end
......@@ -25,35 +25,83 @@
}
self.view.backgroundColor = kBacroundColor;
UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, kWidth, kHeight - 67)];
NSURL *url = [NSURL URLWithString:@"https://m.jd.com"];
[webView loadRequest:[NSURLRequest requestWithURL:url]];
[self.view addSubview:webView];
webView.userInteractionEnabled = YES;
[self setUpWebView];
[self.view addSubview:self.topView];
WS(weakSelf)
self.topView.bacBlock = ^{
[weakSelf.navigationController popViewControllerAnimated:YES];
};
_topView.homeBlock = ^{
self.topView.homeBlock = ^{
CLog(@"home");
};
[self.view addSubview:self.bottomView];
[self.bottomView.buttonShop addTarget:self action:@selector(addCommodity) forControlEvents:UIControlEventTouchUpInside];
// Do any additional setup after loading the view.
}
- (void)addCommodity {
CLog(@"添加商品");
UserInfo *info = [UserInfo shareInstance];
NSDictionary *param = @{
@"operCtx": @{
@"time": [[NSDate date] timeStampNumber],
@"domain": info.domain,
@"operator": @{
@"id": info.uuid,
@"fullName": info.name
}
},
@"shopUuid": info.shop.uuid,
@"goodsUuid":self.model.uuid
};
// Do any additional setup after loading the view.
WS(weakSelf)
[[HTTPCilent shareCilent] POST:@"shop/addGoods" parameters:param success:^(NSURLSessionDataTask *task, id responseObject) {
if ([responseObject[@"code"] isEqualToNumber: @0]) {
[weakSelf addSUccess];
}
} failure:^(NSURLSessionDataTask *task, NSError *error) {
}];
}
- (void)addSUccess {
//添加成功提示框
MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:self.view.window];
[self.view.window addSubview:hud];
hud.animationType = MBProgressHUDAnimationFade;
hud.removeFromSuperViewOnHide = YES;
hud.labelText = @"添加成功!";
hud.mode = MBProgressHUDModeText;
[hud show:YES];
[hud hide:YES afterDelay:1];
}
- (void)setUpWebView {
UserInfo *userInfo = [UserInfo shareInstance];
NSString *urlStr = [NSString stringWithFormat:@"%@Wap/detail/shop_id/%@/id/%@/hastbar/1/.html", userInfo.webShopBaseUrl, userInfo.shop.uuid, self.model.uuid];
UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, kWidth, kHeight - 67)];
NSURL *url = [NSURL URLWithString:urlStr];
[webView loadRequest:[NSURLRequest requestWithURL:url]];
[self.view addSubview:webView];
webView.userInteractionEnabled = YES;
}
//隐藏navigationbar
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
......
......@@ -55,7 +55,6 @@
- (void)setUpData {
//前期发送请求生成参数的方式,后来不这么做了
NSString *parameters;
NSString *operation;
......@@ -73,7 +72,7 @@
}else if ([self.model isKindOfClass:[JavenHotTagsModel class]]){//热门标签
CatgoryModel *model = self.model;
operation = @"goodsData category uuid equals";
operation = @"tag uuid equals";
parameters = model.uuid;
}
......@@ -89,7 +88,6 @@
@"page" : @0,
@"probePages" : @0},
@"fetchParts" : @[@"string"]};
NSString *string = [myDictionary mj_JSONString];
WS(weakSelf)
[[HTTPCilent shareCilent] POST:@"goods/query2" parameters:myDictionary success:^(NSURLSessionDataTask *task, id responseObject) {
......@@ -107,13 +105,6 @@
}
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:NO];
}
- (void)setUpSortView {
_sortView = [[[SortView alloc] init] customNew];
[self.view addSubview:_sortView];
......@@ -224,6 +215,7 @@
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
CommodityDetailViewController *detailVC = [[CommodityDetailViewController alloc] init];
detailVC.model = self.arrItemDatas[indexPath.row];
[self.navigationController pushViewController:detailVC animated:YES];
}
......
//
// MoreHotBrandViewController.h
// ALand
//
// Created by Z on 16/4/27.
// Copyright © 2016年 Z. All rights reserved.
//
#import "IBTUIViewController.h"
#import "HotBrandModel.h"
@interface MoreHotBrandViewController : IBTUIViewController
@property (nonatomic, strong) NSArray *arrItems;
@end
//
// MoreHotBrandViewController.m
// ALand
//
// Created by Z on 16/4/27.
// Copyright © 2016年 Z. All rights reserved.
//
#import "MoreHotBrandViewController.h"
#import "HotCommodityCell.h"
#define kHotCellId @"addCommodityCellHot"
#define kMargin 0
@interface MoreHotBrandViewController ()<UICollectionViewDelegate, UICollectionViewDataSource>
@property (nonatomic, strong) UICollectionView *collectionView;
@end
@implementation MoreHotBrandViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.navigationItem.title = @"更多热门品牌";
[self setUpCollectionView];
// Do any additional setup after loading the view.
}
- (void)setUpCollectionView {
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.itemSize = CGSizeMake((ScreenSize.width - kMargin * 2)/3, kAutoValue(100));
layout.minimumLineSpacing = 0;
layout.minimumInteritemSpacing = 0;
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
[self.view addSubview:_collectionView];
_collectionView.sd_layout.topEqualToView(self.view).leftEqualToView(self.view).bottomEqualToView(self.view).rightEqualToView(self.view);
_collectionView.delegate = self;
_collectionView.dataSource = self;
_collectionView.backgroundColor = kSysWhite;
_collectionView.contentInset = UIEdgeInsetsMake(0, kMargin, 0, kMargin);
//cell
[_collectionView registerNib:[UINib nibWithNibName:@"HotCommodityCell" bundle:[NSBundle mainBundle]] forCellWithReuseIdentifier:kHotCellId];
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
return self.arrItems.count;
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
HotCommodityCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:kHotCellId forIndexPath:indexPath];
[cell cellWithModel:self.arrItems[indexPath.row] indexPath:indexPath];
return cell;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
//
// MoreHotTagViewController.h
// ALand
//
// Created by Z on 16/4/27.
// Copyright © 2016年 Z. All rights reserved.
//
#import "IBTUIViewController.h"
#import "JavenHotTagsModel.h"
@interface MoreHotTagViewController : IBTUIViewController
@property (nonatomic, strong) NSArray *arrItems;
@end
//
// MoreHotTagViewController.m
// ALand
//
// Created by Z on 16/4/27.
// Copyright © 2016年 Z. All rights reserved.
//
#import "MoreHotTagViewController.h"
#import "AddCommodityCollectionViewCell.h"
#define kCellId @"AddCommodityCollectionViewCell.h"
#define kMargin 0
@interface MoreHotTagViewController ()<UICollectionViewDelegate, UICollectionViewDataSource>
@property (nonatomic, strong) UICollectionView *collectionView;
@end
@implementation MoreHotTagViewController
- (void)viewDidLoad {
[super viewDidLoad];
[self setUpCollectionView];
// Do any additional setup after loading the view.
}
- (void)setUpCollectionView {
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
layout.itemSize = CGSizeMake((ScreenSize.width - kMargin * 2)/3, kAutoValue(70));
layout.minimumLineSpacing = 0;
layout.minimumInteritemSpacing = 0;
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
[self.view addSubview:_collectionView];
_collectionView.sd_layout.topEqualToView(self.view).leftEqualToView(self.view).bottomEqualToView(self.view).rightEqualToView(self.view);
_collectionView.delegate = self;
_collectionView.dataSource = self;
_collectionView.backgroundColor = kSysWhite;
_collectionView.contentInset = UIEdgeInsetsMake(0, kMargin, 0, kMargin);
//cell
[_collectionView registerNib:[UINib nibWithNibName:@"AddCommodityCollectionViewCell" bundle:[NSBundle mainBundle]] forCellWithReuseIdentifier:kCellId];
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
return self.arrItems.count;
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
AddCommodityCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:kCellId forIndexPath:indexPath];
[cell cellWithHotTagsModel:self.arrItems[indexPath.row] indexPath:indexPath];
return cell;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
......@@ -102,6 +102,7 @@
CLog(@"添加商品");
AddCommodityViewController *addVC = [[AddCommodityViewController alloc] init];
addVC.hidesBottomBarWhenPushed = YES;
addVC.isShowNavigationBar = YES;
[self.navigationController pushViewController:addVC animated:YES];
}
......
......@@ -14,6 +14,7 @@
#import "introductionViewController.h"
#import "CommodityManagementViewController.h"
#import "UMSocial.h"
#import "UMSocialWechatHandler.h"
@interface StoreManagermentViewController ()<UINavigationControllerDelegate, UIImagePickerControllerDelegate, UMSocialUIDelegate>
@property (nonatomic, strong) SelectPhotoView *photoView;
@property (nonatomic, strong) CoverShadowView *shadowView;
......@@ -136,12 +137,13 @@
[self.navigationController pushViewController:commodityVC animated:YES];
}
- (IBAction)actionShare:(id)sender {
[UMSocialSnsService presentSnsIconSheetView:self
appKey:@"507fcab25270157b37000010"
shareText:@"你要分享的文字"
shareImage:[UIImage imageNamed:@"icon.png"]
shareToSnsNames:[NSArray arrayWithObjects:UMShareToSina,UMShareToWechatSession,UMShareToQQ,nil]
delegate:self];
[UMSocialWechatHandler setWXAppId:@"wx2e218a9fb84928fa" appSecret:@"400c1925383f36f7768de707c69035e2" url:@"http://www.baidu.com"];
[[UMSocialDataService defaultDataService] postSNSWithTypes:@[UMShareToWechatSession] content:@"share" image:[UIImage imageNamed:@"add_commodityIcon0"] location:nil urlResource:nil presentedController:self completion:^(UMSocialResponseEntity *response){
if (response.responseCode == UMSResponseCodeSuccess) {
NSLog(@"分享成功!");
}
}];
}
......
......@@ -65,6 +65,8 @@
UserInfo *info = [UserInfo shareInstance];
[info UserInfoWithDictionary:responseObject[@"reseller"]];
info.webShopBaseUrl = responseObject[@"appConfig"][@"webShopBaseUrl"];
BaseViewController *baseVC = [[BaseViewController alloc] init];
baseVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[weakSelf presentViewController:baseVC animated:YES completion:nil];
......
......@@ -42,7 +42,8 @@
UserInfo *info = [UserInfo shareInstance];
[info UserInfoWithDictionary:responseObject[@"reseller"]];
info.webShopBaseUrl = responseObject[@"appConfig"][@"webShopBaseUrl"];
[[NSUserDefaults standardUserDefaults] setObject:weakSelf.phoneNumberTextFiled.text forKey:@"userName"];
[[NSUserDefaults standardUserDefaults] setObject:[weakSelf.passwordTextFiled.text MD5String] forKey:@"passWord"];
......
......@@ -9,5 +9,6 @@
#import "UserInfoBaseClass.h"
#import "JavenShopModel.h"
@interface UserInfo : UserInfoBaseClass
@property (nonatomic, copy) NSString *webShopBaseUrl;
+ (UserInfo *)shareInstance;
@end
......@@ -13,11 +13,11 @@
@property (nonatomic, strong) NSArray *bankCards;
@property (nonatomic, assign) BOOL idValidated;
@property (nonatomic, assign) id code;
@property (nonatomic, assign) id uuid;
@property (nonatomic, assign) id trueName;
@property (nonatomic, assign) id good;
@property (nonatomic, assign) id name;
@property (nonatomic, strong) id code;
@property (nonatomic, strong) id uuid;
@property (nonatomic, strong) id trueName;
@property (nonatomic, strong) id good;
@property (nonatomic, strong) id name;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment