Commit 3b55e678 authored by Sandy's avatar Sandy

封装七牛图片上传类 and bug fix

parent 923729f1
...@@ -43,8 +43,6 @@ ...@@ -43,8 +43,6 @@
191AEE631CBCC6D100F5E535 /* Parameter.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE591CBCC6D100F5E535 /* Parameter.m */; }; 191AEE631CBCC6D100F5E535 /* Parameter.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE591CBCC6D100F5E535 /* Parameter.m */; };
191AEE641CBCC6D100F5E535 /* Parameters.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE5B1CBCC6D100F5E535 /* Parameters.m */; }; 191AEE641CBCC6D100F5E535 /* Parameters.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE5B1CBCC6D100F5E535 /* Parameters.m */; };
191AEE7E1CBCEE6B00F5E535 /* JavenCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE771CBCEE6B00F5E535 /* JavenCategory.m */; }; 191AEE7E1CBCEE6B00F5E535 /* JavenCategory.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE771CBCEE6B00F5E535 /* JavenCategory.m */; };
191AEE7F1CBCEE6B00F5E535 /* JavenCreateInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE791CBCEE6B00F5E535 /* JavenCreateInfo.m */; };
191AEE801CBCEE6B00F5E535 /* JavenLastModifyInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE7B1CBCEE6B00F5E535 /* JavenLastModifyInfo.m */; };
191AEE811CBCEE6B00F5E535 /* JavenOperator.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE7D1CBCEE6B00F5E535 /* JavenOperator.m */; }; 191AEE811CBCEE6B00F5E535 /* JavenOperator.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE7D1CBCEE6B00F5E535 /* JavenOperator.m */; };
191AEE841CBCEE8C00F5E535 /* JavenHotTagsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE831CBCEE8C00F5E535 /* JavenHotTagsModel.m */; }; 191AEE841CBCEE8C00F5E535 /* JavenHotTagsModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE831CBCEE8C00F5E535 /* JavenHotTagsModel.m */; };
191AEE881CBCF8E000F5E535 /* CommoditySearchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE861CBCF8E000F5E535 /* CommoditySearchViewController.m */; }; 191AEE881CBCF8E000F5E535 /* CommoditySearchViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 191AEE861CBCF8E000F5E535 /* CommoditySearchViewController.m */; };
...@@ -80,6 +78,7 @@ ...@@ -80,6 +78,7 @@
1940D31D1C9A57640080678C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1940D31C1C9A57640080678C /* AppDelegate.m */; }; 1940D31D1C9A57640080678C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1940D31C1C9A57640080678C /* AppDelegate.m */; };
1940D3281C9A58150080678C /* BaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1940D3271C9A58150080678C /* BaseViewController.m */; }; 1940D3281C9A58150080678C /* BaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1940D3271C9A58150080678C /* BaseViewController.m */; };
1946DC9A1CB7542D00AC6557 /* CatgoryModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1946DC991CB7542D00AC6557 /* CatgoryModel.m */; }; 1946DC9A1CB7542D00AC6557 /* CatgoryModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 1946DC991CB7542D00AC6557 /* CatgoryModel.m */; };
194CB5391CD8AA4A0050E59F /* JavenQNManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 194CB5381CD8AA4A0050E59F /* JavenQNManager.m */; };
195EB1DB1CA516CE00E298BB /* HotCommodityCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 195EB1D91CA516CE00E298BB /* HotCommodityCell.m */; }; 195EB1DB1CA516CE00E298BB /* HotCommodityCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 195EB1D91CA516CE00E298BB /* HotCommodityCell.m */; };
195EB1DC1CA516CE00E298BB /* HotCommodityCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 195EB1DA1CA516CE00E298BB /* HotCommodityCell.xib */; }; 195EB1DC1CA516CE00E298BB /* HotCommodityCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 195EB1DA1CA516CE00E298BB /* HotCommodityCell.xib */; };
195EB1E01CA5292600E298BB /* AddCommodityFooterCollectionReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 195EB1DE1CA5292600E298BB /* AddCommodityFooterCollectionReusableView.m */; }; 195EB1E01CA5292600E298BB /* AddCommodityFooterCollectionReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 195EB1DE1CA5292600E298BB /* AddCommodityFooterCollectionReusableView.m */; };
...@@ -107,6 +106,16 @@ ...@@ -107,6 +106,16 @@
1979754A1CAA4DB900407E3F /* CommodityMutipleSelectBottomView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 197975491CAA4DB900407E3F /* CommodityMutipleSelectBottomView.xib */; }; 1979754A1CAA4DB900407E3F /* CommodityMutipleSelectBottomView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 197975491CAA4DB900407E3F /* CommodityMutipleSelectBottomView.xib */; };
1979754D1CAB6E1300407E3F /* JavenMultipleViewWithHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 1979754C1CAB6E1300407E3F /* JavenMultipleViewWithHeader.m */; }; 1979754D1CAB6E1300407E3F /* JavenMultipleViewWithHeader.m in Sources */ = {isa = PBXBuildFile; fileRef = 1979754C1CAB6E1300407E3F /* JavenMultipleViewWithHeader.m */; };
197975511CAB6F5D00407E3F /* OrderViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 197975501CAB6F5D00407E3F /* OrderViewController.m */; }; 197975511CAB6F5D00407E3F /* OrderViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 197975501CAB6F5D00407E3F /* OrderViewController.m */; };
197BA66D1CD85122000E2087 /* JavenCertificate.m in Sources */ = {isa = PBXBuildFile; fileRef = 197BA66C1CD85122000E2087 /* JavenCertificate.m */; };
197BA6701CD8515D000E2087 /* JavenCreateInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 197BA66F1CD8515D000E2087 /* JavenCreateInfo.m */; };
197BA6731CD8516B000E2087 /* JavenIdCard.m in Sources */ = {isa = PBXBuildFile; fileRef = 197BA6721CD8516B000E2087 /* JavenIdCard.m */; };
197BA6761CD8518A000E2087 /* JavenLastModifyInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 197BA6751CD8518A000E2087 /* JavenLastModifyInfo.m */; };
197BA6791CD85196000E2087 /* JavenLoginControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 197BA6781CD85196000E2087 /* JavenLoginControl.m */; };
197BA67E1CD851BA000E2087 /* JavenOwnerOrg.m in Sources */ = {isa = PBXBuildFile; fileRef = 197BA67B1CD851BA000E2087 /* JavenOwnerOrg.m */; };
197BA67F1CD851BA000E2087 /* JavenPasswordControl.m in Sources */ = {isa = PBXBuildFile; fileRef = 197BA67D1CD851BA000E2087 /* JavenPasswordControl.m */; };
197BA6821CD851DB000E2087 /* JavenDetailReseller.m in Sources */ = {isa = PBXBuildFile; fileRef = 197BA6811CD851DB000E2087 /* JavenDetailReseller.m */; };
197BA6851CD85632000E2087 /* NSNumber+Fommater.m in Sources */ = {isa = PBXBuildFile; fileRef = 197BA6841CD85632000E2087 /* NSNumber+Fommater.m */; };
197BA6891CD865D1000E2087 /* JavencommissionAccountModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 197BA6881CD865D1000E2087 /* JavencommissionAccountModel.m */; };
199B4D681CABBCF600451E0E /* OrderDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 199B4D671CABBCF600451E0E /* OrderDetailViewController.m */; }; 199B4D681CABBCF600451E0E /* OrderDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 199B4D671CABBCF600451E0E /* OrderDetailViewController.m */; };
199B4D6A1CABBEF400451E0E /* OrderDetailTopView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 199B4D691CABBEF400451E0E /* OrderDetailTopView.xib */; }; 199B4D6A1CABBEF400451E0E /* OrderDetailTopView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 199B4D691CABBEF400451E0E /* OrderDetailTopView.xib */; };
199B4D6D1CABBF0800451E0E /* OrderDetailTopView.m in Sources */ = {isa = PBXBuildFile; fileRef = 199B4D6C1CABBF0800451E0E /* OrderDetailTopView.m */; }; 199B4D6D1CABBF0800451E0E /* OrderDetailTopView.m in Sources */ = {isa = PBXBuildFile; fileRef = 199B4D6C1CABBF0800451E0E /* OrderDetailTopView.m */; };
...@@ -332,10 +341,6 @@ ...@@ -332,10 +341,6 @@
191AEE5B1CBCC6D100F5E535 /* Parameters.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Parameters.m; sourceTree = "<group>"; }; 191AEE5B1CBCC6D100F5E535 /* Parameters.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Parameters.m; sourceTree = "<group>"; };
191AEE761CBCEE6B00F5E535 /* JavenCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenCategory.h; sourceTree = "<group>"; }; 191AEE761CBCEE6B00F5E535 /* JavenCategory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenCategory.h; sourceTree = "<group>"; };
191AEE771CBCEE6B00F5E535 /* JavenCategory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenCategory.m; sourceTree = "<group>"; }; 191AEE771CBCEE6B00F5E535 /* JavenCategory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenCategory.m; sourceTree = "<group>"; };
191AEE781CBCEE6B00F5E535 /* JavenCreateInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenCreateInfo.h; sourceTree = "<group>"; };
191AEE791CBCEE6B00F5E535 /* JavenCreateInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenCreateInfo.m; sourceTree = "<group>"; };
191AEE7A1CBCEE6B00F5E535 /* JavenLastModifyInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenLastModifyInfo.h; sourceTree = "<group>"; };
191AEE7B1CBCEE6B00F5E535 /* JavenLastModifyInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenLastModifyInfo.m; sourceTree = "<group>"; };
191AEE7C1CBCEE6B00F5E535 /* JavenOperator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenOperator.h; sourceTree = "<group>"; }; 191AEE7C1CBCEE6B00F5E535 /* JavenOperator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenOperator.h; sourceTree = "<group>"; };
191AEE7D1CBCEE6B00F5E535 /* JavenOperator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenOperator.m; sourceTree = "<group>"; }; 191AEE7D1CBCEE6B00F5E535 /* JavenOperator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenOperator.m; sourceTree = "<group>"; };
191AEE821CBCEE8C00F5E535 /* JavenHotTagsModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenHotTagsModel.h; sourceTree = "<group>"; }; 191AEE821CBCEE8C00F5E535 /* JavenHotTagsModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenHotTagsModel.h; sourceTree = "<group>"; };
...@@ -400,6 +405,8 @@ ...@@ -400,6 +405,8 @@
1940D3271C9A58150080678C /* BaseViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BaseViewController.m; sourceTree = "<group>"; }; 1940D3271C9A58150080678C /* BaseViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BaseViewController.m; sourceTree = "<group>"; };
1946DC981CB7542D00AC6557 /* CatgoryModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CatgoryModel.h; sourceTree = "<group>"; }; 1946DC981CB7542D00AC6557 /* CatgoryModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CatgoryModel.h; sourceTree = "<group>"; };
1946DC991CB7542D00AC6557 /* CatgoryModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CatgoryModel.m; sourceTree = "<group>"; }; 1946DC991CB7542D00AC6557 /* CatgoryModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CatgoryModel.m; sourceTree = "<group>"; };
194CB5371CD8AA4A0050E59F /* JavenQNManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenQNManager.h; sourceTree = "<group>"; };
194CB5381CD8AA4A0050E59F /* JavenQNManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenQNManager.m; sourceTree = "<group>"; };
195EB1D81CA516CE00E298BB /* HotCommodityCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HotCommodityCell.h; sourceTree = "<group>"; }; 195EB1D81CA516CE00E298BB /* HotCommodityCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HotCommodityCell.h; sourceTree = "<group>"; };
195EB1D91CA516CE00E298BB /* HotCommodityCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HotCommodityCell.m; sourceTree = "<group>"; }; 195EB1D91CA516CE00E298BB /* HotCommodityCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HotCommodityCell.m; sourceTree = "<group>"; };
195EB1DA1CA516CE00E298BB /* HotCommodityCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = HotCommodityCell.xib; sourceTree = "<group>"; }; 195EB1DA1CA516CE00E298BB /* HotCommodityCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = HotCommodityCell.xib; sourceTree = "<group>"; };
...@@ -445,6 +452,26 @@ ...@@ -445,6 +452,26 @@
1979754C1CAB6E1300407E3F /* JavenMultipleViewWithHeader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenMultipleViewWithHeader.m; sourceTree = "<group>"; }; 1979754C1CAB6E1300407E3F /* JavenMultipleViewWithHeader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenMultipleViewWithHeader.m; sourceTree = "<group>"; };
1979754F1CAB6F5D00407E3F /* OrderViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OrderViewController.h; sourceTree = "<group>"; }; 1979754F1CAB6F5D00407E3F /* OrderViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OrderViewController.h; sourceTree = "<group>"; };
197975501CAB6F5D00407E3F /* OrderViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OrderViewController.m; sourceTree = "<group>"; }; 197975501CAB6F5D00407E3F /* OrderViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OrderViewController.m; sourceTree = "<group>"; };
197BA66B1CD85122000E2087 /* JavenCertificate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenCertificate.h; sourceTree = "<group>"; };
197BA66C1CD85122000E2087 /* JavenCertificate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenCertificate.m; sourceTree = "<group>"; };
197BA66E1CD8515D000E2087 /* JavenCreateInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenCreateInfo.h; sourceTree = "<group>"; };
197BA66F1CD8515D000E2087 /* JavenCreateInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenCreateInfo.m; sourceTree = "<group>"; };
197BA6711CD8516B000E2087 /* JavenIdCard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenIdCard.h; sourceTree = "<group>"; };
197BA6721CD8516B000E2087 /* JavenIdCard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenIdCard.m; sourceTree = "<group>"; };
197BA6741CD8518A000E2087 /* JavenLastModifyInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenLastModifyInfo.h; sourceTree = "<group>"; };
197BA6751CD8518A000E2087 /* JavenLastModifyInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenLastModifyInfo.m; sourceTree = "<group>"; };
197BA6771CD85196000E2087 /* JavenLoginControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenLoginControl.h; sourceTree = "<group>"; };
197BA6781CD85196000E2087 /* JavenLoginControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenLoginControl.m; sourceTree = "<group>"; };
197BA67A1CD851BA000E2087 /* JavenOwnerOrg.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenOwnerOrg.h; sourceTree = "<group>"; };
197BA67B1CD851BA000E2087 /* JavenOwnerOrg.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenOwnerOrg.m; sourceTree = "<group>"; };
197BA67C1CD851BA000E2087 /* JavenPasswordControl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenPasswordControl.h; sourceTree = "<group>"; };
197BA67D1CD851BA000E2087 /* JavenPasswordControl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenPasswordControl.m; sourceTree = "<group>"; };
197BA6801CD851DB000E2087 /* JavenDetailReseller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavenDetailReseller.h; sourceTree = "<group>"; };
197BA6811CD851DB000E2087 /* JavenDetailReseller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavenDetailReseller.m; sourceTree = "<group>"; };
197BA6831CD85632000E2087 /* NSNumber+Fommater.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSNumber+Fommater.h"; sourceTree = "<group>"; };
197BA6841CD85632000E2087 /* NSNumber+Fommater.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSNumber+Fommater.m"; sourceTree = "<group>"; };
197BA6871CD865D1000E2087 /* JavencommissionAccountModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JavencommissionAccountModel.h; sourceTree = "<group>"; };
197BA6881CD865D1000E2087 /* JavencommissionAccountModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JavencommissionAccountModel.m; sourceTree = "<group>"; };
199B4D661CABBCF600451E0E /* OrderDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OrderDetailViewController.h; sourceTree = "<group>"; }; 199B4D661CABBCF600451E0E /* OrderDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OrderDetailViewController.h; sourceTree = "<group>"; };
199B4D671CABBCF600451E0E /* OrderDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OrderDetailViewController.m; sourceTree = "<group>"; }; 199B4D671CABBCF600451E0E /* OrderDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OrderDetailViewController.m; sourceTree = "<group>"; };
199B4D691CABBEF400451E0E /* OrderDetailTopView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = OrderDetailTopView.xib; sourceTree = "<group>"; }; 199B4D691CABBEF400451E0E /* OrderDetailTopView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = OrderDetailTopView.xib; sourceTree = "<group>"; };
...@@ -891,18 +918,28 @@ ...@@ -891,18 +918,28 @@
191AEE651CBCEB7B00F5E535 /* ModelsFiles */ = { 191AEE651CBCEB7B00F5E535 /* ModelsFiles */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
1912FCD51CCDC945004CF976 /* JavenReseller.h */,
1912FCD61CCDC945004CF976 /* JavenReseller.m */,
191AEE761CBCEE6B00F5E535 /* JavenCategory.h */, 191AEE761CBCEE6B00F5E535 /* JavenCategory.h */,
191AEE771CBCEE6B00F5E535 /* JavenCategory.m */, 191AEE771CBCEE6B00F5E535 /* JavenCategory.m */,
191AEE781CBCEE6B00F5E535 /* JavenCreateInfo.h */, 197BA66B1CD85122000E2087 /* JavenCertificate.h */,
191AEE791CBCEE6B00F5E535 /* JavenCreateInfo.m */, 197BA66C1CD85122000E2087 /* JavenCertificate.m */,
191AEE7A1CBCEE6B00F5E535 /* JavenLastModifyInfo.h */, 197BA66E1CD8515D000E2087 /* JavenCreateInfo.h */,
191AEE7B1CBCEE6B00F5E535 /* JavenLastModifyInfo.m */, 197BA66F1CD8515D000E2087 /* JavenCreateInfo.m */,
197BA6711CD8516B000E2087 /* JavenIdCard.h */,
197BA6721CD8516B000E2087 /* JavenIdCard.m */,
197BA6741CD8518A000E2087 /* JavenLastModifyInfo.h */,
197BA6751CD8518A000E2087 /* JavenLastModifyInfo.m */,
197BA6771CD85196000E2087 /* JavenLoginControl.h */,
197BA6781CD85196000E2087 /* JavenLoginControl.m */,
191AEE7C1CBCEE6B00F5E535 /* JavenOperator.h */, 191AEE7C1CBCEE6B00F5E535 /* JavenOperator.h */,
191AEE7D1CBCEE6B00F5E535 /* JavenOperator.m */, 191AEE7D1CBCEE6B00F5E535 /* JavenOperator.m */,
192861001CBF825100FA6E85 /* JavenOwner.h */, 192861001CBF825100FA6E85 /* JavenOwner.h */,
192861011CBF825100FA6E85 /* JavenOwner.m */, 192861011CBF825100FA6E85 /* JavenOwner.m */,
197BA67A1CD851BA000E2087 /* JavenOwnerOrg.h */,
197BA67B1CD851BA000E2087 /* JavenOwnerOrg.m */,
197BA67C1CD851BA000E2087 /* JavenPasswordControl.h */,
197BA67D1CD851BA000E2087 /* JavenPasswordControl.m */,
1912FCD51CCDC945004CF976 /* JavenReseller.h */,
1912FCD61CCDC945004CF976 /* JavenReseller.m */,
192861021CBF825100FA6E85 /* JavenShop.h */, 192861021CBF825100FA6E85 /* JavenShop.h */,
192861031CBF825100FA6E85 /* JavenShop.m */, 192861031CBF825100FA6E85 /* JavenShop.m */,
); );
...@@ -1276,6 +1313,8 @@ ...@@ -1276,6 +1313,8 @@
191AEE181CBB83EF00F5E535 /* UserInfo.m */, 191AEE181CBB83EF00F5E535 /* UserInfo.m */,
19DC6B371CC0DB490064A9FD /* JavenSortView.h */, 19DC6B371CC0DB490064A9FD /* JavenSortView.h */,
19DC6B381CC0DB490064A9FD /* JavenSortView.m */, 19DC6B381CC0DB490064A9FD /* JavenSortView.m */,
194CB5371CD8AA4A0050E59F /* JavenQNManager.h */,
194CB5381CD8AA4A0050E59F /* JavenQNManager.m */,
); );
path = Global; path = Global;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1448,6 +1487,10 @@ ...@@ -1448,6 +1487,10 @@
19DC6B301CC0D5330064A9FD /* CustomerManagement */, 19DC6B301CC0D5330064A9FD /* CustomerManagement */,
19DC6AFA1CBF867E0064A9FD /* JavenShopModel.h */, 19DC6AFA1CBF867E0064A9FD /* JavenShopModel.h */,
19DC6AFB1CBF867E0064A9FD /* JavenShopModel.m */, 19DC6AFB1CBF867E0064A9FD /* JavenShopModel.m */,
197BA6801CD851DB000E2087 /* JavenDetailReseller.h */,
197BA6811CD851DB000E2087 /* JavenDetailReseller.m */,
197BA6871CD865D1000E2087 /* JavencommissionAccountModel.h */,
197BA6881CD865D1000E2087 /* JavencommissionAccountModel.m */,
1900A3441CB6305100B2B7C4 /* Commodity */, 1900A3441CB6305100B2B7C4 /* Commodity */,
1900A3451CB6305100B2B7C4 /* CommodityManagement */, 1900A3451CB6305100B2B7C4 /* CommodityManagement */,
1900A3461CB6305100B2B7C4 /* Order */, 1900A3461CB6305100B2B7C4 /* Order */,
...@@ -1491,8 +1534,8 @@ ...@@ -1491,8 +1534,8 @@
1979752B1CA90D3900407E3F /* CommodityManagement */, 1979752B1CA90D3900407E3F /* CommodityManagement */,
199BC79F1C9AA7DF00E4E0B8 /* HomeViewController.h */, 199BC79F1C9AA7DF00E4E0B8 /* HomeViewController.h */,
199BC7A01C9AA7DF00E4E0B8 /* HomeViewController.m */, 199BC7A01C9AA7DF00E4E0B8 /* HomeViewController.m */,
1929F18D1CA10C94000E9B26 /* HomeCollectionViewController.m */,
1929F18C1CA10C94000E9B26 /* HomeCollectionViewController.h */, 1929F18C1CA10C94000E9B26 /* HomeCollectionViewController.h */,
1929F18D1CA10C94000E9B26 /* HomeCollectionViewController.m */,
); );
path = ViewController; path = ViewController;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1734,6 +1777,8 @@ ...@@ -1734,6 +1777,8 @@
199B4D731CABE4B300451E0E /* NSString+Category.m */, 199B4D731CABE4B300451E0E /* NSString+Category.m */,
192860FD1CBF708C00FA6E85 /* MBProgressHUD+Javen.h */, 192860FD1CBF708C00FA6E85 /* MBProgressHUD+Javen.h */,
192860FE1CBF708C00FA6E85 /* MBProgressHUD+Javen.m */, 192860FE1CBF708C00FA6E85 /* MBProgressHUD+Javen.m */,
197BA6831CD85632000E2087 /* NSNumber+Fommater.h */,
197BA6841CD85632000E2087 /* NSNumber+Fommater.m */,
); );
path = Categories; path = Categories;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2090,6 +2135,7 @@ ...@@ -2090,6 +2135,7 @@
19DCCBD91C9AA0450072C3BF /* IBTTextFieldCell.m in Sources */, 19DCCBD91C9AA0450072C3BF /* IBTTextFieldCell.m in Sources */,
19DC6B391CC0DB490064A9FD /* JavenSortView.m in Sources */, 19DC6B391CC0DB490064A9FD /* JavenSortView.m in Sources */,
19DCCB741C9A9EB30072C3BF /* IBTUISearchBar.m in Sources */, 19DCCB741C9A9EB30072C3BF /* IBTUISearchBar.m in Sources */,
197BA6761CD8518A000E2087 /* JavenLastModifyInfo.m in Sources */,
192861041CBF825100FA6E85 /* JavenOwner.m in Sources */, 192861041CBF825100FA6E85 /* JavenOwner.m in Sources */,
19DCCBDB1C9AA0450072C3BF /* GXFButtonAndLineView.m in Sources */, 19DCCBDB1C9AA0450072C3BF /* GXFButtonAndLineView.m in Sources */,
19DC6AFC1CBF867E0064A9FD /* JavenShopModel.m in Sources */, 19DC6AFC1CBF867E0064A9FD /* JavenShopModel.m in Sources */,
...@@ -2108,11 +2154,13 @@ ...@@ -2108,11 +2154,13 @@
19DCCB5D1C9A9EB30072C3BF /* IBTImagePicker.m in Sources */, 19DCCB5D1C9A9EB30072C3BF /* IBTImagePicker.m in Sources */,
19D906B61CC86DA300CD42DC /* SettingViewController.m in Sources */, 19D906B61CC86DA300CD42DC /* SettingViewController.m in Sources */,
19DCCBCB1C9AA0450072C3BF /* UIApplication+CheckFirstRun.m in Sources */, 19DCCBCB1C9AA0450072C3BF /* UIApplication+CheckFirstRun.m in Sources */,
197BA67E1CD851BA000E2087 /* JavenOwnerOrg.m in Sources */,
19DCCBD01C9AA0450072C3BF /* UIImage+WaterMark.m in Sources */, 19DCCBD01C9AA0450072C3BF /* UIImage+WaterMark.m in Sources */,
19DCCB761C9A9EB30072C3BF /* IBTUIView.m in Sources */, 19DCCB761C9A9EB30072C3BF /* IBTUIView.m in Sources */,
191AEE191CBB83EF00F5E535 /* UserInfo.m in Sources */, 191AEE191CBB83EF00F5E535 /* UserInfo.m in Sources */,
192860FF1CBF708C00FA6E85 /* MBProgressHUD+Javen.m in Sources */, 192860FF1CBF708C00FA6E85 /* MBProgressHUD+Javen.m in Sources */,
192861051CBF825100FA6E85 /* JavenShop.m in Sources */, 192861051CBF825100FA6E85 /* JavenShop.m in Sources */,
197BA6731CD8516B000E2087 /* JavenIdCard.m in Sources */,
191AEE161CBB818600F5E535 /* UserInfoShop.m in Sources */, 191AEE161CBB818600F5E535 /* UserInfoShop.m in Sources */,
19DC6B191CC0B5690064A9FD /* MyTeamCollectionViewCell.m in Sources */, 19DC6B191CC0B5690064A9FD /* MyTeamCollectionViewCell.m in Sources */,
19DCCB691C9A9EB30072C3BF /* IBTObject.m in Sources */, 19DCCB691C9A9EB30072C3BF /* IBTObject.m in Sources */,
...@@ -2123,6 +2171,7 @@ ...@@ -2123,6 +2171,7 @@
1900A3411CB6059000B2B7C4 /* introductionViewController.m in Sources */, 1900A3411CB6059000B2B7C4 /* introductionViewController.m in Sources */,
19D906C61CC8A21700CD42DC /* OrderDetailBottomView.m in Sources */, 19D906C61CC8A21700CD42DC /* OrderDetailBottomView.m in Sources */,
19ADD3771CA4D19F00EE6E5A /* AddCommodityViewController.m in Sources */, 19ADD3771CA4D19F00EE6E5A /* AddCommodityViewController.m in Sources */,
197BA66D1CD85122000E2087 /* JavenCertificate.m in Sources */,
199B4D6D1CABBF0800451E0E /* OrderDetailTopView.m in Sources */, 199B4D6D1CABBF0800451E0E /* OrderDetailTopView.m in Sources */,
19DCCBC71C9AA0450072C3BF /* NSDate+FormatterAdditions.m in Sources */, 19DCCBC71C9AA0450072C3BF /* NSDate+FormatterAdditions.m in Sources */,
19DCCB6F1C9A9EB30072C3BF /* IBTUIButton.m in Sources */, 19DCCB6F1C9A9EB30072C3BF /* IBTUIButton.m in Sources */,
...@@ -2149,11 +2198,14 @@ ...@@ -2149,11 +2198,14 @@
1912FD031CD0907D004CF976 /* MoreHotTagViewController.m in Sources */, 1912FD031CD0907D004CF976 /* MoreHotTagViewController.m in Sources */,
1912FCDA1CCDC955004CF976 /* JavenResellerModel.m in Sources */, 1912FCDA1CCDC955004CF976 /* JavenResellerModel.m in Sources */,
191AEE121CBB818600F5E535 /* UserInfoLastModifyInfo.m in Sources */, 191AEE121CBB818600F5E535 /* UserInfoLastModifyInfo.m in Sources */,
194CB5391CD8AA4A0050E59F /* JavenQNManager.m in Sources */,
191AEE5E1CBCC6D100F5E535 /* Conditions.m in Sources */, 191AEE5E1CBCC6D100F5E535 /* Conditions.m in Sources */,
1979753A1CA9260C00407E3F /* CommodityManagementSortView.m in Sources */, 1979753A1CA9260C00407E3F /* CommodityManagementSortView.m in Sources */,
19DCCB701C9A9EB30072C3BF /* IBTUIControl.m in Sources */, 19DCCB701C9A9EB30072C3BF /* IBTUIControl.m in Sources */,
199B4D8C1CAE688400451E0E /* SeeLogistics.m in Sources */, 199B4D8C1CAE688400451E0E /* SeeLogistics.m in Sources */,
197BA67F1CD851BA000E2087 /* JavenPasswordControl.m in Sources */,
19DCCBC61C9AA0450072C3BF /* NSData+EncodeAdditions.m in Sources */, 19DCCBC61C9AA0450072C3BF /* NSData+EncodeAdditions.m in Sources */,
197BA6791CD85196000E2087 /* JavenLoginControl.m in Sources */,
19DCCBD31C9AA0450072C3BF /* UIScrollView+Content.m in Sources */, 19DCCBD31C9AA0450072C3BF /* UIScrollView+Content.m in Sources */,
197975271CA8FAE500407E3F /* CommodityDetailTopView.m in Sources */, 197975271CA8FAE500407E3F /* CommodityDetailTopView.m in Sources */,
197975221CA8DA8200407E3F /* CommodityDetailViewController.m in Sources */, 197975221CA8DA8200407E3F /* CommodityDetailViewController.m in Sources */,
...@@ -2161,8 +2213,8 @@ ...@@ -2161,8 +2213,8 @@
191AEE5C1CBCC6D100F5E535 /* addCommodityRequestModel.m in Sources */, 191AEE5C1CBCC6D100F5E535 /* addCommodityRequestModel.m in Sources */,
19632DAE1CB38FFC0024A8A1 /* HTTPCilent.m in Sources */, 19632DAE1CB38FFC0024A8A1 /* HTTPCilent.m in Sources */,
19DCCB6D1C9A9EB30072C3BF /* IBTTableView.m in Sources */, 19DCCB6D1C9A9EB30072C3BF /* IBTTableView.m in Sources */,
191AEE7F1CBCEE6B00F5E535 /* JavenCreateInfo.m in Sources */,
19DCCB731C9A9EB30072C3BF /* IBTUIScrollView.m in Sources */, 19DCCB731C9A9EB30072C3BF /* IBTUIScrollView.m in Sources */,
197BA6851CD85632000E2087 /* NSNumber+Fommater.m in Sources */,
199BC7D91C9BBE1A00E4E0B8 /* MassageViewController.m in Sources */, 199BC7D91C9BBE1A00E4E0B8 /* MassageViewController.m in Sources */,
1979754D1CAB6E1300407E3F /* JavenMultipleViewWithHeader.m in Sources */, 1979754D1CAB6E1300407E3F /* JavenMultipleViewWithHeader.m in Sources */,
19DCCBCE1C9AA0450072C3BF /* UIImage+Fit.m in Sources */, 19DCCBCE1C9AA0450072C3BF /* UIImage+Fit.m in Sources */,
...@@ -2194,13 +2246,16 @@ ...@@ -2194,13 +2246,16 @@
191AEE631CBCC6D100F5E535 /* Parameter.m in Sources */, 191AEE631CBCC6D100F5E535 /* Parameter.m in Sources */,
191AEE151CBB818600F5E535 /* UserInfoPasswordControl.m in Sources */, 191AEE151CBB818600F5E535 /* UserInfoPasswordControl.m in Sources */,
19DCCBD61C9AA0450072C3BF /* UIView+FindUIViewController.m in Sources */, 19DCCBD61C9AA0450072C3BF /* UIView+FindUIViewController.m in Sources */,
197BA6821CD851DB000E2087 /* JavenDetailReseller.m in Sources */,
199BC7A11C9AA7DF00E4E0B8 /* HomeViewController.m in Sources */, 199BC7A11C9AA7DF00E4E0B8 /* HomeViewController.m in Sources */,
19632DA41CB350F80024A8A1 /* StoreQRCodeViewController.m in Sources */, 19632DA41CB350F80024A8A1 /* StoreQRCodeViewController.m in Sources */,
197BA6891CD865D1000E2087 /* JavencommissionAccountModel.m in Sources */,
197975451CAA2FAB00407E3F /* ManagementViewController.m in Sources */, 197975451CAA2FAB00407E3F /* ManagementViewController.m in Sources */,
1912FCFB1CD08166004CF976 /* CommotityListBrand.m in Sources */, 1912FCFB1CD08166004CF976 /* CommotityListBrand.m in Sources */,
19DCCBF01C9AA1D50072C3BF /* GTOCommonTools.m in Sources */, 19DCCBF01C9AA1D50072C3BF /* GTOCommonTools.m in Sources */,
19DCCBF11C9AA1D50072C3BF /* ICRUserUtil.m in Sources */, 19DCCBF11C9AA1D50072C3BF /* ICRUserUtil.m in Sources */,
19DCCB6C1C9A9EB30072C3BF /* IBTTabBarController.m in Sources */, 19DCCB6C1C9A9EB30072C3BF /* IBTTabBarController.m in Sources */,
197BA6701CD8515D000E2087 /* JavenCreateInfo.m in Sources */,
19632DB11CB39B190024A8A1 /* SelectPhotoView.m in Sources */, 19632DB11CB39B190024A8A1 /* SelectPhotoView.m in Sources */,
19DCCB621C9A9EB30072C3BF /* IBTTableViewInfo.m in Sources */, 19DCCB621C9A9EB30072C3BF /* IBTTableViewInfo.m in Sources */,
19ADD38E1CA4EC1000EE6E5A /* AddCommodityHeaderCollectionReusableView.m in Sources */, 19ADD38E1CA4EC1000EE6E5A /* AddCommodityHeaderCollectionReusableView.m in Sources */,
...@@ -2225,7 +2280,6 @@ ...@@ -2225,7 +2280,6 @@
19DCCB6E1C9A9EB30072C3BF /* IBTTableViewCell.m in Sources */, 19DCCB6E1C9A9EB30072C3BF /* IBTTableViewCell.m in Sources */,
1929F16D1C9FCB62000E9B26 /* NSDictionary+Category.m in Sources */, 1929F16D1C9FCB62000E9B26 /* NSDictionary+Category.m in Sources */,
19ADD37E1CA4D38B00EE6E5A /* CommodityListCollectionViewCell.m in Sources */, 19ADD37E1CA4D38B00EE6E5A /* CommodityListCollectionViewCell.m in Sources */,
191AEE801CBCEE6B00F5E535 /* JavenLastModifyInfo.m in Sources */,
19DCCBDC1C9AA0450072C3BF /* IBTDatePickerViewController.m in Sources */, 19DCCBDC1C9AA0450072C3BF /* IBTDatePickerViewController.m in Sources */,
19DCCB781C9A9EB30072C3BF /* IBTWebProgressBar.m in Sources */, 19DCCB781C9A9EB30072C3BF /* IBTWebProgressBar.m in Sources */,
19DCCBFE1C9AA2A90072C3BF /* ICRDataBaseController.m in Sources */, 19DCCBFE1C9AA2A90072C3BF /* ICRDataBaseController.m in Sources */,
......
//
// JavenDetailReseller.h
//
// Created by Z on 16/5/3
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
@class JavenOwnerOrg, JavenLastModifyInfo, JavenCertificate, JavenPasswordControl, JavenIdCard, JavenShop, JavenCreateInfo, JavenLoginControl;
@interface JavenDetailReseller : NSObject <NSCoding, NSCopying>
@property (nonatomic, assign) id birthday;
@property (nonatomic, assign) id portrait;
@property (nonatomic, strong) JavenOwnerOrg *ownerOrg;
@property (nonatomic, strong) NSString *code;
@property (nonatomic, assign) id telephone;
@property (nonatomic, strong) NSString *mobilephone;
@property (nonatomic, strong) NSString *uuid;
@property (nonatomic, strong) JavenLastModifyInfo *lastModifyInfo;
@property (nonatomic, assign) id socialContact;
@property (nonatomic, strong) JavenCertificate *certificate;
@property (nonatomic, assign) double version;
@property (nonatomic, strong) NSString *name;
@property (nonatomic, strong) NSString *invitationCode;
@property (nonatomic, strong) NSString *state;
@property (nonatomic, strong) NSString *domain;
@property (nonatomic, strong) JavenPasswordControl *passwordControl;
@property (nonatomic, strong) NSString *gender;
@property (nonatomic, strong) NSArray *roles;
@property (nonatomic, assign) id postalAddresses;
@property (nonatomic, strong) JavenIdCard *idCard;
@property (nonatomic, assign) id referrer;
@property (nonatomic, strong) JavenShop *shop;
@property (nonatomic, strong) JavenCreateInfo *createInfo;
@property (nonatomic, assign) double order;
@property (nonatomic, strong) JavenLoginControl *loginControl;
@property (nonatomic, strong) NSString *internalBaseClassDescription;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
- (NSDictionary *)dictionaryRepresentation;
@end
//
// JavenDetailReseller.m
//
// Created by Z on 16/5/3
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import "JavenDetailReseller.h"
#import "JavenOwnerOrg.h"
#import "JavenLastModifyInfo.h"
#import "JavenCertificate.h"
#import "JavenPasswordControl.h"
#import "JavenIdCard.h"
#import "JavenShop.h"
#import "JavenCreateInfo.h"
#import "JavenLoginControl.h"
NSString *const kJavenDetailResellerBirthday = @"birthday";
NSString *const kJavenDetailResellerPortrait = @"portrait";
NSString *const kJavenDetailResellerOwnerOrg = @"ownerOrg";
NSString *const kJavenDetailResellerCode = @"code";
NSString *const kJavenDetailResellerTelephone = @"telephone";
NSString *const kJavenDetailResellerMobilephone = @"mobilephone";
NSString *const kJavenDetailResellerUuid = @"uuid";
NSString *const kJavenDetailResellerLastModifyInfo = @"lastModifyInfo";
NSString *const kJavenDetailResellerSocialContact = @"socialContact";
NSString *const kJavenDetailResellerCertificate = @"certificate";
NSString *const kJavenDetailResellerVersion = @"version";
NSString *const kJavenDetailResellerName = @"name";
NSString *const kJavenDetailResellerInvitationCode = @"invitationCode";
NSString *const kJavenDetailResellerState = @"state";
NSString *const kJavenDetailResellerDomain = @"domain";
NSString *const kJavenDetailResellerPasswordControl = @"passwordControl";
NSString *const kJavenDetailResellerGender = @"gender";
NSString *const kJavenDetailResellerRoles = @"roles";
NSString *const kJavenDetailResellerPostalAddresses = @"postalAddresses";
NSString *const kJavenDetailResellerIdCard = @"idCard";
NSString *const kJavenDetailResellerReferrer = @"referrer";
NSString *const kJavenDetailResellerShop = @"shop";
NSString *const kJavenDetailResellerCreateInfo = @"createInfo";
NSString *const kJavenDetailResellerOrder = @"order";
NSString *const kJavenDetailResellerLoginControl = @"loginControl";
NSString *const kJavenDetailResellerDescription = @"description";
@interface JavenDetailReseller ()
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
@end
@implementation JavenDetailReseller
@synthesize birthday = _birthday;
@synthesize portrait = _portrait;
@synthesize ownerOrg = _ownerOrg;
@synthesize code = _code;
@synthesize telephone = _telephone;
@synthesize mobilephone = _mobilephone;
@synthesize uuid = _uuid;
@synthesize lastModifyInfo = _lastModifyInfo;
@synthesize socialContact = _socialContact;
@synthesize certificate = _certificate;
@synthesize version = _version;
@synthesize name = _name;
@synthesize invitationCode = _invitationCode;
@synthesize state = _state;
@synthesize domain = _domain;
@synthesize passwordControl = _passwordControl;
@synthesize gender = _gender;
@synthesize roles = _roles;
@synthesize postalAddresses = _postalAddresses;
@synthesize idCard = _idCard;
@synthesize referrer = _referrer;
@synthesize shop = _shop;
@synthesize createInfo = _createInfo;
@synthesize order = _order;
@synthesize loginControl = _loginControl;
@synthesize internalBaseClassDescription = _internalBaseClassDescription;
+ (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.birthday = [self objectOrNilForKey:kJavenDetailResellerBirthday fromDictionary:dict];
self.portrait = [self objectOrNilForKey:kJavenDetailResellerPortrait fromDictionary:dict];
self.ownerOrg = [JavenOwnerOrg modelObjectWithDictionary:[dict objectForKey:kJavenDetailResellerOwnerOrg]];
self.code = [self objectOrNilForKey:kJavenDetailResellerCode fromDictionary:dict];
self.telephone = [self objectOrNilForKey:kJavenDetailResellerTelephone fromDictionary:dict];
self.mobilephone = [self objectOrNilForKey:kJavenDetailResellerMobilephone fromDictionary:dict];
self.uuid = [self objectOrNilForKey:kJavenDetailResellerUuid fromDictionary:dict];
self.lastModifyInfo = [JavenLastModifyInfo modelObjectWithDictionary:[dict objectForKey:kJavenDetailResellerLastModifyInfo]];
self.socialContact = [self objectOrNilForKey:kJavenDetailResellerSocialContact fromDictionary:dict];
self.certificate = [JavenCertificate modelObjectWithDictionary:[dict objectForKey:kJavenDetailResellerCertificate]];
self.version = [[self objectOrNilForKey:kJavenDetailResellerVersion fromDictionary:dict] doubleValue];
self.name = [self objectOrNilForKey:kJavenDetailResellerName fromDictionary:dict];
self.invitationCode = [self objectOrNilForKey:kJavenDetailResellerInvitationCode fromDictionary:dict];
self.state = [self objectOrNilForKey:kJavenDetailResellerState fromDictionary:dict];
self.domain = [self objectOrNilForKey:kJavenDetailResellerDomain fromDictionary:dict];
self.passwordControl = [JavenPasswordControl modelObjectWithDictionary:[dict objectForKey:kJavenDetailResellerPasswordControl]];
self.gender = [self objectOrNilForKey:kJavenDetailResellerGender fromDictionary:dict];
self.roles = [self objectOrNilForKey:kJavenDetailResellerRoles fromDictionary:dict];
self.postalAddresses = [self objectOrNilForKey:kJavenDetailResellerPostalAddresses fromDictionary:dict];
self.idCard = [JavenIdCard modelObjectWithDictionary:[dict objectForKey:kJavenDetailResellerIdCard]];
self.referrer = [self objectOrNilForKey:kJavenDetailResellerReferrer fromDictionary:dict];
self.shop = [JavenShop modelObjectWithDictionary:[dict objectForKey:kJavenDetailResellerShop]];
self.createInfo = [JavenCreateInfo modelObjectWithDictionary:[dict objectForKey:kJavenDetailResellerCreateInfo]];
self.order = [[self objectOrNilForKey:kJavenDetailResellerOrder fromDictionary:dict] doubleValue];
self.loginControl = [JavenLoginControl modelObjectWithDictionary:[dict objectForKey:kJavenDetailResellerLoginControl]];
self.internalBaseClassDescription = [self objectOrNilForKey:kJavenDetailResellerDescription fromDictionary:dict];
}
return self;
}
- (NSDictionary *)dictionaryRepresentation
{
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:self.birthday forKey:kJavenDetailResellerBirthday];
[mutableDict setValue:self.portrait forKey:kJavenDetailResellerPortrait];
[mutableDict setValue:[self.ownerOrg dictionaryRepresentation] forKey:kJavenDetailResellerOwnerOrg];
[mutableDict setValue:self.code forKey:kJavenDetailResellerCode];
[mutableDict setValue:self.telephone forKey:kJavenDetailResellerTelephone];
[mutableDict setValue:self.mobilephone forKey:kJavenDetailResellerMobilephone];
[mutableDict setValue:self.uuid forKey:kJavenDetailResellerUuid];
[mutableDict setValue:[self.lastModifyInfo dictionaryRepresentation] forKey:kJavenDetailResellerLastModifyInfo];
[mutableDict setValue:self.socialContact forKey:kJavenDetailResellerSocialContact];
[mutableDict setValue:[self.certificate dictionaryRepresentation] forKey:kJavenDetailResellerCertificate];
[mutableDict setValue:[NSNumber numberWithDouble:self.version] forKey:kJavenDetailResellerVersion];
[mutableDict setValue:self.name forKey:kJavenDetailResellerName];
[mutableDict setValue:self.invitationCode forKey:kJavenDetailResellerInvitationCode];
[mutableDict setValue:self.state forKey:kJavenDetailResellerState];
[mutableDict setValue:self.domain forKey:kJavenDetailResellerDomain];
[mutableDict setValue:[self.passwordControl dictionaryRepresentation] forKey:kJavenDetailResellerPasswordControl];
[mutableDict setValue:self.gender forKey:kJavenDetailResellerGender];
NSMutableArray *tempArrayForRoles = [NSMutableArray array];
for (NSObject *subArrayObject in self.roles) {
if([subArrayObject respondsToSelector:@selector(dictionaryRepresentation)]) {
// This class is a model object
[tempArrayForRoles addObject:[subArrayObject performSelector:@selector(dictionaryRepresentation)]];
} else {
// Generic object
[tempArrayForRoles addObject:subArrayObject];
}
}
[mutableDict setValue:[NSArray arrayWithArray:tempArrayForRoles] forKey:kJavenDetailResellerRoles];
[mutableDict setValue:self.postalAddresses forKey:kJavenDetailResellerPostalAddresses];
[mutableDict setValue:[self.idCard dictionaryRepresentation] forKey:kJavenDetailResellerIdCard];
[mutableDict setValue:self.referrer forKey:kJavenDetailResellerReferrer];
[mutableDict setValue:[self.shop dictionaryRepresentation] forKey:kJavenDetailResellerShop];
[mutableDict setValue:[self.createInfo dictionaryRepresentation] forKey:kJavenDetailResellerCreateInfo];
[mutableDict setValue:[NSNumber numberWithDouble:self.order] forKey:kJavenDetailResellerOrder];
[mutableDict setValue:[self.loginControl dictionaryRepresentation] forKey:kJavenDetailResellerLoginControl];
[mutableDict setValue:self.internalBaseClassDescription forKey:kJavenDetailResellerDescription];
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.birthday = [aDecoder decodeObjectForKey:kJavenDetailResellerBirthday];
self.portrait = [aDecoder decodeObjectForKey:kJavenDetailResellerPortrait];
self.ownerOrg = [aDecoder decodeObjectForKey:kJavenDetailResellerOwnerOrg];
self.code = [aDecoder decodeObjectForKey:kJavenDetailResellerCode];
self.telephone = [aDecoder decodeObjectForKey:kJavenDetailResellerTelephone];
self.mobilephone = [aDecoder decodeObjectForKey:kJavenDetailResellerMobilephone];
self.uuid = [aDecoder decodeObjectForKey:kJavenDetailResellerUuid];
self.lastModifyInfo = [aDecoder decodeObjectForKey:kJavenDetailResellerLastModifyInfo];
self.socialContact = [aDecoder decodeObjectForKey:kJavenDetailResellerSocialContact];
self.certificate = [aDecoder decodeObjectForKey:kJavenDetailResellerCertificate];
self.version = [aDecoder decodeDoubleForKey:kJavenDetailResellerVersion];
self.name = [aDecoder decodeObjectForKey:kJavenDetailResellerName];
self.invitationCode = [aDecoder decodeObjectForKey:kJavenDetailResellerInvitationCode];
self.state = [aDecoder decodeObjectForKey:kJavenDetailResellerState];
self.domain = [aDecoder decodeObjectForKey:kJavenDetailResellerDomain];
self.passwordControl = [aDecoder decodeObjectForKey:kJavenDetailResellerPasswordControl];
self.gender = [aDecoder decodeObjectForKey:kJavenDetailResellerGender];
self.roles = [aDecoder decodeObjectForKey:kJavenDetailResellerRoles];
self.postalAddresses = [aDecoder decodeObjectForKey:kJavenDetailResellerPostalAddresses];
self.idCard = [aDecoder decodeObjectForKey:kJavenDetailResellerIdCard];
self.referrer = [aDecoder decodeObjectForKey:kJavenDetailResellerReferrer];
self.shop = [aDecoder decodeObjectForKey:kJavenDetailResellerShop];
self.createInfo = [aDecoder decodeObjectForKey:kJavenDetailResellerCreateInfo];
self.order = [aDecoder decodeDoubleForKey:kJavenDetailResellerOrder];
self.loginControl = [aDecoder decodeObjectForKey:kJavenDetailResellerLoginControl];
self.internalBaseClassDescription = [aDecoder decodeObjectForKey:kJavenDetailResellerDescription];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
[aCoder encodeObject:_birthday forKey:kJavenDetailResellerBirthday];
[aCoder encodeObject:_portrait forKey:kJavenDetailResellerPortrait];
[aCoder encodeObject:_ownerOrg forKey:kJavenDetailResellerOwnerOrg];
[aCoder encodeObject:_code forKey:kJavenDetailResellerCode];
[aCoder encodeObject:_telephone forKey:kJavenDetailResellerTelephone];
[aCoder encodeObject:_mobilephone forKey:kJavenDetailResellerMobilephone];
[aCoder encodeObject:_uuid forKey:kJavenDetailResellerUuid];
[aCoder encodeObject:_lastModifyInfo forKey:kJavenDetailResellerLastModifyInfo];
[aCoder encodeObject:_socialContact forKey:kJavenDetailResellerSocialContact];
[aCoder encodeObject:_certificate forKey:kJavenDetailResellerCertificate];
[aCoder encodeDouble:_version forKey:kJavenDetailResellerVersion];
[aCoder encodeObject:_name forKey:kJavenDetailResellerName];
[aCoder encodeObject:_invitationCode forKey:kJavenDetailResellerInvitationCode];
[aCoder encodeObject:_state forKey:kJavenDetailResellerState];
[aCoder encodeObject:_domain forKey:kJavenDetailResellerDomain];
[aCoder encodeObject:_passwordControl forKey:kJavenDetailResellerPasswordControl];
[aCoder encodeObject:_gender forKey:kJavenDetailResellerGender];
[aCoder encodeObject:_roles forKey:kJavenDetailResellerRoles];
[aCoder encodeObject:_postalAddresses forKey:kJavenDetailResellerPostalAddresses];
[aCoder encodeObject:_idCard forKey:kJavenDetailResellerIdCard];
[aCoder encodeObject:_referrer forKey:kJavenDetailResellerReferrer];
[aCoder encodeObject:_shop forKey:kJavenDetailResellerShop];
[aCoder encodeObject:_createInfo forKey:kJavenDetailResellerCreateInfo];
[aCoder encodeDouble:_order forKey:kJavenDetailResellerOrder];
[aCoder encodeObject:_loginControl forKey:kJavenDetailResellerLoginControl];
[aCoder encodeObject:_internalBaseClassDescription forKey:kJavenDetailResellerDescription];
}
- (id)copyWithZone:(NSZone *)zone
{
JavenDetailReseller *copy = [[JavenDetailReseller alloc] init];
if (copy) {
copy.birthday = [self.birthday copyWithZone:zone];
copy.portrait = [self.portrait copyWithZone:zone];
copy.ownerOrg = [self.ownerOrg copyWithZone:zone];
copy.code = [self.code copyWithZone:zone];
copy.telephone = [self.telephone copyWithZone:zone];
copy.mobilephone = [self.mobilephone copyWithZone:zone];
copy.uuid = [self.uuid copyWithZone:zone];
copy.lastModifyInfo = [self.lastModifyInfo copyWithZone:zone];
copy.socialContact = [self.socialContact copyWithZone:zone];
copy.certificate = [self.certificate copyWithZone:zone];
copy.version = self.version;
copy.name = [self.name copyWithZone:zone];
copy.invitationCode = [self.invitationCode copyWithZone:zone];
copy.state = [self.state copyWithZone:zone];
copy.domain = [self.domain copyWithZone:zone];
copy.passwordControl = [self.passwordControl copyWithZone:zone];
copy.gender = [self.gender copyWithZone:zone];
copy.roles = [self.roles copyWithZone:zone];
copy.postalAddresses = [self.postalAddresses copyWithZone:zone];
copy.idCard = [self.idCard copyWithZone:zone];
copy.referrer = [self.referrer copyWithZone:zone];
copy.shop = [self.shop copyWithZone:zone];
copy.createInfo = [self.createInfo copyWithZone:zone];
copy.order = self.order;
copy.loginControl = [self.loginControl copyWithZone:zone];
copy.internalBaseClassDescription = [self.internalBaseClassDescription copyWithZone:zone];
}
return copy;
}
@end
//
// JavencommissionAccountModel.h
//
// Created by Z on 16/5/3
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
@class JavenReseller;
@interface JavencommissionAccountModel : NSObject <NSCoding, NSCopying>
@property (nonatomic, assign) double balance;
@property (nonatomic, assign) double monthlyOrderCount;
@property (nonatomic, assign) double monthlySales;
@property (nonatomic, strong) JavenReseller *reseller;
@property (nonatomic, strong) NSString *uuid;
@property (nonatomic, assign) double accumulatedIncome;
@property (nonatomic, assign) double monthlyIncome;
@property (nonatomic, assign) double unconfirmedBalance;
@property (nonatomic, assign) double withdrawAmount;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
- (NSDictionary *)dictionaryRepresentation;
@end
//
// JavencommissionAccountModel.m
//
// Created by Z on 16/5/3
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import "JavencommissionAccountModel.h"
#import "JavenReseller.h"
NSString *const kJavencommissionAccountModelBalance = @"balance";
NSString *const kJavencommissionAccountModelMonthlyOrderCount = @"monthlyOrderCount";
NSString *const kJavencommissionAccountModelMonthlySales = @"monthlySales";
NSString *const kJavencommissionAccountModelReseller = @"reseller";
NSString *const kJavencommissionAccountModelUuid = @"uuid";
NSString *const kJavencommissionAccountModelAccumulatedIncome = @"accumulatedIncome";
NSString *const kJavencommissionAccountModelMonthlyIncome = @"monthlyIncome";
NSString *const kJavencommissionAccountModelUnconfirmedBalance = @"unconfirmedBalance";
NSString *const kJavencommissionAccountModelWithdrawAmount = @"withdrawAmount";
@interface JavencommissionAccountModel ()
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
@end
@implementation JavencommissionAccountModel
@synthesize balance = _balance;
@synthesize monthlyOrderCount = _monthlyOrderCount;
@synthesize monthlySales = _monthlySales;
@synthesize reseller = _reseller;
@synthesize uuid = _uuid;
@synthesize accumulatedIncome = _accumulatedIncome;
@synthesize monthlyIncome = _monthlyIncome;
@synthesize unconfirmedBalance = _unconfirmedBalance;
@synthesize withdrawAmount = _withdrawAmount;
+ (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.balance = [[self objectOrNilForKey:kJavencommissionAccountModelBalance fromDictionary:dict] doubleValue];
self.monthlyOrderCount = [[self objectOrNilForKey:kJavencommissionAccountModelMonthlyOrderCount fromDictionary:dict] doubleValue];
self.monthlySales = [[self objectOrNilForKey:kJavencommissionAccountModelMonthlySales fromDictionary:dict] doubleValue];
self.reseller = [JavenReseller modelObjectWithDictionary:[dict objectForKey:kJavencommissionAccountModelReseller]];
self.uuid = [self objectOrNilForKey:kJavencommissionAccountModelUuid fromDictionary:dict];
self.accumulatedIncome = [[self objectOrNilForKey:kJavencommissionAccountModelAccumulatedIncome fromDictionary:dict] doubleValue];
self.monthlyIncome = [[self objectOrNilForKey:kJavencommissionAccountModelMonthlyIncome fromDictionary:dict] doubleValue];
self.unconfirmedBalance = [[self objectOrNilForKey:kJavencommissionAccountModelUnconfirmedBalance fromDictionary:dict] doubleValue];
self.withdrawAmount = [[self objectOrNilForKey:kJavencommissionAccountModelWithdrawAmount fromDictionary:dict] doubleValue];
}
return self;
}
- (NSDictionary *)dictionaryRepresentation
{
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:[NSNumber numberWithDouble:self.balance] forKey:kJavencommissionAccountModelBalance];
[mutableDict setValue:[NSNumber numberWithDouble:self.monthlyOrderCount] forKey:kJavencommissionAccountModelMonthlyOrderCount];
[mutableDict setValue:[NSNumber numberWithDouble:self.monthlySales] forKey:kJavencommissionAccountModelMonthlySales];
[mutableDict setValue:[self.reseller dictionaryRepresentation] forKey:kJavencommissionAccountModelReseller];
[mutableDict setValue:self.uuid forKey:kJavencommissionAccountModelUuid];
[mutableDict setValue:[NSNumber numberWithDouble:self.accumulatedIncome] forKey:kJavencommissionAccountModelAccumulatedIncome];
[mutableDict setValue:[NSNumber numberWithDouble:self.monthlyIncome] forKey:kJavencommissionAccountModelMonthlyIncome];
[mutableDict setValue:[NSNumber numberWithDouble:self.unconfirmedBalance] forKey:kJavencommissionAccountModelUnconfirmedBalance];
[mutableDict setValue:[NSNumber numberWithDouble:self.withdrawAmount] forKey:kJavencommissionAccountModelWithdrawAmount];
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.balance = [aDecoder decodeDoubleForKey:kJavencommissionAccountModelBalance];
self.monthlyOrderCount = [aDecoder decodeDoubleForKey:kJavencommissionAccountModelMonthlyOrderCount];
self.monthlySales = [aDecoder decodeDoubleForKey:kJavencommissionAccountModelMonthlySales];
self.reseller = [aDecoder decodeObjectForKey:kJavencommissionAccountModelReseller];
self.uuid = [aDecoder decodeObjectForKey:kJavencommissionAccountModelUuid];
self.accumulatedIncome = [aDecoder decodeDoubleForKey:kJavencommissionAccountModelAccumulatedIncome];
self.monthlyIncome = [aDecoder decodeDoubleForKey:kJavencommissionAccountModelMonthlyIncome];
self.unconfirmedBalance = [aDecoder decodeDoubleForKey:kJavencommissionAccountModelUnconfirmedBalance];
self.withdrawAmount = [aDecoder decodeDoubleForKey:kJavencommissionAccountModelWithdrawAmount];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
[aCoder encodeDouble:_balance forKey:kJavencommissionAccountModelBalance];
[aCoder encodeDouble:_monthlyOrderCount forKey:kJavencommissionAccountModelMonthlyOrderCount];
[aCoder encodeDouble:_monthlySales forKey:kJavencommissionAccountModelMonthlySales];
[aCoder encodeObject:_reseller forKey:kJavencommissionAccountModelReseller];
[aCoder encodeObject:_uuid forKey:kJavencommissionAccountModelUuid];
[aCoder encodeDouble:_accumulatedIncome forKey:kJavencommissionAccountModelAccumulatedIncome];
[aCoder encodeDouble:_monthlyIncome forKey:kJavencommissionAccountModelMonthlyIncome];
[aCoder encodeDouble:_unconfirmedBalance forKey:kJavencommissionAccountModelUnconfirmedBalance];
[aCoder encodeDouble:_withdrawAmount forKey:kJavencommissionAccountModelWithdrawAmount];
}
- (id)copyWithZone:(NSZone *)zone
{
JavencommissionAccountModel *copy = [[JavencommissionAccountModel alloc] init];
if (copy) {
copy.balance = self.balance;
copy.monthlyOrderCount = self.monthlyOrderCount;
copy.monthlySales = self.monthlySales;
copy.reseller = [self.reseller copyWithZone:zone];
copy.uuid = [self.uuid copyWithZone:zone];
copy.accumulatedIncome = self.accumulatedIncome;
copy.monthlyIncome = self.monthlyIncome;
copy.unconfirmedBalance = self.unconfirmedBalance;
copy.withdrawAmount = self.withdrawAmount;
}
return copy;
}
@end
...@@ -19,10 +19,13 @@ ...@@ -19,10 +19,13 @@
@implementation HomeTopView @implementation HomeTopView
- (void)awakeFromNib {
self.imageViewUserIcon.layer.masksToBounds = YES;
self.imageViewUserIcon.layer.cornerRadius = self.imageViewUserIcon.width / 2;
}
- (void)updateTopViewInfo:(JavenShopModel *)shop { - (void)updateTopViewInfo:(JavenShopModel *)shop {
[self.imageViewUserIcon sd_setImageWithURL:[NSURL URLWithString:@""] placeholderImage:[UIImage imageNamed:@"defaultUserIcon"]]; [self.imageViewUserIcon sd_setImageWithURL:[NSURL URLWithString:shop.pictures] placeholderImage:[UIImage imageNamed:@"defaultUserIcon"]];
self.labelName.text = shop.name; self.labelName.text = shop.name;
self.labelSubTitle.text = shop.internalBaseClassDescription; self.labelSubTitle.text = shop.internalBaseClassDescription;
} }
......
...@@ -41,11 +41,6 @@ ...@@ -41,11 +41,6 @@
<constraint firstAttribute="width" constant="70" id="pE8-uA-V23"/> <constraint firstAttribute="width" constant="70" id="pE8-uA-V23"/>
<constraint firstAttribute="height" constant="70" id="qp1-bf-4GL"/> <constraint firstAttribute="height" constant="70" id="qp1-bf-4GL"/>
</constraints> </constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="35"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
</imageView> </imageView>
</subviews> </subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
......
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
// //
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "JavencommissionAccountModel.h"
@interface MoneyView : UIView @interface MoneyView : UIView
- (void)setMoneyView:(JavencommissionAccountModel *)model;
@end @end
...@@ -7,14 +7,14 @@ ...@@ -7,14 +7,14 @@
// //
#import "MoneyView.h" #import "MoneyView.h"
#import "MBLabelWithFontAdapter.h"
@interface MoneyView () @interface MoneyView ()
@property (weak, nonatomic) IBOutlet UILabel *labelMoney; @property (weak, nonatomic) IBOutlet UILabel *labelMoney;
@property (weak, nonatomic) IBOutlet UILabel *labelMonthIncome; @property (weak, nonatomic) IBOutlet MBLabelWithFontAdapter *labelMonthIncome;
@property (weak, nonatomic) IBOutlet UILabel *labelMonthSale; @property (weak, nonatomic) IBOutlet MBLabelWithFontAdapter *labelMonthSale;
@property (weak, nonatomic) IBOutlet UILabel *labelMonthOrder; @property (weak, nonatomic) IBOutlet MBLabelWithFontAdapter *labelMonthOrder;
@property (weak, nonatomic) IBOutlet UIButton *buttonEye;//tag为0,则显示星号,tag为1,显示金额 @property (weak, nonatomic) IBOutlet UIButton *buttonEye;//tag为1,则显示星号,tag为0,显示金额
@property (nonatomic, copy) NSString *realMoney; @property (nonatomic, copy) NSString *realMoney;
@end @end
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
[[NSUserDefaults standardUserDefaults] setObject:@"YES" forKey:@"hideMoney"]; [[NSUserDefaults standardUserDefaults] setObject:@"YES" forKey:@"hideMoney"];
}else{ }else{
self.labelMoney.text = @"23421"; self.labelMoney.text = self.realMoney;
sender.tag = 0; sender.tag = 0;
[sender setImage:[UIImage imageNamed:@"eyeOpen"] forState:UIControlStateNormal]; [sender setImage:[UIImage imageNamed:@"eyeOpen"] forState:UIControlStateNormal];
[[NSUserDefaults standardUserDefaults] setObject:@"NO" forKey:@"hideMoney"]; [[NSUserDefaults standardUserDefaults] setObject:@"NO" forKey:@"hideMoney"];
...@@ -53,11 +53,19 @@ ...@@ -53,11 +53,19 @@
} }
- (void)setMoneyView:(JavencommissionAccountModel *)model {
self.labelMonthIncome.text = [NSString stringWithFormat:@"%.2f",model.monthlyIncome];
self.labelMonthSale.text = [NSString stringWithFormat:@"%.2f",model.monthlySales];
self.labelMonthOrder.text = [NSString stringWithFormat:@"%.0f",model.monthlyOrderCount];
[self setMoneyNumber:[NSString stringWithFormat:@"%.2f", model.accumulatedIncome]];
}
//设置总收入金额 //设置总收入金额
- (void)setMondeyNumber:(NSString *)number{ - (void)setMoneyNumber:(NSString *)number{
if (self.buttonEye.tag == 0) { if (self.buttonEye.tag == 1) {
self.realMoney = number;
}else{ }else{
self.realMoney = number;
self.labelMoney.text = number; self.labelMoney.text = number;
} }
} }
......
...@@ -8,53 +8,53 @@ ...@@ -8,53 +8,53 @@
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view autoresizesSubviews="NO" contentMode="scaleToFill" id="iN0-l3-epB" customClass="MoneyView"> <view autoresizesSubviews="NO" contentMode="scaleToFill" id="iN0-l3-epB" customClass="MoneyView">
<rect key="frame" x="0.0" y="0.0" width="375" height="199"/> <rect key="frame" x="0.0" y="0.0" width="320" height="199"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="moneyViewLine" translatesAutoresizingMaskIntoConstraints="NO" id="sno-XF-7wp"> <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="moneyViewLine" translatesAutoresizingMaskIntoConstraints="NO" id="sno-XF-7wp">
<rect key="frame" x="0.0" y="107" width="375" height="92"/> <rect key="frame" x="0.0" y="107" width="320" height="92"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="92" id="dUG-RN-Lz2"/> <constraint firstAttribute="height" constant="92" id="dUG-RN-Lz2"/>
</constraints> </constraints>
</imageView> </imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="O8s-DL-Dmx"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="O8s-DL-Dmx" customClass="MBLabelWithFontAdapter">
<rect key="frame" x="301" y="123" width="17" height="32"/> <rect key="frame" x="256" y="126" width="15" height="29"/>
<fontDescription key="fontDescription" type="system" pointSize="26"/> <fontDescription key="fontDescription" type="system" pointSize="24"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oE9-qL-eth"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oE9-qL-eth" customClass="MBLabelWithFontAdapter">
<rect key="frame" x="58" y="123" width="17" height="32"/> <rect key="frame" x="49" y="126" width="15" height="29"/>
<fontDescription key="fontDescription" type="system" pointSize="26"/> <fontDescription key="fontDescription" type="system" pointSize="24"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="本月收入" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bWL-2f-gh2"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="本月收入" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bWL-2f-gh2">
<rect key="frame" x="10" y="163" width="112" height="21"/> <rect key="frame" x="10" y="163" width="93" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/> <fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/> <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="本月订单数" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hyn-Rr-wOv"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="本月订单数" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Hyn-Rr-wOv">
<rect key="frame" x="253" y="163" width="112" height="21"/> <rect key="frame" x="217" y="163" width="93" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/> <fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/> <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="本月销售额" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="k8x-ug-WTe"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="本月销售额" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="k8x-ug-WTe">
<rect key="frame" x="132" y="163" width="111" height="21"/> <rect key="frame" x="113" y="163" width="94" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/> <fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/> <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MWa-IH-asH"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MWa-IH-asH" customClass="MBLabelWithFontAdapter">
<rect key="frame" x="179" y="123" width="17" height="32"/> <rect key="frame" x="153" y="126" width="15" height="29"/>
<fontDescription key="fontDescription" type="system" pointSize="26"/> <fontDescription key="fontDescription" type="system" pointSize="24"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="累计收入 (元)" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7rw-kV-aXx"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="账户余额(元)" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7rw-kV-aXx">
<rect key="frame" x="17" y="17" width="124" height="21"/> <rect key="frame" x="17" y="17" width="119" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/> <fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/> <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="rightIcon" translatesAutoresizingMaskIntoConstraints="NO" id="ODe-C6-DGN"> <imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="rightIcon" translatesAutoresizingMaskIntoConstraints="NO" id="ODe-C6-DGN">
<rect key="frame" x="343" y="9" width="13" height="42"/> <rect key="frame" x="288" y="9" width="13" height="42"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="13" id="0Ui-lP-8GE"/> <constraint firstAttribute="width" constant="13" id="0Ui-lP-8GE"/>
<constraint firstAttribute="height" constant="42" id="JJZ-Jq-vcu"/> <constraint firstAttribute="height" constant="42" id="JJZ-Jq-vcu"/>
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
</constraints> </constraints>
</imageView> </imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6h9-Nv-UNf"> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6h9-Nv-UNf">
<rect key="frame" x="326" y="64" width="30" height="18"/> <rect key="frame" x="271" y="64" width="30" height="18"/>
<constraints> <constraints>
<constraint firstAttribute="width" constant="30" id="a3k-ko-Eep"/> <constraint firstAttribute="width" constant="30" id="a3k-ko-Eep"/>
<constraint firstAttribute="height" constant="18" id="cjT-dS-HRZ"/> <constraint firstAttribute="height" constant="18" id="cjT-dS-HRZ"/>
......
...@@ -18,13 +18,18 @@ ...@@ -18,13 +18,18 @@
#import "MyTeamViewController.h" #import "MyTeamViewController.h"
#import "CustomerManagementViewController.h" #import "CustomerManagementViewController.h"
#import "InvitePartnerViewController.h" #import "InvitePartnerViewController.h"
#import "JavenDetailReseller.h"
#import "JavencommissionAccountModel.h"
#define kHomeCollectionViewID @"HomeCollectionViewID" #define kHomeCollectionViewID @"HomeCollectionViewID"
#define kCollectionViewHeadHeight 350 #define kCollectionViewHeadHeight 350
@interface HomeCollectionViewController ()<UICollectionViewDataSource, UICollectionViewDelegate,SDCycleScrollViewDelegate> @interface HomeCollectionViewController ()<UICollectionViewDataSource, UICollectionViewDelegate,SDCycleScrollViewDelegate>
@property (nonatomic, strong) NSMutableArray *arrImages;
@property (nonatomic, strong) UICollectionView *collectionView; @property (nonatomic, strong) UICollectionView *collectionView;
@property (nonatomic, strong) MoneyView *viewMoney;
@property (nonatomic, strong) NSMutableArray *arrImages;
@property (nonatomic, strong) JavenDetailReseller *reseller;
@property (nonatomic, strong) JavencommissionAccountModel *accountModel;
@end @end
@implementation HomeCollectionViewController @implementation HomeCollectionViewController
...@@ -64,6 +69,7 @@ ...@@ -64,6 +69,7 @@
//中间的收入 //中间的收入
MoneyView *viewMoney = [MoneyView viewWithNibName:@"MoneyView"]; MoneyView *viewMoney = [MoneyView viewWithNibName:@"MoneyView"];
self.viewMoney = viewMoney;
viewMoney.frame = CGRectMake(0, 0 - kCollectionViewHeadHeight, ScreenSize.width, 340); viewMoney.frame = CGRectMake(0, 0 - kCollectionViewHeadHeight, ScreenSize.width, 340);
[self.collectionView addSubview:viewMoney]; [self.collectionView addSubview:viewMoney];
...@@ -97,6 +103,28 @@ ...@@ -97,6 +103,28 @@
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
} }
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
WS(weakSelf)
NSString *strGetResseller = [NSString stringWithFormat:@"commission/getAccount/%@", [UserInfo shareInstance].uuid];
[[HTTPCilent shareCilent] GET:strGetResseller parameters:nil success:^(NSURLSessionDataTask *task, id responseObject) {
if ([responseObject[@"code"] isEqualToNumber:@0]) {
weakSelf.accountModel = [JavencommissionAccountModel modelObjectWithDictionary:responseObject[@"commissionAccount"]];
[weakSelf.viewMoney setMoneyView:weakSelf.accountModel];
}
CLog(@"d");
} failure:^(NSURLSessionDataTask *task, NSError *error) {
}];
}
- (void)setMoneyView {
}
- (void)touchAddAction { - (void)touchAddAction {
CLog(@"添加商品"); CLog(@"添加商品");
...@@ -166,7 +194,6 @@ ...@@ -166,7 +194,6 @@
StoreManagermentViewController *storeVC = [[StoreManagermentViewController alloc] initWithNibName:@"StoreManagermentViewController" bundle:[NSBundle mainBundle]]; StoreManagermentViewController *storeVC = [[StoreManagermentViewController alloc] initWithNibName:@"StoreManagermentViewController" bundle:[NSBundle mainBundle]];
storeVC.hidesBottomBarWhenPushed = YES; storeVC.hidesBottomBarWhenPushed = YES;
[self.navigationController pushViewController:storeVC animated:YES]; [self.navigationController pushViewController:storeVC animated:YES];
} }
......
...@@ -43,9 +43,12 @@ ...@@ -43,9 +43,12 @@
} failure:^(NSURLSessionDataTask *task, NSError *error) { } failure:^(NSURLSessionDataTask *task, NSError *error) {
}]; }];
} }
- (void)setUpView { - (void)setUpView {
HomeTopView *viewHomeTop = [HomeTopView viewWithNibName:@"HomeTopView"]; HomeTopView *viewHomeTop = [HomeTopView viewWithNibName:@"HomeTopView"];
self.viewHomeTop = viewHomeTop; self.viewHomeTop = viewHomeTop;
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#import "CommodityManagementViewController.h" #import "CommodityManagementViewController.h"
#import "UMSocial.h" #import "UMSocial.h"
#import "UMSocialWechatHandler.h" #import "UMSocialWechatHandler.h"
@interface StoreManagermentViewController ()<UINavigationControllerDelegate, UIImagePickerControllerDelegate, UMSocialUIDelegate> @interface StoreManagermentViewController ()<UINavigationControllerDelegate, UIImagePickerControllerDelegate, UMSocialUIDelegate>
@property (nonatomic, strong) SelectPhotoView *photoView; @property (nonatomic, strong) SelectPhotoView *photoView;
@property (nonatomic, strong) CoverShadowView *shadowView; @property (nonatomic, strong) CoverShadowView *shadowView;
...@@ -22,9 +23,11 @@ ...@@ -22,9 +23,11 @@
@property (weak, nonatomic) IBOutlet UIButton *buttonBac; @property (weak, nonatomic) IBOutlet UIButton *buttonBac;
@property (weak, nonatomic) IBOutlet UILabel *labelName; @property (weak, nonatomic) IBOutlet UILabel *labelName;
@property (weak, nonatomic) IBOutlet UILabel *labelDescription; @property (weak, nonatomic) IBOutlet UILabel *labelDescription;
@property (weak, nonatomic) IBOutlet UIImageView *imgViewIcon;
@property (nonatomic, copy) NSString *urlStr; @property (nonatomic, copy) NSString *urlStr;
@end @end
@implementation StoreManagermentViewController @implementation StoreManagermentViewController
...@@ -56,14 +59,23 @@ ...@@ -56,14 +59,23 @@
} }
CLog(@"%p",weakSelf.shopModel); CLog(@"%p",weakSelf.shopModel);
weakSelf.labelName.text = weakSelf.shopModel.name; [weakSelf setUpViewWithModel:weakSelf.shopModel];
weakSelf.labelDescription.text = weakSelf.shopModel.internalBaseClassDescription;
} failure:^(NSURLSessionDataTask *task, NSError *error) { } failure:^(NSURLSessionDataTask *task, NSError *error) {
}]; }];
} }
- (void)setUpViewWithModel:(JavenShopModel *)model {
self.labelName.text = self.shopModel.name;
self.labelDescription.text = self.shopModel.internalBaseClassDescription;
[self.imgViewIcon sd_setImageWithURL:[NSURL URLWithString:self.shopModel.pictures] placeholderImage:[UIImage imageNamed:@"default_commodity_placeholder"]];
}
- (SelectPhotoView *)photoView { - (SelectPhotoView *)photoView {
if (!_photoView) { if (!_photoView) {
_photoView = [SelectPhotoView viewWithNibName:@"SelectPhotoView"]; _photoView = [SelectPhotoView viewWithNibName:@"SelectPhotoView"];
...@@ -102,6 +114,7 @@ ...@@ -102,6 +114,7 @@
} else { } else {
UIImagePickerController *picker = [[UIImagePickerController alloc] init]; UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self; picker.delegate = self;
picker.allowsEditing = YES;
picker.sourceType = UIImagePickerControllerSourceTypeCamera; picker.sourceType = UIImagePickerControllerSourceTypeCamera;
// picker.modalTransitionStyle=UIModalTransitionStyleFlipHorizontal; // picker.modalTransitionStyle=UIModalTransitionStyleFlipHorizontal;
picker.videoQuality = UIImagePickerControllerQualityTypeLow; picker.videoQuality = UIImagePickerControllerQualityTypeLow;
...@@ -122,6 +135,60 @@ ...@@ -122,6 +135,60 @@
} }
} }
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
//得到图片
UIImage *image = [info objectForKey:UIImagePickerControllerEditedImage];
MBProgressHUD *hud = [MBProgressHUD Javen_showMessage:@"修改中" onView:self.view];
//上传七牛
[[JavenQNManager shareInstance] upLoadImage:image isMD5Name:YES name:nil commpelete:^(NSString *key) {
NSDictionary *params = [self getParamsWithImageUrl:key];
//上传成功之后把URL传给aland服务器
WS(weakSelf)
[[HTTPCilent shareCilent] POST:@"shop/save" parameters:params success:^(NSURLSessionDataTask *task, id responseObject) {
if ([responseObject[@"code"] isEqualToNumber:@0]) {
[hud hide:YES];
[MBProgressHUD Javen_showSuccess:@"修改成功!" onView:weakSelf.view delay:0.7 complete:^{
[weakSelf setUpdata];
}];
}
} failure:^(NSURLSessionDataTask *task, NSError *error) {
}];
}];
// 模态返回
[picker dismissViewControllerAnimated:YES completion:nil];
}
//生成上传图片URL的参数
- (NSDictionary *)getParamsWithImageUrl:(NSString *)imageUrl {
self.shopModel.pictures = [NSString stringWithFormat:@"http://7xtefo.com2.z0.glb.qiniucdn.com/%@", imageUrl];
UserInfo *user = [UserInfo shareInstance];
NSDictionary *dicShop = [self.shopModel dictionaryRepresentation];
NSDictionary *params = @{@"operCtx" : @{@"time" : [[NSDate date] timeStampNumber],
@"domain" : user.domain,
@"operator" : @{@"id" : user.uuid,
@"fullName" : user.name}},
@"shop" : dicShop};
return params;
}
/** /**
* 显示阴影和底部的弹框 * 显示阴影和底部的弹框
...@@ -142,13 +209,14 @@ ...@@ -142,13 +209,14 @@
commodityVC.isShowNavigationBar = YES; commodityVC.isShowNavigationBar = YES;
[self.navigationController pushViewController:commodityVC animated:YES]; [self.navigationController pushViewController:commodityVC animated:YES];
} }
- (IBAction)actionShare:(id)sender { - (IBAction)actionShare:(id)sender {
[[ShareInstance shareInstace] showWithTitle:@"Aland" content:@"快来看看我的小店吧! " url:self.urlStr image:[UIImage imageNamed:@"btn_share_shop"]]; [[ShareInstance shareInstace] showWithTitle:@"Aland" content:@"快来看看我的小店吧! " url:self.urlStr image:[UIImage imageNamed:@"btn_share_shop"]];
} }
//二维码界面
- (IBAction)QRCodeAction:(id)sender { - (IBAction)QRCodeAction:(id)sender {
StoreQRCodeViewController *QRCodeVC = [[StoreQRCodeViewController alloc] initWithNibName:@"StoreQRCodeViewController" bundle:nil]; StoreQRCodeViewController *QRCodeVC = [[StoreQRCodeViewController alloc] initWithNibName:@"StoreQRCodeViewController" bundle:nil];
QRCodeVC.urlStr = self.urlStr; QRCodeVC.urlStr = self.urlStr;
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="StoreManagermentViewController"> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="StoreManagermentViewController">
<connections> <connections>
<outlet property="buttonBac" destination="Iih-6D-NVq" id="Qaj-ot-Ynu"/> <outlet property="buttonBac" destination="Iih-6D-NVq" id="Qaj-ot-Ynu"/>
<outlet property="imgViewIcon" destination="PBT-3w-ecp" id="Osf-BS-6aw"/>
<outlet property="labelDescription" destination="asy-i8-hFm" id="Zdn-05-Att"/> <outlet property="labelDescription" destination="asy-i8-hFm" id="Zdn-05-Att"/>
<outlet property="labelName" destination="R3l-SJ-mVe" id="N6s-z3-sA1"/> <outlet property="labelName" destination="R3l-SJ-mVe" id="N6s-z3-sA1"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
......
...@@ -33,9 +33,6 @@ ...@@ -33,9 +33,6 @@
UserInfo *user = [UserInfo shareInstance]; UserInfo *user = [UserInfo shareInstance];
self.shopModel.name = self.textFieldName.text; self.shopModel.name = self.textFieldName.text;
[JavenShopModel mj_setupReplacedKeyFromPropertyName:^NSDictionary *{
return @{@"operatorIdentifier":@"id"};
}];
NSDictionary *dicShop = [self.shopModel dictionaryRepresentation]; NSDictionary *dicShop = [self.shopModel dictionaryRepresentation];
NSDictionary *params = @{@"operCtx" : @{@"time" : [[NSDate date] timeStampNumber], NSDictionary *params = @{@"operCtx" : @{@"time" : [[NSDate date] timeStampNumber],
......
...@@ -24,9 +24,7 @@ ...@@ -24,9 +24,7 @@
UserInfo *user = [UserInfo shareInstance]; UserInfo *user = [UserInfo shareInstance];
self.shopModel.internalBaseClassDescription = self.textViewInstroduction.text; self.shopModel.internalBaseClassDescription = self.textViewInstroduction.text;
[JavenShopModel mj_setupReplacedKeyFromPropertyName:^NSDictionary *{
return @{@"operatorIdentifier":@"id"};
}];
NSDictionary *dicShop = [self.shopModel dictionaryRepresentation]; NSDictionary *dicShop = [self.shopModel dictionaryRepresentation];
NSDictionary *params = @{@"operCtx" : @{@"time" : [[NSDate date] timeStampNumber], NSDictionary *params = @{@"operCtx" : @{@"time" : [[NSDate date] timeStampNumber],
......
...@@ -28,6 +28,7 @@ char *NewBase64Encode( ...@@ -28,6 +28,7 @@ char *NewBase64Encode(
- (NSString *)base64EncodedString; - (NSString *)base64EncodedString;
- (NSData *)AES256EncryptWithKey:(NSString *)key; - (NSData *)AES256EncryptWithKey:(NSString *)key;
- (NSData *)AES256DecryptWithKey:(NSString *)key; - (NSData *)AES256DecryptWithKey:(NSString *)key;
- (NSString *)md5String;
@end @end
......
...@@ -423,6 +423,20 @@ static CFStringRef UTTypeForImageData(NSData *data) { ...@@ -423,6 +423,20 @@ static CFStringRef UTTypeForImageData(NSData *data) {
return nil; return nil;
} }
- (NSString *)md5String {
const char *str = [self bytes];
unsigned char result[CC_MD5_DIGEST_LENGTH];
CC_MD5(str, (CC_LONG)self.length, result);
NSMutableString *hash = [NSMutableString string];
for (int i = 0; i < CC_MD5_DIGEST_LENGTH; i++) {
[hash appendFormat:@"%02X", result[i]];
}
return [hash lowercaseString];
}
- (BOOL)isImageType { - (BOOL)isImageType {
CFStringRef imgType = UTTypeForImageData(self);//CoreFoundation里面的CFStringRef和NSString*是可以直接转换的 CFStringRef imgType = UTTypeForImageData(self);//CoreFoundation里面的CFStringRef和NSString*是可以直接转换的
return imgType ? YES : NO; return imgType ? YES : NO;
......
//
// NSNumber+Fommater.h
// ALand
//
// Created by Z on 16/5/3.
// Copyright © 2016年 Z. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSNumber (Fommater)
@end
//
// NSNumber+Fommater.m
// ALand
//
// Created by Z on 16/5/3.
// Copyright © 2016年 Z. All rights reserved.
//
#import "NSNumber+Fommater.h"
@implementation NSNumber (Fommater)
@end
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
// //
#import "NSString+Category.h" #import "NSString+Category.h"
#import <CommonCrypto/CommonDigest.h>
@implementation NSString (Category) @implementation NSString (Category)
+ (NSString *)randomTestText { + (NSString *)randomTestText {
...@@ -20,4 +21,6 @@ ...@@ -20,4 +21,6 @@
return result; return result;
} }
@end @end
//
// JavenQNManager.h
// ALand
//
// Created by Z on 16/5/3.
// Copyright © 2016年 Z. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface JavenQNManager : NSObject
+ (instancetype)shareInstance;
- (void)upLoadImage:(UIImage *)image isMD5Name:(BOOL)isMD5Name name:(NSString *)imageName commpelete:(void(^)(NSString *key))commpelete;
@end
//
// JavenQNManager.m
// ALand
//
// Created by Z on 16/5/3.
// Copyright © 2016年 Z. All rights reserved.
//
#import "JavenQNManager.h"
#import <QiniuSDK.h>
#import "GTM_Base64.h"
#include <CommonCrypto/CommonCrypto.h>
#import "NSData+EncodeAdditions.h"
@interface JavenQNManager ()
@property (nonatomic, strong) QNUploadManager *upManager;
@property (nonatomic, strong) QNUploadOption *option;
@property (nonatomic, copy) NSString *token;
@end
@implementation JavenQNManager
+ (instancetype)shareInstance {
static JavenQNManager *manager = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
manager = [[JavenQNManager alloc] init];
NSString *AK =@"mRX5pK-bCChgNMxeiC_VlRgSFLuz_WbLT3OyViuh";
NSString *SK = @"m8XQ8FjLiUY38pgDUzjHApdJ4YpgdlpmRT6FAwAg";
manager.token = [manager makeToken:AK secretKey:SK];
manager.option = [[QNUploadOption alloc] initWithMime:@"image/jpeg" progressHandler:nil params:nil checkCrc:NO cancellationSignal:nil];
manager.upManager =[[QNUploadManager alloc]init];
});
return manager;
}
- (void)upLoadImage:(UIImage *)image isMD5Name:(BOOL)isMD5Name name:(NSString *)imageName commpelete:(void(^)(NSString *key))commpelete {
NSData *data = UIImageJPEGRepresentation(image, 0.5);
NSString *name;
if (isMD5Name) {
name = [NSString stringWithFormat:@"%@.jpg", [data md5String]];
}else{
name = imageName;
}
[self.upManager putData:data key:name token:self.token
complete: ^(QNResponseInfo *info, NSString *key, NSDictionary *resp) {
NSLog(@"info = %@\n", info);
NSLog(@"key = %@\n",key);
NSLog(@"resp = %@\n", resp);
commpelete(key);
} option:self.option];
}
- (NSString *)makeToken:(NSString *)accessKey secretKey:(NSString *)secretKey
{
const char *secretKeyStr = [secretKey UTF8String];
NSString *policy = [self marshal];
NSData *policyData = [policy dataUsingEncoding:NSUTF8StringEncoding];
NSString *encodedPolicy = [GTM_Base64 stringByWebSafeEncodingData:policyData padded:TRUE];
const char *encodedPolicyStr = [encodedPolicy cStringUsingEncoding:NSUTF8StringEncoding];
char digestStr[CC_SHA1_DIGEST_LENGTH];
bzero(digestStr, 0);
CCHmac(kCCHmacAlgSHA1, secretKeyStr, strlen(secretKeyStr), encodedPolicyStr, strlen(encodedPolicyStr), digestStr);
NSString *encodedDigest = [GTM_Base64 stringByWebSafeEncodingBytes:digestStr length:CC_SHA1_DIGEST_LENGTH padded:TRUE];
NSString *token = [NSString stringWithFormat:@"%@:%@:%@", accessKey, encodedDigest, encodedPolicy];
return token;//得到了token
}
- (NSString *)marshal
{
time_t deadline;
time(&deadline);//返回当前系统时间
//@property (nonatomic , assign) int expires; 怎么定义随你...
deadline += 3600; // +3600秒,即默认token保存1小时.
NSNumber *deadlineNumber = [NSNumber numberWithLongLong:deadline];
NSMutableDictionary *dic = [NSMutableDictionary dictionary];
//users是我开辟的公共空间名(即bucket),aaa是文件的key,
//按七牛“上传策略”的描述: <bucket>:<key>,表示只允许用户上传指定key的文件。在这种格式下文件默认允许“修改”,若已存在同名资源则会被覆盖。如果只希望上传指定key的文件,并且不允许修改,那么可以将下面的 insertOnly 属性值设为 1。
//所以如果参数只传users的话,下次上传key还是aaa的文件会提示存在同名文件,不能上传。
//传users:aaa的话,可以覆盖更新,但实测延迟较长,我上传同名新文件上去,下载下来的还是老文件。
[dic setObject:@"aland" forKey:@"scope"];//根据
[dic setObject:deadlineNumber forKey:@"deadline"];
NSString *json = [dic mj_JSONString];
return json;
}
@end
//
// JavenCertificate.h
//
// Created by Z on 16/5/3
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface JavenCertificate : NSObject <NSCoding, NSCopying>
@property (nonatomic, assign) BOOL idValidated;
@property (nonatomic, strong) NSArray *bankCards;
@property (nonatomic, assign) id trueName;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
- (NSDictionary *)dictionaryRepresentation;
@end
//
// JavenCertificate.m
//
// Created by Z on 16/5/3
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import "JavenCertificate.h"
NSString *const kJavenCertificateIdValidated = @"idValidated";
NSString *const kJavenCertificateBankCards = @"bankCards";
NSString *const kJavenCertificateTrueName = @"trueName";
@interface JavenCertificate ()
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
@end
@implementation JavenCertificate
@synthesize idValidated = _idValidated;
@synthesize bankCards = _bankCards;
@synthesize trueName = _trueName;
+ (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.idValidated = [[self objectOrNilForKey:kJavenCertificateIdValidated fromDictionary:dict] boolValue];
self.bankCards = [self objectOrNilForKey:kJavenCertificateBankCards fromDictionary:dict];
self.trueName = [self objectOrNilForKey:kJavenCertificateTrueName fromDictionary:dict];
}
return self;
}
- (NSDictionary *)dictionaryRepresentation
{
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:[NSNumber numberWithBool:self.idValidated] forKey:kJavenCertificateIdValidated];
NSMutableArray *tempArrayForBankCards = [NSMutableArray array];
for (NSObject *subArrayObject in self.bankCards) {
if([subArrayObject respondsToSelector:@selector(dictionaryRepresentation)]) {
// This class is a model object
[tempArrayForBankCards addObject:[subArrayObject performSelector:@selector(dictionaryRepresentation)]];
} else {
// Generic object
[tempArrayForBankCards addObject:subArrayObject];
}
}
[mutableDict setValue:[NSArray arrayWithArray:tempArrayForBankCards] forKey:kJavenCertificateBankCards];
[mutableDict setValue:self.trueName forKey:kJavenCertificateTrueName];
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.idValidated = [aDecoder decodeBoolForKey:kJavenCertificateIdValidated];
self.bankCards = [aDecoder decodeObjectForKey:kJavenCertificateBankCards];
self.trueName = [aDecoder decodeObjectForKey:kJavenCertificateTrueName];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
[aCoder encodeBool:_idValidated forKey:kJavenCertificateIdValidated];
[aCoder encodeObject:_bankCards forKey:kJavenCertificateBankCards];
[aCoder encodeObject:_trueName forKey:kJavenCertificateTrueName];
}
- (id)copyWithZone:(NSZone *)zone
{
JavenCertificate *copy = [[JavenCertificate alloc] init];
if (copy) {
copy.idValidated = self.idValidated;
copy.bankCards = [self.bankCards copyWithZone:zone];
copy.trueName = [self.trueName copyWithZone:zone];
}
return copy;
}
@end
// //
// JavenCreateInfo.h // JavenCreateInfo.h
// //
// Created by Z on 16/4/12 // Created by Z on 16/5/3
// Copyright (c) 2016 __MyCompanyName__. All rights reserved. // Copyright (c) 2016 __MyCompanyName__. All rights reserved.
// //
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
@interface JavenCreateInfo : NSObject <NSCoding, NSCopying> @interface JavenCreateInfo : NSObject <NSCoding, NSCopying>
@property (nonatomic, strong) JavenOperator *operator; @property (nonatomic, strong) JavenOperator *operator;
@property (nonatomic, assign) double time; @property (nonatomic, strong) NSString *time;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict; + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict; - (instancetype)initWithDictionary:(NSDictionary *)dict;
......
// //
// JavenCreateInfo.m // JavenCreateInfo.m
// //
// Created by Z on 16/4/12 // Created by Z on 16/5/3
// Copyright (c) 2016 __MyCompanyName__. All rights reserved. // Copyright (c) 2016 __MyCompanyName__. All rights reserved.
// //
...@@ -38,7 +38,7 @@ NSString *const kJavenCreateInfoTime = @"time"; ...@@ -38,7 +38,7 @@ NSString *const kJavenCreateInfoTime = @"time";
// passed into the model class doesn't break the parsing. // passed into the model class doesn't break the parsing.
if(self && [dict isKindOfClass:[NSDictionary class]]) { if(self && [dict isKindOfClass:[NSDictionary class]]) {
self.operator = [JavenOperator modelObjectWithDictionary:[dict objectForKey:kJavenCreateInfoOperator]]; self.operator = [JavenOperator modelObjectWithDictionary:[dict objectForKey:kJavenCreateInfoOperator]];
self.time = [[self objectOrNilForKey:kJavenCreateInfoTime fromDictionary:dict] doubleValue]; self.time = [self objectOrNilForKey:kJavenCreateInfoTime fromDictionary:dict];
} }
...@@ -50,7 +50,7 @@ NSString *const kJavenCreateInfoTime = @"time"; ...@@ -50,7 +50,7 @@ NSString *const kJavenCreateInfoTime = @"time";
{ {
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary]; NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:[self.operator dictionaryRepresentation] forKey:kJavenCreateInfoOperator]; [mutableDict setValue:[self.operator dictionaryRepresentation] forKey:kJavenCreateInfoOperator];
[mutableDict setValue:[NSNumber numberWithDouble:self.time] forKey:kJavenCreateInfoTime]; [mutableDict setValue:self.time forKey:kJavenCreateInfoTime];
return [NSDictionary dictionaryWithDictionary:mutableDict]; return [NSDictionary dictionaryWithDictionary:mutableDict];
} }
...@@ -75,7 +75,7 @@ NSString *const kJavenCreateInfoTime = @"time"; ...@@ -75,7 +75,7 @@ NSString *const kJavenCreateInfoTime = @"time";
self = [super init]; self = [super init];
self.operator = [aDecoder decodeObjectForKey:kJavenCreateInfoOperator]; self.operator = [aDecoder decodeObjectForKey:kJavenCreateInfoOperator];
self.time = [aDecoder decodeDoubleForKey:kJavenCreateInfoTime]; self.time = [aDecoder decodeObjectForKey:kJavenCreateInfoTime];
return self; return self;
} }
...@@ -83,7 +83,7 @@ NSString *const kJavenCreateInfoTime = @"time"; ...@@ -83,7 +83,7 @@ NSString *const kJavenCreateInfoTime = @"time";
{ {
[aCoder encodeObject:_operator forKey:kJavenCreateInfoOperator]; [aCoder encodeObject:_operator forKey:kJavenCreateInfoOperator];
[aCoder encodeDouble:_time forKey:kJavenCreateInfoTime]; [aCoder encodeObject:_time forKey:kJavenCreateInfoTime];
} }
- (id)copyWithZone:(NSZone *)zone - (id)copyWithZone:(NSZone *)zone
...@@ -93,7 +93,7 @@ NSString *const kJavenCreateInfoTime = @"time"; ...@@ -93,7 +93,7 @@ NSString *const kJavenCreateInfoTime = @"time";
if (copy) { if (copy) {
copy.operator = [self.operator copyWithZone:zone]; copy.operator = [self.operator copyWithZone:zone];
copy.time = self.time; copy.time = [self.time copyWithZone:zone];
} }
return copy; return copy;
......
//
// JavenIdCard.h
//
// Created by Z on 16/5/3
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface JavenIdCard : NSObject <NSCoding, NSCopying>
@property (nonatomic, strong) NSString *idType;
@property (nonatomic, assign) id idNum;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
- (NSDictionary *)dictionaryRepresentation;
@end
//
// JavenIdCard.m
//
// Created by Z on 16/5/3
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import "JavenIdCard.h"
NSString *const kJavenIdCardIdType = @"idType";
NSString *const kJavenIdCardIdNum = @"idNum";
@interface JavenIdCard ()
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
@end
@implementation JavenIdCard
@synthesize idType = _idType;
@synthesize idNum = _idNum;
+ (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.idType = [self objectOrNilForKey:kJavenIdCardIdType fromDictionary:dict];
self.idNum = [self objectOrNilForKey:kJavenIdCardIdNum fromDictionary:dict];
}
return self;
}
- (NSDictionary *)dictionaryRepresentation
{
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:self.idType forKey:kJavenIdCardIdType];
[mutableDict setValue:self.idNum forKey:kJavenIdCardIdNum];
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.idType = [aDecoder decodeObjectForKey:kJavenIdCardIdType];
self.idNum = [aDecoder decodeObjectForKey:kJavenIdCardIdNum];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
[aCoder encodeObject:_idType forKey:kJavenIdCardIdType];
[aCoder encodeObject:_idNum forKey:kJavenIdCardIdNum];
}
- (id)copyWithZone:(NSZone *)zone
{
JavenIdCard *copy = [[JavenIdCard alloc] init];
if (copy) {
copy.idType = [self.idType copyWithZone:zone];
copy.idNum = [self.idNum copyWithZone:zone];
}
return copy;
}
@end
// //
// JavenLastModifyInfo.h // JavenLastModifyInfo.h
// //
// Created by Z on 16/4/12 // Created by Z on 16/5/3
// Copyright (c) 2016 __MyCompanyName__. All rights reserved. // Copyright (c) 2016 __MyCompanyName__. All rights reserved.
// //
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
@interface JavenLastModifyInfo : NSObject <NSCoding, NSCopying> @interface JavenLastModifyInfo : NSObject <NSCoding, NSCopying>
@property (nonatomic, strong) JavenOperator *operator; @property (nonatomic, strong) JavenOperator *operator;
@property (nonatomic, assign) double time; @property (nonatomic, strong) NSString *time;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict; + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict; - (instancetype)initWithDictionary:(NSDictionary *)dict;
......
// //
// JavenLastModifyInfo.m // JavenLastModifyInfo.m
// //
// Created by Z on 16/4/12 // Created by Z on 16/5/3
// Copyright (c) 2016 __MyCompanyName__. All rights reserved. // Copyright (c) 2016 __MyCompanyName__. All rights reserved.
// //
...@@ -38,7 +38,7 @@ NSString *const kJavenLastModifyInfoTime = @"time"; ...@@ -38,7 +38,7 @@ NSString *const kJavenLastModifyInfoTime = @"time";
// passed into the model class doesn't break the parsing. // passed into the model class doesn't break the parsing.
if(self && [dict isKindOfClass:[NSDictionary class]]) { if(self && [dict isKindOfClass:[NSDictionary class]]) {
self.operator = [JavenOperator modelObjectWithDictionary:[dict objectForKey:kJavenLastModifyInfoOperator]]; self.operator = [JavenOperator modelObjectWithDictionary:[dict objectForKey:kJavenLastModifyInfoOperator]];
self.time = [[self objectOrNilForKey:kJavenLastModifyInfoTime fromDictionary:dict] doubleValue]; self.time = [self objectOrNilForKey:kJavenLastModifyInfoTime fromDictionary:dict];
} }
...@@ -50,7 +50,7 @@ NSString *const kJavenLastModifyInfoTime = @"time"; ...@@ -50,7 +50,7 @@ NSString *const kJavenLastModifyInfoTime = @"time";
{ {
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary]; NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:[self.operator dictionaryRepresentation] forKey:kJavenLastModifyInfoOperator]; [mutableDict setValue:[self.operator dictionaryRepresentation] forKey:kJavenLastModifyInfoOperator];
[mutableDict setValue:[NSNumber numberWithDouble:self.time] forKey:kJavenLastModifyInfoTime]; [mutableDict setValue:self.time forKey:kJavenLastModifyInfoTime];
return [NSDictionary dictionaryWithDictionary:mutableDict]; return [NSDictionary dictionaryWithDictionary:mutableDict];
} }
...@@ -75,7 +75,7 @@ NSString *const kJavenLastModifyInfoTime = @"time"; ...@@ -75,7 +75,7 @@ NSString *const kJavenLastModifyInfoTime = @"time";
self = [super init]; self = [super init];
self.operator = [aDecoder decodeObjectForKey:kJavenLastModifyInfoOperator]; self.operator = [aDecoder decodeObjectForKey:kJavenLastModifyInfoOperator];
self.time = [aDecoder decodeDoubleForKey:kJavenLastModifyInfoTime]; self.time = [aDecoder decodeObjectForKey:kJavenLastModifyInfoTime];
return self; return self;
} }
...@@ -83,7 +83,7 @@ NSString *const kJavenLastModifyInfoTime = @"time"; ...@@ -83,7 +83,7 @@ NSString *const kJavenLastModifyInfoTime = @"time";
{ {
[aCoder encodeObject:_operator forKey:kJavenLastModifyInfoOperator]; [aCoder encodeObject:_operator forKey:kJavenLastModifyInfoOperator];
[aCoder encodeDouble:_time forKey:kJavenLastModifyInfoTime]; [aCoder encodeObject:_time forKey:kJavenLastModifyInfoTime];
} }
- (id)copyWithZone:(NSZone *)zone - (id)copyWithZone:(NSZone *)zone
...@@ -93,7 +93,7 @@ NSString *const kJavenLastModifyInfoTime = @"time"; ...@@ -93,7 +93,7 @@ NSString *const kJavenLastModifyInfoTime = @"time";
if (copy) { if (copy) {
copy.operator = [self.operator copyWithZone:zone]; copy.operator = [self.operator copyWithZone:zone];
copy.time = self.time; copy.time = [self.time copyWithZone:zone];
} }
return copy; return copy;
......
//
// JavenLoginControl.h
//
// Created by Z on 16/5/3
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface JavenLoginControl : NSObject <NSCoding, NSCopying>
@property (nonatomic, strong) NSString *loginIp;
@property (nonatomic, strong) NSString *loginTime;
@property (nonatomic, assign) double failedTimes;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
- (NSDictionary *)dictionaryRepresentation;
@end
//
// JavenLoginControl.m
//
// Created by Z on 16/5/3
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import "JavenLoginControl.h"
NSString *const kJavenLoginControlLoginIp = @"loginIp";
NSString *const kJavenLoginControlLoginTime = @"loginTime";
NSString *const kJavenLoginControlFailedTimes = @"failedTimes";
@interface JavenLoginControl ()
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
@end
@implementation JavenLoginControl
@synthesize loginIp = _loginIp;
@synthesize loginTime = _loginTime;
@synthesize failedTimes = _failedTimes;
+ (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.loginIp = [self objectOrNilForKey:kJavenLoginControlLoginIp fromDictionary:dict];
self.loginTime = [self objectOrNilForKey:kJavenLoginControlLoginTime fromDictionary:dict];
self.failedTimes = [[self objectOrNilForKey:kJavenLoginControlFailedTimes fromDictionary:dict] doubleValue];
}
return self;
}
- (NSDictionary *)dictionaryRepresentation
{
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:self.loginIp forKey:kJavenLoginControlLoginIp];
[mutableDict setValue:self.loginTime forKey:kJavenLoginControlLoginTime];
[mutableDict setValue:[NSNumber numberWithDouble:self.failedTimes] forKey:kJavenLoginControlFailedTimes];
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.loginIp = [aDecoder decodeObjectForKey:kJavenLoginControlLoginIp];
self.loginTime = [aDecoder decodeObjectForKey:kJavenLoginControlLoginTime];
self.failedTimes = [aDecoder decodeDoubleForKey:kJavenLoginControlFailedTimes];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
[aCoder encodeObject:_loginIp forKey:kJavenLoginControlLoginIp];
[aCoder encodeObject:_loginTime forKey:kJavenLoginControlLoginTime];
[aCoder encodeDouble:_failedTimes forKey:kJavenLoginControlFailedTimes];
}
- (id)copyWithZone:(NSZone *)zone
{
JavenLoginControl *copy = [[JavenLoginControl alloc] init];
if (copy) {
copy.loginIp = [self.loginIp copyWithZone:zone];
copy.loginTime = [self.loginTime copyWithZone:zone];
copy.failedTimes = self.failedTimes;
}
return copy;
}
@end
//
// JavenOwnerOrg.h
//
// Created by Z on 16/5/3
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface JavenOwnerOrg : NSObject <NSCoding, NSCopying>
@property (nonatomic, strong) NSString *name;
@property (nonatomic, strong) NSString *uuid;
@property (nonatomic, strong) NSString *code;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
- (NSDictionary *)dictionaryRepresentation;
@end
//
// JavenOwnerOrg.m
//
// Created by Z on 16/5/3
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import "JavenOwnerOrg.h"
NSString *const kJavenOwnerOrgName = @"name";
NSString *const kJavenOwnerOrgUuid = @"uuid";
NSString *const kJavenOwnerOrgCode = @"code";
@interface JavenOwnerOrg ()
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
@end
@implementation JavenOwnerOrg
@synthesize name = _name;
@synthesize uuid = _uuid;
@synthesize code = _code;
+ (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:kJavenOwnerOrgName fromDictionary:dict];
self.uuid = [self objectOrNilForKey:kJavenOwnerOrgUuid fromDictionary:dict];
self.code = [self objectOrNilForKey:kJavenOwnerOrgCode fromDictionary:dict];
}
return self;
}
- (NSDictionary *)dictionaryRepresentation
{
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:self.name forKey:kJavenOwnerOrgName];
[mutableDict setValue:self.uuid forKey:kJavenOwnerOrgUuid];
[mutableDict setValue:self.code forKey:kJavenOwnerOrgCode];
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:kJavenOwnerOrgName];
self.uuid = [aDecoder decodeObjectForKey:kJavenOwnerOrgUuid];
self.code = [aDecoder decodeObjectForKey:kJavenOwnerOrgCode];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
[aCoder encodeObject:_name forKey:kJavenOwnerOrgName];
[aCoder encodeObject:_uuid forKey:kJavenOwnerOrgUuid];
[aCoder encodeObject:_code forKey:kJavenOwnerOrgCode];
}
- (id)copyWithZone:(NSZone *)zone
{
JavenOwnerOrg *copy = [[JavenOwnerOrg alloc] init];
if (copy) {
copy.name = [self.name copyWithZone:zone];
copy.uuid = [self.uuid copyWithZone:zone];
copy.code = [self.code copyWithZone:zone];
}
return copy;
}
@end
//
// JavenPasswordControl.h
//
// Created by Z on 16/5/3
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface JavenPasswordControl : NSObject <NSCoding, NSCopying>
@property (nonatomic, strong) NSString *created;
@property (nonatomic, assign) id initPassword;
@property (nonatomic, assign) id expiry;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
- (instancetype)initWithDictionary:(NSDictionary *)dict;
- (NSDictionary *)dictionaryRepresentation;
@end
//
// JavenPasswordControl.m
//
// Created by Z on 16/5/3
// Copyright (c) 2016 __MyCompanyName__. All rights reserved.
//
#import "JavenPasswordControl.h"
NSString *const kJavenPasswordControlCreated = @"created";
NSString *const kJavenPasswordControlInitPassword = @"initPassword";
NSString *const kJavenPasswordControlExpiry = @"expiry";
@interface JavenPasswordControl ()
- (id)objectOrNilForKey:(id)aKey fromDictionary:(NSDictionary *)dict;
@end
@implementation JavenPasswordControl
@synthesize created = _created;
@synthesize initPassword = _initPassword;
@synthesize expiry = _expiry;
+ (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.created = [self objectOrNilForKey:kJavenPasswordControlCreated fromDictionary:dict];
self.initPassword = [self objectOrNilForKey:kJavenPasswordControlInitPassword fromDictionary:dict];
self.expiry = [self objectOrNilForKey:kJavenPasswordControlExpiry fromDictionary:dict];
}
return self;
}
- (NSDictionary *)dictionaryRepresentation
{
NSMutableDictionary *mutableDict = [NSMutableDictionary dictionary];
[mutableDict setValue:self.created forKey:kJavenPasswordControlCreated];
[mutableDict setValue:self.initPassword forKey:kJavenPasswordControlInitPassword];
[mutableDict setValue:self.expiry forKey:kJavenPasswordControlExpiry];
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.created = [aDecoder decodeObjectForKey:kJavenPasswordControlCreated];
self.initPassword = [aDecoder decodeObjectForKey:kJavenPasswordControlInitPassword];
self.expiry = [aDecoder decodeObjectForKey:kJavenPasswordControlExpiry];
return self;
}
- (void)encodeWithCoder:(NSCoder *)aCoder
{
[aCoder encodeObject:_created forKey:kJavenPasswordControlCreated];
[aCoder encodeObject:_initPassword forKey:kJavenPasswordControlInitPassword];
[aCoder encodeObject:_expiry forKey:kJavenPasswordControlExpiry];
}
- (id)copyWithZone:(NSZone *)zone
{
JavenPasswordControl *copy = [[JavenPasswordControl alloc] init];
if (copy) {
copy.created = [self.created copyWithZone:zone];
copy.initPassword = [self.initPassword copyWithZone:zone];
copy.expiry = [self.expiry copyWithZone:zone];
}
return copy;
}
@end
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
@interface JavenReseller : NSObject <NSCoding, NSCopying> @interface JavenReseller : NSObject <NSCoding, NSCopying>
@property (nonatomic, strong) NSString *mobilephone; @property (nonatomic, strong) NSString *mobilephone;
@property (nonatomic, assign) id code; @property (nonatomic, strong) NSString *code;
@property (nonatomic, strong) NSString *name; @property (nonatomic, strong) NSString *name;
@property (nonatomic, assign) id portrait; @property (nonatomic, strong) id portrait;
@property (nonatomic, strong) NSString *uuid; @property (nonatomic, strong) NSString *uuid;
+ (instancetype)modelObjectWithDictionary:(NSDictionary *)dict; + (instancetype)modelObjectWithDictionary:(NSDictionary *)dict;
......
...@@ -17,6 +17,10 @@ ...@@ -17,6 +17,10 @@
#import "UIButton+Category.h" #import "UIButton+Category.h"
#import "HTTPCilent.h" #import "HTTPCilent.h"
#import "MJExtension.h" #import "MJExtension.h"
#import "MBProgressHUD+Javen.h"
#import "ShareInstance.h" #import "ShareInstance.h"
#import "JavenCategory.h"
#import "NSNumber+Fommater.h"
#import "MBProgressHUD+Javen.h"
#import "JavenQNManager.h"
#endif /* IMPHeader_h */ #endif /* IMPHeader_h */
...@@ -9,4 +9,4 @@ pod 'SDCycleScrollView', '~> 1.61' ...@@ -9,4 +9,4 @@ pod 'SDCycleScrollView', '~> 1.61'
pod 'AFNetworking', '~> 3.0.4' pod 'AFNetworking', '~> 3.0.4'
pod 'MJExtension', '~> 3.0.10' pod 'MJExtension', '~> 3.0.10'
pod 'UMengSocial', '~> 5.0' pod 'UMengSocial', '~> 5.0'
pod "Qiniu", :git => 'https://github.com/qiniu/objc-sdk.git', :branch => 'AFNetworking-3.x'
\ No newline at end of file
...@@ -17,9 +17,13 @@ PODS: ...@@ -17,9 +17,13 @@ PODS:
- FMDB (2.6): - FMDB (2.6):
- FMDB/standard (= 2.6) - FMDB/standard (= 2.6)
- FMDB/standard (2.6) - FMDB/standard (2.6)
- HappyDNS (0.2.3)
- IQKeyboardManager (4.0.0) - IQKeyboardManager (4.0.0)
- MBProgressHUD (0.9.2) - MBProgressHUD (0.9.2)
- MJExtension (3.0.10) - MJExtension (3.0.10)
- Qiniu (7.0.16):
- AFNetworking (~> 3)
- HappyDNS (~> 0.2)
- SDAutoLayout (1.31) - SDAutoLayout (1.31)
- SDCycleScrollView (1.61): - SDCycleScrollView (1.61):
- SDWebImage (~> 3.7) - SDWebImage (~> 3.7)
...@@ -35,18 +39,31 @@ DEPENDENCIES: ...@@ -35,18 +39,31 @@ DEPENDENCIES:
- IQKeyboardManager (~> 4.0.0) - IQKeyboardManager (~> 4.0.0)
- MBProgressHUD (~> 0.9.2) - MBProgressHUD (~> 0.9.2)
- MJExtension (~> 3.0.10) - MJExtension (~> 3.0.10)
- Qiniu (from `https://github.com/qiniu/objc-sdk.git`, branch `AFNetworking-3.x`)
- SDAutoLayout (~> 1.31) - SDAutoLayout (~> 1.31)
- SDCycleScrollView (~> 1.61) - SDCycleScrollView (~> 1.61)
- SDWebImage (~> 3.7.5) - SDWebImage (~> 3.7.5)
- SSKeychain (~> 1.3.1) - SSKeychain (~> 1.3.1)
- UMengSocial (~> 5.0) - UMengSocial (~> 5.0)
EXTERNAL SOURCES:
Qiniu:
:branch: AFNetworking-3.x
:git: https://github.com/qiniu/objc-sdk.git
CHECKOUT OPTIONS:
Qiniu:
:commit: 11dd18609a257488c65a08e572288d33eefb46b1
:git: https://github.com/qiniu/objc-sdk.git
SPEC CHECKSUMS: SPEC CHECKSUMS:
AFNetworking: a0075feb321559dc78d9d85b55d11caa19eabb93 AFNetworking: a0075feb321559dc78d9d85b55d11caa19eabb93
FMDB: c1968bab3ab0aed38f66cb778ae1e7fa9a652b6e FMDB: c1968bab3ab0aed38f66cb778ae1e7fa9a652b6e
HappyDNS: 6d85942e64c28b4fa61f8c76580398f52d6d1d11
IQKeyboardManager: b91928f7927ba55a5829b4dcf4b7a6736ac9fc22 IQKeyboardManager: b91928f7927ba55a5829b4dcf4b7a6736ac9fc22
MBProgressHUD: 1569cf7ace17a8bac47aabfbb8580a49690386d1 MBProgressHUD: 1569cf7ace17a8bac47aabfbb8580a49690386d1
MJExtension: d86aacb740c87519d20e3cca55b6fa4be6cc7548 MJExtension: d86aacb740c87519d20e3cca55b6fa4be6cc7548
Qiniu: 340bc55a6478d89591754aa7d1fd8b5977863991
SDAutoLayout: 79b8977f863ba4722bb8f8f6f92981d0b8ae932a SDAutoLayout: 79b8977f863ba4722bb8f8f6f92981d0b8ae932a
SDCycleScrollView: a002d85b30cfa9d0ac74069cd3973ca19ff4f22f SDCycleScrollView: a002d85b30cfa9d0ac74069cd3973ca19ff4f22f
SDWebImage: 69c6303e3348fba97e03f65d65d4fbc26740f461 SDWebImage: 69c6303e3348fba97e03f65d65d4fbc26740f461
......
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