重庆迈尖科技有限公司
2018-08-23 e88b8253f7b05661cd7d52980c3ff579aea6a70e
no message
5个文件已删除
1 文件已重命名
38个文件已修改
6 文件已复制
36个文件已添加
4339 ■■■■ 已修改文件
MIduo.xcodeproj/project.pbxproj 92 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo.xcworkspace/xcuserdata/mj.xcuserdatad/UserInterfaceState.xcuserstate 补丁 | 查看 | 原始文档 | blame | 历史
MIduo.xcworkspace/xcuserdata/mj.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist 182 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/AppDelegate.m 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/我的/QQ好友.imageset/Contents.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/我的/QQ好友.imageset/QQ好友@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/我的/QQ好友.imageset/QQ好友@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/我的/QQ空间.imageset/Contents.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/我的/QQ空间.imageset/QQ空间@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/我的/QQ空间.imageset/QQ空间@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/我的/会员特权.imageset/icon_会员特权@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/我的/会员特权.imageset/icon_会员特权@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/我的/分享APP.imageset/Contents.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/我的/分享APP.imageset/分享APP@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/我的/分享APP.imageset/分享APP@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/我的/微信好友.imageset/Contents.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/我的/微信好友.imageset/微信@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/我的/微信好友.imageset/微信@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/我的/新浪微博.imageset/Contents.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/我的/新浪微博.imageset/新浪微博@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/我的/新浪微博.imageset/新浪微博@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/我的/朋友圈.imageset/Contents.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/我的/朋友圈.imageset/朋友圈@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/我的/朋友圈.imageset/朋友圈@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/智能搜索/Contents.json 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/智能搜索/bgRed.imageset/Contents.json 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/智能搜索/bgRed.imageset/bg 4.png 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/返.imageset/Contents.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/返.imageset/奖金@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/返.imageset/奖金@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/返.imageset/返@2x.png 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/Assets.xcassets/返.imageset/返@3x.png 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/数据/DataNet/ALNetWorking.h 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/数据/DataNet/ALNetWorking.m 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/数据/YTHsharedManger.h 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/数据/YTHsharedManger.m 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/数据/lib/LXAlertView/SearchCouponView.h 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/数据/lib/LXAlertView/SearchCouponView.m 290 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/数据/lib/LXAlertView/SearchTip.m 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/数据/lib/LXAlertView/ShareAppView/ShareAppCell.h 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/数据/lib/LXAlertView/ShareAppView/ShareAppCell.m 93 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/数据/lib/LXAlertView/ShareAppView/ShareAppView.h 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/数据/lib/LXAlertView/ShareAppView/ShareAppView.m 238 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/数据/lib/ptotoBrowser/HZPhotoBrowser.bundle/whiteplaceholder.png 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/数据/lib/ptotoBrowser/HZPhotoBrowser.h 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/数据/lib/ptotoBrowser/HZPhotoBrowser.m 651 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/数据/lib/ptotoBrowser/HZPhotoBrowserConfig.h 66 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/数据/lib/ptotoBrowser/HZPhotoBrowserView.h 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/数据/lib/ptotoBrowser/HZPhotoBrowserView.m 229 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/数据/lib/ptotoBrowser/HZWaitingView.h 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/数据/lib/ptotoBrowser/HZWaitingView.m 87 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/ALBaseController.h 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/ALBaseController.m 159 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/MainBaseController.h 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/MainBaseController.m 106 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/SJBaseViewController.h 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/SJBaseViewController.m 119 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/优惠券/classificationViewController.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/优惠券/classificationViewController.m 208 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/优惠券/推荐/RecommendCouponViewController.h 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/优惠券/推荐/RecommendCouponViewController.m 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/优惠券/推荐/SJRecommendCouponCell.xib 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/动态/DynamicTableViewCell.m 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/动态/DynamicViewController.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/动态/DynamicViewController.m 282 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/我的/MineToolBarTableViewCell.h 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/我的/MineToolBarTableViewCell.m 85 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/我的/MineToolBarTableViewCell.xib 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/我的/MineViewController.m 363 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/我的/balance/BalanceViewController.m 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/我的/complain/ComplainViewController.xib 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/搜索/YTHSearchTextField.m 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/搜索/searchDetailViewController.m 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/搜索/searchViewController.m 218 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/网页视图/OrderViewController.m 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/网页视图/商品详情/ButtomCarView.m 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/购物车/shoppingCartViewController.m 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/首页/ListViewController.h 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/首页/ListViewController.m 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/首页/NEWHomeViewController.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/首页/NEWHomeViewController.m 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/首页/recommendCollectionViewCell.h 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/首页/recommendCollectionViewCell.m 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/首页/recommendCollectionViewCell.xib 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/首页/recommendViewController.h 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo/界面/首页/recommendViewController.m 69 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MIduo.xcodeproj/project.pbxproj
@@ -381,8 +381,6 @@
        1896F2731FD0EDB5009D6EEF /* OtherCouponViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1896F2711FD0EDB5009D6EEF /* OtherCouponViewController.xib */; };
        1896F2811FD10437009D6EEF /* CoupleCollectionReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1896F27F1FD10437009D6EEF /* CoupleCollectionReusableView.m */; };
        1896F2821FD10437009D6EEF /* CoupleCollectionReusableView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1896F2801FD10437009D6EEF /* CoupleCollectionReusableView.xib */; };
        189711CE1FCF9B1200B5393A /* MineToolBarTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 189711CC1FCF9B1200B5393A /* MineToolBarTableViewCell.m */; };
        189711CF1FCF9B1200B5393A /* MineToolBarTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 189711CD1FCF9B1200B5393A /* MineToolBarTableViewCell.xib */; };
        189711D21FCFA16600B5393A /* ZXButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 189711D11FCFA16600B5393A /* ZXButton.m */; };
        189711DE1FD0090400B5393A /* CollectionViewHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 189711D71FD0090300B5393A /* CollectionViewHeaderView.m */; };
        189711DF1FD0090400B5393A /* LJCollectionViewFlowLayout.m in Sources */ = {isa = PBXBuildFile; fileRef = 189711DA1FD0090300B5393A /* LJCollectionViewFlowLayout.m */; };
@@ -484,6 +482,8 @@
        2D00BC78211A9A7300C129D7 /* NEWHomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D00BC77211A9A7200C129D7 /* NEWHomeViewController.m */; };
        2D08C10B20BFCE2C00A2423B /* LoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D08C10820BFCE2900A2423B /* LoginViewController.m */; };
        2D08C10C20BFCE2C00A2423B /* LoginViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2D08C10920BFCE2B00A2423B /* LoginViewController.xib */; };
        2D09AC63212A5AAB000F4160 /* ALNetWorking.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D09AC62212A5AAB000F4160 /* ALNetWorking.m */; };
        2D09AC66212ABB51000F4160 /* MineToolBarTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D09AC65212ABB51000F4160 /* MineToolBarTableViewCell.m */; };
        2D0A297720C54CAF00A51A55 /* SJRemoveBoundView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D0A297620C54CAF00A51A55 /* SJRemoveBoundView.m */; };
        2D0D7D1220BFF51B009D5D48 /* MineThirdTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D0D7D1020BFF51B009D5D48 /* MineThirdTableViewCell.m */; };
        2D0D7D1320BFF51B009D5D48 /* MineThirdTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2D0D7D1120BFF51B009D5D48 /* MineThirdTableViewCell.xib */; };
@@ -495,10 +495,17 @@
        2D1175B121199F4000D4CD0F /* ObtainProperty.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D1175AB21199F3F00D4CD0F /* ObtainProperty.m */; };
        2D1175B221199F4000D4CD0F /* PlistFileOperator.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D1175AC21199F3F00D4CD0F /* PlistFileOperator.m */; };
        2D1175B321199F4000D4CD0F /* FileOperator.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D1175AE21199F4000D4CD0F /* FileOperator.m */; };
        2D15A76D212D3640005C0CAC /* ShareAppView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D15A76C212D3640005C0CAC /* ShareAppView.m */; };
        2D15A771212D3FEE005C0CAC /* ShareAppCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D15A770212D3FEE005C0CAC /* ShareAppCell.m */; };
        2D1C962A20DF5EDF00D6DBDC /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D1C962920DF5EDE00D6DBDC /* CoreMotion.framework */; };
        2D222B1E20C77D7200D444C3 /* UIViewController+Tools.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D222B1D20C77D7100D444C3 /* UIViewController+Tools.m */; };
        2D2392DD2105ABC900C78B5F /* CustomProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D2392DC2105ABC900C78B5F /* CustomProgressHUD.m */; };
        2D2392E02105B1FB00C78B5F /* Algorithm.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D2392DF2105B1FB00C78B5F /* Algorithm.m */; };
        2D24A114212BBEDD00BEC4BB /* SearchCouponView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D24A113212BBEDD00BEC4BB /* SearchCouponView.m */; };
        2D24A11E212C16F100BEC4BB /* HZPhotoBrowser.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 2D24A116212C16F100BEC4BB /* HZPhotoBrowser.bundle */; };
        2D24A11F212C16F100BEC4BB /* HZPhotoBrowser.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D24A118212C16F100BEC4BB /* HZPhotoBrowser.m */; };
        2D24A120212C16F100BEC4BB /* HZPhotoBrowserView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D24A11B212C16F100BEC4BB /* HZPhotoBrowserView.m */; };
        2D24A121212C16F100BEC4BB /* HZWaitingView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D24A11D212C16F100BEC4BB /* HZWaitingView.m */; };
        2D37FC4420C0E1AB00E11051 /* AddIncarnateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D37FC4220C0E1AB00E11051 /* AddIncarnateViewController.m */; };
        2D37FC4520C0E1AB00E11051 /* AddIncarnateViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2D37FC4320C0E1AB00E11051 /* AddIncarnateViewController.xib */; };
        2D37FC4920C0F75000E11051 /* ModifyAccountViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D37FC4720C0F75000E11051 /* ModifyAccountViewController.m */; };
@@ -536,6 +543,8 @@
        2D9F158D2117E8E800EFFAFB /* test.html in Resources */ = {isa = PBXBuildFile; fileRef = 2D9F15862117E8E800EFFAFB /* test.html */; };
        2D9F15902117E91400EFFAFB /* ShonpingShareViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D9F158F2117E91400EFFAFB /* ShonpingShareViewController.m */; };
        2D9F279620E2404200643E5A /* Mainhot.gif in Resources */ = {isa = PBXBuildFile; fileRef = 2D9F279520E2404100643E5A /* Mainhot.gif */; };
        2DD814D2212E47BD0029B5D7 /* MainBaseController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DD814D1212E47BD0029B5D7 /* MainBaseController.m */; };
        2DD814D8212E499B0029B5D7 /* ALBaseController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DD814D7212E499B0029B5D7 /* ALBaseController.m */; };
        2DEAE78220EC6748003349B4 /* SJNetwork.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DEAE78120EC6748003349B4 /* SJNetwork.m */; };
        2DEF568120FF20990071C985 /* SJTipView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DEF568020FF20990071C985 /* SJTipView.m */; };
        2DEF568420FF36620071C985 /* SJBaseViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DEF568320FF36620071C985 /* SJBaseViewController.m */; };
@@ -1263,9 +1272,6 @@
        1896F27E1FD10437009D6EEF /* CoupleCollectionReusableView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CoupleCollectionReusableView.h; sourceTree = "<group>"; };
        1896F27F1FD10437009D6EEF /* CoupleCollectionReusableView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CoupleCollectionReusableView.m; sourceTree = "<group>"; };
        1896F2801FD10437009D6EEF /* CoupleCollectionReusableView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CoupleCollectionReusableView.xib; sourceTree = "<group>"; };
        189711CB1FCF9B1200B5393A /* MineToolBarTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MineToolBarTableViewCell.h; sourceTree = "<group>"; };
        189711CC1FCF9B1200B5393A /* MineToolBarTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MineToolBarTableViewCell.m; sourceTree = "<group>"; };
        189711CD1FCF9B1200B5393A /* MineToolBarTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MineToolBarTableViewCell.xib; sourceTree = "<group>"; };
        189711D01FCFA16600B5393A /* ZXButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ZXButton.h; sourceTree = "<group>"; };
        189711D11FCFA16600B5393A /* ZXButton.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZXButton.m; sourceTree = "<group>"; };
        189711D61FD0090300B5393A /* CollectionViewHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CollectionViewHeaderView.h; path = "MIduo/界面/首页/CollectionViewHeaderView.h"; sourceTree = SOURCE_ROOT; };
@@ -1440,6 +1446,10 @@
        2D08C10820BFCE2900A2423B /* LoginViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LoginViewController.m; sourceTree = "<group>"; };
        2D08C10920BFCE2B00A2423B /* LoginViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LoginViewController.xib; sourceTree = "<group>"; };
        2D08C10A20BFCE2C00A2423B /* LoginViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoginViewController.h; sourceTree = "<group>"; };
        2D09AC61212A5AAB000F4160 /* ALNetWorking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALNetWorking.h; sourceTree = "<group>"; };
        2D09AC62212A5AAB000F4160 /* ALNetWorking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ALNetWorking.m; sourceTree = "<group>"; };
        2D09AC64212ABB51000F4160 /* MineToolBarTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MineToolBarTableViewCell.h; sourceTree = "<group>"; };
        2D09AC65212ABB51000F4160 /* MineToolBarTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MineToolBarTableViewCell.m; sourceTree = "<group>"; };
        2D0A297520C54CAF00A51A55 /* SJRemoveBoundView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SJRemoveBoundView.h; sourceTree = "<group>"; };
        2D0A297620C54CAF00A51A55 /* SJRemoveBoundView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SJRemoveBoundView.m; sourceTree = "<group>"; };
        2D0D7D0F20BFF51B009D5D48 /* MineThirdTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MineThirdTableViewCell.h; sourceTree = "<group>"; };
@@ -1460,6 +1470,10 @@
        2D1175AE21199F4000D4CD0F /* FileOperator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FileOperator.m; sourceTree = "<group>"; };
        2D1175AF21199F4000D4CD0F /* PlistFileOperator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlistFileOperator.h; sourceTree = "<group>"; };
        2D1175B021199F4000D4CD0F /* ObtainProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObtainProperty.h; sourceTree = "<group>"; };
        2D15A76B212D3640005C0CAC /* ShareAppView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShareAppView.h; sourceTree = "<group>"; };
        2D15A76C212D3640005C0CAC /* ShareAppView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ShareAppView.m; sourceTree = "<group>"; };
        2D15A76F212D3FEE005C0CAC /* ShareAppCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ShareAppCell.h; sourceTree = "<group>"; };
        2D15A770212D3FEE005C0CAC /* ShareAppCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ShareAppCell.m; sourceTree = "<group>"; };
        2D1C962920DF5EDE00D6DBDC /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
        2D222B1C20C77D7000D444C3 /* UIViewController+Tools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIViewController+Tools.h"; sourceTree = "<group>"; };
        2D222B1D20C77D7100D444C3 /* UIViewController+Tools.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIViewController+Tools.m"; sourceTree = "<group>"; };
@@ -1467,6 +1481,16 @@
        2D2392DC2105ABC900C78B5F /* CustomProgressHUD.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CustomProgressHUD.m; sourceTree = "<group>"; };
        2D2392DE2105B1FA00C78B5F /* Algorithm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Algorithm.h; sourceTree = "<group>"; };
        2D2392DF2105B1FB00C78B5F /* Algorithm.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Algorithm.m; sourceTree = "<group>"; };
        2D24A112212BBEDD00BEC4BB /* SearchCouponView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SearchCouponView.h; sourceTree = "<group>"; };
        2D24A113212BBEDD00BEC4BB /* SearchCouponView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SearchCouponView.m; sourceTree = "<group>"; };
        2D24A116212C16F100BEC4BB /* HZPhotoBrowser.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = HZPhotoBrowser.bundle; sourceTree = "<group>"; };
        2D24A117212C16F100BEC4BB /* HZPhotoBrowser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HZPhotoBrowser.h; sourceTree = "<group>"; };
        2D24A118212C16F100BEC4BB /* HZPhotoBrowser.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HZPhotoBrowser.m; sourceTree = "<group>"; };
        2D24A119212C16F100BEC4BB /* HZPhotoBrowserConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HZPhotoBrowserConfig.h; sourceTree = "<group>"; };
        2D24A11A212C16F100BEC4BB /* HZPhotoBrowserView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HZPhotoBrowserView.h; sourceTree = "<group>"; };
        2D24A11B212C16F100BEC4BB /* HZPhotoBrowserView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HZPhotoBrowserView.m; sourceTree = "<group>"; };
        2D24A11C212C16F100BEC4BB /* HZWaitingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HZWaitingView.h; sourceTree = "<group>"; };
        2D24A11D212C16F100BEC4BB /* HZWaitingView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HZWaitingView.m; sourceTree = "<group>"; };
        2D37FC4120C0E1AB00E11051 /* AddIncarnateViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AddIncarnateViewController.h; sourceTree = "<group>"; };
        2D37FC4220C0E1AB00E11051 /* AddIncarnateViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AddIncarnateViewController.m; sourceTree = "<group>"; };
        2D37FC4320C0E1AB00E11051 /* AddIncarnateViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AddIncarnateViewController.xib; sourceTree = "<group>"; };
@@ -1526,6 +1550,10 @@
        2D9F158E2117E91400EFFAFB /* ShonpingShareViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShonpingShareViewController.h; sourceTree = "<group>"; };
        2D9F158F2117E91400EFFAFB /* ShonpingShareViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ShonpingShareViewController.m; sourceTree = "<group>"; };
        2D9F279520E2404100643E5A /* Mainhot.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = Mainhot.gif; sourceTree = "<group>"; };
        2DD814D0212E47BD0029B5D7 /* MainBaseController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MainBaseController.h; sourceTree = "<group>"; };
        2DD814D1212E47BD0029B5D7 /* MainBaseController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MainBaseController.m; sourceTree = "<group>"; };
        2DD814D6212E499B0029B5D7 /* ALBaseController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ALBaseController.h; sourceTree = "<group>"; };
        2DD814D7212E499B0029B5D7 /* ALBaseController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ALBaseController.m; sourceTree = "<group>"; };
        2DEAE78020EC6748003349B4 /* SJNetwork.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SJNetwork.h; sourceTree = "<group>"; };
        2DEAE78120EC6748003349B4 /* SJNetwork.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SJNetwork.m; sourceTree = "<group>"; };
        2DEF567F20FF20990071C985 /* SJTipView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SJTipView.h; sourceTree = "<group>"; };
@@ -1779,12 +1807,15 @@
                18956EBE1FD64A03001531A1 /* TipView.m */,
                18B30CC91FDA2937009A235C /* SearchTip.h */,
                18B30CC81FDA2936009A235C /* SearchTip.m */,
                2D24A112212BBEDD00BEC4BB /* SearchCouponView.h */,
                2D24A113212BBEDD00BEC4BB /* SearchCouponView.m */,
                2D37FC6620C14C2300E11051 /* SJLoginTaoBao.h */,
                2D37FC6720C14C2300E11051 /* SJLoginTaoBao.m */,
                2D00BC74211A795300C129D7 /* SJNoNetwork.h */,
                2D00BC75211A795300C129D7 /* SJNoNetwork.m */,
                2D43E74C211D92790008BA48 /* ALAnomalyNetWorkView.h */,
                2D43E74D211D92790008BA48 /* ALAnomalyNetWorkView.m */,
                2D15A76E212D3FB3005C0CAC /* ShareAppView */,
            );
            path = LXAlertView;
            sourceTree = "<group>";
@@ -2854,9 +2885,8 @@
                188E95521E5C436400F0F895 /* MineHelperTableViewCell.h */,
                188E95531E5C436400F0F895 /* MineHelperTableViewCell.m */,
                188E95541E5C436400F0F895 /* MineHelperTableViewCell.xib */,
                189711CB1FCF9B1200B5393A /* MineToolBarTableViewCell.h */,
                189711CC1FCF9B1200B5393A /* MineToolBarTableViewCell.m */,
                189711CD1FCF9B1200B5393A /* MineToolBarTableViewCell.xib */,
                2D09AC64212ABB51000F4160 /* MineToolBarTableViewCell.h */,
                2D09AC65212ABB51000F4160 /* MineToolBarTableViewCell.m */,
                2D0D7D0F20BFF51B009D5D48 /* MineThirdTableViewCell.h */,
                2D0D7D1020BFF51B009D5D48 /* MineThirdTableViewCell.m */,
                2D0D7D1120BFF51B009D5D48 /* MineThirdTableViewCell.xib */,
@@ -3123,6 +3153,10 @@
                18AC534D1E5A92B7006D1FDF /* BaseNavigationController.m */,
                2DEF568220FF36620071C985 /* SJBaseViewController.h */,
                2DEF568320FF36620071C985 /* SJBaseViewController.m */,
                2DD814D0212E47BD0029B5D7 /* MainBaseController.h */,
                2DD814D1212E47BD0029B5D7 /* MainBaseController.m */,
                2DD814D6212E499B0029B5D7 /* ALBaseController.h */,
                2DD814D7212E499B0029B5D7 /* ALBaseController.m */,
                2D37FC5620C126AD00E11051 /* åŠ¨æ€ */,
                1845E052207A019C00EB1571 /* é‚€è¯· */,
                18AC534B1E5A9186006D1FDF /* é¦–页 */,
@@ -3219,6 +3253,8 @@
                18AC53821E5A9840006D1FDF /* YTHNetInterface.m */,
                18603038206A1F4E0016DA6F /* JYNetWorking.h */,
                18603037206A1F4E0016DA6F /* JYNetWorking.m */,
                2D09AC61212A5AAB000F4160 /* ALNetWorking.h */,
                2D09AC62212A5AAB000F4160 /* ALNetWorking.m */,
            );
            path = DataNet;
            sourceTree = "<group>";
@@ -3226,6 +3262,7 @@
        18AC538B1E5A9876006D1FDF /* lib */ = {
            isa = PBXGroup;
            children = (
                2D24A115212C16F100BEC4BB /* ptotoBrowser */,
                2D1175AA21199F2700D4CD0F /* FileManger */,
                2D9F157B2117E8E800EFFAFB /* EasyJSWebView-master */,
                1845C239209C562C009C639B /* LBXScan */,
@@ -3454,6 +3491,32 @@
            path = FileManger;
            sourceTree = "<group>";
        };
        2D15A76E212D3FB3005C0CAC /* ShareAppView */ = {
            isa = PBXGroup;
            children = (
                2D15A76B212D3640005C0CAC /* ShareAppView.h */,
                2D15A76C212D3640005C0CAC /* ShareAppView.m */,
                2D15A76F212D3FEE005C0CAC /* ShareAppCell.h */,
                2D15A770212D3FEE005C0CAC /* ShareAppCell.m */,
            );
            path = ShareAppView;
            sourceTree = "<group>";
        };
        2D24A115212C16F100BEC4BB /* ptotoBrowser */ = {
            isa = PBXGroup;
            children = (
                2D24A116212C16F100BEC4BB /* HZPhotoBrowser.bundle */,
                2D24A117212C16F100BEC4BB /* HZPhotoBrowser.h */,
                2D24A118212C16F100BEC4BB /* HZPhotoBrowser.m */,
                2D24A119212C16F100BEC4BB /* HZPhotoBrowserConfig.h */,
                2D24A11A212C16F100BEC4BB /* HZPhotoBrowserView.h */,
                2D24A11B212C16F100BEC4BB /* HZPhotoBrowserView.m */,
                2D24A11C212C16F100BEC4BB /* HZWaitingView.h */,
                2D24A11D212C16F100BEC4BB /* HZWaitingView.m */,
            );
            path = ptotoBrowser;
            sourceTree = "<group>";
        };
        2D37FC5620C126AD00E11051 /* åŠ¨æ€ */ = {
            isa = PBXGroup;
            children = (
@@ -3611,6 +3674,7 @@
                18332E0B207DE7B3002C6626 /* ServiceTableViewCell.xib in Resources */,
                18360AFE206CBB3400F9EAB1 /* MinMessDetailViewController.xib in Resources */,
                18D4305C1E7A30770007CCB5 /* FilterCommonCollectionViewCell.xib in Resources */,
                2D24A11E212C16F100BEC4BB /* HZPhotoBrowser.bundle in Resources */,
                1839BF3B20844C0100FD7104 /* WeiboSDK.bundle in Resources */,
                188E95411E5C237E00F0F895 /* FooterCollectionReusableView.xib in Resources */,
                2D4DF1B320EDF0E60043C545 /* SJKitingViewController.xib in Resources */,
@@ -3644,7 +3708,6 @@
                18E5ADFB1E5EC8B3009F85E0 /* SettingViewController.xib in Resources */,
                2D08C10C20BFCE2C00A2423B /* LoginViewController.xib in Resources */,
                1845C440209C562D009C639B /* COPYING in Resources */,
                189711CF1FCF9B1200B5393A /* MineToolBarTableViewCell.xib in Resources */,
                2D6858F520DB5D8B00E4376A /* SJCouponCollectionViewCell.xib in Resources */,
                1839BF3E20844C0100FD7104 /* ShareSDK.bundle in Resources */,
                2D4DF1A920EDB2E10043C545 /* SJStoreTableViewCell.xib in Resources */,
@@ -3844,6 +3907,7 @@
                1845C4CF209C562E009C639B /* ZXCodaBarReader.m in Sources */,
                18966CAA20AD7F6A004CD297 /* GDrecomeTableViewCell.m in Sources */,
                1845C504209C562E009C639B /* ZXQRCodeDataMask.m in Sources */,
                2D15A76D212D3640005C0CAC /* ShareAppView.m in Sources */,
                1845C4B6209C562E009C639B /* ZXAI01393xDecoder.m in Sources */,
                2D0DF78C20C642AE002BB619 /* SJUnbindPhoneViewController.m in Sources */,
                1897D9A61E5FDB44003DF6FE /* searchDetailViewController.m in Sources */,
@@ -3883,11 +3947,13 @@
                1845C4C9209C562E009C639B /* ZXAbstractRSSReader.m in Sources */,
                2D92BE8E20DA0DA2007F1C3F /* UIView+SJTools.m in Sources */,
                18E7C7901EB9ABCC00A02A14 /* PraiseView.m in Sources */,
                2D15A771212D3FEE005C0CAC /* ShareAppCell.m in Sources */,
                1845C589209C6450009C639B /* MyQRViewController.m in Sources */,
                1845C459209C562D009C639B /* ZXExpandedProductResultParser.m in Sources */,
                1892034820BE51C6008C1045 /* ZXingWrapper.m in Sources */,
                1845C4B9209C562E009C639B /* ZXAI01AndOtherAIs.m in Sources */,
                1845C484209C562D009C639B /* ZXDetectorResult.m in Sources */,
                2D24A114212BBEDD00BEC4BB /* SearchCouponView.m in Sources */,
                18B30CCA1FDA2937009A235C /* SearchTip.m in Sources */,
                1845C453209C562D009C639B /* ZXBookmarkDoCoMoResultParser.m in Sources */,
                18AC53901E5A9C2D006D1FDF /* GTMBase64.m in Sources */,
@@ -3952,8 +4018,10 @@
                18AC539C1E5AC874006D1FDF /* shufflingCollectionReusableView.m in Sources */,
                1845C483209C562D009C639B /* ZXDefaultGridSampler.m in Sources */,
                1845C4FF209C562E009C639B /* ZXPDF417Reader.m in Sources */,
                2D24A121212C16F100BEC4BB /* HZWaitingView.m in Sources */,
                1845C4D0209C562E009C639B /* ZXCodaBarWriter.m in Sources */,
                1845C511209C562E009C639B /* ZXQRCodeFinderPatternInfo.m in Sources */,
                2DD814D8212E499B0029B5D7 /* ALBaseController.m in Sources */,
                2DEF568420FF36620071C985 /* SJBaseViewController.m in Sources */,
                1845C516209C562E009C639B /* ZXQRCodeMatrixUtil.m in Sources */,
                1845C4A0209C562D009C639B /* ZXDataMatrixC40Encoder.m in Sources */,
@@ -4019,7 +4087,6 @@
                1845C444209C562D009C639B /* ZXAztecBinaryShiftToken.m in Sources */,
                1845C4D3209C562E009C639B /* ZXCode39Reader.m in Sources */,
                1845C479209C562D009C639B /* ZXGenericGFPoly.m in Sources */,
                189711CE1FCF9B1200B5393A /* MineToolBarTableViewCell.m in Sources */,
                2D08C10B20BFCE2C00A2423B /* LoginViewController.m in Sources */,
                1845C4E1209C562E009C639B /* ZXUPCAReader.m in Sources */,
                1845C4A8209C562E009C639B /* ZXDataMatrixTextEncoder.m in Sources */,
@@ -4062,6 +4129,7 @@
                1845C478209C562D009C639B /* ZXGenericGF.m in Sources */,
                1845C44E209C562D009C639B /* ZXAbstractDoCoMoResultParser.m in Sources */,
                1845C4E6209C562E009C639B /* ZXUPCEANReader.m in Sources */,
                2D09AC66212ABB51000F4160 /* MineToolBarTableViewCell.m in Sources */,
                1845C487209C562D009C639B /* ZXHybridBinarizer.m in Sources */,
                1845C494209C562D009C639B /* ZXPlanarYUVLuminanceSource.m in Sources */,
                1845C4FD209C562E009C639B /* ZXPDF417HighLevelEncoder.m in Sources */,
@@ -4099,6 +4167,7 @@
                18AC53AB1E5ACE45006D1FDF /* HeaderCollectionReusableView.m in Sources */,
                1836507F206E19AA001D6651 /* IncarnateViewController.m in Sources */,
                188E954B1E5C42F100F0F895 /* MineRedEnvelopesTableViewCell.m in Sources */,
                2D09AC63212A5AAB000F4160 /* ALNetWorking.m in Sources */,
                1845C45F209C562D009C639B /* ZXProductParsedResult.m in Sources */,
                1845C475209C562D009C639B /* ZXMathUtils.m in Sources */,
                2D1175B221199F4000D4CD0F /* PlistFileOperator.m in Sources */,
@@ -4108,6 +4177,7 @@
                1845C4A5209C562E009C639B /* ZXDataMatrixHighLevelEncoder.m in Sources */,
                18D430431E7A2D1F0007CCB5 /* SideSlipCommonTableViewCell.m in Sources */,
                18FB09AA206B904300006656 /* BalanceViewController.m in Sources */,
                2D24A11F212C16F100BEC4BB /* HZPhotoBrowser.m in Sources */,
                18966CA920AD7F6A004CD297 /* GDetailView.m in Sources */,
                18AC532C1E5A8F01006D1FDF /* main.m in Sources */,
                1894B3A720A003590058A35B /* CodeFieldViewController.m in Sources */,
@@ -4152,6 +4222,7 @@
                1845C472209C562D009C639B /* ZXCapture.m in Sources */,
                18AC53A61E5ACCD8006D1FDF /* recommendCollectionViewCell.m in Sources */,
                1845C4F7209C562E009C639B /* ZXPDF417DetectorResult.m in Sources */,
                2D24A120212C16F100BEC4BB /* HZPhotoBrowserView.m in Sources */,
                1845C4C8209C562E009C639B /* ZXRSSExpandedRow.m in Sources */,
                18332E0A207DE7B3002C6626 /* ServiceTableViewCell.m in Sources */,
                18AE875C1FE38439005DB018 /* TCollectionViewCell.m in Sources */,
@@ -4207,6 +4278,7 @@
                1845C4AB209C562E009C639B /* ZXDataMatrixWriter.m in Sources */,
                1894E7F620B6C73F00C28F33 /* XHWebImageAutoSizeConst.m in Sources */,
                1845C4EC209C562E009C639B /* ZXPDF417BarcodeMetadata.m in Sources */,
                2DD814D2212E47BD0029B5D7 /* MainBaseController.m in Sources */,
                18360AFD206CBB3400F9EAB1 /* MinMessDetailViewController.m in Sources */,
            );
            runOnlyForDeploymentPostprocessing = 0;
MIduo.xcworkspace/xcuserdata/mj.xcuserdatad/UserInterfaceState.xcuserstate
Binary files differ
MIduo.xcworkspace/xcuserdata/mj.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
@@ -6,7 +6,7 @@
      <BreakpointProxy
         BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
         <BreakpointContent
            shouldBeEnabled = "No"
            shouldBeEnabled = "Yes"
            ignoreCount = "0"
            continueAfterRunningActions = "No"
            scope = "0"
@@ -19,187 +19,29 @@
            shouldBeEnabled = "Yes"
            ignoreCount = "0"
            continueAfterRunningActions = "No"
            filePath = "MIduo/&#x754c;&#x9762;/&#x6211;&#x7684;/MergeAccountViewController.h"
            timestampString = "555402530.7800241"
            filePath = "MIduo/&#x754c;&#x9762;/&#x9996;&#x9875;/recommendViewController.m"
            timestampString = "556703371.057799"
            startingColumnNumber = "9223372036854775807"
            endingColumnNumber = "9223372036854775807"
            startingLineNumber = "28"
            endingLineNumber = "28">
         </BreakpointContent>
      </BreakpointProxy>
      <BreakpointProxy
         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
         <BreakpointContent
            shouldBeEnabled = "Yes"
            ignoreCount = "0"
            continueAfterRunningActions = "No"
            filePath = "MIduo/&#x754c;&#x9762;/&#x6211;&#x7684;/LoginViewController.m"
            timestampString = "556015784.412843"
            startingColumnNumber = "9223372036854775807"
            endingColumnNumber = "9223372036854775807"
            startingLineNumber = "562"
            endingLineNumber = "562"
            landmarkName = "-WeChatHasLoged:"
            startingLineNumber = "538"
            endingLineNumber = "538"
            landmarkName = "-collectionView:didSelectItemAtIndexPath:"
            landmarkType = "7">
         </BreakpointContent>
      </BreakpointProxy>
      <BreakpointProxy
         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
         <BreakpointContent
            shouldBeEnabled = "Yes"
            shouldBeEnabled = "No"
            ignoreCount = "0"
            continueAfterRunningActions = "No"
            filePath = "MIduo/&#x754c;&#x9762;/&#x6211;&#x7684;/MineViewController.m"
            timestampString = "556193666.6095949"
            filePath = "MIduo/&#x754c;&#x9762;/&#x9996;&#x9875;/recommendViewController.m"
            timestampString = "556703371.057916"
            startingColumnNumber = "9223372036854775807"
            endingColumnNumber = "9223372036854775807"
            startingLineNumber = "679"
            endingLineNumber = "679"
            landmarkName = "-noticeOrderOrShopCarBackWithLoginVc"
            landmarkType = "7">
         </BreakpointContent>
      </BreakpointProxy>
      <BreakpointProxy
         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
         <BreakpointContent
            shouldBeEnabled = "Yes"
            ignoreCount = "0"
            continueAfterRunningActions = "No"
            filePath = "../SGNetObserver-master/SGNetObserver/SGNetObserver.m"
            timestampString = "555902137.230881"
            startingColumnNumber = "9223372036854775807"
            endingColumnNumber = "9223372036854775807"
            startingLineNumber = "77"
            endingLineNumber = "77"
            landmarkName = "-networkStatusDidChanged"
            landmarkType = "7">
         </BreakpointContent>
      </BreakpointProxy>
      <BreakpointProxy
         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
         <BreakpointContent
            shouldBeEnabled = "Yes"
            ignoreCount = "0"
            continueAfterRunningActions = "No"
            filePath = "MIduo/&#x754c;&#x9762;/&#x6211;&#x7684;/SJUnbindPhoneViewController.m"
            timestampString = "555922371.278873"
            startingColumnNumber = "9223372036854775807"
            endingColumnNumber = "9223372036854775807"
            startingLineNumber = "101"
            endingLineNumber = "101"
            landmarkName = "-unBindPhonewithPhoneString:"
            landmarkType = "7">
            <Locations>
               <Location
                  shouldBeEnabled = "Yes"
                  ignoreCount = "0"
                  continueAfterRunningActions = "No"
                  symbolName = "__58-[SJUnbindPhoneViewController unBindPhonewithPhoneString:]_block_invoke"
                  moduleName = "MIduo"
                  usesParentBreakpointCondition = "Yes"
                  urlString = "file:///Users/mj/Desktop/haicaojie/MIduo/%E7%95%8C%E9%9D%A2/%E6%88%91%E7%9A%84/SJUnbindPhoneViewController.m"
                  timestampString = "556193672.6899689"
                  startingColumnNumber = "9223372036854775807"
                  endingColumnNumber = "9223372036854775807"
                  startingLineNumber = "101"
                  endingLineNumber = "101"
                  offsetFromSymbolStart = "508">
               </Location>
               <Location
                  shouldBeEnabled = "Yes"
                  ignoreCount = "0"
                  continueAfterRunningActions = "No"
                  symbolName = "__58-[SJUnbindPhoneViewController unBindPhonewithPhoneString:]_block_invoke_2"
                  moduleName = "MIduo"
                  usesParentBreakpointCondition = "Yes"
                  urlString = "file:///Users/mj/Desktop/haicaojie/MIduo/%E7%95%8C%E9%9D%A2/%E6%88%91%E7%9A%84/SJUnbindPhoneViewController.m"
                  timestampString = "556193672.691522"
                  startingColumnNumber = "9223372036854775807"
                  endingColumnNumber = "9223372036854775807"
                  startingLineNumber = "101"
                  endingLineNumber = "101"
                  offsetFromSymbolStart = "36">
               </Location>
            </Locations>
         </BreakpointContent>
      </BreakpointProxy>
      <BreakpointProxy
         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
         <BreakpointContent
            shouldBeEnabled = "Yes"
            ignoreCount = "0"
            continueAfterRunningActions = "No"
            filePath = "MIduo/&#x754c;&#x9762;/&#x6211;&#x7684;/SJUnbindPhoneViewController.m"
            timestampString = "555922374.87973"
            startingColumnNumber = "9223372036854775807"
            endingColumnNumber = "9223372036854775807"
            startingLineNumber = "104"
            endingLineNumber = "104"
            landmarkName = "-unBindPhonewithPhoneString:"
            landmarkType = "7">
         </BreakpointContent>
      </BreakpointProxy>
      <BreakpointProxy
         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
         <BreakpointContent
            shouldBeEnabled = "Yes"
            ignoreCount = "0"
            continueAfterRunningActions = "No"
            filePath = "MIduo/&#x754c;&#x9762;/&#x9080;&#x8bf7;/&#x5546;&#x54c1;&#x5206;&#x4eab;/ShonpingShareViewController.m"
            timestampString = "556015784.412999"
            startingColumnNumber = "9223372036854775807"
            endingColumnNumber = "9223372036854775807"
            startingLineNumber = "546"
            endingLineNumber = "546"
            landmarkName = "-dealloc"
            landmarkType = "7">
         </BreakpointContent>
      </BreakpointProxy>
      <BreakpointProxy
         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
         <BreakpointContent
            shouldBeEnabled = "Yes"
            ignoreCount = "0"
            continueAfterRunningActions = "No"
            filePath = "MIduo/&#x754c;&#x9762;/&#x6211;&#x7684;/message/MineMessageViewController.m"
            timestampString = "556015784.413071"
            startingColumnNumber = "9223372036854775807"
            endingColumnNumber = "9223372036854775807"
            startingLineNumber = "77"
            endingLineNumber = "77"
            landmarkName = "-getMessage"
            landmarkType = "7">
         </BreakpointContent>
      </BreakpointProxy>
      <BreakpointProxy
         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
         <BreakpointContent
            shouldBeEnabled = "Yes"
            ignoreCount = "0"
            continueAfterRunningActions = "No"
            filePath = "MIduo/&#x754c;&#x9762;/&#x6211;&#x7684;/messageLogin/MessageLoginViewController.m"
            timestampString = "556015784.413177"
            startingColumnNumber = "9223372036854775807"
            endingColumnNumber = "9223372036854775807"
            startingLineNumber = "437"
            endingLineNumber = "437"
            landmarkName = "-sendMessage:"
            landmarkType = "7">
         </BreakpointContent>
      </BreakpointProxy>
      <BreakpointProxy
         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
         <BreakpointContent
            shouldBeEnabled = "Yes"
            ignoreCount = "0"
            continueAfterRunningActions = "No"
            filePath = "MIduo/&#x754c;&#x9762;/&#x6211;&#x7684;/SettingViewController.m"
            timestampString = "556015933.093775"
            startingColumnNumber = "9223372036854775807"
            endingColumnNumber = "9223372036854775807"
            startingLineNumber = "82"
            endingLineNumber = "82"
            landmarkName = "-fromBack:"
            startingLineNumber = "636"
            endingLineNumber = "636"
            landmarkName = "-collectionView:cellForItemAtIndexPath:"
            landmarkType = "7">
         </BreakpointContent>
      </BreakpointProxy>
MIduo/AppDelegate.m
@@ -207,9 +207,9 @@
    [dic setObject:[[NSUserDefaults standardUserDefaults] objectForKey:@"userId"] forKey:@"uid"];
    NSMutableDictionary * dictionary = [SJNetwork CommonDictionarywithDic:dic];
    [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP,@"push/uidBindDeviceToken"] param:dictionary isMainOrDynamic:YES success:^(NSDictionary *object) {
        NSLog(@"%@",object);
    } fail:^(id object) {
        NSLog(@"%@",object);
    }];
}
- (void)loadViews{
@@ -268,8 +268,7 @@
    NSMutableDictionary * dictionary = [SJNetwork CommonDictionarywithDic:dic];
    [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP,@"customer/findAccountMessageList"] param:dictionary isMainOrDynamic:YES success:^(NSDictionary *object) {
        NSLog(@"%@",object);
        //        NSInteger code = [object[@"code"]integerValue];
        NSDictionary *dic = object[@"data"];
        NSArray *array = dic[@"list"];
        BOOL bor = NO;
@@ -289,7 +288,7 @@
        }
        
    } fail:^(id object) {
        NSLog(@"%@",object);
    }];
}
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(NSDictionary<NSString *,id> *)options {
@@ -428,20 +427,17 @@
                                
                                stringByReplacingOccurrencesOfString:@" " withString:@""];
    
    NSLog(@"deviceTokenStr:\n%@",deviceTokenStr);
    [YTHsharedManger startManger].deviceToken = deviceTokenStr;
    NSMutableDictionary *dic = @{}.mutableCopy;
    [dic setObject:deviceTokenStr forKey:@"deviceToken"];
    NSLog(@"%@",[NSString stringWithFormat:@"%@/%@",domainHTTP,@"push/insertDeviceToken"]);
    NSMutableDictionary * dictionary = [SJNetwork CommonDictionarywithDic:dic];
    [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP,@"push/insertDeviceToken"] param:dictionary  isMainOrDynamic: YES success:^(NSDictionary *object) {
        NSLog(@"%@",object);
        //        NSInteger code = [object[@"code"]integerValue];
        //        [self.datasource removeAllObjects];
    } fail:^(id object) {
        NSLog(@"%@",object);
    }];
    if([[NSUserDefaults standardUserDefaults] objectForKey:@"userId"]!=nil){
        [self loginDeviceToken];
@@ -451,7 +447,7 @@
{
    // æ³¨å†ŒAPNS失败
    // è‡ªè¡Œå¤„理
    NSLog(@"%@",err);
}
/**
@@ -462,7 +458,7 @@
 */
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
//    UIApplicationStateActive åº”用程序处于前台
    NSLog(@"%@",userInfo);
    if(application.applicationState == UIApplicationStateActive){
        //程序当前正处于前台
@@ -499,7 +495,7 @@
 @param completionHandler å®Œæˆå›žè°ƒ
 */
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler {
    NSLog(@"[XGDemo] userinfo %@", userInfo);
    if(application.applicationState == UIApplicationStateActive){
        //程序当前正处于前台
        //发送本地通知
@@ -518,8 +514,8 @@
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_10_0
// App ç”¨æˆ·ç‚¹å‡»é€šçŸ¥çš„回调
// æ— è®ºæœ¬åœ°æŽ¨é€è¿˜æ˜¯è¿œç¨‹æŽ¨é€éƒ½ä¼šèµ°è¿™ä¸ªå›žè°ƒ
- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void(^)())completionHandler {
    NSLog(@"[XGDemo] click notification");
- (void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(nonnull void (^)(void))completionHandler{
    NSDictionary * userInfo = response.notification.request.content.userInfo;
    [YTHsharedManger startManger].infomation = userInfo;
    //    [[NSNotificationCenter defaultCenter] postNotification:notification];
@@ -607,7 +603,7 @@
/**
 *  é…ç½®å®¢æˆ·ç«¯ä¿¡æ¯
 */
-(void)getInfoFromCompany{
- (void)getInfoFromCompany {
    //判断之前是否缓存了用户信息
    NSFileManager *fileManager = [NSFileManager defaultManager];
    if ([fileManager fileExistsAtPath:USERINFOfILE]){
@@ -623,7 +619,7 @@
        if (isSuccessful) {
            NSUserDefaults *uid = [NSUserDefaults standardUserDefaults];
            NSArray *tempArr=[[result objectForKey:@"data"] objectForKey:@"systemClientParamsList"];
            for (int i=0; i<tempArr.count; i++) {
            for (int i = 0; i < tempArr.count; i++) {
                NSDictionary *tempDic=tempArr[i];
                [uid setObject:[tempDic objectForKey:@"value"] forKey:[tempDic objectForKey:@"key"]];
            }
MIduo/Assets.xcassets/ÎÒµÄ/QQºÃÓÑ.imageset/Contents.json
copy from "MIduo/Assets.xcassets/\346\210\221\347\232\204/\344\274\232\345\221\230\347\211\271\346\235\203.imageset/Contents.json" copy to "MIduo/Assets.xcassets/\346\210\221\347\232\204/QQ\345\245\275\345\217\213.imageset/Contents.json"
File was copied from MIduo/Assets.xcassets/ÎÒµÄ/»áÔ±ÌØÈ¨.imageset/Contents.json
@@ -6,12 +6,12 @@
    },
    {
      "idiom" : "universal",
      "filename" : "icon_会员特权@2x.png",
      "filename" : "QQ好友@2x.png",
      "scale" : "2x"
    },
    {
      "idiom" : "universal",
      "filename" : "icon_会员特权@3x.png",
      "filename" : "QQ好友@3x.png",
      "scale" : "3x"
    }
  ],
MIduo/Assets.xcassets/ÎÒµÄ/QQºÃÓÑ.imageset/QQºÃÓÑ@2x.png
MIduo/Assets.xcassets/ÎÒµÄ/QQºÃÓÑ.imageset/QQºÃÓÑ@3x.png
MIduo/Assets.xcassets/ÎÒµÄ/QQ¿Õ¼ä.imageset/Contents.json
File was renamed from MIduo/Assets.xcassets/ÎÒµÄ/»áÔ±ÌØÈ¨.imageset/Contents.json
@@ -6,12 +6,12 @@
    },
    {
      "idiom" : "universal",
      "filename" : "icon_会员特权@2x.png",
      "filename" : "QQ空间@2x.png",
      "scale" : "2x"
    },
    {
      "idiom" : "universal",
      "filename" : "icon_会员特权@3x.png",
      "filename" : "QQ空间@3x.png",
      "scale" : "3x"
    }
  ],
MIduo/Assets.xcassets/ÎÒµÄ/QQ¿Õ¼ä.imageset/QQ¿Õ¼ä@2x.png
MIduo/Assets.xcassets/ÎÒµÄ/QQ¿Õ¼ä.imageset/QQ¿Õ¼ä@3x.png
MIduo/Assets.xcassets/ÎÒµÄ/»áÔ±ÌØÈ¨.imageset/icon_»áÔ±ÌØÈ¨@2x.png
Binary files differ
MIduo/Assets.xcassets/ÎÒµÄ/»áÔ±ÌØÈ¨.imageset/icon_»áÔ±ÌØÈ¨@3x.png
Binary files differ
MIduo/Assets.xcassets/ÎÒµÄ/·ÖÏíAPP.imageset/Contents.json
copy from "MIduo/Assets.xcassets/\346\210\221\347\232\204/\344\274\232\345\221\230\347\211\271\346\235\203.imageset/Contents.json" copy to "MIduo/Assets.xcassets/\346\210\221\347\232\204/\345\210\206\344\272\253APP.imageset/Contents.json"
File was copied from MIduo/Assets.xcassets/ÎÒµÄ/»áÔ±ÌØÈ¨.imageset/Contents.json
@@ -6,12 +6,12 @@
    },
    {
      "idiom" : "universal",
      "filename" : "icon_会员特权@2x.png",
      "filename" : "分享APP@2x.png",
      "scale" : "2x"
    },
    {
      "idiom" : "universal",
      "filename" : "icon_会员特权@3x.png",
      "filename" : "分享APP@3x.png",
      "scale" : "3x"
    }
  ],
MIduo/Assets.xcassets/ÎÒµÄ/·ÖÏíAPP.imageset/·ÖÏíAPP@2x.png
MIduo/Assets.xcassets/ÎÒµÄ/·ÖÏíAPP.imageset/·ÖÏíAPP@3x.png
MIduo/Assets.xcassets/ÎÒµÄ/΢ÐźÃÓÑ.imageset/Contents.json
copy from "MIduo/Assets.xcassets/\346\210\221\347\232\204/\344\274\232\345\221\230\347\211\271\346\235\203.imageset/Contents.json" copy to "MIduo/Assets.xcassets/\346\210\221\347\232\204/\345\276\256\344\277\241\345\245\275\345\217\213.imageset/Contents.json"
File was copied from MIduo/Assets.xcassets/ÎÒµÄ/»áÔ±ÌØÈ¨.imageset/Contents.json
@@ -6,12 +6,12 @@
    },
    {
      "idiom" : "universal",
      "filename" : "icon_会员特权@2x.png",
      "filename" : "微信@2x.png",
      "scale" : "2x"
    },
    {
      "idiom" : "universal",
      "filename" : "icon_会员特权@3x.png",
      "filename" : "微信@3x.png",
      "scale" : "3x"
    }
  ],
MIduo/Assets.xcassets/ÎÒµÄ/΢ÐźÃÓÑ.imageset/΢ÐÅ@2x.png
MIduo/Assets.xcassets/ÎÒµÄ/΢ÐźÃÓÑ.imageset/΢ÐÅ@3x.png
MIduo/Assets.xcassets/ÎÒµÄ/ÐÂÀË΢²©.imageset/Contents.json
copy from "MIduo/Assets.xcassets/\346\210\221\347\232\204/\344\274\232\345\221\230\347\211\271\346\235\203.imageset/Contents.json" copy to "MIduo/Assets.xcassets/\346\210\221\347\232\204/\346\226\260\346\265\252\345\276\256\345\215\232.imageset/Contents.json"
File was copied from MIduo/Assets.xcassets/ÎÒµÄ/»áÔ±ÌØÈ¨.imageset/Contents.json
@@ -6,12 +6,12 @@
    },
    {
      "idiom" : "universal",
      "filename" : "icon_会员特权@2x.png",
      "filename" : "新浪微博@2x.png",
      "scale" : "2x"
    },
    {
      "idiom" : "universal",
      "filename" : "icon_会员特权@3x.png",
      "filename" : "新浪微博@3x.png",
      "scale" : "3x"
    }
  ],
MIduo/Assets.xcassets/ÎÒµÄ/ÐÂÀË΢²©.imageset/ÐÂÀË΢²©@2x.png
MIduo/Assets.xcassets/ÎÒµÄ/ÐÂÀË΢²©.imageset/ÐÂÀË΢²©@3x.png
MIduo/Assets.xcassets/ÎÒµÄ/ÅóÓÑȦ.imageset/Contents.json
copy from "MIduo/Assets.xcassets/\346\210\221\347\232\204/\344\274\232\345\221\230\347\211\271\346\235\203.imageset/Contents.json" copy to "MIduo/Assets.xcassets/\346\210\221\347\232\204/\346\234\213\345\217\213\345\234\210.imageset/Contents.json"
File was copied from MIduo/Assets.xcassets/ÎÒµÄ/»áÔ±ÌØÈ¨.imageset/Contents.json
@@ -6,12 +6,12 @@
    },
    {
      "idiom" : "universal",
      "filename" : "icon_会员特权@2x.png",
      "filename" : "朋友圈@2x.png",
      "scale" : "2x"
    },
    {
      "idiom" : "universal",
      "filename" : "icon_会员特权@3x.png",
      "filename" : "朋友圈@3x.png",
      "scale" : "3x"
    }
  ],
MIduo/Assets.xcassets/ÎÒµÄ/ÅóÓÑȦ.imageset/ÅóÓÑȦ@2x.png
MIduo/Assets.xcassets/ÎÒµÄ/ÅóÓÑȦ.imageset/ÅóÓÑȦ@3x.png
MIduo/Assets.xcassets/ÖÇÄÜËÑË÷/Contents.json
New file
@@ -0,0 +1,6 @@
{
  "info" : {
    "version" : 1,
    "author" : "xcode"
  }
}
MIduo/Assets.xcassets/ÖÇÄÜËÑË÷/bgRed.imageset/Contents.json
copy from "MIduo/Assets.xcassets/\346\210\221\347\232\204/\344\274\232\345\221\230\347\211\271\346\235\203.imageset/Contents.json" copy to "MIduo/Assets.xcassets/\346\231\272\350\203\275\346\220\234\347\264\242/bgRed.imageset/Contents.json"
File was copied from MIduo/Assets.xcassets/ÎÒµÄ/»áÔ±ÌØÈ¨.imageset/Contents.json
@@ -2,16 +2,15 @@
  "images" : [
    {
      "idiom" : "universal",
      "filename" : "bg 4.png",
      "scale" : "1x"
    },
    {
      "idiom" : "universal",
      "filename" : "icon_会员特权@2x.png",
      "scale" : "2x"
    },
    {
      "idiom" : "universal",
      "filename" : "icon_会员特权@3x.png",
      "scale" : "3x"
    }
  ],
MIduo/Assets.xcassets/ÖÇÄÜËÑË÷/bgRed.imageset/bg 4.png
MIduo/Assets.xcassets/·µ.imageset/Contents.json
@@ -6,12 +6,12 @@
    },
    {
      "idiom" : "universal",
      "filename" : "返@2x.png",
      "filename" : "奖金@2x.png",
      "scale" : "2x"
    },
    {
      "idiom" : "universal",
      "filename" : "返@3x.png",
      "filename" : "奖金@3x.png",
      "scale" : "3x"
    }
  ],
MIduo/Assets.xcassets/·µ.imageset/½±½ð@2x.png
MIduo/Assets.xcassets/·µ.imageset/½±½ð@3x.png
MIduo/Assets.xcassets/·µ.imageset/·µ@2x.png
Binary files differ
MIduo/Assets.xcassets/·µ.imageset/·µ@3x.png
Binary files differ
MIduo/Êý¾Ý/DataNet/ALNetWorking.h
New file
@@ -0,0 +1,22 @@
//
//  ALNetWorking.h
//  MIduo
//
//  Created by é‡åº†è¿ˆå°–科技有限公司 on 2018/8/15.
//  Copyright Â© 2018å¹´ yeshi. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface ALNetWorking : NSObject
+ (ALNetWorking *)startInterface;
- (void)cancelAll;
- (void)Post:(NSString *)url
       param:(NSDictionary *)param
     success:(NetBlock)successBlock
        fail:(ErrorBlock)errorBlock;
@end
MIduo/Êý¾Ý/DataNet/ALNetWorking.m
New file
@@ -0,0 +1,70 @@
//
//  ALNetWorking.m
//  MIduo
//
//  Created by é‡åº†è¿ˆå°–科技有限公司 on 2018/8/15.
//  Copyright Â© 2018å¹´ yeshi. All rights reserved.
//
#import "ALNetWorking.h"
static ALNetWorking * aLNetWorking = nil;
static AFHTTPSessionManager *managers;
@implementation ALNetWorking
//YTHNetInterface的单例方法
+ (ALNetWorking *)startInterface{
    static dispatch_once_t token;
    dispatch_once(&token, ^{
        aLNetWorking = [[ALNetWorking alloc] init];
        managers = [AFHTTPSessionManager manager];
    });
    return  aLNetWorking ;
}
#pragma mark ä¸­æ–­æ‰€æœ‰è¯·æ±‚
- (void)cancelAll{
    if ([managers.tasks count] > 0) {
        // å–消网络请求
        [managers.tasks makeObjectsPerformSelector:@selector(cancel)];
    }
    [managers.operationQueue cancelAllOperations];
}
- (void)Post:(NSString *)url param:(NSDictionary *)param success:(NetBlock)successBlock fail:(ErrorBlock)errorBlock
{
    url= [url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
    // AFSecurityPolicy *securityPolicy = [[AFSecurityPolicy alloc] init];
    // [securityPolicy setAllowInvalidCertificates:YES];
    // [manager setSecurityPolicy:securityPolicy];
    // è®¾ç½®è¶…æ—¶æ—¶é—´
    managers.requestSerializer.timeoutInterval = 15;
    managers.responseSerializer = [AFHTTPResponseSerializer serializer];
    managers.responseSerializer = [AFJSONResponseSerializer serializer];
    managers.responseSerializer.acceptableContentTypes = [NSSet setWithObject:@"text/plain"];
    [managers POST:url parameters:param progress:^(NSProgress * _Nonnull uploadProgress) {
    } success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
        if (successBlock) {
            successBlock(responseObject);
        }
    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
        if (errorBlock) {
            errorBlock(error);
        }
    }];
}
@end
MIduo/Êý¾Ý/YTHsharedManger.h
@@ -21,25 +21,27 @@
@property (nonatomic , strong) NSString *Uid;
@property (nonatomic , strong) NSMutableDictionary *boundDic;
@property (nonatomic , assign) BOOL isBound;
@property (nonatomic , assign)BOOL isfirst;
@property (nonatomic , strong)NSString *tbPicString;
@property (nonatomic , assign) BOOL isfirst;
@property (nonatomic , strong) NSString *tbPicString;
@property (nonatomic , strong) NSString *deviceToken;
@property (nonatomic , strong)NSDictionary *infomation;
@property (nonatomic , assign)BOOL POPPraise;
@property (nonatomic , assign)NSInteger isDetailWebValue;
@property (nonatomic , assign)BOOL isEnterForeground;
@property (nonatomic , assign)BOOL isChangeWX;
@property (nonatomic , assign)CGFloat height;
@property (nonatomic , strong)NSString *weexUrlString;
@property (nonatomic , strong)NSString *membersUrl;
@property (nonatomic , strong)NSString *myTeamURL;
@property (nonatomic , assign)NSInteger playingType;
@property (nonatomic , assign)BOOL isminebound;
@property (nonatomic , assign)BOOL isBackGoodDeTr;
@property (nonatomic , assign)BOOL isUserInfo;
@property (nonatomic , strong)NSString * minPrice;
@property (nonatomic , strong)NSString * maxPrice;
@property (nonatomic , assign)NSInteger networkStatus;
@property (nonatomic , strong) NSDictionary *infomation;
@property (nonatomic , assign) BOOL POPPraise;
@property (nonatomic , assign) NSInteger isDetailWebValue;
@property (nonatomic , assign) BOOL isEnterForeground;
@property (nonatomic , assign) BOOL isChangeWX;
/// æŽ§åˆ¶æ–°ç”¨æˆ·çº¢åŒ…提示弹框(0:弹出 1:不弹出)
@property (nonatomic , assign) NSInteger isNewUser;
@property (nonatomic , assign) CGFloat height;
@property (nonatomic , strong) NSString *weexUrlString;
@property (nonatomic , strong) NSString *membersUrl;
@property (nonatomic , strong) NSString *myTeamURL;
@property (nonatomic , assign) NSInteger playingType;
@property (nonatomic , assign) BOOL isminebound;
@property (nonatomic , assign) BOOL isBackGoodDeTr;
@property (nonatomic , assign) BOOL isUserInfo;
@property (nonatomic , strong) NSString * minPrice;
@property (nonatomic , strong) NSString * maxPrice;
@property (nonatomic , assign) NSInteger networkStatus;
/// æ˜¯å¦æ˜¯ç‚¹å‡»è´­ç‰©è½¦æˆ–者订单微信登录的判断
@property (nonatomic, assign) BOOL isShopCarWXLogin;
MIduo/Êý¾Ý/YTHsharedManger.m
@@ -128,8 +128,7 @@
            }
        }else{
            NSLog(@"后台登录失败");
            NSLog(@"%@",error);
            block(NO, nil);
        }
    }];
@@ -226,16 +225,12 @@
                    } else {
                        
                        block(NO, nil);
                        NSLog(@"海草街登录失败");
                    }
                }];
            }
        }
    } failureCallback:^(ALBBSession *session, NSError *error) {
        NSLog(@"登录失败!");
//        [SVProgressHUD setContainerView:[UIApplication sharedApplication].delegate.window];
//        [SVProgressHUD showErrorWithStatus:@"登录失败,请稍候再试"];
        ALToastCenter(@"登录失败,请稍候再试");
        [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"TaoBaoLogin"];
@@ -282,7 +277,6 @@
            [userMessage setObject:resp.unionGender forKey:@"unionGender"];
            
            // ç¬¬ä¸‰æ–¹å¹³å°SDK源数据
            NSLog(@"QQ originalResponse: %@", resp.originalResponse);
            
            //将当前登陆的信息存储到本地
            [[NSUserDefaults standardUserDefaults] setObject:userMessage forKey:@"QQuserMessage"];
MIduo/Êý¾Ý/lib/LXAlertView/SearchCouponView.h
New file
@@ -0,0 +1,25 @@
//
//  SearchCouponView.h
//  MIduo
//
//  Created by é‡åº†è¿ˆå°–科技有限公司 on 2018/8/21.
//  Copyright Â© 2018å¹´ yeshi. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef void(^selectIndex)(NSInteger index);
@interface SearchCouponView : UIView
@property (nonatomic, copy) selectIndex hasIndex;
- (id)initWithSearchStr:(NSString *)searchStr;
///show
- (void)show;
///dismiss
-(void)dismiss;
@end
MIduo/Êý¾Ý/lib/LXAlertView/SearchCouponView.m
New file
@@ -0,0 +1,290 @@
//
//  SearchCouponView.m
//  MIduo
//
//  Created by é‡åº†è¿ˆå°–科技有限公司 on 2018/8/21.
//  Copyright Â© 2018å¹´ yeshi. All rights reserved.
//
static CGFloat backgroundsViewHeight = 260;
static CGFloat backgroundsViewMargainLeft_Right = 40;
static CGFloat redimageViewHeight = 105;
#import "SearchCouponView.h"
@interface SearchCouponView ()
/// æœç´¢å†…容
@property (nonatomic,copy, nullable) NSString *searchString;
@property (nonatomic, strong, nullable) UIView *overlayView;
@property (nonatomic, strong, nullable) UIView *backgroundsView;
@property (nonatomic, strong, nullable) UIImageView *redimageView;
@property (nonatomic, strong, nullable) UIView *whiteView;
@property (nonatomic, strong, nullable) UILabel *titleLabel;
@property (nonatomic, strong, nullable) UILabel *titleDescLabel;
/// æç¤ºå†…容
@property (nonatomic, strong, nullable) UILabel *contentLabel;
/// æ¨ªçº¿
@property (nonatomic, strong, nullable) UIView *horizontalLine;
/// ç«–线
@property (nonatomic, strong, nullable) UIView *verticalLine;
/// æœç´¢æŒ‰é’®
@property (nonatomic, strong, nullable) UIButton *searchButton;
/// å–消按钮
@property (nonatomic, strong, nullable) UIButton *cancelButton;
@end
@implementation SearchCouponView
- (id)initWithSearchStr:(NSString *)searchStr {
    self = [super init];
    if (self) {
        self.searchString = searchStr;
        [self viewConfig];
    }
    return self;
}
#pragma mark - confirm
- (void)buttonAlert:(UIButton *)sender {
    _hasIndex(sender.tag);
}
- (UIViewController *)appRootViewController {
    UIViewController *appRootVc = [UIApplication sharedApplication].keyWindow.rootViewController;
    //如果是模态.
    while (appRootVc.presentedViewController) {
        appRootVc = appRootVc.presentedViewController;
    }
    return appRootVc;
}
- (void)show {
    UIViewController *topVC = [self appRootViewController];
    [topVC.view addSubview:self];
    self.sd_layout
    .leftSpaceToView(topVC.view, 0)
    .topSpaceToView(topVC.view, 0)
    .widthIs(KScreenW)
    .heightIs(KScreenH);
}
- (void)dismiss {
    [self removeFromSuperview];
}
- (void)viewConfig {
    [self addSubview:self.overlayView];
    self.overlayView.sd_layout
    .leftSpaceToView(self, 0)
    .topSpaceToView(self, 0)
    .rightSpaceToView(self, 0)
    .bottomSpaceToView(self, 0);
    [self addSubview:self.backgroundsView];
    self.backgroundsView.sd_layout
    .leftSpaceToView(self, backgroundsViewMargainLeft_Right)
    .rightSpaceToView(self, backgroundsViewMargainLeft_Right)
    .heightIs(backgroundsViewHeight)
    .centerYEqualToView(self);
    [self.backgroundsView addSubview:self.redimageView];
    self.redimageView.sd_layout
    .leftSpaceToView(self.backgroundsView, 0)
    .topSpaceToView(self.backgroundsView, 0)
    .rightSpaceToView(self.backgroundsView, 0)
    .heightIs(redimageViewHeight);
    [self.redimageView addSubview:self.titleLabel];
    self.titleLabel.sd_layout
    .leftSpaceToView(self.redimageView, 10)
    .rightSpaceToView(self.redimageView, 10)
    .topSpaceToView(self.redimageView, 25)
    .heightIs(30);
    [self.redimageView addSubview:self.titleDescLabel];
    self.titleDescLabel.sd_layout
    .leftSpaceToView(self.redimageView, 10)
    .rightSpaceToView(self.redimageView, 10)
    .topSpaceToView(self.titleLabel, 5)
    .heightIs(30);
    [self.backgroundsView addSubview:self.whiteView];
    [self.whiteView addSubview:self.contentLabel];
    self.contentLabel.sd_layout
    .leftSpaceToView(self.whiteView, 18)
    .topSpaceToView(self.whiteView, 10)
    .rightSpaceToView(self.whiteView, 18)
    .heightIs(80);
    [self.whiteView addSubview:self.horizontalLine];
    self.horizontalLine.sd_layout
    .leftSpaceToView(self.whiteView, 0)
    .rightSpaceToView(self.whiteView, 0)
    .topSpaceToView(self.contentLabel, 10)
    .heightIs(1);
    [self.whiteView addSubview:self.verticalLine];
    self.verticalLine.sd_layout
    .topSpaceToView(self.horizontalLine, 0)
    .bottomSpaceToView(self.whiteView, 0)
    .centerXEqualToView(self.whiteView)
    .widthIs(1);
    [self.whiteView addSubview:self.searchButton];
    self.searchButton.sd_layout
    .leftSpaceToView(self.verticalLine, 0)
    .topSpaceToView(self.horizontalLine, 0)
    .rightSpaceToView(self.whiteView, 0)
    .bottomSpaceToView(self.whiteView, 0);
    [self.whiteView addSubview:self.cancelButton];
    self.cancelButton.sd_layout
    .leftSpaceToView(self.whiteView, 0)
    .topSpaceToView(self.horizontalLine, 0)
    .rightSpaceToView(self.verticalLine, 0)
    .bottomSpaceToView(self.whiteView, 0);
}
- (UIView *)overlayView {
    if (!_overlayView) {
        _overlayView = [[UIView alloc] init];
        _overlayView.backgroundColor = SJColor(0, 0, 0, 0.5);
    }
    return _overlayView;
}
- (UIView *)backgroundsView {
    if (!_backgroundsView) {
        _backgroundsView = [[UIView alloc] init];
       // _backgroundsView.backgroundColor = [UIColor redColor];
    }
    return _backgroundsView;
}
- (UIImageView *)redimageView {
    if (!_redimageView) {
        _redimageView = [[UIImageView alloc] init];
        _redimageView.image = [UIImage imageNamed:@"bgRed"];
    }
    return _redimageView;
}
- (UIView *)whiteView {
    if (!_whiteView) {
        _whiteView = [[UIView alloc] initWithFrame:CGRectMake(0, redimageViewHeight, KScreenW - backgroundsViewMargainLeft_Right * 2, backgroundsViewHeight - redimageViewHeight)];
        _whiteView.backgroundColor = [UIColor whiteColor];
        UIBezierPath * maskPath = [UIBezierPath bezierPathWithRoundedRect:_whiteView.bounds byRoundingCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight cornerRadii:CGSizeMake(10, 10)];
        CAShapeLayer * maskLayer = [[CAShapeLayer alloc] init];
        maskLayer.frame = _whiteView.bounds;
        maskLayer.path = maskPath.CGPath;
        _whiteView.layer.mask = maskLayer;
    }
    return _whiteView;
}
-(UILabel *)titleLabel {
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc] init];
        _titleLabel.text = @"智 èƒ½ æœ ç´¢ ä¼˜ æƒ  åˆ¸";
        _titleLabel.textColor = [UIColor whiteColor];
        _titleLabel.font = [UIFont boldSystemFontOfSize:25.0];
        _titleLabel.textAlignment = NSTextAlignmentCenter;
        _titleLabel.shadowColor = SJColor(124, 1, 1, 0.3);    //设置文本的阴影色彩和透明度。
        _titleLabel.shadowOffset = CGSizeMake(2.0f, 2.0f);
    }
    return _titleLabel;
}
-(UILabel *)titleDescLabel {
    if (!_titleDescLabel) {
        _titleDescLabel = [[UILabel alloc] init];
        _titleDescLabel.text = @"你是否需要搜索下列商品?";
        _titleDescLabel.textColor = [UIColor whiteColor];
        _titleDescLabel.font = [UIFont systemFontOfSize:15.0];
        _titleDescLabel.textAlignment = NSTextAlignmentCenter;
    }
    return _titleDescLabel;
}
-(UILabel *)contentLabel {
    if (!_contentLabel) {
        _contentLabel = [[UILabel alloc] init];
        _contentLabel.textColor = YTHColor(51, 51, 51);
        _contentLabel.text = self.searchString;
        _contentLabel.textAlignment = NSTextAlignmentCenter;
        _contentLabel.numberOfLines = 3;
        _contentLabel.font = [UIFont italicSystemFontOfSize:18.0];
    }
    return _contentLabel;
}
- (UIView *)horizontalLine {
    if (!_horizontalLine) {
        _horizontalLine = [[UIView alloc] init];
        _horizontalLine.backgroundColor = SJColor(243, 243, 243, 1.0);
    }
    return _horizontalLine;
}
- (UIView *)verticalLine {
    if (!_verticalLine) {
        _verticalLine = [[UIView alloc] init];
        _verticalLine.backgroundColor = SJColor(243, 243, 243, 1.0);
    }
    return _verticalLine;
}
- (UIButton *)searchButton {
    if (!_searchButton) {
        _searchButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _searchButton.tag = 791;
        [_searchButton setTitle:@"搜索" forState:UIControlStateNormal];
        [_searchButton setTitleColor:SJColor(241, 66, 66, 1.0) forState:UIControlStateNormal];
        _searchButton.titleLabel.font = [UIFont boldSystemFontOfSize:17.0];
        [_searchButton addTarget:self action:@selector(buttonAlert:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _searchButton;
}
- (UIButton *)cancelButton {
    if (!_cancelButton) {
        _cancelButton = [UIButton buttonWithType:UIButtonTypeCustom];
        _cancelButton.tag = 790;
        [_cancelButton setTitle:@"取消" forState:UIControlStateNormal];
        [_cancelButton setTitleColor:SJColor(136, 136, 136, 1.0) forState:UIControlStateNormal];
        _cancelButton.titleLabel.font = [UIFont boldSystemFontOfSize:17.0];
        [_cancelButton addTarget:self action:@selector(buttonAlert:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _cancelButton;
}
@end
MIduo/Êý¾Ý/lib/LXAlertView/SearchTip.m
@@ -170,7 +170,7 @@
        _cancelButton.layer.masksToBounds=YES;
        _cancelButton.layer.cornerRadius=18.0f;
        
        [_cancelButton addTarget:self action:@selector(buttonAlert:) forControlEvents:UIControlEventTouchDown];
        [_cancelButton addTarget:self action:@selector(buttonAlert:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _cancelButton;
}
@@ -192,7 +192,7 @@
        _SearchButton.layer.masksToBounds=YES;
        _SearchButton.layer.cornerRadius=18.0f;
        
        [_SearchButton addTarget:self action:@selector(buttonAlert:) forControlEvents:UIControlEventTouchDown];
        [_SearchButton addTarget:self action:@selector(buttonAlert:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _SearchButton;
}
@@ -203,7 +203,7 @@
        _closeBtn.frame = CGRectMake(kAlertWidth-38,3,35,35);
        _closeBtn.tag =791;
        [_closeBtn setImage:[UIImage imageNamed:@"Cross"] forState:UIControlStateNormal];
        [_closeBtn addTarget:self action:@selector(buttonAlert:) forControlEvents:UIControlEventTouchDown];
        [_closeBtn addTarget:self action:@selector(buttonAlert:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _closeBtn;
}
MIduo/Êý¾Ý/lib/LXAlertView/ShareAppView/ShareAppCell.h
New file
@@ -0,0 +1,17 @@
//
//  ShareAppCell.h
//  MIduo
//
//  Created by é‡åº†è¿ˆå°–科技有限公司 on 2018/8/22.
//  Copyright Â© 2018å¹´ yeshi. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ShareAppCell : UICollectionViewCell
@property (nonatomic, strong, nullable) UIView *line;
@property (nonatomic, copy, nullable) NSString *dataString;
@end
MIduo/Êý¾Ý/lib/LXAlertView/ShareAppView/ShareAppCell.m
New file
@@ -0,0 +1,93 @@
//
//  ShareAppCell.m
//  MIduo
//
//  Created by é‡åº†è¿ˆå°–科技有限公司 on 2018/8/22.
//  Copyright Â© 2018å¹´ yeshi. All rights reserved.
//
#import "ShareAppCell.h"
static CGFloat imageViewHeght = 49;
@interface ShareAppCell ()
@property (nonatomic, strong, nullable) UIImageView *imageView;
@property (nonatomic, strong, nullable) UILabel *titleLabel;
@end
@implementation ShareAppCell
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if ( self ) {
        [self cellConfig];
    }
    return self;
}
- (void)cellConfig{
    [self.contentView addSubview:self.line];
    self.line.sd_layout
    .leftSpaceToView(self.contentView, 0)
    .rightSpaceToView(self.contentView, 0)
    .topSpaceToView(self.contentView, 0)
    .heightIs(1);
    [self.contentView addSubview:self.imageView];
    self.imageView.sd_layout
    .centerXEqualToView(self.contentView)
    .topSpaceToView(self.contentView, 10)
    .widthIs(imageViewHeght)
    .heightIs(imageViewHeght);
    [self.contentView addSubview:self.titleLabel];
    self.titleLabel.sd_layout
    .leftSpaceToView(self.contentView, 0)
    .rightSpaceToView(self.contentView, 0)
    .topSpaceToView(self.imageView, 0)
    .heightIs(25);
}
- (void)setDataString:(NSString *)dataString {
    if (dataString) {
        _imageView.image = [UIImage imageNamed:dataString];
        _titleLabel.text = dataString;
    }
}
- (UIImageView *)imageView {
    if (!_imageView) {
        _imageView = [[UIImageView alloc] init];
    }
    return _imageView;
}
-(UILabel *)titleLabel {
    if (!_titleLabel) {
        _titleLabel = [[UILabel alloc] init];
        _titleLabel.textColor = SJColor(156, 156, 156, 1.0);
        _titleLabel.font = [UIFont systemFontOfSize:15.0];
        _titleLabel.textAlignment = NSTextAlignmentCenter;
    }
    return _titleLabel;
}
- (UIView *)line {
    if (!_line) {
        _line = [[UIView alloc] init];
        _line.backgroundColor = XYRBackgroundColor;
    }
    return _line;
}
@end
MIduo/Êý¾Ý/lib/LXAlertView/ShareAppView/ShareAppView.h
New file
@@ -0,0 +1,25 @@
//
//  ShareAppView.h
//  MIduo
//
//  Created by é‡åº†è¿ˆå°–科技有限公司 on 2018/8/22.
//  Copyright Â© 2018å¹´ yeshi. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef void(^selectIndex)(NSInteger index);
@interface ShareAppView : UIView
- (instancetype)initShareAppView;
@property (nonatomic, copy) selectIndex haveIndex;
- (void)show;
- (void)diss;
@end
MIduo/Êý¾Ý/lib/LXAlertView/ShareAppView/ShareAppView.m
New file
@@ -0,0 +1,238 @@
//
//  ShareAppView.m
//  MIduo
//
//  Created by é‡åº†è¿ˆå°–科技有限公司 on 2018/8/22.
//  Copyright Â© 2018å¹´ yeshi. All rights reserved.
//
static CGFloat dissButtonHeght = 50;
static CGFloat timeAnitmation = 0.5f;
#import "ShareAppView.h"
#import "ShareAppCell.h"
@interface ShareAppView () <UICollectionViewDelegate, UICollectionViewDataSource>
@property (nonatomic, strong, nullable) UICollectionView *collectionView;
@property (nonatomic, assign) CGFloat cellHeight;
@property (nonatomic, assign) CGFloat collectionheight;
@property (nonatomic, strong) NSArray *dataArr;
@property (nonatomic, strong, nullable) UIView *bgView;
@property (nonatomic, strong, nullable) UIButton *dissButton;
@property (nonatomic, strong, nullable) UIView *line;
@end
@implementation ShareAppView
- (instancetype)initShareAppView {
    self = [super init];
    if (self) {
        [self setDataSource];
        [self viewConfig];
    }
    return self;
}
- (void)show {
    UIViewController *topVC = [self appRootViewController];
    self.backgroundColor = SJColor(0, 0, 0, 0.5);
    [topVC.view addSubview:self];
    self.sd_layout.leftSpaceToView(topVC.view, 0).topSpaceToView(topVC.view, 0).widthIs(KScreenW).heightIs(KScreenH);
    [UIView animateWithDuration:timeAnitmation animations:^{
        self.bgView.frame = CGRectMake(0, KScreenH - ((self.collectionheight * 2) + dissButtonHeght), KScreenW, (self.collectionheight * 2) + dissButtonHeght);
    }];
}
- (void)diss {
    [UIView animateWithDuration:timeAnitmation animations:^{
        self.bgView.frame = CGRectMake(0, KScreenH, KScreenW, (self.collectionheight * 2) + dissButtonHeght);
        [self performSelector:@selector(onDidss) withObject:nil afterDelay:timeAnitmation];
    }];
}
- (void)onDidss {
    [self removeFromSuperview];
}
- (void)setDataSource {
    self.dataArr = @[@"微信好友",@"朋友圈",@"新浪微博",@"QQ好友",@"QQ空间"];
    self.cellHeight = KScreenW / 3;
    self.collectionheight = KScreenW / 3 - 30;
}
- (UIViewController *)appRootViewController {
    UIViewController *appRootVc = [UIApplication sharedApplication].keyWindow.rootViewController;
    //如果是模态.
    while (appRootVc.presentedViewController) {
        appRootVc = appRootVc.presentedViewController;
    }
    return appRootVc;
}
- (void)viewConfig {
    [self addSubview:self.bgView];
    [self.bgView addSubview:self.collectionView];
    [self.bgView addSubview:self.line];
    self.line.sd_layout
    .leftSpaceToView(self.bgView, 0)
    .topSpaceToView(self.collectionView, 0)
    .rightSpaceToView(self.bgView, 0)
    .heightIs(1);
    [self.bgView addSubview:self.dissButton];
    self.dissButton.sd_layout
    .leftSpaceToView(self.bgView, 0)
    .topSpaceToView(self.line, 0)
    .rightSpaceToView(self.bgView, 0)
    .bottomSpaceToView(self.bgView, 0);
}
#pragma mark ----- collectionView ä»£ç†æ–¹æ³• -----
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
    self.haveIndex(indexPath.row);
}
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView {
    return 1;
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
    return self.dataArr.count;
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    ShareAppCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"shareAppCell" forIndexPath:indexPath];
    cell.dataString = self.dataArr[indexPath.row];
    if (indexPath.row > 2) {
        cell.line.hidden = YES;
    } else {
        cell.line.hidden = NO;
    }
    return cell;
}
#pragma mark æ¯ä¸ªcell的尺寸
- (CGSize)collectionView:(UICollectionView *)collectionView
                  layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{
    return CGSizeMake(self.cellHeight, self.collectionheight);
}
- (CGFloat)collectionView:(UICollectionView *)collectionView
                   layout:(UICollectionViewLayout*)collectionViewLayout minimumInteritemSpacingForSectionAtIndex:(NSInteger)section{
    return 0;
}
- (UIEdgeInsets)collectionView:(UICollectionView *)collectionView
                        layout:(UICollectionViewLayout*)collectionViewLayout insetForSectionAtIndex:(NSInteger)section{
    return UIEdgeInsetsMake(0, 0, 0, 0);
}
#pragma mark --- getter ---
- (UICollectionView *)collectionView {
    if (!_collectionView) {
        UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
        [layout setScrollDirection:UICollectionViewScrollDirectionVertical];
        // åž‚直方向的间距
        layout.minimumInteritemSpacing = 0;
        // æ°´å¹³æ–¹å‘的间距
        layout.minimumLineSpacing = 0;
        _collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0,
                                                                             0,
                                                                             KScreenW,
                                                                             self.collectionheight * 2)
                                             collectionViewLayout:layout];
        _collectionView.showsVerticalScrollIndicator = NO;
        _collectionView.delegate = self;
        _collectionView.dataSource = self;
        _collectionView.backgroundColor = [UIColor whiteColor];
        [_collectionView registerClass:[ShareAppCell class] forCellWithReuseIdentifier:@"shareAppCell"];
    }
    return _collectionView;
}
- (UIView *)bgView {
    if (!_bgView) {
        _bgView = [[UIView alloc] initWithFrame:CGRectMake(0, KScreenH, KScreenW, (self.collectionheight * 2) + dissButtonHeght)];
        _bgView.backgroundColor = [UIColor whiteColor];
    }
    return _bgView;
}
- (UIButton *)dissButton {
    if (!_dissButton) {
        _dissButton = [UIButton buttonWithType:UIButtonTypeCustom];
        [_dissButton setTitle:@"取消" forState:UIControlStateNormal];
        [_dissButton setTitleColor:SJColor(156, 156, 156, 1.0) forState:UIControlStateNormal];
        _dissButton.titleLabel.font = [UIFont systemFontOfSize:15.0];
        @weakify(self)
        [[_dissButton rac_signalForControlEvents:UIControlEventTouchUpInside]
         subscribeNext:^(UIButton *button) {
            @strongify(self)
             [self diss];
        }];
    }
    return _dissButton;
}
- (UIView *)line {
    if (!_line) {
        _line = [[UIView alloc] init];
        _line.backgroundColor = XYRBackgroundColor;
    }
    return _line;
}
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    [self diss];
}
@end
MIduo/Êý¾Ý/lib/ptotoBrowser/HZPhotoBrowser.bundle/whiteplaceholder.png
MIduo/Êý¾Ý/lib/ptotoBrowser/HZPhotoBrowser.h
New file
@@ -0,0 +1,39 @@
//
//  HZPhotoBrowser.h
//  photobrowser
//
//  Created by huangzhenyu on 15-2-3.
//  Copyright (c) 2015å¹´ huangzhenyu. All rights reserved.
//
#import <UIKit/UIKit.h>
@class HZButton, HZPhotoBrowser;
//配置小图和大图
@protocol HZPhotoBrowserDelegate <NSObject>
@required
- (UIImage *)photoBrowser:(HZPhotoBrowser *)browser placeholderImageForIndex:(NSInteger)index;
- (NSURL *)photoBrowser:(HZPhotoBrowser *)browser highQualityImageURLForIndex:(NSInteger)index;
@end
@interface HZPhotoBrowser : UIView <UIScrollViewDelegate>
//第一种展示方式(退出时能回到原来的位置),需要定义九图控件,下面两个参数必传
@property (nonatomic, weak) UIView *sourceImagesContainerView;
@property (nonatomic, assign) NSInteger imageCount;
//第二种展示方式(退出时不能回到原来的位置,默认回到屏幕正中央)直接传url,图片url列表必传
@property (nonatomic,strong) NSArray *imageArray;
//从第几张图片开始展示,默认 0(第一种或者第二种方式展示都必须传)
@property (nonatomic, assign) int currentImageIndex;
//是否在横屏的时候直接满宽度,而不是满高度,一般是在有长图需求的时候设置为YES(默认值YES)
@property (nonatomic, assign) BOOL isFullWidthForLandScape;
//是否支持横竖屏,默认支持(YES)
@property (nonatomic, assign) BOOL isNeedLandscape;
@property (nonatomic, weak) id<HZPhotoBrowserDelegate> delegate;
- (void)show;
@end
MIduo/Êý¾Ý/lib/ptotoBrowser/HZPhotoBrowser.m
New file
@@ -0,0 +1,651 @@
//
//  HZPhotoBrowser.m
//  photobrowser
//
//  Created by huangzhenyu on 15-2-3.
//  Copyright (c) 2015å¹´ huangzhenyu. All rights reserved.
//
#import "HZPhotoBrowser.h"
#import "UIImageView+WebCache.h"
#import "HZPhotoBrowserView.h"
#import "HZPhotoBrowserConfig.h"
@interface HZPhotoBrowser()
@property (nonatomic,strong) UITapGestureRecognizer *singleTap;
@property (nonatomic,strong) UITapGestureRecognizer *doubleTap;
@property (nonatomic,strong) UIPanGestureRecognizer *pan;
@property (nonatomic,strong) UIImageView *tempView;
@property (nonatomic,strong) UIView *coverView;
@property (nonatomic,strong) UILabel *tipLabel;
@property (nonatomic,strong) HZPhotoBrowserView *photoBrowserView;
@property (nonatomic,assign) UIDeviceOrientation orientation;
@property (nonatomic,assign) HZPhotoBrowserStyle photoBrowserStyle;
@end
@implementation HZPhotoBrowser
{
    UIScrollView *_scrollView;
    BOOL _hasShowedFistView;//开始展示图片浏览器
    UILabel *_indexLabel;
    UIButton *_saveButton;
    UIView *_contentView;
}
#pragma mark recyle
- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = HZPhotoBrowserBackgrounColor;
        self.isFullWidthForLandScape = YES;
        self.isNeedLandscape = YES;
    }
    return self;
}
//当视图移动完成后调用
- (void)didMoveToSuperview
{
    [super didMoveToSuperview];
    //处理下标可能越界的bug
    _currentImageIndex = _currentImageIndex < 0 ? 0 : _currentImageIndex;
    NSInteger count = _imageCount - 1;
    if (count > 0) {
        if (_currentImageIndex > count) {
            _currentImageIndex = 0;
        }
    }
    [self setupScrollView];
    [self setupToolbars];
    [self addGestureRecognizer:self.singleTap];
    [self addGestureRecognizer:self.doubleTap];
    [self addGestureRecognizer:self.pan];
    self.photoBrowserView = _scrollView.subviews[self.currentImageIndex];
}
- (void)layoutSubviews
{
    [super layoutSubviews];
//    NSLog(@"layoutSubviews -- ");
    CGRect rect = self.bounds;
    rect.size.width += HZPhotoBrowserImageViewMargin * 2;
    _scrollView.bounds = rect;
    _scrollView.center = CGPointMake(self.bounds.size.width *0.5, self.bounds.size.height *0.5);
    NSLog(@"%@",NSStringFromCGRect(_scrollView.frame));
    CGFloat y = 0;
    __block CGFloat w = _scrollView.frame.size.width - HZPhotoBrowserImageViewMargin * 2;
    CGFloat h = _scrollView.frame.size.height;
    [_scrollView.subviews enumerateObjectsUsingBlock:^(HZPhotoBrowserView *obj, NSUInteger idx, BOOL *stop) {
        CGFloat x = HZPhotoBrowserImageViewMargin + idx * (HZPhotoBrowserImageViewMargin * 2 + w);
        obj.frame = CGRectMake(x, y, w, h);
    }];
    _scrollView.contentSize = CGSizeMake(_scrollView.subviews.count * _scrollView.frame.size.width, _scrollView.frame.size.height);
    _scrollView.contentOffset = CGPointMake(self.currentImageIndex * _scrollView.frame.size.width, 0);
    if (!_hasShowedFistView) {
        [self showFirstImage];
    }
    _indexLabel.bounds = CGRectMake(0, 0, 80, 30);
    _indexLabel.center = CGPointMake(self.bounds.size.width * 0.5, 30);
    _saveButton.frame = CGRectMake(30, self.bounds.size.height - 70, 55, 30);
    _tipLabel.frame = CGRectMake((self.bounds.size.width - 150)*0.5, (self.bounds.size.height - 40)*0.5, 150, 40);
}
- (void)dealloc
{
//    NSLog(@"图片浏览器销毁");
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}
-(void)setSourceImagesContainerView:(UIView *)sourceImagesContainerView{
    _sourceImagesContainerView = sourceImagesContainerView;
    _imageArray = nil;
    _photoBrowserStyle = HZPhotoBrowserStyleDefault;
}
- (void)setImageArray:(NSArray *)imageArray{
    _imageArray = imageArray;
    _imageCount = imageArray.count;
    _sourceImagesContainerView = nil;
    _photoBrowserStyle = HZPhotoBrowserStyleSimple;
}
#pragma mark getter settter
- (UITapGestureRecognizer *)singleTap{
    if (!_singleTap) {
        _singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(photoClick:)];
        _singleTap.numberOfTapsRequired = 1;
        _singleTap.delaysTouchesBegan = YES;
        //只能有一个手势存在
        [_singleTap requireGestureRecognizerToFail:self.doubleTap];
    }
    return _singleTap;
}
- (UITapGestureRecognizer *)doubleTap
{
    if (!_doubleTap) {
        _doubleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleDoubleTap:)];
        _doubleTap.numberOfTapsRequired = 2;
//        _doubleTap.numberOfTouchesRequired = 1;
    }
    return _doubleTap;
}
- (UIPanGestureRecognizer *)pan{
    if (!_pan) {
        _pan = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(didPan:)];
    }
    return _pan;
}
- (UIImageView *)tempView{
    if (!_tempView) {
        HZPhotoBrowserView *photoBrowserView = _scrollView.subviews[self.currentImageIndex];
        UIImageView *currentImageView = photoBrowserView.imageview;
        CGFloat tempImageX = currentImageView.frame.origin.x - photoBrowserView.scrollOffset.x;
        CGFloat tempImageY = currentImageView.frame.origin.y - photoBrowserView.scrollOffset.y;
        CGFloat tempImageW = photoBrowserView.zoomImageSize.width;
        CGFloat tempImageH = photoBrowserView.zoomImageSize.height;
        UIDeviceOrientation orientation = [UIDevice currentDevice].orientation;
        if (UIDeviceOrientationIsLandscape(orientation)) {//横屏
            //处理长图,图片太长会导致旋转动画飞掉
            if (tempImageH > KAppHeight) {
                tempImageH = tempImageH > (tempImageW * 1.5)? (tempImageW * 1.5):tempImageH;
                if (fabs(tempImageY) > tempImageH) {
                    tempImageY = 0;
                }
            }
        }
        _tempView = [[UIImageView alloc] init];
        //这边的contentmode要跟 HZPhotoGrop里面的按钮的 contentmode保持一致(防止最后出现闪动的动画)
        _tempView.contentMode = UIViewContentModeScaleAspectFill;
        _tempView.clipsToBounds = YES;
        _tempView.frame = CGRectMake(tempImageX, tempImageY, tempImageW, tempImageH);
        _tempView.image = currentImageView.image;
    }
    return _tempView;
}
//做颜色渐变动画的view,让退出动画更加柔和
- (UIView *)coverView{
    if (!_coverView) {
        _coverView = [[UIView alloc] initWithFrame:[UIScreen mainScreen].bounds];
        _coverView.backgroundColor = HZPhotoBrowserBackgrounColor;
    }
    return _coverView;
}
- (void)setPhotoBrowserView:(HZPhotoBrowserView *)photoBrowserView{
    _photoBrowserView = photoBrowserView;
    __weak typeof(self) weakSelf = self;
    _photoBrowserView.scrollViewWillEndDragging = ^(CGPoint velocity,CGPoint offset) {
        __strong typeof(weakSelf) strongSelf = weakSelf;
        if (((velocity.y < -2 && offset.y < 0) || offset.y < -100)) {
            [strongSelf hidePhotoBrowser];
        }
    };
}
- (void)setCurrentImageIndex:(int)currentImageIndex{
    _currentImageIndex = currentImageIndex < 0 ? 0 : currentImageIndex;
    NSInteger count0 = _imageCount;
    NSInteger count1 = _imageArray.count;
    if (count0 > 0) {
        if (_currentImageIndex > count0) {
            _currentImageIndex = 0;
        }
    }
    if (count1 > 0) {
        if (_currentImageIndex > count1) {
            _currentImageIndex = 0;
        }
    }
}
#pragma mark private methods
- (void)setupToolbars
{
    // 1. åºæ ‡
    UILabel *indexLabel = [[UILabel alloc] init];
    indexLabel.textAlignment = NSTextAlignmentCenter;
    indexLabel.textColor = [UIColor whiteColor];
    indexLabel.font = [UIFont boldSystemFontOfSize:20];
    indexLabel.backgroundColor = [UIColor colorWithRed:0.1f green:0.1f blue:0.1f alpha:0.3f];
    indexLabel.bounds = CGRectMake(0, 0, 80, 30);
    indexLabel.center = CGPointMake(kAPPWidth * 0.5, 30);
    indexLabel.layer.cornerRadius = 15;
    indexLabel.clipsToBounds = YES;
    if (self.imageCount > 1) {
        indexLabel.text = [NSString stringWithFormat:@"1/%ld", (long)self.imageCount];
        _indexLabel = indexLabel;
        [self addSubview:indexLabel];
    }
    // 2.保存按钮
//    UIButton *saveButton = [[UIButton alloc] init];
//    [saveButton setTitle:@"保存" forState:UIControlStateNormal];
//    [saveButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
//    saveButton.layer.borderWidth = 0.1;
//    saveButton.layer.borderColor = [UIColor whiteColor].CGColor;
//    saveButton.backgroundColor = [UIColor colorWithRed:0.1f green:0.1f blue:0.1f alpha:0.3f];
//    saveButton.layer.cornerRadius = 2;
//    saveButton.clipsToBounds = YES;
//    [saveButton addTarget:self action:@selector(saveImage) forControlEvents:UIControlEventTouchUpInside];
//    _saveButton = saveButton;
//    [self addSubview:saveButton];
}
//保存图像
- (void)saveImage
{
    int index = _scrollView.contentOffset.x / _scrollView.bounds.size.width;
    HZPhotoBrowserView *currentView = _scrollView.subviews[index];
    if (currentView.hasLoadedImage) {
        UIImageWriteToSavedPhotosAlbum(currentView.imageview.image, self, @selector(image:didFinishSavingWithError:contextInfo:), NULL);
    } else {
        [self showTip:HZPhotoBrowserSaveImageFailText];
    }
}
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo;
{
    if (error) {
        [self showTip:HZPhotoBrowserSaveImageFailText];
    } else {
        [self showTip:HZPhotoBrowserSaveImageSuccessText];
    }
}
- (void)showTip:(NSString *)tipStr{
    if (_tipLabel) {
        [_tipLabel removeFromSuperview];
        _tipLabel = nil;
    }
    UILabel *label = [[UILabel alloc] init];
    _tipLabel = label;
    label.textColor = [UIColor whiteColor];
    label.backgroundColor = [UIColor colorWithRed:0.1f green:0.1f blue:0.1f alpha:0.90f];
    label.layer.cornerRadius = 5;
    label.clipsToBounds = YES;
    label.textAlignment = NSTextAlignmentCenter;
    label.font = [UIFont boldSystemFontOfSize:20];
    label.text = tipStr;
    [self addSubview:label];
    [label performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:1.0];
}
- (void)setupScrollView
{
    _scrollView = [[UIScrollView alloc] init];
    _scrollView.delegate = self;
    _scrollView.showsHorizontalScrollIndicator = NO;
    _scrollView.showsVerticalScrollIndicator = NO;
    _scrollView.pagingEnabled = YES;
    [self addSubview:_scrollView];
    for (int i = 0; i < self.imageCount; i++) {
        HZPhotoBrowserView *view = [[HZPhotoBrowserView alloc] init];
        view.isFullWidthForLandScape = self.isFullWidthForLandScape;
        view.imageview.tag = i;
        [_scrollView addSubview:view];
    }
    [self setupImageOfImageViewForIndex:self.currentImageIndex];
}
// åŠ è½½å›¾ç‰‡
- (void)setupImageOfImageViewForIndex:(NSInteger)index
{
    HZPhotoBrowserView *view = _scrollView.subviews[index];
    if (view.beginLoadingImage) return;
    if ([self highQualityImageURLForIndex:index]) {
        [view setImageWithURL:[self highQualityImageURLForIndex:index] placeholderImage:[self placeholderImageForIndex:index]];
    } else {
        view.imageview.image = [self placeholderImageForIndex:index];
    }
    view.beginLoadingImage = YES;
}
- (void)onDeviceOrientationChangeWithObserver
{
    [self onDeviceOrientationChange];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onDeviceOrientationChange) name:UIDeviceOrientationDidChangeNotification object:nil];
}
-(void)onDeviceOrientationChange
{
    if (!self.isNeedLandscape) {
        return;
    }
    HZPhotoBrowserView *currentView = _scrollView.subviews[self.currentImageIndex];
    UIDeviceOrientation orientation = [UIDevice currentDevice].orientation;
    self.orientation = orientation;
    if (UIDeviceOrientationIsLandscape(orientation)) {
        if (self.bounds.size.width < self.bounds.size.height) {
            [currentView.scrollview setZoomScale:1.0 animated:YES];//还原
        }
        [UIView animateWithDuration:kRotateAnimationDuration delay:0.0f options:UIViewAnimationOptionBeginFromCurrentState animations:^{
            self.transform = (orientation==UIDeviceOrientationLandscapeRight)?CGAffineTransformMakeRotation(M_PI*1.5):CGAffineTransformMakeRotation(M_PI/2);
            if (iPhoneX) {
                self.center = [UIApplication sharedApplication].keyWindow.center;
                self.bounds = CGRectMake(0, 0,  KAppHeight - kStatusBar_Height - kBottomSafeHeight, kAPPWidth);
            } else {
                self.bounds = CGRectMake(0, 0, KAppHeight, kAPPWidth);
            }
            [self setNeedsLayout];
            [self layoutIfNeeded];
        } completion:^(BOOL finished) {
        }];
    }else if (orientation==UIDeviceOrientationPortrait){
        if (self.bounds.size.width > self.bounds.size.height) {
            [currentView.scrollview setZoomScale:1.0 animated:YES];//还原
        }
        [UIView animateWithDuration:kRotateAnimationDuration delay:0.0f options:UIViewAnimationOptionBeginFromCurrentState animations:^{
            self.transform = (orientation==UIDeviceOrientationPortrait)?CGAffineTransformIdentity:CGAffineTransformMakeRotation(M_PI);
            if (iPhoneX) {
                self.bounds = CGRectMake(0, 0, kAPPWidth, KAppHeight - kStatusBar_Height - kBottomSafeHeight);
            } else {
                self.bounds = CGRectMake(0, 0, kAPPWidth, KAppHeight);
            }
            [self setNeedsLayout];
            [self layoutIfNeeded];
        } completion:^(BOOL finished) {
        }];
    }
}
- (void)showFirstImage
{
    self.userInteractionEnabled = NO;
    if (_photoBrowserStyle == HZPhotoBrowserStyleDefault) {
        UIView *sourceView = self.sourceImagesContainerView.subviews[self.currentImageIndex];
        CGRect rect = [self.sourceImagesContainerView convertRect:sourceView.frame toView:self];
        UIImageView *tempView = [[UIImageView alloc] init];
        tempView.frame = rect;
        tempView.image = [self placeholderImageForIndex:self.currentImageIndex];
        [self addSubview:tempView];
        tempView.contentMode = UIViewContentModeScaleAspectFit;
        CGFloat placeImageSizeW = tempView.image.size.width;
        CGFloat placeImageSizeH = tempView.image.size.height;
        CGRect targetTemp;
        CGFloat selfW = self.frame.size.width;
        CGFloat selfH = self.frame.size.height;
        CGFloat placeHolderH = (placeImageSizeH * selfW)/placeImageSizeW;
        if (placeHolderH <= selfH) {
            targetTemp = CGRectMake(0, (selfH - placeHolderH) * 0.5 , selfW, placeHolderH);
        } else {//图片高度>屏幕高度
            targetTemp = CGRectMake(0, 0, selfW, placeHolderH);
        }
        //先隐藏scrollview
        _scrollView.hidden = YES;
        _indexLabel.hidden = YES;
        _saveButton.hidden = YES;
        [UIView animateWithDuration:HZPhotoBrowserShowImageAnimationDuration animations:^{
            //将点击的临时imageview动画放大到和目标imageview一样大
            tempView.frame = targetTemp;
        } completion:^(BOOL finished) {
            //动画完成后,删除临时imageview,让目标imageview显示
            _hasShowedFistView = YES;
            [tempView removeFromSuperview];
            _scrollView.hidden = NO;
            _indexLabel.hidden = NO;
            _saveButton.hidden = NO;
            self.userInteractionEnabled = YES;
        }];
    } else {
        _photoBrowserView.alpha = 0;
        _contentView.alpha = 0;
        [UIView animateWithDuration:0.2 animations:^{
            //将点击的临时imageview动画放大到和目标imageview一样大
            _photoBrowserView.alpha = 1;
            _contentView.alpha = 1;
        } completion:^(BOOL finished) {
            _hasShowedFistView = YES;
            self.userInteractionEnabled = YES;
        }];
    }
}
- (UIImage *)placeholderImageForIndex:(NSInteger)index
{
    if (_photoBrowserStyle == HZPhotoBrowserStyleDefault) {
        if ([self.delegate respondsToSelector:@selector(photoBrowser:placeholderImageForIndex:)]) {
            return [self.delegate photoBrowser:self placeholderImageForIndex:index];
        }
    } else {
        return nil;
    }
    return nil;
}
- (NSURL *)highQualityImageURLForIndex:(NSInteger)index
{
    if (_photoBrowserStyle == HZPhotoBrowserStyleDefault) {
        if ([self.delegate respondsToSelector:@selector(photoBrowser:highQualityImageURLForIndex:)]) {
            return [self.delegate photoBrowser:self highQualityImageURLForIndex:index];
        }
    } else {
        return [NSURL URLWithString:_imageArray[index]];
    }
    return nil;
}
- (void)hidePhotoBrowser
{
    [self prepareForHide];
    [self hideAnimation];
}
- (void)hideAnimation{
    self.userInteractionEnabled = NO;
    CGRect targetTemp;
    UIWindow *window = [UIApplication sharedApplication].keyWindow;
    UIView *sourceView = [self getSourceView];
    if (!sourceView) {
        targetTemp = CGRectMake(window.center.x, window.center.y, 0, 0);
    }
    if (_photoBrowserStyle == HZPhotoBrowserStyleDefault) {
        UIView *sourceView = [self getSourceView];
       targetTemp = [self.sourceImagesContainerView convertRect:sourceView.frame toView:self];
    } else {
        //默认回到屏幕中央
        targetTemp = CGRectMake(window.center.x, window.center.y, 0, 0);
    }
    self.window.windowLevel = UIWindowLevelNormal;//显示状态栏
    [UIView animateWithDuration:HZPhotoBrowserHideImageAnimationDuration animations:^{
        if (_photoBrowserStyle == HZPhotoBrowserStyleDefault) {
            _tempView.transform = CGAffineTransformInvert(self.transform);
        }
        _coverView.alpha = 0;
        _tempView.frame = targetTemp;
    } completion:^(BOOL finished) {
        [self removeFromSuperview];
        [_tempView removeFromSuperview];
        [_contentView removeFromSuperview];
        _tempView = nil;
        _contentView = nil;
        sourceView.hidden = NO;
    }];
}
- (UIView *)getSourceView{
    if (_currentImageIndex <= self.sourceImagesContainerView.subviews.count - 1) {
        UIView *sourceView = self.sourceImagesContainerView.subviews[_currentImageIndex];
        return sourceView;
    }
    return nil;
}
- (void)prepareForHide{
    [_contentView insertSubview:self.coverView belowSubview:self];
    _saveButton.hidden = YES;
    _indexLabel.hidden = YES;
    [self addSubview:self.tempView];
    _photoBrowserView.hidden = YES;
    self.backgroundColor = [UIColor clearColor];
    _contentView.backgroundColor = [UIColor clearColor];
    UIView *view = [self getSourceView];
    view.hidden = YES;
}
- (void)bounceToOrigin{
    self.userInteractionEnabled = NO;
    [UIView animateWithDuration:HZPhotoBrowserHideImageAnimationDuration animations:^{
        self.tempView.transform = CGAffineTransformIdentity;
        _coverView.alpha = 1;
    } completion:^(BOOL finished) {
        self.userInteractionEnabled = YES;
        _saveButton.hidden = NO;
        _indexLabel.hidden = NO;
        [_tempView removeFromSuperview];
        [_coverView removeFromSuperview];
        _tempView = nil;
        _coverView = nil;
        _photoBrowserView.hidden = NO;
        self.backgroundColor = HZPhotoBrowserBackgrounColor;
        _contentView.backgroundColor = HZPhotoBrowserBackgrounColor;
        UIView *view = [self getSourceView];
        view.hidden = NO;
    }];
}
#pragma mark - scrollview代理方法
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
{
    int index = (scrollView.contentOffset.x + _scrollView.bounds.size.width * 0.5) / _scrollView.bounds.size.width;
    _indexLabel.text = [NSString stringWithFormat:@"%d/%ld", index + 1, (long)self.imageCount];
    long left = index - 1;
    long right = index + 1;
    left = left>0?left : 0;
    right = right>self.imageCount?self.imageCount:right;
    for (long i = left; i < right; i++) {
         [self setupImageOfImageViewForIndex:i];
    }
}
//scrollview结束滚动调用
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
{
    int autualIndex = scrollView.contentOffset.x  / _scrollView.bounds.size.width;
    //设置当前下标
    self.currentImageIndex = autualIndex;
    self.photoBrowserView = _scrollView.subviews[self.currentImageIndex];
    //将不是当前imageview的缩放全部还原 (这个方法有些冗余,后期可以改进)
    for (HZPhotoBrowserView *view in _scrollView.subviews) {
        if (view.imageview.tag != autualIndex) {
                view.scrollview.zoomScale = 1.0;
        }
    }
}
#pragma mark - tap
#pragma mark å•击
- (void)photoClick:(UITapGestureRecognizer *)recognizer
{
    [self hidePhotoBrowser];
}
#pragma mark åŒå‡»
- (void)handleDoubleTap:(UITapGestureRecognizer *)recognizer
{
    HZPhotoBrowserView *view = _scrollView.subviews[self.currentImageIndex];
    CGPoint touchPoint = [recognizer locationInView:self];
    if (view.scrollview.zoomScale <= 1.0) {
        CGFloat scaleX = touchPoint.x + view.scrollview.contentOffset.x;//需要放大的图片的X点
        CGFloat sacleY = touchPoint.y + view.scrollview.contentOffset.y;//需要放大的图片的Y点
        [view.scrollview zoomToRect:CGRectMake(scaleX, sacleY, 10, 10) animated:YES];
    } else {
        [view.scrollview setZoomScale:1.0 animated:YES]; //还原
    }
}
#pragma mark é•¿æŒ‰
- (void)didPan:(UIPanGestureRecognizer *)panGesture {
    UIDeviceOrientation orientation = [UIDevice currentDevice].orientation;
    if (UIDeviceOrientationIsLandscape(orientation)) {//横屏不允许拉动图片
        return;
    }
    //transPoint : æ‰‹æŒ‡åœ¨è§†å›¾ä¸Šç§»åŠ¨çš„ä½ç½®ï¼ˆx,y)向下和向右为正,向上和向左为负。
    //locationPoint ï¼š æ‰‹æŒ‡åœ¨è§†å›¾ä¸Šçš„位置(x,y)就是手指在视图本身坐标系的位置。
    //velocity: æ‰‹æŒ‡åœ¨è§†å›¾ä¸Šç§»åŠ¨çš„é€Ÿåº¦ï¼ˆx,y), æ­£è´Ÿä¹Ÿæ˜¯ä»£è¡¨æ–¹å‘。
    CGPoint transPoint = [panGesture translationInView:self];
//    CGPoint locationPoint = [panGesture locationInView:self];
    CGPoint velocity = [panGesture velocityInView:self];//速度
    switch (panGesture.state) {
        case UIGestureRecognizerStateBegan:
        {
            [self prepareForHide];
        }
            break;
        case UIGestureRecognizerStateChanged:
        {
            _saveButton.hidden = YES;
            _indexLabel.hidden = YES;
            double delt = 1 - fabs(transPoint.y) / self.frame.size.height;
            delt = MAX(delt, 0);
            double s = MAX(delt, 0.5);
            CGAffineTransform translation = CGAffineTransformMakeTranslation(transPoint.x/s, transPoint.y/s);
            CGAffineTransform scale = CGAffineTransformMakeScale(s, s);
            self.tempView.transform = CGAffineTransformConcat(translation, scale);
            self.coverView.alpha = delt;
        }
            break;
        case UIGestureRecognizerStateEnded:
//        case UIGestureRecognizerStateCancelled:
        {
            if (fabs(transPoint.y) > 220 || fabs(velocity.y) > 500) {//退出图片浏览器
                [self hideAnimation];
            } else {//回到原来的位置
                [self bounceToOrigin];
            }
        }
            break;
        default:
            break;
    }
}
#pragma mark public methods
- (void)show
{
    _contentView = [[UIView alloc] init];
    _contentView.backgroundColor = HZPhotoBrowserBackgrounColor;
    UIWindow *window = [UIApplication sharedApplication].keyWindow;
    _contentView.center = window.center;
    _contentView.bounds = window.bounds;
    if (iPhoneX) {
        self.frame = CGRectMake(0, kStatusBar_Height,kAPPWidth,KAppHeight - kStatusBar_Height - kBottomSafeHeight);
    } else {
        self.frame = _contentView.bounds;
    }
    window.windowLevel = UIWindowLevelStatusBar+10.0f;//隐藏状态栏
    [_contentView addSubview:self];
    [window addSubview:_contentView];
    [self performSelector:@selector(onDeviceOrientationChangeWithObserver) withObject:nil afterDelay:HZPhotoBrowserShowImageAnimationDuration + 0.2];
}
@end
MIduo/Êý¾Ý/lib/ptotoBrowser/HZPhotoBrowserConfig.h
New file
@@ -0,0 +1,66 @@
//
//  HZPhotoBrowserConfig.h
//  HZPhotoBrowser
//
//  Created by huangzhenyu on 15-2-9.
//  Copyright (c) 2015å¹´ huangzhenyu. All rights reserved.
//
typedef enum {
    HZWaitingViewModeLoopDiagram, // çޝ形
    HZWaitingViewModePieDiagram // é¥¼åž‹
} HZWaitingViewMode;
typedef enum {
    HZPhotoBrowserStyleDefault, //复杂类型,带有弹回原位置动画效果
    HZPhotoBrowserStyleSimple // ç®€å•类型
} HZPhotoBrowserStyle;
#define kMinZoomScale 0.6f
#define kMaxZoomScale 2.0f
#define kAPPWidth [UIScreen mainScreen].bounds.size.width
#define KAppHeight [UIScreen mainScreen].bounds.size.height
#define iPhoneX ([UIScreen instancesRespondToSelector:@selector(currentMode)] ? CGSizeEqualToSize(CGSizeMake(1125, 2436), [[UIScreen mainScreen] currentMode].size) : NO)
//状态栏高度,iphoneX->44 å…¶ä»– 20
#define kStatusBar_Height [UIApplication sharedApplication].statusBarFrame.size.height
//底部安全距离 iphoneX->34 å…¶ä»– 0
#define kBottomSafeHeight (iPhoneX?34.0f:0.0f)
// å›¾ç‰‡è·¯å¾„
#define HZPhotoBrowserSrc(file)  [@"HZPhotoBrowser.bundle" stringByAppendingPathComponent:file]
#define HZPhotoBrowserImage(file)     [UIImage imageNamed:HZPhotoBrowserSrc(file)]
// å›¾ç‰‡ä¿å­˜æˆåŠŸæç¤ºæ–‡å­—
#define HZPhotoBrowserSaveImageSuccessText @" ä¿å­˜æˆåŠŸ "
// å›¾ç‰‡ä¿å­˜å¤±è´¥æç¤ºæ–‡å­—
#define HZPhotoBrowserSaveImageFailText @" ä¿å­˜å¤±è´¥ "
// browser背景颜色
#define HZPhotoBrowserBackgrounColor [UIColor colorWithRed:0 green:0 blue:0 alpha:1]
// browser中图片间的margin
#define HZPhotoBrowserImageViewMargin 10
//横竖屏切换动画时长
#define kRotateAnimationDuration 0.35f
// browser中显示图片动画时长
#define HZPhotoBrowserShowImageAnimationDuration 0.35f
// browser中隐藏图片动画时长
#define HZPhotoBrowserHideImageAnimationDuration 0.35f
// å›¾ç‰‡ä¸‹è½½è¿›åº¦æŒ‡ç¤ºè¿›åº¦æ˜¾ç¤ºæ ·å¼ï¼ˆHZWaitingViewModeLoopDiagram çŽ¯å½¢ï¼ŒHZWaitingViewModePieDiagram é¥¼åž‹ï¼‰
#define HZWaitingViewProgressMode HZWaitingViewModeLoopDiagram
// å›¾ç‰‡ä¸‹è½½è¿›åº¦æŒ‡ç¤ºå™¨èƒŒæ™¯è‰²
#define HZWaitingViewBackgroundColor [UIColor colorWithRed:0 green:0 blue:0 alpha:0.7]
//#define HZWaitingViewBackgroundColor [UIColor clearColor]
// å›¾ç‰‡ä¸‹è½½è¿›åº¦æŒ‡ç¤ºå™¨å†…部控件间的间距
#define HZWaitingViewItemMargin 10
MIduo/Êý¾Ý/lib/ptotoBrowser/HZPhotoBrowserView.h
New file
@@ -0,0 +1,25 @@
//
//  HZPhotoBrowserView.h
//  HZPhotoBrowser
//
//  Created by huangzhenyu on 15/5/7.
//  Copyright (c) 2015å¹´ huangzhenyu. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface HZPhotoBrowserView : UIView
@property (nonatomic,strong) UIScrollView *scrollview;
@property (nonatomic,strong) UIImageView *imageview;
@property (nonatomic, assign) CGFloat progress;
@property (nonatomic, assign) BOOL beginLoadingImage;
/**判断图片是否加载成功*/
@property (nonatomic, assign) BOOL hasLoadedImage;
@property (nonatomic,assign) CGSize zoomImageSize;
@property (nonatomic,assign) CGPoint scrollOffset;
@property (nonatomic, strong) void(^scrollViewDidScroll)(CGPoint offset);
@property (nonatomic,copy) void(^scrollViewWillEndDragging)(CGPoint velocity,CGPoint offset);//返回scrollView滚动速度
@property (nonatomic,copy) void(^scrollViewDidEndDecelerating)();
@property (nonatomic, assign) BOOL isFullWidthForLandScape;
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder;
@end
MIduo/Êý¾Ý/lib/ptotoBrowser/HZPhotoBrowserView.m
New file
@@ -0,0 +1,229 @@
//
//  HZPhotoBrowserView.m
//  HZPhotoBrowser
//
//  Created by huangzhenyu on 15/5/7.
//  Copyright (c) 2015å¹´ huangzhenyu. All rights reserved.
//
#import "HZPhotoBrowserView.h"
#import "HZWaitingView.h"
#import "UIImageView+WebCache.h"
@interface HZPhotoBrowserView() <UIScrollViewDelegate>
@property (nonatomic,strong) HZWaitingView *waitingView;
@property (nonatomic, strong) NSURL *imageUrl;
@property (nonatomic, strong) UIImage *placeHolderImage;
@property (nonatomic, strong) UIButton *reloadButton;
@end
@implementation HZPhotoBrowserView
#pragma mark recyle
- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        [self addSubview:self.scrollview];
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    CGFloat selfW = self.bounds.size.width;
    CGFloat selfH = self.bounds.size.height;
    _waitingView.center = CGPointMake(selfW * 0.5, selfH * 0.5);
    _scrollview.frame = self.bounds;
    CGFloat reloadBtnW = 200;
    CGFloat reloadBtnH = 40;
    _reloadButton.frame = CGRectMake((selfW - reloadBtnW)*0.5, (selfH - reloadBtnH)*0.5, reloadBtnW, reloadBtnH);
    [self adjustFrame];
}
#pragma mark getter setter
- (UIScrollView *)scrollview
{
    if (!_scrollview) {
        _scrollview = [[UIScrollView alloc] init];
        _scrollview.frame = CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height);
        _scrollview.showsVerticalScrollIndicator = NO;
        _scrollview.showsHorizontalScrollIndicator = NO;
        [_scrollview addSubview:self.imageview];
        _scrollview.delegate = self;
        _scrollview.clipsToBounds = YES;
    }
    return _scrollview;
}
- (UIImageView *)imageview
{
    if (!_imageview) {
        _imageview = [[UIImageView alloc] init];
        _imageview.frame = CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height);
        _imageview.userInteractionEnabled = YES;
    }
    return _imageview;
}
- (void)setProgress:(CGFloat)progress
{
    _progress = progress;
    _waitingView.progress = progress;
}
#pragma mark public methods
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder
{
    if (_reloadButton) {
        [_reloadButton removeFromSuperview];
    }
    _imageUrl = url;
    _placeHolderImage = placeholder;
    //添加进度指示器
    HZWaitingView *waitingView = [[HZWaitingView alloc] init];
    waitingView.mode = HZWaitingViewModeLoopDiagram;
    waitingView.center = CGPointMake(self.bounds.size.width * 0.5, self.bounds.size.height * 0.5);
    self.waitingView = waitingView;
    [self addSubview:waitingView];
    //HZWebImage加载图片
    __weak __typeof(self)weakSelf = self;
    [_imageview sd_setImageWithURL:url placeholderImage:placeholder options:SDWebImageRetryFailed progress:^(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL) {
        __strong __typeof(weakSelf)strongSelf = weakSelf;
        //在主线程做UI更新
        dispatch_async(dispatch_get_main_queue(), ^{
            strongSelf.waitingView.progress = (CGFloat)receivedSize / expectedSize;
        });
    } completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
        __strong __typeof(weakSelf)strongSelf = weakSelf;
        [_waitingView removeFromSuperview];
        if (error) {
            //图片加载失败的处理,此处可以自定义各种操作(...)
            strongSelf.hasLoadedImage = NO;//图片加载失败
            UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
            strongSelf.reloadButton = button;
            button.layer.cornerRadius = 2;
            button.clipsToBounds = YES;
//            button.bounds = CGRectMake(0, 0, 200, 40);
//            button.center = CGPointMake(self.bounds.size.height * 0.5, self.bounds.size.height * 0.5);
            button.titleLabel.font = [UIFont systemFontOfSize:14];
            button.backgroundColor = [UIColor colorWithRed:0.1f green:0.1f blue:0.1f alpha:0.3f];
            [button setTitle:@"图片加载失败,点击重新加载" forState:UIControlStateNormal];
            [button setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
            [button addTarget:strongSelf action:@selector(reloadImage) forControlEvents:UIControlEventTouchUpInside];
            [self addSubview:button];
            return;
        }
        //加载成功重新计算frame,解决长图可能显示不正确的问题
        [self setNeedsLayout];
        strongSelf.hasLoadedImage = YES;//图片加载成功
    }];
}
#pragma mark private methods
- (void)reloadImage
{
    [self setImageWithURL:_imageUrl placeholderImage:_placeHolderImage];
}
- (void)adjustFrame
{
//    CGRect frame = self.scrollview.frame;
    CGRect frame = self.frame;
//   NSLog(@"%@",NSStringFromCGRect(self.frame));
    if (self.imageview.image) {
        CGSize imageSize = self.imageview.image.size;//获得图片的size
        CGRect imageFrame = CGRectMake(0, 0, imageSize.width, imageSize.height);
        if (_isFullWidthForLandScape) {//图片宽度始终==屏幕宽度(新浪微博就是这种效果)
            CGFloat ratio = frame.size.width/imageFrame.size.width;
            imageFrame.size.height = imageFrame.size.height*ratio;
            imageFrame.size.width = frame.size.width;
        } else{
            if (frame.size.width<=frame.size.height) {
                //竖屏时候
                CGFloat ratio = frame.size.width/imageFrame.size.width;
                imageFrame.size.height = imageFrame.size.height*ratio;
                imageFrame.size.width = frame.size.width;
            }else{ //横屏的时候
                CGFloat ratio = frame.size.height/imageFrame.size.height;
                imageFrame.size.width = imageFrame.size.width*ratio;
                imageFrame.size.height = frame.size.height;
            }
        }
        self.imageview.frame = imageFrame;
//        NSLog(@"%@",NSStringFromCGRect(_scrollview.frame));
//        NSLog(@"%@",NSStringFromCGRect(self.imageview.frame));
//        self.scrollview.frame = self.imageview.frame;
        self.scrollview.contentSize = self.imageview.frame.size;
        self.imageview.center = [self centerOfScrollViewContent:self.scrollview];
        //根据图片大小找到最大缩放等级,保证最大缩放时候,不会有黑边
        CGFloat maxScale = frame.size.height/imageFrame.size.height;
        maxScale = frame.size.width/imageFrame.size.width>maxScale?frame.size.width/imageFrame.size.width:maxScale;
        //超过了设置的最大的才算数
        maxScale = maxScale>kMaxZoomScale?maxScale:kMaxZoomScale;
        //初始化
        self.scrollview.minimumZoomScale = kMinZoomScale;
        self.scrollview.maximumZoomScale = maxScale;
        self.scrollview.zoomScale = 1.0f;
    }else{
        frame.origin = CGPointZero;
        self.imageview.frame = frame;
        //重置内容大小
        self.scrollview.contentSize = self.imageview.frame.size;
    }
    self.scrollview.contentOffset = CGPointZero;
    self.zoomImageSize = self.imageview.frame.size;
}
- (CGPoint)centerOfScrollViewContent:(UIScrollView *)scrollView
{
    CGFloat offsetX = (scrollView.bounds.size.width > scrollView.contentSize.width)?
    (scrollView.bounds.size.width - scrollView.contentSize.width) * 0.5 : 0.0;
    CGFloat offsetY = (scrollView.bounds.size.height > scrollView.contentSize.height)?
    (scrollView.bounds.size.height - scrollView.contentSize.height) * 0.5 : 0.0;
    CGPoint actualCenter = CGPointMake(scrollView.contentSize.width * 0.5 + offsetX,
                                       scrollView.contentSize.height * 0.5 + offsetY);
    return actualCenter;
}
#pragma mark UIScrollViewDelegate
- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
{
    return self.imageview;
}
- (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(CGFloat)scale{
    self.zoomImageSize = view.frame.size;
    self.scrollOffset = scrollView.contentOffset;
}
- (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoint)velocity targetContentOffset:(inout CGPoint *)targetContentOffset{
    if(self.scrollViewWillEndDragging){
        self.scrollViewWillEndDragging(velocity, scrollView.contentOffset);
    }
}
- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView{
    if (self.scrollViewDidEndDecelerating) {
        self.scrollViewDidEndDecelerating();
    }
}
- (void)scrollViewDidZoom:(UIScrollView *)scrollView //这里是缩放进行时调整
{
    self.imageview.center = [self centerOfScrollViewContent:scrollView];
}
- (void)scrollViewDidScroll:(UIScrollView *)scrollView{
    self.scrollOffset = scrollView.contentOffset;
    if (self.scrollViewDidScroll) {
        self.scrollViewDidScroll(self.scrollOffset);
    }
}
@end
MIduo/Êý¾Ý/lib/ptotoBrowser/HZWaitingView.h
New file
@@ -0,0 +1,17 @@
//
//  HZWaitingView.h
//  HZPhotoBrowser
//
//  Created by huangzhenyu on 15-2-6.
//  Copyright (c) 2015å¹´ huangzhenyu. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "HZPhotoBrowserConfig.h"
@interface HZWaitingView : UIView
@property (nonatomic, assign) CGFloat progress;
@property (nonatomic, assign) int mode;
@end
MIduo/Êý¾Ý/lib/ptotoBrowser/HZWaitingView.m
New file
@@ -0,0 +1,87 @@
//
//  HZWaitingView.m
//  HZPhotoBrowser
//
//  Created by huangzhenyu on 15-2-6.
//  Copyright (c) 2015å¹´ huangzhenyu. All rights reserved.
//
#import "HZWaitingView.h"
@implementation HZWaitingView
- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.backgroundColor = HZWaitingViewBackgroundColor;
        self.clipsToBounds = YES;
        self.mode = HZWaitingViewModeLoopDiagram;
    }
    return self;
}
- (void)setProgress:(CGFloat)progress
{
    _progress = progress;
    [self setNeedsDisplay];
    if (progress >= 1) {
        [self removeFromSuperview];
    }
}
- (void)setFrame:(CGRect)frame
{
    //设置背景图为圆
    frame.size.width = 50;
    frame.size.height = 50;
    self.layer.cornerRadius = 25;
    [super setFrame:frame];
}
- (void)drawRect:(CGRect)rect
{
    CGContextRef ctx = UIGraphicsGetCurrentContext();
    CGFloat xCenter = rect.size.width * 0.5;
    CGFloat yCenter = rect.size.height * 0.5;
    [[UIColor whiteColor] set];
    switch (self.mode) {
        case HZWaitingViewModePieDiagram:
            {
                CGFloat radius = MIN(rect.size.width * 0.5, rect.size.height * 0.5) - HZWaitingViewItemMargin;
                CGFloat w = radius * 2 + HZWaitingViewItemMargin;
                CGFloat h = w;
                CGFloat x = (rect.size.width - w) * 0.5;
                CGFloat y = (rect.size.height - h) * 0.5;
                CGContextAddEllipseInRect(ctx, CGRectMake(x, y, w, h));
                CGContextFillPath(ctx);
                [HZWaitingViewBackgroundColor set];
                CGContextMoveToPoint(ctx, xCenter, yCenter);
                CGContextAddLineToPoint(ctx, xCenter, 0);
                CGFloat to = - M_PI * 0.5 + self.progress * M_PI * 2 + 0.001; // åˆå§‹å€¼
                CGContextAddArc(ctx, xCenter, yCenter, radius, - M_PI * 0.5, to, 1);
                CGContextClosePath(ctx);
                CGContextFillPath(ctx);
            }
            break;
        default:
            {
                CGContextSetLineWidth(ctx, 4);
                CGContextSetLineCap(ctx, kCGLineCapRound);
                CGFloat to = - M_PI * 0.5 + self.progress * M_PI * 2 + 0.05; // åˆå§‹å€¼0.05
                CGFloat radius = MIN(rect.size.width, rect.size.height) * 0.5 - HZWaitingViewItemMargin;
                CGContextAddArc(ctx, xCenter, yCenter, radius, - M_PI * 0.5, to, 0);
                CGContextStrokePath(ctx);
            }
            break;
    }
}
@end
MIduo/½çÃæ/ALBaseController.h
New file
@@ -0,0 +1,21 @@
//
//  ALBaseController.h
//  MIduo
//
//  Created by é‡åº†è¿ˆå°–科技有限公司 on 2018/8/23.
//  Copyright Â© 2018å¹´ yeshi. All rights reserved.
//
#import "MainBaseController.h"
@interface ALBaseController : MainBaseController
@property (nonatomic,strong)SJNoNetwork *noNetworkView;
- (void)loadNoNetworkView;
- (void)loadData;
- (BOOL)homeIsShowNetWorkView;
- (void)NetWorkStatesChange:(NSNotification *)sender;
@end
MIduo/½çÃæ/ALBaseController.m
New file
@@ -0,0 +1,159 @@
//
//  ALBaseController.m
//  MIduo
//
//  Created by é‡åº†è¿ˆå°–科技有限公司 on 2018/8/23.
//  Copyright Â© 2018å¹´ yeshi. All rights reserved.
//
#import "ALBaseController.h"
@interface ALBaseController ()
@end
@implementation ALBaseController
- (void)viewDidLoad {
    [super viewDidLoad];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(NetWorkStatesChange:) name:@"netWorkChangeEventNotification" object:nil];
    [self .view addSubview:self.noNetworkView];
    NSNotification *notice = [[NSNotification alloc]initWithName:@"netWorkChangeEventNotification" object:@([YTHsharedManger startManger].networkStatus) userInfo:nil];
    [self NetWorkStatesChange:notice];
}
#pragma mark - ç½‘络状态发生变化通知方法
- (void)NetWorkStatesChange:(NSNotification *)sender {
    BOOL canThouth = [self checkNetCanUse];
    NSLog(@"canThouth:%c",canThouth);
    [YTHsharedManger startManger].isCheckNetCanUse = 0;
    NSDictionary *urlDic = [[NSUserDefaults standardUserDefaults]objectForKey:@"MainUrlArray"];
    BOOL urlRequest = NO;
    if (urlDic == nil) {
        urlRequest = YES;
    }
    int networkState = [[sender object] intValue];
    switch (networkState) {
        case -1: {
            //未知网络状态
            ALToastCenter(@"网络连接异常,请检测网络设置");
        }
            break;
        case 0:
            //没有网络
            self.noNetworkView.primtTitle.text = @"网络未连接,请检测网络设置";
            [self.noNetworkView.iconImage setImage:[UIImage imageNamed:@"无网占位图"]];
            // é¦–页特有
            if ([self homeIsShowNetWorkView]) {
                [self loadNoNetworkView];
            } else {
                self.noNetworkView.hidden = YES;
            }
            break;
        case 1:
            //3G或者4G,反正用的是流量
            if (urlRequest) {
                [self isJumpTaobao];
            }
            self.noNetworkView.hidden = YES;
            [self loadData];
            break;
        case 2:
            //WIFI网络
            if (canThouth) {
                if (urlRequest) {
                    [self isJumpTaobao];
                }
                self.noNetworkView.hidden = YES;
                [self loadData];
            } else {
                [YTHsharedManger startManger].isCheckNetCanUse = -2;
                // é¦–页特有
                if ([self homeIsShowNetWorkView]) {
                    self.noNetworkView.primtTitle.text = @"网络连接异常,请检测网络设置";
                    [self.noNetworkView.iconImage setImage:[UIImage imageNamed:@"网络错误"]];
                    [self loadNoNetworkView];
                } else {
                    self.noNetworkView.hidden = YES;
                    [self loadData];
                }
            }
            break;
        default:
            break;
    }
}
- (void)loadNoNetworkView{
    [self.view bringSubviewToFront:self.noNetworkView];
    self.noNetworkView.hidden = NO;
}
- (void)ClickConnectBtn:(UIButton *)sender{
    if (iOS10) {
        NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
        if( [[UIApplication sharedApplication]canOpenURL:url] ) {
            [[UIApplication sharedApplication]openURL:url options:@{}completionHandler:^(BOOL success) {
            }];
        }
    }else{
        NSURL *url= [NSURL URLWithString:@"prefs:root=com.haicaojie-ios"];
        if( [[UIApplication sharedApplication]canOpenURL:url] ) {
            [[UIApplication sharedApplication]openURL:url];
        }
    }
}
- (SJNoNetwork *)noNetworkView{
    if (_noNetworkView) {
        return _noNetworkView;
    }
    _noNetworkView = [[SJNoNetwork alloc]initWithFrame:CGRectMake(0, 0, KScreenW, KScreenH)];
    _noNetworkView.backgroundColor = XYRBackgroundColor;
    [_noNetworkView.connectBtn addTarget:self action:@selector(ClickConnectBtn:) forControlEvents:UIControlEventTouchUpInside];
    _noNetworkView.hidden = YES;
    return _noNetworkView;
}
- (void)loadData {}
- (BOOL)homeIsShowNetWorkView {
    return NO;
}
- (void)dealloc{
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
@end
MIduo/½çÃæ/MainBaseController.h
New file
@@ -0,0 +1,17 @@
//
//  MainBaseController.h
//  MIduo
//
//  Created by é‡åº†è¿ˆå°–科技有限公司 on 2018/8/23.
//  Copyright Â© 2018å¹´ yeshi. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "SJNoNetwork.h"
@interface MainBaseController : UIViewController
- (NSString *)timestampChange:(NSString *)timeStr;
- (void)setBorderWithView:(UIView *)view top:(BOOL)top left:(BOOL)left bottom:(BOOL)bottom right:(BOOL)right borderColor:(UIColor *)color borderWidth:(CGFloat)width;
@end
MIduo/½çÃæ/MainBaseController.m
New file
@@ -0,0 +1,106 @@
//
//  MainBaseController.m
//  MIduo
//
//  Created by é‡åº†è¿ˆå°–科技有限公司 on 2018/8/23.
//  Copyright Â© 2018å¹´ yeshi. All rights reserved.
//
#import "MainBaseController.h"
@interface MainBaseController ()
@end
@implementation MainBaseController
- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor=XYRBackgroundColor;
    self.automaticallyAdjustsScrollViewInsets=NO;
    UIImage *image = [UIImage imageNamed:@"F72A37B3-8434-44EE-A2BA-BDCEB598C99F"];
    //去掉透明后导航栏下边的黑边
    [self.navigationController.navigationBar setShadowImage:image];
    UIButton *backbutton = [UIButton buttonWithType:UIButtonTypeCustom];
    backbutton.frame=CGRectMake(0, 0, 30, 30);
    [backbutton setImage:[UIImage imageNamed:@"第二版返回按钮"] forState:UIControlStateNormal];
    [backbutton addTarget:self action:@selector(back:) forControlEvents:UIControlEventTouchUpInside];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:backbutton];
}
- (void)back:(UIBarButtonItem*)item {
    [self.navigationController popViewControllerAnimated:YES];
}
- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    if (self.title.length > 0) {
        [MobClick beginLogPageView:self.title];
    } else{
        [MobClick beginLogPageView:self.navigationItem.title];
    }
}
- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    if (self.title.length > 0) {
        [MobClick endLogPageView:self.title];
    } else{
        [MobClick endLogPageView:self.navigationItem.title];
    }
}
//毫秒数时间戳转
- (NSString *)timestampChange:(NSString *)timeStr{
    long long time=[timeStr longLongValue];
    NSDate *d = [[NSDate alloc]initWithTimeIntervalSince1970:time/1000.0];
    NSDateFormatter *formatter = [[NSDateFormatter alloc]init];
    [formatter setDateFormat:@"yyyy/MM/dd HH:mm"];
    NSString*timeString=[formatter stringFromDate:d];
    return timeString;
}
//设置view某一遍的边框
- (void)setBorderWithView:(UIView *)view top:(BOOL)top left:(BOOL)left bottom:(BOOL)bottom right:(BOOL)right borderColor:(UIColor *)color borderWidth:(CGFloat)width
{
    if (top) {
        CALayer *layer = [CALayer layer];
        layer.frame = CGRectMake(0, 0, view.frame.size.width, width);
        layer.backgroundColor = color.CGColor;
        [view.layer addSublayer:layer];
    }
    if (left) {
        CALayer *layer = [CALayer layer];
        layer.frame = CGRectMake(0, 0, width, view.frame.size.height);
        layer.backgroundColor = color.CGColor;
        [view.layer addSublayer:layer];
    }
    if (bottom) {
        CALayer *layer = [CALayer layer];
        layer.frame = CGRectMake(0, view.frame.size.height - width, view.frame.size.width, width);
        layer.backgroundColor = color.CGColor;
        [view.layer addSublayer:layer];
    }
    if (right) {
        CALayer *layer = [CALayer layer];
        layer.frame = CGRectMake(view.frame.size.width - width, 0, width, view.frame.size.height);
        layer.backgroundColor = color.CGColor;
        [view.layer addSublayer:layer];
    }
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
@end
MIduo/½çÃæ/SJBaseViewController.h
@@ -7,17 +7,15 @@
//
#import <UIKit/UIKit.h>
#import "SJNoNetwork.h"
#import "MainBaseController.h"
@interface SJBaseViewController : UIViewController
@interface SJBaseViewController : MainBaseController
@property (nonatomic,strong)SJNoNetwork *noNetworkView;
- (void)loadNoNetworkView;
- (BOOL)datasourceIsNull;
- (void)loadData;
- (BOOL)homeIsShowNetWorkView;
-(void)NetWorkStatesChange:(NSNotification *)sender;
- (NSString *)timestampChange:(NSString *)timeStr;
- (void)setBorderWithView:(UIView *)view top:(BOOL)top left:(BOOL)left bottom:(BOOL)bottom right:(BOOL)right borderColor:(UIColor *)color borderWidth:(CGFloat)width;
@end
MIduo/½çÃæ/SJBaseViewController.m
@@ -18,95 +18,29 @@
- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor=XYRBackgroundColor;
    self.automaticallyAdjustsScrollViewInsets=NO;
    UIImage *image = [UIImage imageNamed:@"F72A37B3-8434-44EE-A2BA-BDCEB598C99F"];
    //去掉透明后导航栏下边的黑边
    [self.navigationController.navigationBar setShadowImage:image];
    UIButton *backbutton = [UIButton buttonWithType:UIButtonTypeCustom];
    backbutton.frame=CGRectMake(0, 0, 30, 30);
    [backbutton setImage:[UIImage imageNamed:@"第二版返回按钮"] forState:UIControlStateNormal];
    [backbutton addTarget:self action:@selector(back:) forControlEvents:UIControlEventTouchUpInside];
    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:backbutton];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(NetWorkStatesChange:) name:@"netWorkChangeEventNotification" object:nil];
    [self .view addSubview:self.noNetworkView];
//    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(networkError:) name:@"networkError" object:nil];
}
- (void)back:(UIBarButtonItem*)item {
    [self.navigationController popViewControllerAnimated:YES];
}
//毫秒数时间戳转
- (NSString *)timestampChange:(NSString *)timeStr{
    long long time=[timeStr longLongValue];
    NSDate *d = [[NSDate alloc]initWithTimeIntervalSince1970:time/1000.0];
    NSDateFormatter *formatter = [[NSDateFormatter alloc]init];
    [formatter setDateFormat:@"yyyy/MM/dd HH:mm"];
    NSString*timeString=[formatter stringFromDate:d];
    return timeString;
}
//设置view某一遍的边框
- (void)setBorderWithView:(UIView *)view top:(BOOL)top left:(BOOL)left bottom:(BOOL)bottom right:(BOOL)right borderColor:(UIColor *)color borderWidth:(CGFloat)width
{
    if (top) {
        CALayer *layer = [CALayer layer];
        layer.frame = CGRectMake(0, 0, view.frame.size.width, width);
        layer.backgroundColor = color.CGColor;
        [view.layer addSublayer:layer];
    }
    if (left) {
        CALayer *layer = [CALayer layer];
        layer.frame = CGRectMake(0, 0, width, view.frame.size.height);
        layer.backgroundColor = color.CGColor;
        [view.layer addSublayer:layer];
    }
    if (bottom) {
        CALayer *layer = [CALayer layer];
        layer.frame = CGRectMake(0, view.frame.size.height - width, view.frame.size.width, width);
        layer.backgroundColor = color.CGColor;
        [view.layer addSublayer:layer];
    }
    if (right) {
        CALayer *layer = [CALayer layer];
        layer.frame = CGRectMake(view.frame.size.width - width, 0, width, view.frame.size.height);
        layer.backgroundColor = color.CGColor;
        [view.layer addSublayer:layer];
    }
}
- (void)viewWillAppear:(BOOL)animated{
- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    NSNotification *notice = [[NSNotification alloc]initWithName:@"netWorkChangeEventNotification" object:@([YTHsharedManger startManger].networkStatus) userInfo:nil];
    
    [self NetWorkStatesChange:notice];
    if (self.title.length > 0) {
        [MobClick beginLogPageView:self.title];
    } else{
        [MobClick beginLogPageView:self.navigationItem.title];
        NSLog(@"%@",self.navigationItem.title);
    }
}
- (void)viewWillDisappear:(BOOL)animated{
- (void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    if (self.title.length > 0) {
        [MobClick endLogPageView:self.title];
    } else{
        [MobClick endLogPageView:self.navigationItem.title];
    }
}
#pragma mark - ç½‘络状态发生变化通知方法
-(void)NetWorkStatesChange:(NSNotification *)sender{
    BOOL canThouth = [self checkNetCanUse];
    NSLog(@"%c",canThouth);
    NSLog(@"canThouth:%c",canThouth);
    [YTHsharedManger startManger].isCheckNetCanUse = 0;
    NSDictionary *urlDic = [[NSUserDefaults standardUserDefaults]objectForKey:@"MainUrlArray"];
    BOOL urlRequest = NO;
@@ -136,22 +70,12 @@
                [_noNetworkView setHidden:YES];
            }
            
            // é¦–页特有
            if ([self homeIsShowNetWorkView]) {
                [self loadNoNetworkView];
                NSLog(@"%d",[self datasourceIsNull]);
            } else {
                [_noNetworkView setHidden:YES];
            }
            break;
            
        case 1:
            //3G或者4G,反正用的是流量
            //            [self.scrollPageView setHidden:NO];
            [self isJumpTaobao];
            if (urlRequest) {
                [self isJumpTaobao];
@@ -163,20 +87,7 @@
            
        case 2:
            //WIFI网络
            // é¦–页特有
            if ([self homeIsShowNetWorkView]) {
                [self loadNoNetworkView];
                NSLog(@"%d",[self datasourceIsNull]);
            } else {
                [_noNetworkView setHidden:YES];
                [self loadData];
            }
            if (canThouth) {
                if (urlRequest) {
                    [self isJumpTaobao];
@@ -210,7 +121,7 @@
    if (iOS10) {
        NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
        if( [[UIApplication sharedApplication]canOpenURL:url] ) {
            [[UIApplication sharedApplication]openURL:url options:@{}completionHandler:^(BOOL        success) {
            [[UIApplication sharedApplication]openURL:url options:@{}completionHandler:^(BOOL success) {
            }];
        }
    }else{
@@ -237,12 +148,6 @@
- (BOOL)datasourceIsNull{
    return YES;
}
- (BOOL)homeIsShowNetWorkView {
    return NO;
}
- (void)dealloc{
    [[NSNotificationCenter defaultCenter] removeObserver:self];
MIduo/½çÃæ/ÓÅ»Ýȯ/classificationViewController.h
@@ -6,7 +6,8 @@
//  Copyright Â© 2017å¹´ yeshi. All rights reserved.
//
#import "ALBaseController.h"
@interface classificationViewController : SJBaseViewController
@interface classificationViewController : ALBaseController
@end
MIduo/½çÃæ/ÓÅ»Ýȯ/classificationViewController.m
@@ -32,6 +32,10 @@
@property (nonatomic, assign) NSInteger page;
@property (nonatomic,strong)SJNoNetwork *noNetworkViews;
/// ç½‘络连接异常
@property (nonatomic, strong) ALAnomalyNetWorkView *anomalyView;
@end
@implementation classificationViewController
@@ -47,19 +51,22 @@
    self.automaticallyAdjustsScrollViewInsets = NO;
    
    [self.navigationController setNavigationBarHidden:YES animated:animated];
}
-(void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    
    [self.navigationController setNavigationBarHidden:NO animated:animated];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // self.view.backgroundColor=XYRBackgroundColor;
    [self.view addSubview:self.noNetworkViews];
    [self.view addSubview:self.anomalyView];
    
    //[self.view addSubview:self.anomalyView];
    self.view.backgroundColor = SJColor(108, 239, 250, 1);
    
    self.page = 1;
@@ -69,85 +76,169 @@
    //请求数据
    [self LoadCacheData];
    
    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(NetWorkStatesChange:)
                                                 name:@"netWorkChangeEventNotification"
                                               object:nil];
//    NSNotification *notice = [[NSNotification alloc]initWithName:@"netWorkChangeEventNotification" object:@([YTHsharedManger startManger].networkStatus) userInfo:nil];
//
//    [self NetWorkStatesChange:notice];
}
- (void)loadData {
    [super loadData];
    if (self.GoodsData.count == 0 || !self.GoodsData) {
        [self loadDataSource];
- (void)ClickConnectBtn:(UIButton *)sender{
    if (iOS10) {
        NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
        if( [[UIApplication sharedApplication]canOpenURL:url] ) {
            [[UIApplication sharedApplication]openURL:url options:@{}completionHandler:^(BOOL        success) {
            }];
        }
    }else{
        NSURL *url= [NSURL URLWithString:@"prefs:root=com.haicaojie-ios"];
        if( [[UIApplication sharedApplication]canOpenURL:url] ) {
            [[UIApplication sharedApplication]openURL:url];
        }
    }
}
- (BOOL)datasourceIsNull {
#pragma mark - ç½‘络状态发生变化通知方法
- (void)NetWorkStatesChange:(NSNotification *)sender {
    
    if (self.GoodsData.count == 0) {
        return YES;
    } else {
        return NO;
    }
}
    BOOL canThouth = [self checkNetCanUse];
    [YTHsharedManger startManger].isCheckNetCanUse = 0;
- (BOOL)homeIsShowNetWorkView {
    if (self.GoodsData.count == 0) {
        return YES;
    } else {
        return NO;
    int networkState = [[sender object] intValue];
    switch (networkState) {
        case -1:
            //未知网络状态
            if (self.GoodsData.count == 0) {
                self.noNetworkViews.hidden = YES;
                self.anomalyView.hidden = NO;
            } else {
                self.anomalyView.hidden = YES;
                self.noNetworkViews.hidden = YES;
                ALToastCenter(@"网络连接异常,请检测网络设置");
            }
            break;
        case 0:
            [self LoadCacheData];
            if (self.GoodsData.count == 0) {
                self.anomalyView.hidden = YES;
                self.noNetworkViews.hidden = NO;
            } else {
                self.anomalyView.hidden = YES;
                self.noNetworkViews.hidden = YES;
            }
            break;
        case 1: {
            //3G或者4G,反正用的是流量
            self.anomalyView.hidden = YES;
            self.noNetworkViews.hidden = YES;
            if (self.GoodsData.count == 0) {
                [self loadDataSource];
            }
        }
            break;
        case 2: {
            //WIFI网络
            if (canThouth) {
                if (self.GoodsData.count == 0) {
                    [self loadDataSource];
                }
                self.anomalyView.hidden = YES;
                self.noNetworkViews.hidden = YES;
            } else {
                 [YTHsharedManger startManger].isCheckNetCanUse = -2;
                if (self.GoodsData.count == 0) {
                    self.anomalyView.hidden = NO;
                    self.noNetworkViews.hidden = YES;
                } else {
                    self.anomalyView.hidden = YES;
                    self.noNetworkViews.hidden = YES;
                }
            }
        }
            break;
        default:
            break;
    }
}
- (void)LoadCacheData {
    self.plist.dataName = @"taoBaoCoupons";
    if ([self.plist readFile][0]) {
        self.GoodsData = [self.plist readFile][0];
        [self getAddView];
    } else {
        [self loadDataSource];
    }
}
-(void)loadDataSource {
    [[YTHNetInterface startInterface] cancelAll];
    [[YTHNetInterface startInterface] getCouponListWithPage:[NSString stringWithFormat:@"%ld",(long)self.page]
                                                  Withblock:^(BOOL isSuccessful, id result, NSString *error) {
                                                      if (isSuccessful) {
                                                          NSDictionary *tempDic=(NSDictionary *)result;
                                                          NSMutableArray *tempArr = [[tempDic objectForKey:@"data"] objectForKey:@"taoBaoCoupons"];
                                                          self.GoodsData = tempArr;
                                                          if (tempArr.count != 0 && self.page == 1) {
                                                              self.plist.dataName = @"taoBaoCoupons";
                                                              [self.plist writeFileWithData:tempArr];
                                                          }
                                                          [self getAddView];
                                                      } else {
                                                          if (self.GoodsData.count != 0) {
                                                              [self getAddView];
                                                          }
                                                      }
                                                  }];
@@ -230,4 +321,31 @@
    return _GoodsData;
}
- (SJNoNetwork *)noNetworkViews {
    if (_noNetworkViews) {
        return _noNetworkViews;
    }
    _noNetworkViews = [[SJNoNetwork alloc]initWithFrame:CGRectMake(0, 0, KScreenW, KScreenH)];
    _noNetworkViews.backgroundColor = XYRBackgroundColor;
    [_noNetworkViews.connectBtn addTarget:self action:@selector(ClickConnectBtn:) forControlEvents:UIControlEventTouchUpInside];
    _noNetworkViews.hidden = YES;
    return _noNetworkViews;
}
- (ALAnomalyNetWorkView *)anomalyView {
    if (_anomalyView) {
        return _anomalyView;
    }
    _anomalyView = [[ALAnomalyNetWorkView alloc]initWithFrame:CGRectMake(0, 0, KScreenW, KScreenH)];
    _anomalyView.backgroundColor = XYRBackgroundColor;
    [_anomalyView.connectBtn addTarget:self
                                action:@selector(ClickConnectBtn:)
                      forControlEvents:UIControlEventTouchUpInside];
    _anomalyView.hidden = YES;
    return _anomalyView;
}
@end
MIduo/½çÃæ/ÓÅ»Ýȯ/ÍÆ¼ö/RecommendCouponViewController.h
@@ -8,6 +8,8 @@
#import <UIKit/UIKit.h>
#import "ZJScrollPageView.h"
@interface RecommendCouponViewController : SJBaseViewController <ZJScrollPageViewChildVcDelegate>
#import "ALBaseController.h"
@interface RecommendCouponViewController : ALBaseController <ZJScrollPageViewChildVcDelegate>
@end
MIduo/½çÃæ/ÓÅ»Ýȯ/ÍÆ¼ö/RecommendCouponViewController.m
@@ -161,6 +161,7 @@
    }
}
/**
 å•†å“æ•°æ®åŠ è½½
 */
@@ -206,27 +207,26 @@
                
                if (self.GoodsData.count != 0) {
                    
                    //self.adviceTableview.hidden = NO;
                      self.adviceTableview.hidden = YES;
                    self.adviceTableview.hidden = YES;
                    
                    [CustomProgressHUD showNormal:@"网络未连接,请检测网络设置"];
                    ALToastBottom(@"网络未连接,请检测网络设置");
                    
                } else {
                    
                      self.adviceTableview.hidden = NO;
                    self.adviceTableview.hidden = NO;
                }
                
            } else {
                
                if (self.GoodsData.count != 0) {
                    
                     self.adviceTableview.hidden = YES;
                    self.adviceTableview.hidden = YES;
                    
                    [CustomProgressHUD showNormal:@"网络连接异常,请检测网络设置"];
                    ALToastBottom(@"网络连接异常,请检测网络设置");
                    
                } else {
                    
                      self.adviceTableview.hidden = NO;
                    self.adviceTableview.hidden = NO;
                }
            }
        }
MIduo/½çÃæ/ÓÅ»Ýȯ/ÍÆ¼ö/SJRecommendCouponCell.xib
@@ -88,7 +88,7 @@
                        </userDefinedRuntimeAttributes>
                    </view>
                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Â¥2.35" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eCv-3U-IAq">
                        <rect key="frame" x="218" y="63" width="257" height="24"/>
                        <rect key="frame" x="223" y="63" width="257" height="24"/>
                        <constraints>
                            <constraint firstAttribute="height" constant="24" id="uzt-d5-Q1f"/>
                        </constraints>
@@ -156,17 +156,17 @@
                        </constraints>
                    </imageView>
                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="返" translatesAutoresizingMaskIntoConstraints="NO" id="D79-Bg-REL">
                        <rect key="frame" x="193" y="67" width="18" height="16"/>
                        <rect key="frame" x="193" y="69" width="25" height="13"/>
                        <constraints>
                            <constraint firstAttribute="width" constant="18" id="Xlm-cZ-xaV"/>
                            <constraint firstAttribute="height" constant="16" id="xBv-Ca-XXG"/>
                            <constraint firstAttribute="width" constant="25" id="Xlm-cZ-xaV"/>
                            <constraint firstAttribute="height" constant="13" id="xBv-Ca-XXG"/>
                        </constraints>
                    </imageView>
                </subviews>
                <constraints>
                    <constraint firstItem="vRM-Ob-Sf1" firstAttribute="leading" secondItem="ap4-9J-XQX" secondAttribute="leading" id="0B8-sG-9r5"/>
                    <constraint firstItem="R8J-Da-h7i" firstAttribute="top" secondItem="vRM-Ob-Sf1" secondAttribute="bottom" constant="10" id="0q5-xv-AbN"/>
                    <constraint firstItem="D79-Bg-REL" firstAttribute="top" secondItem="vRM-Ob-Sf1" secondAttribute="top" constant="4" id="1xR-lT-HcF"/>
                    <constraint firstItem="D79-Bg-REL" firstAttribute="top" secondItem="vRM-Ob-Sf1" secondAttribute="top" constant="6" id="1xR-lT-HcF"/>
                    <constraint firstItem="7fb-Lg-x8N" firstAttribute="top" secondItem="ap4-9J-XQX" secondAttribute="top" constant="-3" id="4fi-fc-7F9"/>
                    <constraint firstItem="eCv-3U-IAq" firstAttribute="width" secondItem="H2p-sc-9uM" secondAttribute="width" multiplier="1:2" id="731-Km-c8U"/>
                    <constraint firstAttribute="bottom" secondItem="zj4-ms-34E" secondAttribute="bottom" id="7Dp-92-xN0"/>
@@ -184,7 +184,7 @@
                    <constraint firstItem="eCv-3U-IAq" firstAttribute="top" secondItem="vRM-Ob-Sf1" secondAttribute="top" id="bF6-6A-ePm"/>
                    <constraint firstItem="zj4-ms-34E" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="bKe-9E-iSS"/>
                    <constraint firstItem="vRM-Ob-Sf1" firstAttribute="top" secondItem="7fb-Lg-x8N" secondAttribute="bottom" constant="15" id="bV0-tV-MNv"/>
                    <constraint firstItem="eCv-3U-IAq" firstAttribute="leading" secondItem="vRM-Ob-Sf1" secondAttribute="trailing" constant="5" id="gaZ-yJ-gji"/>
                    <constraint firstItem="eCv-3U-IAq" firstAttribute="leading" secondItem="D79-Bg-REL" secondAttribute="trailing" constant="5" id="hpG-aU-try"/>
                    <constraint firstItem="v7z-QQ-ruB" firstAttribute="top" secondItem="ZXi-4S-nX3" secondAttribute="top" constant="5" id="joL-Bi-zKp"/>
                    <constraint firstItem="ap4-9J-XQX" firstAttribute="leading" secondItem="UE6-cB-IeF" secondAttribute="trailing" constant="10" id="kBG-hV-bGV"/>
                    <constraint firstItem="v7z-QQ-ruB" firstAttribute="leading" secondItem="ZXi-4S-nX3" secondAttribute="trailing" constant="3" id="kIS-eN-Cna"/>
@@ -222,6 +222,6 @@
        <image name="券" width="52" height="18"/>
        <image name="天猫" width="50" height="24"/>
        <image name="抢光了" width="75" height="75"/>
        <image name="返" width="13" height="12"/>
        <image name="返" width="25" height="13"/>
    </resources>
</document>
MIduo/½çÃæ/¶¯Ì¬/DynamicTableViewCell.m
@@ -127,9 +127,7 @@
    }
    
}
- (void)delayMethod{
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
MIduo/½çÃæ/¶¯Ì¬/DynamicViewController.h
@@ -7,7 +7,8 @@
//
#import <UIKit/UIKit.h>
#import "ALBaseController.h"
@interface DynamicViewController : SJBaseViewController
@interface DynamicViewController : ALBaseController
@end
MIduo/½çÃæ/¶¯Ì¬/DynamicViewController.m
@@ -14,6 +14,9 @@
#import "XHWebImageAutoSize.h"
#import "UIImageView+WebCache.h"
#import "ShonpingShareViewController.h"
#import "ALNetWorking.h"
#import "HZPhotoBrowser.h"
@interface DynamicViewController ()<UITableViewDelegate, UITableViewDataSource,
UIScrollViewDelegate, DynamicTableViewCellDelegate, HXEasyCustomShareViewDelegate,
@@ -22,7 +25,7 @@
    NSInteger _Flag;
}
@property (nonatomic, strong) UITableView * tableview;
@property (nonatomic, strong) NSMutableArray * dataSource;
@property (nonatomic, strong) NSMutableArray *dataSource;
@property (nonatomic, strong) UIButton *topBtn;
@property (nonatomic, assign) float lastContentOffset;
@property (nonatomic, assign) NSInteger flag;
@@ -30,11 +33,6 @@
@property (nonatomic, strong) PlistFileOperator *plist;
@property (nonatomic, assign) NSInteger page;
@property (nonatomic,strong)SJNoNetwork *noNetworkViews;
/// ç½‘络连接异常
@property (nonatomic, strong) ALAnomalyNetWorkView *anomalyView;
@end
@@ -51,12 +49,8 @@
    [self.navigationController.navigationBar setShadowImage:image];
    
    self.navigationController.navigationBar.titleTextAttributes=@{NSForegroundColorAttributeName:XYRMainColor,NSFontAttributeName:[UIFont boldSystemFontOfSize:17]};
    [[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(NetWorkStatesChange:)
                                                 name:@"netWorkChangeEventNotification"
                                               object:nil];
}
- (void)viewDidLoad {
    [super viewDidLoad];
    
@@ -70,97 +64,11 @@
    self.view.backgroundColor = XYRBackgroundColor;
    [self.view addSubview:self.tableview];
    [self.view addSubview:self.topBtn];
    [self.view addSubview:self.noNetworkViews];
    [self.view addSubview:self.anomalyView];
    
    self.page = 1;
    
    //请求数据
    [self LoadCacheData];
}
- (void)ClickConnectBtn:(UIButton *)sender{
    if (iOS10) {
        NSURL *url = [NSURL URLWithString:UIApplicationOpenSettingsURLString];
        if( [[UIApplication sharedApplication]canOpenURL:url] ) {
            [[UIApplication sharedApplication]openURL:url options:@{}completionHandler:^(BOOL        success) {
            }];
        }
    }else{
        NSURL *url= [NSURL URLWithString:@"prefs:root=com.haicaojie-ios"];
        if( [[UIApplication sharedApplication]canOpenURL:url] ) {
            [[UIApplication sharedApplication]openURL:url];
        }
    }
}
#pragma mark - ç½‘络状态发生变化通知方法
-(void)NetWorkStatesChange:(NSNotification *)sender{
    int networkState = [[sender object] intValue];
    switch (networkState) {
        case -1:
            //未知网络状态
            if (self.dataSource.count == 0) {
                self.tableview.hidden = YES;
                self.noNetworkViews.hidden = YES;
                self.anomalyView.hidden = NO;
            } else {
                self.tableview.hidden = NO;
                self.anomalyView.hidden = YES;
                self.noNetworkViews.hidden = YES;
                [CustomProgressHUD showNormal:@"网络连接异常,请检测网络设置"];
            }
            break;
        case 0:
            //没有网络
            if (self.dataSource.count == 0) {
                self.anomalyView.hidden = YES;
                self.noNetworkViews.hidden = NO;
            }
            break;
        case 1: {
            //3G或者4G,反正用的是流量
            if (self.dataSource.count == 0 || !self.dataSource) {
                [self getRecommendActivity];
            }
            self.anomalyView.hidden = YES;
            self.noNetworkViews.hidden = YES;
        }
            break;
        case 2: {
            //WIFI网络
            if (self.dataSource.count == 0 || !self.dataSource) {
                [self getRecommendActivity];
            }
            self.anomalyView.hidden = YES;
            self.noNetworkViews.hidden = YES;
        }
            break;
        default:
            break;
    }
}
- (void)LoadCacheData {
@@ -179,10 +87,33 @@
    }
}
- (void)loadData {
    [super loadData];
    if (self.dataSource.count == 0) {
        [self getRecommendActivity];
    }
}
- (BOOL)homeIsShowNetWorkView {
    if (self.dataSource.count == 0) {
        return YES;
    } else {
        return NO;
    }
}
- (void)viewWillDisappear:(BOOL)animated{
    [SVProgressHUD dismiss];
    [[ALNetWorking startInterface] cancelAll];
}
/**
@@ -198,8 +129,6 @@
       isMainOrDynamic:YES
               success:^(NSDictionary *object) {
                   
                   self.anomalyView.hidden = YES;
                   self.noNetworkViews.hidden = YES;
                   self.tableview.hidden = NO;
                   
                   [self.tableview.mj_header endRefreshing];
@@ -257,38 +186,28 @@
                       
                       if (self.dataSource.count == 0) {
                           
                           self.anomalyView.hidden = YES;
                           self.noNetworkViews.hidden = NO;
                           self.tableview.hidden = YES;
                           
                       } else {
                           self.anomalyView.hidden = YES;
                           self.noNetworkViews.hidden = YES;
                           self.tableview.hidden = NO;
                           
                           [CustomProgressHUD showNormal:@"网络未连接,请检测网络设置"];
                           ALToastBottom(@"网络未连接,请检测网络设置");
                           
                       }
                       
                   } else {
                       
                       if (self.dataSource.count == 0) {
                           
                           self.tableview.hidden = YES;
                           self.noNetworkViews.hidden = YES;
                           self.anomalyView.hidden = NO;
                           
                       } else {
                           
                           self.tableview.hidden = NO;
                           self.anomalyView.hidden = YES;
                           self.noNetworkViews.hidden = YES;
                           [CustomProgressHUD showNormal:@"网络连接异常,请检测网络设置"];
                           ALToastBottom(@"网络连接异常,请检测网络设置");
                       }
                   }
                   
               }];
@@ -305,11 +224,12 @@
    NSMutableDictionary *dictionary = [SJNetwork CommonDictionarywithDic:dic];
    [YTHsharedManger startManger].isMainOrDynamic = YES;
    
    [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP,@"activity/addShareCount"] param:dictionary isMainOrDynamic:YES success:^(NSDictionary *object) {
        //        NSLog(@"%@",object);
   [[ALNetWorking startInterface] Post:[NSString stringWithFormat:@"%@/%@",domainHTTP,@"activity/addShareCount"]
                                 param:dictionary
                               success:^(NSDictionary *object) {
    } fail:^(id object) {
        //        NSLog(@"%@",object);
    }];
    
}
@@ -331,9 +251,9 @@
    
    NSDictionary *dic = self.dataSource[_Flag];
    if ([dic[@"type"]integerValue] == 1 || [dic[@"type"]integerValue] == 2) {
        if ([[NSUserDefaults standardUserDefaults] objectForKey:@"userId"] == nil) {
            [SVProgressHUD setContainerView:[UIApplication sharedApplication].delegate.window];
            [SVProgressHUD showInfoWithStatus:@"登录后才能分享"];
        if (!([[NSUserDefaults standardUserDefaults] objectForKey:@"userId"])) {
            ALToastCenter(@"登录后才能分享");
            
            //登录界面
            LoginViewController *loginVC = [[LoginViewController alloc] init];
@@ -346,6 +266,9 @@
            return;
        }
    }
    [SVProgressHUD setContainerView:[UIApplication sharedApplication].delegate.window];
    [SVProgressHUD show];
    
    [self activityAddShareCountWithID:dic[@"id"]];
    NSMutableArray *picArray = @[].mutableCopy;
@@ -395,9 +318,9 @@
    NSDictionary *dictionary = [SJNetwork CommonDictionarywithDic:dic];
    [YTHsharedManger startManger].isMainOrDynamic = YES;
    
    [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP,@"activity/shareGoods"]
                 param:dictionary
       isMainOrDynamic:YES success:^(NSDictionary *object) {
    [[ALNetWorking startInterface] Post:[NSString stringWithFormat:@"%@/%@",domainHTTP,@"activity/shareGoods"]
                                  param:dictionary
                                success:^(NSDictionary *object) {
           
           if ([object[@"code"]integerValue] == 0) {
               
@@ -448,11 +371,14 @@
           
           if (((NSError *)object).code == -1009) {
               
               [CustomProgressHUD showNormal:@"网络未连接,请检测网络设置"];
                ALToastBottom(@"网络未连接,请检测网络设置");
           } else {
               [CustomProgressHUD showNormal:@"网络连接异常,请检测网络设置"];
               if (((NSError *)object).code != -999) {
                   ALToastBottom(@"网络连接异常,请检测网络设置");
               }
           }
       }];
}
@@ -469,8 +395,9 @@
    activityVC.excludedActivityTypes = @[UIActivityTypePostToFacebook,UIActivityTypePostToTwitter,UIActivityTypeMessage,UIActivityTypeMail,UIActivityTypePrint,UIActivityTypeCopyToPasteboard,UIActivityTypeAssignToContact,UIActivityTypeSaveToCameraRoll,UIActivityTypeAddToReadingList,UIActivityTypePostToFlickr,UIActivityTypePostToVimeo,UIActivityTypePostToTencentWeibo,UIActivityTypeAirDrop,UIActivityTypeOpenInIBooks];
    [self presentViewController:activityVC animated:YES completion:^{
        [SVProgressHUD setContainerView:[UIApplication sharedApplication].delegate.window];
        [SVProgressHUD showSuccessWithStatus:@"文本内容复制成功"];
        [SVProgressHUD dismiss];
        ALToastCenter(@"文本内容复制成功");
    }];
    
}
@@ -481,9 +408,11 @@
 @param activityId id
 */
- (void)activityinviteImgWirh:(NSString *)activityId{
    if ([[NSUserDefaults standardUserDefaults] objectForKey:@"userId"] == nil) {
        [SVProgressHUD setContainerView:[UIApplication sharedApplication].delegate.window];
        [SVProgressHUD showErrorWithStatus:@"请登录之后再试"];
    if (!([[NSUserDefaults standardUserDefaults] objectForKey:@"userId"])) {
        [SVProgressHUD dismiss];
        ALToastBottom(@"登录后才能分享");
        return;
    }
    NSMutableDictionary *dic = @{}.mutableCopy;
@@ -492,10 +421,12 @@
    NSMutableDictionary *dictionary = [SJNetwork CommonDictionarywithDic:dic];
    [YTHsharedManger startManger].isMainOrDynamic = YES;
    
    [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP,@"activity/inviteImg"] param:dictionary isMainOrDynamic:YES success:^(NSDictionary *object) {
     [[ALNetWorking startInterface] Post:[NSString stringWithFormat:@"%@/%@",domainHTTP,@"activity/inviteImg"]
                                   param:dictionary
                                 success:^(NSDictionary *object)  {
        
        if ([object[@"code"]integerValue] == 0) {
            [SVProgressHUD show];
            NSDictionary *dic = object[@"data"];
            NSString *shareString =[NSString stringWithFormat:@"%@",dic[@"shareTitle"]];
            UIPasteboard*pasteboard = [UIPasteboard generalPasteboard];
@@ -507,8 +438,11 @@
                UIImage *image = [UIImage imageWithData:data];
                [array addObject:image];
            }
            [self wxShareWithArray:array];
        }else{
        } else {
            [SVProgressHUD setContainerView:[UIApplication sharedApplication].delegate.window];
            [SVProgressHUD showErrorWithStatus:object[@"msg"]];
        }
@@ -517,11 +451,15 @@
        
        if (((NSError *)object).code == -1009) {
            
            [CustomProgressHUD showNormal:@"网络未连接,请检测网络设置"];
            ALToastBottom(@"网络未连接,请检测网络设置");
            
        } else {
            
            [CustomProgressHUD showNormal:@"网络连接异常,请检测网络设置"];
            if (((NSError *)object).code != -999) {
                 ALToastBottom(@"网络连接异常,请检测网络设置");
            }
        }
    }];
}
@@ -558,7 +496,7 @@
    if ([YTHsharedManger startManger].isDetailWebValue) {
        SureWebViewController *webView=[[SureWebViewController alloc] init];
        [webView backClicked:^(NSString *string) {
            //            [self.navigationController popViewControllerAnimated:YES];
        }];
        webView.goodsId=goodsID;
        webView.canDownRefresh=YES;
@@ -721,6 +659,20 @@
                _tableview .rowHeight = 95 + height111 + cell.labelHeight.constant + cell.imagesviewLayout.constant;
            }
            
            UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
            button.frame = imageview.frame;
            button.tag = indexPath.row;
            [cell.imagesView addSubview:button];
            [[[button rac_signalForControlEvents:UIControlEventTouchUpInside] takeUntil:cell.rac_prepareForReuseSignal] subscribeNext:^(UIButton *button) {
                HZPhotoBrowser *browser = [[HZPhotoBrowser alloc] init];
                browser.isFullWidthForLandScape = YES;
                browser.isNeedLandscape = YES;
                browser.currentImageIndex = 0;
                browser.imageArray = array;
                [browser show];
            }];
        }
        
    } else if (type == 3 && imageList.count == 0) {
@@ -739,27 +691,14 @@
    return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
    return KScreenW * 0.32;
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
    return 0.001;
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
    UIView *view = [[UIView alloc]init];
    UIImageView *imageview = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, KScreenW, KScreenW *0.32)];
    imageview.image = [UIImage imageNamed:@"DongtaiTop"];
    imageview.userInteractionEnabled = YES;
    UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(headerImageTaped:)];
    [imageview addGestureRecognizer:tap];
    [view addSubview:imageview];
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
    UIView *view = [[UIView alloc] init];
    view.backgroundColor = XYRBackgroundColor;
    return view;
}
- (void)headerImageTaped:(UITapGestureRecognizer *)tap {
    ShonpingShareViewController *SureWebVC=[[ShonpingShareViewController alloc] init];
    SureWebVC.urlString=[YTHsharedManger startManger].membersUrl;
    SureWebVC.hidesBottomBarWhenPushed=YES;
    [self.navigationController pushViewController:SureWebVC animated:YES];
}
/**
@@ -780,7 +719,7 @@
                                                                             error:&error];
    NSArray *arrayOfAllMatches = [regex matchesInString:string options:0 range:NSMakeRange(0, [string length])];
    
    for (NSTextCheckingResult *match in arrayOfAllMatches){
    for (NSTextCheckingResult *match in arrayOfAllMatches) {
        NSString* substringForMatch = [string substringWithRange:match.range];
        NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:string];
        [str addAttribute:NSForegroundColorAttributeName value:XYRMainColor range:match.range];
@@ -799,7 +738,8 @@
    if (_tableview) {
        return _tableview;
    }
    _tableview = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, KScreenW , KScreenH - 64 - kToolBarH) style:UITableViewStyleGrouped];
    _tableview = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, KScreenW , KScreenH - kNavigationBarH - kStatusBarH - kToolBarH)
                                             style:UITableViewStyleGrouped];
    _tableview.delegate = self;
    _tableview.dataSource = self;
    _tableview.separatorStyle = UITableViewCellSelectionStyleNone ;
@@ -989,32 +929,6 @@
        _dataSource = [[NSMutableArray alloc] init];
    }
    return _dataSource;
}
- (SJNoNetwork *)noNetworkViews {
    if (_noNetworkViews) {
        return _noNetworkViews;
    }
    _noNetworkViews = [[SJNoNetwork alloc]initWithFrame:CGRectMake(0, 0, KScreenW, KScreenH)];
    _noNetworkViews.backgroundColor = XYRBackgroundColor;
    [_noNetworkViews.connectBtn addTarget:self action:@selector(ClickConnectBtn:) forControlEvents:UIControlEventTouchUpInside];
    _noNetworkViews.hidden = YES;
    return _noNetworkViews;
}
- (ALAnomalyNetWorkView *)anomalyView {
    if (_anomalyView) {
        return _anomalyView;
    }
    _anomalyView = [[ALAnomalyNetWorkView alloc]initWithFrame:CGRectMake(0, 0, KScreenW, KScreenH)];
    _anomalyView.backgroundColor = XYRBackgroundColor;
    [_anomalyView.connectBtn addTarget:self
                                action:@selector(ClickConnectBtn:)
                      forControlEvents:UIControlEventTouchUpInside];
    _anomalyView.hidden = YES;
    return _anomalyView;
}
- (void)didReceiveMemoryWarning {
MIduo/½çÃæ/ÎÒµÄ/MineToolBarTableViewCell.h
@@ -2,18 +2,16 @@
//  MineToolBarTableViewCell.h
//  MIduo
//
//  Created by apple on 2017/11/30.
//  Copyright Â© 2017å¹´ yeshi. All rights reserved.
//  Created by é‡åº†è¿ˆå°–科技有限公司 on 2018/8/20.
//  Copyright Â© 2018å¹´ yeshi. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "ZXButton.h"
@interface MineToolBarTableViewCell : UITableViewCell
@property (weak, nonatomic) IBOutlet ZXButton *orderBtn;//订单
@property (weak, nonatomic) IBOutlet ZXButton *collectBtn;//收藏
@property (weak, nonatomic) IBOutlet ZXButton *FootprintBtn;//足迹
@property (weak, nonatomic) IBOutlet ZXButton *myTeamBtn;//我的队员
@property (nonatomic, strong) UIView *bgView;
@property (nonatomic, strong) UIButton *clickButton;
@end
MIduo/½çÃæ/ÎÒµÄ/MineToolBarTableViewCell.m
@@ -2,11 +2,21 @@
//  MineToolBarTableViewCell.m
//  MIduo
//
//  Created by apple on 2017/11/30.
//  Copyright Â© 2017å¹´ yeshi. All rights reserved.
//  Created by é‡åº†è¿ˆå°–科技有限公司 on 2018/8/20.
//  Copyright Â© 2018å¹´ yeshi. All rights reserved.
//
#import "MineToolBarTableViewCell.h"
@interface MineToolBarTableViewCell ()
@property (nonatomic, strong) NSArray *imageArr;
@property (nonatomic, strong) UIImageView *imagesView;
@property (nonatomic, strong) UILabel *textsLabel;
@end
@implementation MineToolBarTableViewCell
@@ -21,4 +31,75 @@
    // Configure the view for the selected state
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.backgroundColor = [UIColor clearColor];
        self.imageArr = @[@"订单", @"收藏", @"足迹"];
        [self cellConfig];
    }
    return self;
}
- (void)cellConfig {
    [self.contentView addSubview:self.bgView];
    self.bgView.sd_layout
    .leftSpaceToView(self.contentView, 10)
    .topSpaceToView(self.contentView, 0)
    .bottomSpaceToView(self.contentView, 0)
    .widthIs(KScreenW - 20);
    for (int i = 0; i < self.imageArr.count; i++) {
        self.clickButton = [UIButton buttonWithType:UIButtonTypeCustom];
        self.clickButton.tag = 66 + i;
        [self.bgView addSubview:self.clickButton];
        self.clickButton.sd_layout
        .leftSpaceToView(self.bgView, i * (self.bgView.size.width / 3))
        .topSpaceToView(self.bgView, 0)
        .bottomSpaceToView(self.bgView, 0)
        .widthIs(self.bgView.size.width / 3);
        self.imagesView = [[UIImageView alloc] init];
        self.imagesView.image = [UIImage imageNamed:self.imageArr[i]];
        [self.clickButton addSubview:self.imagesView];
        self.imagesView.sd_layout
        .topSpaceToView(self.clickButton, 10)
        .centerXEqualToView(self.clickButton)
        .widthIs(41)
        .heightIs(41);
        self.textsLabel = [[UILabel alloc] init];
        self.textsLabel.text = self.imageArr[i];
        self.textsLabel.textAlignment = NSTextAlignmentCenter;
        self.textsLabel.font = [UIFont systemFontOfSize:15.0];
        self.textsLabel.textColor = SJColor(102, 102, 102, 1.0);
        [self.clickButton addSubview:self.textsLabel];
        self.textsLabel.sd_layout
        .topSpaceToView(self.imagesView, 3)
        .leftSpaceToView(self.clickButton, 0)
        .rightSpaceToView(self.clickButton, 0)
        .heightIs(20);
    }
}
- (UIView *)bgView {
    if (!_bgView) {
        _bgView = [[UIView alloc] init];
        _bgView.backgroundColor = [UIColor whiteColor];
        _bgView.layer.masksToBounds = YES;
        _bgView.layer.cornerRadius = 8.0;
    }
    return _bgView;
}
@end
MIduo/½çÃæ/ÎÒµÄ/MineToolBarTableViewCell.xib
File was deleted
MIduo/½çÃæ/ÎÒµÄ/MineViewController.m
@@ -37,6 +37,9 @@
#import "ShonpingShareViewController.h"
#import "SJLoginTaoBao.h"
#import "ShareAppView.h"
#import <ShareSDK/ShareSDK.h>
#import <ShareSDKUI/ShareSDK+SSUI.h>
@interface MineViewController ()<UITableViewDelegate,UITableViewDataSource,LXAlertViewDelegate,UIScrollViewDelegate, LoginViewControllerDelegate>{
    UILabel *titleLabel;
@@ -62,6 +65,8 @@
@property (nonatomic, assign) BOOL isOrderClicked;
@property (nonatomic, assign) BOOL isSkip;
@property (nonatomic, strong) ShareAppView *shareAppView;
@end
@implementation MineViewController
@@ -70,7 +75,7 @@
    [super viewWillAppear:animated];
    
    [MobClick beginLogPageView:@"我的"];
    self.navigationController.navigationBar.translucent = NO;
    
    if (_MineTableView) {
@@ -78,7 +83,7 @@
        if([[NSUserDefaults standardUserDefaults] objectForKey:@"userId"]){
            
            [self autoLogin];
        }else{
            
            self.navigationItem.title=@"";
@@ -86,12 +91,12 @@
            [_MineTableView reloadData];
        }
    }
    [self usergetusermoney];
    if ([[NSUserDefaults standardUserDefaults] objectForKey:@"userId"]) {
        
          [self getMessage];
        [self getMessage];
        
    } else {
        
@@ -103,7 +108,7 @@
    //去掉透明后导航栏下边的黑边
    self.navigationController.navigationBar.titleTextAttributes=@{NSForegroundColorAttributeName:[UIColor whiteColor],NSFontAttributeName:[UIFont boldSystemFontOfSize:17]};
    [self.navigationController setNavigationBarHidden:NO animated:animated];
    [self.navigationController.navigationBar setShadowImage:[UIImage new]];
    NSLog(@"%d",self.currentIsInBottom);
    
@@ -117,10 +122,10 @@
    [super viewWillDisappear:animated];
    //设置导航栏颜色
    self.navigationController.navigationBar.barTintColor = [UIColor whiteColor];
    //去掉透明后导航栏下边的黑边
    self.navigationController.navigationBar.titleTextAttributes=@{NSForegroundColorAttributeName:XYRMainColor,
                                                              NSFontAttributeName:[UIFont boldSystemFontOfSize:17]};
                                                                  NSFontAttributeName:[UIFont boldSystemFontOfSize:17]};
    NSLog(@"%d",self.currentIsInBottom);
    [MobClick endLogPageView:@"我的"];
}
@@ -185,7 +190,7 @@
            UITabBarController *baseTabBar = (UITabBarController *)[UIApplication sharedApplication].keyWindow.rootViewController;
            [baseTabBar.tabBar hideBadgeOnItemIndex:3];
        }
    } fail:^(id object) {
        NSLog(@"%@",object);
    }];
@@ -229,11 +234,11 @@
 */
-(void)creatData
{
    grounpData2 = [NSArray arrayWithObjects:@"订单申诉", @"会员特权", @"关于我们", nil];
    grounpData2 = [NSArray arrayWithObjects:@"订单申诉", @"分享APP", @"关于我们", nil];
}
/**
    isShopCarWXLogin æ˜¯å¦æ˜¯ç‚¹å‡»è´­ç‰©è½¦æˆ–者订单微信登录的判断
 isShopCarWXLogin æ˜¯å¦æ˜¯ç‚¹å‡»è´­ç‰©è½¦æˆ–者订单微信登录的判断
 */
- (void)boundTaoBao:(BOOL)isShopCarWXLogin isOrder:(BOOL)isOrder {
    
@@ -247,7 +252,7 @@
    NSMutableDictionary *dictionary = [SJNetwork CommonDictionarywithDic:dic];
    
    [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP,@"user/bindTaoBao"] param:dictionary success:^(NSDictionary *object) {
        if ([object[@"code"] integerValue] == 0) {
            
            if (isShopCarWXLogin) {
@@ -280,7 +285,7 @@
-(void) CreatNavigationBar{
    //设置按钮
    UIView *messageView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 30, 30)];
    UIButton *messageButton = [UIButton buttonWithType:UIButtonTypeCustom];
    messageButton.frame = CGRectMake(0, 4, 25, 25);
    [messageButton setBackgroundImage:[UIImage imageNamed:@"我的-消息中心"] forState:UIControlStateNormal];
@@ -298,7 +303,7 @@
    [settingBtn setImage:[UIImage imageNamed:@"我的-设置"] forState:UIControlStateNormal];
    [settingBtn addTarget:self action:@selector(settingThisAPP:) forControlEvents:UIControlEventTouchUpInside];
    UIBarButtonItem *settingItem = [[UIBarButtonItem alloc]initWithCustomView:settingBtn];
    UILabel *WhiteLabel=[[UILabel alloc] initWithFrame:CGRectMake(0, 0, 8, 10)];
    WhiteLabel.backgroundColor=[UIColor clearColor];
    UIBarButtonItem *WhiteBarItem=[[UIBarButtonItem alloc] initWithCustomView:WhiteLabel];
@@ -316,7 +321,7 @@
        _MineTableView.dataSource=self;
        _MineTableView.tableFooterView=[UIView new];
        _MineTableView.separatorStyle = UITableViewCellSelectionStyleNone;
//        _MineTableView.bounces = NO;
        //        _MineTableView.bounces = NO;
        _MineTableView.estimatedRowHeight = 0;
        _MineTableView.estimatedSectionHeaderHeight = 0;
        _MineTableView.estimatedSectionFooterHeight = 0;
@@ -325,9 +330,9 @@
        [_MineTableView registerNib:[UINib nibWithNibName:@"MineRedEnvelopesTableViewCell" bundle:nil] forCellReuseIdentifier:@"MineRedEnvelopesTableViewCell"];
        [_MineTableView registerNib:[UINib nibWithNibName:@"MineHelperTableViewCell" bundle:nil] forCellReuseIdentifier:@"MineHelperTableViewCell"];
        [_MineTableView registerNib:[UINib nibWithNibName:@"MineHeaderTableViewCell" bundle:nil] forCellReuseIdentifier:@"MineHeaderTableViewCell"];
        [_MineTableView registerNib:[UINib nibWithNibName:@"MineToolBarTableViewCell" bundle:nil] forCellReuseIdentifier:@"MineToolBarTableViewCell"];
        [_MineTableView registerNib:[UINib nibWithNibName:@"MineThirdTableViewCell" bundle:nil] forCellReuseIdentifier:@"MineThirdTableViewCell"];
        [self.view addSubview:_MineTableView];
    }
}
@@ -383,7 +388,7 @@
            [self boundTaoBao:NO isOrder:NO];
        }
    }];
}
/**
@@ -394,7 +399,7 @@
    
    [[YTHsharedManger startManger] unBindUserInfo:[userInfo objectForKey:@"id"] WithType:@"1" block:^(BOOL isSuccessful, NSDictionary *dic) {
        if (isSuccessful) {
        }
    }];
}
@@ -441,8 +446,8 @@
    } fail:^(id object) {
        
    }];
}
/**
@@ -460,7 +465,7 @@
        [dic setObject:[[NSUserDefaults standardUserDefaults] objectForKey:@"userId"] forKey:@"uid"];
    }
    NSMutableDictionary *dictionary = [SJNetwork CommonDictionarywithDic:dic];
    [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP,@"push/uidBindDeviceToken"] param:dictionary success:^(NSDictionary *object) {
        NSLog(@"%@",object);
    } fail:^(id object) {
@@ -511,7 +516,7 @@
}
/**
  æ¶ˆæ¯
 æ¶ˆæ¯
 
 @param sender sender
 */
@@ -538,7 +543,7 @@
/**
 ä½™é¢
 @param sender sender
 */
- (void)yueButtonTaped:(UIButton *)sender{
@@ -581,20 +586,20 @@
    _primtWindow.hidden = NO;
    [_primtWindow addSubview:self.primtView];
    if (sender.tag == 35) {
        self.primtTitle.text = @"今日预估收益";
        self.primtContent.text = @"今日新增的所有订单预估收益";
        self.primtTitle.text = @"今日预估分享奖金";
        self.primtContent.text = @"今日新增的分享订单预估奖金";
    }else if(sender.tag == 36){
        self.primtTitle.text = @"本月预估收益";
        self.primtContent.text = @"本月内产生的所有订单预估收益,会在订单确认收货后的次月25日后转入你的余额,以实际转入余额为准";
        self.primtTitle.text = @"本月预估分享奖金";
        self.primtContent.text = @"本月内产生的所有的分享订单预估奖金,会在订单确认收货后的次月25日后转入您的余额,以实际转入余额为准";
    }else{
        self.primtTitle.text = @"上月预估收入";
        self.primtContent.text = @"上个月内确认收货的订单收入,每月25日结算后,将自动转入你的余额";
        self.primtTitle.text = @"上月分享奖金";
        self.primtContent.text = @"上个月内确认收货的分享订单奖金会在每月25日结算后,自动转入您的余额";
    }
}
/**
 å¼¹å‡ºä»Šæ—¥ã€æœ¬æœˆã€ä¸Šæœˆä¿¡æ¯æç¤ºæ¡†
 @param sender sender
 */
- (void)primtTaped:(UIButton *)sender{
@@ -605,7 +610,7 @@
/**
 æ–°æ‰‹æ”»ç•¥
 @param sender sender
 */
- (void)noviceTaped:(UIButton *)sender{
@@ -621,7 +626,7 @@
/**
 å¸®åŠ©ä¸­å¿ƒ
 @param sender sender
 */
- (void)helpTaped:(UIButton *)sender{
@@ -636,7 +641,7 @@
/**
 è”系客服
 @param sender sender
 */
- (void)serviceTaped:(UIButton *)sender{
@@ -644,12 +649,12 @@
    ServiceViewController *serviceVC=[[ServiceViewController alloc] init];
    serviceVC.hidesBottomBarWhenPushed=YES;
    [self.navigationController pushViewController:serviceVC animated:YES];
}
/**
 è´­ç‰©è½¦
 @param sender sender
 */
- (void)buyCarTaped:(UIButton *)sender {
@@ -693,40 +698,40 @@
 æ£€æµ‹æ˜¯å¦æŽˆæƒBind淘宝提示
 */
- (void)detectionIsBindTaoBaoTips {
    NSLog(@"sfafjilaskfjksajfhklasjfhklasjhfklahfjklash:%@",self.userInfo);
    if (self.isOrderClicked) {
        self.isOrderClicked = NO;
         if(((NSString *)(self.userInfo[@"openid"])).length == 0 || [self.userInfo[@"openid"] isEqualToString:@""] || ![[ALBBSession sharedInstance] isLogin]){
             self.sJLoginTaoBao = [[SJLoginTaoBao alloc] initWithSearchStr:TAOBAO_ACCREDIT withIsSearch:NO];
             self.sJLoginTaoBao.titleLabel.text = @"温馨提示";
             self.sJLoginTaoBao.hasIndex = ^(NSInteger index) {
                 if (index == 790) {//确定
                     [self.sJLoginTaoBao dismiss];
                     [self.overlayViewForTabBar removeFromSuperview];
                     self.overlayViewForTabBar = nil;
                     [self LoginForTaoBao:YES];
                     //登录界面
                 } else if (index==791 || index == 792) {//关闭
                     [self.sJLoginTaoBao dismiss];
                     [self.overlayViewForTabBar removeFromSuperview];
                     self.overlayViewForTabBar = nil;
                 }
             };
        if(((NSString *)(self.userInfo[@"openid"])).length == 0 || [self.userInfo[@"openid"] isEqualToString:@""] || ![[ALBBSession sharedInstance] isLogin]){
            self.sJLoginTaoBao = [[SJLoginTaoBao alloc] initWithSearchStr:TAOBAO_ACCREDIT withIsSearch:NO];
            self.sJLoginTaoBao.titleLabel.text = @"温馨提示";
            self.sJLoginTaoBao.hasIndex = ^(NSInteger index) {
                if (index == 790) {//确定
                    [self.sJLoginTaoBao dismiss];
                    [self.overlayViewForTabBar removeFromSuperview];
                    self.overlayViewForTabBar = nil;
                    [self LoginForTaoBao:YES];
                    //登录界面
                } else if (index==791 || index == 792) {//关闭
                    [self.sJLoginTaoBao dismiss];
                    [self.overlayViewForTabBar removeFromSuperview];
                    self.overlayViewForTabBar = nil;
                }
            };
            [self.sJLoginTaoBao show];
             if (self.isSkip) {
                 [[UIApplication sharedApplication].delegate.window addSubview:self.overlayViewForTabBar];
             }
         }else{
             [self jumpOrder];
         }
            if (self.isSkip) {
                [[UIApplication sharedApplication].delegate.window addSubview:self.overlayViewForTabBar];
            }
        }else{
            [self jumpOrder];
        }
        
    }else{
        if(((NSString *)(self.userInfo[@"openid"])).length == 0 || [self.userInfo[@"openid"] isEqualToString:@""] || ![[ALBBSession sharedInstance] isLogin]){
@@ -772,7 +777,7 @@
    
    [[YTHsharedManger startManger] LogInForTaoBaoWith:self Withblock:^(BOOL isSuccessful, NSDictionary *dic) {
        
    [YTHsharedManger startManger].isminebound = NO;
        [YTHsharedManger startManger].isminebound = NO;
        
        if (isSuccessful) {
            if(((NSString *)(self.userInfo[@"openid"])).length == 0 || [self.userInfo[@"openid"] isEqualToString:@""]){
@@ -797,7 +802,7 @@
}
/**
    è·³è½¬è´­ç‰©è½¦
 è·³è½¬è´­ç‰©è½¦
 */
- (void)jumpShopping {
    
@@ -898,7 +903,7 @@
}
- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{
    return CGFLOAT_MIN;
}
@@ -922,7 +927,7 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    if (indexPath.section==0) {
    }else if (indexPath.section==2){
        switch (indexPath.row) {
            case 1:{
@@ -944,20 +949,51 @@
                    
                    [self.navigationController pushViewController:loginVC animated:YES];
                }
            }break;
                // ä¼šå‘˜ç‰¹æƒ
            case 2:{
                
                    ShonpingShareViewController *shonpingShareVc = [[ShonpingShareViewController alloc] init];
            case 2: {// åˆ†äº«APP
                // ShonpingShareViewController *shonpingShareVc = [[ShonpingShareViewController alloc] init];
                // shonpingShareVc.urlString=[YTHsharedManger startManger].membersUrl;
                // shonpingShareVc.hidesBottomBarWhenPushed = YES;
                // [self.navigationController pushViewController:shonpingShareVc animated:YES];
                self.shareAppView = [[ShareAppView alloc] initShareAppView];
                
                    shonpingShareVc.urlString=[YTHsharedManger startManger].membersUrl;
                    shonpingShareVc.hidesBottomBarWhenPushed = YES;
                __weak typeof(self) weakSelf = self;
                self.shareAppView.haveIndex = ^(NSInteger index) {
                    [weakSelf.shareAppView diss];
                    weakSelf.shareAppView = nil;
                    if (index == 0) {
                        [weakSelf shareWebPageToPlatformType:UMSocialPlatformType_WechatSession withtype:SSDKPlatformSubTypeWechatSession];
                    } else if (index == 1) {
                        [weakSelf shareWebPageToPlatformType:UMSocialPlatformType_WechatTimeLine withtype:SSDKPlatformSubTypeWechatTimeline];
                    } else if (index == 2) {
                        [weakSelf shareWebPageToPlatformType:UMSocialPlatformType_Sina withtype:SSDKPlatformTypeSinaWeibo];
                    } else if (index == 3) {
                        [weakSelf shareWebPageToPlatformType:UMSocialPlatformType_QQ withtype:SSDKPlatformSubTypeQQFriend];
                    } else if (index == 4) {
                        [weakSelf shareWebPageToPlatformType:UMSocialPlatformType_Qzone withtype:SSDKPlatformSubTypeQZone];
                    }
                };
                
                    [self.navigationController pushViewController:shonpingShareVc animated:YES];
                [self.shareAppView show];
            }
                break;
            case 5:{//帮助
            case 5: {// å¸®åŠ©
                XYRWebViewController *SureWebVC=[[XYRWebViewController alloc] init];
                SureWebVC.url=[[NSUserDefaults standardUserDefaults] objectForKey:@"help"];
                SureWebVC.backToRedBag=^(){
@@ -967,13 +1003,14 @@
                [self.navigationController pushViewController:SureWebVC animated:YES];
            }
                break;
            case 4:{
            case 4: {
                ServiceViewController *serviceVC=[[ServiceViewController alloc] init];
                serviceVC.hidesBottomBarWhenPushed=YES;
                [self.navigationController pushViewController:serviceVC animated:YES];
            }break;
                
            case 3:{//关于我们
            case 3: {// å…³äºŽæˆ‘们
                XYRWebViewController *aboutWebVC=[[XYRWebViewController alloc] init];
                aboutWebVC.url=[[NSUserDefaults standardUserDefaults] objectForKey:@"about"];
                aboutWebVC.backToRedBag=^(){
@@ -1004,9 +1041,12 @@
    }
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    if (indexPath.section==0) {
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    if (indexPath.section == 0) {
        if (indexPath.row==0) {
            MineHeaderTableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:@"MineHeaderTableViewCell"];
            NSMutableAttributedString *mineRedBagMessage=[NSMutableAttributedString new];
            cell.backgroundColor = [UIColor clearColor];
@@ -1060,9 +1100,9 @@
                cell.IDLabel.hidden = NO;
                cell.gradeButton.hidden = NO;
            }
            [cell.gradeLabelImage setYthImageWithURL:[_userInfo objectForKey:@"rankNamePicture"] placeholderImage:[UIImage imageNamed:@""]];
            //立即登录按钮
            {
                [cell.login addTarget:self action:@selector(LoginWithTaoBao:) forControlEvents:UIControlEventTouchUpInside];
@@ -1100,7 +1140,7 @@
                nameString  = [nameString removeSpace];
                [cell.login setTitle: nameString forState:UIControlStateSelected];
                [cell.login setTitleColor:SJColor(23, 94, 0, 1) forState:UIControlStateSelected];
                [cell.login setTintColor:[UIColor clearColor]];
                [cell.login setSelected:YES];
                [cell.imageLogin setSelected:YES];
@@ -1152,26 +1192,35 @@
    }else if (indexPath.section==1){
        if(indexPath.row==0){
            
            MineToolBarTableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:@"MineToolBarTableViewCell"];
            cell.accessoryType=UITableViewCellAccessoryNone;
            [cell.orderBtn addTarget:self action:@selector(GoToOrder:) forControlEvents:UIControlEventTouchUpInside];
            [cell.collectBtn addTarget:self action:@selector(GoTocollect:) forControlEvents:UIControlEventTouchUpInside];
            [cell.FootprintBtn addTarget:self action:@selector(GoToFootprint:) forControlEvents:UIControlEventTouchUpInside];
            [cell.myTeamBtn addTarget:self action:@selector(GotomyTeam:) forControlEvents:UIControlEventTouchUpInside];
            cell.backgroundColor = [UIColor clearColor];
            NSString *cellIden = @"mineToolBarTableViewCell";
            MineToolBarTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIden];
            if (!cell) {
                cell = [[MineToolBarTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
                                                       reuseIdentifier:cellIden];
            }
            [((UIButton *)[cell.bgView subviews][0]) addTarget:self action:@selector(GoToOrder:) forControlEvents:UIControlEventTouchUpInside];
            [((UIButton *)[cell.bgView subviews][1]) addTarget:self action:@selector(GoTocollect:) forControlEvents:UIControlEventTouchUpInside];
            [((UIButton *)[cell.bgView subviews][2]) addTarget:self action:@selector(GoToFootprint:) forControlEvents:UIControlEventTouchUpInside];
            return cell;
        }
    }else if (indexPath.section==2){
    } else if (indexPath.section==2) {
        if (indexPath.row == 0) {
            MineThirdTableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:@"MineThirdTableViewCell"];
            [cell.noviceButton addTarget:self action:@selector(noviceTaped:) forControlEvents:UIControlEventTouchUpInside];
            [cell.helpButton addTarget:self action:@selector(helpTaped:) forControlEvents:UIControlEventTouchUpInside];
            [cell.servieveButton addTarget:self action:@selector(serviceTaped:) forControlEvents:UIControlEventTouchUpInside];
            [cell.buyCarButton addTarget:self action:@selector(buyCarTaped:) forControlEvents:UIControlEventTouchUpInside];
            cell.backgroundColor = [UIColor clearColor];
            cell.accessoryType=UITableViewCellAccessoryNone;
            cell.selectionStyle = UITableViewCellSelectionStyleNone;
            return cell;
@@ -1187,24 +1236,24 @@
#pragma mark --- è®¢å• ---
- (void)GoToOrder:(UIButton *)sender {
        if ([[NSUserDefaults standardUserDefaults] objectForKey:@"userId"] == nil) {//用户有登录
            //登录界面
            self.isOrderClicked = YES;
            self.isSkip = YES;
            LoginViewController *LoginVC=[[LoginViewController alloc] init];
            LoginVC.hidesBottomBarWhenPushed=YES;
            LoginVC.delegate = self;
            LoginVC.fromVc = self;
            [self.navigationController pushViewController:LoginVC animated:YES];
        } else {
            //用户登录了,但是并未绑定淘宝
            self.isOrderClicked = YES;
            self.isSkip = NO;
            [self detectionIsBindTaoBaoTips];
        }
    if ([[NSUserDefaults standardUserDefaults] objectForKey:@"userId"] == nil) {//用户有登录
        //登录界面
        self.isOrderClicked = YES;
        self.isSkip = YES;
        LoginViewController *LoginVC=[[LoginViewController alloc] init];
        LoginVC.hidesBottomBarWhenPushed=YES;
        LoginVC.delegate = self;
        LoginVC.fromVc = self;
        [self.navigationController pushViewController:LoginVC animated:YES];
    } else {
        //用户登录了,但是并未绑定淘宝
        self.isOrderClicked = YES;
        self.isSkip = NO;
        [self detectionIsBindTaoBaoTips];
    }
}
#pragma mark ---  è¿›å…¥æ”¶è—ç•Œé¢ ---
@@ -1232,6 +1281,7 @@
    }
}
#pragma mark ---  è¶³è¿¹ ---
/**
 è¶³è¿¹
 */
@@ -1243,30 +1293,71 @@
}
/**
 é˜Ÿå‘˜
 åˆ†äº«
 */
- (void)GotomyTeam:(UIButton *)sender {
- (void)shareWebPageToPlatformType:(UMSocialPlatformType)platformType withtype:(SSDKPlatformType)shareType {
    
    if ([[NSUserDefaults standardUserDefaults] objectForKey:@"userId"]==nil) {//用户有登录
        //登录界面
        LoginViewController *loginVc = [[LoginViewController alloc] init];
    SSDKContentType type = SSDKContentTypeAuto;
    if (shareType == SSDKPlatformSubTypeWechatTimeline || shareType == SSDKPlatformSubTypeWechatSession) {
        
        loginVc.vcName = @"ShonpingShareViewController";
        loginVc.hidesBottomBarWhenPushed = YES;
        loginVc.fromVc = self;
        loginVc.delegate = self;
        [self.navigationController pushViewController:loginVc animated:YES];
    } else {
        ShonpingShareViewController *SureWebVC=[[ShonpingShareViewController alloc] init];
        SureWebVC.urlString=[YTHsharedManger startManger].myTeamURL;
        SureWebVC.hidesBottomBarWhenPushed=YES;
        [self.navigationController pushViewController:SureWebVC animated:YES];
        if (![WXApi isWXAppInstalled]) {
            ALToastCenter(@"微信未安装");
            return;
        }
    }
    if ( SSDKPlatformSubTypeQQFriend == shareType || shareType == SSDKPlatformSubTypeQZone ) {
        if (![[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"mqq://"]]) {
            ALToastCenter(@"QQ未安装");
            return;
        }
    }
    NSMutableDictionary *shareParams = [NSMutableDictionary dictionary];
    [shareParams SSDKSetupShareParamsByText:@"大家是否是否会精神焕发借口说的话就分开很久"
                                     images:@[@"notFound"]
                                        url:[NSURL URLWithString:@"https://www.baidu.com"]
                                      title:@"海草街下载哦"
                                       type:type];
    //有的平台要客户端分享需要加此方法,例如微博
    [shareParams SSDKEnableUseClientShare];
    //2、分享(可以弹出我们的分享菜单和编辑界面)
    //进行分享
    [ShareSDK share:shareType //传入分享的平台类型
         parameters:shareParams
     onStateChanged:^(SSDKResponseState state, NSDictionary *userData, SSDKContentEntity *contentEntity, NSError *error) { // å›žè°ƒå¤„理....}];
         switch (state) {
             case SSDKResponseStateSuccess:
             {
                 UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"分享成功"
                                                                     message:nil
                                                                    delegate:nil
                                                           cancelButtonTitle:@"确定"
                                                           otherButtonTitles:nil];
                 [alertView show];
                 break;
             }
             case SSDKResponseStateFail:
             {
                 UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"分享失败"
                                                                 message:[NSString stringWithFormat:@"%@",error]
                                                                delegate:nil
                                                       cancelButtonTitle:@"OK"
                                                       otherButtonTitles:nil, nil];
                 [alert show];
                 break;
             }
             default:
                 break;
         }
     }];
}
- (UIView *)primtView{
- (UIView *)primtView {
    if (_primtView) {
        return _primtView;
    }
@@ -1298,7 +1389,8 @@
    [_primtView addSubview:button];
    return _primtView;
}
- (UIView *)overlayViewForTabBar{
- (UIView *)overlayViewForTabBar {
    if (!_overlayViewForTabBar) {
        _overlayViewForTabBar = [[UIView alloc]initWithFrame:CGRectMake(0, KScreenH-kToolBarH, KScreenW, kToolBarH)];
        
@@ -1309,9 +1401,6 @@
    return _overlayViewForTabBar;
}
/**
 æ¸…除通知
 */
- (void)dealloc{
    [[NSNotificationCenter defaultCenter] removeObserver:self];
}
MIduo/½çÃæ/ÎÒµÄ/balance/BalanceViewController.m
@@ -135,14 +135,14 @@
    _primtWindow.hidden = NO;
    [_primtWindow addSubview:self.primtView];
    if (sender.tag == 35) {
        self.primtTitle.text = @"今日预估收益";
        self.primtContent.text = @"今日新增的所有订单预估收益";
        self.primtTitle.text = @"今日预估分享奖金";
        self.primtContent.text = @"今日新增的分享订单预估奖金";
    }else if(sender.tag == 36){
        self.primtTitle.text = @"本月预估收益";
        self.primtContent.text = @"本月内产生的所有订单预估收益,会在订单确认收货后的次月25日后转入你的余额,以实际转入余额为准";
        self.primtTitle.text = @"本月预估分享奖金";
        self.primtContent.text = @"本月内产生的所有的分享订单预估奖金,会在订单确认收货后的次月25日后转入您的余额,以实际转入余额为准";
    }else{
        self.primtTitle.text = @"上月预估收入";
        self.primtContent.text = @"上个月内确认收货的订单收入,每月25日结算后,将自动转入你的余额";
        self.primtTitle.text = @"上月分享奖金";
        self.primtContent.text = @"上个月内确认收货的分享订单奖金会在每月25日结算后,自动转入您的余额";
    }
}
@@ -228,29 +228,25 @@
    _fanliLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 5, KScreenW / 2, 33)];
    _fanliLabel.textColor = [UIColor blackColor];
    _fanliLabel.font = [UIFont boldSystemFontOfSize:30];
//    _fanliLabel.text = [NSString stringWithFormat:@"%@",self.datasource[@"totalHongBao"]];
//    _fanliLabel.text = @"0";
    _fanliLabel.textAlignment = NSTextAlignmentCenter;
    [buttomView addSubview:_fanliLabel];
    UILabel *fanLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(_fanliLabel.frame) + 5, KScreenW / 2, 20)];
    fanLabel.textColor = SJColor(164, 164, 164, 1);
    fanLabel.font = [UIFont systemFontOfSize:15];
    fanLabel.text = @"累计返利(元)";
    fanLabel.text = @"累计自购奖金(元)";
    fanLabel.textAlignment = NSTextAlignmentCenter;
    [buttomView addSubview:fanLabel];
    _accountLabel = [[UILabel alloc]initWithFrame:CGRectMake(KScreenW / 2 + 1, 5, KScreenW / 2, 33)];
    _accountLabel.textColor = [UIColor blackColor];
    _accountLabel.font = [UIFont boldSystemFontOfSize:30];
//    _accountLabel.text = [NSString stringWithFormat:@"%@",self.datasource[@"noOpenHongBao"]];
//    _accountLabel.text = @"0";
    _accountLabel.textAlignment = NSTextAlignmentCenter;
    [buttomView addSubview:_accountLabel];
    UILabel *accLabel = [[UILabel alloc]initWithFrame:CGRectMake(KScreenW / 2 + 1, CGRectGetMaxY(_accountLabel.frame) + 5, KScreenW / 2, 20)];
    accLabel.textColor = SJColor(164, 164, 164, 1);
    accLabel.font = [UIFont systemFontOfSize:14];
    accLabel.text = @"未到账返利(元)";
    accLabel.text = @"未到账自购奖金(元)";
    accLabel.textAlignment = NSTextAlignmentCenter;
    [buttomView addSubview:accLabel];
    UIView *buttomLineview = [[UIView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(buttomView.frame) + 10, _fanliView.frame.size.width, 1)];
@@ -268,29 +264,25 @@
    _royaltiesedLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 5, KScreenW / 2, 33)];
    _royaltiesedLabel.textColor = [UIColor blackColor];
    _royaltiesedLabel.font = [UIFont boldSystemFontOfSize:30];
//    _royaltiesedLabel.text = [NSString stringWithFormat:@"%@",self.datasource[@"totalHongBao"]];
//    _royaltiesedLabel.text = @"0";
    _royaltiesedLabel.textAlignment = NSTextAlignmentCenter;
    [_royaltiesView addSubview:_royaltiesedLabel];
    UILabel *leijiLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(_royaltiesedLabel.frame) + 5, KScreenW / 2, 20)];
    leijiLabel.textColor = SJColor(164, 164, 164, 1);
    leijiLabel.font = [UIFont systemFontOfSize:15];
    leijiLabel.text = @"累计提成(元)";
    leijiLabel.text = @"累计分享奖金(元)";
    leijiLabel.textAlignment = NSTextAlignmentCenter;
    [_royaltiesView addSubview:leijiLabel];
    
    _royaltiesLabel = [[UILabel alloc]initWithFrame:CGRectMake(KScreenW / 2 + 1, 5, KScreenW / 2, 33)];
    _royaltiesLabel.textColor = [UIColor blackColor];
    _royaltiesLabel.font = [UIFont boldSystemFontOfSize:30];
//    _royaltiesLabel.text = [NSString stringWithFormat:@"%@",self.datasource[@"noOpenHongBao"]];
//    _royaltiesLabel.text = @"0";
    _royaltiesLabel.textAlignment = NSTextAlignmentCenter;
    [_royaltiesView addSubview:_royaltiesLabel];
    
    UILabel *laijiedLabel = [[UILabel alloc]initWithFrame:CGRectMake(KScreenW / 2 + 1, CGRectGetMaxY(_royaltiesLabel.frame) + 5, KScreenW / 2, 20)];
    laijiedLabel.textColor = SJColor(164, 164, 164, 1);
    laijiedLabel.font = [UIFont systemFontOfSize:14];
    laijiedLabel.text = @"未到账提成(元)";
    laijiedLabel.text = @"未到账分享奖金";
    laijiedLabel.textAlignment = NSTextAlignmentCenter;
    [_royaltiesView addSubview:laijiedLabel];
    UIView *leijibuttomLineview = [[UIView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(_royaltiesView.frame) + 10, _fanliView.frame.size.width, 1)];
MIduo/½çÃæ/ÎÒµÄ/complain/ComplainViewController.xib
@@ -23,7 +23,7 @@
            <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
            <subviews>
                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="下单后无法返利?丢单?" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="W4r-DP-ekJ">
                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="下单后无奖金?丢单?" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="W4r-DP-ekJ">
                    <rect key="frame" x="20" y="110" width="300" height="25"/>
                    <constraints>
                        <constraint firstAttribute="height" constant="25" id="Jug-3C-unu"/>
@@ -65,7 +65,7 @@
                        <action selector="submitTaped:" destination="-1" eventType="touchUpInside" id="hPd-ik-adb"/>
                    </connections>
                </button>
                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="点击”确认支付“后,需等待10分钟才能在“返利订单”页面看到记录。如未有记录则可输入订单号提交申诉。" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="M81-g6-kNp">
                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="点击”确认支付“后,需等待10分钟才能在“自购订单”页面看到记录。如未有记录则可输入订单号提交申诉。" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="M81-g6-kNp">
                    <rect key="frame" x="20" y="140" width="280" height="60"/>
                    <constraints>
                        <constraint firstAttribute="height" constant="60" id="81M-md-8Dd"/>
MIduo/½çÃæ/ËÑË÷/YTHSearchTextField.m
@@ -22,7 +22,7 @@
}
#pragma mark æ·»åŠ è§†å›¾
- (void)submitViews{
- (void)submitViews {
    //外面视图
    UIView *titleView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
    titleView.backgroundColor = YTHColor(239, 239, 239);
@@ -36,7 +36,6 @@
    custom.delegate = self;
    custom.returnKeyType = UIReturnKeySearch;//把return键变为搜索
    custom.font = [UIFont systemFontOfSize:15];
//    [custom resignFirstResponder];
    custom.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"请输入搜索内容" attributes:@{NSForegroundColorAttributeName: YTHColor(178, 178, 178)}];
    [custom addTarget:self action:@selector(SearchValueChanged:)  forControlEvents:UIControlEventAllEditingEvents];//添加实时的检测值事件
@@ -45,6 +44,8 @@
    [titleView addSubview:view];
    [titleView addSubview:custom];
    
      [custom becomeFirstResponder];
    //搜索-清除按钮
    UIButton *clearBtn = [[UIButton alloc] initWithFrame:CGRectMake(titleView.frame.size.width-30, 2.5, 25, 25)];
    [clearBtn setImage:[UIImage imageNamed:@"搜索-结果-清除"] forState:UIControlStateNormal];
MIduo/½çÃæ/ËÑË÷/searchDetailViewController.m
@@ -181,13 +181,7 @@
        return NO;
    }
}
- (BOOL)homeIsShowNetWorkView{
    if (self.dataSearch.count == 0) {
        return YES;
    }else{
        return NO;
    }
}
/**
 *  è¯·æ±‚搜索数据
 */
@@ -217,7 +211,8 @@
 */
-(void)search:(UIButton *)sender{
    if (self.searchField.Field.text.length == 0) {
        [SVProgressHUD showErrorWithStatus:@"请输入搜索内容"];
        ALToastCenter(@"请输入搜索内容")
        return;
    }
    pagenumber = 0;
@@ -398,8 +393,6 @@
            [_priceBtn setTag:606];
            _detailViewToTop.constant=45.0f;
            self.isPriceTaped = YES;
//            self.detailViewToTop.constant=0;
//            self.backView.frame = self.detailCollectionView.frame;
            [sender setImage:[UIImage imageNamed:@"升序"] forState:UIControlStateSelected];
            Order=3;
            [_detailCollectionView.mj_header beginRefreshing];
@@ -443,9 +436,8 @@
            maxPrice = temp;
        }
    }
    self.isPriceTaped = YES;
//    self.detailViewToTop.constant=0;
//    self.backView.frame = self.detailCollectionView.frame;
    [_detailCollectionView.mj_header beginRefreshing];
}
@@ -680,12 +672,10 @@
            [self.detailCollectionView reloadData];
            [self.detailCollectionView.mj_footer endRefreshing];
            [self.detailCollectionView.mj_header endRefreshing];
        }else{
            //提示用户失败
//            if (self->pagenumber ==0) {
//                [self.dataSearch removeAllObjects];
//                [self.detailCollectionView reloadData];
//            }
        } else {
            // æç¤ºç”¨æˆ·å¤±è´¥
            [self.detailCollectionView.mj_footer endRefreshing];
            [self.detailCollectionView.mj_header endRefreshing];
@@ -852,10 +842,15 @@
    return _dataSearch.count;
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    recommendCollectionViewCell *cell=[collectionView dequeueReusableCellWithReuseIdentifier:@"recommendCollectionViewCell" forIndexPath:indexPath];
    cell.garyBgView.hidden = NO;
    [cell.MaskedView setHidden:YES];
    NSDictionary *cellMessage=_dataSearch[indexPath.row];
    NSDictionary *cellMessage = _dataSearch[indexPath.row];
    [cell fillCells:cellMessage];
    
    return cell;
MIduo/½çÃæ/ËÑË÷/searchViewController.m
@@ -35,17 +35,17 @@
-(void)viewWillAppear:(BOOL)animated{
    [super viewWillAppear:animated];
    
    if (_collectionView) {
        [self getOldSearch];
    }
    [self getOldSearch];
}
- (void)viewWillDisappear:(BOOL)animated{
    [super viewWillDisappear:animated];
    [_searchField.Field resignFirstResponder];
    self.suggestTableview.hidden = YES;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    //定制导航栏
    [self setNavgtionView];
    
@@ -54,20 +54,21 @@
    
    //添加搜索建议的tableview
    [self addsuggestTableview];
    self.title = @"搜索";
    //请求数据
    [self getData];
    if ([YTHsharedManger startManger].networkStatus != 0 && [YTHsharedManger startManger].networkStatus != -1 && [YTHsharedManger startManger].isCheckNetCanUse != -2) {
        [self performSelector:@selector(delayMethod) withObject:nil afterDelay:0.6];
    }
    [self getData];
}
- (void)delayMethod{
    [self.searchField.Field becomeFirstResponder];
- (void)delayMethod {
    //[self.searchField.Field becomeFirstResponder];
}
/**
 *  è®¾ç½®å¯¼èˆªæ 
 */
- (void)setNavgtionView{
- (void)setNavgtionView {
     self.title = @"搜索";
    
    UIView *titleView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, KScreenW-115, 30)];
    titleView.backgroundColor=YTHColor(239, 239, 239);
@@ -82,7 +83,7 @@
    _searchField = [[YTHSearchTextField alloc] initWithFrame:CGRectMake(20, 0, titleView.frame.size.width-20, titleView.frame.size.height)];
    _searchField.delegate = self;
    _searchField.Field.placeholder = self.searchString;
    _searchField.backgroundColor=[UIColor yellowColor];
    _searchField.backgroundColor = [UIColor yellowColor];
    self.navigationItem.titleView = titleView;
    [titleView addSubview:_searchField];
@@ -97,13 +98,17 @@
    self.navigationItem.rightBarButtonItem=[[UIBarButtonItem alloc] initWithCustomView:searchBtn];
    
    //背景颜色
    self.view.backgroundColor=[UIColor whiteColor];;
    self.view.backgroundColor=[UIColor whiteColor];
    if ([YTHsharedManger startManger].networkStatus != 0 && [YTHsharedManger startManger].networkStatus != -1 && [YTHsharedManger startManger].isCheckNetCanUse != -2) {
        [self performSelector:@selector(delayMethod) withObject:nil afterDelay:0.6];
    }
}
/**
 *  æ·»åŠ æœç´¢å»ºè®®çš„tableView
 */
-(void)addsuggestTableview{
- (void)addsuggestTableview {
    _suggestTableview = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, KScreenW, KScreenH-kNavigationBarH-kStatusBarH) style:UITableViewStyleGrouped];
    [_suggestTableview setBackgroundColor:[UIColor whiteColor]];
    _suggestTableview.delegate = self;
@@ -117,25 +122,33 @@
/**
 æ·»åŠ UICollectionView
 */
-(void)addSearchCollectionView{
    UICollectionViewLeftAlignedLayout *flow = [[UICollectionViewLeftAlignedLayout alloc]init];
- (void)addSearchCollectionView {
    UICollectionViewLeftAlignedLayout *flow = [[UICollectionViewLeftAlignedLayout alloc] init];
    //指定布局方式为垂直
    flow.scrollDirection = UICollectionViewScrollDirectionVertical;
    flow.minimumLineSpacing = 5;//最小行间距(当垂直布局时是行间距,当水平布局时可以理解为列间距)
    flow.minimumInteritemSpacing = 10;//两个单元格之间的最小间距
    
    //创建CollectionView并指定布局对象
    _collectionView = [[UICollectionView alloc]initWithFrame:CGRectMake(0, 0, KScreenW,KScreenH-kNavigationBarH-kStatusBarH) collectionViewLayout:flow];
    _collectionView = [[UICollectionView alloc] initWithFrame:CGRectMake(0, 0, KScreenW,KScreenH-kNavigationBarH-kStatusBarH) collectionViewLayout:flow];
    _collectionView.backgroundColor = [UIColor whiteColor];
    _collectionView.dataSource = self;
    _collectionView.delegate = self;
    _collectionView.delaysContentTouches=NO;
    _collectionView.delaysContentTouches = NO;
    [self.view addSubview:_collectionView];
    
    //注册cell
    [_collectionView registerNib:[UINib nibWithNibName:@"SearchCollectionViewCell" bundle:nil] forCellWithReuseIdentifier:@"SearchCollectionViewCellID"];
    [_collectionView registerNib:[UINib nibWithNibName:@"SearchCollectionReusableView" bundle:nil] forSupplementaryViewOfKind:UICollectionElementKindSectionHeader withReuseIdentifier:@"SearchCollectionReusableViewID"];
    [_collectionView registerNib:[UINib nibWithNibName:@"ClearCollectionReusableView" bundle:nil] forSupplementaryViewOfKind:UICollectionElementKindSectionFooter withReuseIdentifier:@"ClearCollectionReusableViewID"];
    [_collectionView registerNib:[UINib nibWithNibName:@"SearchCollectionViewCell" bundle:nil]
      forCellWithReuseIdentifier:@"SearchCollectionViewCellID"];
    [_collectionView registerNib:[UINib nibWithNibName:@"SearchCollectionReusableView" bundle:nil]
      forSupplementaryViewOfKind:UICollectionElementKindSectionHeader
             withReuseIdentifier:@"SearchCollectionReusableViewID"];
    [_collectionView registerNib:[UINib nibWithNibName:@"ClearCollectionReusableView" bundle:nil]
      forSupplementaryViewOfKind:UICollectionElementKindSectionFooter
             withReuseIdentifier:@"ClearCollectionReusableViewID"];
}
/**
@@ -173,25 +186,38 @@
- (void)loadData {
    
    [super loadData];
    if (self.dataHot.count == 0) {
        [self.dataHot removeAllObjects];
    if (self.dataHot == 0) {
          [self.dataHot removeAllObjects];
           [self getHotSearch];
    }
    if (self.dataOld.count == 0) {
        [self.dataOld removeAllObjects];
        [self getHotSearch];
        [self getOldSearch];
    }
}
- (BOOL)datasourceIsNull{
    if (self.dataHot.count == 0) {
        return YES;
    }else{
    } else {
        return NO;
    }
}
- (BOOL)homeIsShowNetWorkView{
- (BOOL)homeIsShowNetWorkView {
    if (self.dataHot.count == 0) {
        return YES;
    }else{
    } else {
        return NO;
    }
}
@@ -200,33 +226,29 @@
 */
- (void)getData{
    [self getHotSearch];
    [self getOldSearch];
    //[self getOldSearch];
}
/**
 *  çƒ­é—¨æœç´¢
 */
- (void)getHotSearch{
- (void)getHotSearch {
    [[YTHNetInterface startInterface] getHotSearchWithblock:^(BOOL isSuccessful, id result, NSString *error) {
        if (isSuccessful) {
            NSDictionary *dic = (NSDictionary *)result;
            if (!self.dataHot) {
                self.dataHot = [[NSMutableArray alloc] initWithCapacity:0];
            }
            
            NSDictionary *dic = (NSDictionary *)result;
            self.dataHot = [[dic objectForKey:@"data"] objectForKey:@"hotSearchList"];
            
            int i=arc4random()%self.dataHot.count;
            self.searchField.Field.placeholder=[self.dataHot[i] objectForKey:@"name"];
            //刷新热门搜索
//            [self.collectionView reloadSections:[NSIndexSet indexSetWithIndex:0]];
            int  i= arc4random()%self.dataHot.count;
            self.searchField.Field.placeholder = [self.dataHot[i] objectForKey:@"name"];
            [self.collectionView reloadData];
        }else{
            //显示网络连接失败
            NSLog(@"网络连接失败!");
        }
    }];
@@ -235,22 +257,21 @@
/**
 *  åŽ†å²æœç´¢ ä»Žç½‘络获取 åŒæ—¶æœ¬åœ°ä¹Ÿä¼šç¼“存数据
 */
- (void)getOldSearch{
- (void)getOldSearch {
    [[YTHNetInterface startInterface] getHistorySearchWithblock:^(BOOL isSuccessful, id result, NSString *error) {
        if (isSuccessful) {
            NSDictionary *dic = (NSDictionary *)result;
            if (!self.dataOld) {
                self.dataOld = [[NSMutableArray alloc] initWithCapacity:0];
            }
            
            NSDictionary *dic = (NSDictionary *)result;
            self.dataOld = [[NSMutableArray alloc] initWithCapacity:0];
            self.dataOld = [[dic objectForKey:@"data"] objectForKey:@"historySearchList"];
            
//            åˆ·æ–°åŽ†å²æœç´¢
//            [self.collectionView reloadSections:[NSIndexSet indexSetWithIndex:1]];
            [self.collectionView reloadData];
        }else{
            //显示网络连接失败
            NSLog(@"网络连接失败!");
        }
    }];
@@ -263,36 +284,15 @@
 */
-(void)ClearHistorys:(UIButton *)sender{
    [[YTHNetInterface startInterface] getClearHistorySearchWithblock:^(BOOL isSuccessful, id result, NSString *error) {
        if (isSuccessful) {
            [self.dataOld removeAllObjects];
            [self.collectionView reloadSections:[NSIndexSet indexSetWithIndex:1]];
        }else{
            NSLog(@"网络连接失败!");
        } else {
             //显示网络连接失败
        }
    }];
}
/**
 *  åˆ é™¤æ²™ç›’里的文件
 *
 *  @param filePath è¦åˆ é™¤çš„æ–‡ä»¶
 */
-(void)deleteFile:(NSString *)filePath {
    NSFileManager* fileManager=[NSFileManager defaultManager];
    BOOL blHave=[fileManager fileExistsAtPath:filePath];
    if (!blHave) {
        NSLog(@"no  have");
        return ;
    }else {
        NSLog(@"have");
        BOOL blDele= [fileManager removeItemAtPath:filePath error:nil];
        if (blDele) {
            NSLog(@"dele success");
        }else {
            NSLog(@"dele fail");
        }
    }
}
/**
@@ -303,13 +303,14 @@
- (void)getSuggestSearchWithKey:(NSString *)text{
    [[YTHNetInterface startInterface] getsuggestsearchKW:text Withblock:^(BOOL isSuccessful, id result, NSString *error) {
        if (isSuccessful) {
            if (!self.suggestSearch) {
                self.suggestSearch = [[NSMutableArray alloc]initWithCapacity:0];
            }
            self.suggestSearch = [result objectForKey:@"data"];
            for (int i =0; i <self.suggestSearch.count; i++){
                NSLog(@"%@",[self.suggestSearch objectAtIndex:i]);
            }
            [self.suggestTableview reloadData];
            
        }else{
@@ -326,22 +327,21 @@
    if (textField.text.length>0) {
        [self getSuggestSearchWithKey:textField.text];
        _suggestTableview.hidden = NO;
        NSLog(@"有数据");
    }else{
        _suggestTableview.hidden = YES;
        NSLog(@"无数据");
    }
}
- (BOOL)YTHSearchField:(YTHSearchTextField *)searchField textFieldShouldReturn:(UITextField *)textField{
    NSLog(@"点击了键盘搜索");
- (BOOL)YTHSearchField:(YTHSearchTextField *)searchField textFieldShouldReturn:(UITextField *)textField {
//    if (textField.text.length>0) {
        [self searchCotol:textField.text];
//    }
    return YES;
}
- (void)YTHSearchField:(YTHSearchTextField *)searchField clearClik:(UIButton *)btn{//点击清除按钮
- (void)YTHSearchField:(YTHSearchTextField *)searchField clearClik:(UIButton *)btn {//点击清除按钮
    self.suggestTableview.hidden = YES;
    self.collectionView.hidden=NO;
    [self getOldSearch];
@@ -398,29 +398,32 @@
    }
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
    SearchCollectionViewCell *Cell=[collectionView dequeueReusableCellWithReuseIdentifier:@"SearchCollectionViewCellID" forIndexPath:indexPath];
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    SearchCollectionViewCell *Cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"SearchCollectionViewCellID"
                                                                               forIndexPath:indexPath];
    Cell.backgroundColor = SJColor(239, 239, 239, 1);
    if (indexPath.section==0) {//热门搜索的cell
        Cell.searchCellText.text=[_dataHot[indexPath.row] objectForKey:@"name"];
        Cell.searchCellText.textAlignment=NSTextAlignmentCenter;
        Cell.layer.cornerRadius = Cell.frame.size.height / 2;
        Cell.layer.masksToBounds = YES;
//        Cell.layer.cornerRadius = 4.0f;
//        Cell.contentView.layer.cornerRadius = 4.0f;
        Cell.lengths.constant=0.0f;
    }else{
    } else {
        //历史搜索的cell
        NSString *searchString = [_dataOld[indexPath.row] objectForKey:@"name"];
        Cell.searchCellText.text=[NSString stringWithFormat:@"  %@",[searchString removeSpace]];
        Cell.searchCellText.textAlignment=NSTextAlignmentLeft;
//        Cell.searchCellText.backgroundColor=[UIColor whiteColor];
        Cell.searchCellText.text = [NSString stringWithFormat:@"  %@",[searchString removeSpace]];
        Cell.searchCellText.textAlignment = NSTextAlignmentLeft;
        Cell.searchLayout.constant = 6;
        Cell.lengths.constant = 10.0;
        Cell.searchCellText.layer.cornerRadius = 15;
        Cell.searchCellText.layer.masksToBounds = YES;
//        Cell.layer.cornerRadius = Cell.frame.size.height / 2;
//        Cell.layer.masksToBounds = YES;
        Cell.backgroundColor = [UIColor whiteColor];
    }
    return Cell;
@@ -452,15 +455,14 @@
        
        //添加清除按钮
        UIButton *clearBtn=[[UIButton alloc] init];
        clearBtn.backgroundColor=[UIColor whiteColor];
//        clearBtn.backgroundColor = SJColor(239, 239, 239, 1);
        clearBtn.titleLabel.font=[UIFont systemFontOfSize:15];
        [clearBtn addTarget:self action:@selector(ClearHistorys:) forControlEvents:UIControlEventTouchUpInside];
        [clearBtn setTitle:@"清除历史记录" forState:UIControlStateNormal];
        [clearBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
//        clearBtn.layer.cornerRadius = clearBtn.frame.size.height / 2;
//        clearBtn.layer.masksToBounds = YES;
        [ClearV addSubview:clearBtn];
        
        [clearBtn mas_makeConstraints:^(MASConstraintMaker *make) {
@@ -480,11 +482,13 @@
    return YES;
}
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
    SearchCollectionViewCell *Cell=(SearchCollectionViewCell *)[collectionView cellForItemAtIndexPath:indexPath];
    self.searchField.Field.text=[Cell.searchCellText.text removeSpace];
    NSLog(@"%@",self.searchField.Field.text);
    if (_searchField.Field.text.length>0) {
    if (_searchField.Field.text.length > 0) {
        [self searchCotol:_searchField.Field.text];
    }
}
@@ -539,4 +543,20 @@
    }
}
- (NSMutableArray *)dataHot {
    if (!_dataHot) {
        _dataHot = [[NSMutableArray alloc] init];
    }
    return _dataHot;
}
- (NSMutableArray *)dataOld {
    if (!_dataOld) {
        _dataOld = [[NSMutableArray alloc] init];
    }
    return _dataOld;
}
@end
MIduo/½çÃæ/ÍøÒ³ÊÓͼ/OrderViewController.m
@@ -13,7 +13,7 @@
#import "SJTipView.h"
@interface OrderViewController ()<UIGestureRecognizerDelegate,UIWebViewDelegate,UITableViewDelegate,UITableViewDataSource>
{
    BOOL _isFanliOrder; // æ˜¯è¿”利订单还是提成订单
    BOOL _isFanliOrder; // æ˜¯è‡ªè´­è®¢å•还是分享订单
    UIButton *loginBtn;//未登录或未绑定时的登录按钮,要在用户登录的时候隐藏
    UILabel *tipLabel;//未登录或未绑定时的提示语,要在用户登录的时候隐藏
@@ -195,7 +195,7 @@
- (SJTipView *)orderTipView{
    if (!_orderTipView) {
        _orderTipView = [[SJTipView alloc] initWithFrame:CGRectMake(0,CGRectGetMaxY(self.topView.frame) , KScreenW, 84)];
        _orderTipView.TipLabel.text = @"返利订单每10分钟更新一次,请稍后刷新";
        _orderTipView.TipLabel.text = @"自购订单每10分钟更新一次,请稍后刷新";
        [_orderTipView.closeBtn addTarget:self action:@selector(ordercloseTip:) forControlEvents:UIControlEventTouchUpInside];
    }
    return _orderTipView;
@@ -214,9 +214,9 @@
}
/**
 è¿”利订单选项
 è‡ªè´­è®¢å•选项
 @param sender è¿”利按钮
 @param sender è‡ªè´­æŒ‰é’®
 */
- (void)fanliTaped:(UIButton *)sender{
    if (![[NSUserDefaults standardUserDefaults] boolForKey:@"ordercloseTip"]) {
@@ -248,9 +248,9 @@
}
/**
 ææˆè®¢å•选项
 åˆ†äº«è®¢å•选项
 @param sender ææˆæŒ‰é’®
 @param sender åˆ†äº«æŒ‰é’®
 */
- (void)tichengTaped:(UIButton *)sender{
    if (![[NSUserDefaults standardUserDefaults] boolForKey:@"ordercloseTip"]) {
@@ -716,7 +716,7 @@
  
    if (state == -1 || state == 4) {
//        cell.fanliLabel.text = [NSString stringWithFormat:@"返利¥%.2f",[dic[@"fanMoney"]doubleValue]];
        cell.fanliLabel.text = [NSString stringWithFormat:@"返利¥%@",dic[@"fanMoney"]];
        cell.fanliLabel.text = [NSString stringWithFormat:@"奖金¥%@",dic[@"fanMoney"]];
        NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:cell.fanliLabel.text];
        [str setAttributes:@{NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleNone]} range:NSMakeRange(0,3)];//**iOS 8需要加上这句**
@@ -728,7 +728,7 @@
        cell.fanliLabel.attributedText = str;
    }else{
        cell.fanliLabel.text = [NSString stringWithFormat:@"返利¥%@",dic[@"fanMoney"]];
        cell.fanliLabel.text = [NSString stringWithFormat:@"奖金¥%@",dic[@"fanMoney"]];
//        cell.fanliLabel.text = [NSString stringWithFormat:@"返利¥%@",dic[@"fanMoney"]];
        NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:cell.fanliLabel.text];
        [str addAttribute:NSForegroundColorAttributeName value:XYRMainColor range:NSMakeRange(3,cell.fanliLabel.text.length - 3)];
@@ -796,7 +796,7 @@
    }
    _fanliButton = [UIButton buttonWithType:UIButtonTypeCustom];
    _fanliButton.frame = CGRectMake(0, 10, KScreenW / 3, 30);
    [_fanliButton setTitle:@"返利订单" forState:UIControlStateNormal];
    [_fanliButton setTitle:@"自购订单" forState:UIControlStateNormal];
    [_fanliButton setTitleColor:SJColor(51, 51, 51, 1) forState:UIControlStateNormal];
    [_fanliButton setTitleColor:XYRMainColor forState:UIControlStateSelected];
    [_fanliButton addTarget:self action:@selector(fanliTaped:) forControlEvents:UIControlEventTouchUpInside];
@@ -809,7 +809,7 @@
    }
    _unitButton = [UIButton buttonWithType:UIButtonTypeCustom];
    _unitButton.frame = CGRectMake(CGRectGetMaxX(_fanliButton.frame), 10, KScreenW / 3, 30);
    [_unitButton setTitle:@"提成订单" forState:UIControlStateNormal];
    [_unitButton setTitle:@"分享订单" forState:UIControlStateNormal];
    [_unitButton setTitleColor:SJColor(51, 51, 51, 1) forState:UIControlStateNormal];
    [_unitButton setTitleColor:XYRMainColor forState:UIControlStateSelected];
    [_unitButton addTarget:self action:@selector(tichengTaped:) forControlEvents:UIControlEventTouchUpInside];
MIduo/½çÃæ/ÍøÒ³ÊÓͼ/ÉÌÆ·ÏêÇé/ButtomCarView.m
@@ -34,22 +34,22 @@
            }
            shareImage.image = [UIImage imageNamed:@"detailShare"];
            [self addSubview:shareImage];
            UILabel *sharelabel = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(shareImage.frame) + 8  , 7, 50, 18)];
            UILabel *sharelabel = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(shareImage.frame) + 8  , 6, 65, 18)];
            if (KScreenW < 375) {
                sharelabel.frame = CGRectMake(CGRectGetMaxX(shareImage.frame) + 5  , 3, 50, 22);
                sharelabel.frame = CGRectMake(CGRectGetMaxX(shareImage.frame) + 5  , 2, 65, 22);
                shareImage.bounds = CGRectMake(0, 0, 15, 14);
            }else if(KScreenW > 375){
                shareImage.frame = CGRectMake(CGRectGetMinX(self.shareButton.frame) + (KScreenW - KScreenW / 5) / 4 - 30   , 8, 19, 17);
                sharelabel.frame = CGRectMake(CGRectGetMaxX(shareImage.frame) + 10  , 8, 50, 22);
                sharelabel.frame = CGRectMake(CGRectGetMaxX(shareImage.frame) + 10  , 7, 65, 22);
            }
            
            //        sharelabel.textAlignment = NSTextAlignmentCenter;
            sharelabel.text = @"分享赚";
            sharelabel.font = [UIFont boldSystemFontOfSize:16];
            sharelabel.text = @"分享奖金";
            sharelabel.font = [UIFont boldSystemFontOfSize:15];
            sharelabel.textColor = XYRMainColor;
            [self addSubview:sharelabel];
            _moneyLabel = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMinX(self.shareButton.frame), CGRectGetMaxY(sharelabel.frame) , self.shareButton.frame.size.width, 18)];
            _moneyLabel.font = [UIFont systemFontOfSize:16];
            _moneyLabel.font = [UIFont systemFontOfSize:15];
            _moneyLabel.textAlignment = NSTextAlignmentCenter;
            _moneyLabel.text = @"";
            _moneyLabel.textColor = XYRMainColor;
MIduo/½çÃæ/¹ºÎï³µ/shoppingCartViewController.m
@@ -208,7 +208,7 @@
        TipLabel.font = [UIFont systemFontOfSize:14.0f];
        TipLabel.textAlignment = NSTextAlignmentCenter;
        TipLabel.numberOfLines = 0;
        TipLabel.text = @"购物车操作提示:必须点击进入每个商品查看确保有返利,再结算下单。";
        TipLabel.text = @"购物车操作提示:必须点击进入每个商品查看确保有奖金,再结算下单。";
        [_tipView addSubview:TipLabel];
        
        UIButton *closeBtn=[[UIButton alloc] initWithFrame:CGRectMake((KScreenW-100)/2, 70, 100, 24)];
MIduo/½çÃæ/Ê×Ò³/ListViewController.h
@@ -8,7 +8,9 @@
#import <UIKit/UIKit.h>
#import "ZJScrollPageView.h"
@interface ListViewController : SJBaseViewController<ZJScrollPageViewChildVcDelegate>
#import "ALBaseController.h"
@interface ListViewController : ALBaseController<ZJScrollPageViewChildVcDelegate>
@property (nonatomic ,strong) NSString *GCname;
@property (nonatomic ,strong) NSString *GCid;
MIduo/½çÃæ/Ê×Ò³/ListViewController.m
@@ -97,19 +97,6 @@
    }
}
- (BOOL)datasourceIsNull {
    if (_ClassificationData.count == 0) {
        return YES;
    } else {
        return NO;
    }
}
- (BOOL)homeIsShowNetWorkView {
    
    
MIduo/½çÃæ/Ê×Ò³/NEWHomeViewController.h
@@ -7,7 +7,8 @@
//
#import <UIKit/UIKit.h>
#import "ALBaseController.h"
@interface NEWHomeViewController : SJBaseViewController
@interface NEWHomeViewController : ALBaseController
@end
MIduo/½çÃæ/Ê×Ò³/NEWHomeViewController.m
@@ -15,7 +15,7 @@
#import "ScanHelper.h"
#import "CodeFieldViewController.h"
#import "MineMessageViewController.h"
#import "SearchTip.h"
#import "SearchCouponView.h"
@interface NEWHomeViewController ()<ZJScrollPageViewDelegate> {
@@ -29,7 +29,7 @@
@property (nonatomic , strong) NSMutableArray *goodsClassification;//获取一级分类数据
@property (nonatomic , strong) NSMutableArray *ClassificationName;//一级分类的名称
@property (nonatomic ,strong) GuessYouLike *buttomView;
@property (nonatomic ,strong) SearchTip *SearchTips; //搜索建议
@property (nonatomic ,strong) SearchCouponView *SearchTips; //搜索建议
@property (nonatomic, strong)NSDictionary *buttomSource;
@property (nonatomic, strong) NSString *pasteboardStr;
@@ -219,7 +219,7 @@
 
 @param notice ç²˜è´´æ¿å†…容
 */
- (void)guessYouLike:(NSNotification *)notice{
- (void)guessYouLike:(NSNotification *)notice {
    NSLog(@"%@",notice.object);
    NSMutableDictionary *dic = @{}.mutableCopy;
    [dic setObject:notice.object forKey:@"text"];
@@ -240,28 +240,38 @@
                [self.buttomView.image setYthImageWithURL:self.buttomSource[@"tbImgs"][0] placeholderImage:[UIImage imageNamed:@"商品默认图片"]];
                [self.buttomView.enterButton addTarget:self action:@selector(enterTaped:) forControlEvents:UIControlEventTouchUpInside];
                [self.buttomView.closeButton addTarget:self action:@selector(closeTaped:) forControlEvents:UIControlEventTouchUpInside];
            }else if(type == 2){
            } else if (type == 2) {
                self.pasteboardStr = object[@"data"][@"data"][@"title"];
                self.SearchTips=[[SearchTip alloc] initWithSearchStr: self.pasteboardStr withIsSearch:YES];
                __weak typeof(self)weakSelf = self;
                self.SearchTips = [[SearchCouponView alloc] initWithSearchStr:self.pasteboardStr];
                __weak typeof(self) weakSelf = self;
                self.SearchTips.hasIndex = ^(NSInteger index) {
                    if (index==790) {//去搜索
                    if (index == 791) {
                        [weakSelf.SearchTips dismiss];
                        weakSelf.SearchTips=nil;
                        UIViewController *controller = [weakSelf topViewController ];
                        weakSelf.SearchTips = nil;
                        UIViewController *controller = [weakSelf topViewController];
                        searchDetailViewController *sresult = [[searchDetailViewController alloc] init];
                        sresult.searchString = weakSelf.pasteboardStr;
                        sresult.hidesBottomBarWhenPushed = YES;
                        
                        [controller.navigationController pushViewController:sresult animated:YES];
                    }else if(index==791){//关闭
                    } else if(index == 790){
                        [weakSelf.SearchTips dismiss];
                        weakSelf.SearchTips=nil;
                        weakSelf.SearchTips = nil;
                    }
                };
                [self.SearchTips show];
            }
        }
    } fail:^(id object) {
        NSLog(@"%@",object);
    }];
@@ -324,9 +334,9 @@
    [SearchImage setImage:[UIImage imageNamed:@"搜索粉色"]];
    [titleView addSubview:SearchImage];
    
    UILabel *tipLabel=[[UILabel alloc] initWithFrame:CGRectMake(45, 0, KScreenW-105, 40)];
    UILabel *tipLabel=[[UILabel alloc] initWithFrame:CGRectMake(35, 0, KScreenW-105, 40)];
    tipLabel.backgroundColor=[UIColor clearColor];
    tipLabel.text=@"粘贴宝贝标题,先领券还返利";
    tipLabel.text=@"粘贴宝贝标题,搜索商品优惠券";
    tipLabel.textColor=YTHColor(169, 169, 169);
    tipLabel.font=[UIFont systemFontOfSize:16.0f];
    if (KScreenW < 375) {
@@ -427,15 +437,28 @@
        NSArray *array = object[@"data"][@"systemClientParamsList"];
        [[NSUserDefaults standardUserDefaults] removeObjectForKey:@"MainUrlArray"];
        NSDictionary *dic = @{@"info":array};
        [[NSUserDefaults standardUserDefaults] setObject:dic forKey:@"MainUrlArray"];
        for (NSInteger index = 0; index < array.count; index ++) {
            NSDictionary *dic = array[index];
            NSLog(@"%@",dic[@"name"]);
            if ([dic[@"key"] compare:@"weex_file_newer"] == 0) {
            }
            if ([dic[@"key"] compare:@"newuser"] == 0) {
                [YTHsharedManger startManger].isNewUser = [dic[@"value"] integerValue];
            }
            if ([dic[@"key"] compare:@"web_newer"] == 0) {
                [YTHsharedManger startManger].weexUrlString =  [NSString stringWithFormat:@"%@", dic[@"value"]];
            }
            if ([dic[@"key"] compare:@"invite_url"] == 0) {
                [YTHsharedManger startManger].membersUrl =  [NSString stringWithFormat:@"%@", dic[@"value"]];
            }
@@ -505,19 +528,6 @@
    }
}
- (BOOL)datasourceIsNull {
    if (_goodsClassification.count == 0) {
        return YES;
    } else {
        return NO;
    }
}
- (BOOL)homeIsShowNetWorkView {
    
    
@@ -549,7 +559,7 @@
        
        if (isSuccessful) {
            
            NSDictionary *dic = (NSDictionary *)result;
            [self->_ClassificationName removeAllObjects];
            self.ClassificationName = nil;
MIduo/½çÃæ/Ê×Ò³/recommendCollectionViewCell.h
@@ -51,4 +51,8 @@
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *labelLayout;
- (void)fillCells:(NSDictionary *)dic;
/// å›¾ç‰‡ä¸­ç°è‰²èƒŒæ™¯
@property (weak, nonatomic) IBOutlet UIView *garyBgView;
/// å›¾ç‰‡ä¸­ç°è‰²èƒŒæ™¯çš„label,店铺名字
@property (weak, nonatomic) IBOutlet UILabel *storeLabel;
@end
MIduo/½çÃæ/Ê×Ò³/recommendCollectionViewCell.m
@@ -109,13 +109,12 @@
 */
- (void)fillCells:(NSDictionary *)dic{
    [self.goodsPic setYthImageWithURL:[dic objectForKey:@"pictUrl"] placeholderImage:[UIImage imageNamed:@"商品默认图片"]];
    self.layer.borderColor=XYRBackgroundColor.CGColor;
    self.layer.borderColor = XYRBackgroundColor.CGColor;
    self.layer.borderWidth=2;
    self.shopType=[dic objectForKey:@"shopType"];
    self.TBtitle=[dic objectForKey:@"title"];
    self.titleLabel.textColor = SJColor(98, 98, 98, 1);
    //            cell.titleLabel.textColor = [UIColor redColor];
    self.titleLabel.font = [UIFont systemFontOfSize:12];
    if (KScreenW == 375) {
        self.titleLabel.font = [UIFont systemFontOfSize:14];
@@ -132,6 +131,7 @@
    }else if([_shopType intValue]==2){
        typeString = @"天猫价";
    }
    self.storeLabel.text = dic[@"shopTitle"];
    self.PromotionLabel.text = [NSString stringWithFormat:@"%@:Â¥%@", typeString, dic[@"zkPrice"]];
    self.PromotionLabel.textColor = SJColor(153, 153, 153, 1);
    self.titleLabel.textColor = SJColor(51, 51, 51, 1);
MIduo/½çÃæ/Ê×Ò³/recommendCollectionViewCell.xib
@@ -91,8 +91,8 @@
                            <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="返" translatesAutoresizingMaskIntoConstraints="NO" id="BwQ-NX-he1">
                                <rect key="frame" x="8" y="5" width="18" height="16"/>
                                <constraints>
                                    <constraint firstAttribute="height" constant="16" id="JgF-7Q-C3g"/>
                                    <constraint firstAttribute="width" constant="18" id="ej3-JJ-TGT"/>
                                    <constraint firstAttribute="height" constant="13" id="JgF-7Q-C3g"/>
                                    <constraint firstAttribute="width" constant="25" id="ej3-JJ-TGT"/>
                                </constraints>
                            </imageView>
                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="月销:" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bbQ-3v-6GK">
@@ -158,7 +158,7 @@
                        </subviews>
                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                        <constraints>
                            <constraint firstItem="BwQ-NX-he1" firstAttribute="top" secondItem="Vvu-9W-mD3" secondAttribute="top" constant="5" id="2na-Zh-h3G"/>
                            <constraint firstItem="BwQ-NX-he1" firstAttribute="top" secondItem="Vvu-9W-mD3" secondAttribute="top" constant="9" id="2na-Zh-h3G"/>
                            <constraint firstItem="xDZ-BW-bzu" firstAttribute="top" secondItem="bbQ-3v-6GK" secondAttribute="bottom" constant="4" id="95U-ej-8Du"/>
                            <constraint firstItem="bbQ-3v-6GK" firstAttribute="leading" secondItem="Btc-L3-CVA" secondAttribute="trailing" constant="4" id="Cs4-sQ-eeQ"/>
                            <constraint firstAttribute="trailing" secondItem="xDZ-BW-bzu" secondAttribute="trailing" constant="10" id="OLP-bN-hkc"/>
@@ -175,6 +175,25 @@
                            <constraint firstAttribute="trailing" secondItem="bbQ-3v-6GK" secondAttribute="trailing" constant="8" id="rdd-1q-PnL"/>
                            <constraint firstItem="xiz-pp-du9" firstAttribute="width" secondItem="Vvu-9W-mD3" secondAttribute="width" multiplier="1:2" id="sDz-dz-ZNz"/>
                            <constraint firstItem="BwQ-NX-he1" firstAttribute="leading" secondItem="Vvu-9W-mD3" secondAttribute="leading" constant="8" id="sSt-oG-0RS"/>
                        </constraints>
                    </view>
                    <view hidden="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xGN-0S-IMT">
                        <rect key="frame" x="0.0" y="143" width="222" height="25"/>
                        <subviews>
                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="测试啊恢复肌肤垃圾啊剋" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zN4-kS-z4L">
                                <rect key="frame" x="10" y="5" width="202" height="15"/>
                                <fontDescription key="fontDescription" type="system" pointSize="13"/>
                                <color key="textColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                                <nil key="highlightedColor"/>
                            </label>
                        </subviews>
                        <color key="backgroundColor" white="0.0" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                        <constraints>
                            <constraint firstAttribute="height" constant="25" id="CgM-2e-z3P"/>
                            <constraint firstAttribute="trailing" secondItem="zN4-kS-z4L" secondAttribute="trailing" constant="10" id="If7-g6-G5V"/>
                            <constraint firstAttribute="bottom" secondItem="zN4-kS-z4L" secondAttribute="bottom" constant="5" id="cAY-00-BhH"/>
                            <constraint firstItem="zN4-kS-z4L" firstAttribute="leading" secondItem="xGN-0S-IMT" secondAttribute="leading" constant="10" id="p69-8A-fae"/>
                            <constraint firstItem="zN4-kS-z4L" firstAttribute="top" secondItem="xGN-0S-IMT" secondAttribute="top" constant="5" id="yCq-Sl-YzK"/>
                        </constraints>
                    </view>
                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="B0Z-VT-E8D">
@@ -201,8 +220,10 @@
            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
            <constraints>
                <constraint firstItem="dwb-x1-yD2" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="8" id="38X-Fp-jKY"/>
                <constraint firstAttribute="trailing" secondItem="xGN-0S-IMT" secondAttribute="trailing" id="3g5-Uu-xdf"/>
                <constraint firstItem="QPF-po-I2k" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="8" id="6CM-b9-yLs"/>
                <constraint firstItem="WTa-K0-8y6" firstAttribute="top" secondItem="dwb-x1-yD2" secondAttribute="bottom" constant="5" id="96B-Ac-ofJ"/>
                <constraint firstItem="xGN-0S-IMT" firstAttribute="bottom" secondItem="dwb-x1-yD2" secondAttribute="bottom" id="9Ja-v4-1bN"/>
                <constraint firstItem="Vvu-9W-mD3" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="FDe-R0-Oe1"/>
                <constraint firstItem="dwb-x1-yD2" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" constant="8" id="Hb3-Ha-1Ef"/>
                <constraint firstItem="QPF-po-I2k" firstAttribute="top" secondItem="dwb-x1-yD2" secondAttribute="bottom" constant="6" id="I9x-Ab-xdA"/>
@@ -212,6 +233,7 @@
                <constraint firstAttribute="trailing" secondItem="B0Z-VT-E8D" secondAttribute="trailing" id="Ruh-dp-wvS"/>
                <constraint firstAttribute="trailing" secondItem="Vvu-9W-mD3" secondAttribute="trailing" id="SI4-53-fLd"/>
                <constraint firstAttribute="bottom" secondItem="B0Z-VT-E8D" secondAttribute="bottom" id="ToQ-Ya-9Ek"/>
                <constraint firstItem="xGN-0S-IMT" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="Wic-tA-fTj"/>
                <constraint firstAttribute="trailing" secondItem="WTa-K0-8y6" secondAttribute="trailing" constant="8" id="fJh-Ka-a9k"/>
                <constraint firstAttribute="trailing" secondItem="dwb-x1-yD2" secondAttribute="trailing" constant="8" id="iyd-Gd-VIp"/>
                <constraint firstAttribute="bottom" secondItem="Vvu-9W-mD3" secondAttribute="bottom" id="qPx-tX-QcG"/>
@@ -226,6 +248,7 @@
                <outlet property="YHQ1" destination="ceg-86-5sX" id="YRb-Es-AKY"/>
                <outlet property="YHQ2" destination="vUn-xn-UrF" id="Ugh-s5-nD3"/>
                <outlet property="fanPriceLabel" destination="Btc-L3-CVA" id="RU3-Yn-z9s"/>
                <outlet property="garyBgView" destination="xGN-0S-IMT" id="6iw-qH-6Ic"/>
                <outlet property="goodsPic" destination="dwb-x1-yD2" id="RMw-dg-yB7"/>
                <outlet property="imageH" destination="IFe-EB-eSc" id="lvW-J6-JB0"/>
                <outlet property="labelImage" destination="QPF-po-I2k" id="mEC-fw-zBN"/>
@@ -233,6 +256,7 @@
                <outlet property="quanMoneyLabel" destination="tKP-sG-z3A" id="twE-ah-ff1"/>
                <outlet property="quanView" destination="RK9-Tt-xac" id="MIW-8O-WbG"/>
                <outlet property="quanViewLayout" destination="CpL-a4-u00" id="2b8-wj-vVe"/>
                <outlet property="storeLabel" destination="zN4-kS-z4L" id="yU5-gf-V55"/>
                <outlet property="titleLabel" destination="WTa-K0-8y6" id="0WD-dv-dJY"/>
                <outlet property="totalPriceLabel" destination="xiz-pp-du9" id="sZe-1t-cJs"/>
                <outlet property="youhuiquan" destination="Dxb-wm-Cly" id="jTM-hq-hsB"/>
@@ -247,7 +271,7 @@
        <image name="满减2" width="5" height="19"/>
        <image name="满减3" width="5" height="19"/>
        <image name="足迹未选中" width="25" height="25"/>
        <image name="足迹选中" width="25" height="25"/>
        <image name="返" width="13" height="12"/>
        <image name="足迹选中" width="24" height="24"/>
        <image name="返" width="25" height="13"/>
    </resources>
</document>
MIduo/½çÃæ/Ê×Ò³/recommendViewController.h
@@ -8,9 +8,9 @@
#import <UIKit/UIKit.h>
#import "ZJScrollPageView.h"
#import "searchViewController.h"    //搜索界面
#import "ALBaseController.h"
@interface recommendViewController : SJBaseViewController<ZJScrollPageViewChildVcDelegate>
@interface recommendViewController : ALBaseController<ZJScrollPageViewChildVcDelegate>
@end
MIduo/½çÃæ/Ê×Ò³/recommendViewController.m
@@ -121,12 +121,18 @@
    //注册点击tabbaritem的通知时间(主要功能:当tabBarViewcontroller显示首页时,点击首页tabBar,实现回到顶部的功能,类似淘宝)
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(tabBarSeleted) name:@"HomeViewController" object:nil];
    //是否显示新人红包的弹窗
    if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"newuser"] intValue]==0) {
        [self ShowNewUser];
    if ([[[NSUserDefaults standardUserDefaults] objectForKey:@"newuser"] intValue] == 0) {
        
    }else{
        if ([YTHsharedManger startManger].isNewUser == 0) {
             [self ShowNewUser];
        }
    } else {
        [self getPasteboard];
    }
    [self.navigationController.navigationBar setShadowImage:[UIImage new]];
}
@@ -153,7 +159,7 @@
/**
 æ˜¾ç¤ºæ–°äººçº¢åŒ…
 */
-(void)ShowNewUser{
- (void)ShowNewUser {
    //判断当前用户是否登录
    BOOL bor = [[NSUserDefaults standardUserDefaults] boolForKey:@"islogined"];
    NSLog(@"%ld",self.navigationController.viewControllers.count);
@@ -257,19 +263,6 @@
    
}
- (BOOL)datasourceIsNull {
    if (self.dataBanner.count == 0) {
        return YES;
    } else {
        return NO;
    }
}
- (BOOL)homeIsShowNetWorkView {
    
    
@@ -316,8 +309,7 @@
                    
                    self.noNetworkViews.hidden = YES;
                    
                    [CustomProgressHUD showNormal:@"网络未连接,请检测网络设置"];
                    ALToastBottom(@"网络未连接,请检测网络设置");
                }
                
            } else {
@@ -330,9 +322,8 @@
                    
                    self.noNetworkViews.hidden = YES;
                    
                    [CustomProgressHUD showNormal:@"网络连接异常,请检测网络设置"];
                    ALToastBottom(@"网络连接异常,请检测网络设置");
                }
            }
            
            //加载促销栏数据
@@ -532,19 +523,22 @@
}
//cell被点击的处理方法
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
    NSLog(@"%ld,%ld",indexPath.section,indexPath.row);
    [collectionView deselectItemAtIndexPath:indexPath animated:YES];
    if (indexPath.section==0) {
        NSDictionary *tempDic = _HonestList[indexPath.row];
        NSString *Type = [tempDic objectForKey:@"type"];
        
        if ([Type intValue]==4) {//调网页视图
            ShonpingShareViewController *SureWebVC=[[ShonpingShareViewController alloc] init];
            SureWebVC.urlString=[YTHsharedManger startManger].membersUrl;
            SureWebVC.hidesBottomBarWhenPushed=YES;
            [self.navigationController pushViewController:SureWebVC animated:YES];
        }else{
        if ([Type intValue] == 4) {//调网页视图
//            ShonpingShareViewController *SureWebVC=[[ShonpingShareViewController alloc] init];
//            SureWebVC.urlString=[YTHsharedManger startManger].membersUrl;
//            SureWebVC.hidesBottomBarWhenPushed=YES;
//            [self.navigationController pushViewController:SureWebVC animated:YES];
//
        } else {
            
            NSString *controller = tempDic[@"jumpDetail"][@"controller"];
            
@@ -633,24 +627,32 @@
    }
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
    if(indexPath.section==0){
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
    if (indexPath.section == 0) {
        TCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"TCollectionViewCell" forIndexPath:indexPath];
        NSDictionary *temp = _HonestList[indexPath.row];
        [cell.cellicon setYthImageWithURL:[temp objectForKey:@"picture"] placeholderImage:[UIImage imageNamed:@"商品默认图片"]];
        cell.cellName.text=[temp objectForKey:@"name"];
        cell.backgroundColor = [UIColor whiteColor];
        if (indexPath.row == 3) {
            self.imageViewGif.frame = CGRectMake(cell.frame.size.width - 45, 5, 45, 20);
            [cell addSubview:self.imageViewGif];
        }
        return cell;
    }else if(indexPath.section==1){
    } else if (indexPath.section == 1) {
        TopicCollectionViewCell *cell=[collectionView dequeueReusableCellWithReuseIdentifier:@"TopicCollectionViewCell" forIndexPath:indexPath];
        NSDictionary *item=_dataspecial[indexPath.row];
        [cell.Pic setYthImageWithURL:[item objectForKey:@"picture"] placeholderImage:[UIImage imageNamed:@"默认banner"]];
        return cell;
    }else{
    } else {
        if (indexPath.row==0) {
            SectionTopicCollectionViewCell *cell=[collectionView dequeueReusableCellWithReuseIdentifier:@"SectionTopicCollectionViewCell" forIndexPath:indexPath];
            
@@ -659,7 +661,8 @@
            [cell.image setYthImageWithURL:[sectionTopDic objectForKey:@"picUrl"] placeholderImage:[UIImage imageNamed:@"默认banner"]];
            
            return cell;
        }else{
        } else {
            recommendCollectionViewCell *cell=[collectionView dequeueReusableCellWithReuseIdentifier:@"recommendCollectionViewCell" forIndexPath:indexPath];
            [cell.MaskedView setHidden:YES];
            NSArray *SectionItem=[_datasection[indexPath.section-2] objectForKey:@"recommendSectionGoodsList"];