Merge branch 'master' of ssh://193.112.35.168:29418/fanliquan
3个文件已删除
4 文件已重命名
81个文件已修改
3 文件已复制
46个文件已添加
| | |
| | | 0D2B2C71247E1C30003F27AE /* SNGoodsDetailController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D2B2C70247E1C30003F27AE /* SNGoodsDetailController.m */; }; |
| | | 0D2B2C742480B2E3003F27AE /* WPHTransformView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D2B2C732480B2E3003F27AE /* WPHTransformView.m */; }; |
| | | 0D2B2C782480B519003F27AE /* SNTransformView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D2B2C772480B519003F27AE /* SNTransformView.m */; }; |
| | | 0D2B2C9224849867003F27AE /* libGDTMobSDK.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0D2B2C8E24849867003F27AE /* libGDTMobSDK.a */; }; |
| | | 0D2B2C9424849B9E003F27AE /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0D2B2C9324849B9E003F27AE /* StoreKit.framework */; }; |
| | | 0D2B2C9524849BCC003F27AE /* WebKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D9767D720C7D7FE006EE24F /* WebKit.framework */; }; |
| | | 0D2B2C9724849D5D003F27AE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0D2B2C9624849D5D003F27AE /* Foundation.framework */; }; |
| | | 0D2B9A4A248609B0008393FE /* OrderTitleCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D2B9A49248609B0008393FE /* OrderTitleCell.m */; }; |
| | | 0D36185F243C1350005E3CD6 /* TeamDataStatisticsBodyView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D36185E243C1350005E3CD6 /* TeamDataStatisticsBodyView.m */; }; |
| | | 0D3852DC247CAEBD00140E12 /* RecommendDetailController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D3852DB247CAEBD00140E12 /* RecommendDetailController.m */; }; |
| | | 0D3852E1247CB0E400140E12 /* RecommendDetailHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D3852E0247CB0E400140E12 /* RecommendDetailHeaderView.m */; }; |
| | |
| | | 0D3852E7247CEC3500140E12 /* SearchGoodsGuideCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D3852E6247CEC3500140E12 /* SearchGoodsGuideCell.m */; }; |
| | | 0D3852EA247CFEA200140E12 /* SearchDetailFilterWPHView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D3852E9247CFEA200140E12 /* SearchDetailFilterWPHView.m */; }; |
| | | 0D3852EE247D184600140E12 /* WPHGoodsDetailController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D3852ED247D184600140E12 /* WPHGoodsDetailController.m */; }; |
| | | 0D4C500B24874484002E5841 /* WPHGoodsListShowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D4C500724874482002E5841 /* WPHGoodsListShowController.m */; }; |
| | | 0D4C500C24874484002E5841 /* WPHGoodsListController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D4C500A24874484002E5841 /* WPHGoodsListController.m */; }; |
| | | 0D4C501124874733002E5841 /* SNGoodsListController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D4C500D24874731002E5841 /* SNGoodsListController.m */; }; |
| | | 0D4C501224874733002E5841 /* SNGoodsListShowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D4C501024874733002E5841 /* SNGoodsListShowController.m */; }; |
| | | 0D4F8AFE247B5D060033DABB /* CZBMapNavgation.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D4F8AF8247B5D050033DABB /* CZBMapNavgation.m */; }; |
| | | 0D4F8AFF247B5D060033DABB /* WHExteriorNavicationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D4F8AF9247B5D050033DABB /* WHExteriorNavicationController.m */; }; |
| | | 0D4F8B00247B5D060033DABB /* CZBInfoManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D4F8AFD247B5D050033DABB /* CZBInfoManager.m */; }; |
| | |
| | | 0D60F88B23F520FA0076630E /* QuickShareController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D60F88A23F520FA0076630E /* QuickShareController.m */; }; |
| | | 0D60F88F23F52CBD0076630E /* ShareMainImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D60F88E23F52CBD0076630E /* ShareMainImageView.m */; }; |
| | | 0D60F89223F534250076630E /* QuickShareBottomView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D60F89123F534250076630E /* QuickShareBottomView.m */; }; |
| | | 0D81C2C02488D77A00BE8E8B /* SearchDetailFilterSNView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D81C2BF2488D77A00BE8E8B /* SearchDetailFilterSNView.m */; }; |
| | | 0D8C2B922466A061009ABF50 /* MyTeamNavView.m in Sources */ = {isa = PBXBuildFile; fileRef = 0D8C2B912466A061009ABF50 /* MyTeamNavView.m */; }; |
| | | 0DC82667246CE85800E89D1B /* WithdrawalRecordController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DC82666246CE85800E89D1B /* WithdrawalRecordController.m */; }; |
| | | 0DC8266B246CEA7200E89D1B /* WithdrawalRecordModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 0DC8266A246CEA7200E89D1B /* WithdrawalRecordModel.m */; }; |
| | |
| | | 2D2A1B4C2251BCB000FB1001 /* RecommendIndexModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D2A1B4B2251BCB000FB1001 /* RecommendIndexModel.m */; }; |
| | | 2D2AF4A422E8597E00F38DFF /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2D2AF4A322E8597C00F38DFF /* JavaScriptCore.framework */; }; |
| | | 2D2B04FC229D15CB007CEF78 /* TKPhoneTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D2B04FB229D15CB007CEF78 /* TKPhoneTextField.m */; }; |
| | | 2D2B3AE121CC777A00F77F60 /* NewOrderTopCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D2B3ADF21CC777A00F77F60 /* NewOrderTopCell.m */; }; |
| | | 2D2B3AE221CC777A00F77F60 /* NewOrderTopCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2D2B3AE021CC777A00F77F60 /* NewOrderTopCell.xib */; }; |
| | | 2D2B3AE521CC939C00F77F60 /* OrderFiltrateView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D2B3AE421CC939C00F77F60 /* OrderFiltrateView.m */; }; |
| | | 2D2B3AE721CC93C400F77F60 /* OrderFiltrateView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2D2B3AE621CC93C400F77F60 /* OrderFiltrateView.xib */; }; |
| | | 2D2B3AEE21CCD19F00F77F60 /* OrdFitCollView.m in Sources */ = {isa = PBXBuildFile; fileRef = 2D2B3AED21CCD19F00F77F60 /* OrdFitCollView.m */; }; |
| | |
| | | 0D2B2C732480B2E3003F27AE /* WPHTransformView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WPHTransformView.m; sourceTree = "<group>"; }; |
| | | 0D2B2C762480B519003F27AE /* SNTransformView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SNTransformView.h; sourceTree = "<group>"; }; |
| | | 0D2B2C772480B519003F27AE /* SNTransformView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SNTransformView.m; sourceTree = "<group>"; }; |
| | | 0D2B2C7C24849867003F27AE /* GDTRewardVideoAdNetworkAdapterProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTRewardVideoAdNetworkAdapterProtocol.h; sourceTree = "<group>"; }; |
| | | 0D2B2C7D24849867003F27AE /* GDTNativeExpressAdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTNativeExpressAdView.h; sourceTree = "<group>"; }; |
| | | 0D2B2C7E24849867003F27AE /* GDTMobBannerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTMobBannerView.h; sourceTree = "<group>"; }; |
| | | 0D2B2C7F24849867003F27AE /* GDTUnifiedBannerView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTUnifiedBannerView.h; sourceTree = "<group>"; }; |
| | | 0D2B2C8024849867003F27AE /* GDTNativeAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTNativeAd.h; sourceTree = "<group>"; }; |
| | | 0D2B2C8124849867003F27AE /* GDTSDKConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTSDKConfig.h; sourceTree = "<group>"; }; |
| | | 0D2B2C8224849867003F27AE /* GDTBaseAdNetworkAdapterProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTBaseAdNetworkAdapterProtocol.h; sourceTree = "<group>"; }; |
| | | 0D2B2C8324849867003F27AE /* GDTMobInterstitial.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTMobInterstitial.h; sourceTree = "<group>"; }; |
| | | 0D2B2C8424849867003F27AE /* GDTRewardVideoAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTRewardVideoAd.h; sourceTree = "<group>"; }; |
| | | 0D2B2C8524849867003F27AE /* GDTSplashAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTSplashAd.h; sourceTree = "<group>"; }; |
| | | 0D2B2C8624849867003F27AE /* GDTNativeExpressAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTNativeExpressAd.h; sourceTree = "<group>"; }; |
| | | 0D2B2C8724849867003F27AE /* GDTLogoView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTLogoView.h; sourceTree = "<group>"; }; |
| | | 0D2B2C8824849867003F27AE /* GDTMediaView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTMediaView.h; sourceTree = "<group>"; }; |
| | | 0D2B2C8924849867003F27AE /* GDTUnifiedNativeAdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTUnifiedNativeAdView.h; sourceTree = "<group>"; }; |
| | | 0D2B2C8A24849867003F27AE /* GDTHybridAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTHybridAd.h; sourceTree = "<group>"; }; |
| | | 0D2B2C8B24849867003F27AE /* GDTUnifiedNativeAdDataObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTUnifiedNativeAdDataObject.h; sourceTree = "<group>"; }; |
| | | 0D2B2C8C24849867003F27AE /* GDTSDKDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTSDKDefines.h; sourceTree = "<group>"; }; |
| | | 0D2B2C8D24849867003F27AE /* GDTUnifiedInterstitialAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTUnifiedInterstitialAd.h; sourceTree = "<group>"; }; |
| | | 0D2B2C8E24849867003F27AE /* libGDTMobSDK.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libGDTMobSDK.a; sourceTree = "<group>"; }; |
| | | 0D2B2C8F24849867003F27AE /* GDTRewardVideoAdNetworkConnectorProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTRewardVideoAdNetworkConnectorProtocol.h; sourceTree = "<group>"; }; |
| | | 0D2B2C9024849867003F27AE /* GDTUnifiedNativeAd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTUnifiedNativeAd.h; sourceTree = "<group>"; }; |
| | | 0D2B2C9124849867003F27AE /* GDTVideoConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GDTVideoConfig.h; sourceTree = "<group>"; }; |
| | | 0D2B2C9324849B9E003F27AE /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; }; |
| | | 0D2B2C9624849D5D003F27AE /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; |
| | | 0D2B9A48248609B0008393FE /* OrderTitleCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OrderTitleCell.h; sourceTree = "<group>"; }; |
| | | 0D2B9A49248609B0008393FE /* OrderTitleCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OrderTitleCell.m; sourceTree = "<group>"; }; |
| | | 0D36185D243C1350005E3CD6 /* TeamDataStatisticsBodyView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TeamDataStatisticsBodyView.h; sourceTree = "<group>"; }; |
| | | 0D36185E243C1350005E3CD6 /* TeamDataStatisticsBodyView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TeamDataStatisticsBodyView.m; sourceTree = "<group>"; }; |
| | | 0D3852DA247CAEBD00140E12 /* RecommendDetailController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RecommendDetailController.h; sourceTree = "<group>"; }; |
| | |
| | | 0D3852E9247CFEA200140E12 /* SearchDetailFilterWPHView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SearchDetailFilterWPHView.m; sourceTree = "<group>"; }; |
| | | 0D3852EC247D184600140E12 /* WPHGoodsDetailController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WPHGoodsDetailController.h; sourceTree = "<group>"; }; |
| | | 0D3852ED247D184600140E12 /* WPHGoodsDetailController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WPHGoodsDetailController.m; sourceTree = "<group>"; }; |
| | | 0D4C500724874482002E5841 /* WPHGoodsListShowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WPHGoodsListShowController.m; sourceTree = "<group>"; }; |
| | | 0D4C500824874482002E5841 /* WPHGoodsListShowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WPHGoodsListShowController.h; sourceTree = "<group>"; }; |
| | | 0D4C500924874483002E5841 /* WPHGoodsListController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WPHGoodsListController.h; sourceTree = "<group>"; }; |
| | | 0D4C500A24874484002E5841 /* WPHGoodsListController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WPHGoodsListController.m; sourceTree = "<group>"; }; |
| | | 0D4C500D24874731002E5841 /* SNGoodsListController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SNGoodsListController.m; sourceTree = "<group>"; }; |
| | | 0D4C500E24874732002E5841 /* SNGoodsListShowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SNGoodsListShowController.h; sourceTree = "<group>"; }; |
| | | 0D4C500F24874732002E5841 /* SNGoodsListController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SNGoodsListController.h; sourceTree = "<group>"; }; |
| | | 0D4C501024874733002E5841 /* SNGoodsListShowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SNGoodsListShowController.m; sourceTree = "<group>"; }; |
| | | 0D4F8AF8247B5D050033DABB /* CZBMapNavgation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CZBMapNavgation.m; sourceTree = "<group>"; }; |
| | | 0D4F8AF9247B5D050033DABB /* WHExteriorNavicationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WHExteriorNavicationController.m; sourceTree = "<group>"; }; |
| | | 0D4F8AFA247B5D050033DABB /* CZBInfoManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CZBInfoManager.h; sourceTree = "<group>"; }; |
| | |
| | | 0D60F88E23F52CBD0076630E /* ShareMainImageView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ShareMainImageView.m; sourceTree = "<group>"; }; |
| | | 0D60F89023F534250076630E /* QuickShareBottomView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = QuickShareBottomView.h; sourceTree = "<group>"; }; |
| | | 0D60F89123F534250076630E /* QuickShareBottomView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = QuickShareBottomView.m; sourceTree = "<group>"; }; |
| | | 0D81C2BE2488D77A00BE8E8B /* SearchDetailFilterSNView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SearchDetailFilterSNView.h; sourceTree = "<group>"; }; |
| | | 0D81C2BF2488D77A00BE8E8B /* SearchDetailFilterSNView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SearchDetailFilterSNView.m; sourceTree = "<group>"; }; |
| | | 0D8C2B902466A061009ABF50 /* MyTeamNavView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyTeamNavView.h; sourceTree = "<group>"; }; |
| | | 0D8C2B912466A061009ABF50 /* MyTeamNavView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyTeamNavView.m; sourceTree = "<group>"; }; |
| | | 0DC82665246CE85800E89D1B /* WithdrawalRecordController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WithdrawalRecordController.h; sourceTree = "<group>"; }; |
| | |
| | | 2D2AF4A322E8597C00F38DFF /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; |
| | | 2D2B04FA229D15CA007CEF78 /* TKPhoneTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TKPhoneTextField.h; sourceTree = "<group>"; }; |
| | | 2D2B04FB229D15CB007CEF78 /* TKPhoneTextField.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TKPhoneTextField.m; sourceTree = "<group>"; }; |
| | | 2D2B3ADE21CC777A00F77F60 /* NewOrderTopCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NewOrderTopCell.h; sourceTree = "<group>"; }; |
| | | 2D2B3ADF21CC777A00F77F60 /* NewOrderTopCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NewOrderTopCell.m; sourceTree = "<group>"; }; |
| | | 2D2B3AE021CC777A00F77F60 /* NewOrderTopCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NewOrderTopCell.xib; sourceTree = "<group>"; }; |
| | | 2D2B3AE321CC939C00F77F60 /* OrderFiltrateView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = OrderFiltrateView.h; sourceTree = "<group>"; }; |
| | | 2D2B3AE421CC939C00F77F60 /* OrderFiltrateView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = OrderFiltrateView.m; sourceTree = "<group>"; }; |
| | | 2D2B3AE621CC93C400F77F60 /* OrderFiltrateView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = OrderFiltrateView.xib; sourceTree = "<group>"; }; |
| | |
| | | isa = PBXFrameworksBuildPhase; |
| | | buildActionMask = 2147483647; |
| | | files = ( |
| | | 0D2B2C9524849BCC003F27AE /* WebKit.framework in Frameworks */, |
| | | 187CF2DD1E694D270071421D /* SystemConfiguration.framework in Frameworks */, |
| | | 18325EB01F1C98C800432A51 /* Security.framework in Frameworks */, |
| | | 18325EB61F1C98F300432A51 /* QuartzCore.framework in Frameworks */, |
| | | 187CF2DF1E694D410071421D /* libz.tbd in Frameworks */, |
| | | 18F6653920859E350052997A /* libxml2.tbd in Frameworks */, |
| | | 0D2B2C9724849D5D003F27AE /* Foundation.framework in Frameworks */, |
| | | 2D7E1DA821466E6200BB6C7B /* AVFoundation.framework in Frameworks */, |
| | | 187CF2DB1E694D1D0071421D /* CoreTelephony.framework in Frameworks */, |
| | | 18325EB81F1C98FC00432A51 /* CoreLocation.framework in Frameworks */, |
| | | 18325EB21F1C98D700432A51 /* CoreGraphics.framework in Frameworks */, |
| | | 2D0BEEAA22E82FA900FD7009 /* AdSupport.framework in Frameworks */, |
| | | 0D2B2C9224849867003F27AE /* libGDTMobSDK.a in Frameworks */, |
| | | 0D2B2C9424849B9E003F27AE /* StoreKit.framework in Frameworks */, |
| | | 2D19D3502334DACF00105A66 /* CoreMotion.framework in Frameworks */, |
| | | 2D19D34E2334DAAC00105A66 /* libc++.tbd in Frameworks */, |
| | | 2D2AF4A422E8597E00F38DFF /* JavaScriptCore.framework in Frameworks */, |
| | | 2D0BEEBC22E83A2700FD7009 /* JDSDK.framework in Frameworks */, |
| | | 187CF2DB1E694D1D0071421D /* CoreTelephony.framework in Frameworks */, |
| | | 18325EB81F1C98FC00432A51 /* CoreLocation.framework in Frameworks */, |
| | | 2D0BEEAC22E82FD800FD7009 /* MessageUI.framework in Frameworks */, |
| | | 187CF2DD1E694D270071421D /* SystemConfiguration.framework in Frameworks */, |
| | | 2D0BEEAA22E82FA900FD7009 /* AdSupport.framework in Frameworks */, |
| | | 2D10CA5821D625AB00199E2D /* Accelerate.framework in Frameworks */, |
| | | 2D10CA5621D616CA00199E2D /* CoreMedia.framework in Frameworks */, |
| | | 2D10CA5421D616BE00199E2D /* CoreVideo.framework in Frameworks */, |
| | | 2D7E1DAA21466E8700BB6C7B /* QuickLook.framework in Frameworks */, |
| | | 2D138BD92236401C0071D71C /* libopencore-amrwb.a in Frameworks */, |
| | | 2D138BCD2236401C0071D71C /* MeiQiaSDK.framework in Frameworks */, |
| | | 2D7E1DA821466E6200BB6C7B /* AVFoundation.framework in Frameworks */, |
| | | 2D7E1DA621466E5400BB6C7B /* libicucore.tbd in Frameworks */, |
| | | 2D7E1DA421466E4600BB6C7B /* libsqlite3.tbd in Frameworks */, |
| | | 2D138BDA2236401C0071D71C /* libopencore-amrnb.a in Frameworks */, |
| | |
| | | 183FD266209AC0B600903765 /* UserNotificationsUI.framework in Frameworks */, |
| | | 18F6653D20859E650052997A /* CFNetwork.framework in Frameworks */, |
| | | 18F6653B20859E5A0052997A /* MobileCoreServices.framework in Frameworks */, |
| | | 187CF2DF1E694D410071421D /* libz.tbd in Frameworks */, |
| | | 18F6653920859E350052997A /* libxml2.tbd in Frameworks */, |
| | | 18F6653720859E280052997A /* libresolv.tbd in Frameworks */, |
| | | 18F6653520859E040052997A /* UserNotifications.framework in Frameworks */, |
| | | 18325EB61F1C98F300432A51 /* QuartzCore.framework in Frameworks */, |
| | | 18325EB41F1C98E800432A51 /* OpenGLES.framework in Frameworks */, |
| | | 18325EB21F1C98D700432A51 /* CoreGraphics.framework in Frameworks */, |
| | | 18325EB01F1C98C800432A51 /* Security.framework in Frameworks */, |
| | | 10CEDCB675FF4585204E4DCD /* Pods_MIduo.framework in Frameworks */, |
| | | ); |
| | | runOnlyForDeploymentPostprocessing = 0; |
| | |
| | | isa = PBXGroup; |
| | | children = ( |
| | | 0D2B2C752480B4F8003F27AE /* View */, |
| | | 0D4C500E24874732002E5841 /* SNGoodsListShowController.h */, |
| | | 0D4C501024874733002E5841 /* SNGoodsListShowController.m */, |
| | | 0D4C500F24874732002E5841 /* SNGoodsListController.h */, |
| | | 0D4C500D24874731002E5841 /* SNGoodsListController.m */, |
| | | 0D2B2C6F247E1C30003F27AE /* SNGoodsDetailController.h */, |
| | | 0D2B2C70247E1C30003F27AE /* SNGoodsDetailController.m */, |
| | | ); |
| | |
| | | 0D2B2C772480B519003F27AE /* SNTransformView.m */, |
| | | ); |
| | | path = View; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 0D2B2C7A248497AB003F27AE /* GDT */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | 0D2B2C7B24849867003F27AE /* lib */, |
| | | ); |
| | | path = GDT; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 0D2B2C7B24849867003F27AE /* lib */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | 0D2B2C7C24849867003F27AE /* GDTRewardVideoAdNetworkAdapterProtocol.h */, |
| | | 0D2B2C7D24849867003F27AE /* GDTNativeExpressAdView.h */, |
| | | 0D2B2C7E24849867003F27AE /* GDTMobBannerView.h */, |
| | | 0D2B2C7F24849867003F27AE /* GDTUnifiedBannerView.h */, |
| | | 0D2B2C8024849867003F27AE /* GDTNativeAd.h */, |
| | | 0D2B2C8124849867003F27AE /* GDTSDKConfig.h */, |
| | | 0D2B2C8224849867003F27AE /* GDTBaseAdNetworkAdapterProtocol.h */, |
| | | 0D2B2C8324849867003F27AE /* GDTMobInterstitial.h */, |
| | | 0D2B2C8424849867003F27AE /* GDTRewardVideoAd.h */, |
| | | 0D2B2C8524849867003F27AE /* GDTSplashAd.h */, |
| | | 0D2B2C8624849867003F27AE /* GDTNativeExpressAd.h */, |
| | | 0D2B2C8724849867003F27AE /* GDTLogoView.h */, |
| | | 0D2B2C8824849867003F27AE /* GDTMediaView.h */, |
| | | 0D2B2C8924849867003F27AE /* GDTUnifiedNativeAdView.h */, |
| | | 0D2B2C8A24849867003F27AE /* GDTHybridAd.h */, |
| | | 0D2B2C8B24849867003F27AE /* GDTUnifiedNativeAdDataObject.h */, |
| | | 0D2B2C8C24849867003F27AE /* GDTSDKDefines.h */, |
| | | 0D2B2C8D24849867003F27AE /* GDTUnifiedInterstitialAd.h */, |
| | | 0D2B2C8E24849867003F27AE /* libGDTMobSDK.a */, |
| | | 0D2B2C8F24849867003F27AE /* GDTRewardVideoAdNetworkConnectorProtocol.h */, |
| | | 0D2B2C9024849867003F27AE /* GDTUnifiedNativeAd.h */, |
| | | 0D2B2C9124849867003F27AE /* GDTVideoConfig.h */, |
| | | ); |
| | | path = lib; |
| | | sourceTree = "<group>"; |
| | | }; |
| | | 0D3852DD247CB03700140E12 /* RecommendDetail */ = { |
| | |
| | | isa = PBXGroup; |
| | | children = ( |
| | | 0D2B2C69247DFCEE003F27AE /* Cell */, |
| | | 0D4C500824874482002E5841 /* WPHGoodsListShowController.h */, |
| | | 0D4C500724874482002E5841 /* WPHGoodsListShowController.m */, |
| | | 0D4C500924874483002E5841 /* WPHGoodsListController.h */, |
| | | 0D4C500A24874484002E5841 /* WPHGoodsListController.m */, |
| | | 0D3852EC247D184600140E12 /* WPHGoodsDetailController.h */, |
| | | 0D3852ED247D184600140E12 /* WPHGoodsDetailController.m */, |
| | | ); |
| | |
| | | 18AC538B1E5A9876006D1FDF /* lib */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | 0D2B2C7A248497AB003F27AE /* GDT */, |
| | | 0D4F8AF7247B5D050033DABB /* CZBWebManager */, |
| | | 2DB5ED3D238516E4009B498C /* Player */, |
| | | 2D316B6F22D5C34200707CF3 /* FloatingWindow */, |
| | |
| | | children = ( |
| | | 0D3852E8247CFEA200140E12 /* SearchDetailFilterWPHView.h */, |
| | | 0D3852E9247CFEA200140E12 /* SearchDetailFilterWPHView.m */, |
| | | 0D81C2BE2488D77A00BE8E8B /* SearchDetailFilterSNView.h */, |
| | | 0D81C2BF2488D77A00BE8E8B /* SearchDetailFilterSNView.m */, |
| | | 2D223C3622E0478200AF183E /* SearchDetailFilterView.h */, |
| | | 2D223C3722E0478200AF183E /* SearchDetailFilterView.m */, |
| | | 2D2BDCF222E1580A001D3F6A /* SearchDetailConditionView.h */, |
| | |
| | | 2DC86F1E21CB976900AABF53 /* NewOrderCell.h */, |
| | | 2DC86F1F21CB976900AABF53 /* NewOrderCell.m */, |
| | | 2DC86F2021CB976900AABF53 /* NewOrderCell.xib */, |
| | | 2D2B3ADE21CC777A00F77F60 /* NewOrderTopCell.h */, |
| | | 2D2B3ADF21CC777A00F77F60 /* NewOrderTopCell.m */, |
| | | 2D2B3AE021CC777A00F77F60 /* NewOrderTopCell.xib */, |
| | | 0D2B9A48248609B0008393FE /* OrderTitleCell.h */, |
| | | 0D2B9A49248609B0008393FE /* OrderTitleCell.m */, |
| | | ); |
| | | path = cell; |
| | | sourceTree = "<group>"; |
| | |
| | | 3EB2FCBC06FCFF59022C5ECD /* Frameworks */ = { |
| | | isa = PBXGroup; |
| | | children = ( |
| | | 0D2B2C9624849D5D003F27AE /* Foundation.framework */, |
| | | 0D2B2C9324849B9E003F27AE /* StoreKit.framework */, |
| | | 2D19D34F2334DACF00105A66 /* CoreMotion.framework */, |
| | | 2D19D34D2334DAAC00105A66 /* libc++.tbd */, |
| | | 2D2AF4A322E8597C00F38DFF /* JavaScriptCore.framework */, |
| | |
| | | 2D2D64E722CC7D9400A9E9F8 /* BuyCheapGoodsHeaderTableViewCell.xib in Resources */, |
| | | 18E5ADFB1E5EC8B3009F85E0 /* SettingViewController.xib in Resources */, |
| | | 2D2B3AE721CC93C400F77F60 /* OrderFiltrateView.xib in Resources */, |
| | | 2D2B3AE221CC777A00F77F60 /* NewOrderTopCell.xib in Resources */, |
| | | 2DCBE41E21CDEFE4004FC85B /* StatisticsView.xib in Resources */, |
| | | 1845C440209C562D009C639B /* COPYING in Resources */, |
| | | 2D15471822B788B9006B8A81 /* SpreadGDDetailTableViewCell.xib in Resources */, |
| | |
| | | 2D15471322B78793006B8A81 /* SpreadGoodsHeaderTableViewCell.m in Sources */, |
| | | 2D12208122EA9A5700D03A87 /* JDGoodsListShowController.m in Sources */, |
| | | 1845C45A209C562D009C639B /* ZXGeoParsedResult.m in Sources */, |
| | | 2D2B3AE121CC777A00F77F60 /* NewOrderTopCell.m in Sources */, |
| | | 2D138C572236401D0071D71C /* MQMessageFormInputView.m in Sources */, |
| | | 1845C512209C562E009C639B /* ZXQRCode.m in Sources */, |
| | | 2D33CF182272DCEF001ADD06 /* BrandRebateDetailTwoCell.m in Sources */, |
| | |
| | | 2D75D3D421ABD055004AED42 /* UIView+AZGradient.m in Sources */, |
| | | 2D138BF62236401D0071D71C /* MQEventMessageFactory.m in Sources */, |
| | | 2D0BDCE821C0F799009F5858 /* ShareRecordgoodsModel.m in Sources */, |
| | | 0D2B9A4A248609B0008393FE /* OrderTitleCell.m in Sources */, |
| | | 2D0FAA0A21B66562001F12A6 /* SingleFigureShareController.m in Sources */, |
| | | 0DDEA0522422147700A1DACE /* MineOneVIew.m in Sources */, |
| | | 2D78347B215CBEB300D72B3F /* NewGoodsShareView.m in Sources */, |
| | |
| | | 1845C4AF209C562E009C639B /* ZXMaxiCodeReader.m in Sources */, |
| | | 18966CA720AD7F6A004CD297 /* GDDetailTableViewCell.m in Sources */, |
| | | 2D11E82522488CBC00298555 /* WINCopyLabel.m in Sources */, |
| | | 0D4C500B24874484002E5841 /* WPHGoodsListShowController.m in Sources */, |
| | | 2D138C302236401D0071D71C /* MQPreChatFormViewModel.m in Sources */, |
| | | 1845C4F0209C562E009C639B /* ZXPDF417CodewordDecoder.m in Sources */, |
| | | 2D0A91A121AFBEDD0001AA13 /* MineTeamModel.m in Sources */, |
| | |
| | | 2DB8DAA121241CAE0034CD7C /* InviteOneCell.m in Sources */, |
| | | 2D138C0C2236401D0071D71C /* MQImageMessageCell.m in Sources */, |
| | | 2D138BFE2236401D0071D71C /* MQBotMenuAnswerCellModel.m in Sources */, |
| | | 0D4C500C24874484002E5841 /* WPHGoodsListController.m in Sources */, |
| | | 18D9541A20AE705C005D5D02 /* FeignGoodsDetaiViewController.m in Sources */, |
| | | 2D22585321E97B3E00A6E182 /* ThirdClassificationCell.m in Sources */, |
| | | 1845C4A1209C562E009C639B /* ZXDataMatrixDefaultPlacement.m in Sources */, |
| | |
| | | 1845C4E5209C562E009C639B /* ZXUPCEANExtensionSupport.m in Sources */, |
| | | 2DB5ED4623851769009B498C /* CreatShareModel.m in Sources */, |
| | | 2D57D8AB213CD87C00DCF8D1 /* HZWaitingView.m in Sources */, |
| | | 0D81C2C02488D77A00BE8E8B /* SearchDetailFilterSNView.m in Sources */, |
| | | 2D1ACC30221A8D12007A6304 /* RewardCouponsView.m in Sources */, |
| | | 2DC86F1B21CB8CDD00AABF53 /* OrderCellBottomView.m in Sources */, |
| | | 2D243D29228032E90093F1E8 /* InvoteMaterialListController.m in Sources */, |
| | |
| | | 1845C47B209C562D009C639B /* ZXReedSolomonEncoder.m in Sources */, |
| | | 2D5332E42154C51D00215FBE /* UIViewController+ControllerValue.m in Sources */, |
| | | 2D1AA11122DC115F0041B33E /* GoodsDetailBaseModel.m in Sources */, |
| | | 0D4C501224874733002E5841 /* SNGoodsListShowController.m in Sources */, |
| | | 2DC70BC8217D649E00F7F0B2 /* SJDynamicShareView.m in Sources */, |
| | | 18E5AE091E5EC9ED009F85E0 /* SettingTypeThreeTableViewCell.m in Sources */, |
| | | 1845C4A9209C562E009C639B /* ZXDataMatrixX12Encoder.m in Sources */, |
| | |
| | | 18360AFD206CBB3400F9EAB1 /* MinMessDetailViewController.m in Sources */, |
| | | 2D2C62BF22F4283100A624F3 /* RecommendHeaderView.m in Sources */, |
| | | 2D097409230E8EC700ADE6CB /* ExchangeInvitationCodeController.m in Sources */, |
| | | 0D4C501124874733002E5841 /* SNGoodsListController.m in Sources */, |
| | | ); |
| | | runOnlyForDeploymentPostprocessing = 0; |
| | | }; |
| | |
| | | "$(PROJECT_DIR)/MIduo/æ°æ®/lib/Debug-iphoneos", |
| | | "$(PROJECT_DIR)/MIduo/æ°æ®/lib/GPUImage", |
| | | "$(PROJECT_DIR)/MIduo/æ°æ®/lib/MQ/MQChatViewController/Vendors/MLAudioRecorder/amr_en_de/lib", |
| | | "$(PROJECT_DIR)/MIduo/æ°æ®/lib/GDT/lib", |
| | | ); |
| | | MARKETING_VERSION = 2.1.11; |
| | | MiSDKRun = debug; |
| | |
| | | "$(PROJECT_DIR)/MIduo/æ°æ®/lib/Debug-iphoneos", |
| | | "$(PROJECT_DIR)/MIduo/æ°æ®/lib/GPUImage", |
| | | "$(PROJECT_DIR)/MIduo/æ°æ®/lib/MQ/MQChatViewController/Vendors/MLAudioRecorder/amr_en_de/lib", |
| | | "$(PROJECT_DIR)/MIduo/æ°æ®/lib/GDT/lib", |
| | | ); |
| | | MARKETING_VERSION = 2.1.11; |
| | | MiSDKRun = online; |
| | |
| | | uuid = "EBEC4496-CFBF-4843-90D2-86B46B99BA17" |
| | | type = "0" |
| | | version = "2.0"> |
| | | <Breakpoints> |
| | | <BreakpointProxy |
| | | BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint"> |
| | | <BreakpointContent |
| | | uuid = "E2C14DAB-2F92-4766-955E-E7ADE8AA22B3" |
| | | shouldBeEnabled = "Yes" |
| | | ignoreCount = "0" |
| | | continueAfterRunningActions = "No" |
| | | scope = "1" |
| | | stopOnStyle = "0"> |
| | | </BreakpointContent> |
| | | </BreakpointProxy> |
| | | <BreakpointProxy |
| | | BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> |
| | | <BreakpointContent |
| | | uuid = "2042A6D5-29F5-400C-92D6-0D9E27430C17" |
| | | shouldBeEnabled = "No" |
| | | ignoreCount = "0" |
| | | continueAfterRunningActions = "No" |
| | | filePath = "MIduo/界面/我的/MineViewController.m" |
| | | startingColumnNumber = "9223372036854775807" |
| | | endingColumnNumber = "9223372036854775807" |
| | | startingLineNumber = "1484" |
| | | endingLineNumber = "1484" |
| | | landmarkName = "-tableView:cellForRowAtIndexPath:" |
| | | landmarkType = "7"> |
| | | </BreakpointContent> |
| | | </BreakpointProxy> |
| | | <BreakpointProxy |
| | | BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> |
| | | <BreakpointContent |
| | | uuid = "9A07D366-6B50-4B00-9423-93792FB5AE8C" |
| | | shouldBeEnabled = "No" |
| | | ignoreCount = "0" |
| | | continueAfterRunningActions = "No" |
| | | filePath = "MIduo/界面/我的/MineViewController.m" |
| | | startingColumnNumber = "9223372036854775807" |
| | | endingColumnNumber = "9223372036854775807" |
| | | startingLineNumber = "1494" |
| | | endingLineNumber = "1494" |
| | | landmarkName = "-tableView:cellForRowAtIndexPath:" |
| | | landmarkType = "7"> |
| | | </BreakpointContent> |
| | | </BreakpointProxy> |
| | | <BreakpointProxy |
| | | BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> |
| | | <BreakpointContent |
| | | uuid = "73AE1804-14F4-46A2-90BD-572E6222C906" |
| | | shouldBeEnabled = "Yes" |
| | | ignoreCount = "0" |
| | | continueAfterRunningActions = "No" |
| | | filePath = "MIduo/界面/我的/MineViewController.m" |
| | | startingColumnNumber = "9223372036854775807" |
| | | endingColumnNumber = "9223372036854775807" |
| | | startingLineNumber = "1518" |
| | | endingLineNumber = "1518" |
| | | landmarkName = "-tableView:cellForRowAtIndexPath:" |
| | | landmarkType = "7"> |
| | | </BreakpointContent> |
| | | </BreakpointProxy> |
| | | <BreakpointProxy |
| | | BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> |
| | | <BreakpointContent |
| | | uuid = "6911A32A-C21A-4D58-A8B8-53A08F102ABF" |
| | | shouldBeEnabled = "No" |
| | | ignoreCount = "0" |
| | | continueAfterRunningActions = "No" |
| | | filePath = "MIduo/界面/我的/MineViewController.m" |
| | | startingColumnNumber = "9223372036854775807" |
| | | endingColumnNumber = "9223372036854775807" |
| | | startingLineNumber = "1806" |
| | | endingLineNumber = "1806" |
| | | landmarkName = "-tableView:heightForRowAtIndexPath:" |
| | | landmarkType = "7"> |
| | | </BreakpointContent> |
| | | </BreakpointProxy> |
| | | <BreakpointProxy |
| | | BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> |
| | | <BreakpointContent |
| | | uuid = "B20F5484-4AEE-4E8E-841D-56C19BA7860B" |
| | | shouldBeEnabled = "No" |
| | | ignoreCount = "0" |
| | | continueAfterRunningActions = "No" |
| | | filePath = "MIduo/界面/我的/MineViewController.m" |
| | | startingColumnNumber = "9223372036854775807" |
| | | endingColumnNumber = "9223372036854775807" |
| | | startingLineNumber = "1807" |
| | | endingLineNumber = "1807" |
| | | landmarkName = "-tableView:heightForRowAtIndexPath:" |
| | | landmarkType = "7"> |
| | | </BreakpointContent> |
| | | </BreakpointProxy> |
| | | <BreakpointProxy |
| | | BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> |
| | | <BreakpointContent |
| | | uuid = "1F3B03CE-DD1B-462A-A21D-37AE929B75B5" |
| | | shouldBeEnabled = "Yes" |
| | | ignoreCount = "0" |
| | | continueAfterRunningActions = "No" |
| | | filePath = "MIduo/界面/我的/MyTeam/TeamSearch/TeamSearchFirstController.m" |
| | | startingColumnNumber = "9223372036854775807" |
| | | endingColumnNumber = "9223372036854775807" |
| | | startingLineNumber = "154" |
| | | endingLineNumber = "154" |
| | | landmarkName = "-loadDataSource:" |
| | | landmarkType = "7"> |
| | | </BreakpointContent> |
| | | </BreakpointProxy> |
| | | <BreakpointProxy |
| | | BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> |
| | | <BreakpointContent |
| | | uuid = "D07D8A82-EAAF-4C52-9F0F-EC9EF903972D" |
| | | shouldBeEnabled = "Yes" |
| | | ignoreCount = "0" |
| | | continueAfterRunningActions = "No" |
| | | filePath = "MIduo/数据/ALWebView/ShonpingShareViewController.m" |
| | | startingColumnNumber = "9223372036854775807" |
| | | endingColumnNumber = "9223372036854775807" |
| | | startingLineNumber = "1237" |
| | | endingLineNumber = "1237" |
| | | landmarkName = "-webView:decidePolicyForNavigationAction:decisionHandler:" |
| | | landmarkType = "7"> |
| | | </BreakpointContent> |
| | | </BreakpointProxy> |
| | | <BreakpointProxy |
| | | BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> |
| | | <BreakpointContent |
| | | uuid = "0AC59403-C0FD-485A-9AA3-E89ED7E1E243" |
| | | shouldBeEnabled = "Yes" |
| | | ignoreCount = "0" |
| | | continueAfterRunningActions = "No" |
| | | filePath = "MIduo/数据/ALWebView/ShonpingShareViewController.m" |
| | | startingColumnNumber = "9223372036854775807" |
| | | endingColumnNumber = "9223372036854775807" |
| | | startingLineNumber = "1254" |
| | | endingLineNumber = "1254" |
| | | landmarkName = "-webView:decidePolicyForNavigationAction:decisionHandler:" |
| | | landmarkType = "7"> |
| | | </BreakpointContent> |
| | | </BreakpointProxy> |
| | | <BreakpointProxy |
| | | BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> |
| | | <BreakpointContent |
| | | uuid = "EA002B50-BD55-4F55-AA49-313BA0A3AE1F" |
| | | shouldBeEnabled = "Yes" |
| | | ignoreCount = "0" |
| | | continueAfterRunningActions = "No" |
| | | filePath = "MIduo/数据/ALWebView/ShonpingShareViewController.m" |
| | | startingColumnNumber = "9223372036854775807" |
| | | endingColumnNumber = "9223372036854775807" |
| | | startingLineNumber = "1246" |
| | | endingLineNumber = "1246" |
| | | landmarkName = "-webView:decidePolicyForNavigationAction:decisionHandler:" |
| | | landmarkType = "7"> |
| | | </BreakpointContent> |
| | | </BreakpointProxy> |
| | | <BreakpointProxy |
| | | BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> |
| | | <BreakpointContent |
| | | uuid = "691A85CE-3137-4DFB-AFF4-8A63E18D96E7" |
| | | shouldBeEnabled = "Yes" |
| | | ignoreCount = "0" |
| | | continueAfterRunningActions = "No" |
| | | filePath = "MIduo/数据/ALWebView/ShonpingShareViewController.m" |
| | | startingColumnNumber = "9223372036854775807" |
| | | endingColumnNumber = "9223372036854775807" |
| | | startingLineNumber = "1229" |
| | | endingLineNumber = "1229" |
| | | landmarkName = "-webView:decidePolicyForNavigationAction:decisionHandler:" |
| | | landmarkType = "7"> |
| | | </BreakpointContent> |
| | | </BreakpointProxy> |
| | | <BreakpointProxy |
| | | BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> |
| | | <BreakpointContent |
| | | uuid = "8366C1DA-5AB2-419F-942D-A090755A6512" |
| | | shouldBeEnabled = "Yes" |
| | | ignoreCount = "0" |
| | | continueAfterRunningActions = "No" |
| | | filePath = "MIduo/数据/lib/CZBWebManager/CZBInfoManager.m" |
| | | startingColumnNumber = "9223372036854775807" |
| | | endingColumnNumber = "9223372036854775807" |
| | | startingLineNumber = "66" |
| | | endingLineNumber = "66" |
| | | landmarkName = "-userContentController:didReceiveScriptMessage:" |
| | | landmarkType = "7"> |
| | | </BreakpointContent> |
| | | </BreakpointProxy> |
| | | </Breakpoints> |
| | | </Bucket> |
| | |
| | | #import <JDSDK/JDKeplerSDK.h> |
| | | #import <IQKeyboardManager/IQKeyboardManager.h> |
| | | |
| | | #import <GDTSDKConfig.h> |
| | | #import "GDTSDKConfig.h" |
| | | #import "GDTSplashAd.h" |
| | | |
| | | @interface AppDelegate ()<UNUserNotificationCenterDelegate,UITabBarControllerDelegate,WXApiDelegate, InviteValidationViewDelegate> |
| | | @interface AppDelegate ()<UNUserNotificationCenterDelegate,UITabBarControllerDelegate,WXApiDelegate, |
| | | InviteValidationViewDelegate, GDTSplashAdDelegate> |
| | | |
| | | @property (nonatomic,strong)UITabBarController *tabBarController; |
| | | |
| | | @property (nonatomic, nullable, strong) XHTabBarController *tabbar; |
| | |
| | | @property (nonatomic, nullable, strong) InviteValidationView *inviteValidationView; |
| | | |
| | | @property (nonatomic, nullable, strong) NSString *wxKey; |
| | | |
| | | @property (strong, nonatomic) GDTSplashAd *splash; |
| | | @property (retain, nonatomic) UIView *bottomView; |
| | | |
| | | @property (nonatomic, assign) BOOL isSplash; |
| | | |
| | | @end |
| | | |
| | |
| | | // é¿éç¾å· |
| | | [self setAliTrade]; |
| | | [self setJDConfig]; |
| | | [self registerGDT]; |
| | | // 微信ç»å½ |
| | | [self WeiXinChatLogin]; |
| | | // meiqie |
| | |
| | | [self Configuration]; |
| | | // åç |
| | | [self setUmeng]; |
| | | |
| | | [self fetchSplashShow]; |
| | | |
| | | [self isJumpTaobao]; |
| | | |
| | |
| | | } |
| | | //注å广ç¹é |
| | | - (void)registerGDT { |
| | | // BOOL result = [GDTSDKConfig registerAppId:kGDTMobSDKAppId]; |
| | | // if (result) { |
| | | // NSLog(@"注åæå"); |
| | | // } |
| | | BOOL result = [GDTSDKConfig registerAppId:@"1110527348"]; |
| | | if (result) { |
| | | |
| | | } |
| | | } |
| | | |
| | | - (void)configureAppirater { |
| | |
| | | // [[UIApplication sharedApplication] openURL:[NSURL URLWithString:nsStringToOpen]]; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | - (void)fetchSplashShow { |
| | | NSMutableDictionary *params = [[NSMutableDictionary alloc] init]; |
| | | if ([ALUserInfoServiceManger fetchUID]) { |
| | | [params setObject:[ALUserInfoServiceManger fetchUID] forKey:@"uid"]; |
| | | } |
| | | @weakify(self) |
| | | [[ALNetWorking startInterface] Post:[NSString stringWithFormat:@"%@/%@",domainHTTP2, @"config/getShowAd"] param:params timeOut:3 success:^(NSDictionary *object) { |
| | | @strongify(self) |
| | | @weakify(self) |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | @strongify(self) |
| | | if (object && ![object isEqual:[NSNull null]]) { |
| | | self.isSplash = [object[@"data"][@"show"] boolValue]; |
| | | } |
| | | }); |
| | | |
| | | } fail:^(id object) { |
| | | |
| | | }]; |
| | | } |
| | | |
| | | - (void)setupHomeNavData { |
| | |
| | | } fail:^(id object) {}]; |
| | | } |
| | | |
| | | - (void)splashAdSuccessPresentScreen:(GDTSplashAd *)splashAd{ |
| | | [YTHsharedManger startManger].isShowSplash = YES; |
| | | } |
| | | |
| | | /** |
| | | * å¼å±å¹¿åç´ æå è½½æå |
| | | */ |
| | | - (void)splashAdDidLoad:(GDTSplashAd *)splashAd{ |
| | | [YTHsharedManger startManger].isShowSplash = YES; |
| | | } |
| | | |
| | | -(void)splashAdClicked:(GDTSplashAd *)splashAd { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * å¼å±å¹¿åå±ç¤ºå¤±è´¥ |
| | | */ |
| | | - (void)splashAdFailToPresent:(GDTSplashAd *)splashAd withError:(NSError *)error { |
| | | [YTHsharedManger startManger].isShowSplash = NO; |
| | | if (![self isFirstSpaceClosed]) { |
| | | [[NSNotificationCenter defaultCenter] postNotificationName:@"splashAdClosed" object:nil]; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å¼å±å¹¿åå
³éåè° |
| | | */ |
| | | - (void)splashAdClosed:(GDTSplashAd *)splashAd { |
| | | [YTHsharedManger startManger].isShowSplash = NO; |
| | | if (![self isFirstSpaceClosed]) { |
| | | [[NSNotificationCenter defaultCenter] postNotificationName:@"splashAdClosed" object:nil]; |
| | | } |
| | | } |
| | | |
| | | - (BOOL)isFirstSpaceClosed { |
| | | //è·åå½åçæ¬å· |
| | | NSDictionary *infoDic = [[NSBundle mainBundle] infoDictionary]; |
| | | NSString *currentAppVersion = infoDic[@"CFBundleShortVersionString"]; |
| | | //è·å䏿¬¡å¯å¨åºç¨ä¿åçappVersion |
| | | NSString *version = [[NSUserDefaults standardUserDefaults] objectForKey:@"isFirstSpaceClosed"]; |
| | | //çæ¬å级æé¦æ¬¡ç»å½ |
| | | if (version == nil || ![version isEqualToString:currentAppVersion]) { |
| | | [[NSUserDefaults standardUserDefaults] setObject:currentAppVersion forKey:@"isFirstSpaceClosed"]; |
| | | [[NSUserDefaults standardUserDefaults] synchronize]; |
| | | return YES; |
| | | |
| | | } else { |
| | | return NO; |
| | | } |
| | | } |
| | | |
| | | - (BOOL)isFirstPopSplash { |
| | | //è·åå½åçæ¬å· |
| | | NSDictionary *infoDic = [[NSBundle mainBundle] infoDictionary]; |
| | | NSString *currentAppVersion = infoDic[@"CFBundleShortVersionString"]; |
| | | //è·å䏿¬¡å¯å¨åºç¨ä¿åçappVersion |
| | | NSString *version = [[NSUserDefaults standardUserDefaults] objectForKey:@"isFirstPopSplash"]; |
| | | //çæ¬å级æé¦æ¬¡ç»å½ |
| | | if (version == nil || ![version isEqualToString:currentAppVersion]) { |
| | | [[NSUserDefaults standardUserDefaults] setObject:currentAppVersion forKey:@"isFirstPopSplash"]; |
| | | [[NSUserDefaults standardUserDefaults] synchronize]; |
| | | return YES; |
| | | |
| | | } else { |
| | | return NO; |
| | | } |
| | | } |
| | | |
| | | - (void)loadViewsWithBor:(BOOL)bor { |
| | | |
| | | NSArray *controllerArray = @[@"NEWHomeViewController",@"DynamicViewMainController",@"BrandRebateMainController",@"MessageMainController",@"NewMineController"]; |
| | | //titleæ°ç» |
| | | NSArray *titleArray = @[@"é¦é¡µ",@"卿",@"åçè¿å©",@"æ¶æ¯",@"æç"]; |
| | |
| | | |
| | | [LaunchIntroductionView sharedWithImages:@[@"launchIntroduction_guidepage_one",@"launchIntroduction_guidepage_two",@"launchIntroduction_guidepage_three"] buttonImage:nil buttonFrame:CGRectMake((SCREEN_WIDTH-roundf(140.0/375.0*SCREEN_WIDTH))/2,SCREEN_HEIGHT - (((IS_IPHONE_X)?53:33)+40), roundf(140.0/375.0*SCREEN_WIDTH), 40)]; |
| | | |
| | | if (![self isFirstPopSplash] && _isSplash) { |
| | | [self loadAd]; |
| | | } |
| | | |
| | | NSDictionary *dic = [[NSUserDefaults standardUserDefaults] objectForKey:@"messageRedPoint"]; |
| | | if (dic) { |
| | | if(![NSNumber numberWithInteger:[dic[@"redPoindt"] integerValue]].boolValue){ |
| | |
| | | } |
| | | } |
| | | |
| | | - (void)loadAd { |
| | | self.splash = [[GDTSplashAd alloc] initWithPlacementId:@"8051816313522939"]; |
| | | _splash.delegate = self;//设置代ç |
| | | |
| | | UIImageView *imageview = [[UIImageView alloc] init]; |
| | | imageview.image = [UIImage imageNamed:@"splash_logo"]; |
| | | |
| | | CGFloat viewHeight = 0.0; |
| | | |
| | | if (SCREEN_WIDTH == 375.0f) { |
| | | UIImage *image = [UIImage imageNamed:@"splash_s"]; |
| | | _splash.backgroundImage = image; |
| | | |
| | | viewHeight = 100; |
| | | |
| | | } else { |
| | | UIImage *image = [UIImage imageNamed:@"splash_ps"]; |
| | | _splash.backgroundImage = image; |
| | | |
| | | viewHeight = 100; |
| | | } |
| | | if (IS_IPHONE_X) { |
| | | UIImage *image = [UIImage imageNamed:@"splash_x"]; |
| | | _splash.backgroundImage = image; |
| | | |
| | | viewHeight = 105; |
| | | } |
| | | _splash.fetchDelay = 5; //å¼å±æåçæ¶é´ï¼è¶
æ¶åæ¾å¼å±ç¤º |
| | | |
| | | |
| | | _bottomView = [[UIView alloc]initWithFrame:CGRectMake(0, SCREEN_HEIGHT - viewHeight, SCREEN_WIDTH, viewHeight)]; |
| | | [_bottomView addSubview:imageview]; |
| | | |
| | | UILabel *label = [[UILabel alloc] init]; |
| | | label.text = @"Copyright © 2020 éåºå¿«çç§ææéå
¬å¸"; |
| | | label.textColor = UICOLOR_FROM_RGB(0xFF1753, 1.0); |
| | | label.textAlignment = NSTextAlignmentCenter; |
| | | label.font = [UIFont systemFontOfSize:10]; |
| | | [_bottomView addSubview:label]; |
| | | |
| | | imageview.sd_layout.centerXEqualToView(_bottomView).topSpaceToView(_bottomView,24).widthIs(130).heightIs(33.5); |
| | | |
| | | label.sd_layout.centerXEqualToView(_bottomView).topSpaceToView(imageview,17.5).widthIs(200).heightIs(11); |
| | | |
| | | _bottomView.backgroundColor = [UIColor whiteColor]; |
| | | |
| | | UIView *loadView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, viewHeight)]; |
| | | loadView.backgroundColor = [UIColor clearColor]; |
| | | |
| | | [_splash loadAdAndShowInWindow:self.window withBottomView:_bottomView]; |
| | | } |
| | | |
| | | - (void)setupSuspensionView { |
| | | static dispatch_once_t onceToken; |
| | | dispatch_once(&onceToken, ^{ |
| | |
| | | { |
| | | "images" : [ |
| | | { |
| | | "size" : "20x20", |
| | | "idiom" : "iphone", |
| | | "filename" : "icon-20@2x.png", |
| | | "scale" : "2x" |
| | | "idiom" : "iphone", |
| | | "scale" : "2x", |
| | | "size" : "20x20" |
| | | }, |
| | | { |
| | | "size" : "20x20", |
| | | "idiom" : "iphone", |
| | | "filename" : "icon-20@3x.png", |
| | | "scale" : "3x" |
| | | "idiom" : "iphone", |
| | | "scale" : "3x", |
| | | "size" : "20x20" |
| | | }, |
| | | { |
| | | "size" : "29x29", |
| | | "idiom" : "iphone", |
| | | "filename" : "icon-29.png", |
| | | "scale" : "1x" |
| | | "idiom" : "iphone", |
| | | "scale" : "1x", |
| | | "size" : "29x29" |
| | | }, |
| | | { |
| | | "size" : "29x29", |
| | | "idiom" : "iphone", |
| | | "filename" : "icon-29@2x.png", |
| | | "scale" : "2x" |
| | | "idiom" : "iphone", |
| | | "scale" : "2x", |
| | | "size" : "29x29" |
| | | }, |
| | | { |
| | | "size" : "29x29", |
| | | "idiom" : "iphone", |
| | | "filename" : "icon-29@3x.png", |
| | | "scale" : "3x" |
| | | "idiom" : "iphone", |
| | | "scale" : "3x", |
| | | "size" : "29x29" |
| | | }, |
| | | { |
| | | "size" : "40x40", |
| | | "idiom" : "iphone", |
| | | "filename" : "icon-40@2x.png", |
| | | "scale" : "2x" |
| | | "idiom" : "iphone", |
| | | "scale" : "2x", |
| | | "size" : "40x40" |
| | | }, |
| | | { |
| | | "size" : "40x40", |
| | | "idiom" : "iphone", |
| | | "filename" : "icon-40@3x.png", |
| | | "scale" : "3x" |
| | | "idiom" : "iphone", |
| | | "scale" : "3x", |
| | | "size" : "40x40" |
| | | }, |
| | | { |
| | | "size" : "57x57", |
| | | "idiom" : "iphone", |
| | | "filename" : "icon-57.png", |
| | | "scale" : "1x" |
| | | "idiom" : "iphone", |
| | | "scale" : "1x", |
| | | "size" : "57x57" |
| | | }, |
| | | { |
| | | "size" : "57x57", |
| | | "idiom" : "iphone", |
| | | "filename" : "icon-57@2x.png", |
| | | "scale" : "2x" |
| | | "idiom" : "iphone", |
| | | "scale" : "2x", |
| | | "size" : "57x57" |
| | | }, |
| | | { |
| | | "size" : "60x60", |
| | | "idiom" : "iphone", |
| | | "filename" : "icon-60@2x.png", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "size" : "60x60", |
| | | "idiom" : "iphone", |
| | | "filename" : "icon-60@3x.png", |
| | | "scale" : "3x" |
| | | "scale" : "2x", |
| | | "size" : "60x60" |
| | | }, |
| | | { |
| | | "size" : "1024x1024", |
| | | "idiom" : "ios-marketing", |
| | | "filename" : "icon-60@3x.png", |
| | | "idiom" : "iphone", |
| | | "scale" : "3x", |
| | | "size" : "60x60" |
| | | }, |
| | | { |
| | | "filename" : "icon-1024.png", |
| | | "scale" : "1x" |
| | | "idiom" : "ios-marketing", |
| | | "scale" : "1x", |
| | | "size" : "1024x1024" |
| | | } |
| | | ], |
| | | "info" : { |
| | | "version" : 1, |
| | | "author" : "xcode" |
| | | "author" : "xcode", |
| | | "version" : 1 |
| | | } |
| | | } |
| | | } |
| | |
| | | "images" : [ |
| | | { |
| | | "extent" : "full-screen", |
| | | "filename" : "å¯å¨å¾1125x2436@2x.png", |
| | | "idiom" : "iphone", |
| | | "subtype" : "2436h", |
| | | "filename" : "å¯å¨å¾ 1125x2436 æ·è´@2x.png", |
| | | "minimum-system-version" : "11.0", |
| | | "orientation" : "portrait", |
| | | "scale" : "3x" |
| | | "scale" : "3x", |
| | | "subtype" : "2436h" |
| | | }, |
| | | { |
| | | "orientation" : "landscape", |
| | | "idiom" : "iphone", |
| | | "extent" : "full-screen", |
| | | "idiom" : "iphone", |
| | | "minimum-system-version" : "11.0", |
| | | "subtype" : "2436h", |
| | | "scale" : "3x" |
| | | "orientation" : "landscape", |
| | | "scale" : "3x", |
| | | "subtype" : "2436h" |
| | | }, |
| | | { |
| | | "extent" : "full-screen", |
| | | "filename" : "å¯å¨å¾1242x2208@2x.png", |
| | | "idiom" : "iphone", |
| | | "subtype" : "736h", |
| | | "filename" : "å¯å¨å¾ 1242x2208 æ·è´@2x.png", |
| | | "minimum-system-version" : "8.0", |
| | | "orientation" : "portrait", |
| | | "scale" : "3x" |
| | | "scale" : "3x", |
| | | "subtype" : "736h" |
| | | }, |
| | | { |
| | | "orientation" : "landscape", |
| | | "idiom" : "iphone", |
| | | "extent" : "full-screen", |
| | | "idiom" : "iphone", |
| | | "minimum-system-version" : "8.0", |
| | | "subtype" : "736h", |
| | | "scale" : "3x" |
| | | "orientation" : "landscape", |
| | | "scale" : "3x", |
| | | "subtype" : "736h" |
| | | }, |
| | | { |
| | | "extent" : "full-screen", |
| | | "filename" : "å¯å¨å¾750x1334@2x.png", |
| | | "idiom" : "iphone", |
| | | "subtype" : "667h", |
| | | "filename" : "å¯å¨å¾ 750x1334 æ·è´@2x.png", |
| | | "minimum-system-version" : "8.0", |
| | | "orientation" : "portrait", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "orientation" : "portrait", |
| | | "idiom" : "iphone", |
| | | "extent" : "full-screen", |
| | | "minimum-system-version" : "7.0", |
| | | "scale" : "2x" |
| | | "scale" : "2x", |
| | | "subtype" : "667h" |
| | | }, |
| | | { |
| | | "extent" : "full-screen", |
| | | "idiom" : "iphone", |
| | | "subtype" : "retina4", |
| | | "filename" : "å¯å¨å¾ 640x1136 æ·è´@2x.png", |
| | | "minimum-system-version" : "7.0", |
| | | "orientation" : "portrait", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "extent" : "full-screen", |
| | | "filename" : "å¯å¨å¾640x1136@2x.png", |
| | | "idiom" : "iphone", |
| | | "minimum-system-version" : "7.0", |
| | | "orientation" : "portrait", |
| | | "scale" : "2x", |
| | | "subtype" : "retina4" |
| | | }, |
| | | { |
| | | "extent" : "full-screen", |
| | | "idiom" : "ipad", |
| | | "extent" : "full-screen", |
| | | "minimum-system-version" : "7.0", |
| | | "orientation" : "portrait", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "extent" : "full-screen", |
| | | "idiom" : "ipad", |
| | | "minimum-system-version" : "7.0", |
| | | "orientation" : "landscape", |
| | | "idiom" : "ipad", |
| | | "extent" : "full-screen", |
| | | "minimum-system-version" : "7.0", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "orientation" : "portrait", |
| | | "idiom" : "ipad", |
| | | "extent" : "full-screen", |
| | | "idiom" : "ipad", |
| | | "minimum-system-version" : "7.0", |
| | | "orientation" : "portrait", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "extent" : "full-screen", |
| | | "idiom" : "ipad", |
| | | "minimum-system-version" : "7.0", |
| | | "orientation" : "landscape", |
| | | "idiom" : "ipad", |
| | | "extent" : "full-screen", |
| | | "minimum-system-version" : "7.0", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "orientation" : "portrait", |
| | | "idiom" : "iphone", |
| | | "extent" : "full-screen", |
| | | "idiom" : "iphone", |
| | | "orientation" : "portrait", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "orientation" : "portrait", |
| | | "idiom" : "iphone", |
| | | "extent" : "full-screen", |
| | | "idiom" : "iphone", |
| | | "orientation" : "portrait", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "orientation" : "portrait", |
| | | "idiom" : "iphone", |
| | | "extent" : "full-screen", |
| | | "subtype" : "retina4", |
| | | "scale" : "2x" |
| | | "idiom" : "iphone", |
| | | "orientation" : "portrait", |
| | | "scale" : "2x", |
| | | "subtype" : "retina4" |
| | | }, |
| | | { |
| | | "orientation" : "portrait", |
| | | "idiom" : "ipad", |
| | | "extent" : "to-status-bar", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "idiom" : "ipad", |
| | | "orientation" : "portrait", |
| | | "idiom" : "ipad", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "extent" : "full-screen", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "orientation" : "landscape", |
| | | "idiom" : "ipad", |
| | | "extent" : "to-status-bar", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "orientation" : "landscape", |
| | | "idiom" : "ipad", |
| | | "extent" : "full-screen", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "orientation" : "portrait", |
| | | "idiom" : "ipad", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "extent" : "to-status-bar", |
| | | "idiom" : "ipad", |
| | | "orientation" : "landscape", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "extent" : "full-screen", |
| | | "idiom" : "ipad", |
| | | "orientation" : "landscape", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "extent" : "to-status-bar", |
| | | "idiom" : "ipad", |
| | | "orientation" : "portrait", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "extent" : "full-screen", |
| | | "idiom" : "ipad", |
| | | "orientation" : "portrait", |
| | | "idiom" : "ipad", |
| | | "extent" : "full-screen", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "orientation" : "landscape", |
| | | "idiom" : "ipad", |
| | | "extent" : "to-status-bar", |
| | | "idiom" : "ipad", |
| | | "orientation" : "landscape", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "orientation" : "landscape", |
| | | "idiom" : "ipad", |
| | | "extent" : "full-screen", |
| | | "idiom" : "ipad", |
| | | "orientation" : "landscape", |
| | | "scale" : "2x" |
| | | } |
| | | ], |
| | | "info" : { |
| | | "version" : 1, |
| | | "author" : "xcode" |
| | | "author" : "xcode", |
| | | "version" : 1 |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | { |
| | | "images" : [ |
| | | { |
| | | "idiom" : "universal", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "filename" : "splash_logo@2x.png", |
| | | "idiom" : "universal", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "filename" : "splash_logo@3x.png", |
| | | "idiom" : "universal", |
| | | "scale" : "3x" |
| | | } |
| | | ], |
| | | "info" : { |
| | | "author" : "xcode", |
| | | "version" : 1 |
| | | } |
| | | } |
New file |
| | |
| | | { |
| | | "images" : [ |
| | | { |
| | | "idiom" : "universal", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "filename" : "splash_ps.png", |
| | | "idiom" : "universal", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "idiom" : "universal", |
| | | "scale" : "3x" |
| | | } |
| | | ], |
| | | "info" : { |
| | | "author" : "xcode", |
| | | "version" : 1 |
| | | } |
| | | } |
New file |
| | |
| | | { |
| | | "images" : [ |
| | | { |
| | | "idiom" : "universal", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "filename" : "splash_s.png", |
| | | "idiom" : "universal", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "idiom" : "universal", |
| | | "scale" : "3x" |
| | | } |
| | | ], |
| | | "info" : { |
| | | "author" : "xcode", |
| | | "version" : 1 |
| | | } |
| | | } |
New file |
| | |
| | | { |
| | | "images" : [ |
| | | { |
| | | "idiom" : "universal", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "filename" : "splash_x.png", |
| | | "idiom" : "universal", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "idiom" : "universal", |
| | | "scale" : "3x" |
| | | } |
| | | ], |
| | | "info" : { |
| | | "author" : "xcode", |
| | | "version" : 1 |
| | | } |
| | | } |
New file |
| | |
| | | { |
| | | "images" : [ |
| | | { |
| | | "idiom" : "universal", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "filename" : "order_complaint_sn@2x.png", |
| | | "idiom" : "universal", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "filename" : "order_complaint_sn@3x.png", |
| | | "idiom" : "universal", |
| | | "scale" : "3x" |
| | | } |
| | | ], |
| | | "info" : { |
| | | "author" : "xcode", |
| | | "version" : 1 |
| | | } |
| | | } |
New file |
| | |
| | | { |
| | | "images" : [ |
| | | { |
| | | "idiom" : "universal", |
| | | "scale" : "1x" |
| | | }, |
| | | { |
| | | "filename" : "order_complaint_wph@2x.png", |
| | | "idiom" : "universal", |
| | | "scale" : "2x" |
| | | }, |
| | | { |
| | | "filename" : "order_complaint_wph@3x.png", |
| | | "idiom" : "universal", |
| | | "scale" : "3x" |
| | | } |
| | | ], |
| | | "info" : { |
| | | "author" : "xcode", |
| | | "version" : 1 |
| | | } |
| | | } |
| | |
| | | <string>baidumap</string> |
| | | <string>iosamap</string> |
| | | <string>qqmap</string> |
| | | <string>suning</string> |
| | | <string>vipshop</string> |
| | | </array> |
| | | <key>LSRequiresIPhoneOS</key> |
| | | <true/> |
| | |
| | | |
| | | @property (nonatomic, copy) NSString *navaTitle; |
| | | |
| | | @property (nonatomic, nullable, copy) NSString *from; |
| | | |
| | | @property (nonatomic, weak) id<ShonpingShareViewControllerDelegate> shonpingSharedelegate; |
| | | |
| | | @end |
| | |
| | | self.webView.backgroundColor = XYRBackgroundColor; |
| | | self.webView.navigationDelegate = self; |
| | | self.webView.UIDelegate = self; |
| | | |
| | | |
| | | [self.view addSubview:self.webView]; |
| | | |
| | | [self initProgressView]; |
| | |
| | | return nil; |
| | | } |
| | | |
| | | - (BOOL)isPureInt:(NSString*)string { |
| | | NSScanner* scan = [NSScanner scannerWithString:string]; |
| | | int val; |
| | | return[scan scanInt:&val] && [scan isAtEnd]; |
| | | } |
| | | |
| | | - (NSString *)screeningWPHId:(NSString *)url { |
| | | if (([url rangeOfString:@".vip.com/"].location != NSNotFound && |
| | | [url rangeOfString:@"detail-"].location != NSNotFound) || |
| | | [url rangeOfString:@"product-"].location != NSNotFound) { |
| | | |
| | | if ([self.from isEqualToString:@"goodsDetail"]) { |
| | | return nil; |
| | | } |
| | | |
| | | NSString *goodsDetailId = nil; |
| | | NSArray *questionSegmentationArr = [url componentsSeparatedByString:@"?"]; |
| | | NSArray *andSegmentationArr = [questionSegmentationArr[0] componentsSeparatedByString:@"-"]; |
| | | |
| | | for (NSString *temp in andSegmentationArr) { |
| | | if ([temp hasSuffix:@".html"]) { |
| | | goodsDetailId = [temp stringByReplacingOccurrencesOfString:@".html" withString:@""]; |
| | | if ([self isPureInt:goodsDetailId]) { |
| | | break; |
| | | |
| | | } else { |
| | | goodsDetailId = nil; |
| | | } |
| | | } |
| | | } |
| | | return goodsDetailId; |
| | | } |
| | | return nil; |
| | | } |
| | | |
| | | - (NSString *)screeningSNId:(NSString *)url { |
| | | if (([url rangeOfString:@"suning.com/"].location != NSNotFound && |
| | | [url rangeOfString:@"suning.com/product/"].location != NSNotFound) || |
| | | [url rangeOfString:@"product.suning.com/"].location != NSNotFound) { |
| | | |
| | | if ([self.from isEqualToString:@"goodsDetail"]) { |
| | | return nil; |
| | | } |
| | | |
| | | NSMutableString *goodsDetailId = [[NSMutableString alloc] init]; |
| | | |
| | | NSArray *questionSegmentationArr = [url componentsSeparatedByString:@"?"]; |
| | | NSArray *andSegmentationArr = [questionSegmentationArr[0] componentsSeparatedByString:@"/"]; |
| | | |
| | | for (NSString *temp in andSegmentationArr) { |
| | | NSString *tempName = [temp stringByReplacingOccurrencesOfString:@".html" withString:@""]; |
| | | |
| | | if ([self isPureInt:tempName]) { |
| | | [goodsDetailId appendString:tempName]; |
| | | } |
| | | } |
| | | return goodsDetailId; |
| | | } |
| | | return nil; |
| | | } |
| | | |
| | | - (void)jumpJD:(NSDictionary *)dictionary { |
| | | @weakify(self) |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | |
| | | } |
| | | }); |
| | | |
| | | } fail:^(id object) {}]; |
| | | } fail:^(id object) { |
| | | |
| | | }]; |
| | | } |
| | | |
| | | #pragma mark - KVO |
| | |
| | | } |
| | | } |
| | | |
| | | if ([urlStr hasPrefix:@"suning://"]) { |
| | | if ([[UIApplication sharedApplication] canOpenURL:navigationAction.request.URL]) { |
| | | [[UIApplication sharedApplication] openURL:navigationAction.request.URL]; |
| | | decisionHandler(WKNavigationActionPolicyCancel); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | if ([urlStr rangeOfString:@"shop.banliapp.com://"].location != NSNotFound) { |
| | | // 设置webViewç头é¨åæ°Referer |
| | | if (!navigationAction.request.allHTTPHeaderFields[@"Referer"]) { |
| | |
| | | BOOL isAllow = [CZBInfoManager webView:webView decidePolicyForNavigationAction:navigationAction]; |
| | | if (!isAllow) { |
| | | WKNavigationActionPolicy actionPolicy = isAllow ? WKNavigationActionPolicyAllow:WKNavigationActionPolicyCancel; |
| | | decisionHandler(actionPolicy); |
| | | decisionHandler(actionPolicy); |
| | | return; |
| | | } |
| | | |
| | |
| | | NSString *tbId = [self screeningTbId:urlStr]; |
| | | NSString *jdId = [self screeningJdId:urlStr]; |
| | | NSString *pddId = [self screeningPddId:urlStr]; |
| | | NSString *wphId = [self screeningWPHId:urlStr]; |
| | | NSString *snId = [self screeningSNId:urlStr]; |
| | | |
| | | if (tbId) { |
| | | [self interceptWebGoods:tbId goodsType:@"1"]; |
| | |
| | | |
| | | } else if (pddId) { |
| | | [self interceptWebGoods:pddId goodsType:@"3"]; |
| | | |
| | | } else if (wphId) { |
| | | [self interceptWebGoods:wphId goodsType:@"4"]; |
| | | |
| | | } else if (snId) { |
| | | [self interceptWebGoods:snId goodsType:@"5"]; |
| | | |
| | | } |
| | | if (tbId || jdId || pddId) { |
| | | |
| | | if (tbId || jdId || pddId || wphId || snId) { |
| | | decisionHandler(WKNavigationActionPolicyCancel); |
| | | return; |
| | | } |
| | |
| | | - (void)pushJingDong:(BOOL)native jumpLink:(NSString *)jumpLink { |
| | | if (!native) { |
| | | ShonpingShareViewController *shonpingShareVc = [[ShonpingShareViewController alloc] init]; |
| | | shonpingShareVc.urlString = jumpLink; |
| | | shonpingShareVc.urlString = jumpLink?:@""; |
| | | [self.navigationController pushViewController:shonpingShareVc animated:YES]; |
| | | return; |
| | | } |
| | | [YTHsharedManger startManger].isEnterForeground = YES; |
| | | @weakify(self) |
| | | [[KeplerApiManager sharedKPService] openKeplerPageWithURL:jumpLink userInfo:nil failedCallback:^(NSInteger code, NSString *url) { |
| | | [[KeplerApiManager sharedKPService] openKeplerPageWithURL:jumpLink?:@"" userInfo:nil failedCallback:^(NSInteger code, NSString *url) { |
| | | // code 200 æ·»å æå 422 æ¬å°ä¸åå¨äº¬ä¸app 423 æ¬å°urlä¸å¨ç½åå 424 æ¬å°openå议失败 |
| | | @strongify(self) |
| | | if (code != 200) { |
| | |
| | | #define LOGINOUT_SUCCESS @"éåºç»å½æå" |
| | | #define TAOBAO_ACCREDIT @"è´ä¹°ååãé¢å伿 å¸ãæ¥ç订ååè´ç©è½¦çï¼éææç»å½æ·å®å·" |
| | | //#define NETWORK_NOT_CONNECT @"ç½ç»æªè¿æ¥ï¼è¯·æ£æµç½ç»è®¾ç½®" |
| | | #define NETWORK_CONNECT_ANOMALY @"è¯·æ£æ¥ä½ çç½ç»ï¼éæ°å è½½å§~" |
| | | #define NETWORK_CONNECT_ANOMALY @"ç½ç»è¿æ¥å¼å¸¸ï¼è¯·æ£æµç½ç»è®¾ç½®" |
| | | #define TimeInterval 180 |
| | | #define DYFont 2.0f |
| | | /// -------- |
| | |
| | | @property (nonatomic, nullable, strong) NSDictionary *dictionaryCopy; |
| | | /// updateæ°æ® |
| | | @property (nonatomic, nullable, strong) NSDictionary *dictionaryUpdate; |
| | | /// å¼å±é¡µæ¯å¦æ£å¨å±ç¤º |
| | | @property (nonatomic, assign) BOOL isShowSplash; |
| | | |
| | | + (YTHsharedManger *_Nullable)startManger; |
| | | |
New file |
| | |
| | | // |
| | | // GDTBaseAdNetworkAdapterProtocol.h |
| | | // GDTMobApp |
| | | // |
| | | // Created by royqpwang on 2019/7/25. |
| | | // Copyright © 2019 Tencent. All rights reserved. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | @protocol GDTBaseAdNetworkAdapterProtocol <NSObject> |
| | | |
| | | + (NSString *)adapterVersion; |
| | | |
| | | - (instancetype)initWithAdNetworkConnector:(id)connector |
| | | posId:(NSString *)posId |
| | | extStr:(NSString *)extStr; |
| | | @optional |
| | | |
| | | - (NSInteger)eCPM; |
| | | - (NSInteger)priority; |
| | | - (NSString *)eCPMLevel; |
| | | - (void)cancelLoad; |
| | | - (NSInteger)mediationPrice; |
| | | - (BOOL)isContractAd; |
| | | |
| | | @end |
| | | |
New file |
| | |
| | | // |
| | | // GDTHybridAd.h |
| | | // GDTMobApp |
| | | // |
| | | // Created by royqpwang on 2019/3/8. |
| | | // Copyright © 2019 Tencent. All rights reserved. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | typedef NS_OPTIONS(NSInteger, GDTHybridAdOptions) { |
| | | GDTHybridAdOptionRewardVideo = 1 << 0 |
| | | }; |
| | | |
| | | @class GDTHybridAd; |
| | | |
| | | @protocol GDTHybridAdDelegate <NSObject> |
| | | |
| | | @optional |
| | | |
| | | - (void)gdt_hybridAdDidPresented:(GDTHybridAd *)hybridAd; |
| | | - (void)gdt_hybridAdDidClose:(GDTHybridAd *)hybridAd; |
| | | - (void)gdt_hybridAdLoadURLSuccess:(GDTHybridAd *)hybridAd; |
| | | - (void)gdt_hybridAd:(GDTHybridAd *)hybridAd didFailWithError:(NSError *)error; |
| | | |
| | | @end |
| | | |
| | | @interface GDTHybridAd : NSObject |
| | | |
| | | /** |
| | | èªå®ä¹æµè§å¨ UI 屿§ï¼è¯·å¨ showWithRootViewController: æ¹æ³å设置ã |
| | | */ |
| | | @property (nonatomic, copy) NSString *titleContent; |
| | | @property (nonatomic, strong) UIColor *titleColor; |
| | | @property (nonatomic, strong) UIFont *titleFont; |
| | | @property (nonatomic, strong) UIColor *navigationBarColor; |
| | | @property (nonatomic, strong) UIColor *navigationBarBottomColor; |
| | | @property (nonatomic, strong) UIColor *separatorLineColor; |
| | | @property (nonatomic, strong) UIImage *closeImage; // å¦éèªå®ä¹å
³éå¾çï¼è¯·æ 44*44 大å°è®¾ç½® |
| | | @property (nonatomic, strong) UIImage *backImage; // å¦éèªå®ä¹åéå¾çï¼è¯·æ 44*44 大å°è®¾ç½® |
| | | |
| | | |
| | | /** |
| | | å§æå¯¹è±¡ |
| | | */ |
| | | @property (nonatomic, weak) id <GDTHybridAdDelegate> delegate; |
| | | |
| | | |
| | | /** |
| | | æé æ¹æ³ |
| | | |
| | | @param adOptions - æ¯æç广åç±»å Optionsï¼æ¿å±è§é¢è¯·ä¼ GDTHybridAdOptionRewardVideo |
| | | @return GDTHybrid å®ä¾ |
| | | */ |
| | | - (instancetype)initWithType:(GDTHybridAdOptions)adOptions; |
| | | |
| | | |
| | | /** |
| | | å è½½å¹¿åæ¹æ³ æ¯æ iOS8.1 å以ä¸ç³»ç» |
| | | |
| | | @param url å è½½ç X ä¸å¿ URL |
| | | */ |
| | | - (void)loadWithUrl:(NSString *)url; |
| | | |
| | | |
| | | /** |
| | | å±ç¤ºæµè§å¨æ¹æ³ |
| | | |
| | | @param rootViewController ç¨äº present æµè§å¨ VC |
| | | */ |
| | | - (void)showWithRootViewController:(UIViewController *)rootViewController; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // GDTLogoView.h |
| | | // GDTMobSDK |
| | | // |
| | | // Created by nimomeng on 2018/10/10. |
| | | // Copyright © 2018 Tencent. All rights reserved. |
| | | // |
| | | |
| | | #import <UIKit/UIKit.h> |
| | | //logoé»è®¤å®½åº¦ |
| | | extern CGFloat const kGDTLogoImageViewDefaultWidth; |
| | | //logoé»è®¤é«åº¦ |
| | | extern CGFloat const kGDTLogoImageViewDefaultHeight; |
| | | |
| | | @interface GDTLogoView : UIImageView |
| | | @end |
New file |
| | |
| | | // |
| | | // GDTMediaView.h |
| | | // GDTMobSDK |
| | | // |
| | | // Created by nimomeng on 2018/10/10. |
| | | // Copyright © 2018 Tencent. All rights reserved. |
| | | // |
| | | |
| | | #import <UIKit/UIKit.h> |
| | | #import "GDTSDKDefines.h" |
| | | |
| | | @class GDTMediaView; |
| | | @protocol GDTMediaViewDelegate <NSObject> |
| | | |
| | | @optional |
| | | |
| | | /** |
| | | ç¨æ·ç¹å» MediaView åè°ï¼å½ GDTVideoConfig userControlEnable 设为 YESï¼ç¨æ·ç¹å» mediaView ä¼åè°ã |
| | | |
| | | @param mediaView ææ¾å¨å®ä¾ |
| | | */ |
| | | - (void)gdt_mediaViewDidTapped:(GDTMediaView *)mediaView; |
| | | |
| | | /** |
| | | ææ¾å®æåè° |
| | | |
| | | @param mediaView ææ¾å¨å®ä¾ |
| | | */ |
| | | - (void)gdt_mediaViewDidPlayFinished:(GDTMediaView *)mediaView; |
| | | |
| | | @end |
| | | |
| | | @interface GDTMediaView : UIView |
| | | |
| | | /** |
| | | GDTMediaView åè°å¯¹è±¡ |
| | | */ |
| | | @property (nonatomic, weak) id <GDTMediaViewDelegate> delegate; |
| | | |
| | | /** |
| | | * è§é¢å¹¿åæ¶é¿ï¼åä½ ms |
| | | */ |
| | | - (CGFloat)videoDuration; |
| | | |
| | | /** |
| | | * è§é¢å¹¿åå·²ææ¾æ¶é¿ï¼åä½ ms |
| | | */ |
| | | - (CGFloat)videoPlayTime; |
| | | |
| | | /** |
| | | ææ¾è§é¢ |
| | | */ |
| | | - (void)play; |
| | | |
| | | /** |
| | | æåè§é¢ï¼è°ç¨ pause åï¼éè¦è¢«æåçè§é¢å¹¿å对象ï¼ä¸ä¼åèªå¨ææ¾ï¼éè¦è°ç¨ play æè½æ¢å¤ææ¾ã |
| | | */ |
| | | - (void)pause; |
| | | |
| | | /** |
| | | åæ¢ææ¾ï¼å¹¶å±ç¤ºç¬¬ä¸å¸§ |
| | | */ |
| | | - (void)stop; |
| | | |
| | | /** |
| | | ææ¾éé³å¼å
³ |
| | | @param flag æ¯å¦éé³ |
| | | */ |
| | | - (void)muteEnable:(BOOL)flag; |
| | | |
| | | /** |
| | | èªå®ä¹ææ¾æé® |
| | | |
| | | @param image èªå®ä¹ææ¾æé®å¾çï¼ä¸è®¾ç½®ä¸ºé»è®¤å¾ |
| | | @param size èªå®ä¹ææ¾æé®å¤§å°ï¼ä¸è®¾ç½®ä¸ºé»è®¤å¤§å° 44 * 44 |
| | | */ |
| | | - (void)setPlayButtonImage:(UIImage *)image size:(CGSize)size; |
| | | |
| | | #pragma mark - DEPRECATED |
| | | /** |
| | | æ¯å¦æ¯æå¨WWANä¸èªå¨ææ¾è§é¢ï¼ é»è®¤ NOï¼å·²åºå¼ï¼è¯·ä½¿ç¨ GDTVideoConfig ç±»é
ç½® |
| | | */ |
| | | @property (nonatomic, assign) BOOL videoAutoPlayOnWWAN GDT_DEPRECATED_ATTRIBUTE; |
| | | |
| | | /** |
| | | æ¯å¦é鳿æ¾è§é¢å¹¿åï¼ é»è®¤ YESï¼å·²åºå¼ï¼è¯·ä½¿ç¨ GDTVideoConfig ç±»é
ç½® |
| | | */ |
| | | @property (nonatomic, assign) BOOL videoMuted GDT_DEPRECATED_ATTRIBUTE; |
| | | |
| | | @end |
New file |
| | |
| | | // |
| | | // GDTMobBannerView.h |
| | | // GDTMobSDK |
| | | // |
| | | // Created by chaogao on 13-11-5. |
| | | // Copyright (c) 2013å¹´ Tencent. All rights reserved. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | #import <UIKit/UIKit.h> |
| | | #import "GDTSDKDefines.h" |
| | | |
| | | /** |
| | | * 广ç¹éæ¨è尺寸,å¼åè
å¨åµå
¥Banneræ¡æ¶ï¼å¯ä»¥æå¨è®¾ç½®Banneræ¡çå®½åº¦ç¨æ¥æ»¡è¶³åºæ¯éæ±ï¼ |
| | | * èé«åº¦çè¯å¹¿ç¹éä¾§ä¸å»ºè®®æ´æ¹ï¼å¦åæ¾ç¤ºææä¼æå½±å |
| | | */ |
| | | #define GDTMOB_AD_SUGGEST_SIZE_320x50 CGSizeMake(320, 50) //For iPhone |
| | | #define GDTMOB_AD_SUGGEST_SIZE_468x60 CGSizeMake(468, 60) //For iPad |
| | | #define GDTMOB_AD_SUGGEST_SIZE_728x90 CGSizeMake(728, 90) //For iPad |
| | | |
| | | @protocol GDTMobBannerViewDelegate <NSObject> |
| | | |
| | | @optional |
| | | |
| | | - (void)bannerViewMemoryWarning; |
| | | |
| | | /** |
| | | * 请æ±å¹¿åæ¡æ°æ®æååè°ç¨ |
| | | * 详解:彿¥æ¶æå¡å¨è¿åçå¹¿åæ°æ®æååè°ç¨è¯¥å½æ° |
| | | */ |
| | | - (void)bannerViewDidReceived; |
| | | |
| | | /** |
| | | * 请æ±å¹¿åæ¡æ°æ®å¤±è´¥åè°ç¨ |
| | | * 详解:彿¥æ¶æå¡å¨è¿åçå¹¿åæ°æ®å¤±è´¥åè°ç¨è¯¥å½æ° |
| | | */ |
| | | - (void)bannerViewFailToReceived:(NSError *)error; |
| | | |
| | | /** |
| | | * 详解:å½ç¹å»åºç¨ä¸è½½æè
广åè°ç¨ç³»ç»ç¨åºæå¼æ¶è°ç¨ |
| | | */ |
| | | - (void)bannerViewWillLeaveApplication; |
| | | |
| | | /** |
| | | * banneræ¡è¢«ç¨æ·å
³éæ¶è°ç¨ |
| | | * 详解:彿å¼showCloseBtnå¼å
³æ¶ï¼ç¨æ·æå¯è½ç¹å»å
³éæé®ä»èæå¹¿åæ¡å
³é |
| | | */ |
| | | - (void)bannerViewWillClose; |
| | | /** |
| | | * banneræ¡æå
åè° |
| | | */ |
| | | - (void)bannerViewWillExposure; |
| | | /** |
| | | * banneræ¡ç¹å»åè° |
| | | */ |
| | | - (void)bannerViewClicked; |
| | | |
| | | /** |
| | | * banner广åç¹å»ä»¥åå³å°å¼¹åºå
¨å±å¹¿å页 |
| | | */ |
| | | - (void)bannerViewWillPresentFullScreenModal; |
| | | /** |
| | | * banner广åç¹å»ä»¥åå¼¹åºå
¨å±å¹¿å页宿¯ |
| | | */ |
| | | - (void)bannerViewDidPresentFullScreenModal; |
| | | /** |
| | | * å
¨å±å¹¿å页å³å°è¢«å
³é |
| | | */ |
| | | - (void)bannerViewWillDismissFullScreenModal; |
| | | /** |
| | | * å
¨å±å¹¿å页已ç»è¢«å
³é |
| | | */ |
| | | - (void)bannerViewDidDismissFullScreenModal; |
| | | @end |
| | | |
| | | @interface GDTMobBannerView : UIView |
| | | |
| | | |
| | | |
| | | /** |
| | | * ç¶è§å¾ |
| | | * 详解ï¼[å¿
é]é设置为æ¾ç¤ºå¹¿åçUIViewController |
| | | */ |
| | | @property (nonatomic, weak) UIViewController *currentViewController; |
| | | |
| | | /** |
| | | * å§æ [å¯é] |
| | | */ |
| | | @property(nonatomic, weak) id<GDTMobBannerViewDelegate> delegate; |
| | | |
| | | /** |
| | | * 广åå·æ°é´éï¼èå´ [30, 120] ç§ï¼é»è®¤å¼ 30 ç§ã设 0 åä¸å·æ°ã [å¯é] |
| | | */ |
| | | @property(nonatomic, assign) int interval; |
| | | |
| | | /** |
| | | * GPSç²¾å广åå®ä½æ¨¡å¼å¼å
³,é»è®¤Gpså
³é |
| | | * 详解ï¼[å¯é]GPSç²¾åå®ä½æ¨¡å¼å¼å
³ï¼YES为å¼å¯GPSï¼NO为å
³éGPSï¼å»ºè®®è®¾ä¸ºå¼å¯ï¼å¯ä»¥è·åå°çä½ç½®ä¿¡æ¯ï¼æé«å¹¿åçå¡«å
çï¼å¢å æ¶çã |
| | | */ |
| | | @property(nonatomic, assign) BOOL isGpsOn; |
| | | |
| | | /** |
| | | * Bannerå±ç°åè½®ææ¶çå¨ç»ææå¼å
³ï¼é»è®¤æå¼ |
| | | */ |
| | | @property(nonatomic, assign) BOOL isAnimationOn; |
| | | |
| | | /** |
| | | * Banneræ¡å±ç¤ºå
³éæé®ï¼é»è®¤æå¼ |
| | | */ |
| | | @property(nonatomic, assign) BOOL showCloseBtn; |
| | | |
| | | /** |
| | | * æé æ¹æ³ |
| | | * 详解ï¼appId - åªä½ ID |
| | | * placementId - 广åä½ ID |
| | | */ |
| | | - (instancetype)initWithAppId:(NSString *)appId placementId:(NSString *)placementId GDT_DEPRECATED_MSG_ATTRIBUTE("banner1.0æ¥å£å°äºè¿æä¸çº¿ï¼è¯·å°½å¿«åæ¢å°banner2.0"); |
| | | |
| | | /** |
| | | * æé æ¹æ³ |
| | | * 详解ï¼frame - banner å±ç¤ºçä½ç½®åå¤§å° |
| | | * appId - åªä½ ID |
| | | * placementId - 广åä½ ID |
| | | */ |
| | | |
| | | - (instancetype)initWithFrame:(CGRect)frame appId:(NSString *)appId placementId:(NSString *)placementId GDT_DEPRECATED_MSG_ATTRIBUTE("banner1.0æ¥å£å°äºè¿æä¸çº¿ï¼è¯·å°½å¿«åæ¢å°banner2.0"); |
| | | |
| | | /** |
| | | * æåå¹¶å±ç¤ºå¹¿å |
| | | */ |
| | | - (void)loadAdAndShow; |
| | | |
| | | #pragma mark - DEPRECATED |
| | | - (instancetype)initWithAppkey:(NSString *)appkey placementId:(NSString *)placementId GDT_DEPRECATED_MSG_ATTRIBUTE("banner1.0æ¥å£å°äºè¿æä¸çº¿ï¼è¯·å°½å¿«åæ¢å°banner2.0"); |
| | | - (instancetype)initWithFrame:(CGRect)frame appkey:(NSString *)appkey placementId:(NSString *)placementId GDT_DEPRECATED_MSG_ATTRIBUTE("banner1.0æ¥å£å°äºè¿æä¸çº¿ï¼è¯·å°½å¿«åæ¢å°banner2.0"); |
| | | |
| | | |
| | | @end |
New file |
| | |
| | | // |
| | | // GDTMobInterstitial.h |
| | | // GDTMobApp |
| | | // |
| | | // Created by GaoChao on 13-12-30. |
| | | // Copyright (c) 2013å¹´ Tencent. All rights reserved. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | #import <UIKit/UIKit.h> |
| | | #import "GDTSDKDefines.h" |
| | | |
| | | @class GDTMobInterstitial; |
| | | |
| | | @protocol GDTMobInterstitialDelegate <NSObject> |
| | | |
| | | @optional |
| | | |
| | | /** |
| | | * 广åé¢å è½½æååè° |
| | | * 详解:彿¥æ¶æå¡å¨è¿åçå¹¿åæ°æ®æåä¸é¢å è½½åè°ç¨è¯¥å½æ° |
| | | */ |
| | | - (void)interstitialSuccessToLoadAd:(GDTMobInterstitial *)interstitial; |
| | | |
| | | /** |
| | | * 广åé¢å 载失败åè° |
| | | * 详解:彿¥æ¶æå¡å¨è¿åçå¹¿åæ°æ®å¤±è´¥åè°ç¨è¯¥å½æ° |
| | | */ |
| | | - (void)interstitialFailToLoadAd:(GDTMobInterstitial *)interstitial error:(NSError *)error; |
| | | |
| | | /** |
| | | * æå±å¹¿åå°è¦å±ç¤ºåè° |
| | | * 详解: æå±å¹¿åå³å°å±ç¤ºåè°è¯¥å½æ° |
| | | */ |
| | | - (void)interstitialWillPresentScreen:(GDTMobInterstitial *)interstitial; |
| | | |
| | | /** |
| | | * æå±å¹¿åè§å¾å±ç¤ºæååè° |
| | | * 详解: æå±å¹¿åå±ç¤ºæååè°è¯¥å½æ° |
| | | */ |
| | | - (void)interstitialDidPresentScreen:(GDTMobInterstitial *)interstitial; |
| | | |
| | | /** |
| | | * æå±å¹¿åå±ç¤ºç»æåè° |
| | | * 详解: æå±å¹¿åå±ç¤ºç»æåè°è¯¥å½æ° |
| | | */ |
| | | - (void)interstitialDidDismissScreen:(GDTMobInterstitial *)interstitial; |
| | | |
| | | /** |
| | | * 详解:å½ç¹å»åºç¨ä¸è½½æè
广åè°ç¨ç³»ç»ç¨åºæå¼æ¶è°ç¨ |
| | | */ |
| | | - (void)interstitialApplicationWillEnterBackground:(GDTMobInterstitial *)interstitial; |
| | | |
| | | /** |
| | | * æå±å¹¿åæå
åè° |
| | | */ |
| | | - (void)interstitialWillExposure:(GDTMobInterstitial *)interstitial; |
| | | |
| | | /** |
| | | * æå±å¹¿åç¹å»åè° |
| | | */ |
| | | - (void)interstitialClicked:(GDTMobInterstitial *)interstitial; |
| | | |
| | | /** |
| | | * ç¹å»æå±å¹¿å以åå³å°å¼¹åºå
¨å±å¹¿å页 |
| | | */ |
| | | - (void)interstitialAdWillPresentFullScreenModal:(GDTMobInterstitial *)interstitial; |
| | | |
| | | /** |
| | | * ç¹å»æå±å¹¿å以åå¼¹åºå
¨å±å¹¿å页 |
| | | */ |
| | | - (void)interstitialAdDidPresentFullScreenModal:(GDTMobInterstitial *)interstitial; |
| | | |
| | | /** |
| | | * å
¨å±å¹¿å页å°è¦å
³é |
| | | */ |
| | | - (void)interstitialAdWillDismissFullScreenModal:(GDTMobInterstitial *)interstitial; |
| | | |
| | | /** |
| | | * å
¨å±å¹¿å页被å
³é |
| | | */ |
| | | - (void)interstitialAdDidDismissFullScreenModal:(GDTMobInterstitial *)interstitial; |
| | | |
| | | @end |
| | | |
| | | @interface GDTMobInterstitial : NSObject |
| | | |
| | | /** |
| | | * GPSç²¾å广åå®ä½æ¨¡å¼å¼å
³,é»è®¤Gpså
³é |
| | | * 详解ï¼[å¯é]GPSç²¾åå®ä½æ¨¡å¼å¼å
³ï¼YES为å¼å¯GPSï¼NO为å
³éGPSï¼å»ºè®®è®¾ä¸ºå¼å¯ï¼å¯ä»¥è·åå°çä½ç½®ä¿¡æ¯ï¼æé«å¹¿åçå¡«å
çï¼å¢å æ¶çã |
| | | */ |
| | | @property (nonatomic, assign) BOOL isGpsOn; |
| | | |
| | | /** |
| | | * æå±å¹¿åé¢å è½½æ¯å¦å®æ |
| | | */ |
| | | @property (nonatomic, assign) BOOL isReady; |
| | | |
| | | /** |
| | | * å§æå¯¹è±¡ |
| | | */ |
| | | @property (nonatomic, weak) id<GDTMobInterstitialDelegate> delegate; |
| | | |
| | | /** |
| | | * æé æ¹æ³ |
| | | * 详解ï¼appId - åªä½ ID |
| | | * placementId - 广åä½ ID |
| | | */ |
| | | - (instancetype)initWithAppId:(NSString *)appId placementId:(NSString *)placementId GDT_DEPRECATED_MSG_ATTRIBUTE("æå±1.0æ¥å£å°äºè¿æä¸çº¿ï¼è¯·å°½å¿«åæ¢å°æå±2.0"); |
| | | |
| | | /** |
| | | * 广ååèµ·è¯·æ±æ¹æ³ |
| | | * 详解ï¼[å¿
é]åèµ·æå广åè¯·æ± |
| | | */ |
| | | - (void)loadAd; |
| | | |
| | | /** |
| | | * 广åå±ç¤ºæ¹æ³ |
| | | * 详解ï¼[å¿
é]åèµ·å±ç¤ºå¹¿å请æ±, å¿
é¡»ä¼ å
¥ç¨äºæ¾ç¤ºææå¹¿åçUIViewController |
| | | */ |
| | | - (void)presentFromRootViewController:(UIViewController *)rootViewController; |
| | | |
| | | #pragma mark - DEPRECATED |
| | | - (instancetype)initWithAppkey:(NSString *)appkey placementId:(NSString *)placementId GDT_DEPRECATED_MSG_ATTRIBUTE("æå±1.0æ¥å£å°äºè¿æä¸çº¿ï¼è¯·å°½å¿«åæ¢å°æå±2.0"); |
| | | |
| | | @end |
New file |
| | |
| | | // |
| | | // GDTNativeAd.h |
| | | // GDTMobApp |
| | | // |
| | | // Created by GaoChao on 14/11/6. |
| | | // Copyright (c) 2014å¹´ Tencent. All rights reserved. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | #import <StoreKit/StoreKit.h> |
| | | #import "GDTSDKDefines.h" |
| | | |
| | | extern NSString* const GDTNativeAdDataKeyTitle; |
| | | extern NSString* const GDTNativeAdDataKeyDesc; |
| | | extern NSString* const GDTNativeAdDataKeyIconUrl; |
| | | extern NSString* const GDTNativeAdDataKeyImgUrl; |
| | | extern NSString* const GDTNativeAdDataKeyAppRating; |
| | | extern NSString* const GDTNativeAdDataKeyAppPrice; |
| | | extern NSString* const GDTNativeAdDataKeyImgList; |
| | | extern NSString* const GDTNativeAdDataKeyImgWidth; |
| | | extern NSString* const GDTNativeAdDataKeyImgHeight; |
| | | |
| | | @interface GDTNativeAdData : NSObject |
| | | |
| | | /* |
| | | * 广åå
容åå
¸ |
| | | * 详解ï¼[å¿
é]å¼åè
è°ç¨LoadAdæåä¹åä»è¯¥å±æ§ä¸è·åå¹¿åæ°æ® |
| | | * å¹¿åæ°æ®ä»¥åå
¸çå½¢å¼åå¨ï¼å¼åè
ç®åå¯ä»¥éè¿å¦ä¸é®è·åæ°æ® |
| | | * 1. GDTNativeAdDataKeyTitle æ é¢ |
| | | * 2. GDTNativeAdDataKeyDesc æè¿° |
| | | * 3. GDTNativeAdDataKeyIconUrl 徿 Url |
| | | * 4. GDTNativeAdDataKeyImgUrl 大å¾Url |
| | | * 5. GDTNativeAdDataKeyAppRating åºç¨ç±»å¹¿åçæçº§ |
| | | * 6. GDTNativeAdDataKeyAppPrice åºç¨ç±»å¹¿åçä»·æ ¼ |
| | | * 7. GDTNativeAdDataKeyImgList ä¸å°å¾å¹¿åçå¾çéå |
| | | * 8. GDTNativeAdDataKeyImgWidth ç´ æå®½åº¦ |
| | | * 9. GDTNativeAdDataKeyImgHeight ç´ æé«åº¦ |
| | | */ |
| | | @property (nonatomic, retain, readonly) NSDictionary *properties; |
| | | /* |
| | | * å¤æä¸¤ä¸ªåçå¹¿åæ°æ®å¯¹è±¡æ¯å¦ç¸ç |
| | | */ |
| | | - (BOOL)equalsAdData:(GDTNativeAdData *)data; |
| | | /* |
| | | * è·å该åçå¹¿åæ¯å¦ä¸ºåºç¨ç±»å¹¿å |
| | | */ |
| | | - (BOOL)isAppAd; |
| | | /* |
| | | * è·å该åçå¹¿åæ¯å¦ä¸ºä¸å°å¾å¹¿åï¼å½ä¸ºä¸å°å¾å¹¿åæ¶ï¼å¯ä»¥éè¿GDTNativeAdDataKeyImgListè·åä¸å¼ å¾çèµæºä¾æ¸²æ |
| | | */ |
| | | - (BOOL)isThreeImgsAd; |
| | | |
| | | /** |
| | | è¿å广åçeCPMï¼åä½ï¼å |
| | | |
| | | @return æåè¿åä¸ä¸ªå¤§äºçäº0çå¼ï¼-1è¡¨ç¤ºæ æéæåå°åºç°å¼å¸¸ |
| | | */ |
| | | - (NSInteger)eCPM; |
| | | |
| | | /** |
| | | è¿å广åçeCPMç级 |
| | | |
| | | @return æåè¿åä¸ä¸ªå
嫿°åçstringï¼@""ænilè¡¨ç¤ºæ æéæåå°å¼å¸¸ |
| | | */ |
| | | - (NSString *)eCPMLevel; |
| | | |
| | | @end |
| | | |
| | | @class GDTNativeAd; |
| | | |
| | | @protocol GDTNativeAdDelegate <NSObject> |
| | | |
| | | /** |
| | | * åç广åå è½½å¹¿åæ°æ®æååè°ï¼è¿å为GDTNativeAdDataå¯¹è±¡çæ°ç» |
| | | */ |
| | | - (void)nativeAdSuccessToLoad:(NSArray *)nativeAdDataArray; |
| | | |
| | | /** |
| | | * åç广åå è½½å¹¿åæ°æ®å¤±è´¥åè° |
| | | */ |
| | | - (void)nativeAdFailToLoad:(NSError *)error; |
| | | |
| | | @optional |
| | | /** |
| | | * åç广åç¹å»ä¹åå°è¦å±ç¤ºå
嵿µè§å¨æåºç¨å
AppStoreåè° |
| | | */ |
| | | - (void)nativeAdWillPresentScreen; |
| | | |
| | | /** |
| | | * åç广åç¹å»ä¹ååºç¨è¿å
¥åå°æ¶åè° |
| | | */ |
| | | - (void)nativeAdApplicationWillEnterBackground; |
| | | |
| | | /** |
| | | * åç广åç¹å»ä»¥åï¼å
ç½®AppStoreææ¯å
ç½®æµè§å¨è¢«å
³éæ¶åè° |
| | | */ |
| | | - (void)nativeAdClosed; |
| | | |
| | | @end |
| | | |
| | | @interface GDTNativeAd : NSObject<SKStoreProductViewControllerDelegate> |
| | | |
| | | /* |
| | | * viewControllerForPresentingModalView |
| | | * 详解ï¼[å¿
é]å¼åè
éä¼ å
¥ç¨æ¥å¼¹åºç®æ 页çViewControllerï¼ä¸è¬ä¸ºå½åViewController |
| | | */ |
| | | @property (nonatomic, weak) UIViewController *controller; |
| | | |
| | | /** |
| | | * å§æå¯¹è±¡ |
| | | */ |
| | | @property (nonatomic, weak) id<GDTNativeAdDelegate> delegate; |
| | | |
| | | /** |
| | | * æé æ¹æ³ |
| | | * 详解ï¼appId - åªä½ ID |
| | | * placementId - 广åä½ ID |
| | | */ |
| | | - (instancetype)initWithAppId:(NSString *)appId placementId:(NSString *)placementId GDT_DEPRECATED_MSG_ATTRIBUTE("å³å°åºå¼ 请使ç¨èªæ¸²æ 2.0"); |
| | | |
| | | /** |
| | | * 广ååèµ·è¯·æ±æ¹æ³ |
| | | * 详解ï¼[å¿
é]åèµ·æå广å请æ±,å¨è·å¾å¹¿åæ°æ®ååè°delegate |
| | | * @param adCount 䏿¬¡æå广åçä¸ªæ° |
| | | */ |
| | | - (void)loadAd:(int)adCount; |
| | | |
| | | /** |
| | | * å¹¿åæ°æ®æ¸²æå®æ¯å³å°å±ç¤ºæ¶è°ç¨æ¹æ³ |
| | | * 详解ï¼[å¿
é]å¹¿åæ°æ®æ¸²æå®æ¯ï¼å³å°å±ç¤ºæ¶éè°ç¨æ¬æ¹æ³ã |
| | | * @param nativeAdData å¹¿åæ¸²æçæ°æ®å¯¹è±¡ |
| | | * @param view 渲æåºç广åç»æé¡µé¢ |
| | | */ |
| | | - (void)attachAd:(GDTNativeAdData *)nativeAdData toView:(UIView *)view; |
| | | |
| | | /** |
| | | * 广åç¹å»è°ç¨æ¹æ³ |
| | | * 详解ï¼å½ç¨æ·ç¹å»å¹¿åæ¶ï¼å¼åè
éè°ç¨æ¬æ¹æ³ï¼ç³»ç»ä¼å¼¹åºå
嵿µè§å¨ãæå
ç½®AppStoreã |
| | | * ææå¼ç³»ç»Safariï¼æ¥å±ç°å¹¿åç®æ é¡µé¢ |
| | | * @param nativeAdData ç¨æ·ç¹å»çå¹¿åæ°æ®å¯¹è±¡ |
| | | */ |
| | | - (void)clickAd:(GDTNativeAdData *)nativeAdData; |
| | | |
| | | @end |
New file |
| | |
| | | // |
| | | // GDTNativeExpressAd.h |
| | | // GDTMobApp |
| | | // |
| | | // Created by michaelxing on 2017/4/17. |
| | | // Copyright © 2017年 Tencent. All rights reserved. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | #import <UIKit/UIKit.h> |
| | | #import "GDTSDKDefines.h" |
| | | |
| | | @class GDTNativeExpressAdView; |
| | | @class GDTNativeExpressAd; |
| | | |
| | | @protocol GDTNativeExpressAdDelegete <NSObject> |
| | | |
| | | @optional |
| | | /** |
| | | * æååçæ¨¡æ¿å¹¿åæå |
| | | */ |
| | | - (void)nativeExpressAdSuccessToLoad:(GDTNativeExpressAd *)nativeExpressAd views:(NSArray<__kindof GDTNativeExpressAdView *> *)views; |
| | | |
| | | /** |
| | | * æååçæ¨¡æ¿å¹¿å失败 |
| | | */ |
| | | - (void)nativeExpressAdFailToLoad:(GDTNativeExpressAd *)nativeExpressAd error:(NSError *)error; |
| | | |
| | | /** |
| | | * åçæ¨¡æ¿å¹¿å渲ææå, æ¤æ¶ç nativeExpressAdView.size.height æ ¹æ® size.width 宿äºå¨ææ´æ°ã |
| | | */ |
| | | - (void)nativeExpressAdViewRenderSuccess:(GDTNativeExpressAdView *)nativeExpressAdView; |
| | | |
| | | /** |
| | | * åçæ¨¡æ¿å¹¿å渲æå¤±è´¥ |
| | | */ |
| | | - (void)nativeExpressAdViewRenderFail:(GDTNativeExpressAdView *)nativeExpressAdView; |
| | | |
| | | /** |
| | | * åçæ¨¡æ¿å¹¿åæå
åè° |
| | | */ |
| | | - (void)nativeExpressAdViewExposure:(GDTNativeExpressAdView *)nativeExpressAdView; |
| | | |
| | | /** |
| | | * åçæ¨¡æ¿å¹¿åç¹å»åè° |
| | | */ |
| | | - (void)nativeExpressAdViewClicked:(GDTNativeExpressAdView *)nativeExpressAdView; |
| | | |
| | | /** |
| | | * åçæ¨¡æ¿å¹¿å被å
³é |
| | | */ |
| | | - (void)nativeExpressAdViewClosed:(GDTNativeExpressAdView *)nativeExpressAdView; |
| | | |
| | | /** |
| | | * ç¹å»åçæ¨¡æ¿å¹¿å以åå³å°å¼¹åºå
¨å±å¹¿å页 |
| | | */ |
| | | - (void)nativeExpressAdViewWillPresentScreen:(GDTNativeExpressAdView *)nativeExpressAdView; |
| | | |
| | | /** |
| | | * ç¹å»åçæ¨¡æ¿å¹¿å以åå¼¹åºå
¨å±å¹¿å页 |
| | | */ |
| | | - (void)nativeExpressAdViewDidPresentScreen:(GDTNativeExpressAdView *)nativeExpressAdView; |
| | | |
| | | /** |
| | | * å
¨å±å¹¿å页å°è¦å
³é |
| | | */ |
| | | - (void)nativeExpressAdViewWillDissmissScreen:(GDTNativeExpressAdView *)nativeExpressAdView; |
| | | |
| | | /** |
| | | * å
¨å±å¹¿å页å°è¦å
³é |
| | | */ |
| | | - (void)nativeExpressAdViewDidDissmissScreen:(GDTNativeExpressAdView *)nativeExpressAdView; |
| | | |
| | | /** |
| | | * 详解:å½ç¹å»åºç¨ä¸è½½æè
广åè°ç¨ç³»ç»ç¨åºæå¼æ¶è°ç¨ |
| | | */ |
| | | - (void)nativeExpressAdViewApplicationWillEnterBackground:(GDTNativeExpressAdView *)nativeExpressAdView; |
| | | |
| | | /** |
| | | * åçæ¨¡æ¿è§é¢å¹¿å player ææ¾ç¶ææ´æ°åè° |
| | | */ |
| | | - (void)nativeExpressAdView:(GDTNativeExpressAdView *)nativeExpressAdView playerStatusChanged:(GDTMediaPlayerStatus)status; |
| | | |
| | | /** |
| | | * åçè§é¢æ¨¡æ¿è¯¦æ
页 WillPresent åè° |
| | | */ |
| | | - (void)nativeExpressAdViewWillPresentVideoVC:(GDTNativeExpressAdView *)nativeExpressAdView; |
| | | |
| | | /** |
| | | * åçè§é¢æ¨¡æ¿è¯¦æ
页 DidPresent åè° |
| | | */ |
| | | - (void)nativeExpressAdViewDidPresentVideoVC:(GDTNativeExpressAdView *)nativeExpressAdView; |
| | | |
| | | /** |
| | | * åçè§é¢æ¨¡æ¿è¯¦æ
页 WillDismiss åè° |
| | | */ |
| | | - (void)nativeExpressAdViewWillDismissVideoVC:(GDTNativeExpressAdView *)nativeExpressAdView; |
| | | |
| | | /** |
| | | * åçè§é¢æ¨¡æ¿è¯¦æ
页 DidDismiss åè° |
| | | */ |
| | | - (void)nativeExpressAdViewDidDismissVideoVC:(GDTNativeExpressAdView *)nativeExpressAdView; |
| | | |
| | | @end |
| | | |
| | | @interface GDTNativeExpressAd : NSObject |
| | | |
| | | /** |
| | | * å§æå¯¹è±¡ |
| | | */ |
| | | @property (nonatomic, weak) id<GDTNativeExpressAdDelegete> delegate; |
| | | |
| | | |
| | | /** |
| | | * é WiFi ç½ç»ï¼æ¯å¦èªå¨ææ¾ãé»è®¤ NOãloadAd å设置ã |
| | | */ |
| | | |
| | | @property (nonatomic, assign) BOOL videoAutoPlayOnWWAN; |
| | | |
| | | /** |
| | | * èªå¨ææ¾æ¶ï¼æ¯å¦éé³ãé»è®¤ YESãloadAd å设置ã |
| | | */ |
| | | @property (nonatomic, assign) BOOL videoMuted; |
| | | |
| | | /** |
| | | * è§é¢è¯¦æ
é¡µææ¾æ¶æ¯å¦éé³ãé»è®¤NOãloadAd å设置ã |
| | | */ |
| | | @property (nonatomic, assign) BOOL detailPageVideoMuted; |
| | | |
| | | /** |
| | | 请æ±è§é¢çæ¶é¿ä¸éï¼è§é¢æ¶é¿ææå¼èå´ä¸º[5,60]ã |
| | | 以ä¸ä¸¤ç§æ
åµä¼ä½¿ç¨ç³»ç»é»è®¤çæå°å¼è®¾ç½®ï¼1:ä¸è®¾ç½® 2:minVideoDuration大äºmaxVideoDuration |
| | | */ |
| | | @property (nonatomic) NSInteger minVideoDuration; |
| | | |
| | | /** |
| | | 请æ±è§é¢çæ¶é¿ä¸éï¼è§é¢æ¶é¿ææå¼èå´ä¸º[5,60]ã |
| | | */ |
| | | @property (nonatomic) NSInteger maxVideoDuration; |
| | | |
| | | @property (nonatomic, readonly) NSString *placementId; |
| | | |
| | | /** |
| | | * æé æ¹æ³ |
| | | * 详解ï¼placementId - 广åä½ ID |
| | | * adSize - 广åå±ç¤ºçå®½é« |
| | | */ |
| | | |
| | | - (instancetype)initWithPlacementId:(NSString *)placementId adSize:(CGSize)size; |
| | | |
| | | /** |
| | | * æé æ¹æ³ |
| | | * 详解ï¼appId - åªä½ ID |
| | | * placementId - 广åä½ ID |
| | | * adSize - 广åå±ç¤ºçå®½é« |
| | | */ |
| | | - (instancetype)initWithAppId:(NSString *)appId placementId:(NSString *)placementId adSize:(CGSize)size GDT_DEPRECATED_MSG_ATTRIBUTE("æ¥å£å³å°åºå¼ï¼è¯·ä½¿ç¨ initWithPlacementId:adSize:"); |
| | | |
| | | |
| | | |
| | | - (void)loadAd:(NSInteger)count; |
| | | |
| | | /** |
| | | è¿å广åå¹³å°åç§° |
| | | |
| | | @return å½ä½¿ç¨æµéåé
åè½æ¶ï¼ç¨äºåºå广åå¹³å°ï¼æªä½¿ç¨æ¶ä¸ºç©ºå符串 |
| | | */ |
| | | - (NSString *)adNetworkName; |
| | | @end |
New file |
| | |
| | | // |
| | | // GDTNativeExpressAdView.h |
| | | // GDTMobApp |
| | | // |
| | | // Created by michaelxing on 2017/4/14. |
| | | // Copyright © 2017年 Tencent. All rights reserved. |
| | | // |
| | | |
| | | #import <UIKit/UIKit.h> |
| | | |
| | | |
| | | @interface GDTNativeExpressAdView : UIView |
| | | |
| | | /** |
| | | * æ¯å¦æ¸²æå®æ¯ |
| | | */ |
| | | @property (nonatomic, assign, readonly) BOOL isReady; |
| | | |
| | | /** |
| | | * æ¯å¦æ¯è§é¢æ¨¡æ¿å¹¿å |
| | | */ |
| | | @property (nonatomic, assign, readonly) BOOL isVideoAd; |
| | | |
| | | /* |
| | | * viewControllerForPresentingModalView |
| | | * 详解ï¼[å¿
é]å¼åè
éä¼ å
¥ç¨æ¥å¼¹åºç®æ 页çViewControllerï¼ä¸è¬ä¸ºå½åViewController |
| | | */ |
| | | @property (nonatomic, weak) UIViewController *controller; |
| | | |
| | | /** |
| | | *[å¿
é] |
| | | *åçæ¨¡æ¿å¹¿å渲æ |
| | | */ |
| | | - (void)render; |
| | | |
| | | /** |
| | | * è§é¢æ¨¡æ¿å¹¿åæ¶é¿ï¼åä½ ms |
| | | */ |
| | | - (CGFloat)videoDuration; |
| | | |
| | | /** |
| | | * è§é¢æ¨¡æ¿å¹¿åå·²ææ¾æ¶é¿ï¼åä½ ms |
| | | */ |
| | | - (CGFloat)videoPlayTime; |
| | | |
| | | /** |
| | | è¿å广åçeCPMï¼åä½ï¼å |
| | | |
| | | @return æåè¿åä¸ä¸ªå¤§äºçäº0çå¼ï¼-1è¡¨ç¤ºæ æéæåå°åºç°å¼å¸¸ |
| | | */ |
| | | - (NSInteger)eCPM; |
| | | |
| | | /** |
| | | è¿å广åçeCPMç级 |
| | | |
| | | @return æåè¿åä¸ä¸ªå
嫿°åçstringï¼@""ænilè¡¨ç¤ºæ æéæåå°å¼å¸¸ |
| | | */ |
| | | - (NSString *)eCPMLevel; |
| | | |
| | | @end |
New file |
| | |
| | | // |
| | | // GDTRewardVideoAd.h |
| | | // GDTMobSDK |
| | | // |
| | | // Created by royqpwang on 2018/9/1. |
| | | // Copyright © 2018年 Tencent. All rights reserved. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | #import <UIKit/UIKit.h> |
| | | #import "GDTSDKDefines.h" |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | |
| | | @protocol GDTRewardedVideoAdDelegate; |
| | | |
| | | @interface GDTRewardVideoAd : NSObject |
| | | |
| | | @property (nonatomic, getter=isAdValid, readonly) BOOL adValid; |
| | | @property (nonatomic) BOOL videoMuted; |
| | | @property (nonatomic, assign, readonly) NSInteger expiredTimestamp; |
| | | @property (nonatomic, weak) id <GDTRewardedVideoAdDelegate> delegate; |
| | | @property (nonatomic, readonly) NSString *placementId; |
| | | |
| | | /** |
| | | æé æ¹æ³ |
| | | |
| | | @param placementId - 广åä½ ID |
| | | @return GDTRewardVideoAd å®ä¾ |
| | | */ |
| | | - (instancetype)initWithPlacementId:(NSString *)placementId; |
| | | |
| | | |
| | | /** |
| | | æé æ¹æ³ |
| | | |
| | | @param appId - åªä½ ID |
| | | @param placementId - 广åä½ ID |
| | | @return GDTRewardVideoAd å®ä¾ |
| | | */ |
| | | - (instancetype)initWithAppId:(NSString *)appId placementId:(NSString *)placementId GDT_DEPRECATED_MSG_ATTRIBUTE("æ¥å£å³å°åºå¼ï¼è¯·ä½¿ç¨ initWithPlacementId:"); |
| | | |
| | | /** |
| | | å è½½å¹¿åæ¹æ³ æ¯æ iOS8.1 å以ä¸ç³»ç» |
| | | */ |
| | | - (void)loadAd; |
| | | /** |
| | | å±ç¤ºå¹¿åæ¹æ³ |
| | | |
| | | @param rootViewController ç¨äº present æ¿å±è§é¢ VC |
| | | @return æ¯å¦å±ç¤ºæå |
| | | */ |
| | | - (BOOL)showAdFromRootViewController:(UIViewController *)rootViewController; |
| | | |
| | | |
| | | /** |
| | | è¿å广åçeCPMï¼åä½ï¼å |
| | | |
| | | @return æåè¿åä¸ä¸ªå¤§äºçäº0çå¼ï¼-1è¡¨ç¤ºæ æéæåå°åºç°å¼å¸¸ |
| | | */ |
| | | - (NSInteger)eCPM; |
| | | |
| | | /** |
| | | è¿å广åçeCPMç级 |
| | | |
| | | @return æåè¿åä¸ä¸ªå
嫿°åçstringï¼@""ænilè¡¨ç¤ºæ æéæåå°å¼å¸¸ |
| | | */ |
| | | - (NSString *)eCPMLevel; |
| | | |
| | | |
| | | /** |
| | | è¿å广åå¹³å°åç§° |
| | | |
| | | @return å½ä½¿ç¨æ¿å±è§é¢èååè½æ¶ï¼ç¨äºåºå广åå¹³å° |
| | | */ |
| | | - (NSString *)adNetworkName; |
| | | |
| | | @end |
| | | |
| | | |
| | | @protocol GDTRewardedVideoAdDelegate <NSObject> |
| | | |
| | | @optional |
| | | |
| | | |
| | | /** |
| | | å¹¿åæ°æ®å è½½æååè° |
| | | |
| | | @param rewardedVideoAd GDTRewardVideoAd å®ä¾ |
| | | */ |
| | | - (void)gdt_rewardVideoAdDidLoad:(GDTRewardVideoAd *)rewardedVideoAd; |
| | | |
| | | /** |
| | | è§é¢æ°æ®ä¸è½½æååè°ï¼å·²ç»ä¸è½½è¿çè§é¢ä¼ç´æ¥åè° |
| | | |
| | | @param rewardedVideoAd GDTRewardVideoAd å®ä¾ |
| | | */ |
| | | - (void)gdt_rewardVideoAdVideoDidLoad:(GDTRewardVideoAd *)rewardedVideoAd; |
| | | |
| | | /** |
| | | è§é¢ææ¾é¡µå³å°å±ç¤ºåè° |
| | | |
| | | @param rewardedVideoAd GDTRewardVideoAd å®ä¾ |
| | | */ |
| | | - (void)gdt_rewardVideoAdWillVisible:(GDTRewardVideoAd *)rewardedVideoAd; |
| | | |
| | | /** |
| | | è§é¢å¹¿åæå
åè° |
| | | |
| | | @param rewardedVideoAd GDTRewardVideoAd å®ä¾ |
| | | */ |
| | | - (void)gdt_rewardVideoAdDidExposed:(GDTRewardVideoAd *)rewardedVideoAd; |
| | | |
| | | /** |
| | | è§é¢ææ¾é¡µå
³éåè° |
| | | |
| | | @param rewardedVideoAd GDTRewardVideoAd å®ä¾ |
| | | */ |
| | | - (void)gdt_rewardVideoAdDidClose:(GDTRewardVideoAd *)rewardedVideoAd; |
| | | |
| | | /** |
| | | è§é¢å¹¿åä¿¡æ¯ç¹å»åè° |
| | | |
| | | @param rewardedVideoAd GDTRewardVideoAd å®ä¾ |
| | | */ |
| | | - (void)gdt_rewardVideoAdDidClicked:(GDTRewardVideoAd *)rewardedVideoAd; |
| | | |
| | | /** |
| | | è§é¢å¹¿ååç§é误信æ¯åè° |
| | | |
| | | @param rewardedVideoAd GDTRewardVideoAd å®ä¾ |
| | | @param error å
·ä½éè¯¯ä¿¡æ¯ |
| | | */ |
| | | - (void)gdt_rewardVideoAd:(GDTRewardVideoAd *)rewardedVideoAd didFailWithError:(NSError *)error; |
| | | |
| | | /** |
| | | è§é¢å¹¿åææ¾è¾¾å°æ¿å±æ¡ä»¶åè° |
| | | |
| | | @param rewardedVideoAd GDTRewardVideoAd å®ä¾ |
| | | */ |
| | | - (void)gdt_rewardVideoAdDidRewardEffective:(GDTRewardVideoAd *)rewardedVideoAd; |
| | | |
| | | /** |
| | | è§é¢å¹¿åè§é¢ææ¾å®æ |
| | | |
| | | @param rewardedVideoAd GDTRewardVideoAd å®ä¾ |
| | | */ |
| | | - (void)gdt_rewardVideoAdDidPlayFinish:(GDTRewardVideoAd *)rewardedVideoAd; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // GDTRewardVideoAdNetworkAdapterProtocol.h |
| | | // GDTMobApp |
| | | // |
| | | // Created by royqpwang on 2019/6/19. |
| | | // Copyright © 2019 Tencent. All rights reserved. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | #import "GDTBaseAdNetworkAdapterProtocol.h" |
| | | |
| | | @protocol GDTRewardVideoAdNetworkConnectorProtocol; |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | @protocol GDTRewardVideoAdNetworkAdapterProtocol <GDTBaseAdNetworkAdapterProtocol> |
| | | |
| | | - (void)loadAd; |
| | | |
| | | - (BOOL)showAdFromRootViewController:(UIViewController *)viewController; |
| | | |
| | | - (BOOL)isAdValid; |
| | | |
| | | - (NSInteger)expiredTimestamp; |
| | | |
| | | @optional |
| | | @property (nonatomic) BOOL videoMuted; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // GDTRewardVideoAdNetworkConnectorProtocol.h |
| | | // GDTMobApp |
| | | // |
| | | // Created by royqpwang on 2019/6/19. |
| | | // Copyright © 2019 Tencent. All rights reserved. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | @protocol GDTRewardVideoAdNetworkAdapterProtocol; |
| | | |
| | | |
| | | @protocol GDTRewardVideoAdNetworkConnectorProtocol <NSObject> |
| | | |
| | | - (void)adapter_rewardVideoAdDidLoad:(id<GDTRewardVideoAdNetworkAdapterProtocol>)adapter; |
| | | |
| | | /** |
| | | è§é¢æ°æ®ä¸è½½æååè°ï¼å·²ç»ä¸è½½è¿çè§é¢ä¼ç´æ¥åè° |
| | | |
| | | @param adapter å®ä¾ |
| | | */ |
| | | - (void)adapter_rewardVideoAdVideoDidLoad:(id<GDTRewardVideoAdNetworkAdapterProtocol>)adapter; |
| | | |
| | | /** |
| | | è§é¢ææ¾é¡µå³å°å±ç¤ºåè° |
| | | |
| | | @param adapter å®ä¾ |
| | | */ |
| | | - (void)adapter_rewardVideoAdWillVisible:(id<GDTRewardVideoAdNetworkAdapterProtocol>)adapter; |
| | | |
| | | /** |
| | | è§é¢å¹¿åæå
åè° |
| | | |
| | | @param adapter å®ä¾ |
| | | */ |
| | | - (void)adapter_rewardVideoAdDidExposed:(id<GDTRewardVideoAdNetworkAdapterProtocol>)adapter; |
| | | |
| | | /** |
| | | è§é¢ææ¾é¡µå
³éåè° |
| | | |
| | | @param adapter å®ä¾ |
| | | */ |
| | | - (void)adapter_rewardVideoAdDidClose:(id<GDTRewardVideoAdNetworkAdapterProtocol>)adapter; |
| | | |
| | | /** |
| | | è§é¢å¹¿åä¿¡æ¯ç¹å»åè° |
| | | |
| | | @param adapter å®ä¾ |
| | | */ |
| | | - (void)adapter_rewardVideoAdDidClicked:(id<GDTRewardVideoAdNetworkAdapterProtocol>)adapter; |
| | | |
| | | /** |
| | | è§é¢å¹¿ååç§é误信æ¯åè° |
| | | |
| | | @param adapter å®ä¾ |
| | | @param error å
·ä½éè¯¯ä¿¡æ¯ |
| | | */ |
| | | - (void)adapter_rewardVideoAd:(id<GDTRewardVideoAdNetworkAdapterProtocol>)adapter didFailWithError:(NSError *)error; |
| | | |
| | | /** |
| | | è§é¢å¹¿åææ¾è¾¾å°æ¿å±æ¡ä»¶åè° |
| | | |
| | | @param adapter å®ä¾ |
| | | */ |
| | | - (void)adapter_rewardVideoAdDidRewardEffective:(id<GDTRewardVideoAdNetworkAdapterProtocol>)adapter; |
| | | |
| | | |
| | | - (void)adapter_rewardVideoAdDidPlayFinish:(id<GDTRewardVideoAdNetworkAdapterProtocol>)adapter; |
| | | |
| | | @end |
New file |
| | |
| | | // |
| | | // GDTSDKConfig.h |
| | | // GDTMobApp |
| | | // |
| | | // Created by GaoChao on 14/8/25. |
| | | // Copyright (c) 2014å¹´ Tencent. All rights reserved. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | #import "GDTSDKDefines.h" |
| | | |
| | | @interface GDTSDKConfig : NSObject |
| | | |
| | | /** |
| | | SDK æ³¨åæ¥å£ï¼è¯·å¨ app åå§åæ¶è°ç¨ã |
| | | @param appId - åªä½ID |
| | | |
| | | @return æ³¨åæ¯å¦æåã |
| | | */ |
| | | + (BOOL)registerAppId:(NSString *)appId; |
| | | |
| | | /** |
| | | * æä¾ç»èåå¹³å°ç¨æ¥è®¾å®SDK æµéåç±» |
| | | */ |
| | | + (void)setSdkSrc:(NSString *)sdkSrc; |
| | | |
| | | /** |
| | | * æ¥çSDKæµéæ¥æº |
| | | */ |
| | | + (NSString *)sdkSrc; |
| | | |
| | | /** |
| | | * è·å SDK çæ¬ |
| | | */ |
| | | |
| | | + (NSString *)sdkVersion; |
| | | |
| | | + (void)enableGPS:(BOOL)enabled; |
| | | |
| | | /** |
| | | * 设置æµéæ¸ éå· |
| | | æ¸ éå·ä¿¡æ¯ä¸»è¦ç¨æ¥åå©å¹³å°æåæµéåç°ææåæ¨çæ¶çï¼è¯·å¦å®å¡«åï¼è¥æ¸ éå·æ æ³æ»¡è¶³æ¨çè¯æ±è¯·è系平å°è´è´£åå¡ |
| | | |
| | | æ¸ éå·æ å°å
³ç³»ä¸ºï¼ |
| | | 1ï¼ç¾åº¦ |
| | | 2ï¼å¤´æ¡ |
| | | 3ï¼å¹¿ç¹é |
| | | 4ï¼æç |
| | | 5ï¼å
¶ä»ç½ç |
| | | 6ï¼oppo |
| | | 7ï¼vivo |
| | | 8ï¼å为 |
| | | 9ï¼åºç¨å® |
| | | 10ï¼å°ç±³ |
| | | 11ï¼éç« |
| | | 12ï¼ç¾åº¦ææºå©æ |
| | | 13ï¼é
æ |
| | | 14ï¼AppStore |
| | | 999ï¼å
¶ä» |
| | | */ |
| | | + (void)setChannel:(NSInteger)channel; |
| | | |
| | | + (void)setSDKType:(NSInteger)type; |
| | | |
| | | /** |
| | | 卿æ¾é³é¢æ¶æ¯å¦ä½¿ç¨SDKå
é¨å¯¹AVAudioSession设置çcategoryåoptionsï¼é»è®¤ä½¿ç¨ï¼è¥ä¸ä½¿ç¨ï¼SDKå
é¨ä¸åä»»ä½å¤çï¼ç±è°ç¨æ¹å¨å±ç¤ºå¹¿åæ¶èªè¡è®¾ç½®ï¼ |
| | | SDK设置çcategory为AVAudioSessionCategoryAmbientï¼options为AVAudioSessionCategoryOptionDuckOthers |
| | | */ |
| | | + (void)enableDefaultAudioSessionSetting:(BOOL)enabled; |
| | | |
| | | @end |
| | | |
New file |
| | |
| | | // |
| | | // GDTSDKDefines.h |
| | | // GDTMobApp |
| | | // |
| | | // Created by royqpwang on 2017/11/6. |
| | | // Copyright © 2017年 Tencent. All rights reserved. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | #if defined(__has_attribute) |
| | | #if __has_attribute(deprecated) |
| | | #define GDT_DEPRECATED_MSG_ATTRIBUTE(s) __attribute__((deprecated(s))) |
| | | #define GDT_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) |
| | | #else |
| | | #define GDT_DEPRECATED_MSG_ATTRIBUTE(s) |
| | | #define GDT_DEPRECATED_ATTRIBUTE |
| | | #endif |
| | | #else |
| | | #define GDT_DEPRECATED_MSG_ATTRIBUTE(s) |
| | | #define GDT_DEPRECATED_ATTRIBUTE |
| | | #endif |
| | | |
| | | #define GDTScreenHeight ([UIScreen mainScreen].bounds.size.height) |
| | | #define GDTScreenWidth ([UIScreen mainScreen].bounds.size.width) |
| | | #define GDTTangramSchemePrefix @"gdtmsg://e.qq.com/" |
| | | /** |
| | | * è§é¢ææ¾å¨ç¶æ |
| | | * |
| | | * ææ¾å¨åªå¯è½å¤äºä»¥ä¸ç¶æä¸çä¸ç§ |
| | | * |
| | | */ |
| | | typedef NS_ENUM(NSUInteger, GDTMediaPlayerStatus) { |
| | | GDTMediaPlayerStatusInitial = 0, // åå§ç¶æ |
| | | GDTMediaPlayerStatusLoading = 1, // å è½½ä¸ |
| | | GDTMediaPlayerStatusStarted = 2, // å¼å§ææ¾ |
| | | GDTMediaPlayerStatusPaused = 3, // ç¨æ·è¡ä¸ºå¯¼è´æå |
| | | GDTMediaPlayerStatusStoped = 4, // ææ¾åæ¢ |
| | | GDTMediaPlayerStatusError = 5, // ææ¾åºé |
| | | }; |
| | | |
| | | typedef enum GDTSDKLoginType { |
| | | GDTSDKLoginTypeUnknow = 0, |
| | | GDTSDKLoginTypeWeiXin = 1, //å¾®ä¿¡è´¦å· |
| | | GDTSDKLoginTypeQQ = 2, //QQè´¦å· |
| | | } GDTSDKLoginType; |
| | | |
| | | typedef NS_ENUM(NSUInteger, GDTVideoPlayPolicy) { |
| | | GDTVideoPlayPolicyUnknow = 0, // é»è®¤å¼ï¼æªè®¾ç½® |
| | | GDTVideoPlayPolicyAuto = 1, // ç¨æ·è§åº¦çèµ·æ¥æ¯èªå¨ææ¾ |
| | | GDTVideoPlayPolicyManual = 2 // ç¨æ·è§åº¦çèµ·æ¥æ¯æå¨ææ¾æç¹å»åææ¾ |
| | | }; |
| | | |
| | | typedef NS_ENUM(NSUInteger, GDTVideoRenderType) { |
| | | GDTVideoRenderTypeUnknow = 0, |
| | | GDTVideoRenderTypeSDK = 1, |
| | | GDTVideoRenderTypeDeveloper = 2 |
| | | }; |
| | | |
| | | static inline BOOL isIPhoneXSeries() { |
| | | if (@available(iOS 11.0, *)) { |
| | | UIWindow *mainWindow = [[[UIApplication sharedApplication] delegate] window]; |
| | | if (mainWindow.safeAreaInsets.bottom > 0.0) { |
| | | return YES; |
| | | } |
| | | } |
| | | return NO; |
| | | } |
| | | |
| | | |
New file |
| | |
| | | // |
| | | // GDTSplashAd.h |
| | | // GDTMobApp |
| | | // |
| | | // 广ç¹éå¼å±å¹¿åï¼ç®ååªæ¯æiPhone设å¤ä¸å±ç¤ºåç´æ¹åçå¼å±å¹¿å |
| | | // Created by GaoChao on 15/8/20. |
| | | // Copyright © 2015年 Tencent. All rights reserved. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | #import <UIKit/UIKit.h> |
| | | #import "GDTSDKDefines.h" |
| | | |
| | | @class GDTSplashAd; |
| | | |
| | | @protocol GDTSplashAdDelegate <NSObject> |
| | | |
| | | @optional |
| | | /** |
| | | * å¼å±å¹¿åæåå±ç¤º |
| | | */ |
| | | - (void)splashAdSuccessPresentScreen:(GDTSplashAd *)splashAd; |
| | | |
| | | /** |
| | | * å¼å±å¹¿åç´ æå è½½æå |
| | | */ |
| | | - (void)splashAdDidLoad:(GDTSplashAd *)splashAd; |
| | | |
| | | /** |
| | | * å¼å±å¹¿åå±ç¤ºå¤±è´¥ |
| | | */ |
| | | - (void)splashAdFailToPresent:(GDTSplashAd *)splashAd withError:(NSError *)error; |
| | | |
| | | /** |
| | | * åºç¨è¿å
¥åå°æ¶åè° |
| | | * 详解: å½ç¹å»ä¸è½½åºç¨æ¶ä¼è°ç¨ç³»ç»ç¨åºæå¼ï¼åºç¨åæ¢å°åå° |
| | | */ |
| | | - (void)splashAdApplicationWillEnterBackground:(GDTSplashAd *)splashAd; |
| | | |
| | | /** |
| | | * å¼å±å¹¿åæå
åè° |
| | | */ |
| | | - (void)splashAdExposured:(GDTSplashAd *)splashAd; |
| | | |
| | | /** |
| | | * å¼å±å¹¿åç¹å»åè° |
| | | */ |
| | | - (void)splashAdClicked:(GDTSplashAd *)splashAd; |
| | | |
| | | /** |
| | | * å¼å±å¹¿åå°è¦å
³éåè° |
| | | */ |
| | | - (void)splashAdWillClosed:(GDTSplashAd *)splashAd; |
| | | |
| | | /** |
| | | * å¼å±å¹¿åå
³éåè° |
| | | */ |
| | | - (void)splashAdClosed:(GDTSplashAd *)splashAd; |
| | | |
| | | /** |
| | | * å¼å±å¹¿åç¹å»ä»¥åå³å°å¼¹åºå
¨å±å¹¿å页 |
| | | */ |
| | | - (void)splashAdWillPresentFullScreenModal:(GDTSplashAd *)splashAd; |
| | | |
| | | /** |
| | | * å¼å±å¹¿åç¹å»ä»¥åå¼¹åºå
¨å±å¹¿å页 |
| | | */ |
| | | - (void)splashAdDidPresentFullScreenModal:(GDTSplashAd *)splashAd; |
| | | |
| | | /** |
| | | * ç¹å»ä»¥åå
¨å±å¹¿å页å°è¦å
³é |
| | | */ |
| | | - (void)splashAdWillDismissFullScreenModal:(GDTSplashAd *)splashAd; |
| | | |
| | | /** |
| | | * ç¹å»ä»¥åå
¨å±å¹¿å页已ç»å
³é |
| | | */ |
| | | - (void)splashAdDidDismissFullScreenModal:(GDTSplashAd *)splashAd; |
| | | |
| | | /** |
| | | * å¼å±å¹¿åå©ä½æ¶é´åè° |
| | | */ |
| | | - (void)splashAdLifeTime:(NSUInteger)time; |
| | | |
| | | @end |
| | | |
| | | @interface GDTSplashAd : NSObject |
| | | |
| | | /** |
| | | * å§æå¯¹è±¡ |
| | | */ |
| | | @property (nonatomic, weak) id<GDTSplashAdDelegate> delegate; |
| | | |
| | | /** |
| | | * æå广åè¶
æ¶æ¶é´ï¼é»è®¤ä¸º3ç§ |
| | | * è¯¦è§£ï¼æå广åè¶
æ¶æ¶é´ï¼å¼åè
è°ç¨loadAdæ¹æ³ä»¥åä¼ç«å³å±ç¤ºbackgroundImageï¼ç¶åå¨è¯¥è¶
æ¶æ¶é´å
ï¼å¦æå¹¿åæ |
| | | * åæåï¼åç«é©¬å±ç¤ºå¼å±å¹¿åï¼å¦åæ¾å¼æ¤æ¬¡å¹¿åå±ç¤ºæºä¼ã |
| | | */ |
| | | @property (nonatomic, assign) CGFloat fetchDelay; |
| | | |
| | | /** |
| | | * å¼å±å¹¿åçèæ¯å¾ç |
| | | * å¯ä»¥è®¾ç½®èæ¯å¾çä½ä¸ºå¼å±å è½½æ¶çé»è®¤èæ¯ |
| | | */ |
| | | @property (nonatomic, strong) UIImage *backgroundImage; |
| | | |
| | | /** |
| | | * å¼å±å¹¿åçèæ¯è² |
| | | * å¯ä»¥è®¾ç½®å¼å±å¾çæ¥ä½ä¸ºå¼å±å è½½æ¶çé»è®¤å¾ç |
| | | */ |
| | | @property (nonatomic, copy) UIColor *backgroundColor; |
| | | |
| | | /** |
| | | * è·³è¿æé®çä½ç½® |
| | | */ |
| | | @property (nonatomic, assign) CGPoint skipButtonCenter; |
| | | |
| | | /** |
| | | è¿å广åå¹³å°åç§° |
| | | |
| | | @return å½ä½¿ç¨æµéåé
åè½æ¶ï¼ç¨äºåºå广åå¹³å°ï¼æªä½¿ç¨æ¶ä¸ºç©ºå符串 |
| | | */ |
| | | - (NSString *)adNetworkName; |
| | | |
| | | /** |
| | | * æé æ¹æ³ |
| | | * 详解ï¼placementId - 广åä½ ID |
| | | */ |
| | | - (instancetype)initWithPlacementId:(NSString *)placementId; |
| | | |
| | | /** |
| | | é¢å è½½éªå±å¹¿åæ¥å£ |
| | | |
| | | @param placementId 广åä½ID |
| | | */ |
| | | + (void)preloadSplashOrderWithPlacementId:(NSString *)placementId; |
| | | |
| | | #pragma mark - Parallel method |
| | | |
| | | /** |
| | | * è¿åå¹¿åæ¯å¦å¯å±ç¤º |
| | | * 对äºå¹¶è¡è¯·æ±ï¼å¨è°ç¨showAdInWindowåæ¶éå¤æä¸ |
| | | * @return å½å¹¿åå·²ç»å è½½å®æä¸æªæå
æ¶ï¼ä¸ºYESï¼å¦å为NO |
| | | */ |
| | | - (BOOL)isAdValid; |
| | | |
| | | /** |
| | | * åèµ·æå广å请æ±ï¼åªæåä¸å±ç¤º |
| | | * 详解ï¼å¹¿åç´ æå广åå¾çæåæååä¼åè°splashAdDidLoadæ¹æ³ï¼å½æå失败æ¶ä¼åè°splashAdFailToPresentæ¹æ³ |
| | | */ |
| | | - (void)loadAd; |
| | | |
| | | /** |
| | | * å±ç¤ºå¹¿åï¼è°ç¨æ¤æ¹æ³åéè°ç¨isAdValidæ¹æ³å¤æå¹¿åç´ ææ¯å¦ææ |
| | | * 详解ï¼å¹¿åå±ç¤ºæåæ¶ä¼åè°splashAdSuccessPresentScreenæ¹æ³ï¼å±ç¤ºå¤±è´¥æ¶ä¼åè°splashAdFailToPresentæ¹æ³ |
| | | */ |
| | | - (void)showAdInWindow:(UIWindow *)window withBottomView:(UIView *)bottomView skipView:(UIView *)skipView; |
| | | |
| | | /** |
| | | * æé æ¹æ³ |
| | | * 详解ï¼appId - åªä½ ID |
| | | * placementId - 广åä½ ID |
| | | */ |
| | | - (instancetype)initWithAppId:(NSString *)appId placementId:(NSString *)placementId GDT_DEPRECATED_MSG_ATTRIBUTE("æ¥å£å³å°åºå¼ï¼è¯·ä½¿ç¨ initWithPlacementId:"); |
| | | |
| | | /** |
| | | * 广åå起请æ±å¹¶å±ç¤ºå¨Windowä¸ |
| | | * 详解ï¼[å¯é]åèµ·æå广å请æ±,å¹¶å°è·åç广å以å
¨å±å½¢å¼å±ç¤ºå¨ä¼ å
¥çWindowåæ°ä¸ |
| | | * æç¤º: Splash广ååªæ¯æç«å± |
| | | * @param window å±ç¤ºå
¨å±å¼å±çå®¹å¨ |
| | | */ |
| | | - (void)loadAdAndShowInWindow:(UIWindow *)window GDT_DEPRECATED_MSG_ATTRIBUTE("æ¥å£å³å°åºå¼ï¼è¯·åå«ä½¿ç¨loadAd å showAdInWindow:æ¥å£"); |
| | | |
| | | /** |
| | | * 广åå起请æ±å¹¶å±ç¤ºå¨Windowä¸, åæ¶å¨å±å¹åºé¨è®¾ç½®åºç¨èªèº«çLogo页颿æ¯èªå®ä¹View |
| | | * 详解ï¼[å¯é]åèµ·æå广å请æ±,å¹¶å°è·åç广å以åå±å½¢å¼å±ç¤ºå¨ä¼ å
¥çWindowçä¸åé¨ï¼å©ä½é¨åå±ç¤ºä¼ å
¥çbottomView |
| | | * 请注æ1.bottomViewé设置好宽é«ï¼æå ç空é´ä¸è½è¿å¤§ï¼å¹¶ä¿è¯é«åº¦ä¸è¶
è¿å±å¹é«åº¦ç 25%ã2.Splash广ååªæ¯æç«å± |
| | | * @param window å±ç¤ºå¼å±çå®¹å¨ |
| | | * bottomView èªå®ä¹åºé¨Viewï¼å¯ä»¥å¨æ¤Viewä¸è®¾ç½®åºç¨Logo |
| | | */ |
| | | - (void)loadAdAndShowInWindow:(UIWindow *)window withBottomView:(UIView *)bottomView GDT_DEPRECATED_MSG_ATTRIBUTE("æ¥å£å³å°åºå¼ï¼è¯·åå«ä½¿ç¨loadAd å showAdInWindow:æ¥å£"); |
| | | |
| | | /** |
| | | * 广åå起请æ±å¹¶å±ç¤ºå¨Windowä¸, åæ¶å¨å±å¹åºé¨è®¾ç½®åºç¨èªèº«çLogo页颿æ¯èªå®ä¹View,skipViewæ¯èªå®ä¹çâè·³è¿âæ ·å¼ |
| | | * 详解ï¼[å¯é]åèµ·æå广å请æ±,å¹¶å°è·åç广å以åå±å½¢å¼å±ç¤ºå¨ä¼ å
¥çWindowçä¸åé¨ï¼å©ä½é¨åå±ç¤ºä¼ å
¥çbottomView |
| | | * 请注æ1.bottomViewé设置好宽é«ï¼æå ç空é´ä¸è½è¿å¤§ï¼å¹¶ä¿è¯é«åº¦ä¸è¶
è¿å±å¹é«åº¦ç 25%ã2.Splash广ååªæ¯æç«å± |
| | | * skipView |
| | | * @param window å±ç¤ºå¼å±çå®¹å¨ |
| | | * bottomView èªå®ä¹åºé¨Viewï¼å¯ä»¥å¨æ¤Viewä¸è®¾ç½®åºç¨Logo |
| | | skipView èªå®ä¹âè·³è¿âView. |
| | | */ |
| | | - (void)loadAdAndShowInWindow:(UIWindow *)window withBottomView:(UIView *)bottomView skipView:(UIView *)skipView GDT_DEPRECATED_MSG_ATTRIBUTE("æ¥å£å³å°åºå¼ï¼è¯·åå«ä½¿ç¨loadAd å showAdInWindow:æ¥å£"); |
| | | |
| | | @end |
New file |
| | |
| | | // |
| | | // GDTUnifiedBannerView.h |
| | | // GDTMobSDK |
| | | // |
| | | // Created by nimomeng on 2019/3/1. |
| | | // Copyright © 2019 Tencent. All rights reserved. |
| | | // |
| | | |
| | | #import <UIKit/UIKit.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | @class GDTUnifiedBannerView; |
| | | |
| | | @protocol GDTUnifiedBannerViewDelegate <NSObject> |
| | | @optional |
| | | /** |
| | | * 请æ±å¹¿åæ¡æ°æ®æååè°ç¨ |
| | | * 彿¥æ¶æå¡å¨è¿åçå¹¿åæ°æ®æååè°ç¨è¯¥å½æ° |
| | | */ |
| | | - (void)unifiedBannerViewDidLoad:(GDTUnifiedBannerView *)unifiedBannerView; |
| | | |
| | | /** |
| | | * 请æ±å¹¿åæ¡æ°æ®å¤±è´¥åè°ç¨ |
| | | * 彿¥æ¶æå¡å¨è¿åçå¹¿åæ°æ®å¤±è´¥åè°ç¨è¯¥å½æ° |
| | | */ |
| | | - (void)unifiedBannerViewFailedToLoad:(GDTUnifiedBannerView *)unifiedBannerView error:(NSError *)error; |
| | | |
| | | /** |
| | | * banner2.0æå
åè° |
| | | */ |
| | | - (void)unifiedBannerViewWillExpose:(GDTUnifiedBannerView *)unifiedBannerView; |
| | | |
| | | /** |
| | | * banner2.0ç¹å»åè° |
| | | */ |
| | | - (void)unifiedBannerViewClicked:(GDTUnifiedBannerView *)unifiedBannerView; |
| | | |
| | | /** |
| | | * banner2.0广åç¹å»ä»¥åå³å°å¼¹åºå
¨å±å¹¿å页 |
| | | */ |
| | | - (void)unifiedBannerViewWillPresentFullScreenModal:(GDTUnifiedBannerView *)unifiedBannerView; |
| | | |
| | | /** |
| | | * banner2.0广åç¹å»ä»¥åå¼¹åºå
¨å±å¹¿å页宿¯ |
| | | */ |
| | | - (void)unifiedBannerViewDidPresentFullScreenModal:(GDTUnifiedBannerView *)unifiedBannerView; |
| | | |
| | | /** |
| | | * å
¨å±å¹¿å页å³å°è¢«å
³é |
| | | */ |
| | | - (void)unifiedBannerViewWillDismissFullScreenModal:(GDTUnifiedBannerView *)unifiedBannerView; |
| | | |
| | | /** |
| | | * å
¨å±å¹¿å页已ç»è¢«å
³é |
| | | */ |
| | | - (void)unifiedBannerViewDidDismissFullScreenModal:(GDTUnifiedBannerView *)unifiedBannerView; |
| | | |
| | | /** |
| | | * å½ç¹å»åºç¨ä¸è½½æè
广åè°ç¨ç³»ç»ç¨åºæå¼ |
| | | */ |
| | | - (void)unifiedBannerViewWillLeaveApplication:(GDTUnifiedBannerView *)unifiedBannerView; |
| | | |
| | | /** |
| | | * banner2.0è¢«ç¨æ·å
³éæ¶è°ç¨ |
| | | */ |
| | | - (void)unifiedBannerViewWillClose:(GDTUnifiedBannerView *)unifiedBannerView; |
| | | |
| | | @end |
| | | |
| | | @interface GDTUnifiedBannerView : UIView |
| | | /** |
| | | * å§æ [å¯é] |
| | | */ |
| | | @property (nonatomic, weak) id<GDTUnifiedBannerViewDelegate> delegate; |
| | | |
| | | /** |
| | | * Bannerå±ç°åè½®ææ¶çå¨ç»ææå¼å
³ï¼é»è®¤æå¼ |
| | | */ |
| | | @property (nonatomic) BOOL animated; |
| | | |
| | | /** |
| | | * 广åå·æ°é´éï¼èå´ [30, 120] ç§ï¼é»è®¤å¼ 30 ç§ã设 0 åä¸å·æ°ã [å¯é] |
| | | */ |
| | | @property (nonatomic) int autoSwitchInterval; |
| | | /** |
| | | * æé æ¹æ³ |
| | | * 详解ï¼placementId - 广åä½ ID |
| | | * viewController - è§å¾æ§å¶å¨ |
| | | */ |
| | | - (instancetype)initWithPlacementId:(NSString *)placementId |
| | | viewController:(UIViewController *)viewController; |
| | | |
| | | /** |
| | | * æé æ¹æ³ |
| | | * 详解ï¼frame - banner å±ç¤ºçä½ç½®åå¤§å° |
| | | * placementId - 广åä½ ID |
| | | * viewController - è§å¾æ§å¶å¨ |
| | | */ |
| | | - (instancetype)initWithFrame:(CGRect)frame |
| | | placementId:(NSString *)placementId |
| | | viewController:(UIViewController *)viewController; |
| | | |
| | | /** |
| | | * æåå¹¶å±ç¤ºå¹¿å |
| | | */ |
| | | - (void)loadAdAndShow; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // GDTUnifiedInterstitialAd.h |
| | | // GDTMobApp |
| | | // |
| | | // Created by nimomeng on 2019/3/4. |
| | | // Copyright © 2019 Tencent. All rights reserved. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | #import "GDTSDKDefines.h" |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | @class GDTUnifiedInterstitialAd; |
| | | |
| | | @protocol GDTUnifiedInterstitialAdDelegate <NSObject> |
| | | @optional |
| | | |
| | | /** |
| | | * æå±2.0广åé¢å è½½æååè° |
| | | * 彿¥æ¶æå¡å¨è¿åçå¹¿åæ°æ®æåä¸é¢å è½½åè°ç¨è¯¥å½æ° |
| | | */ |
| | | - (void)unifiedInterstitialSuccessToLoadAd:(GDTUnifiedInterstitialAd *)unifiedInterstitial; |
| | | |
| | | /** |
| | | * æå±2.0广åé¢å 载失败åè° |
| | | * 彿¥æ¶æå¡å¨è¿åçå¹¿åæ°æ®å¤±è´¥åè°ç¨è¯¥å½æ° |
| | | */ |
| | | - (void)unifiedInterstitialFailToLoadAd:(GDTUnifiedInterstitialAd *)unifiedInterstitial error:(NSError *)error; |
| | | |
| | | /** |
| | | * æå±2.0广åå°è¦å±ç¤ºåè° |
| | | * æå±2.0广åå³å°å±ç¤ºåè°è¯¥å½æ° |
| | | */ |
| | | - (void)unifiedInterstitialWillPresentScreen:(GDTUnifiedInterstitialAd *)unifiedInterstitial; |
| | | |
| | | /** |
| | | * æå±2.0广åè§å¾å±ç¤ºæååè° |
| | | * æå±2.0广åå±ç¤ºæååè°è¯¥å½æ° |
| | | */ |
| | | - (void)unifiedInterstitialDidPresentScreen:(GDTUnifiedInterstitialAd *)unifiedInterstitial; |
| | | |
| | | /** |
| | | * æå±2.0广åè§å¾å±ç¤ºå¤±è´¥åè° |
| | | * æå±2.0广åå±ç¤ºå¤±è´¥åè°è¯¥å½æ° |
| | | */ |
| | | - (void)unifiedInterstitialFailToPresent:(GDTUnifiedInterstitialAd *)unifiedInterstitial error:(NSError *)error; |
| | | |
| | | /** |
| | | * æå±2.0广åå±ç¤ºç»æåè° |
| | | * æå±2.0广åå±ç¤ºç»æåè°è¯¥å½æ° |
| | | */ |
| | | - (void)unifiedInterstitialDidDismissScreen:(GDTUnifiedInterstitialAd *)unifiedInterstitial; |
| | | |
| | | /** |
| | | * å½ç¹å»ä¸è½½åºç¨æ¶ä¼è°ç¨ç³»ç»ç¨åºæå¼å
¶å®Appæè
Appstoreæ¶åè° |
| | | */ |
| | | - (void)unifiedInterstitialWillLeaveApplication:(GDTUnifiedInterstitialAd *)unifiedInterstitial; |
| | | |
| | | /** |
| | | * æå±2.0广åæå
åè° |
| | | */ |
| | | - (void)unifiedInterstitialWillExposure:(GDTUnifiedInterstitialAd *)unifiedInterstitial; |
| | | |
| | | /** |
| | | * æå±2.0广åç¹å»åè° |
| | | */ |
| | | - (void)unifiedInterstitialClicked:(GDTUnifiedInterstitialAd *)unifiedInterstitial; |
| | | |
| | | /** |
| | | * ç¹å»æå±2.0广å以åå³å°å¼¹åºå
¨å±å¹¿å页 |
| | | */ |
| | | - (void)unifiedInterstitialAdWillPresentFullScreenModal:(GDTUnifiedInterstitialAd *)unifiedInterstitial; |
| | | |
| | | /** |
| | | * ç¹å»æå±2.0广å以åå¼¹åºå
¨å±å¹¿å页 |
| | | */ |
| | | - (void)unifiedInterstitialAdDidPresentFullScreenModal:(GDTUnifiedInterstitialAd *)unifiedInterstitial; |
| | | |
| | | /** |
| | | * å
¨å±å¹¿å页å°è¦å
³é |
| | | */ |
| | | - (void)unifiedInterstitialAdWillDismissFullScreenModal:(GDTUnifiedInterstitialAd *)unifiedInterstitial; |
| | | |
| | | /** |
| | | * å
¨å±å¹¿å页被å
³é |
| | | */ |
| | | - (void)unifiedInterstitialAdDidDismissFullScreenModal:(GDTUnifiedInterstitialAd *)unifiedInterstitial; |
| | | |
| | | /** |
| | | * æå±2.0è§é¢å¹¿å player ææ¾ç¶ææ´æ°åè° |
| | | */ |
| | | - (void)unifiedInterstitialAd:(GDTUnifiedInterstitialAd *)unifiedInterstitial playerStatusChanged:(GDTMediaPlayerStatus)status; |
| | | |
| | | /** |
| | | * æå±2.0è§é¢å¹¿å详æ
页 WillPresent åè° |
| | | */ |
| | | - (void)unifiedInterstitialAdViewWillPresentVideoVC:(GDTUnifiedInterstitialAd *)unifiedInterstitial; |
| | | |
| | | /** |
| | | * æå±2.0è§é¢å¹¿å详æ
页 DidPresent åè° |
| | | */ |
| | | - (void)unifiedInterstitialAdViewDidPresentVideoVC:(GDTUnifiedInterstitialAd *)unifiedInterstitial; |
| | | |
| | | /** |
| | | * æå±2.0è§é¢å¹¿å详æ
页 WillDismiss åè° |
| | | */ |
| | | - (void)unifiedInterstitialAdViewWillDismissVideoVC:(GDTUnifiedInterstitialAd *)unifiedInterstitial; |
| | | |
| | | /** |
| | | * æå±2.0è§é¢å¹¿å详æ
页 DidDismiss åè° |
| | | */ |
| | | - (void)unifiedInterstitialAdViewDidDismissVideoVC:(GDTUnifiedInterstitialAd *)unifiedInterstitial; |
| | | |
| | | @end |
| | | |
| | | @interface GDTUnifiedInterstitialAd : NSObject |
| | | |
| | | /** |
| | | * æå±2.0广åé¢å è½½æ¯å¦å®æ |
| | | */ |
| | | @property (nonatomic, readonly) BOOL isAdValid; |
| | | |
| | | /** |
| | | * å§æå¯¹è±¡ |
| | | */ |
| | | @property (nonatomic, weak) id<GDTUnifiedInterstitialAdDelegate> delegate; |
| | | |
| | | @property (nonatomic, readonly) NSString *placementId; |
| | | |
| | | /** |
| | | * æé æ¹æ³ |
| | | * 详解ï¼placementId - 广åä½ ID |
| | | */ |
| | | - (instancetype)initWithPlacementId:(NSString *)placementId; |
| | | |
| | | /** |
| | | * æé æ¹æ³ |
| | | * 详解ï¼appId - åªä½ ID |
| | | * placementId - 广åä½ ID |
| | | */ |
| | | - (instancetype)initWithAppId:(NSString *)appId placementId:(NSString *)placementId GDT_DEPRECATED_MSG_ATTRIBUTE("æ¥å£å³å°åºå¼ï¼è¯·ä½¿ç¨ initWithPlacementId:"); |
| | | |
| | | /** |
| | | * 广ååèµ·è¯·æ±æ¹æ³ |
| | | * 详解ï¼[å¿
é]åèµ·æå广åè¯·æ± |
| | | */ |
| | | - (void)loadAd; |
| | | |
| | | /** |
| | | * æå±å
¨å±è§é¢å¹¿ååèµ·è¯·æ±æ¹æ³ |
| | | * 详解ï¼[å¿
é]åèµ·æå广åè¯·æ± |
| | | */ |
| | | - (void)loadFullScreenAd; |
| | | |
| | | |
| | | /** |
| | | * 广åå±ç¤ºæ¹æ³ |
| | | * 详解ï¼[å¿
é]åèµ·å±ç¤ºå¹¿å请æ±, å¿
é¡»ä¼ å
¥ç¨äºæ¾ç¤ºææå¹¿åçUIViewController |
| | | */ |
| | | |
| | | - (void)presentAdFromRootViewController:(UIViewController *)rootViewController; |
| | | |
| | | /** |
| | | * æå±è§é¢å
¨å±å¹¿åå±ç¤ºæ¹æ³ |
| | | * 详解ï¼[å¿
é]åèµ·å±ç¤ºå¹¿å请æ±, å¿
é¡»ä¼ å
¥ç¨äºæ¾ç¤ºææå¹¿åçUIViewController |
| | | */ |
| | | - (void)presentFullScreenAdFromRootViewController:(UIViewController *)rootViewController; |
| | | |
| | | /** |
| | | è¿å广åçeCPMï¼åä½ï¼å |
| | | |
| | | @return æåè¿åä¸ä¸ªå¤§äºçäº0çå¼ï¼-1è¡¨ç¤ºæ æéæåå°åºç°å¼å¸¸ |
| | | */ |
| | | - (NSInteger)eCPM; |
| | | |
| | | /** |
| | | è¿å广åçeCPMç级 |
| | | |
| | | @return æåè¿åä¸ä¸ªå
嫿°åçstringï¼@""ænilè¡¨ç¤ºæ æéæåå°å¼å¸¸ |
| | | */ |
| | | - (NSString *)eCPMLevel; |
| | | |
| | | /** |
| | | * é WiFi ç½ç»ï¼æ¯å¦èªå¨ææ¾ãé»è®¤ NOãloadAd å设置ã |
| | | */ |
| | | |
| | | @property (nonatomic, assign) BOOL videoAutoPlayOnWWAN; |
| | | |
| | | /** |
| | | * èªå¨ææ¾æ¶ï¼æ¯å¦éé³ãé»è®¤ YESãloadAd å设置ã |
| | | */ |
| | | @property (nonatomic, assign) BOOL videoMuted; |
| | | |
| | | |
| | | /** |
| | | * è§é¢è¯¦æ
é¡µææ¾æ¶æ¯å¦éé³ãé»è®¤NOãloadAd å设置ã |
| | | */ |
| | | @property (nonatomic, assign) BOOL detailPageVideoMuted; |
| | | |
| | | /** |
| | | 请æ±è§é¢çæ¶é¿ä¸éï¼è§é¢æ¶é¿ææå¼èå´ä¸º[5,60]ã |
| | | 以ä¸ä¸¤ç§æ
åµä¼ä½¿ç¨ç³»ç»é»è®¤çæå°å¼è®¾ç½®ï¼1:ä¸è®¾ç½® 2:minVideoDuration大äºmaxVideoDuration |
| | | */ |
| | | @property (nonatomic) NSInteger minVideoDuration; |
| | | |
| | | /** |
| | | 请æ±è§é¢çæ¶é¿ä¸éï¼è§é¢æ¶é¿ææå¼èå´ä¸º[5,60]ã |
| | | */ |
| | | @property (nonatomic) NSInteger maxVideoDuration; |
| | | |
| | | /** |
| | | * æ¯å¦æ¯è§é¢æå±2.0广å |
| | | */ |
| | | @property (nonatomic, assign, readonly) BOOL isVideoAd; |
| | | |
| | | /** |
| | | * è§é¢æå±2.0å¹¿åæ¶é¿ï¼åä½ ms |
| | | */ |
| | | - (CGFloat)videoDuration; |
| | | |
| | | /** |
| | | * è§é¢æå±å¹¿åå·²ææ¾æ¶é¿ï¼åä½ ms |
| | | */ |
| | | - (CGFloat)videoPlayTime; |
| | | |
| | | /** |
| | | è¿å广åå¹³å°åç§° |
| | | |
| | | @return å½ä½¿ç¨æµéåé
åè½æ¶ï¼ç¨äºåºå广åå¹³å°ï¼æªä½¿ç¨æ¶ä¸ºç©ºå符串 |
| | | */ |
| | | - (NSString *)adNetworkName; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // GDTUnifiedNativeAd.h |
| | | // GDTMobSDK |
| | | // |
| | | // Created by nimomeng on 2018/10/10. |
| | | // Copyright © 2018 Tencent. All rights reserved. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | #import "GDTUnifiedNativeAdDataObject.h" |
| | | #import "GDTUnifiedNativeAdView.h" |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | @protocol GDTUnifiedNativeAdDelegate <NSObject> |
| | | |
| | | /** |
| | | å¹¿åæ°æ®åè° |
| | | |
| | | @param unifiedNativeAdDataObjects å¹¿åæ°æ®æ°ç» |
| | | @param error éè¯¯ä¿¡æ¯ |
| | | */ |
| | | - (void)gdt_unifiedNativeAdLoaded:(NSArray<GDTUnifiedNativeAdDataObject *> * _Nullable)unifiedNativeAdDataObjects error:(NSError * _Nullable)error; |
| | | @end |
| | | |
| | | @interface GDTUnifiedNativeAd : NSObject |
| | | @property (nonatomic, weak) id<GDTUnifiedNativeAdDelegate> delegate; |
| | | |
| | | /** |
| | | 请æ±è§é¢çæ¶é¿ä¸éï¼è§é¢æ¶é¿ææå¼èå´ä¸º[5,60]ã |
| | | 以ä¸ä¸¤ç§æ
åµä¼ä½¿ç¨ç³»ç»é»è®¤çæå°å¼è®¾ç½®ï¼1:ä¸è®¾ç½® 2:minVideoDuration大äºmaxVideoDuration |
| | | */ |
| | | @property (nonatomic) NSInteger minVideoDuration; |
| | | |
| | | /** |
| | | 请æ±è§é¢çæå¤§æ¶é¿ï¼è§é¢æ¶é¿ææå¼èå´ä¸º[5,60]ã |
| | | */ |
| | | @property (nonatomic) NSInteger maxVideoDuration; |
| | | |
| | | /** |
| | | å¯é屿§ï¼è®¾ç½®æ¬æ¬¡æåçè§é¢å¹¿åä»ç¨æ·è§åº¦çå°çè§é¢ææ¾çç¥ã |
| | | |
| | | âç¨æ·è§åº¦âç¹æç¨æ·çå°çæ
åµï¼å¹¶éSDKæ¯å¦èªå¨ææ¾ï¼ä¸èªå¨ææ¾çç¥ GDTVideoAutoPlayPolicy çåå¼å¹¶éä¸ä¸å¯¹åº |
| | | |
| | | ä¾å¦å¼åè
è®¾ç½®äº GDTVideoAutoPlayPolicyNever 表示 SDK ä¸èªå¨ææ¾è§é¢ï¼ä½æ¯å¼åè
éè¿ GDTMediaView ç play æ¹æ³ææ¾è§é¢ï¼è¿å¨ç¨æ·çæ¥ä»ç¶æ¯èªå¨ææ¾çã |
| | | |
| | | åç¡®ç设置 GDTVideoPlayPolicy æå©äºæé«è§é¢å¹¿åçeCPMå¼ï¼å¦æå¹¿åä½ä»
æ¯æå¾æå¹¿åï¼åæ éè°ç¨ã |
| | | |
| | | éè¦å¨ loadAd å设置æ¤å±æ§ã |
| | | */ |
| | | @property (nonatomic, assign) GDTVideoPlayPolicy videoPlayPolicy; |
| | | |
| | | /** |
| | | å¯é屿§ï¼è®¾ç½®æ¬æ¬¡æåçè§é¢å¹¿åå°é¢æ¯ç±SDK渲æè¿æ¯å¼åè
èªè¡æ¸²æã |
| | | |
| | | SDK 渲æï¼æè§é¢å¹¿å containerView ç´æ¥å¨ feed æµçåºæ¯å±ç¤ºï¼ç¨æ·å¯ä»¥ç´æ¥çå°æ¸²æçè§é¢å¹¿åãDemo å·¥ç¨ä¸ç âè§é¢Feedâ å°±æ¯ SDK 渲æã |
| | | |
| | | å¼åè
èªè¡æ¸²æï¼æå¼åè
è·åå°å¹¿å对象åï¼å
ç¨å°é¢å¾åæ®µå¨ feed æµä¸å
渲æåºä¸ä¸ªå°é¢å¾å
¥å£ï¼ç¨æ·ç¹å»å°é¢å¾ï¼åè¿å
¥ä¸ä¸ªæ conainterView ç详ç»é¡µï¼ææ¾è§é¢ãDemo å·¥ç¨ä¸ç "ç«ç Feed è§é¢" å°±æ¯å¼åè
渲æçåºæ¯ã |
| | | */ |
| | | @property (nonatomic, assign) GDTVideoRenderType videoRenderType; |
| | | |
| | | /** |
| | | æé æ¹æ³ |
| | | |
| | | @param placementId 广åä½ID |
| | | @return GDTUnifiedNativeAd å®ä¾ |
| | | */ |
| | | - (instancetype)initWithPlacementId:(NSString *)placementId; |
| | | |
| | | /** |
| | | æé æ¹æ³ |
| | | |
| | | @param appId åªä½ID |
| | | @param placementId 广åä½ID |
| | | @return GDTUnifiedNativeAd å®ä¾ |
| | | */ |
| | | - (instancetype)initWithAppId:(NSString *)appId placementId:(NSString *)placementId GDT_DEPRECATED_MSG_ATTRIBUTE("æ¥å£å³å°åºå¼ï¼è¯·ä½¿ç¨ initWithPlacementId:"); |
| | | |
| | | /** |
| | | å 载广å |
| | | */ |
| | | - (void)loadAd; |
| | | |
| | | /** |
| | | å 载广å |
| | | |
| | | @param adCount å è½½æ¡æ° |
| | | */ |
| | | - (void)loadAdWithAdCount:(NSInteger)adCount; |
| | | |
| | | /** |
| | | è¿å广åå¹³å°åç§° |
| | | |
| | | @return å½ä½¿ç¨æµéåé
åè½æ¶ï¼ç¨äºåºå广åå¹³å°ï¼æªä½¿ç¨æ¶ä¸ºç©ºå符串 |
| | | */ |
| | | - (NSString *)adNetworkName; |
| | | |
| | | /** |
| | | * å½éè¦æ¯æ VAST å¹¿åæ¶ï¼éæµéèªè¡é
ç½® adapter ç vastClassName |
| | | */ |
| | | - (void)setVastClassName:(NSString *)vastClassName; |
| | | |
| | | @end |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // GDTUnifiedNativeAdDataObject.h |
| | | // GDTMobSDK |
| | | // |
| | | // Created by nimomeng on 2018/10/10. |
| | | // Copyright © 2018 Tencent. All rights reserved. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | #import <UIKit/UIKit.h> |
| | | #import "GDTVideoConfig.h" |
| | | |
| | | typedef NS_ENUM(NSInteger, GDTVastAdEventType) { |
| | | GDTVastAdEventTypeUnknow, |
| | | GDTVastAdEventTypeLoaded, |
| | | GDTVastAdEventTypeStarted, |
| | | GDTVastAdEventTypeFirstQuartile, |
| | | GDTVastAdEventTypeMidPoint, |
| | | GDTVastAdEventTypeThirdQuartile, |
| | | GDTVastAdEventTypeComplete, |
| | | GDTVastAdEventTypeAllAdsComplete, |
| | | GDTVastAdEventTypeExposed, |
| | | GDTVastAdEventTypeClicked, |
| | | }; |
| | | |
| | | |
| | | @interface GDTUnifiedNativeAdDataObject : NSObject |
| | | |
| | | /** |
| | | å¹¿åæ é¢ |
| | | */ |
| | | @property (nonatomic, copy, readonly) NSString *title; |
| | | |
| | | /** |
| | | 广åæè¿° |
| | | */ |
| | | @property (nonatomic, copy, readonly) NSString *desc; |
| | | |
| | | /** |
| | | 广å大å¾Url |
| | | */ |
| | | @property (nonatomic, copy, readonly) NSString *imageUrl; |
| | | |
| | | /** |
| | | ç´ æå®½åº¦ï¼åå¾å¹¿åä»£è¡¨å¤§å¾ imageUrl 宽度ãå¤å¾å¹¿å代表å°å¾ mediaUrlList 宽度 |
| | | */ |
| | | @property (nonatomic, readonly) NSInteger imageWidth; |
| | | |
| | | /** |
| | | ç´ æé«åº¦ï¼åå¾å¹¿åä»£è¡¨å¤§å¾ imageUrl é«åº¦ãå¤å¾å¹¿å代表å°å¾ mediaUrlList é«åº¦ |
| | | */ |
| | | @property (nonatomic, readonly) NSInteger imageHeight; |
| | | |
| | | /** |
| | | åºç¨ç±»å¹¿åApp 徿 Url |
| | | */ |
| | | @property (nonatomic, copy, readonly) NSString *iconUrl; |
| | | |
| | | /** |
| | | ä¸å°å¾å¹¿åçå¾çUrléå |
| | | */ |
| | | @property (nonatomic, copy, readonly) NSArray *mediaUrlList; |
| | | |
| | | /** |
| | | åºç¨ç±»å¹¿åçæçº§ï¼5æå¶åº¦ï¼ |
| | | */ |
| | | @property (nonatomic, readonly) CGFloat appRating; |
| | | |
| | | /** |
| | | åºç¨ç±»å¹¿åçä»·æ ¼ |
| | | */ |
| | | @property (nonatomic, strong, readonly) NSNumber *appPrice; |
| | | |
| | | /** |
| | | æ¯å¦ä¸ºåºç¨ç±»å¹¿å |
| | | */ |
| | | @property (nonatomic, readonly) BOOL isAppAd; |
| | | |
| | | /** |
| | | æ¯å¦ä¸ºè§é¢å¹¿å |
| | | */ |
| | | @property (nonatomic, readonly) BOOL isVideoAd; |
| | | |
| | | /** |
| | | æ¯å¦ä¸ºä¸å°å¾å¹¿å |
| | | */ |
| | | @property (nonatomic, readonly) BOOL isThreeImgsAd; |
| | | |
| | | /** |
| | | è¿å广åçeCPMï¼åä½ï¼å |
| | | |
| | | @return æåè¿åä¸ä¸ªå¤§äºçäº0çå¼ï¼-1è¡¨ç¤ºæ æéæåå°åºç°å¼å¸¸ |
| | | */ |
| | | @property (nonatomic, readonly) NSInteger eCPM; |
| | | |
| | | /** |
| | | è¿å广åçeCPMç级 |
| | | |
| | | @return æåè¿åä¸ä¸ªå
嫿°åçstringï¼@""ænilè¡¨ç¤ºæ æéæåå°å¼å¸¸ |
| | | */ |
| | | @property (nonatomic, readonly) NSString *eCPMLevel; |
| | | |
| | | /** |
| | | 广å对åºçCTAææ¡ï¼èªå®ä¹CTAè§å¾æ¶å»ºè®®ä½¿ç¨æ¤å段 |
| | | 广å对åºçcallToActionææ¡ï¼æ¯å¦âç«å³é¢çº¦âæâçµè¯å¨è¯¢â, èªå®ä¹callToActionè§å¾æ¶å»ºè®®ä½¿ç¨æ¤å段 |
| | | |
| | | è¯¥åæ®µå¨é¨å广åç±»åä¸å¯è½ä¸ºç©º |
| | | */ |
| | | @property (nonatomic, readonly) NSString *callToAction; |
| | | |
| | | /** |
| | | è¿åå¹¿åæ¯å¦å¯ä»¥è·³è¿ï¼ç¨äºååè´´çåºæ¯ |
| | | |
| | | @return YES 表示å¯è·³è¿ãNO 表示ä¸å¯è·³è¿ |
| | | */ |
| | | @property (nonatomic, readonly) BOOL skippable; |
| | | |
| | | /** |
| | | è§é¢å¹¿åææ¾é
ç½® |
| | | */ |
| | | @property (nonatomic, strong) GDTVideoConfig *videoConfig; |
| | | |
| | | /** |
| | | * è§é¢å¹¿åæ¶é¿ï¼åä½ ms |
| | | */ |
| | | @property (nonatomic, readonly) CGFloat duration; |
| | | |
| | | /** |
| | | * VAST Tag Urlï¼å¯è½ä¸ºç©ºã |
| | | */ |
| | | @property (nonatomic, copy, readonly) NSString *vastTagUrl; |
| | | |
| | | /** |
| | | * VAST Contentï¼å¯è½ä¸ºç©ºã |
| | | */ |
| | | @property (nonatomic, copy, readonly) NSString *vastContent; |
| | | |
| | | /** |
| | | * æ¯å¦ä¸º VAST 广å |
| | | */ |
| | | @property (nonatomic, assign, readonly) BOOL isVastAd; |
| | | |
| | | /** |
| | | å¤æä¸¤ä¸ªèªæ¸²æ2.0å¹¿åæ°æ®æ¯å¦ç¸ç |
| | | |
| | | @param dataObject éè¦å¯¹æ¯çèªæ¸²æ2.0å¹¿åæ°æ®å¯¹è±¡ |
| | | @return YES or NO |
| | | */ |
| | | - (BOOL)equalsAdData:(GDTUnifiedNativeAdDataObject *)dataObject; |
| | | |
| | | @end |
New file |
| | |
| | | // |
| | | // GDTUnifiedNativeAdView.h |
| | | // GDTMobSDK |
| | | // |
| | | // Created by nimomeng on 2018/10/10. |
| | | // Copyright © 2018 Tencent. All rights reserved. |
| | | // |
| | | |
| | | #import <UIKit/UIKit.h> |
| | | #import "GDTLogoView.h" |
| | | #import "GDTMediaView.h" |
| | | #import "GDTUnifiedNativeAdDataObject.h" |
| | | #import "GDTSDKDefines.h" |
| | | |
| | | @class GDTUnifiedNativeAdView; |
| | | |
| | | //è§é¢å¹¿åæ¶é¿Key |
| | | extern NSString* const kGDTUnifiedNativeAdKeyVideoDuration; |
| | | |
| | | @protocol GDTUnifiedNativeAdViewDelegate <NSObject> |
| | | |
| | | @optional |
| | | /** |
| | | 广åæå
åè° |
| | | |
| | | @param unifiedNativeAdView GDTUnifiedNativeAdView å®ä¾ |
| | | */ |
| | | - (void)gdt_unifiedNativeAdViewWillExpose:(GDTUnifiedNativeAdView *)unifiedNativeAdView; |
| | | |
| | | |
| | | /** |
| | | 广åç¹å»åè° |
| | | |
| | | @param unifiedNativeAdView GDTUnifiedNativeAdView å®ä¾ |
| | | */ |
| | | - (void)gdt_unifiedNativeAdViewDidClick:(GDTUnifiedNativeAdView *)unifiedNativeAdView; |
| | | |
| | | |
| | | /** |
| | | 广å详æ
页å
³éåè° |
| | | |
| | | @param unifiedNativeAdView GDTUnifiedNativeAdView å®ä¾ |
| | | */ |
| | | - (void)gdt_unifiedNativeAdDetailViewClosed:(GDTUnifiedNativeAdView *)unifiedNativeAdView; |
| | | |
| | | |
| | | /** |
| | | å½ç¹å»åºç¨ä¸è½½æè
广åè°ç¨ç³»ç»ç¨åºæå¼æ¶è°ç¨ |
| | | |
| | | @param unifiedNativeAdView GDTUnifiedNativeAdView å®ä¾ |
| | | */ |
| | | - (void)gdt_unifiedNativeAdViewApplicationWillEnterBackground:(GDTUnifiedNativeAdView *)unifiedNativeAdView; |
| | | |
| | | |
| | | /** |
| | | 广å详æ
页é¢å³å°å±ç¤ºåè° |
| | | |
| | | @param unifiedNativeAdView GDTUnifiedNativeAdView å®ä¾ |
| | | */ |
| | | - (void)gdt_unifiedNativeAdDetailViewWillPresentScreen:(GDTUnifiedNativeAdView *)unifiedNativeAdView; |
| | | |
| | | |
| | | /** |
| | | è§é¢å¹¿åææ¾ç¶ææ´æ¹åè° |
| | | |
| | | @param nativeExpressAdView GDTUnifiedNativeAdView å®ä¾ |
| | | @param status è§é¢å¹¿åææ¾ç¶æ |
| | | @param userInfo è§é¢å¹¿åä¿¡æ¯ |
| | | */ |
| | | - (void)gdt_unifiedNativeAdView:(GDTUnifiedNativeAdView *)unifiedNativeAdView playerStatusChanged:(GDTMediaPlayerStatus)status userInfo:(NSDictionary *)userInfo; |
| | | @end |
| | | |
| | | @interface GDTUnifiedNativeAdView:UIView |
| | | |
| | | /** |
| | | ç»å®çæ°æ®å¯¹è±¡ |
| | | */ |
| | | @property (nonatomic, strong, readonly) GDTUnifiedNativeAdDataObject *dataObject; |
| | | |
| | | /** |
| | | è§é¢å¹¿åçåªä½Viewï¼ç»å®æ°æ®å¯¹è±¡åèªå¨çæï¼å¯èªå®ä¹å¸å± |
| | | */ |
| | | @property (nonatomic, strong, readonly) GDTMediaView *mediaView; |
| | | |
| | | /** |
| | | è
¾è®¯å¹¿å LogoViewï¼èªå¨çæï¼å¯èªå®ä¹å¸å± |
| | | */ |
| | | @property (nonatomic, strong, readonly) GDTLogoView *logoView; |
| | | |
| | | /** |
| | | 广å View æ¶é´åè°å¯¹è±¡ |
| | | */ |
| | | @property (nonatomic, weak) id<GDTUnifiedNativeAdViewDelegate> delegate; |
| | | |
| | | /* |
| | | * viewControllerForPresentingModalView |
| | | * 详解ï¼å¼åè
éä¼ å
¥ç¨æ¥å¼¹åºç®æ 页çViewControllerï¼ä¸è¬ä¸ºå½åViewController |
| | | */ |
| | | @property (nonatomic, weak) UIViewController *viewController; |
| | | |
| | | /** |
| | | èªæ¸²æ2.0è§å¾æ³¨åæ¹æ³ |
| | | |
| | | @param dataObject æ°æ®å¯¹è±¡ï¼å¿
ä¼ åæ®µ |
| | | @param clickableViews å¯ç¹å»çè§å¾æ°ç»ï¼æ¤æ°ç»å
ç广åå
ç´ æå¯ä»¥ååºå¹¿å对åºçç¹å»äºä»¶ |
| | | */ |
| | | - (void)registerDataObject:(GDTUnifiedNativeAdDataObject *)dataObject |
| | | clickableViews:(NSArray<UIView *> *)clickableViews; |
| | | |
| | | |
| | | /** |
| | | 注åå¯ç¹å»çcallToActionè§å¾çæ¹æ³ |
| | | 建议å¼åè
使ç¨GDTUnifiedNativeAdDataObjectä¸çcallToActionåæ®µæ¥å建è§å¾ï¼å¹¶å代èªå®ä¹çä¸è½½ææå¼çbutton, |
| | | è°ç¨æ¤æ¹æ³ä¹åå¿
é¡»å
è°ç¨registerDataObject:clickableViews |
| | | @param callToActionView CTAè§å¾, ç³»ç»èªå¨å¤çç¹å»äºä»¶ |
| | | */ |
| | | - (void)registerClickableCallToActionView:(UIView *)callToActionView; |
| | | |
| | | /** |
| | | æ³¨éæ°æ®å¯¹è±¡ï¼å¨ tableViewãcollectionView çåºæ¯éè¦å¤ç¨ GDTUnifiedNativeAdView æ¶ï¼ |
| | | éè¦å¨åéçæ¶æºï¼ä¾å¦ cell ç prepareForReuse æ¹æ³å
æ§è¡ unregisterDataObject æ¹æ³ï¼ |
| | | å°å¹¿åå¯¹è±¡ä¸ GDTUnifiedNativeAdView è§£ç»ï¼å
·ä½å¯åèç¤ºä¾ demo ç UnifiedNativeAdBaseTableViewCell ç±» |
| | | */ |
| | | - (void)unregisterDataObject; |
| | | |
| | | //#pragma mark - DEPRECATED |
| | | ///** |
| | | // æ¤æ¹æ³å·²ç»åºå¼ |
| | | // èªæ¸²æ2.0è§å¾æ³¨åæ¹æ³ |
| | | // |
| | | // @param dataObject æ°æ®å¯¹è±¡ï¼å¿
ä¼ åæ®µ |
| | | // @param logoView logoè§å¾ |
| | | // @param viewController æå¨ViewControllerï¼å¿
ä¼ åæ®µãæ¯æå¨registerä¹å对å
¶è¿è¡ä¿®æ¹ |
| | | // @param clickableViews å¯ç¹å»çè§å¾æ°ç»ï¼æ¤æ°ç»å
ç广åå
ç´ æå¯ä»¥ååºå¹¿å对åºçç¹å»äºä»¶ |
| | | // */ |
| | | //- (void)registerDataObject:(GDTUnifiedNativeAdDataObject *)dataObject |
| | | // logoView:(GDTLogoView *)logoView |
| | | // viewController:(UIViewController *)viewController |
| | | // clickableViews:(NSArray<UIView *> *)clickableViews GDT_DEPRECATED_MSG_ATTRIBUTE("use registerDataObject:clickableViews: instead."); |
| | | // |
| | | // |
| | | ///** |
| | | // æ¤æ¹æ³å·²ç»åºå¼ |
| | | // èªæ¸²æ2.0è§å¾æ³¨åæ¹æ³ |
| | | // |
| | | // @param dataObject æ°æ®å¯¹è±¡ï¼å¿
ä¼ åæ®µ |
| | | // @param mediaView åªä½å¯¹è±¡è§å¾ï¼æ¤å¤æ¾è§é¢ææ¾å¨ç容å¨è§å¾ |
| | | // @param logoView logoè§å¾ |
| | | // @param viewController æå¨ViewControllerï¼å¿
ä¼ åæ®µãæ¯æå¨registerä¹å对å
¶è¿è¡ä¿®æ¹ |
| | | // @param clickableViews å¯ç¹å»çè§å¾æ°ç»ï¼æ¤æ°ç»å
ç广åå
ç´ æå¯ä»¥ååºå¹¿å对åºçç¹å»äºä»¶ |
| | | // */ |
| | | //- (void)registerDataObject:(GDTUnifiedNativeAdDataObject *)dataObject |
| | | // mediaView:(GDTMediaView *)mediaView |
| | | // logoView:(GDTLogoView *)logoView |
| | | // viewController:(UIViewController *)viewController |
| | | // clickableViews:(NSArray<UIView *> *)clickableViews GDT_DEPRECATED_MSG_ATTRIBUTE("use registerDataObject:clickableViews: instead."); |
| | | @end |
| | | |
| | | |
| | | |
New file |
| | |
| | | // |
| | | // GDTVideoConfig.h |
| | | // GDTMobApp |
| | | // |
| | | // Created by royqpwang on 2019/5/16. |
| | | // Copyright © 2019 Tencent. All rights reserved. |
| | | // |
| | | |
| | | #import <Foundation/Foundation.h> |
| | | |
| | | typedef NS_ENUM(NSInteger, GDTVideoAutoPlayPolicy) { |
| | | GDTVideoAutoPlayPolicyWIFI = 0, // WIFI ä¸èªå¨ææ¾ |
| | | GDTVideoAutoPlayPolicyAlways = 1, // æ»æ¯èªå¨ææ¾ï¼æ 论ç½ç»æ¡ä»¶ |
| | | GDTVideoAutoPlayPolicyNever = 2, // ä»ä¸èªå¨ææ¾ï¼æ 论ç½ç»æ¡ä»¶ |
| | | }; |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | @interface GDTVideoConfig : NSObject |
| | | |
| | | /** |
| | | è§é¢èªå¨ææ¾çç¥ï¼é»è®¤ GDTVideoAutoPlayPolicyAlways, |
| | | éæ© GDTVideoAutoPlayPolicyNever çç¥æ¶ï¼éè¦å¼åè
è°ç¨ GDTMediaView ç play\pause æ¹æ³è§¦åè§é¢æãæåï¼ |
| | | æè
å¼å¯ userControlEnable 设置ï¼è®©ç¨æ·ç¹å» MediaView æ§å¶ææ¾ç¶æ |
| | | */ |
| | | @property (nonatomic, assign) GDTVideoAutoPlayPolicy autoPlayPolicy; |
| | | |
| | | /** |
| | | æ¯å¦é鳿æ¾è§é¢å¹¿åï¼è§é¢åå§ç¶ææ¯å¦éé³ï¼é»è®¤ YESï¼ |
| | | å¯éè¿ GDTMediaView muteEnable: æ¹æ³å®æ¶æ§å¶ææ¾å¨jéé³ç¶æï¼ |
| | | */ |
| | | @property (nonatomic, assign) BOOL videoMuted; |
| | | |
| | | /** |
| | | è§é¢è¯¦æ
é¡µææ¾æ¶æ¯å¦éé³ï¼é»è®¤NOï¼ |
| | | */ |
| | | @property (nonatomic, assign) BOOL detailPageVideoMuted; |
| | | |
| | | /** |
| | | æ¯å¦å¯å¨èªå¨ç»æåè½ï¼å½å¨ tableView çåºæ¯ææ¾å¨è¢«éæ¯æ¶ï¼å¹¿åå±ç¤ºæ¶ç»§ç»ä»ä¸æ¬¡ææ¾ä½ç½®ç»æï¼é»è®¤ NO |
| | | */ |
| | | @property (nonatomic, assign) BOOL autoResumeEnable; |
| | | |
| | | /** |
| | | 广ååçç¹å»è¡ä¸ºæ¶ï¼æ¯å¦å±ç¤ºè§é¢è¯¦æ
页 |
| | | 设为 NO æ¶ï¼ç¨æ·ç¹å» clickableViews ä¼ç´æ¥æå¼ App Store æè
广åè½å°é¡µ |
| | | */ |
| | | @property (nonatomic, assign) BOOL detailPageEnable; |
| | | |
| | | /** |
| | | æ¯å¦æ¯æç¨æ·ç¹å» MediaView æ¹åè§é¢ææ¾æåç¶æï¼é»è®¤ NO |
| | | 设为 YES æ¶ï¼ç¨æ·ç¹å»ä¼åæ¢ææ¾å¨ææ¾ãæåç¶æ |
| | | */ |
| | | @property (nonatomic, assign) BOOL userControlEnable; |
| | | |
| | | /** |
| | | æ¯å¦å±ç¤ºææ¾è¿åº¦æ¡ï¼é»è®¤ YES |
| | | */ |
| | | @property (nonatomic, assign) BOOL progressViewEnable; |
| | | |
| | | /** |
| | | æ¯å¦å±ç¤ºææ¾å¨å°é¢å¾ï¼é»è®¤ YES |
| | | */ |
| | | @property (nonatomic, assign) BOOL coverImageEnable; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
| | |
| | | _connectBtn = [[UIButton alloc] init]; |
| | | _connectBtn.layer.cornerRadius = 30 / 2; |
| | | _connectBtn.layer.masksToBounds = YES; |
| | | [_connectBtn setTitle:@"å»è®¾ç½®" forState:UIControlStateNormal]; |
| | | [_connectBtn setTitle:@"设置ç½ç»" forState:UIControlStateNormal]; |
| | | _connectBtn.backgroundColor = XYRMainColor; |
| | | _connectBtn.titleLabel.font = [UIFont systemFontOfSize:16]; |
| | | [_baseView addSubview:_connectBtn]; |
| | |
| | | */ |
| | | +(instancetype)sharedWithStoryboard:(NSString *)storyboardName images:(NSArray *) imageNames buttonImage:(NSString *) buttonImageName buttonFrame:(CGRect ) frame; |
| | | |
| | | + (void)show; |
| | | + (void)hide; |
| | | |
| | | @end |
| | |
| | | |
| | | - (void)commentMore:(HairBandsMultipleModel *)hairBandsMultipleModel indexPath:(NSIndexPath *)indexPath; |
| | | |
| | | /// åå |
| | | - (void)oneClickBilling:(HairBandsMultipleModel *)commentsModel; |
| | | |
| | | /// æ´»å¨è¯¦æ
|
| | | - (void)activityDetail:(NSString *)link; |
| | | @end |
| | |
| | | - (void)setModel:(HairBandsMultipleModel *)model { |
| | | _model = model; |
| | | if (model) { |
| | | |
| | | if (model.cloud) { |
| | | self.buttonOneClickBilling.hidden = NO; |
| | | |
| | | } else { |
| | | self.buttonOneClickBilling.hidden = YES; |
| | | } |
| | | |
| | | //头å |
| | | [self.headerImageView sd_setFadeImageWithURL:[NSURL URLWithString:model.user.portrait]]; |
| | | |
| | |
| | | [_buttonOneClickBilling setImage:ALIMAGE_NAMED(@"dynamic_oneclickbill") forState:UIControlStateNormal]; |
| | | [_buttonOneClickBilling setTitle:@" ä¸é®åå" forState:UIControlStateNormal]; |
| | | [_buttonOneClickBilling setTitleColor:XYRMainColor forState:UIControlStateNormal]; |
| | | _buttonOneClickBilling.titleLabel.font = ([UIFont systemFontOfSize:(SCREEN_WIDTH < 375)?10:12]); |
| | | _buttonOneClickBilling.titleLabel.font = ([UIFont systemFontOfSize:(SCREEN_WIDTH < 375)?10:12]); |
| | | _buttonOneClickBilling.layer.masksToBounds = YES; |
| | | _buttonOneClickBilling.layer.borderColor = XYRMainColor.CGColor; |
| | | _buttonOneClickBilling.layer.borderWidth = 1; |
| | | _buttonOneClickBilling.hidden = YES; |
| | | } |
| | | return _buttonOneClickBilling; |
| | | } |
| | |
| | | if ([source isEqualToString:@"copyComment"]) {//å¤å¶è¯è®º |
| | | [self copyCommentStart:self.commentsModel publishId:self.publishId]; |
| | | |
| | | } else { |
| | | } else if ([source isEqualToString:@"cloud"]) {//åå |
| | | [self oneClickBilling:self.contentArray[self.clickIndex]]; |
| | | |
| | | } else { |
| | | [self downImageOrCreate:source]; |
| | | } |
| | | } |
| | |
| | | |
| | | } |
| | | self.view.userInteractionEnabled = YES; |
| | | }]; |
| | | } |
| | | |
| | | - (void)oneClickBilling:(HairBandsMultipleModel *)model { |
| | | [self.rootVc.view makeToastActivity:CSToastPositionCenter]; |
| | | NSMutableDictionary *params = [[NSMutableDictionary alloc] init]; |
| | | [params setObject:model.id forKey:@"id"]; |
| | | [params setObject:[ALUserInfoServiceManger fetchUID] forKey:@"uid"]; |
| | | @weakify(self) |
| | | [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP2,@"user/cloud/sendCircle"] param:params success:^(NSDictionary *object) { |
| | | @strongify(self) |
| | | @weakify(self) |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | @strongify(self) |
| | | [self.rootVc.view hideToastActivity]; |
| | | self.view.userInteractionEnabled = YES; |
| | | |
| | | if ([self isHaveValue:object] && [object[@"code"] integerValue] == 0) { |
| | | if ([self isHaveValue:object[@"data"]]) { |
| | | [JRToast showWithText:object[@"data"] bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | |
| | | } else { |
| | | if ([self isHaveValue:object[@"msg"]]) { |
| | | [JRToast showWithText:object[@"msg"] bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | } |
| | | }); |
| | | |
| | | } fail:^(id object) { |
| | | [self.rootVc.view hideToastActivity]; |
| | | self.view.userInteractionEnabled = YES; |
| | | [JRToast showWithText:NETWORK_CONNECT_ANOMALY bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | }]; |
| | | } |
| | | |
| | |
| | | [self fetchTaoBaoAuthInfo:@"down" requestCount:1]; |
| | | |
| | | } else if (typeEvent == 3) { |
| | | ALToastCenter(@"åå"); |
| | | self.view.userInteractionEnabled = YES; |
| | | [self fetchTaoBaoAuthInfo:@"cloud" requestCount:1]; |
| | | } |
| | | } |
| | | |
| | |
| | | @class HairBandsMultipleUserModel,HairBandsMultipleImgListModel,HairBandsMultipleGoodsModel,HairBandsMultipleCommentsModel,HairBandsMultipleTagListModel; |
| | | |
| | | @interface HairBandsMultipleModel : NSObject |
| | | ///ä¸é®äºåå |
| | | @property (nonatomic, assign) BOOL cloud; |
| | | ///è·³è½¬é¾æ¥ |
| | | @property (nonatomic, nullable, copy) NSString *jumpLink; |
| | | ///åå¸id |
| | |
| | | [self.navigationController pushViewController:loginVc animated:YES]; |
| | | return; |
| | | } |
| | | |
| | | // æ¯å¦æ¿æ´»é请åè½ |
| | | if (![ALUserInfoServiceManger isInvited]) { |
| | | [self onInviteVcName:nil]; |
| | | return; |
| | | } |
| | | [self userStorageaddstorage]; |
| | | [self onecClickBilling]; |
| | | } |
| | | |
| | | - (void)userStorageaddstorage { |
| | | - (void)onecClickBilling { |
| | | if (self.isRequestAPI) { |
| | | return; |
| | | } |
| | | [self.view makeToastActivity:CSToastPositionCenter]; |
| | | self.isRequestAPI = YES; |
| | | NSDictionary *dic = @{@"uid":[ALUserInfoServiceManger fetchUID],@"id":self.goodsModel.goodsId,@"goodsType":[NSString stringWithFormat:@"%ld",(long)_goodsType]}; |
| | | NSDictionary *params = @{@"uid":[ALUserInfoServiceManger fetchUID],@"goodsId":self.goodsModel.goodsId,@"goodsType":[NSString stringWithFormat:@"%ld",(long)_goodsType]}; |
| | | |
| | | @weakify(self) |
| | | [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP2,@"shraeStorage/accordtorage"] param:dic success:^(NSDictionary *object) |
| | | { |
| | | [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP2,@"user/cloud/sendGoods"] param:params success:^(NSDictionary *object) { |
| | | @strongify(self) |
| | | self.isRequestAPI = NO; |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | GoodsHeaderTableViewCell *cell = [self.tableview cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]]; |
| | | self.isRequestAPI = NO; |
| | | if (object && [object[@"code"]integerValue] == 0) { |
| | | BOOL storageState = [object[@"data"][@"storageState"] boolValue]; |
| | | self.storageState = storageState; |
| | | if (storageState) { |
| | | [JRToast showWithText:@"æ·»å è³åäº«åºæå" bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | cell.buttonProLibrary.selected = YES; |
| | | [UMCustomShop umDetail_joinXPK]; |
| | | [self.view hideToastActivity]; |
| | | if ([self isHaveValue:object] ) { |
| | | if ([object[@"code"] integerValue] == 0) { |
| | | if ([self isHaveValue:object[@"data"] ]){ |
| | | [JRToast showWithText:object[@"data"] bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | |
| | | } else if ([object[@"code"] integerValue] == 1001 || |
| | | [object[@"code"] integerValue] == 1002 || |
| | | [object[@"code"] integerValue] == 1003 || |
| | | [object[@"code"] integerValue] == 1004 || |
| | | [object[@"code"] integerValue] == 1005) { |
| | | |
| | | if ([self isHaveValue:object[@"msg"]]) { |
| | | [JRToast showWithText:object[@"msg"] bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | [self pushAnyInterfaceController:@"ShonpingShareViewController" parms:@{@"url":object[@"data"][@"link"]}]; |
| | | |
| | | } else { |
| | | [JRToast showWithText:@"å·²ä»å享åºä¸å é¤" bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | cell.buttonProLibrary.selected = NO; |
| | | [UMCustomShop umDetail_goods_detail_xpk_cancel]; |
| | | if ([self isHaveValue:object[@"msg"]]) { |
| | | [JRToast showWithText:object[@"msg"] bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | } |
| | | |
| | | } else { |
| | | [JRToast showWithText:object[@"msg"] bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | }); |
| | | |
| | | } fail:^(id object) { |
| | | [self.view hideToastActivity]; |
| | | self.isRequestAPI = NO; |
| | | }]; |
| | | } |
| | |
| | | } |
| | | |
| | | if ([vcName compare:@"SJProLibViewController"] == 0) { |
| | | [self userStorageaddstorage]; |
| | | [self onecClickBilling]; |
| | | } |
| | | } |
| | | |
| | |
| | | self.shopCoupon = NO; |
| | | return; |
| | | } |
| | | NSDictionary *params = @{@"uid":[ALUserInfoServiceManger fetchUID],@"auctionId":self.goodsModel.goodsId,@"from" : @"goodsDetail",@"source":self.from?:@""}; |
| | | NSDictionary *params = @{@"uid":[ALUserInfoServiceManger fetchUID],@"auctionId":self.goodsModel.goodsId?:@"",@"from" : @"goodsDetail",@"source":self.from?:@""}; |
| | | [self.view makeToastActivity:CSToastPositionCenter]; |
| | | @weakify(self) |
| | | [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP,@"goods/gettaobaolink"] param:params success:^(NSDictionary *object) { |
| | |
| | | AlibcTradeTaokeParams *taokeParams = [[AlibcTradeTaokeParams alloc] init]; |
| | | if (type == 1) { |
| | | taokeParams = nil; |
| | | [self.albcServiceManager pushOpenByUrl:self.shoppingUrl identity:nil webView:nil parentController:self.navigationController taoKeParams:taokeParams]; |
| | | [self.albcServiceManager pushOpenByUrl:self.shoppingUrl?:@"" identity:nil webView:nil parentController:self.navigationController taoKeParams:taokeParams]; |
| | | |
| | | } else { |
| | | // æ·å®¢ä¿¡æ¯ |
| | |
| | | taokeParams.adzoneId = self.alibaichuan.adZoneID; |
| | | taokeParams.extParams=@{@"taokeAppkey":self.alibaichuan.appKey}; |
| | | |
| | | id<AlibcTradePage> page = [AlibcTradePageFactory itemDetailPage:[NSString stringWithFormat:@"%@",goodId]]; |
| | | id<AlibcTradePage> page = [AlibcTradePageFactory itemDetailPage:[NSString stringWithFormat:@"%@",goodId?:@""]]; |
| | | [self.albcServiceManager pushOpenByBizCode:@"detail" page:page webView:nil parentController:self.navigationController taoKeParams:taokeParams]; |
| | | } |
| | | } |
| | |
| | | cell.shareValid = self.shareValid; |
| | | cell.isExpand = self.isExpand; |
| | | cell.model = self.goodsModel; |
| | | cell.storageState = self.storageState; |
| | | |
| | | @weakify(self) |
| | | cell.touchCheckLike = ^{ |
| | |
| | | [self.navigationController pushViewController:searchDetailMainVc animated:YES]; |
| | | }; |
| | | |
| | | [cell.buttonProLibrary addTarget:self action:@selector(ProLibraryTaped:) forControlEvents:UIControlEventTouchUpInside]; |
| | | [cell.buttonHairCircle addTarget:self action:@selector(ProLibraryTaped:) forControlEvents:UIControlEventTouchUpInside]; |
| | | |
| | | if (!_goodsModel) { |
| | | CATransition *animation = [CATransition animation]; |
| | |
| | | return 10; |
| | | |
| | | } else { |
| | | CGFloat heightFooter = 0, heightFom = 0, heightRecommend = 0.0 , heightBottom = 130; |
| | | CGFloat heightFooter = 0, heightCloud = 0, heightFom = 0, heightRecommend = 0.0 , heightBottom = 130; |
| | | if ([self isHaveValue:self.extraDictionary[@"cloudText"]]) { |
| | | heightCloud = 145; |
| | | } |
| | | if ([self isHaveValue:self.goodsModel.provcity]) { |
| | | heightFom = 46 + 10; |
| | | } |
| | |
| | | CGFloat heghtDescr = [self getLabelHeightWithText:self.goodsModel.descriptions width:SCREEN_WIDTH - 20 font:(SCREEN_WIDTH < 375)?10:12] + 37 + 15; |
| | | heightRecommend = heghtDescr; |
| | | } |
| | | heightFooter = heightFom + heightRecommend +heightBottom; |
| | | heightFooter = heightCloud + heightFom + heightRecommend +heightBottom; |
| | | return heightFooter; |
| | | } |
| | | |
| | |
| | | return view; |
| | | |
| | | } else { |
| | | CGFloat heightFooter = 0, heightFom = 0, heightRecommend = 0.0 , heightBottom = 130; |
| | | CGFloat heightFooter = 0, heightCloud = 0, heightFom = 0, heightRecommend = 0.0 , heightBottom = 130; |
| | | if ([self isHaveValue:self.extraDictionary[@"cloudText"]]) { |
| | | heightCloud = 145; |
| | | } |
| | | if ([self isHaveValue:self.goodsModel.provcity]) { |
| | | heightFom = 46 + 10; |
| | | } |
| | |
| | | CGFloat heghtDescr = [self getLabelHeightWithText:self.goodsModel.descriptions width:SCREEN_WIDTH - 20 font:(SCREEN_WIDTH < 375)?10:12] + 37 + 15; |
| | | heightRecommend = heghtDescr; |
| | | } |
| | | heightFooter = heightFom + heightRecommend +heightBottom; |
| | | heightFooter = heightCloud + heightFom + heightRecommend + heightBottom; |
| | | GoodsDetailFooterView *view = [[GoodsDetailFooterView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, heightFooter)]; |
| | | view.userInteractionEnabled = YES; |
| | | view.cloudText = self.extraDictionary[@"cloudText"]; |
| | | view.cloudPic = self.extraDictionary[@"cloudPic"]; |
| | | view.model = self.goodsModel; |
| | | |
| | | UITapGestureRecognizer *tapStore = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onClickStore)]; |
| | | [view addGestureRecognizer:tapStore]; |
| | | |
| | |
| | | |
| | | @interface GoodsDetailFooterView : UIView |
| | | |
| | | @property (nonatomic, strong, nullable) NSString *cloudPic; |
| | | @property (nonatomic, strong, nullable) NSString *cloudText; |
| | | |
| | | @property (nonatomic, strong, nullable) GoodsDetailBaseModel *model; |
| | | |
| | | @end |
| | |
| | | |
| | | #import "GoodsDetailFooterView.h" |
| | | #import "UIImageView+WebCache.h" |
| | | #import "TopLeftLabel.h" |
| | | |
| | | @interface GoodsDetailFooterView () |
| | | /// åå |
| | | @property (nonatomic, strong, nullable) ALButton *viewCloudBG; |
| | | @property (nonatomic, strong, nullable) UIView *viewCloudLine; |
| | | @property (nonatomic, strong, nullable) UILabel *labelCloudTitle; |
| | | @property (nonatomic, strong, nullable) ALButton *viewCloudContentBG; |
| | | @property (nonatomic, strong, nullable) TopLeftLabel *labelCloudContent; |
| | | @property (nonatomic, strong, nullable) UIImageView *imageViewCloudLogo; |
| | | |
| | | @property (nonatomic, strong, nullable) UIView *topGaryLine; |
| | | |
| | |
| | | } |
| | | |
| | | - (void)viewConfig { |
| | | [self addSubview:self.viewCloudBG]; |
| | | [self.viewCloudBG addSubview:self.viewCloudLine]; |
| | | [self.viewCloudBG addSubview:self.labelCloudTitle]; |
| | | [self.viewCloudBG addSubview:self.viewCloudContentBG]; |
| | | [self.viewCloudContentBG addSubview:self.imageViewCloudLogo]; |
| | | [self.viewCloudContentBG addSubview:self.labelCloudContent]; |
| | | |
| | | self.viewCloudBG.sd_layout.leftSpaceToView(self, 0).topSpaceToView(self, 0).rightSpaceToView(self, 0).heightIs(145); |
| | | |
| | | self.viewCloudLine.sd_layout.leftSpaceToView(self.viewCloudBG, 0).topSpaceToView(self.viewCloudBG, 0).rightSpaceToView(self.viewCloudBG, 0).heightIs(1); |
| | | |
| | | self.labelCloudTitle.sd_layout.leftSpaceToView(self.viewCloudBG, 13).topSpaceToView(self.viewCloudBG, 11).widthIs(80).heightIs(13); |
| | | |
| | | self.viewCloudContentBG.sd_layout.leftSpaceToView(self.viewCloudBG, 10).topSpaceToView(self.labelCloudTitle, 8).rightSpaceToView(self.viewCloudBG, 10).heightIs(102); |
| | | self.viewCloudContentBG.sd_cornerRadius = @5; |
| | | |
| | | self.imageViewCloudLogo.sd_layout.leftSpaceToView(self.viewCloudContentBG, 10).topSpaceToView(self.viewCloudContentBG, 10).widthIs(83).heightIs(83); |
| | | self.imageViewCloudLogo.sd_cornerRadius = @5; |
| | | |
| | | self.labelCloudContent.sd_layout.leftSpaceToView(self.imageViewCloudLogo, 10).topSpaceToView(self.viewCloudContentBG, 11).rightSpaceToView(self.viewCloudContentBG, 12).heightIs(80); |
| | | |
| | | // åè´§å° |
| | | [self addSubview:self.ViewTopWhite]; |
| | | self.ViewTopWhite.sd_layout.leftSpaceToView(self, 0).topSpaceToView(self, 0).rightSpaceToView(self, 0).heightIs(46); |
| | | self.ViewTopWhite.sd_layout.leftSpaceToView(self, 0).topSpaceToView(self.viewCloudBG, 0).rightSpaceToView(self, 0).heightIs(46); |
| | | |
| | | [self.ViewTopWhite addSubview:self.buttonFrom]; |
| | | self.buttonFrom.sd_layout.leftSpaceToView(self.ViewTopWhite, 0).rightSpaceToView(self.ViewTopWhite, 0).centerYEqualToView(self.ViewTopWhite).heightIs(46); |
| | | |
| | | [self addSubview:self.topGaryLine]; |
| | | self.topGaryLine.sd_layout.leftSpaceToView(self, 0).topSpaceToView(self, 0).rightSpaceToView(self, 0).heightIs(1); |
| | | self.topGaryLine.sd_layout.leftSpaceToView(self, 0).topSpaceToView(self.viewCloudBG, 0).rightSpaceToView(self, 0).heightIs(1); |
| | | |
| | | [self addSubview:self.viewCuXianOne]; |
| | | self.viewCuXianOne.sd_layout.leftSpaceToView(self, 0).topSpaceToView(self.ViewTopWhite, 0).rightSpaceToView(self, 0).heightIs(10); |
| | |
| | | } |
| | | |
| | | #pragma mark --- setter --- |
| | | - (void)setCloudPic:(NSString *)cloudPic { |
| | | _cloudPic = cloudPic; |
| | | } |
| | | |
| | | - (void)setCloudText:(NSString *)cloudText { |
| | | _cloudText = cloudText; |
| | | } |
| | | |
| | | - (void)setModel:(GoodsDetailBaseModel *)model { |
| | | _model = model; |
| | | if (_model) { |
| | | self.labelCloudContent.text = _cloudText; |
| | | [self.imageViewCloudLogo sd_setFadeImageWithURL:[NSURL URLWithString:_cloudPic]]; |
| | | |
| | | if (![self isHaveValue:_cloudText]) { |
| | | self.viewCloudBG.hidden = YES; |
| | | self.ViewTopWhite.sd_resetLayout.leftSpaceToView(self, 0).topSpaceToView(self, 0).rightSpaceToView(self, 0).heightIs(46); |
| | | self.topGaryLine.sd_resetLayout.leftSpaceToView(self, 0).topSpaceToView(self, 0).rightSpaceToView(self, 0).heightIs(1); |
| | | } |
| | | //åè´§å° |
| | | [self.buttonFrom setTitle:[NSString stringWithFormat:@" %@",model.provcity] forState:UIControlStateNormal]; |
| | | self.labelContentRecommenlanguage.text = model.descriptions; |
| | |
| | | } |
| | | |
| | | #pragma mark --- getter --- |
| | | - (ALButton *)viewCloudBG { |
| | | if (!_viewCloudBG) { |
| | | _viewCloudBG = [[ALButton alloc] init]; |
| | | _viewCloudBG.backgroundColor = [UIColor whiteColor]; |
| | | } |
| | | return _viewCloudBG;; |
| | | } |
| | | |
| | | - (UIView *)viewCloudLine { |
| | | if (!_viewCloudLine) { |
| | | _viewCloudLine = [[UIView alloc] init]; |
| | | _viewCloudLine.backgroundColor = XYRBackgroundColor; |
| | | } |
| | | return _viewCloudLine;; |
| | | } |
| | | |
| | | - (ALButton *)viewCloudContentBG { |
| | | if (!_viewCloudContentBG) { |
| | | _viewCloudContentBG = [[ALButton alloc] init]; |
| | | _viewCloudContentBG.backgroundColor = UIColorFromRGBValue(0xF7F7F7); |
| | | _viewCloudContentBG.enabled = YES; |
| | | } |
| | | return _viewCloudContentBG; |
| | | } |
| | | |
| | | |
| | | - (UILabel *)labelCloudTitle { |
| | | if (!_labelCloudTitle) { |
| | | _labelCloudTitle = [[UILabel alloc] init]; |
| | | _labelCloudTitle.text = @"ä¸é®ååææ¡"; |
| | | _labelCloudTitle.font = [UIFont systemFontOfSize:12]; |
| | | _labelCloudTitle.textAlignment = NSTextAlignmentLeft; |
| | | _labelCloudTitle.textColor = UIColorFromRGBValue(0x333333); |
| | | } |
| | | return _labelCloudTitle; |
| | | } |
| | | |
| | | - (UIImageView *)imageViewCloudLogo { |
| | | if (!_imageViewCloudLogo) { |
| | | _imageViewCloudLogo = [[UIImageView alloc] init]; |
| | | _imageViewCloudLogo.backgroundColor = [UIColor whiteColor]; |
| | | [_imageViewCloudLogo setContentScaleFactor:[[UIScreen mainScreen] scale]]; |
| | | _imageViewCloudLogo.contentMode = UIViewContentModeScaleAspectFill; |
| | | _imageViewCloudLogo.autoresizingMask = UIViewAutoresizingFlexibleHeight; |
| | | _imageViewCloudLogo.clipsToBounds = YES; |
| | | |
| | | } |
| | | return _imageViewCloudLogo;; |
| | | } |
| | | |
| | | - (UIImageView *)logoImageView { |
| | | if (!_logoImageView) { |
| | | _logoImageView = [[UIImageView alloc] init]; |
| | |
| | | return _logoImageView; |
| | | } |
| | | |
| | | - (TopLeftLabel *)labelCloudContent { |
| | | if (!_labelCloudContent) { |
| | | _labelCloudContent = [[TopLeftLabel alloc] init]; |
| | | _labelCloudContent.textColor = UIColorFromRGBValue(0x999999); |
| | | _labelCloudContent.textAlignment = NSTextAlignmentLeft; |
| | | _labelCloudContent.numberOfLines = 6; |
| | | _labelCloudContent.font = [UIFont systemFontOfSize:11]; |
| | | } |
| | | return _labelCloudContent; |
| | | } |
| | | |
| | | |
| | | - (UIView *)ViewTopWhite { |
| | | if (!_ViewTopWhite) { |
| | | _ViewTopWhite = [[UIView alloc] init]; |
| | |
| | | @property (nonatomic, assign) NSInteger goodsType; |
| | | /// æç´¢æé® |
| | | @property (nonatomic, nullable, strong) ALButton *buttonSearch; |
| | | /// æ¶èåºæé® |
| | | @property (nonatomic, nullable, strong) ALButton *buttonProLibrary; |
| | | /// åå |
| | | @property (nonatomic, nullable, strong) ALButton *buttonHairCircle; |
| | | |
| | | |
| | | /// æ¯å¦æè¿å© |
| | |
| | | @property (nonatomic, nullable, weak) id<GoodsHeaderTableViewCellDelegate>delegate; |
| | | /// æ¯å¦å±å¼ææå¸ï¼å¯¹äºJDæ¥è¯´ï¼ |
| | | @property (nonatomic, assign) BOOL isExpand; |
| | | /// æ¯å¦æ¶èåº |
| | | @property (nonatomic, assign) BOOL storageState; |
| | | ///æç´¢ç¸ä¼¼ç©å |
| | | @property (nonatomic) touchCheckLike _Nullable touchCheckLike; |
| | | |
| | |
| | | [self.contentView addSubview:self.buttonViewMore]; |
| | | |
| | | if ([YTHsharedManger startManger].iosonling == 0) { |
| | | [self.contentView addSubview:self.buttonProLibrary]; |
| | | [self.contentView addSubview:self.buttonHairCircle]; |
| | | [self.contentView addSubview:self.buttonSearch]; |
| | | [self.contentView addSubview:self.viewSXLine]; |
| | | } |
| | |
| | | [self.buttonViewMore setImageEdgeInsets:UIEdgeInsetsMake(0, _buttonViewMore.titleLabel.bounds.size.width, 0, -_buttonViewMore.titleLabel.bounds.size.width)]; |
| | | |
| | | //æ¶èåºæé®åæ¶èæé® |
| | | self.buttonProLibrary.sd_layout.leftSpaceToView(self.contentView, 10).topSpaceToView(self.viewCouponBG, 20).widthIs((SCREEN_WIDTH - 30) / 2).heightIs(30); |
| | | self.buttonHairCircle.sd_layout.leftSpaceToView(self.contentView, 10).topSpaceToView(self.viewCouponBG, 20).widthIs((SCREEN_WIDTH - 30) / 2).heightIs(30); |
| | | self.buttonSearch.sd_layout.rightSpaceToView(self.contentView, 10).topSpaceToView(self.viewCouponBG, 20).widthIs((SCREEN_WIDTH - 30) / 2).heightIs(30); |
| | | |
| | | self.viewSXLine.sd_layout.centerXEqualToView(self.contentView).centerYEqualToView(self.buttonProLibrary).widthIs(1).heightIs(15); |
| | | self.viewSXLine.sd_layout.centerXEqualToView(self.contentView).centerYEqualToView(self.buttonHairCircle).widthIs(1).heightIs(15); |
| | | } |
| | | |
| | | - (void)setViewBorder:(UIView *)view width:(CGFloat)width color:(UIColor *)color { |
| | |
| | | |
| | | - (void)setIsExpand:(BOOL)isExpand { |
| | | _isExpand = isExpand; |
| | | } |
| | | |
| | | - (void)setStorageState:(BOOL)storageState { |
| | | _storageState = storageState; |
| | | if (storageState) { |
| | | self.buttonProLibrary.selected = YES; |
| | | |
| | | } else { |
| | | self.buttonProLibrary.selected = NO; |
| | | } |
| | | } |
| | | |
| | | - (void)setModel:(GoodsDetailBaseModel *)model { |
| | |
| | | } |
| | | } |
| | | |
| | | self.buttonProLibrary.sd_resetLayout.leftSpaceToView(self.contentView, 10).topSpaceToView(self.viewCouponBG, topspaceButtonViewMore).widthIs((SCREEN_WIDTH - 30) / 2).heightIs(30); |
| | | self.buttonHairCircle.sd_resetLayout.leftSpaceToView(self.contentView, 10).topSpaceToView(self.viewCouponBG, topspaceButtonViewMore).widthIs((SCREEN_WIDTH - 30) / 2).heightIs(30); |
| | | self.buttonSearch.sd_resetLayout.rightSpaceToView(self.contentView, 10).topSpaceToView(self.viewCouponBG, topspaceButtonViewMore).widthIs((SCREEN_WIDTH - 30) / 2).heightIs(30); |
| | | |
| | | if (!_shareValid) { |
| | | self.buttonProLibrary.hidden = YES; |
| | | self.buttonHairCircle.hidden = YES; |
| | | self.buttonSearch.hidden = YES; |
| | | } |
| | | } |
| | |
| | | browser.sourceImagesContainerView = self; // åå¾çç¶æ§ä»¶ |
| | | browser.currentImageIndex = (int)tag; |
| | | browser.imageArray = self.array; |
| | | browser.imageCount = self.array.count; // å¾çæ»æ° |
| | | browser.imageCount = self.array.count; // |
| | | browser.delegate = self; |
| | | [browser show]; |
| | | } |
| | |
| | | return _buttonSearch; |
| | | } |
| | | |
| | | - (ALButton *)buttonProLibrary { |
| | | if (!_buttonProLibrary) { |
| | | _buttonProLibrary = [ALButton buttonWithType:UIButtonTypeCustom]; |
| | | - (ALButton *)buttonHairCircle { |
| | | if (!_buttonHairCircle) { |
| | | _buttonHairCircle = [ALButton buttonWithType:UIButtonTypeCustom]; |
| | | //_ProLibraryBtn.frame = CGRectMake(0, 0, (SCREEN_WIDTH - 28) / 2, 30); |
| | | [_buttonProLibrary setTitleColor:UIColorFromRGBValue(0xE5005C) forState:UIControlStateNormal]; |
| | | [_buttonProLibrary setImage:[UIImage imageNamed:@"icon_å å
¥éååº"] forState:UIControlStateNormal]; |
| | | [_buttonProLibrary setImage:[UIImage imageNamed:@"icon_åæ¶å å
¥éååº"] forState:UIControlStateSelected]; |
| | | [_buttonProLibrary setTitle:@" å å
¥å享åº" forState:UIControlStateNormal]; |
| | | [_buttonProLibrary setTitle:@" å·²å å
¥å享åº" forState:UIControlStateSelected]; |
| | | _buttonProLibrary.titleLabel.font = [UIFont systemFontOfSize:14]; |
| | | [_buttonHairCircle setTitleColor:UIColorFromRGBValue(0xE5005C) forState:UIControlStateNormal]; |
| | | [_buttonHairCircle setImage:[UIImage imageNamed:@"icon_goodsDetail_hairCircle"] forState:UIControlStateNormal]; |
| | | [_buttonHairCircle setTitle:@" ä¸é®åå" forState:UIControlStateNormal]; |
| | | _buttonHairCircle.titleLabel.font = [UIFont systemFontOfSize:14]; |
| | | } |
| | | return _buttonProLibrary; |
| | | return _buttonHairCircle; |
| | | } |
| | | |
| | | - (ALButton *)buttonFanliBi { |
| | |
| | | |
| | | @interface GoosStoreInfoView : UIView |
| | | |
| | | @property (nonatomic, strong, nullable) NSString *cloudPic; |
| | | @property (nonatomic, strong, nullable) NSString *cloudText; |
| | | |
| | | @property (nonatomic, strong, nullable) GoodsDetailBaseModel *model; |
| | | |
| | | @end |
| | |
| | | // |
| | | |
| | | #import "GoosStoreInfoView.h" |
| | | #import "TopLeftLabel.h" |
| | | |
| | | @interface GoosStoreInfoView () |
| | | |
| | | /// åå |
| | | @property (nonatomic, strong, nullable) ALButton *viewCloudBG; |
| | | @property (nonatomic, strong, nullable) UIView *viewCloudLine; |
| | | @property (nonatomic, strong, nullable) UILabel *labelCloudTitle; |
| | | @property (nonatomic, strong, nullable) ALButton *viewCloudContentBG; |
| | | @property (nonatomic, strong, nullable) TopLeftLabel *labelCloudContent; |
| | | @property (nonatomic, strong, nullable) UIImageView *imageViewCloudLogo; |
| | | ///æ¨èè¯ |
| | | @property (nonatomic, strong, nullable) ALButton *buttonRecommenlanguage; |
| | | |
| | |
| | | self = [super initWithFrame:frame]; |
| | | if (self) { |
| | | self.backgroundColor = XYRBackgroundColor; |
| | | |
| | | [self viewConfig]; |
| | | } |
| | | return self; |
| | | } |
| | | |
| | | |
| | | |
| | | - (void)viewConfig { |
| | | [self addSubview:self.viewCloudBG]; |
| | | [self.viewCloudBG addSubview:self.viewCloudLine]; |
| | | [self.viewCloudBG addSubview:self.labelCloudTitle]; |
| | | [self.viewCloudBG addSubview:self.viewCloudContentBG]; |
| | | [self.viewCloudContentBG addSubview:self.imageViewCloudLogo]; |
| | | [self.viewCloudContentBG addSubview:self.labelCloudContent]; |
| | | |
| | | self.viewCloudBG.sd_layout.leftSpaceToView(self, 0).topSpaceToView(self, 0).rightSpaceToView(self, 0).heightIs(145); |
| | | |
| | | self.viewCloudLine.sd_layout.leftSpaceToView(self.viewCloudBG, 0).topSpaceToView(self.viewCloudBG, 0).rightSpaceToView(self.viewCloudBG, 0).heightIs(1); |
| | | |
| | | self.labelCloudTitle.sd_layout.leftSpaceToView(self.viewCloudBG, 13).topSpaceToView(self.viewCloudBG, 11).widthIs(80).heightIs(13); |
| | | |
| | | self.viewCloudContentBG.sd_layout.leftSpaceToView(self.viewCloudBG, 10).topSpaceToView(self.labelCloudTitle, 8).rightSpaceToView(self.viewCloudBG, 10).heightIs(102); |
| | | self.viewCloudContentBG.sd_cornerRadius = @5; |
| | | |
| | | self.imageViewCloudLogo.sd_layout.leftSpaceToView(self.viewCloudContentBG, 10).topSpaceToView(self.viewCloudContentBG, 10).widthIs(83).heightIs(83); |
| | | self.imageViewCloudLogo.sd_cornerRadius = @5; |
| | | |
| | | self.labelCloudContent.sd_layout.leftSpaceToView(self.imageViewCloudLogo, 10).topSpaceToView(self.viewCloudContentBG, 11).rightSpaceToView(self.viewCloudContentBG, 12).heightIs(80); |
| | | |
| | | ///æ¨èè¯ |
| | | [self addSubview:self.buttonRecommenlanguage]; |
| | | [self.buttonRecommenlanguage addSubview:self.labelTitleRecommenlanguage]; |
| | | [self.buttonRecommenlanguage addSubview:self.labelContentRecommenlanguage]; |
| | | |
| | | self.buttonRecommenlanguage.sd_layout.leftSpaceToView(self, 0).topSpaceToView(self, 10).rightSpaceToView(self, 0).heightIs(0); |
| | | self.buttonRecommenlanguage.sd_layout.leftSpaceToView(self, 0).topSpaceToView(self.viewCloudBG, 10).rightSpaceToView(self, 0).heightIs(0); |
| | | |
| | | self.labelTitleRecommenlanguage.sd_layout.leftSpaceToView(self.buttonRecommenlanguage, 10).topSpaceToView(self.buttonRecommenlanguage, 13).rightSpaceToView(self.buttonRecommenlanguage, 10).heightIs(15); |
| | | |
| | | self.labelContentRecommenlanguage.sd_layout.leftSpaceToView(self.buttonRecommenlanguage, 10).topSpaceToView(self.labelTitleRecommenlanguage, 9).rightSpaceToView(self.buttonRecommenlanguage, 10).autoHeightRatio(0); |
| | | } |
| | | |
| | | - (void)setCloudPic:(NSString *)cloudPic { |
| | | _cloudPic = cloudPic; |
| | | } |
| | | |
| | | - (void)setCloudText:(NSString *)cloudText { |
| | | _cloudText = cloudText; |
| | | } |
| | | |
| | | - (void)setModel:(GoodsDetailBaseModel *)model { |
| | | _model = model; |
| | | if (_model) { |
| | | self.labelCloudContent.text = _cloudText; |
| | | [self.imageViewCloudLogo sd_setFadeImageWithURL:[NSURL URLWithString:_cloudPic]]; |
| | | |
| | | if (![self isHaveValue:_cloudText]) { |
| | | self.viewCloudBG.hidden = YES; |
| | | self.buttonRecommenlanguage.sd_layout.leftSpaceToView(self, 0).topSpaceToView(self, 10).rightSpaceToView(self, 0).heightIs(0); |
| | | } |
| | | |
| | | self.labelContentRecommenlanguage.text = model.descriptions; |
| | | |
| | | CGFloat heghtDescr = [self getLabelHeightWithText:model.descriptions width:SCREEN_WIDTH - 20 font:(SCREEN_WIDTH < 375)?10:12] + 37 + 15; |
| | |
| | | } |
| | | } |
| | | |
| | | - (ALButton *)viewCloudBG { |
| | | if (!_viewCloudBG) { |
| | | _viewCloudBG = [[ALButton alloc] init]; |
| | | _viewCloudBG.backgroundColor = [UIColor whiteColor]; |
| | | } |
| | | return _viewCloudBG;; |
| | | } |
| | | |
| | | - (UIView *)viewCloudLine { |
| | | if (!_viewCloudLine) { |
| | | _viewCloudLine = [[UIView alloc] init]; |
| | | _viewCloudLine.backgroundColor = XYRBackgroundColor; |
| | | } |
| | | return _viewCloudLine;; |
| | | } |
| | | |
| | | - (ALButton *)viewCloudContentBG { |
| | | if (!_viewCloudContentBG) { |
| | | _viewCloudContentBG = [[ALButton alloc] init]; |
| | | _viewCloudContentBG.backgroundColor = UIColorFromRGBValue(0xF7F7F7); |
| | | _viewCloudContentBG.enabled = YES; |
| | | } |
| | | return _viewCloudContentBG; |
| | | } |
| | | |
| | | |
| | | - (UILabel *)labelCloudTitle { |
| | | if (!_labelCloudTitle) { |
| | | _labelCloudTitle = [[UILabel alloc] init]; |
| | | _labelCloudTitle.text = @"ä¸é®ååææ¡"; |
| | | _labelCloudTitle.font = [UIFont systemFontOfSize:12]; |
| | | _labelCloudTitle.textAlignment = NSTextAlignmentLeft; |
| | | _labelCloudTitle.textColor = UIColorFromRGBValue(0x333333); |
| | | } |
| | | return _labelCloudTitle; |
| | | } |
| | | |
| | | - (UIImageView *)imageViewCloudLogo { |
| | | if (!_imageViewCloudLogo) { |
| | | _imageViewCloudLogo = [[UIImageView alloc] init]; |
| | | _imageViewCloudLogo.backgroundColor = [UIColor whiteColor]; |
| | | [_imageViewCloudLogo setContentScaleFactor:[[UIScreen mainScreen] scale]]; |
| | | _imageViewCloudLogo.contentMode = UIViewContentModeScaleAspectFill; |
| | | _imageViewCloudLogo.autoresizingMask = UIViewAutoresizingFlexibleHeight; |
| | | _imageViewCloudLogo.clipsToBounds = YES; |
| | | |
| | | } |
| | | return _imageViewCloudLogo;; |
| | | } |
| | | |
| | | |
| | | - (TopLeftLabel *)labelCloudContent { |
| | | if (!_labelCloudContent) { |
| | | _labelCloudContent = [[TopLeftLabel alloc] init]; |
| | | _labelCloudContent.textColor = UIColorFromRGBValue(0x999999); |
| | | _labelCloudContent.textAlignment = NSTextAlignmentLeft; |
| | | _labelCloudContent.numberOfLines = 6; |
| | | _labelCloudContent.font = [UIFont systemFontOfSize:11]; |
| | | } |
| | | return _labelCloudContent; |
| | | } |
| | | |
| | | - (ALButton *)buttonRecommenlanguage { |
| | | if (!_buttonRecommenlanguage) { |
| | | _buttonRecommenlanguage = [ALButton buttonWithType:UIButtonTypeCustom]; |
| | |
| | | @property (nonatomic, nullable, strong) UILabel *quanTime; |
| | | @property (nonatomic, nullable, strong) UIButton *quanButton; |
| | | @property (nonatomic, nullable, strong) ALButton *buttonSearch; |
| | | @property (nonatomic, nullable, strong) ALButton *ProLibraryBtn; |
| | | @property (nonatomic, assign) BOOL storageState; |
| | | /// åå |
| | | @property (nonatomic, nullable, strong) ALButton *buttonHairCircle; |
| | | |
| | | @property (nonatomic, nullable, copy) NSString *from; |
| | | @property (nonatomic, nullable, weak) id<GoodsHeaderTableViewCellDelegate>delegate; |
| | | ///æç´¢ç¸ä¼¼ç©å |
| | |
| | | |
| | | if ([YTHsharedManger startManger].iosonling == 0) { |
| | | [self.contentView addSubview:self.buttonSearch]; |
| | | [self.contentView addSubview:self.ProLibraryBtn]; |
| | | [self.contentView addSubview:self.buttonHairCircle]; |
| | | [self.contentView addSubview:self.viewSXLine]; |
| | | } |
| | | self.viewSXLine.sd_layout.centerXEqualToView(self.contentView).centerYEqualToView(self.ProLibraryBtn).widthIs(1).heightIs(15); |
| | | self.viewSXLine.sd_layout.centerXEqualToView(self.contentView).centerYEqualToView(self.buttonHairCircle).widthIs(1).heightIs(15); |
| | | } |
| | | |
| | | - (void)onTouchMaxCoupon { |
| | |
| | | { |
| | | [self.timer invalidate]; |
| | | self.timer = nil; |
| | | } |
| | | |
| | | - (void)setStorageState:(BOOL)storageState { |
| | | _storageState = storageState; |
| | | if (storageState) { |
| | | self.ProLibraryBtn.selected = YES; |
| | | |
| | | } else { |
| | | self.ProLibraryBtn.selected = NO; |
| | | } |
| | | } |
| | | |
| | | - (void)setviewsFrameWithBor:(BOOL)bor |
| | |
| | | |
| | | if (!model.hasCoupon || (_from && [_from isEqualToString:@"miandan"])) { |
| | | [UIView performWithoutAnimation:^{ |
| | | self.ProLibraryBtn.frame = CGRectMake(14, CGRectGetMaxY(self.titleLabel.frame) + 10 + sapceTop, (SCREEN_WIDTH - 28) / 2, 30); |
| | | self.buttonSearch.frame = CGRectMake(SCREEN_WIDTH - 14 - (SCREEN_WIDTH - 28) / 2, CGRectGetMinY(self.ProLibraryBtn.frame), (SCREEN_WIDTH - 28) / 2, 30); |
| | | self.buttonHairCircle.frame = CGRectMake(14, CGRectGetMaxY(self.titleLabel.frame) + 10 + sapceTop, (SCREEN_WIDTH - 28) / 2, 30); |
| | | self.buttonSearch.frame = CGRectMake(SCREEN_WIDTH - 14 - (SCREEN_WIDTH - 28) / 2, CGRectGetMinY(self.buttonHairCircle.frame), (SCREEN_WIDTH - 28) / 2, 30); |
| | | }]; |
| | | |
| | | } else { |
| | | [UIView performWithoutAnimation:^{ |
| | | [self.taokoulingImageView updateLayout]; |
| | | self.ProLibraryBtn.frame = CGRectMake(14, CGRectGetMaxY(self.taokoulingImageView.frame) + 15, (SCREEN_WIDTH - 28) / 2, 30); |
| | | self.buttonHairCircle.frame = CGRectMake(14, CGRectGetMaxY(self.taokoulingImageView.frame) + 15, (SCREEN_WIDTH - 28) / 2, 30); |
| | | self.buttonSearch.frame = CGRectMake(SCREEN_WIDTH - 14 - (SCREEN_WIDTH - 28) / 2, CGRectGetMaxY(self.taokoulingImageView.frame) + 15, (SCREEN_WIDTH - 28) / 2, 30); |
| | | |
| | | if (model.couponInfo.token && ![model.couponInfo.token isEqualToString:@""]) { |
| | |
| | | |
| | | } else { |
| | | self.taokoulingImageView.hidden = YES; |
| | | self.ProLibraryBtn.frame = CGRectMake(14, CGRectGetMaxY(self.couponImage.frame) + 15, (SCREEN_WIDTH - 28) / 2, 30); |
| | | self.buttonHairCircle.frame = CGRectMake(14, CGRectGetMaxY(self.couponImage.frame) + 15, (SCREEN_WIDTH - 28) / 2, 30); |
| | | self.buttonSearch.frame = CGRectMake(SCREEN_WIDTH - 14 - (SCREEN_WIDTH - 28) / 2, CGRectGetMaxY(self.couponImage.frame) + 15, (SCREEN_WIDTH - 28) / 2, 30); |
| | | } |
| | | }]; |
| | |
| | | |
| | | if (!_shareValid) {// 没æå享 éèå享æé®è·åäº«åº |
| | | self.buttonSearch.hidden = YES; |
| | | self.ProLibraryBtn.hidden = YES; |
| | | self.buttonHairCircle.hidden = YES; |
| | | } |
| | | |
| | | self.quanMoney.text = [NSString stringWithFormat:@"伿 å¸ Â¥ %@",model.couponInfo.amount]; |
| | |
| | | return _buttonSearch; |
| | | } |
| | | |
| | | - (ALButton *)ProLibraryBtn |
| | | { |
| | | if (_ProLibraryBtn) { |
| | | return _ProLibraryBtn; |
| | | - (ALButton *)buttonHairCircle { |
| | | if (_buttonHairCircle) { |
| | | return _buttonHairCircle; |
| | | } |
| | | _ProLibraryBtn = [ALButton buttonWithType:UIButtonTypeCustom]; |
| | | _ProLibraryBtn.frame = CGRectMake(0, 0, (SCREEN_WIDTH - 28) / 2, 30); |
| | | [_ProLibraryBtn setTitleColor:UIColorFromRGBValue(0xE5005C) forState:UIControlStateNormal]; |
| | | [_ProLibraryBtn setImage:[UIImage imageNamed:@"icon_å å
¥éååº"] forState:UIControlStateNormal]; |
| | | [_ProLibraryBtn setImage:[UIImage imageNamed:@"icon_åæ¶å å
¥éååº"] forState:UIControlStateSelected]; |
| | | [_ProLibraryBtn setTitle:@" å å
¥å享åº" forState:UIControlStateNormal]; |
| | | [_ProLibraryBtn setTitle:@" å·²å å
¥å享åº" forState:UIControlStateSelected]; |
| | | _ProLibraryBtn.titleLabel.font = [UIFont systemFontOfSize:14]; |
| | | return _ProLibraryBtn; |
| | | _buttonHairCircle = [ALButton buttonWithType:UIButtonTypeCustom]; |
| | | _buttonHairCircle.frame = CGRectMake(0, 0, (SCREEN_WIDTH - 28) / 2, 30); |
| | | [_buttonHairCircle setTitleColor:UIColorFromRGBValue(0xE5005C) forState:UIControlStateNormal]; |
| | | [_buttonHairCircle setImage:[UIImage imageNamed:@"icon_goodsDetail_hairCircle"] forState:UIControlStateNormal]; |
| | | [_buttonHairCircle setTitle:@" ä¸é®åå" forState:UIControlStateNormal]; |
| | | _buttonHairCircle.titleLabel.font = [UIFont systemFontOfSize:14]; |
| | | return _buttonHairCircle; |
| | | } |
| | | |
| | | - (UIView *)viewMaxCoupon |
| | |
| | | @property (nonatomic, assign) NSInteger goodsType; |
| | | /// æç´¢æé® |
| | | @property (nonatomic, nullable, strong) ALButton *buttonSearch; |
| | | /// æ¶èåºæé® |
| | | @property (nonatomic, nullable, strong) ALButton *buttonProLibrary; |
| | | |
| | | /// åå |
| | | @property (nonatomic, nullable, strong) ALButton *buttonHairCircle; |
| | | |
| | | /// æ¯å¦æè¿å© |
| | | @property (nonatomic, assign) BOOL fanliValid; |
| | |
| | | @property (nonatomic, nullable, weak) id<JDGoodsInfoCellDelegate>delegate; |
| | | /// æ¯å¦å±å¼ææå¸ï¼å¯¹äºJDæ¥è¯´ï¼ |
| | | @property (nonatomic, assign) BOOL isExpand; |
| | | /// æ¯å¦æ¶èåº |
| | | @property (nonatomic, assign) BOOL storageState; |
| | | ///æç´¢ç¸ä¼¼ç©å |
| | | @property (nonatomic) touchCheckLike _Nullable touchCheckLike; |
| | | |
| | |
| | | [self.contentView addSubview:self.buttonViewMore]; |
| | | |
| | | if ([YTHsharedManger startManger].iosonling == 0) { |
| | | [self.contentView addSubview:self.buttonProLibrary]; |
| | | [self.contentView addSubview:self.buttonHairCircle]; |
| | | [self.contentView addSubview:self.buttonSearch]; |
| | | [self.contentView addSubview:self.viewSXLine]; |
| | | } |
| | |
| | | [self.buttonViewMore setImageEdgeInsets:UIEdgeInsetsMake(0, _buttonViewMore.titleLabel.bounds.size.width, 0, -_buttonViewMore.titleLabel.bounds.size.width)]; |
| | | |
| | | //æ¶èåºæé®åæ¶èæé® |
| | | self.buttonProLibrary.sd_layout.leftSpaceToView(self.contentView, 10).topSpaceToView(self.viewCouponBG, 20).widthIs((SCREEN_WIDTH - 30) / 2).heightIs(30); |
| | | self.buttonHairCircle.sd_layout.leftSpaceToView(self.contentView, 10).topSpaceToView(self.viewCouponBG, 20).widthIs((SCREEN_WIDTH - 30) / 2).heightIs(30); |
| | | self.buttonSearch.sd_layout.rightSpaceToView(self.contentView, 10).topSpaceToView(self.viewCouponBG, 20).widthIs((SCREEN_WIDTH - 30) / 2).heightIs(30); |
| | | |
| | | self.viewSXLine.sd_layout.centerXEqualToView(self.contentView).centerYEqualToView(self.buttonProLibrary).widthIs(1).heightIs(15); |
| | | self.viewSXLine.sd_layout.centerXEqualToView(self.contentView).centerYEqualToView(self.buttonHairCircle).widthIs(1).heightIs(15); |
| | | } |
| | | |
| | | - (void)setViewBorder:(UIView *)view width:(CGFloat)width color:(UIColor *)color { |
| | |
| | | |
| | | - (void)setIsExpand:(BOOL)isExpand { |
| | | _isExpand = isExpand; |
| | | } |
| | | |
| | | - (void)setStorageState:(BOOL)storageState { |
| | | _storageState = storageState; |
| | | if (storageState) { |
| | | self.buttonProLibrary.selected = YES; |
| | | |
| | | } else { |
| | | self.buttonProLibrary.selected = NO; |
| | | } |
| | | } |
| | | |
| | | - (void)setModel:(GoodsDetailBaseModel *)model { |
| | |
| | | } |
| | | } |
| | | |
| | | self.buttonProLibrary.sd_resetLayout.leftSpaceToView(self.contentView, 10).topSpaceToView(self.viewCouponBG, topspaceButtonViewMore).widthIs((SCREEN_WIDTH - 30) / 2).heightIs(30); |
| | | self.buttonHairCircle.sd_resetLayout.leftSpaceToView(self.contentView, 10).topSpaceToView(self.viewCouponBG, topspaceButtonViewMore).widthIs((SCREEN_WIDTH - 30) / 2).heightIs(30); |
| | | self.buttonSearch.sd_resetLayout.rightSpaceToView(self.contentView, 10).topSpaceToView(self.viewCouponBG, topspaceButtonViewMore).widthIs((SCREEN_WIDTH - 30) / 2).heightIs(30); |
| | | |
| | | if (!_shareValid) { |
| | | self.buttonProLibrary.hidden = YES; |
| | | self.buttonHairCircle.hidden = YES; |
| | | self.buttonSearch.hidden = YES; |
| | | } |
| | | } |
| | |
| | | return _buttonSearch; |
| | | } |
| | | |
| | | - (ALButton *)buttonProLibrary { |
| | | if (!_buttonProLibrary) { |
| | | _buttonProLibrary = [ALButton buttonWithType:UIButtonTypeCustom]; |
| | | - (ALButton *)buttonHairCircle { |
| | | if (!_buttonHairCircle) { |
| | | _buttonHairCircle = [ALButton buttonWithType:UIButtonTypeCustom]; |
| | | //_ProLibraryBtn.frame = CGRectMake(0, 0, (SCREEN_WIDTH - 28) / 2, 30); |
| | | [_buttonProLibrary setTitleColor:UIColorFromRGBValue(0xE5005C) forState:UIControlStateNormal]; |
| | | [_buttonProLibrary setImage:[UIImage imageNamed:@"icon_å å
¥éååº"] forState:UIControlStateNormal]; |
| | | [_buttonProLibrary setImage:[UIImage imageNamed:@"icon_åæ¶å å
¥éååº"] forState:UIControlStateSelected]; |
| | | [_buttonProLibrary setTitle:@" å å
¥å享åº" forState:UIControlStateNormal]; |
| | | [_buttonProLibrary setTitle:@" å·²å å
¥å享åº" forState:UIControlStateSelected]; |
| | | _buttonProLibrary.titleLabel.font = [UIFont systemFontOfSize:14]; |
| | | [_buttonHairCircle setTitleColor:UIColorFromRGBValue(0xE5005C) forState:UIControlStateNormal]; |
| | | [_buttonHairCircle setImage:[UIImage imageNamed:@"icon_goodsDetail_hairCircle"] forState:UIControlStateNormal]; |
| | | [_buttonHairCircle setTitle:@" ä¸é®åå" forState:UIControlStateNormal]; |
| | | _buttonHairCircle.titleLabel.font = [UIFont systemFontOfSize:14]; |
| | | } |
| | | return _buttonProLibrary; |
| | | return _buttonHairCircle; |
| | | } |
| | | |
| | | - (ALButton *)buttonFanliBi { |
| | |
| | | @property (nonatomic, strong) dispatch_source_t timers; |
| | | /// æ¯å¦å±å¼ææå¸ï¼å¯¹äºJDæ¥è¯´ï¼ |
| | | @property (nonatomic, assign) BOOL isExpand; |
| | | |
| | | @property (nonatomic, assign) BOOL isRequestAPI; |
| | | /// 京ä¸å¤å¸è½¬é¾ |
| | | @property (nonatomic, nullable, copy) NSString *couponLink; |
| | | |
| | |
| | | |
| | | if(![ALUserInfoServiceManger fetchUID]){ |
| | | self.transitionView.contentLabel.text = @"æªç»å½æ è¿å©"; |
| | | [self fetchJDCouponLink:couponLink]; |
| | | |
| | | } else { |
| | | if (![ALUserInfoServiceManger fetchUID]) { |
| | | [self onLoginVcName:nil title:nil]; |
| | | return ; |
| | | } |
| | | |
| | | // æ¯å¦æ¿æ´»é请åè½ |
| | | if (![ALUserInfoServiceManger isInvited]) { |
| | | [self onInviteVcName:nil]; |
| | | return; |
| | | } |
| | | self.transitionView.contentLabel.text = @"è´ä¹°åæè¿å©ï¼å享åæå¥é"; |
| | | [self getJingDongLnk:couponLink]; |
| | | } |
| | | [self fetchJDCouponLink:couponLink]; |
| | | |
| | | [UMCustomShop umDetail_buy]; |
| | | [UMCustomShop umDetail_coupon_click]; |
| | | } |
| | | |
| | | - (void)fetchJDCouponLink:(NSString *)couponLink { |
| | | NSMutableDictionary *params = [[NSMutableDictionary alloc] init]; |
| | | [params setObject:_goodsID forKey:@"id"]; |
| | | [params setObject:couponLink forKey:@"couponUrl"]; |
| | | [params setObject:_goodsID?:@"" forKey:@"id"]; |
| | | [params setObject:couponLink?:@"" forKey:@"couponUrl"]; |
| | | if ([self isHaveValue:[ALUserInfoServiceManger fetchUID]]) { |
| | | [params setObject:[ALUserInfoServiceManger fetchUID] forKey:@"uid"]; |
| | | } |
| | |
| | | [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP2,@"goods/getJDCouponLink"] param:params success:^(NSDictionary *object) { |
| | | [self.view hideToastActivity]; |
| | | @strongify(self) |
| | | if ([object[@"code"] integerValue] == 0) { |
| | | if ([self isHaveValue:object] && [object[@"code"] integerValue] == 0) { |
| | | self.native = [object[@"data"][@"native"] boolValue]; //æ¯å¦è·³è½¬åç |
| | | self.shoppingUrl = object[@"data"][@"jumpLink"]; |
| | | self.transitionView.hidden = NO; |
| | |
| | | self.buttomView.shareButton.enabled = YES; |
| | | }]; |
| | | } |
| | | #pragma mark --- é¢å¸è¿å©/ç«å³è´ä¹° --- |
| | | #pragma mark --- ä¸åè¿ --- |
| | | - (void)buyClicked:(ButtomCarView *)view { |
| | | |
| | | self.transitionView.contentLabel.text = @"è´ä¹°åæè¿å©ï¼å享åæå¥é"; |
| | |
| | | [self onLoginVcName:nil title:nil]; |
| | | return ; |
| | | } |
| | | |
| | | // æ¯å¦æ¿æ´»é请åè½ |
| | | if (![ALUserInfoServiceManger isInvited]) { |
| | | [self onInviteVcName:nil]; |
| | | return; |
| | | } |
| | | [self getJingDongLnk]; |
| | | [self getJingDongLnk:nil]; |
| | | } |
| | | |
| | | - (void)getJingDongLnk |
| | | { |
| | | NSDictionary *dic = @{@"uid":[ALUserInfoServiceManger fetchUID],@"id":self.goodsModel.goodsId,@"from" : @"goodsDetail",@"source":self.from?:@""}; |
| | | - (void)getJingDongLnk:(NSString *)couponUrl { |
| | | NSMutableDictionary *params = [[NSMutableDictionary alloc] init]; |
| | | [params setObject:[ALUserInfoServiceManger fetchUID] forKey:@"uid"]; |
| | | if ([self isHaveValue:self.goodsModel.goodsId]) { |
| | | [params setObject:self.goodsModel.goodsId forKey:@"id"]; |
| | | } |
| | | if ([self isHaveValue:self.from]) { |
| | | [params setObject:self.from forKey:@"source"]; |
| | | } |
| | | if ([self isHaveValue:couponUrl]) { |
| | | [params setObject:couponUrl forKey:@"couponUrl"]; |
| | | } |
| | | [self.view makeToastActivity:CSToastPositionCenter]; |
| | | |
| | | @weakify(self) |
| | | [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP2,@"goods/getJDLink"] param:dic success:^(NSDictionary *object) { |
| | | [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP2,@"goods/getJDLink"] param:params success:^(NSDictionary *object) { |
| | | [self.view hideToastActivity]; |
| | | @strongify(self) |
| | | if ([object[@"code"] integerValue] == 0) { |
| | | if ([self isHaveValue:object] && [object[@"code"] integerValue] == 0) { |
| | | self.native = [object[@"data"][@"native"] boolValue]; //æ¯å¦è·³è½¬åç |
| | | self.shoppingUrl = object[@"data"][@"jumpLink"]; |
| | | self.transitionView.hidden = NO; |
| | |
| | | }]; |
| | | } |
| | | |
| | | - (void)buyJDGoods |
| | | { |
| | | - (void)buyJDGoods { |
| | | if (self.goodsModel.hasCoupon) { |
| | | [UMCustomShop umDetail_buy_to_taobao:@"æå¸"]; |
| | | }else{ |
| | |
| | | return; |
| | | } |
| | | sender.userInteractionEnabled = NO; |
| | | [self userStorageaddstorage]; |
| | | [self onecClickBilling]; |
| | | } |
| | | |
| | | - (void)userStorageaddstorage |
| | | { |
| | | NSDictionary *dic = @{@"uid":[ALUserInfoServiceManger fetchUID],@"id":self.goodsModel.goodsId,@"goodsType":[NSString stringWithFormat:@"%ld",(long)_goodsType]}; |
| | | - (void)onecClickBilling { |
| | | if (self.isRequestAPI) { |
| | | return; |
| | | } |
| | | [self.view makeToastActivity:CSToastPositionCenter]; |
| | | self.isRequestAPI = YES; |
| | | NSDictionary *params = @{@"uid":[ALUserInfoServiceManger fetchUID],@"goodsId":self.goodsModel.goodsId,@"goodsType":[NSString stringWithFormat:@"%ld",(long)_goodsType]}; |
| | | |
| | | @weakify(self) |
| | | [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP2,@"shraeStorage/accordtorage"] param:dic success:^(NSDictionary *object) |
| | | { |
| | | [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP2,@"user/cloud/sendGoods"] param:params success:^(NSDictionary *object) { |
| | | @strongify(self) |
| | | self.isRequestAPI = NO; |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | JDGoodsInfoCell *cell = [self.detailTableview cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]]; |
| | | cell.buttonProLibrary.userInteractionEnabled = YES; |
| | | if ([object[@"code"] integerValue] == 0) { |
| | | BOOL storageState = [object[@"data"][@"storageState"] boolValue]; |
| | | self.storageState = storageState; |
| | | if (storageState) { |
| | | [JRToast showWithText:@"æ·»å è³åäº«åºæå" bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | [UMCustomShop umDetail_joinXPK]; |
| | | cell.buttonProLibrary.selected = YES; |
| | | [self.view hideToastActivity]; |
| | | if ([self isHaveValue:object] ) { |
| | | if ([object[@"code"] integerValue] == 0) { |
| | | if ([self isHaveValue:object[@"data"] ]){ |
| | | [JRToast showWithText:object[@"data"] bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | |
| | | } else if ([object[@"code"] integerValue] == 1001 || |
| | | [object[@"code"] integerValue] == 1002 || |
| | | [object[@"code"] integerValue] == 1003 || |
| | | [object[@"code"] integerValue] == 1004 || |
| | | [object[@"code"] integerValue] == 1005) { |
| | | |
| | | if ([self isHaveValue:object[@"msg"]]) { |
| | | [JRToast showWithText:object[@"msg"] bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | [self pushAnyInterfaceController:@"ShonpingShareViewController" parms:@{@"url":object[@"data"][@"link"]}]; |
| | | |
| | | } else { |
| | | [JRToast showWithText:@"å·²ä»å享åºä¸å é¤" bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | [UMCustomShop umDetail_goods_detail_xpk_cancel]; |
| | | cell.buttonProLibrary.selected = NO; |
| | | if ([self isHaveValue:object[@"msg"]]) { |
| | | [JRToast showWithText:object[@"msg"] bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | } |
| | | |
| | | } else { |
| | | [JRToast showWithText:object[@"msg"] bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | }); |
| | | |
| | | } fail:^(id object) { |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | JDGoodsInfoCell *cell = [self.detailTableview cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]]; |
| | | cell.buttonProLibrary.userInteractionEnabled = YES; |
| | | }); |
| | | [self.view hideToastActivity]; |
| | | self.isRequestAPI = NO; |
| | | }]; |
| | | |
| | | } |
| | | |
| | | - (void)noticeMineBackEvent:(NSString *)vcName { |
| | |
| | | } |
| | | CGFloat heightCell = 0; |
| | | if ([YTHsharedManger startManger].iosonling == 1) { |
| | | heightCell = SCREEN_WIDTH + (20+12) + (15+12) + (20+[self fetchMaxCouponHeight]+[self fetchTitleHeight]) + (5+[self fetchMoreCouponHeight]) + [self fetchlabelsHeight] + [self fetchFooterButtonHeght] - 50; |
| | | heightCell = SCREEN_WIDTH + (20+12) + (15+12) + (20+[self fetchMaxCouponHeight]+[self fetchTitleHeight]) + (5+[self fetchMoreCouponHeight]) + [self fetchlabelsHeight] + [self fetchFooterButtonHeght] - 50; |
| | | |
| | | } else { |
| | | heightCell = SCREEN_WIDTH + (20+12) + (15+12) + (20+[self fetchMaxCouponHeight]+[self fetchTitleHeight]) + (5+[self fetchMoreCouponHeight]) + [self fetchlabelsHeight] + [self fetchFooterButtonHeght]; |
| | |
| | | cell.shareValid = self.shareValid; |
| | | cell.isExpand = self.isExpand; |
| | | cell.model = self.goodsModel; |
| | | cell.storageState = self.storageState; |
| | | |
| | | @weakify(self) |
| | | cell.touchCheckLike = ^{ |
| | |
| | | [self.navigationController pushViewController:searchDetailMainVc animated:YES]; |
| | | }; |
| | | |
| | | [cell.buttonProLibrary addTarget:self action:@selector(ProLibraryTaped:) forControlEvents:UIControlEventTouchUpInside]; |
| | | [cell.buttonHairCircle addTarget:self action:@selector(ProLibraryTaped:) forControlEvents:UIControlEventTouchUpInside]; |
| | | |
| | | if (!_goodsModel) { |
| | | CATransition *animation = [CATransition animation]; |
| | |
| | | return 10; |
| | | |
| | | } else { |
| | | CGFloat heightRecommend = 0.0; |
| | | CGFloat heightFooter = 0, heightCloud = 0, heightRecommend = 0.0; |
| | | |
| | | if ([self isHaveValue:self.extraDictionary[@"cloudText"]]) { |
| | | heightCloud = 145; |
| | | } |
| | | |
| | | if ([self isHaveValue:self.goodsModel.descriptions]) { |
| | | CGFloat heghtDescr = [self getLabelHeightWithText:self.goodsModel.descriptions width:SCREEN_WIDTH - 20 font:(SCREEN_WIDTH < 375)?10:12] + 37 + 15 + 20; |
| | | heightRecommend = heghtDescr; |
| | | |
| | | } else { |
| | | heightRecommend = 10; |
| | | } |
| | | return heightRecommend; |
| | | heightFooter = heightCloud + heightRecommend + 10; |
| | | return heightFooter; |
| | | } |
| | | |
| | | } else { |
| | |
| | | return view; |
| | | |
| | | } else { |
| | | CGFloat heightRecommend = 0.0; |
| | | CGFloat heightFooter = 0, heightCloud = 0, heightRecommend = 0.0; |
| | | if ([self isHaveValue:self.extraDictionary[@"cloudText"]]) { |
| | | heightCloud = 145; |
| | | } |
| | | |
| | | if ([self isHaveValue:self.goodsModel.descriptions]) { |
| | | CGFloat heghtDescr = [self getLabelHeightWithText:self.goodsModel.descriptions width:SCREEN_WIDTH - 20 font:(SCREEN_WIDTH < 375)?10:12] + 37 + 15 + 20; |
| | | heightRecommend = heghtDescr; |
| | | |
| | | } else { |
| | | heightRecommend = CGFLOAT_MIN; |
| | | } |
| | | GoosStoreInfoView *view = [[GoosStoreInfoView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, heightRecommend)]; |
| | | |
| | | heightFooter = heightCloud + heightRecommend + 0.001; |
| | | GoosStoreInfoView *view = [[GoosStoreInfoView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, heightFooter)]; |
| | | view.cloudText = self.extraDictionary[@"cloudText"]; |
| | | view.cloudPic = self.extraDictionary[@"cloudPic"]; |
| | | view.model = self.goodsModel; |
| | | return view; |
| | | } |
| | |
| | | /// æ¯å¦ç¦»å¼è¿å½åè§å¾ |
| | | @property (nonatomic, assign) BOOL isLeavedNowView; |
| | | |
| | | @property (nonatomic, assign) BOOL isRequestAPI; |
| | | |
| | | @property (nonatomic, nullable, strong) FetchGoldcoinPopView *fetchGoldcoinPopView; |
| | | |
| | | @property (nonatomic, strong) UIView *backView; |
| | |
| | | } |
| | | |
| | | - (void)getPingDuoDuoLnk { |
| | | NSDictionary *dic = @{@"uid":[ALUserInfoServiceManger fetchUID],@"id":self.goodsModel.goodsId,@"from" : @"goodsDetail",@"source":self.from?:@""}; |
| | | NSDictionary *dic = @{@"uid":[ALUserInfoServiceManger fetchUID],@"id":self.goodsModel.goodsId?:@"",@"from" : @"goodsDetail",@"source":self.from?:@""}; |
| | | [self.view makeToastActivity:CSToastPositionCenter]; |
| | | |
| | | @weakify(self) |
| | |
| | | |
| | | } else { |
| | | ShonpingShareViewController *shonpingShareVc = [[ShonpingShareViewController alloc] init]; |
| | | shonpingShareVc.urlString = jumpLink; |
| | | shonpingShareVc.urlString = jumpLink?:@""; |
| | | [self.navigationController pushViewController:shonpingShareVc animated:YES]; |
| | | } |
| | | } |
| | |
| | | return; |
| | | } |
| | | sender.userInteractionEnabled = NO; |
| | | [self userStorageaddstorage]; |
| | | [self onecClickBilling]; |
| | | } |
| | | |
| | | - (void)userStorageaddstorage |
| | | { |
| | | NSDictionary *dic = @{@"uid":[ALUserInfoServiceManger fetchUID],@"id":self.goodsModel.goodsId,@"goodsType":[NSString stringWithFormat:@"%ld",(long)_goodsType]}; |
| | | - (void)onecClickBilling { |
| | | if (self.isRequestAPI) { |
| | | return; |
| | | } |
| | | [self.view makeToastActivity:CSToastPositionCenter]; |
| | | self.isRequestAPI = YES; |
| | | NSDictionary *params = @{@"uid":[ALUserInfoServiceManger fetchUID],@"goodsId":self.goodsModel.goodsId,@"goodsType":[NSString stringWithFormat:@"%ld",(long)_goodsType]}; |
| | | |
| | | @weakify(self) |
| | | [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP2,@"shraeStorage/accordtorage"] param:dic success:^(NSDictionary *object) |
| | | { |
| | | [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP2,@"user/cloud/sendGoods"] param:params success:^(NSDictionary *object) { |
| | | @strongify(self) |
| | | self.isRequestAPI = NO; |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | JDGoodsHeaderTableViewCell *cell = [self.detailTableview cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]]; |
| | | cell.ProLibraryBtn.userInteractionEnabled = YES; |
| | | if ([object[@"code"] integerValue] == 0) { |
| | | BOOL storageState = [object[@"data"][@"storageState"] boolValue]; |
| | | self.storageState = storageState; |
| | | if (storageState) { |
| | | [JRToast showWithText:@"æ·»å è³åäº«åºæå" bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | [UMCustomShop umDetail_joinXPK]; |
| | | cell.ProLibraryBtn.selected = YES; |
| | | [self.view hideToastActivity]; |
| | | if ([self isHaveValue:object] ) { |
| | | if ([object[@"code"] integerValue] == 0) { |
| | | if ([self isHaveValue:object[@"data"] ]){ |
| | | [JRToast showWithText:object[@"data"] bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | |
| | | } else if ([object[@"code"] integerValue] == 1001 || |
| | | [object[@"code"] integerValue] == 1002 || |
| | | [object[@"code"] integerValue] == 1003 || |
| | | [object[@"code"] integerValue] == 1004 || |
| | | [object[@"code"] integerValue] == 1005) { |
| | | |
| | | if ([self isHaveValue:object[@"msg"]]) { |
| | | [JRToast showWithText:object[@"msg"] bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | [self pushAnyInterfaceController:@"ShonpingShareViewController" parms:@{@"url":object[@"data"][@"link"]}]; |
| | | |
| | | } else { |
| | | [JRToast showWithText:@"å·²ä»å享åºä¸å é¤" bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | [UMCustomShop umDetail_goods_detail_xpk_cancel]; |
| | | cell.ProLibraryBtn.selected = NO; |
| | | if ([self isHaveValue:object[@"msg"]]) { |
| | | [JRToast showWithText:object[@"msg"] bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | } |
| | | |
| | | } else { |
| | | [JRToast showWithText:object[@"msg"] bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | }); |
| | | |
| | | } fail:^(id object) { |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | JDGoodsHeaderTableViewCell *cell = [self.detailTableview cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]]; |
| | | cell.ProLibraryBtn.userInteractionEnabled = YES; |
| | | }); |
| | | [self.view hideToastActivity]; |
| | | self.isRequestAPI = NO; |
| | | }]; |
| | | |
| | | } |
| | | |
| | | - (void)noticeMineBackEvent:(NSString *)vcName |
| | |
| | | if (self.code == 2) { |
| | | return SCREEN_WIDTH; |
| | | } |
| | | |
| | | |
| | | UIImage *icomImage = [UIImage imageNamed:@"ic_share_pdd"]; |
| | | |
| | | |
| | | NSMutableParagraphStyle *style = [[NSParagraphStyle defaultParagraphStyle] mutableCopy]; |
| | | style.lineSpacing = 3; |
| | | // 坹齿¹å¼ |
| | |
| | | |
| | | if (self.goodsModel.hasCoupon) { |
| | | if (self.goodsModel.couponInfo.token && ![self.goodsModel.couponInfo.token isEqualToString:@""]) { |
| | | return SCREEN_WIDTH + 245 + height + maxCouponHeight + labelsHeght - jianqu; |
| | | |
| | | } else { |
| | | return SCREEN_WIDTH + 205 + height + maxCouponHeight + labelsHeght - jianqu; |
| | | } |
| | | return SCREEN_WIDTH + 245 + height + maxCouponHeight + labelsHeght - jianqu; |
| | | |
| | | } else { |
| | | return SCREEN_WIDTH + 205 + height + maxCouponHeight + labelsHeght - jianqu; |
| | | } |
| | | |
| | | } else { |
| | | return SCREEN_WIDTH + 117 + height + maxCouponHeight + labelsHeght - jianqu; |
| | |
| | | cell.shareValid = self.shareValid; |
| | | cell.model = self.goodsModel; |
| | | |
| | | cell.storageState = self.storageState; |
| | | [cell.ProLibraryBtn addTarget:self action:@selector(ProLibraryTaped:) forControlEvents:UIControlEventTouchUpInside]; |
| | | [cell.buttonHairCircle addTarget:self action:@selector(ProLibraryTaped:) forControlEvents:UIControlEventTouchUpInside]; |
| | | |
| | | @weakify(self) |
| | | cell.touchCheckLike = ^{ |
| | |
| | | return 10; |
| | | |
| | | } else { |
| | | CGFloat heightRecommend = 0.0; |
| | | CGFloat heightFooter = 0, heightCloud = 0, heightRecommend = 0.0; |
| | | |
| | | if ([self isHaveValue:self.extraDictionary[@"cloudText"]]) { |
| | | heightCloud = 145; |
| | | } |
| | | |
| | | if ([self isHaveValue:self.goodsModel.descriptions]) { |
| | | CGFloat heghtDescr = [self getLabelHeightWithText:self.goodsModel.descriptions width:SCREEN_WIDTH - 20 font:(SCREEN_WIDTH < 375)?10:12] + 37 + 15 + 20; |
| | | heightRecommend = heghtDescr; |
| | | |
| | | } else { |
| | | heightRecommend = 10; |
| | | } |
| | | return heightRecommend; |
| | | heightFooter = heightCloud + heightRecommend + 10; |
| | | return heightFooter; |
| | | } |
| | | |
| | | } else { |
| | |
| | | return view; |
| | | |
| | | } else { |
| | | CGFloat heightRecommend = 0.0; |
| | | CGFloat heightFooter = 0, heightCloud = 0, heightRecommend = 0.0; |
| | | if ([self isHaveValue:self.extraDictionary[@"cloudText"]]) { |
| | | heightCloud = 145; |
| | | } |
| | | |
| | | if ([self isHaveValue:self.goodsModel.descriptions]) { |
| | | CGFloat heghtDescr = [self getLabelHeightWithText:self.goodsModel.descriptions width:SCREEN_WIDTH - 20 font:(SCREEN_WIDTH < 375)?10:12] + 37 + 15 + 20; |
| | | heightRecommend = heghtDescr; |
| | | |
| | | } else { |
| | | heightRecommend = CGFLOAT_MIN; |
| | | } |
| | | GoosStoreInfoView *view = [[GoosStoreInfoView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, heightRecommend)]; |
| | | |
| | | heightFooter = heightCloud + heightRecommend + 0.001; |
| | | GoosStoreInfoView *view = [[GoosStoreInfoView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, heightFooter)]; |
| | | view.cloudText = self.extraDictionary[@"cloudText"]; |
| | | view.cloudPic = self.extraDictionary[@"cloudPic"]; |
| | | view.model = self.goodsModel; |
| | | return view; |
| | | } |
| | |
| | | /// æ¯å¦ç¦»å¼è¿å½åè§å¾ |
| | | @property (nonatomic, assign) BOOL isLeavedNowView; |
| | | |
| | | @property (nonatomic, assign) BOOL isRequestAPI; |
| | | |
| | | @property (nonatomic, nullable, strong) FetchGoldcoinPopView *fetchGoldcoinPopView; |
| | | |
| | | @property (nonatomic, strong) UIView *backView; |
| | |
| | | |
| | | #pragma mark- GDrecomeTableViewCellDelegate |
| | | - (void)cellClicked:(GDrecomeTableViewCell *)cell goodId:(NSString *)goodsID { |
| | | PDDGoodsDetailController *goodDeTrVc = [[PDDGoodsDetailController alloc] init]; |
| | | goodDeTrVc.goodsID = goodsID; |
| | | goodDeTrVc.goodsType = 3; |
| | | [self.navigationController pushViewController:goodDeTrVc animated:YES]; |
| | | SNGoodsDetailController *vc = [[SNGoodsDetailController alloc] init]; |
| | | vc.goodsID = goodsID; |
| | | vc.goodsType = 5; |
| | | [self.navigationController pushViewController:vc animated:YES]; |
| | | } |
| | | |
| | | - (void)touchMaxCoupon { |
| | |
| | | } else { |
| | | ShonpingShareViewController *shonpingShareVc = [[ShonpingShareViewController alloc] init]; |
| | | shonpingShareVc.urlString = jumpLink; |
| | | shonpingShareVc.from = @"goodsDetail"; |
| | | [self.navigationController pushViewController:shonpingShareVc animated:YES]; |
| | | } |
| | | } |
| | |
| | | return; |
| | | } |
| | | sender.userInteractionEnabled = NO; |
| | | [self userStorageaddstorage]; |
| | | [self onecClickBilling]; |
| | | } |
| | | |
| | | - (void)userStorageaddstorage |
| | | { |
| | | NSDictionary *dic = @{@"uid":[ALUserInfoServiceManger fetchUID],@"id":self.goodsModel.goodsId,@"goodsType":[NSString stringWithFormat:@"%ld",(long)_goodsType]}; |
| | | - (void)onecClickBilling { |
| | | if (self.isRequestAPI) { |
| | | return; |
| | | } |
| | | [self.view makeToastActivity:CSToastPositionCenter]; |
| | | self.isRequestAPI = YES; |
| | | NSDictionary *params = @{@"uid":[ALUserInfoServiceManger fetchUID],@"goodsId":self.goodsModel.goodsId,@"goodsType":[NSString stringWithFormat:@"%ld",(long)_goodsType]}; |
| | | |
| | | @weakify(self) |
| | | [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP2,@"shraeStorage/accordtorage"] param:dic success:^(NSDictionary *object) |
| | | { |
| | | [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP2,@"user/cloud/sendGoods"] param:params success:^(NSDictionary *object) { |
| | | @strongify(self) |
| | | self.isRequestAPI = NO; |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | JDGoodsHeaderTableViewCell *cell = [self.detailTableview cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]]; |
| | | cell.ProLibraryBtn.userInteractionEnabled = YES; |
| | | if ([object[@"code"] integerValue] == 0) { |
| | | BOOL storageState = [object[@"data"][@"storageState"] boolValue]; |
| | | self.storageState = storageState; |
| | | if (storageState) { |
| | | [JRToast showWithText:@"æ·»å è³åäº«åºæå" bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | [UMCustomShop umDetail_joinXPK]; |
| | | cell.ProLibraryBtn.selected = YES; |
| | | [self.view hideToastActivity]; |
| | | if ([self isHaveValue:object] ) { |
| | | if ([object[@"code"] integerValue] == 0) { |
| | | if ([self isHaveValue:object[@"data"] ]){ |
| | | [JRToast showWithText:object[@"data"] bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | |
| | | } else if ([object[@"code"] integerValue] == 1001 || |
| | | [object[@"code"] integerValue] == 1002 || |
| | | [object[@"code"] integerValue] == 1003 || |
| | | [object[@"code"] integerValue] == 1004 || |
| | | [object[@"code"] integerValue] == 1005) { |
| | | |
| | | if ([self isHaveValue:object[@"msg"]]) { |
| | | [JRToast showWithText:object[@"msg"] bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | [self pushAnyInterfaceController:@"ShonpingShareViewController" parms:@{@"url":object[@"data"][@"link"]}]; |
| | | |
| | | } else { |
| | | [JRToast showWithText:@"å·²ä»å享åºä¸å é¤" bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | [UMCustomShop umDetail_goods_detail_xpk_cancel]; |
| | | cell.ProLibraryBtn.selected = NO; |
| | | if ([self isHaveValue:object[@"msg"]]) { |
| | | [JRToast showWithText:object[@"msg"] bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | } |
| | | |
| | | } else { |
| | | [JRToast showWithText:object[@"msg"] bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | }); |
| | | |
| | | } fail:^(id object) { |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | JDGoodsHeaderTableViewCell *cell = [self.detailTableview cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]]; |
| | | cell.ProLibraryBtn.userInteractionEnabled = YES; |
| | | }); |
| | | [self.view hideToastActivity]; |
| | | self.isRequestAPI = NO; |
| | | }]; |
| | | |
| | | } |
| | | |
| | | - (void)noticeMineBackEvent:(NSString *)vcName |
| | |
| | | cell.shareValid = self.shareValid; |
| | | cell.model = self.goodsModel; |
| | | |
| | | cell.storageState = self.storageState; |
| | | [cell.ProLibraryBtn addTarget:self action:@selector(ProLibraryTaped:) forControlEvents:UIControlEventTouchUpInside]; |
| | | [cell.buttonHairCircle addTarget:self action:@selector(ProLibraryTaped:) forControlEvents:UIControlEventTouchUpInside]; |
| | | |
| | | @weakify(self) |
| | | cell.touchCheckLike = ^{ |
| | |
| | | return 10; |
| | | |
| | | } else { |
| | | CGFloat heightRecommend = 0.0; |
| | | CGFloat heightFooter = 0, heightCloud = 0, heightRecommend = 0.0; |
| | | |
| | | if ([self isHaveValue:self.extraDictionary[@"cloudText"]]) { |
| | | heightCloud = 145; |
| | | } |
| | | |
| | | if ([self isHaveValue:self.goodsModel.descriptions]) { |
| | | CGFloat heghtDescr = [self getLabelHeightWithText:self.goodsModel.descriptions width:SCREEN_WIDTH - 20 font:(SCREEN_WIDTH < 375)?10:12] + 37 + 15 + 20; |
| | | heightRecommend = heghtDescr; |
| | | |
| | | } else { |
| | | heightRecommend = 10; |
| | | } |
| | | return heightRecommend; |
| | | heightFooter = heightCloud + heightRecommend + 10; |
| | | return heightFooter; |
| | | } |
| | | |
| | | } else { |
| | |
| | | return view; |
| | | |
| | | } else { |
| | | CGFloat heightRecommend = 0.0; |
| | | CGFloat heightFooter = 0, heightCloud = 0, heightRecommend = 0.0; |
| | | if ([self isHaveValue:self.extraDictionary[@"cloudText"]]) { |
| | | heightCloud = 145; |
| | | } |
| | | |
| | | if ([self isHaveValue:self.goodsModel.descriptions]) { |
| | | CGFloat heghtDescr = [self getLabelHeightWithText:self.goodsModel.descriptions width:SCREEN_WIDTH - 20 font:(SCREEN_WIDTH < 375)?10:12] + 37 + 15 + 20; |
| | | heightRecommend = heghtDescr; |
| | | |
| | | } else { |
| | | heightRecommend = CGFLOAT_MIN; |
| | | } |
| | | GoosStoreInfoView *view = [[GoosStoreInfoView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, heightRecommend)]; |
| | | |
| | | heightFooter = heightCloud + heightRecommend + 0.001; |
| | | GoosStoreInfoView *view = [[GoosStoreInfoView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, heightFooter)]; |
| | | view.cloudText = self.extraDictionary[@"cloudText"]; |
| | | view.cloudPic = self.extraDictionary[@"cloudPic"]; |
| | | view.model = self.goodsModel; |
| | | return view; |
| | | } |
New file |
| | |
| | | // |
| | | // JDGoodsListController.h |
| | | // MIduo |
| | | // |
| | | // Created by éåºè¿å°ç§ææéå
¬å¸ on 2019/7/26. |
| | | // Copyright © 2019 yeshi. All rights reserved. |
| | | // |
| | | |
| | | #import <UIKit/UIKit.h> |
| | | #import "ALScrollPageView.h" |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | @interface SNGoodsListController : BaseViewController <ZJScrollPageViewChildVcDelegate> |
| | | |
| | | @property (nonatomic, assign) NSInteger classCount; |
| | | |
| | | @property (nonatomic, nullable, copy) NSString *cid; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // JDGoodsListController.m |
| | | // MIduo |
| | | // |
| | | // Created by éåºè¿å°ç§ææéå
¬å¸ on 2019/7/26. |
| | | // Copyright © 2019 yeshi. All rights reserved. |
| | | // |
| | | |
| | | #import "SNGoodsListController.h" |
| | | #import "SNGoodsDetailController.h" |
| | | |
| | | #import "ThirdClassificationCell.h" |
| | | #import "JDGoodsListBannerView.h" |
| | | |
| | | #import "NotLikePopView.h" |
| | | |
| | | @interface SNGoodsListController () <UITableViewDelegate, UITableViewDataSource, NewLoginViewDelegate> |
| | | |
| | | @property (nonatomic, nullable, strong) UITableView *tableView; |
| | | /// å¯¼èªæ ç°çº¿ |
| | | @property (nonatomic, nullable, strong) UIView *navGaryLine; |
| | | /// ä¸å欢åå |
| | | @property (nonatomic, nullable, strong) NotLikePopView *notLikePopView; |
| | | /// 头é¨ä¼¦è½®æ |
| | | @property (nonatomic, nullable, strong) JDGoodsListBannerView *tabHeaderBannerView; |
| | | /// ç½ç»é®æ¡å± |
| | | @property (nonatomic,strong) SJNoNetwork *noNetworkViews; |
| | | |
| | | @property (nonatomic, nullable, strong) SJCustomActivityView *sjCustomActivityView; |
| | | /// 页ç |
| | | @property (nonatomic, assign) NSInteger page; |
| | | /// é¡µç æ¯ä¸æ¯ä¸º1 |
| | | @property (nonatomic, assign) BOOL isPageForOne; |
| | | |
| | | @property (nonatomic, nullable, strong) NSMutableArray *contentArray; |
| | | |
| | | @property (nonatomic, nullable, strong) NSMutableArray *bannerList; |
| | | |
| | | @property (nonatomic, nullable, strong) NSMutableArray *activityList; |
| | | |
| | | @property (nonatomic, nullable, strong) NSArray *dataArr; |
| | | |
| | | @property (nonatomic, assign) NSInteger count; |
| | | /// å°ç«ç® |
| | | @property (nonatomic, nullable, strong) UIButton *topBtn; |
| | | /// æ»å¨ç»æçä½ç½® |
| | | @property (nonatomic, assign) float lastContentOffset; |
| | | |
| | | @property (nonatomic, nullable, strong) XHTabBarController *tabbar; |
| | | |
| | | @end |
| | | |
| | | @implementation SNGoodsListController |
| | | |
| | | - (BOOL)shouldAutomaticallyForwardAppearanceMethods |
| | | { |
| | | return NO; |
| | | } |
| | | |
| | | - (void)viewDidLoad |
| | | { |
| | | [super viewDidLoad]; |
| | | [self setupDataConfig]; |
| | | [self setupViewConfig]; |
| | | } |
| | | |
| | | - (void)setupDataConfig { |
| | | self.page = 1; |
| | | self.isPageForOne = YES; |
| | | self.tabbar = (XHTabBarController *)[UIApplication sharedApplication].keyWindow.rootViewController; |
| | | } |
| | | |
| | | - (void)loadDataSource |
| | | { |
| | | NSMutableDictionary *params = [[NSMutableDictionary alloc] init]; |
| | | [params setObject:[NSString stringWithFormat:@"%ld",(long)self.page] forKey:@"page"]; |
| | | [params setObject:self.cid forKey:@"cid"]; |
| | | @weakify(self) |
| | | [[ALNetWorking startInterface] Post:[NSString stringWithFormat:@"%@/%@",domainHTTP2, @"suning/getGoodsInfo"] param:params success:^(NSDictionary *object) |
| | | { |
| | | @strongify(self) |
| | | @weakify(self) |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | @strongify(self) |
| | | if ([object[@"code"] integerValue] == 0) { |
| | | if (self.page == 1) { |
| | | self.isPageForOne = YES; |
| | | [self.contentArray removeAllObjects]; |
| | | [self.bannerList removeAllObjects]; |
| | | [self.activityList removeAllObjects]; |
| | | [self.bannerList addObjectsFromArray:object[@"data"][@"listPic"]]; |
| | | [self.activityList addObjectsFromArray:object[@"data"][@"listSpe"]]; |
| | | self.dataArr = @[self.bannerList,self.activityList]; |
| | | } |
| | | self.count = [object[@"data"][@"count"] integerValue]; |
| | | for (NSDictionary *dictionary in object[@"data"][@"list"]) { |
| | | [self.contentArray addObject:[GoodsDetailBaseModel yy_modelWithJSON:dictionary]]; |
| | | } |
| | | self.page++; |
| | | @weakify(self) |
| | | [UIView performWithoutAnimation:^{ |
| | | @strongify(self) |
| | | [self.tableView reloadData]; |
| | | }]; |
| | | } |
| | | [self hideSJCustomActivityView]; |
| | | [self.tableView.mj_header endRefreshing]; |
| | | [self.tableView.mj_footer endRefreshing]; |
| | | if ((self.contentArray.count == self.count) && self.contentArray.count != 0) { |
| | | [self.tableView.mj_footer endRefreshingWithNoMoreData]; |
| | | } |
| | | }); |
| | | |
| | | } fail:^(id object) { |
| | | @strongify(self) |
| | | [self hideSJCustomActivityView]; |
| | | [self.tableView.mj_header endRefreshing]; |
| | | [self.tableView.mj_footer endRefreshing]; |
| | | if (((NSError *)object).code == -1009) { |
| | | if (self.contentArray.count != 0) { |
| | | self.noNetworkViews.hidden = YES; |
| | | [JRToast showWithText:NETWORK_CONNECT_ANOMALY bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | |
| | | } else { |
| | | self.noNetworkViews.primtTitle.text = NETWORK_CONNECT_ANOMALY; |
| | | [self.noNetworkViews.iconImage setImage:ALIMAGE_NAMED(@"defaultPage_noNetWork")]; |
| | | self.noNetworkViews.hidden = NO; |
| | | } |
| | | |
| | | } else { |
| | | if (self.contentArray.count != 0) { |
| | | self.noNetworkViews.hidden = YES; |
| | | [JRToast showWithText:NETWORK_CONNECT_ANOMALY bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | |
| | | } else { |
| | | self.noNetworkViews.primtTitle.text = NETWORK_CONNECT_ANOMALY; |
| | | [self.noNetworkViews.iconImage setImage:ALIMAGE_NAMED(@"defaultPage_noNetWork")]; |
| | | self.noNetworkViews.hidden = NO; |
| | | } |
| | | } |
| | | }]; |
| | | } |
| | | |
| | | - (void)setupViewConfig |
| | | { |
| | | [self.view addSubview:self.navGaryLine]; |
| | | [self.view addSubview:self.tableView]; |
| | | // ç«ç® |
| | | [self.view addSubview:self.topBtn]; |
| | | self.topBtn.sd_layout.bottomSpaceToView(self.view, (IS_IPHONE_X? 156.5:136.5) - kToolBarH).rightSpaceToView(self.view, 20).widthIs(43).heightIs(43); |
| | | |
| | | [self.view addSubview:self.noNetworkViews]; |
| | | [self addNetWorkNotice]; |
| | | } |
| | | |
| | | #pragma mark --- privte method --- |
| | | - (void)addNetWorkNotice |
| | | { |
| | | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(NetWorkStatesChange:) name:@"netWorkChangeEventNotification" object:nil]; |
| | | AppDelegate *delegate = (AppDelegate *)[UIApplication sharedApplication].delegate; |
| | | if (delegate.netWorkStatesCode == AFNetworkReachabilityStatusNotReachable) { |
| | | NSNotification * notice = [NSNotification notificationWithName:@"statesCode" object:@(delegate.netWorkStatesCode) userInfo:nil]; |
| | | [self NetWorkStatesChange:notice]; |
| | | |
| | | } else if (delegate.netWorkStatesCode == AFNetworkReachabilityStatusReachableViaWiFi){ |
| | | NSNotification * notice = [NSNotification notificationWithName:@"statesCode" object:@(delegate.netWorkStatesCode) userInfo:nil]; |
| | | [self NetWorkStatesChange:notice]; |
| | | |
| | | } else if (delegate.netWorkStatesCode == AFNetworkReachabilityStatusReachableViaWWAN) { |
| | | NSNotification * notice = [NSNotification notificationWithName:@"statesCode" object:@(delegate.netWorkStatesCode) userInfo:nil]; |
| | | [self NetWorkStatesChange:notice]; |
| | | |
| | | } else { |
| | | NSNotification * notice = [NSNotification notificationWithName:@"statesCode" object:@(delegate.netWorkStatesCode) userInfo:nil]; |
| | | [self NetWorkStatesChange:notice]; |
| | | } |
| | | } |
| | | |
| | | - (void)NetWorkStatesChange:(NSNotification *)sender |
| | | { |
| | | int networkState = [[sender object] intValue]; |
| | | |
| | | switch (networkState) { |
| | | |
| | | case -1: { |
| | | if (self.contentArray.count == 0 && self.contentArray.count == 0) { |
| | | self.noNetworkViews.primtTitle.text = NETWORK_CONNECT_ANOMALY; |
| | | [self.noNetworkViews.iconImage setImage:ALIMAGE_NAMED(@"defaultPage_noNetWork")]; |
| | | self.noNetworkViews.hidden = NO; |
| | | |
| | | } else { |
| | | self.noNetworkViews.hidden = YES; |
| | | [JRToast showWithText:NETWORK_CONNECT_ANOMALY bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | case 0: { // 没æç½ç» |
| | | if (self.contentArray.count == 0 && self.contentArray.count == 0) { |
| | | self.noNetworkViews.primtTitle.text = NETWORK_CONNECT_ANOMALY; |
| | | [self.noNetworkViews.iconImage setImage:ALIMAGE_NAMED(@"defaultPage_noNetWork")]; |
| | | self.noNetworkViews.hidden = NO; |
| | | |
| | | } else { |
| | | self.noNetworkViews.hidden = YES; |
| | | [JRToast showWithText:NETWORK_CONNECT_ANOMALY bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | case 1: { // 3Gæè
4Gï¼åæ£ç¨çæ¯æµé |
| | | self.noNetworkViews.hidden = YES; |
| | | if (self.contentArray.count == 0) { |
| | | [self showSJCustomActivityView]; |
| | | [self loadDataSource]; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | case 2: { // WIFIç½ç» |
| | | self.noNetworkViews.hidden = YES; |
| | | if (self.contentArray.count == 0) { |
| | | [self showSJCustomActivityView]; |
| | | [self loadDataSource]; |
| | | } |
| | | break; |
| | | } |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | |
| | | #pragma mark - å
³é®ä»£ç ï¼æ»å¨æ¹å夿 |
| | | - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView |
| | | { |
| | | self.lastContentOffset = scrollView.contentOffset.y; |
| | | } |
| | | |
| | | - (void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView |
| | | { |
| | | BOOL isExpand = [[NSUserDefaults standardUserDefaults] boolForKey:@"JDItemIsExpand"]; |
| | | if (self.lastContentOffset < scrollView.contentOffset.y) { |
| | | ALLog(@"å䏿»å¨"); |
| | | if (isExpand) { |
| | | [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"JDItemIsExpand"]; |
| | | [self.topBtn setHidden:YES]; |
| | | } |
| | | |
| | | } else { |
| | | ALLog(@"å䏿»å¨"); |
| | | if (!isExpand) { |
| | | [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"JDItemIsExpand"]; |
| | | [self.topBtn setHidden:NO]; |
| | | } |
| | | } |
| | | } |
| | | |
| | | - (void)scrollViewDidScroll:(UIScrollView *)scrollView |
| | | { |
| | | if (scrollView.contentOffset.y < SCREEN_WIDTH / 2) { |
| | | [self.topBtn setHidden:YES]; |
| | | } |
| | | } |
| | | |
| | | #pragma mark --- click event --- |
| | | - (void)ClickConnectBtn:(UIButton *)sender |
| | | { |
| | | if (iOS10) { |
| | | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] |
| | | options:@{} completionHandler:nil]; |
| | | } else { |
| | | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]]; |
| | | } |
| | | } |
| | | |
| | | - (void)onLoginVcName:(NSString *)vcName |
| | | { |
| | | [JRToast showWithText:@"请å
ç»å½æ¿æ å¿«çè´¦å·" bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | // ç»å½çé¢ |
| | | NewLoginViewController *loginVc = [[NewLoginViewController alloc] init]; |
| | | loginVc.delegate = self; |
| | | loginVc.rootVc = self; |
| | | loginVc.vcName = vcName; |
| | | [self.navigationController pushViewController:loginVc animated:YES]; |
| | | } |
| | | |
| | | - (void)noticeMineBackEvent:(NSString *)vcName { |
| | | |
| | | } |
| | | |
| | | #pragma mark --- private method --- |
| | | - (void)deleteRecommendGoods:(GoodsDetailBaseModel *)goodsModel reason:(NSString *)reason |
| | | { |
| | | NSMutableDictionary *params = [[NSMutableDictionary alloc] init]; |
| | | if([ALUserInfoServiceManger fetchUID]){ |
| | | [params setObject:[ALUserInfoServiceManger fetchUID] forKey:@"uid"]; |
| | | } |
| | | [params setObject:goodsModel.goodsId forKey:@"goodsId"]; |
| | | [params setObject:@"2" forKey:@"source"]; |
| | | [params setObject:reason forKey:@"reason"]; |
| | | [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP, @"goods/deleteRecommendGoods"] param:params success:^(NSDictionary *object) |
| | | { |
| | | if ([object[@"code"] integerValue] == 0) { |
| | | |
| | | } |
| | | |
| | | } fail:^(id object) { |
| | | |
| | | }]; |
| | | } |
| | | |
| | | #pragma mark --- UITableViewDelegate, UITableViewDataSource --- |
| | | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView |
| | | { |
| | | return self.contentArray.count; |
| | | } |
| | | |
| | | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath |
| | | { |
| | | |
| | | static NSString *identifier = @"thirdClassificationCell"; |
| | | ThirdClassificationCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; |
| | | if (!cell) { |
| | | cell = [[ThirdClassificationCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier]; |
| | | [cell useCellFrameCacheWithIndexPath:indexPath tableView:tableView]; |
| | | } |
| | | cell.isHideGaryBgView = NO; |
| | | cell.isShowDelete = ((GoodsDetailBaseModel *)self.contentArray[indexPath.section]).recommend; |
| | | cell.deleteButton.tag = indexPath.section; |
| | | @weakify(self) |
| | | [[[cell.deleteButton rac_signalForControlEvents:UIControlEventTouchUpInside] takeUntil:cell.rac_prepareForReuseSignal] subscribeNext:^(UIButton *button) |
| | | { |
| | | @strongify(self) |
| | | [self.notLikePopView show]; |
| | | @weakify(self) |
| | | self.notLikePopView.clickDelete = ^(NSString * _Nullable reasons) { |
| | | @strongify(self) |
| | | [self deleteRecommendGoods:self.contentArray[button.tag] reason:reasons]; |
| | | [self.contentArray removeObjectAtIndex:button.tag]; |
| | | @weakify(self) |
| | | [UIView performWithoutAnimation:^{ |
| | | @strongify(self) |
| | | [self.tableView reloadData]; |
| | | }]; |
| | | }; |
| | | }]; return cell; |
| | | } |
| | | |
| | | - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath |
| | | { |
| | | ((ThirdClassificationCell *)cell).model = self.contentArray[indexPath.section]; |
| | | } |
| | | |
| | | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath |
| | | { |
| | | return (SCREEN_WIDTH < 375)? 136:156; |
| | | } |
| | | |
| | | - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section |
| | | { |
| | | if (section == 0 && (self.bannerList.count != 0 || self.activityList.count)) { |
| | | if (!self.tabHeaderBannerView) { |
| | | self.tabHeaderBannerView = [[JDGoodsListBannerView alloc] init]; |
| | | } |
| | | if (self.isPageForOne == YES) { |
| | | self.tabHeaderBannerView.dataArr = self.dataArr; |
| | | self.isPageForOne = NO; |
| | | } |
| | | @weakify(self) |
| | | self.tabHeaderBannerView.clickIndex = ^(NSInteger index) { |
| | | @strongify(self) |
| | | if ([self.bannerList[index][@"jumpDetail"][@"needLogin"] boolValue] && ![ALUserInfoServiceManger fetchUID]) {// 没æç»éå»ç»é |
| | | [self onLoginVcName:nil]; |
| | | return; |
| | | } |
| | | [self.commonMethodManage pushController:self.bannerList[index][@"jumpDetail"] params:self.bannerList[index][@"params"] typePush:^(BOOL other) {}]; |
| | | }; |
| | | self.tabHeaderBannerView.activityClickIndex = ^(NSInteger index) { |
| | | @strongify(self) |
| | | if ([self.activityList[index][@"jumpDetail"][@"needLogin"] boolValue] && ![ALUserInfoServiceManger fetchUID]) {// 没æç»éå»ç»é |
| | | [self onLoginVcName:nil]; |
| | | return; |
| | | } |
| | | [self.commonMethodManage pushController:self.activityList[index][@"jumpDetail"] params:self.activityList[index][@"params"] typePush:^(BOOL other) {}]; |
| | | }; |
| | | |
| | | return self.tabHeaderBannerView; |
| | | |
| | | } else { |
| | | UIView *view = [[UIView alloc] init]; |
| | | view.backgroundColor = XYRBackgroundColor; |
| | | return view; |
| | | } |
| | | } |
| | | |
| | | - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section |
| | | { |
| | | if (section == 0 && self.bannerList.count != 0 && self.activityList.count != 0) { |
| | | return roundf(165.0/375.0*SCREEN_WIDTH) + roundf(160.0/(375.0/3.0)*(SCREEN_WIDTH/3)); |
| | | |
| | | } else if (section == 0 && self.bannerList.count) { |
| | | return roundf(165.0/375.0*SCREEN_WIDTH); |
| | | |
| | | } else if (section == 0 && self.activityList.count) { |
| | | return roundf(160.0/(375.0/3.0)*(SCREEN_WIDTH/3)); |
| | | |
| | | } else { |
| | | return 0.001; |
| | | } |
| | | } |
| | | |
| | | - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section { |
| | | if (section == self.contentArray.count - 1) { |
| | | return CGFLOAT_MIN; |
| | | |
| | | } else { |
| | | return CGFLOAT_MIN; |
| | | } |
| | | } |
| | | |
| | | - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { |
| | | UIView *view = [[UIView alloc] init]; |
| | | view.backgroundColor = XYRBackgroundColor; |
| | | return view; |
| | | } |
| | | |
| | | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { |
| | | SNGoodsDetailController *vc = [[SNGoodsDetailController alloc]init]; |
| | | vc.goodsID = ((GoodsDetailBaseModel *)self.contentArray[indexPath.section]).goodsId; |
| | | vc.goodsType = 5; |
| | | [self.navigationController pushViewController:vc animated:YES]; |
| | | } |
| | | |
| | | - (UIView *)navGaryLine { |
| | | if (!_navGaryLine) { |
| | | _navGaryLine = [[UIView alloc] init]; |
| | | _navGaryLine.frame = CGRectMake(0, 0, SCREEN_WIDTH, 0.5); |
| | | _navGaryLine.backgroundColor = UIColorFromRGBValue(0xe0e0e0); |
| | | } |
| | | return _navGaryLine; |
| | | } |
| | | |
| | | - (SJNoNetwork *)noNetworkViews { |
| | | if (_noNetworkViews) { |
| | | return _noNetworkViews; |
| | | } |
| | | _noNetworkViews = [[SJNoNetwork alloc]initWithFrame:CGRectMake(0, 0.5, SCREEN_WIDTH, SCREEN_HEIGHT)]; |
| | | _noNetworkViews.backgroundColor = XYRBackgroundColor; |
| | | [_noNetworkViews.connectBtn addTarget:self action:@selector(ClickConnectBtn:) forControlEvents:UIControlEventTouchUpInside]; |
| | | _noNetworkViews.hidden = YES; |
| | | return _noNetworkViews; |
| | | } |
| | | |
| | | - (UITableView *)tableView |
| | | { |
| | | if (!_tableView) { |
| | | CGRect rect; |
| | | rect.origin.x = 0; |
| | | rect.origin.y = 0.5; |
| | | rect.size.width = SCREEN_WIDTH; |
| | | |
| | | CGFloat heightDY = 40; |
| | | if (self.classCount == 0 || self.classCount == 1) { |
| | | heightDY = 0; |
| | | } |
| | | rect.size.height = SCREEN_HEIGHT - kNavigationBarH - kStatusBarH - 0.5 - heightDY; |
| | | |
| | | _tableView = [[UITableView alloc] initWithFrame:rect style:UITableViewStyleGrouped]; |
| | | _tableView.delegate = self; |
| | | _tableView.dataSource = self; |
| | | _tableView.estimatedRowHeight = 0; |
| | | _tableView.estimatedSectionFooterHeight = 0; |
| | | _tableView.estimatedSectionHeaderHeight = 0; |
| | | _tableView.backgroundColor = XYRBackgroundColor; |
| | | _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; |
| | | _tableView.showsVerticalScrollIndicator = NO; |
| | | |
| | | NSMutableArray *idleImages = [[NSMutableArray alloc] init]; |
| | | for (int i = 0; i < 30; i ++) { |
| | | UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"icon_down_refresh%d",i]]; |
| | | [idleImages addObject:image]; |
| | | } |
| | | @weakify(self) |
| | | MJRefreshGifHeader *header = [MJRefreshGifHeader headerWithRefreshingBlock:^{ |
| | | @strongify(self) |
| | | self.page = 1; |
| | | [self.tableView.mj_footer resetNoMoreData]; |
| | | [self loadDataSource]; |
| | | }]; |
| | | [header setImages:idleImages forState:MJRefreshStateIdle]; |
| | | [header setImages:idleImages forState:MJRefreshStatePulling]; |
| | | [header setImages:idleImages forState:MJRefreshStateRefreshing]; |
| | | header.lastUpdatedTimeLabel.hidden = YES; |
| | | header.stateLabel.hidden = YES; |
| | | _tableView.mj_header = header; |
| | | |
| | | MJRefreshAutoGifFooter *footer = [MJRefreshAutoGifFooter footerWithRefreshingBlock:^{ |
| | | @strongify(self) |
| | | [self loadDataSource]; |
| | | }]; |
| | | NSMutableArray *imagesArr = [NSMutableArray array]; |
| | | for (int i = 1; i < 13; i++) { |
| | | UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"up_%d",i]]; |
| | | [imagesArr addObject:image]; |
| | | } |
| | | [footer setImages:imagesArr forState:MJRefreshStateRefreshing]; |
| | | _tableView.mj_footer = footer; |
| | | } |
| | | return _tableView; |
| | | } |
| | | |
| | | - (UIButton *)topBtn |
| | | { |
| | | if (!_topBtn) { |
| | | _topBtn = [UIButton buttonWithType:UIButtonTypeCustom]; |
| | | [_topBtn setImage:ALIMAGE_NAMED(@"å°ç«ç®") forState:UIControlStateNormal]; |
| | | [_topBtn setHidden:YES]; |
| | | @weakify(self) |
| | | [[_topBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) { |
| | | @strongify(self) |
| | | [self.tableView setContentOffset:CGPointMake(0, 0) animated:YES]; |
| | | }]; |
| | | } |
| | | return _topBtn; |
| | | } |
| | | |
| | | - (NSMutableArray *)contentArray |
| | | { |
| | | if (!_contentArray) { |
| | | _contentArray = [[NSMutableArray alloc] init]; |
| | | } |
| | | return _contentArray; |
| | | } |
| | | |
| | | - (NSMutableArray *)bannerList |
| | | { |
| | | if (!_bannerList) { |
| | | _bannerList = [[NSMutableArray alloc] init]; |
| | | } |
| | | return _bannerList; |
| | | } |
| | | |
| | | - (NSMutableArray *)activityList |
| | | { |
| | | if (!_activityList) { |
| | | _activityList = [[NSMutableArray alloc] init]; |
| | | } |
| | | return _activityList; |
| | | } |
| | | |
| | | - (void)showSJCustomActivityView |
| | | { |
| | | [self.view addSubview:self.sjCustomActivityView]; |
| | | } |
| | | |
| | | - (void)hideSJCustomActivityView |
| | | { |
| | | [self.sjCustomActivityView hideCustomActivityView]; |
| | | } |
| | | - (SJCustomActivityView *)sjCustomActivityView |
| | | { |
| | | if (_sjCustomActivityView) { |
| | | return _sjCustomActivityView; |
| | | } |
| | | _sjCustomActivityView = [[SJCustomActivityView alloc] initView:YES isHome:NO dyHeight:0]; |
| | | return _sjCustomActivityView; |
| | | } |
| | | |
| | | - (NotLikePopView *)notLikePopView |
| | | { |
| | | if (!_notLikePopView) { |
| | | _notLikePopView = [[NotLikePopView alloc] init]; |
| | | } |
| | | return _notLikePopView; |
| | | } |
| | | |
| | | @end |
New file |
| | |
| | | // |
| | | // JDGoodsListShowController.h |
| | | // MIduo |
| | | // |
| | | // Created by éåºè¿å°ç§ææéå
¬å¸ on 2019/7/26. |
| | | // Copyright © 2019 yeshi. All rights reserved. |
| | | // |
| | | |
| | | #import <UIKit/UIKit.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | @interface SNGoodsListShowController : BaseViewController |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // JDGoodsListShowController.m |
| | | // MIduo |
| | | // |
| | | // Created by éåºè¿å°ç§ææéå
¬å¸ on 2019/7/26. |
| | | // Copyright © 2019 yeshi. All rights reserved. |
| | | // |
| | | |
| | | #import "SNGoodsListShowController.h" |
| | | #import "SNGoodsListController.h" |
| | | |
| | | #import <JDSDK/JDKeplerSDK.h> |
| | | |
| | | @interface SNGoodsListShowController () <ZJScrollPageViewDelegate> |
| | | |
| | | @property (nonatomic, nullable, strong) NSMutableArray *titleArray; |
| | | @property (nonatomic, nullable, strong) NSMutableArray *contentArray; |
| | | @property (nonatomic, nullable, copy) NSString *suningLink; |
| | | /// ç½ç»é®æ¡å± |
| | | @property (nonatomic,strong) SJNoNetwork *noNetworkViews; |
| | | |
| | | @property (nonatomic, nullable, strong) SJCustomActivityView *sjCustomActivityView; |
| | | |
| | | @end |
| | | |
| | | @implementation SNGoodsListShowController |
| | | |
| | | - (void)viewWillAppear:(BOOL)animated |
| | | { |
| | | [super viewWillAppear:animated]; |
| | | [self.navigationController setNavigationBarHidden:NO animated:animated]; |
| | | } |
| | | |
| | | - (void)viewWillDisappear:(BOOL)animated |
| | | { |
| | | [super viewWillDisappear:animated]; |
| | | } |
| | | |
| | | - (void)viewDidLoad |
| | | { |
| | | [super viewDidLoad]; |
| | | [self setupDataConfig]; |
| | | [self setupNavConfig]; |
| | | [self.view addSubview:self.noNetworkViews]; |
| | | [self addNetWorkNotice]; |
| | | } |
| | | |
| | | - (void)setupDataConfig |
| | | { |
| | | |
| | | } |
| | | |
| | | - (void)setupNavConfig |
| | | { |
| | | self.navigationController.navigationBar.translucent = NO; |
| | | self.navigationController.navigationBar.barTintColor = FLQNewNavigationBarColor; |
| | | self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName:FLQNewNavigationTitleColor,NSFontAttributeName:[UIFont boldSystemFontOfSize:FLQNewNavigationTitleFont]}; |
| | | self.title = @"èå®ç²¾é"; |
| | | self.view.backgroundColor = XYRBackgroundColor; |
| | | |
| | | UIButton *navRightButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 50, 30)]; |
| | | [navRightButton setTitle:@"å»èå®" forState:UIControlStateNormal]; |
| | | [navRightButton setTitleColor:FLQNewNavigationTitleColor forState:UIControlStateNormal]; |
| | | navRightButton.titleLabel.font = [UIFont systemFontOfSize:17]; |
| | | [navRightButton addTarget:self action:@selector(onNavRightEvent) forControlEvents:UIControlEventTouchUpInside]; |
| | | self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:navRightButton]; |
| | | } |
| | | |
| | | /** |
| | | * å è½½æ°æ® |
| | | */ |
| | | - (void)loadDataSource { |
| | | @weakify(self) |
| | | [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP2,@"suning/getClass"] param:nil success:^(NSDictionary *object) |
| | | { |
| | | @strongify(self) |
| | | @weakify(self) |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | @strongify(self) |
| | | [self hideSJCustomActivityView]; |
| | | if ([object[@"code"] integerValue] == 0) { |
| | | [self.titleArray removeAllObjects]; |
| | | [self.contentArray removeAllObjects]; |
| | | self.suningLink = object[@"data"][@"suningLink"]; |
| | | for (NSDictionary *dictionary in object[@"data"][@"list"]) { |
| | | [self.titleArray addObject:dictionary[@"name"]]; |
| | | } |
| | | [self.contentArray addObjectsFromArray:object[@"data"][@"list"]]; |
| | | [self setupViewConfig]; |
| | | } |
| | | }); |
| | | |
| | | } fail:^(id object) { |
| | | [self hideSJCustomActivityView]; |
| | | if (((NSError *)object).code == -1009) { // 没æç½ç» |
| | | if (self.contentArray.count != 0) { |
| | | self.noNetworkViews.hidden = YES; |
| | | [JRToast showWithText:NETWORK_CONNECT_ANOMALY bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | |
| | | } else { |
| | | self.noNetworkViews.primtTitle.text = NETWORK_CONNECT_ANOMALY; |
| | | [self.noNetworkViews.iconImage setImage:ALIMAGE_NAMED(@"defaultPage_noNetWork")]; |
| | | self.noNetworkViews.hidden = NO; |
| | | } |
| | | |
| | | } else { |
| | | if (self.contentArray.count == 0) { |
| | | self.noNetworkViews.primtTitle.text = NETWORK_CONNECT_ANOMALY; |
| | | [self.noNetworkViews.iconImage setImage:ALIMAGE_NAMED(@"defaultPage_noNetWork")]; |
| | | self.noNetworkViews.hidden = NO; |
| | | |
| | | } else { |
| | | self.noNetworkViews.hidden = YES; |
| | | [JRToast showWithText:NETWORK_CONNECT_ANOMALY bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | } |
| | | }]; |
| | | } |
| | | |
| | | - (void)addNetWorkNotice |
| | | { |
| | | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(NetWorkStatesChange:) name:@"netWorkChangeEventNotification" object:nil]; |
| | | |
| | | AppDelegate *delegate = (AppDelegate *)[UIApplication sharedApplication].delegate; |
| | | |
| | | if (delegate.netWorkStatesCode == AFNetworkReachabilityStatusNotReachable) { |
| | | NSNotification * notice = [NSNotification notificationWithName:@"statesCode" object:@(delegate.netWorkStatesCode) userInfo:nil]; |
| | | [self NetWorkStatesChange:notice]; |
| | | } |
| | | else if (delegate.netWorkStatesCode == AFNetworkReachabilityStatusReachableViaWiFi){ |
| | | NSNotification * notice = [NSNotification notificationWithName:@"statesCode" object:@(delegate.netWorkStatesCode) userInfo:nil]; |
| | | [self NetWorkStatesChange:notice]; |
| | | |
| | | } else if (delegate.netWorkStatesCode == AFNetworkReachabilityStatusReachableViaWWAN) { |
| | | NSNotification * notice = [NSNotification notificationWithName:@"statesCode" object:@(delegate.netWorkStatesCode) userInfo:nil]; |
| | | [self NetWorkStatesChange:notice]; |
| | | |
| | | } else { |
| | | NSNotification * notice = [NSNotification notificationWithName:@"statesCode" object:@(delegate.netWorkStatesCode) userInfo:nil]; |
| | | [self NetWorkStatesChange:notice]; |
| | | } |
| | | } |
| | | |
| | | - (void)NetWorkStatesChange:(NSNotification *)sender { |
| | | |
| | | int networkState = [[sender object] intValue]; |
| | | switch (networkState) { |
| | | |
| | | case -1: { |
| | | |
| | | if (self.contentArray.count == 0) { |
| | | self.noNetworkViews.primtTitle.text = NETWORK_CONNECT_ANOMALY; |
| | | [self.noNetworkViews.iconImage setImage:ALIMAGE_NAMED(@"defaultPage_noNetWork")]; |
| | | self.noNetworkViews.hidden = NO; |
| | | |
| | | } else { |
| | | self.noNetworkViews.hidden = YES; |
| | | [JRToast showWithText:NETWORK_CONNECT_ANOMALY bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | case 0: { // 没æç½ç» |
| | | |
| | | if (self.contentArray.count == 0) { |
| | | self.noNetworkViews.primtTitle.text = NETWORK_CONNECT_ANOMALY; |
| | | [self.noNetworkViews.iconImage setImage:ALIMAGE_NAMED(@"defaultPage_noNetWork")]; |
| | | self.noNetworkViews.hidden = NO; |
| | | |
| | | |
| | | } else { |
| | | self.noNetworkViews.hidden = YES; |
| | | [JRToast showWithText:NETWORK_CONNECT_ANOMALY bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | case 1: { // 3Gæè
4Gï¼åæ£ç¨çæ¯æµé |
| | | |
| | | self.noNetworkViews.hidden = YES; |
| | | if (self.contentArray.count == 0) { |
| | | [self showSJCustomActivityView]; |
| | | [self loadDataSource]; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | case 2: { // WIFIç½ç» |
| | | |
| | | self.noNetworkViews.hidden = YES; |
| | | if (self.contentArray.count == 0) { |
| | | [self showSJCustomActivityView]; |
| | | [self loadDataSource]; |
| | | } |
| | | break; |
| | | } |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | |
| | | #pragma mark --- click event --- |
| | | - (void)ClickConnectBtn:(UIButton *)sender { |
| | | if (iOS10) { |
| | | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] |
| | | options:@{} completionHandler:nil]; |
| | | } else { |
| | | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]]; |
| | | } |
| | | } |
| | | |
| | | |
| | | - (void)setupViewConfig { |
| | | CGFloat zjheight = 40; |
| | | if (self.titleArray.count == 0 || self.titleArray.count == 1) { |
| | | zjheight = 0; |
| | | } |
| | | ZJSegmentStyle *style = [[ZJSegmentStyle alloc] init]; |
| | | // æ¾ç¤ºé®ç |
| | | style.showLine = YES; |
| | | // æ»å¨æ¡çé¢è² |
| | | style.scrollLineColor = XYRMainColor; |
| | | // éä¸åä½çé¢è² |
| | | style.selectedTitleColor = XYRMainColor; |
| | | // æ é¢ä¸è¬ç¶æçé¢è² |
| | | style.normalTitleColor = YTHColor(51, 51, 51); |
| | | // æ é¢ä¹é´çé´é |
| | | style.titleMargin = 25; |
| | | // æ é¢è·ç¦»å·¦ä¾§çé´é |
| | | style.titleLeftLength = 15; |
| | | //æ¾å¤§åæ° |
| | | style.titleBigScale = 1.1; |
| | | //æ¯å¦ç¼©æ¾æ é¢ |
| | | style.scaleTitle = YES; |
| | | //åä½ |
| | | style.titleFont = [UIFont systemFontOfSize:16]; |
| | | //设置segmentçé«åº¦ |
| | | style.segmentHeight = zjheight; |
| | | style.imagePosition = TitleImagePositionLeft; |
| | | style.showImage = YES; |
| | | style.autoAdjustTitlesWidth = YES; |
| | | //åå§å |
| | | ALScrollPageView *scrollPageView = [[ALScrollPageView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT - kNavigationBarH - kStatusBarH) segmentStyle:style titles:self.contentArray parentViewController:self isHomeAlloc:NO isFirstGraphicMixed:NO delegate:self]; |
| | | [self.view addSubview:scrollPageView]; |
| | | } |
| | | |
| | | - (NSInteger)numberOfChildViewControllers { |
| | | if (self.contentArray.count == 0) { |
| | | return 1; |
| | | |
| | | } else { |
| | | return self.contentArray.count; |
| | | } |
| | | } |
| | | |
| | | - (UIViewController<ZJScrollPageViewChildVcDelegate> *)childViewController:(UIViewController<ZJScrollPageViewChildVcDelegate> *)reuseViewController forIndex:(NSInteger)index { |
| | | |
| | | UIViewController<ZJScrollPageViewChildVcDelegate> *childVc = reuseViewController; |
| | | |
| | | if (!childVc) { |
| | | SNGoodsListController *vc = [[SNGoodsListController alloc] init]; |
| | | vc.classCount = _contentArray.count; |
| | | vc.cid = self.contentArray[index][@"id"]; |
| | | childVc = vc; |
| | | } |
| | | return childVc; |
| | | } |
| | | |
| | | |
| | | #pragma mark --- click event --- |
| | | - (void)onNavRightEvent { |
| | | [self jumpJingDong:YES jumpLink:self.suningLink?:@""]; |
| | | } |
| | | |
| | | #pragma mark --- private method --- |
| | | - (void)jumpJingDong:(BOOL)native jumpLink:(NSString *)jumpLink { |
| | | ShonpingShareViewController *shonpingShareVc = [[ShonpingShareViewController alloc] init]; |
| | | shonpingShareVc.urlString = jumpLink; |
| | | [self.navigationController pushViewController:shonpingShareVc animated:YES]; |
| | | } |
| | | |
| | | #pragma mark --- getter --- |
| | | - (SJNoNetwork *)noNetworkViews { |
| | | if (_noNetworkViews) { |
| | | return _noNetworkViews; |
| | | } |
| | | _noNetworkViews = [[SJNoNetwork alloc]initWithFrame:CGRectMake(0, 0.5, SCREEN_WIDTH, SCREEN_HEIGHT)]; |
| | | _noNetworkViews.backgroundColor = XYRBackgroundColor; |
| | | [_noNetworkViews.connectBtn addTarget:self action:@selector(ClickConnectBtn:) forControlEvents:UIControlEventTouchUpInside]; |
| | | _noNetworkViews.hidden = YES; |
| | | return _noNetworkViews; |
| | | } |
| | | |
| | | - (NSMutableArray *)titleArray { |
| | | if (!_titleArray) { |
| | | _titleArray = [[NSMutableArray alloc] init]; |
| | | } |
| | | return _titleArray; |
| | | } |
| | | |
| | | - (NSMutableArray *)contentArray { |
| | | if (!_contentArray) { |
| | | _contentArray = [[NSMutableArray alloc] init]; |
| | | } |
| | | return _contentArray; |
| | | } |
| | | |
| | | |
| | | - (void)showSJCustomActivityView { |
| | | |
| | | [self.view addSubview:self.sjCustomActivityView]; |
| | | } |
| | | |
| | | - (void)hideSJCustomActivityView { |
| | | |
| | | [self.sjCustomActivityView hideCustomActivityView]; |
| | | } |
| | | - (SJCustomActivityView *)sjCustomActivityView { |
| | | |
| | | if (_sjCustomActivityView) { |
| | | return _sjCustomActivityView; |
| | | } |
| | | _sjCustomActivityView = [[SJCustomActivityView alloc] initView:YES isHome:NO dyHeight:0]; |
| | | return _sjCustomActivityView; |
| | | } |
| | | |
| | | @end |
| | |
| | | _buttonHairCircle.frame = CGRectMake(0, 0, (SCREEN_WIDTH - 28) / 2, 30); |
| | | [_buttonHairCircle setTitleColor:UIColorFromRGBValue(0xE5005C) forState:UIControlStateNormal]; |
| | | [_buttonHairCircle setImage:[UIImage imageNamed:@"icon_goodsDetail_hairCircle"] forState:UIControlStateNormal]; |
| | | [_buttonHairCircle setTitle:@" ä¸é®åå" forState:UIControlStateNormal]; |
| | | [_buttonHairCircle setTitle:@" ä¸é®åå" forState:UIControlStateNormal]; |
| | | _buttonHairCircle.titleLabel.font = [UIFont systemFontOfSize:14]; |
| | | return _buttonHairCircle; |
| | | } |
| | |
| | | /// æ¯å¦ç¦»å¼è¿å½åè§å¾ |
| | | @property (nonatomic, assign) BOOL isLeavedNowView; |
| | | |
| | | @property (nonatomic, assign) BOOL isRequestAPI; |
| | | |
| | | @property (nonatomic, nullable, strong) FetchGoldcoinPopView *fetchGoldcoinPopView; |
| | | |
| | | @property (nonatomic, strong) UIView *backView; |
| | |
| | | |
| | | #pragma mark- GDrecomeTableViewCellDelegate |
| | | - (void)cellClicked:(GDrecomeTableViewCell *)cell goodId:(NSString *)goodsID { |
| | | PDDGoodsDetailController *goodDeTrVc = [[PDDGoodsDetailController alloc] init]; |
| | | goodDeTrVc.goodsID = goodsID; |
| | | goodDeTrVc.goodsType = 3; |
| | | [self.navigationController pushViewController:goodDeTrVc animated:YES]; |
| | | WPHGoodsDetailController *vc = [[WPHGoodsDetailController alloc] init]; |
| | | vc.goodsID = goodsID; |
| | | vc.goodsType = 4; |
| | | [self.navigationController pushViewController:vc animated:YES]; |
| | | } |
| | | |
| | | - (void)touchMaxCoupon { |
| | |
| | | } else { |
| | | ShonpingShareViewController *shonpingShareVc = [[ShonpingShareViewController alloc] init]; |
| | | shonpingShareVc.urlString = jumpLink; |
| | | shonpingShareVc.from = @"goodsDetail"; |
| | | [self.navigationController pushViewController:shonpingShareVc animated:YES]; |
| | | } |
| | | } |
| | |
| | | return; |
| | | } |
| | | sender.userInteractionEnabled = NO; |
| | | [self userStorageaddstorage]; |
| | | [self onecClickBilling]; |
| | | } |
| | | |
| | | - (void)userStorageaddstorage { |
| | | // NSDictionary *dic = @{@"uid":[ALUserInfoServiceManger fetchUID],@"id":self.goodsModel.goodsId,@"goodsType":[NSString stringWithFormat:@"%ld",(long)_goodsType]}; |
| | | // @weakify(self) |
| | | // [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP2,@"shraeStorage/accordtorage"] param:dic success:^(NSDictionary *object) |
| | | // { |
| | | // @strongify(self) |
| | | // dispatch_async(dispatch_get_main_queue(), ^{ |
| | | // WPHGoodsdetailInfoCell *cell = [self.detailTableview cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]]; |
| | | // cell.buttonHairCircle.userInteractionEnabled = YES; |
| | | // if ([object[@"code"] integerValue] == 0) { |
| | | // BOOL storageState = [object[@"data"][@"storageState"] boolValue]; |
| | | // self.storageState = storageState; |
| | | // if (storageState) { |
| | | // [JRToast showWithText:@"æ·»å è³åäº«åºæå" bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | // [UMCustomShop umDetail_joinXPK]; |
| | | // cell.ProLibraryBtn.selected = YES; |
| | | // |
| | | // } else { |
| | | // [JRToast showWithText:@"å·²ä»å享åºä¸å é¤" bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | // [UMCustomShop umDetail_goods_detail_xpk_cancel]; |
| | | // cell.ProLibraryBtn.selected = NO; |
| | | // } |
| | | // |
| | | // } else { |
| | | // [JRToast showWithText:object[@"msg"] bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | // } |
| | | // }); |
| | | // |
| | | // } fail:^(id object) { |
| | | // dispatch_async(dispatch_get_main_queue(), ^{ |
| | | // WPHGoodsdetailInfoCell *cell = [self.detailTableview cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]]; |
| | | // cell.buttonHairCircle.userInteractionEnabled = YES; |
| | | // }); |
| | | // }]; |
| | | - (void)onecClickBilling { |
| | | if (self.isRequestAPI) { |
| | | return; |
| | | } |
| | | [self.view makeToastActivity:CSToastPositionCenter]; |
| | | self.isRequestAPI = YES; |
| | | NSDictionary *params = @{@"uid":[ALUserInfoServiceManger fetchUID],@"goodsId":self.goodsModel.goodsId,@"goodsType":[NSString stringWithFormat:@"%ld",(long)_goodsType]}; |
| | | |
| | | @weakify(self) |
| | | [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP2,@"user/cloud/sendGoods"] param:params success:^(NSDictionary *object) { |
| | | @strongify(self) |
| | | self.isRequestAPI = NO; |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | [self.view hideToastActivity]; |
| | | if ([self isHaveValue:object] ) { |
| | | if ([object[@"code"] integerValue] == 0) { |
| | | if ([self isHaveValue:object[@"data"] ]){ |
| | | [JRToast showWithText:object[@"data"] bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | |
| | | } else if ([object[@"code"] integerValue] == 1001 || |
| | | [object[@"code"] integerValue] == 1002 || |
| | | [object[@"code"] integerValue] == 1003 || |
| | | [object[@"code"] integerValue] == 1004 || |
| | | [object[@"code"] integerValue] == 1005) { |
| | | |
| | | if ([self isHaveValue:object[@"msg"]]) { |
| | | [JRToast showWithText:object[@"msg"] bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | [self pushAnyInterfaceController:@"ShonpingShareViewController" parms:@{@"url":object[@"data"][@"link"]}]; |
| | | |
| | | } else { |
| | | if ([self isHaveValue:object[@"msg"]]) { |
| | | [JRToast showWithText:object[@"msg"] bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | } |
| | | |
| | | } |
| | | }); |
| | | |
| | | } fail:^(id object) { |
| | | [self.view hideToastActivity]; |
| | | self.isRequestAPI = NO; |
| | | }]; |
| | | } |
| | | |
| | | - (void)noticeMineBackEvent:(NSString *)vcName |
| | |
| | | return 10; |
| | | |
| | | } else { |
| | | CGFloat heightRecommend = 0.0; |
| | | CGFloat heightFooter = 0, heightCloud = 0, heightRecommend = 0.0; |
| | | |
| | | if ([self isHaveValue:self.extraDictionary[@"cloudText"]]) { |
| | | heightCloud = 145; |
| | | } |
| | | |
| | | if ([self isHaveValue:self.goodsModel.descriptions]) { |
| | | CGFloat heghtDescr = [self getLabelHeightWithText:self.goodsModel.descriptions width:SCREEN_WIDTH - 20 font:(SCREEN_WIDTH < 375)?10:12] + 37 + 15 + 20; |
| | | heightRecommend = heghtDescr; |
| | | |
| | | } else { |
| | | heightRecommend = 10; |
| | | } |
| | | return heightRecommend; |
| | | heightFooter = heightCloud + heightRecommend + 10; |
| | | return heightFooter; |
| | | } |
| | | |
| | | } else { |
| | |
| | | return view; |
| | | |
| | | } else { |
| | | CGFloat heightRecommend = 0.0; |
| | | CGFloat heightFooter = 0, heightCloud = 0, heightRecommend = 0.0; |
| | | if ([self isHaveValue:self.extraDictionary[@"cloudText"]]) { |
| | | heightCloud = 145; |
| | | } |
| | | |
| | | if ([self isHaveValue:self.goodsModel.descriptions]) { |
| | | CGFloat heghtDescr = [self getLabelHeightWithText:self.goodsModel.descriptions width:SCREEN_WIDTH - 20 font:(SCREEN_WIDTH < 375)?10:12] + 37 + 15 + 20; |
| | | heightRecommend = heghtDescr; |
| | | |
| | | } else { |
| | | heightRecommend = CGFLOAT_MIN; |
| | | } |
| | | GoosStoreInfoView *view = [[GoosStoreInfoView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, heightRecommend)]; |
| | | |
| | | heightFooter = heightCloud + heightRecommend + 0.001; |
| | | GoosStoreInfoView *view = [[GoosStoreInfoView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, heightFooter)]; |
| | | view.cloudText = self.extraDictionary[@"cloudText"]; |
| | | view.cloudPic = self.extraDictionary[@"cloudPic"]; |
| | | view.model = self.goodsModel; |
| | | return view; |
| | | } |
New file |
| | |
| | | // |
| | | // JDGoodsListController.h |
| | | // MIduo |
| | | // |
| | | // Created by éåºè¿å°ç§ææéå
¬å¸ on 2019/7/26. |
| | | // Copyright © 2019 yeshi. All rights reserved. |
| | | // |
| | | |
| | | #import <UIKit/UIKit.h> |
| | | #import "ALScrollPageView.h" |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | @interface WPHGoodsListController : BaseViewController <ZJScrollPageViewChildVcDelegate> |
| | | |
| | | @property (nonatomic, assign) NSInteger classCount; |
| | | |
| | | @property (nonatomic, nullable, copy) NSString *cid; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // JDGoodsListController.m |
| | | // MIduo |
| | | // |
| | | // Created by éåºè¿å°ç§ææéå
¬å¸ on 2019/7/26. |
| | | // Copyright © 2019 yeshi. All rights reserved. |
| | | // |
| | | |
| | | #import "WPHGoodsListController.h" |
| | | #import "WPHGoodsDetailController.h" |
| | | |
| | | #import "ThirdClassificationCell.h" |
| | | #import "JDGoodsListBannerView.h" |
| | | |
| | | #import "NotLikePopView.h" |
| | | |
| | | @interface WPHGoodsListController () <UITableViewDelegate, UITableViewDataSource, NewLoginViewDelegate> |
| | | |
| | | @property (nonatomic, nullable, strong) UITableView *tableView; |
| | | /// å¯¼èªæ ç°çº¿ |
| | | @property (nonatomic, nullable, strong) UIView *navGaryLine; |
| | | /// ä¸å欢åå |
| | | @property (nonatomic, nullable, strong) NotLikePopView *notLikePopView; |
| | | /// 头é¨ä¼¦è½®æ |
| | | @property (nonatomic, nullable, strong) JDGoodsListBannerView *tabHeaderBannerView; |
| | | /// ç½ç»é®æ¡å± |
| | | @property (nonatomic,strong) SJNoNetwork *noNetworkViews; |
| | | |
| | | @property (nonatomic, nullable, strong) SJCustomActivityView *sjCustomActivityView; |
| | | /// 页ç |
| | | @property (nonatomic, assign) NSInteger page; |
| | | /// é¡µç æ¯ä¸æ¯ä¸º1 |
| | | @property (nonatomic, assign) BOOL isPageForOne; |
| | | |
| | | @property (nonatomic, nullable, strong) NSMutableArray *contentArray; |
| | | |
| | | @property (nonatomic, nullable, strong) NSMutableArray *bannerList; |
| | | |
| | | @property (nonatomic, nullable, strong) NSMutableArray *activityList; |
| | | |
| | | @property (nonatomic, nullable, strong) NSArray *dataArr; |
| | | |
| | | @property (nonatomic, assign) NSInteger count; |
| | | /// å°ç«ç® |
| | | @property (nonatomic, nullable, strong) UIButton *topBtn; |
| | | /// æ»å¨ç»æçä½ç½® |
| | | @property (nonatomic, assign) float lastContentOffset; |
| | | |
| | | @property (nonatomic, nullable, strong) XHTabBarController *tabbar; |
| | | |
| | | @end |
| | | |
| | | @implementation WPHGoodsListController |
| | | |
| | | - (BOOL)shouldAutomaticallyForwardAppearanceMethods |
| | | { |
| | | return NO; |
| | | } |
| | | |
| | | - (void)viewDidLoad |
| | | { |
| | | [super viewDidLoad]; |
| | | [self setupDataConfig]; |
| | | [self setupViewConfig]; |
| | | } |
| | | |
| | | - (void)setupDataConfig { |
| | | self.page = 1; |
| | | self.isPageForOne = YES; |
| | | self.tabbar = (XHTabBarController *)[UIApplication sharedApplication].keyWindow.rootViewController; |
| | | } |
| | | |
| | | - (void)loadDataSource |
| | | { |
| | | NSMutableDictionary *params = [[NSMutableDictionary alloc] init]; |
| | | [params setObject:[NSString stringWithFormat:@"%ld",(long)self.page] forKey:@"page"]; |
| | | [params setObject:self.cid forKey:@"cid"]; |
| | | @weakify(self) |
| | | [[ALNetWorking startInterface] Post:[NSString stringWithFormat:@"%@/%@",domainHTTP2, @"vipshop/getGoodsInfo"] param:params success:^(NSDictionary *object) |
| | | { |
| | | @strongify(self) |
| | | @weakify(self) |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | @strongify(self) |
| | | if ([object[@"code"] integerValue] == 0) { |
| | | if (self.page == 1) { |
| | | self.isPageForOne = YES; |
| | | [self.contentArray removeAllObjects]; |
| | | [self.bannerList removeAllObjects]; |
| | | [self.activityList removeAllObjects]; |
| | | [self.bannerList addObjectsFromArray:object[@"data"][@"listPic"]]; |
| | | [self.activityList addObjectsFromArray:object[@"data"][@"listSpe"]]; |
| | | self.dataArr = @[self.bannerList,self.activityList]; |
| | | } |
| | | self.count = [object[@"data"][@"count"] integerValue]; |
| | | for (NSDictionary *dictionary in object[@"data"][@"list"]) { |
| | | [self.contentArray addObject:[GoodsDetailBaseModel yy_modelWithJSON:dictionary]]; |
| | | } |
| | | self.page++; |
| | | @weakify(self) |
| | | [UIView performWithoutAnimation:^{ |
| | | @strongify(self) |
| | | [self.tableView reloadData]; |
| | | }]; |
| | | } |
| | | [self hideSJCustomActivityView]; |
| | | [self.tableView.mj_header endRefreshing]; |
| | | [self.tableView.mj_footer endRefreshing]; |
| | | if ((self.contentArray.count == self.count) && self.contentArray.count != 0) { |
| | | [self.tableView.mj_footer endRefreshingWithNoMoreData]; |
| | | } |
| | | }); |
| | | |
| | | } fail:^(id object) { |
| | | @strongify(self) |
| | | [self hideSJCustomActivityView]; |
| | | [self.tableView.mj_header endRefreshing]; |
| | | [self.tableView.mj_footer endRefreshing]; |
| | | if (((NSError *)object).code == -1009) { |
| | | if (self.contentArray.count != 0) { |
| | | self.noNetworkViews.hidden = YES; |
| | | [JRToast showWithText:NETWORK_CONNECT_ANOMALY bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | |
| | | } else { |
| | | self.noNetworkViews.primtTitle.text = NETWORK_CONNECT_ANOMALY; |
| | | [self.noNetworkViews.iconImage setImage:ALIMAGE_NAMED(@"defaultPage_noNetWork")]; |
| | | self.noNetworkViews.hidden = NO; |
| | | } |
| | | |
| | | } else { |
| | | if (self.contentArray.count != 0) { |
| | | self.noNetworkViews.hidden = YES; |
| | | [JRToast showWithText:NETWORK_CONNECT_ANOMALY bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | |
| | | } else { |
| | | self.noNetworkViews.primtTitle.text = NETWORK_CONNECT_ANOMALY; |
| | | [self.noNetworkViews.iconImage setImage:ALIMAGE_NAMED(@"defaultPage_noNetWork")]; |
| | | self.noNetworkViews.hidden = NO; |
| | | } |
| | | } |
| | | }]; |
| | | } |
| | | |
| | | - (void)setupViewConfig |
| | | { |
| | | [self.view addSubview:self.navGaryLine]; |
| | | [self.view addSubview:self.tableView]; |
| | | // ç«ç® |
| | | [self.view addSubview:self.topBtn]; |
| | | self.topBtn.sd_layout.bottomSpaceToView(self.view, (IS_IPHONE_X? 156.5:136.5) - kToolBarH).rightSpaceToView(self.view, 20).widthIs(43).heightIs(43); |
| | | |
| | | [self.view addSubview:self.noNetworkViews]; |
| | | [self addNetWorkNotice]; |
| | | } |
| | | |
| | | #pragma mark --- privte method --- |
| | | - (void)addNetWorkNotice |
| | | { |
| | | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(NetWorkStatesChange:) name:@"netWorkChangeEventNotification" object:nil]; |
| | | AppDelegate *delegate = (AppDelegate *)[UIApplication sharedApplication].delegate; |
| | | if (delegate.netWorkStatesCode == AFNetworkReachabilityStatusNotReachable) { |
| | | NSNotification * notice = [NSNotification notificationWithName:@"statesCode" object:@(delegate.netWorkStatesCode) userInfo:nil]; |
| | | [self NetWorkStatesChange:notice]; |
| | | |
| | | } else if (delegate.netWorkStatesCode == AFNetworkReachabilityStatusReachableViaWiFi){ |
| | | NSNotification * notice = [NSNotification notificationWithName:@"statesCode" object:@(delegate.netWorkStatesCode) userInfo:nil]; |
| | | [self NetWorkStatesChange:notice]; |
| | | |
| | | } else if (delegate.netWorkStatesCode == AFNetworkReachabilityStatusReachableViaWWAN) { |
| | | NSNotification * notice = [NSNotification notificationWithName:@"statesCode" object:@(delegate.netWorkStatesCode) userInfo:nil]; |
| | | [self NetWorkStatesChange:notice]; |
| | | |
| | | } else { |
| | | NSNotification * notice = [NSNotification notificationWithName:@"statesCode" object:@(delegate.netWorkStatesCode) userInfo:nil]; |
| | | [self NetWorkStatesChange:notice]; |
| | | } |
| | | } |
| | | |
| | | - (void)NetWorkStatesChange:(NSNotification *)sender |
| | | { |
| | | int networkState = [[sender object] intValue]; |
| | | |
| | | switch (networkState) { |
| | | |
| | | case -1: { |
| | | if (self.contentArray.count == 0 && self.contentArray.count == 0) { |
| | | self.noNetworkViews.primtTitle.text = NETWORK_CONNECT_ANOMALY; |
| | | [self.noNetworkViews.iconImage setImage:ALIMAGE_NAMED(@"defaultPage_noNetWork")]; |
| | | self.noNetworkViews.hidden = NO; |
| | | |
| | | } else { |
| | | self.noNetworkViews.hidden = YES; |
| | | [JRToast showWithText:NETWORK_CONNECT_ANOMALY bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | case 0: { // 没æç½ç» |
| | | if (self.contentArray.count == 0 && self.contentArray.count == 0) { |
| | | self.noNetworkViews.primtTitle.text = NETWORK_CONNECT_ANOMALY; |
| | | [self.noNetworkViews.iconImage setImage:ALIMAGE_NAMED(@"defaultPage_noNetWork")]; |
| | | self.noNetworkViews.hidden = NO; |
| | | |
| | | } else { |
| | | self.noNetworkViews.hidden = YES; |
| | | [JRToast showWithText:NETWORK_CONNECT_ANOMALY bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | case 1: { // 3Gæè
4Gï¼åæ£ç¨çæ¯æµé |
| | | self.noNetworkViews.hidden = YES; |
| | | if (self.contentArray.count == 0) { |
| | | [self showSJCustomActivityView]; |
| | | [self loadDataSource]; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | case 2: { // WIFIç½ç» |
| | | self.noNetworkViews.hidden = YES; |
| | | if (self.contentArray.count == 0) { |
| | | [self showSJCustomActivityView]; |
| | | [self loadDataSource]; |
| | | } |
| | | break; |
| | | } |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | |
| | | #pragma mark - å
³é®ä»£ç ï¼æ»å¨æ¹å夿 |
| | | - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView |
| | | { |
| | | self.lastContentOffset = scrollView.contentOffset.y; |
| | | } |
| | | |
| | | - (void)scrollViewWillBeginDecelerating:(UIScrollView *)scrollView |
| | | { |
| | | BOOL isExpand = [[NSUserDefaults standardUserDefaults] boolForKey:@"JDItemIsExpand"]; |
| | | if (self.lastContentOffset < scrollView.contentOffset.y) { |
| | | ALLog(@"å䏿»å¨"); |
| | | if (isExpand) { |
| | | [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"JDItemIsExpand"]; |
| | | [self.topBtn setHidden:YES]; |
| | | } |
| | | |
| | | } else { |
| | | ALLog(@"å䏿»å¨"); |
| | | if (!isExpand) { |
| | | [[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"JDItemIsExpand"]; |
| | | [self.topBtn setHidden:NO]; |
| | | } |
| | | } |
| | | } |
| | | |
| | | - (void)scrollViewDidScroll:(UIScrollView *)scrollView |
| | | { |
| | | if (scrollView.contentOffset.y < SCREEN_WIDTH / 2) { |
| | | [self.topBtn setHidden:YES]; |
| | | } |
| | | } |
| | | |
| | | #pragma mark --- click event --- |
| | | - (void)ClickConnectBtn:(UIButton *)sender |
| | | { |
| | | if (iOS10) { |
| | | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] |
| | | options:@{} completionHandler:nil]; |
| | | } else { |
| | | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]]; |
| | | } |
| | | } |
| | | |
| | | - (void)onLoginVcName:(NSString *)vcName |
| | | { |
| | | [JRToast showWithText:@"请å
ç»å½æ¿æ å¿«çè´¦å·" bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | // ç»å½çé¢ |
| | | NewLoginViewController *loginVc = [[NewLoginViewController alloc] init]; |
| | | loginVc.delegate = self; |
| | | loginVc.rootVc = self; |
| | | loginVc.vcName = vcName; |
| | | [self.navigationController pushViewController:loginVc animated:YES]; |
| | | } |
| | | |
| | | - (void)noticeMineBackEvent:(NSString *)vcName { |
| | | |
| | | } |
| | | |
| | | #pragma mark --- private method --- |
| | | - (void)deleteRecommendGoods:(GoodsDetailBaseModel *)goodsModel reason:(NSString *)reason |
| | | { |
| | | NSMutableDictionary *params = [[NSMutableDictionary alloc] init]; |
| | | if([ALUserInfoServiceManger fetchUID]){ |
| | | [params setObject:[ALUserInfoServiceManger fetchUID] forKey:@"uid"]; |
| | | } |
| | | [params setObject:goodsModel.goodsId forKey:@"goodsId"]; |
| | | [params setObject:@"2" forKey:@"source"]; |
| | | [params setObject:reason forKey:@"reason"]; |
| | | [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP, @"goods/deleteRecommendGoods"] param:params success:^(NSDictionary *object) |
| | | { |
| | | if ([object[@"code"] integerValue] == 0) { |
| | | |
| | | } |
| | | |
| | | } fail:^(id object) { |
| | | |
| | | }]; |
| | | } |
| | | |
| | | #pragma mark --- UITableViewDelegate, UITableViewDataSource --- |
| | | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView |
| | | { |
| | | return self.contentArray.count; |
| | | } |
| | | |
| | | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath |
| | | { |
| | | |
| | | static NSString *identifier = @"thirdClassificationCell"; |
| | | ThirdClassificationCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; |
| | | if (!cell) { |
| | | cell = [[ThirdClassificationCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier]; |
| | | [cell useCellFrameCacheWithIndexPath:indexPath tableView:tableView]; |
| | | } |
| | | cell.isHideGaryBgView = NO; |
| | | cell.isShowDelete = ((GoodsDetailBaseModel *)self.contentArray[indexPath.section]).recommend; |
| | | cell.deleteButton.tag = indexPath.section; |
| | | @weakify(self) |
| | | [[[cell.deleteButton rac_signalForControlEvents:UIControlEventTouchUpInside] takeUntil:cell.rac_prepareForReuseSignal] subscribeNext:^(UIButton *button) |
| | | { |
| | | @strongify(self) |
| | | [self.notLikePopView show]; |
| | | @weakify(self) |
| | | self.notLikePopView.clickDelete = ^(NSString * _Nullable reasons) { |
| | | @strongify(self) |
| | | [self deleteRecommendGoods:self.contentArray[button.tag] reason:reasons]; |
| | | [self.contentArray removeObjectAtIndex:button.tag]; |
| | | @weakify(self) |
| | | [UIView performWithoutAnimation:^{ |
| | | @strongify(self) |
| | | [self.tableView reloadData]; |
| | | }]; |
| | | }; |
| | | }]; return cell; |
| | | } |
| | | |
| | | - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath |
| | | { |
| | | ((ThirdClassificationCell *)cell).model = self.contentArray[indexPath.section]; |
| | | } |
| | | |
| | | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath |
| | | { |
| | | return (SCREEN_WIDTH < 375)? 136:156; |
| | | } |
| | | |
| | | - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section |
| | | { |
| | | if (section == 0 && (self.bannerList.count != 0 || self.activityList.count)) { |
| | | if (!self.tabHeaderBannerView) { |
| | | self.tabHeaderBannerView = [[JDGoodsListBannerView alloc] init]; |
| | | } |
| | | if (self.isPageForOne == YES) { |
| | | self.tabHeaderBannerView.dataArr = self.dataArr; |
| | | self.isPageForOne = NO; |
| | | } |
| | | @weakify(self) |
| | | self.tabHeaderBannerView.clickIndex = ^(NSInteger index) { |
| | | @strongify(self) |
| | | if ([self.bannerList[index][@"jumpDetail"][@"needLogin"] boolValue] && ![ALUserInfoServiceManger fetchUID]) {// 没æç»éå»ç»é |
| | | [self onLoginVcName:nil]; |
| | | return; |
| | | } |
| | | [self.commonMethodManage pushController:self.bannerList[index][@"jumpDetail"] params:self.bannerList[index][@"params"] typePush:^(BOOL other) {}]; |
| | | }; |
| | | self.tabHeaderBannerView.activityClickIndex = ^(NSInteger index) { |
| | | @strongify(self) |
| | | if ([self.activityList[index][@"jumpDetail"][@"needLogin"] boolValue] && ![ALUserInfoServiceManger fetchUID]) {// 没æç»éå»ç»é |
| | | [self onLoginVcName:nil]; |
| | | return; |
| | | } |
| | | [self.commonMethodManage pushController:self.activityList[index][@"jumpDetail"] params:self.activityList[index][@"params"] typePush:^(BOOL other) {}]; |
| | | }; |
| | | |
| | | return self.tabHeaderBannerView; |
| | | |
| | | } else { |
| | | UIView *view = [[UIView alloc] init]; |
| | | view.backgroundColor = XYRBackgroundColor; |
| | | return view; |
| | | } |
| | | } |
| | | |
| | | - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section |
| | | { |
| | | if (section == 0 && self.bannerList.count != 0 && self.activityList.count != 0) { |
| | | return roundf(165.0/375.0*SCREEN_WIDTH) + roundf(160.0/(375.0/3.0)*(SCREEN_WIDTH/3)); |
| | | |
| | | } else if (section == 0 && self.bannerList.count) { |
| | | return roundf(165.0/375.0*SCREEN_WIDTH); |
| | | |
| | | } else if (section == 0 && self.activityList.count) { |
| | | return roundf(160.0/(375.0/3.0)*(SCREEN_WIDTH/3)); |
| | | |
| | | } else { |
| | | return 0.001; |
| | | } |
| | | } |
| | | |
| | | - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section |
| | | { |
| | | if (section == self.contentArray.count - 1) { |
| | | return CGFLOAT_MIN; |
| | | |
| | | } else { |
| | | return CGFLOAT_MIN; |
| | | } |
| | | } |
| | | - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { |
| | | UIView *view = [[UIView alloc] init]; |
| | | view.backgroundColor = XYRBackgroundColor; |
| | | return view; |
| | | } |
| | | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { |
| | | WPHGoodsDetailController *vc = [[WPHGoodsDetailController alloc]init]; |
| | | vc.goodsID = ((GoodsDetailBaseModel *)self.contentArray[indexPath.section]).goodsId; |
| | | vc.goodsType = 4; |
| | | [self.navigationController pushViewController:vc animated:YES]; |
| | | } |
| | | |
| | | - (UIView *)navGaryLine |
| | | { |
| | | if (!_navGaryLine) { |
| | | _navGaryLine = [[UIView alloc] init]; |
| | | _navGaryLine.frame = CGRectMake(0, 0, SCREEN_WIDTH, 0.5); |
| | | _navGaryLine.backgroundColor = UIColorFromRGBValue(0xe0e0e0); |
| | | } |
| | | return _navGaryLine; |
| | | } |
| | | |
| | | - (SJNoNetwork *)noNetworkViews |
| | | { |
| | | if (_noNetworkViews) { |
| | | return _noNetworkViews; |
| | | } |
| | | _noNetworkViews = [[SJNoNetwork alloc]initWithFrame:CGRectMake(0, 0.5, SCREEN_WIDTH, SCREEN_HEIGHT)]; |
| | | _noNetworkViews.backgroundColor = XYRBackgroundColor; |
| | | [_noNetworkViews.connectBtn addTarget:self action:@selector(ClickConnectBtn:) forControlEvents:UIControlEventTouchUpInside]; |
| | | _noNetworkViews.hidden = YES; |
| | | return _noNetworkViews; |
| | | } |
| | | |
| | | - (UITableView *)tableView |
| | | { |
| | | if (!_tableView) { |
| | | CGRect rect; |
| | | rect.origin.x = 0; |
| | | rect.origin.y = 0.5; |
| | | rect.size.width = SCREEN_WIDTH; |
| | | |
| | | CGFloat heightDY = 40; |
| | | if (self.classCount == 0 || self.classCount == 1) { |
| | | heightDY = 0; |
| | | } |
| | | |
| | | rect.size.height = SCREEN_HEIGHT - kNavigationBarH - kStatusBarH - 0.5 - heightDY; |
| | | |
| | | _tableView = [[UITableView alloc] initWithFrame:rect style:UITableViewStyleGrouped]; |
| | | _tableView.delegate = self; |
| | | _tableView.dataSource = self; |
| | | _tableView.estimatedRowHeight = 0; |
| | | _tableView.estimatedSectionFooterHeight = 0; |
| | | _tableView.estimatedSectionHeaderHeight = 0; |
| | | _tableView.backgroundColor = XYRBackgroundColor; |
| | | _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; |
| | | _tableView.showsVerticalScrollIndicator = NO; |
| | | |
| | | NSMutableArray *idleImages = [[NSMutableArray alloc] init]; |
| | | for (int i = 0; i < 30; i ++) { |
| | | UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"icon_down_refresh%d",i]]; |
| | | [idleImages addObject:image]; |
| | | } |
| | | @weakify(self) |
| | | MJRefreshGifHeader *header = [MJRefreshGifHeader headerWithRefreshingBlock:^{ |
| | | @strongify(self) |
| | | self.page = 1; |
| | | [self.tableView.mj_footer resetNoMoreData]; |
| | | [self loadDataSource]; |
| | | }]; |
| | | [header setImages:idleImages forState:MJRefreshStateIdle]; |
| | | [header setImages:idleImages forState:MJRefreshStatePulling]; |
| | | [header setImages:idleImages forState:MJRefreshStateRefreshing]; |
| | | header.lastUpdatedTimeLabel.hidden = YES; |
| | | header.stateLabel.hidden = YES; |
| | | _tableView.mj_header = header; |
| | | |
| | | MJRefreshAutoGifFooter *footer = [MJRefreshAutoGifFooter footerWithRefreshingBlock:^{ |
| | | @strongify(self) |
| | | [self loadDataSource]; |
| | | }]; |
| | | NSMutableArray *imagesArr = [NSMutableArray array]; |
| | | for (int i = 1; i < 13; i++) { |
| | | UIImage *image = [UIImage imageNamed:[NSString stringWithFormat:@"up_%d",i]]; |
| | | [imagesArr addObject:image]; |
| | | } |
| | | [footer setImages:imagesArr forState:MJRefreshStateRefreshing]; |
| | | _tableView.mj_footer = footer; |
| | | } |
| | | return _tableView; |
| | | } |
| | | |
| | | - (UIButton *)topBtn |
| | | { |
| | | if (!_topBtn) { |
| | | _topBtn = [UIButton buttonWithType:UIButtonTypeCustom]; |
| | | [_topBtn setImage:ALIMAGE_NAMED(@"å°ç«ç®") forState:UIControlStateNormal]; |
| | | [_topBtn setHidden:YES]; |
| | | @weakify(self) |
| | | [[_topBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) { |
| | | @strongify(self) |
| | | [self.tableView setContentOffset:CGPointMake(0, 0) animated:YES]; |
| | | }]; |
| | | } |
| | | return _topBtn; |
| | | } |
| | | |
| | | - (NSMutableArray *)contentArray |
| | | { |
| | | if (!_contentArray) { |
| | | _contentArray = [[NSMutableArray alloc] init]; |
| | | } |
| | | return _contentArray; |
| | | } |
| | | |
| | | - (NSMutableArray *)bannerList |
| | | { |
| | | if (!_bannerList) { |
| | | _bannerList = [[NSMutableArray alloc] init]; |
| | | } |
| | | return _bannerList; |
| | | } |
| | | |
| | | - (NSMutableArray *)activityList |
| | | { |
| | | if (!_activityList) { |
| | | _activityList = [[NSMutableArray alloc] init]; |
| | | } |
| | | return _activityList; |
| | | } |
| | | |
| | | - (void)showSJCustomActivityView |
| | | { |
| | | [self.view addSubview:self.sjCustomActivityView]; |
| | | } |
| | | |
| | | - (void)hideSJCustomActivityView |
| | | { |
| | | [self.sjCustomActivityView hideCustomActivityView]; |
| | | } |
| | | - (SJCustomActivityView *)sjCustomActivityView |
| | | { |
| | | if (_sjCustomActivityView) { |
| | | return _sjCustomActivityView; |
| | | } |
| | | _sjCustomActivityView = [[SJCustomActivityView alloc] initView:YES isHome:NO dyHeight:0]; |
| | | return _sjCustomActivityView; |
| | | } |
| | | |
| | | - (NotLikePopView *)notLikePopView |
| | | { |
| | | if (!_notLikePopView) { |
| | | _notLikePopView = [[NotLikePopView alloc] init]; |
| | | } |
| | | return _notLikePopView; |
| | | } |
| | | |
| | | @end |
New file |
| | |
| | | // |
| | | // JDGoodsListShowController.h |
| | | // MIduo |
| | | // |
| | | // Created by éåºè¿å°ç§ææéå
¬å¸ on 2019/7/26. |
| | | // Copyright © 2019 yeshi. All rights reserved. |
| | | // |
| | | |
| | | #import <UIKit/UIKit.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | @interface WPHGoodsListShowController : BaseViewController |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // JDGoodsListShowController.m |
| | | // MIduo |
| | | // |
| | | // Created by éåºè¿å°ç§ææéå
¬å¸ on 2019/7/26. |
| | | // Copyright © 2019 yeshi. All rights reserved. |
| | | // |
| | | |
| | | #import "WPHGoodsListShowController.h" |
| | | #import "WPHGoodsListController.h" |
| | | |
| | | #import <JDSDK/JDKeplerSDK.h> |
| | | |
| | | @interface WPHGoodsListShowController () <ZJScrollPageViewDelegate> |
| | | |
| | | @property (nonatomic, nullable, strong) NSMutableArray *titleArray; |
| | | @property (nonatomic, nullable, strong) NSMutableArray *contentArray; |
| | | @property (nonatomic, nullable, copy) NSString *vipShopLink; |
| | | /// ç½ç»é®æ¡å± |
| | | @property (nonatomic,strong) SJNoNetwork *noNetworkViews; |
| | | |
| | | @property (nonatomic, nullable, strong) SJCustomActivityView *sjCustomActivityView; |
| | | |
| | | @end |
| | | |
| | | @implementation WPHGoodsListShowController |
| | | |
| | | - (void)viewWillAppear:(BOOL)animated |
| | | { |
| | | [super viewWillAppear:animated]; |
| | | [self.navigationController setNavigationBarHidden:NO animated:animated]; |
| | | } |
| | | |
| | | - (void)viewWillDisappear:(BOOL)animated |
| | | { |
| | | [super viewWillDisappear:animated]; |
| | | } |
| | | |
| | | - (void)viewDidLoad |
| | | { |
| | | [super viewDidLoad]; |
| | | [self setupDataConfig]; |
| | | [self setupNavConfig]; |
| | | [self.view addSubview:self.noNetworkViews]; |
| | | [self addNetWorkNotice]; |
| | | } |
| | | |
| | | - (void)setupDataConfig |
| | | { |
| | | |
| | | } |
| | | |
| | | - (void)setupNavConfig |
| | | { |
| | | self.navigationController.navigationBar.translucent = NO; |
| | | self.navigationController.navigationBar.barTintColor = FLQNewNavigationBarColor; |
| | | self.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName:FLQNewNavigationTitleColor,NSFontAttributeName:[UIFont boldSystemFontOfSize:FLQNewNavigationTitleFont]}; |
| | | self.title = @"å¯åä¼ç²¾é"; |
| | | self.view.backgroundColor = XYRBackgroundColor; |
| | | |
| | | UIButton *navRightButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 50, 30)]; |
| | | [navRightButton setTitle:@"å»å¯åä¼" forState:UIControlStateNormal]; |
| | | [navRightButton setTitleColor:FLQNewNavigationTitleColor forState:UIControlStateNormal]; |
| | | navRightButton.titleLabel.font = [UIFont systemFontOfSize:17]; |
| | | [navRightButton addTarget:self action:@selector(onNavRightEvent) forControlEvents:UIControlEventTouchUpInside]; |
| | | self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:navRightButton]; |
| | | } |
| | | |
| | | /** |
| | | * å è½½æ°æ® |
| | | */ |
| | | - (void)loadDataSource |
| | | { |
| | | @weakify(self) |
| | | [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP2,@"vipshop/getClass"] param:nil success:^(NSDictionary *object) |
| | | { |
| | | @strongify(self) |
| | | @weakify(self) |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | @strongify(self) |
| | | [self hideSJCustomActivityView]; |
| | | if ([object[@"code"] integerValue] == 0) { |
| | | [self.titleArray removeAllObjects]; |
| | | [self.contentArray removeAllObjects]; |
| | | self.vipShopLink = object[@"data"][@"vipShopLink"]; |
| | | for (NSDictionary *dictionary in object[@"data"][@"list"]) { |
| | | [self.titleArray addObject:dictionary[@"name"]]; |
| | | } |
| | | [self.contentArray addObjectsFromArray:object[@"data"][@"list"]]; |
| | | [self setupViewConfig]; |
| | | } |
| | | }); |
| | | |
| | | } fail:^(id object) { |
| | | [self hideSJCustomActivityView]; |
| | | if (((NSError *)object).code == -1009) { // 没æç½ç» |
| | | if (self.contentArray.count != 0) { |
| | | self.noNetworkViews.hidden = YES; |
| | | [JRToast showWithText:NETWORK_CONNECT_ANOMALY bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | |
| | | } else { |
| | | self.noNetworkViews.primtTitle.text = NETWORK_CONNECT_ANOMALY; |
| | | [self.noNetworkViews.iconImage setImage:ALIMAGE_NAMED(@"defaultPage_noNetWork")]; |
| | | self.noNetworkViews.hidden = NO; |
| | | } |
| | | |
| | | } else { |
| | | if (self.contentArray.count == 0) { |
| | | self.noNetworkViews.primtTitle.text = NETWORK_CONNECT_ANOMALY; |
| | | [self.noNetworkViews.iconImage setImage:ALIMAGE_NAMED(@"defaultPage_noNetWork")]; |
| | | self.noNetworkViews.hidden = NO; |
| | | |
| | | } else { |
| | | self.noNetworkViews.hidden = YES; |
| | | [JRToast showWithText:NETWORK_CONNECT_ANOMALY bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | } |
| | | }]; |
| | | } |
| | | |
| | | - (void)addNetWorkNotice |
| | | { |
| | | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(NetWorkStatesChange:) name:@"netWorkChangeEventNotification" object:nil]; |
| | | |
| | | AppDelegate *delegate = (AppDelegate *)[UIApplication sharedApplication].delegate; |
| | | |
| | | if (delegate.netWorkStatesCode == AFNetworkReachabilityStatusNotReachable) { |
| | | NSNotification * notice = [NSNotification notificationWithName:@"statesCode" object:@(delegate.netWorkStatesCode) userInfo:nil]; |
| | | [self NetWorkStatesChange:notice]; |
| | | } |
| | | else if (delegate.netWorkStatesCode == AFNetworkReachabilityStatusReachableViaWiFi){ |
| | | NSNotification * notice = [NSNotification notificationWithName:@"statesCode" object:@(delegate.netWorkStatesCode) userInfo:nil]; |
| | | [self NetWorkStatesChange:notice]; |
| | | |
| | | } else if (delegate.netWorkStatesCode == AFNetworkReachabilityStatusReachableViaWWAN) { |
| | | NSNotification * notice = [NSNotification notificationWithName:@"statesCode" object:@(delegate.netWorkStatesCode) userInfo:nil]; |
| | | [self NetWorkStatesChange:notice]; |
| | | |
| | | } else { |
| | | NSNotification * notice = [NSNotification notificationWithName:@"statesCode" object:@(delegate.netWorkStatesCode) userInfo:nil]; |
| | | [self NetWorkStatesChange:notice]; |
| | | } |
| | | } |
| | | |
| | | - (void)NetWorkStatesChange:(NSNotification *)sender |
| | | { |
| | | int networkState = [[sender object] intValue]; |
| | | |
| | | switch (networkState) { |
| | | |
| | | case -1: { |
| | | |
| | | if (self.contentArray.count == 0) { |
| | | self.noNetworkViews.primtTitle.text = NETWORK_CONNECT_ANOMALY; |
| | | [self.noNetworkViews.iconImage setImage:ALIMAGE_NAMED(@"defaultPage_noNetWork")]; |
| | | self.noNetworkViews.hidden = NO; |
| | | |
| | | } else { |
| | | self.noNetworkViews.hidden = YES; |
| | | [JRToast showWithText:NETWORK_CONNECT_ANOMALY bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | case 0: { // 没æç½ç» |
| | | |
| | | if (self.contentArray.count == 0) { |
| | | self.noNetworkViews.primtTitle.text = NETWORK_CONNECT_ANOMALY; |
| | | [self.noNetworkViews.iconImage setImage:ALIMAGE_NAMED(@"defaultPage_noNetWork")]; |
| | | self.noNetworkViews.hidden = NO; |
| | | |
| | | |
| | | } else { |
| | | self.noNetworkViews.hidden = YES; |
| | | [JRToast showWithText:NETWORK_CONNECT_ANOMALY bottomOffset:kToolBarH + 15 duration:1.2f]; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | case 1: { // 3Gæè
4Gï¼åæ£ç¨çæ¯æµé |
| | | |
| | | self.noNetworkViews.hidden = YES; |
| | | if (self.contentArray.count == 0) { |
| | | [self showSJCustomActivityView]; |
| | | [self loadDataSource]; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | case 2: { // WIFIç½ç» |
| | | |
| | | self.noNetworkViews.hidden = YES; |
| | | if (self.contentArray.count == 0) { |
| | | [self showSJCustomActivityView]; |
| | | [self loadDataSource]; |
| | | } |
| | | break; |
| | | } |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | |
| | | #pragma mark --- click event --- |
| | | - (void)ClickConnectBtn:(UIButton *)sender |
| | | { |
| | | if (iOS10) { |
| | | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] |
| | | options:@{} completionHandler:nil]; |
| | | } else { |
| | | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]]; |
| | | } |
| | | } |
| | | |
| | | |
| | | - (void)setupViewConfig |
| | | { |
| | | CGFloat zjheight = 40; |
| | | if (self.titleArray.count == 0 || self.titleArray.count == 1) { |
| | | zjheight = 0; |
| | | } |
| | | ZJSegmentStyle *style = [[ZJSegmentStyle alloc] init]; |
| | | // æ¾ç¤ºé®ç |
| | | style.showLine = YES; |
| | | // æ»å¨æ¡çé¢è² |
| | | style.scrollLineColor = XYRMainColor; |
| | | // éä¸åä½çé¢è² |
| | | style.selectedTitleColor = XYRMainColor; |
| | | // æ é¢ä¸è¬ç¶æçé¢è² |
| | | style.normalTitleColor = YTHColor(51, 51, 51); |
| | | // æ é¢ä¹é´çé´é |
| | | style.titleMargin = 25; |
| | | // æ é¢è·ç¦»å·¦ä¾§çé´é |
| | | style.titleLeftLength = 15; |
| | | //æ¾å¤§åæ° |
| | | style.titleBigScale = 1.1; |
| | | //æ¯å¦ç¼©æ¾æ é¢ |
| | | style.scaleTitle = YES; |
| | | //åä½ |
| | | style.titleFont = [UIFont systemFontOfSize:16]; |
| | | //设置segmentçé«åº¦ |
| | | style.segmentHeight = zjheight; |
| | | style.imagePosition = TitleImagePositionLeft; |
| | | style.showImage = YES; |
| | | style.autoAdjustTitlesWidth = YES; |
| | | //åå§å |
| | | ALScrollPageView *scrollPageView = [[ALScrollPageView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT - kNavigationBarH - kStatusBarH) segmentStyle:style titles:self.contentArray parentViewController:self isHomeAlloc:NO isFirstGraphicMixed:NO delegate:self]; |
| | | [self.view addSubview:scrollPageView]; |
| | | } |
| | | |
| | | - (NSInteger)numberOfChildViewControllers { |
| | | if (self.contentArray.count == 0) { |
| | | return 1; |
| | | |
| | | } else { |
| | | return self.contentArray.count; |
| | | } |
| | | } |
| | | |
| | | - (UIViewController<ZJScrollPageViewChildVcDelegate> *)childViewController:(UIViewController<ZJScrollPageViewChildVcDelegate> *)reuseViewController forIndex:(NSInteger)index { |
| | | |
| | | UIViewController<ZJScrollPageViewChildVcDelegate> *childVc = reuseViewController; |
| | | if (!childVc) { |
| | | WPHGoodsListController *vc = [[WPHGoodsListController alloc] init]; |
| | | vc.classCount = _contentArray.count; |
| | | vc.cid = self.contentArray[index][@"id"]; |
| | | childVc = vc; |
| | | } |
| | | return childVc; |
| | | } |
| | | |
| | | |
| | | #pragma mark --- click event --- |
| | | - (void)onNavRightEvent { |
| | | [self jumpJingDong:YES jumpLink:self.vipShopLink]; |
| | | } |
| | | |
| | | #pragma mark --- private method --- |
| | | - (void)jumpJingDong:(BOOL)native jumpLink:(NSString *)jumpLink { |
| | | ShonpingShareViewController *shonpingShareVc = [[ShonpingShareViewController alloc] init]; |
| | | shonpingShareVc.urlString = jumpLink?:@""; |
| | | [self.navigationController pushViewController:shonpingShareVc animated:YES]; |
| | | } |
| | | |
| | | #pragma mark --- getter --- |
| | | - (SJNoNetwork *)noNetworkViews { |
| | | if (_noNetworkViews) { |
| | | return _noNetworkViews; |
| | | } |
| | | _noNetworkViews = [[SJNoNetwork alloc]initWithFrame:CGRectMake(0, 0.5, SCREEN_WIDTH, SCREEN_HEIGHT)]; |
| | | _noNetworkViews.backgroundColor = XYRBackgroundColor; |
| | | [_noNetworkViews.connectBtn addTarget:self action:@selector(ClickConnectBtn:) forControlEvents:UIControlEventTouchUpInside]; |
| | | _noNetworkViews.hidden = YES; |
| | | return _noNetworkViews; |
| | | } |
| | | |
| | | - (NSMutableArray *)titleArray { |
| | | if (!_titleArray) { |
| | | _titleArray = [[NSMutableArray alloc] init]; |
| | | } |
| | | return _titleArray; |
| | | } |
| | | |
| | | - (NSMutableArray *)contentArray { |
| | | if (!_contentArray) { |
| | | _contentArray = [[NSMutableArray alloc] init]; |
| | | } |
| | | return _contentArray; |
| | | } |
| | | |
| | | |
| | | - (void)showSJCustomActivityView { |
| | | |
| | | [self.view addSubview:self.sjCustomActivityView]; |
| | | } |
| | | |
| | | - (void)hideSJCustomActivityView { |
| | | |
| | | [self.sjCustomActivityView hideCustomActivityView]; |
| | | } |
| | | - (SJCustomActivityView *)sjCustomActivityView { |
| | | |
| | | if (_sjCustomActivityView) { |
| | | return _sjCustomActivityView; |
| | | } |
| | | _sjCustomActivityView = [[SJCustomActivityView alloc] initView:YES isHome:NO dyHeight:0]; |
| | | return _sjCustomActivityView; |
| | | } |
| | | |
| | | @end |
| | |
| | | self.selectionStyle = UITableViewCellSelectionStyleNone; |
| | | self.contentView.backgroundColor = UIColorFromRGBValue(0xF3F3F3); |
| | | |
| | | self.array = @[@"æ¬æå·²æ¶è´§",@"䏿已æ¶è´§",@"å¾
确认æ¶è´§"]; |
| | | self.array = @[@"å¾
确认æ¶è´§",@"æ¬ææªå°è´¦",@"å
¨é¨æªå°è´¦"]; |
| | | |
| | | [self cellConfig]; |
| | | } |
| | |
| | | [self.contentView addSubview:self.viewBG]; |
| | | |
| | | UILabel *labelTitle = [[UILabel alloc] init]; |
| | | labelTitle.text = @"æ¶è´§è¯¦æ
"; |
| | | labelTitle.text = @"å°è´¦è¯¦æ
"; |
| | | labelTitle.textColor = UIColorFromRGBValue(0x000000); |
| | | labelTitle.font = [UIFont systemFontOfSize:15]; |
| | | labelTitle.textAlignment = NSTextAlignmentLeft; |
| | |
| | | - (void)setModel:(MoneyStatisticModel *)model { |
| | | _model = model; |
| | | if (model) { |
| | | ((UILabel *)[[self.viewFirst subviews][0] subviews][1]).text = [NSString stringWithFormat:@"ï¿¥%@",model.monthSettleMoney]; |
| | | ((UILabel *)[[self.viewFirst subviews][1] subviews][1]).text = [NSString stringWithFormat:@"ï¿¥%@",model.lastMonthSettleMoney]; |
| | | ((UILabel *)[[self.viewFirst subviews][2] subviews][1]).text = [NSString stringWithFormat:@"ï¿¥%@",model.notSettleMoney]; |
| | | ((UILabel *)[[self.viewFirst subviews][0] subviews][1]).text = [NSString stringWithFormat:@"ï¿¥%@",model.notSettleMoney]; |
| | | ((UILabel *)[[self.viewFirst subviews][1] subviews][1]).text = [NSString stringWithFormat:@"ï¿¥%@",model.monthUnRecievedMoney]; |
| | | ((UILabel *)[[self.viewFirst subviews][2] subviews][1]).text = [NSString stringWithFormat:@"ï¿¥%@",model.totalUnRecievedMoney]; |
| | | self.labelDesc.text = model.moneyArrivalDesc; |
| | | } |
| | | } |
| | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | @interface MoneyStatisticModel : NSObject |
| | | /// æ¬ææªå°è´¦ |
| | | @property (nonatomic, nullable, copy) NSString *monthUnRecievedMoney; |
| | | /// å
¨é¨æªå°è´¦ |
| | | @property (nonatomic, nullable, copy) NSString *totalUnRecievedMoney; |
| | | /// 龿¥ |
| | | @property (nonatomic, nullable, copy) NSString *link; |
| | | /// è´¦æ·ä½é¢ |
| | |
| | | @class GoodsTitlesModel,WeiQuanInfoModel; |
| | | |
| | | @interface BonusorderModel : NSObject |
| | | |
| | | @property (nonatomic, nullable, strong) NSDictionary *shopType; |
| | | /// 订åç±»åå¾çï¼ èªè´ãå享ãé请 |
| | | @property (nonatomic, nullable, copy) NSString *hongBaoTypePic; |
| | | /// å°è´¦ç¶æï¼1 æªå°è´¦ 3å·²å°è´¦ 4已失æ |
| | |
| | | |
| | | @property (nonatomic, nullable, strong) UIView *whiteView; |
| | | |
| | | @property (nonatomic, nullable, strong) UIImageView *iconImageView; |
| | | @property (nonatomic, nullable, strong) UILabel *labelType; |
| | | |
| | | @property (nonatomic, nullable, strong) UIImageView *orderImageView; |
| | | |
| | |
| | | maskLayer.path = maskPathClickButton.CGPath; |
| | | self.whiteView.layer.mask = maskLayer; |
| | | |
| | | UIImage *image = ALIMAGE_NAMED(@"icon_å¥é_æ·å®"); |
| | | [self.whiteView addSubview:self.iconImageView]; |
| | | self.iconImageView.sd_layout.leftSpaceToView(self.whiteView, 15).centerYEqualToView(self.whiteView).widthIs(image.size.width).heightIs(image.size.height); |
| | | |
| | | [self.whiteView addSubview:self.labelType]; |
| | | self.labelType.sd_layout.leftSpaceToView(self.whiteView, 15).centerYEqualToView(self.whiteView).widthIs(0).heightIs(15.5); |
| | | self.labelType.sd_cornerRadius = @4; |
| | | |
| | | [self.whiteView addSubview:self.titleLabel]; |
| | | self.titleLabel.sd_layout.rightSpaceToView(self.whiteView, 15).centerYEqualToView(self.whiteView).autoWidthRatio(0).autoHeightRatio(0); |
| | | [self.titleLabel setSingleLineAutoResizeWithMaxWidth:150]; |
| | | |
| | | [self.whiteView addSubview:self.typeImagesView]; |
| | | self.typeImagesView.sd_layout.leftSpaceToView(self.iconImageView, 8).centerYEqualToView(self.whiteView).rightSpaceToView(self.titleLabel, 10).heightIs(15); |
| | | self.typeImagesView.sd_layout.leftSpaceToView(self.labelType, 8).centerYEqualToView(self.whiteView).rightSpaceToView(self.titleLabel, 10).heightIs(15); |
| | | [self.typeImagesView updateLayout]; |
| | | |
| | | [self.typeImagesView addSubview:self.typeimageOneView]; |
| | |
| | | - (void)setModel:(BonusorderModel *)model |
| | | { |
| | | if (model && ![model isEqual:[NSNull null]]) { |
| | | if (model.orderType == 1) { |
| | | UIImage *image = ALIMAGE_NAMED(@"icon_å¥é_æ·å®"); |
| | | self.iconImageView.image = image; |
| | | [self.whiteView addSubview:self.iconImageView]; |
| | | self.iconImageView.sd_resetLayout.leftSpaceToView(self.whiteView, 15).centerYEqualToView(self.whiteView).widthIs(image.size.width).heightIs(image.size.height); |
| | | |
| | | } else if (model.orderType == 2) { |
| | | UIImage *image = ALIMAGE_NAMED(@"icon_å¥é_天ç«"); |
| | | self.iconImageView.image = image; |
| | | [self.whiteView addSubview:self.iconImageView]; |
| | | self.iconImageView.sd_resetLayout.leftSpaceToView(self.whiteView, 15).centerYEqualToView(self.whiteView).widthIs(image.size.width).heightIs(image.size.height); |
| | | |
| | | } else if (model.orderType == 3) { |
| | | self.iconImageView.image = ALIMAGE_NAMED(@"ic_share_jd"); |
| | | UIImage *image = ALIMAGE_NAMED(@"ic_share_jd"); |
| | | self.iconImageView.image = image; |
| | | [self.whiteView addSubview:self.iconImageView]; |
| | | self.iconImageView.sd_resetLayout.leftSpaceToView(self.whiteView, 15).centerYEqualToView(self.whiteView).widthIs(image.size.width).heightIs(image.size.height); |
| | | |
| | | |
| | | } else if (model.orderType == 4) { |
| | | UIImage *image = ALIMAGE_NAMED(@"ic_share_pdd"); |
| | | self.iconImageView.image = image; |
| | | [self.whiteView addSubview:self.iconImageView]; |
| | | self.iconImageView.sd_resetLayout.leftSpaceToView(self.whiteView, 15).centerYEqualToView(self.whiteView).widthIs(image.size.width).heightIs(image.size.height); |
| | | |
| | | } else if (model.orderType == 6) { |
| | | UIImage *image = ALIMAGE_NAMED(@"ic_share_elm"); |
| | | self.iconImageView.image = image; |
| | | [self.whiteView addSubview:self.iconImageView]; |
| | | self.iconImageView.sd_resetLayout.leftSpaceToView(self.whiteView, 15).centerYEqualToView(self.whiteView).widthIs(image.size.width).heightIs(image.size.height); |
| | | } |
| | | |
| | | |
| | | CGFloat width = [self getWidthWithText:model.shopType[@"content"] height:16 font:11]; |
| | | |
| | | self.labelType.text = model.shopType[@"content"]; |
| | | self.labelType.textColor = [self hexColor:model.shopType[@"color"]]; |
| | | self.labelType.layer.borderColor = [self hexColor:model.shopType[@"borderColor"]].CGColor; |
| | | |
| | | self.labelType.sd_resetLayout.leftSpaceToView(self.whiteView, 13).centerYEqualToView(self.whiteView).widthIs(width + 10).heightIs(16); |
| | | |
| | | [self.orderImageView sd_setImageWithURL:[NSURL URLWithString:model.hongBaoTypePic] placeholderImage:nil options:SDWebImageRefreshCached]; |
| | | self.titleLabel.text = model.orderState.content; |
| | |
| | | return _whiteView; |
| | | } |
| | | |
| | | - (UIImageView *)iconImageView { |
| | | |
| | | if (!_iconImageView) { |
| | | _iconImageView = [[UIImageView alloc] init]; |
| | | |
| | | - (UILabel *)labelType { |
| | | if (!_labelType) { |
| | | _labelType = [[UILabel alloc] init]; |
| | | _labelType.font = [UIFont systemFontOfSize:11]; |
| | | _labelType.textAlignment = NSTextAlignmentCenter; |
| | | self.labelType.layer.borderWidth = 0.6; |
| | | } |
| | | return _iconImageView; |
| | | return _labelType; |
| | | } |
| | | |
| | | - (UIImageView *)orderImageView { |
| | |
| | | maskLayer.path = maskPath.CGPath; |
| | | self.labelMaxFan.layer.mask = maskLayer; |
| | | }; |
| | | if (model.moneyInfo.maxMoney && ![model.moneyInfo.maxMoney isEqualToString:@""] && model.shopType != 40) { |
| | | if (model.moneyInfo.maxMoney && ![model.moneyInfo.maxMoney isEqualToString:@""]) { |
| | | self.imageSanJiao.hidden = NO; |
| | | self.labelMaxFan.hidden = NO; |
| | | |
| | |
| | | |
| | | } else if ([_goodsType integerValue] == 3) { |
| | | [self getAppPageNotificationWithType:@"orderFindPDD"]; |
| | | |
| | | } if ([_goodsType integerValue] == 4) { |
| | | [self getAppPageNotificationWithType:@"orderFindVIP"]; |
| | | |
| | | } if ([_goodsType integerValue] == 5) { |
| | | [self getAppPageNotificationWithType:@"orderFindSuning"]; |
| | | |
| | | } |
| | | |
| | | [self addNetWorkNotice]; |
| | |
| | | [self.titleArray addObject:@{@"name":@"æ·å®"}]; |
| | | [self.titleArray addObject:@{@"name":@"京ä¸"}]; |
| | | [self.titleArray addObject:@{@"name":@"æ¼å¤å¤"}]; |
| | | [self.titleArray addObject:@{@"name":@"å¯åä¼"}]; |
| | | [self.titleArray addObject:@{@"name":@"èå®"}]; |
| | | |
| | | [self.contentArray addObject:@{@"goodsType":@"1"}]; |
| | | [self.contentArray addObject:@{@"goodsType":@"2"}]; |
| | | [self.contentArray addObject:@{@"goodsType":@"3"}]; |
| | | [self.contentArray addObject:@{@"goodsType":@"4"}]; |
| | | [self.contentArray addObject:@{@"goodsType":@"5"}]; |
| | | } |
| | | |
| | | - (void)setupNavConfig { |
| | |
| | | img = [UIImage imageNamed:@"order_complaint_pdd_æç¨"]; |
| | | self.titleLabel.text = @"æ¼å¤å¤ä¸å¤å¶è®¢åå·æç¨"; |
| | | holderText = @"请è¾å
¥æç²è´´æ¼å¤å¤è®¢åå·"; |
| | | |
| | | } else if ([_goodsType integerValue] == 4) { |
| | | img = [UIImage imageNamed:@"order_complaint_wph"]; |
| | | self.titleLabel.text = @"å¯åä¼ä¸å¤å¶è®¢åå·æç¨"; |
| | | holderText = @"请è¾å
¥æç²è´´å¯åä¼è®¢åå·"; |
| | | |
| | | } else if ([_goodsType integerValue] == 5) { |
| | | img = [UIImage imageNamed:@"order_complaint_sn"]; |
| | | self.titleLabel.text = @"èå®ä¸å¤å¶è®¢åå·æç¨"; |
| | | holderText = @"请è¾å
¥æç²è´´èå®è®¢åå·"; |
| | | |
| | | } |
| | | self.jiaochengImageView.frame = CGRectMake(0, CGRectGetMaxY(self.titleLabel.frame) + 35, SCREEN_WIDTH, img.size.height/img.size.width*SCREEN_WIDTH); |
| | | self.jiaochengImageView.image = img; |
| | |
| | | self.titlesLabel.textColor = UIColorFromRGBValue(0xE42219); |
| | | self.titlesLabel.layer.borderColor = UIColorFromRGBValue(0xE42219).CGColor; |
| | | self.titlesLabel.layer.borderWidth = 1; |
| | | |
| | | } else if ([model.type isEqualToString:@"4"]) { |
| | | stringName = @"å¯åä¼è®¢å"; |
| | | self.titlesLabel.textColor = UIColorFromRGBValue(0xE30085); |
| | | self.titlesLabel.layer.borderColor = UIColorFromRGBValue(0xE30085).CGColor; |
| | | self.titlesLabel.layer.borderWidth = 1; |
| | | |
| | | } else if ([model.type isEqualToString:@"5"]) { |
| | | stringName = @"èå®è®¢å"; |
| | | self.titlesLabel.textColor = UIColorFromRGBValue(0x010101); |
| | | self.titlesLabel.layer.borderColor = UIColorFromRGBValue(0xFFA600).CGColor; |
| | | self.titlesLabel.layer.borderWidth = 1; |
| | | } |
| | | CGFloat width = [self getWidthWithText:stringName height:15 font:self.titlesLabel.font.pointSize]; |
| | | self.titlesLabel.text = stringName; |
| | |
| | | maskLayer.path = maskPath.CGPath; |
| | | self.labelMaxFan.layer.mask = maskLayer; |
| | | }; |
| | | if (model.moneyInfo.maxMoney && ![model.moneyInfo.maxMoney isEqualToString:@""] && model.shopType != 40) { |
| | | if (model.moneyInfo.maxMoney && ![model.moneyInfo.maxMoney isEqualToString:@""]) { |
| | | self.imageSanJiao.hidden = NO; |
| | | self.labelMaxFan.hidden = NO; |
| | | |
| | |
| | | @property (nonatomic, nullable, strong) NSDictionary *appUpdateData; |
| | | @property (nonatomic) touchUpdate touchUpdate; |
| | | |
| | | - (void)show; |
| | | - (void)show:(UIView *)view; |
| | | - (void)disappear; |
| | | |
| | | @end |
| | |
| | | return self; |
| | | } |
| | | |
| | | - (void)show { |
| | | [kWindow removeFromSuperview]; |
| | | [kWindow addSubview:self]; |
| | | self.sd_layout.leftSpaceToView(kWindow, 0).topSpaceToView(kWindow, 0).widthIs(SCREEN_WIDTH).heightIs(SCREEN_HEIGHT); |
| | | - (void)show:(UIView *)view { |
| | | UIWindow *win = [[UIApplication sharedApplication].windows firstObject]; |
| | | [win addSubview:self]; |
| | | self.sd_layout.leftSpaceToView(win, 0).topSpaceToView(win, 0).widthIs(SCREEN_WIDTH).heightIs(SCREEN_HEIGHT); |
| | | // |
| | | // self.bgView.alpha = 0.0; |
| | | // self.bgView.transform = CGAffineTransformMakeScale(0.1, 0.1); |
| | |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | typedef void(^touch)(NSDictionary *dictionary); |
| | | |
| | | @interface MineUpgradeMemberView : UIView |
| | | |
| | | @property (nonatomic) touch touch; |
| | | |
| | | @property (nonatomic, nullable, strong) NSDictionary *dictionaryData; |
| | | |
| | | @end |
| | |
| | | } |
| | | |
| | | - (void)onTouchEvent { |
| | | [[self getCurrentVC] pushAnyInterfaceController:@"ShonpingShareViewController" parms:@{@"url":_dictionaryData[@"link"]?:@""}]; |
| | | !self.touch?:self.touch(_dictionaryData); |
| | | } |
| | | |
| | | - (void)setDictionaryData:(NSDictionary *)dictionaryData { |
| | |
| | | self.teamInvitationView.arrayTags = self.fansInfoModel.tags; |
| | | self.teamInvitationView.model = self.fansInfoModel; |
| | | if (![self isHaveValue:self.fansInfoModel.level]) { |
| | | self.scrollView.contentSize = CGSizeMake(SCREEN_WIDTH, 830 - 54); |
| | | self.scrollView.contentSize = CGSizeMake(SCREEN_WIDTH, 840 - 54); |
| | | } |
| | | |
| | | } else { |
| | |
| | | [self.view addSubview:self.scrollView]; |
| | | [self.scrollView addSubview:self.teamInvitationView]; |
| | | |
| | | self.scrollView.contentSize = CGSizeMake(SCREEN_WIDTH, 830); |
| | | self.scrollView.contentSize = CGSizeMake(SCREEN_WIDTH, 840); |
| | | } |
| | | |
| | | - (void)showSJCustomActivityView { |
| | |
| | | @property (nonatomic, nullable, strong) UILabel *labelContentOrderDistributionTB; |
| | | @property (nonatomic, nullable, strong) UILabel *labelContentOrderDistributionJD; |
| | | @property (nonatomic, nullable, strong) UILabel *labelContentOrderDistributionPDD; |
| | | @property (nonatomic, nullable, strong) UILabel *labelContentOrderDistributionWPH; |
| | | @property (nonatomic, nullable, strong) UILabel *labelContentOrderDistributionSN; |
| | | @end |
| | | |
| | | @implementation NewTeamInvitationView |
| | |
| | | [self.viewOrderDistributionBg addSubview:self.labelContentOrderDistributionTB]; |
| | | [self.viewOrderDistributionBg addSubview:self.labelContentOrderDistributionJD]; |
| | | [self.viewOrderDistributionBg addSubview:self.labelContentOrderDistributionPDD]; |
| | | [self.viewOrderDistributionBg addSubview:self.labelContentOrderDistributionWPH]; |
| | | [self.viewOrderDistributionBg addSubview:self.labelContentOrderDistributionSN]; |
| | | |
| | | self.viewOrderDistributionBg.sd_layout.leftSpaceToView(self, 0).topSpaceToView(self.viewFansBg, 10).rightSpaceToView(self, 0).heightIs(78); |
| | | self.viewOrderDistributionBg.sd_layout.leftSpaceToView(self, 0).topSpaceToView(self.viewFansBg, 10).rightSpaceToView(self, 0).heightIs(110); |
| | | |
| | | self.labelOrderDistribution.sd_layout.leftSpaceToView(self.viewOrderDistributionBg, 15).centerYEqualToView(self.viewOrderDistributionBg).widthIs(120).autoHeightRatio(0); |
| | | |
| | |
| | | self.labelContentOrderDistributionJD.sd_layout.rightSpaceToView(self.viewOrderDistributionBg, 15).topSpaceToView(self.labelContentOrderDistributionTB, 5).widthIs(200).heightIs(12); |
| | | |
| | | self.labelContentOrderDistributionPDD.sd_layout.rightSpaceToView(self.viewOrderDistributionBg, 15).topSpaceToView(self.labelContentOrderDistributionJD, 5).widthIs(200).heightIs(12); |
| | | |
| | | self.labelContentOrderDistributionWPH.sd_layout.rightSpaceToView(self.viewOrderDistributionBg, 15).topSpaceToView(self.labelContentOrderDistributionPDD, 5).widthIs(200).heightIs(12); |
| | | |
| | | self.labelContentOrderDistributionSN.sd_layout.rightSpaceToView(self.viewOrderDistributionBg, 15).topSpaceToView(self.labelContentOrderDistributionWPH, 5).widthIs(200).heightIs(12); |
| | | } |
| | | |
| | | - (void)onClickEvent { |
| | |
| | | self.labelContentOrderDistributionTB.text = arrayOrder[0]; |
| | | self.labelContentOrderDistributionJD.text = arrayOrder[1]; |
| | | self.labelContentOrderDistributionPDD.text = arrayOrder[2]; |
| | | self.labelContentOrderDistributionWPH.text = arrayOrder[3]; |
| | | self.labelContentOrderDistributionSN.text = arrayOrder[4]; |
| | | } |
| | | } |
| | | |
| | |
| | | return _labelContentOrderDistributionPDD; |
| | | } |
| | | |
| | | - (UILabel *)labelContentOrderDistributionWPH { |
| | | if (!_labelContentOrderDistributionWPH) { |
| | | _labelContentOrderDistributionWPH = [[UILabel alloc] init]; |
| | | _labelContentOrderDistributionWPH.textColor = UIColorFromRGBValue(0x888888); |
| | | _labelContentOrderDistributionWPH.font = [UIFont systemFontOfSize:12]; |
| | | _labelContentOrderDistributionWPH.textAlignment = NSTextAlignmentRight; |
| | | } |
| | | return _labelContentOrderDistributionWPH; |
| | | } |
| | | |
| | | |
| | | - (UILabel *)labelContentOrderDistributionSN { |
| | | if (!_labelContentOrderDistributionSN) { |
| | | _labelContentOrderDistributionSN = [[UILabel alloc] init]; |
| | | _labelContentOrderDistributionSN.textColor = UIColorFromRGBValue(0x888888); |
| | | _labelContentOrderDistributionSN.font = [UIFont systemFontOfSize:12]; |
| | | _labelContentOrderDistributionSN.textAlignment = NSTextAlignmentRight; |
| | | } |
| | | return _labelContentOrderDistributionSN; |
| | | } |
| | | |
| | | |
| | | @end |
| | |
| | | #import <UserNotifications/UserNotifications.h> |
| | | #import "ALBCServiceManager.h" |
| | | |
| | | #import "WPHGoodsListShowController.h" |
| | | |
| | | @interface NewMineController () <MineOneVIewDelegate, NewLoginViewDelegate,InviteCodeControllerDelegate, MineSixCellCellDelegate, MineOrderRowViewDelegate, MineActivityCellDelegate, MineNoviceStrategyViewDelegate,MineFooterViewDelegate,SJRollingViewDelegate, UIScrollViewDelegate> |
| | | |
| | |
| | | @property (nonatomic, nullable, copy) NSString *tearcherLink; |
| | | /// å¹³å°è§å |
| | | @property (nonatomic, nullable, copy) NSString *platformRule; |
| | | /// /å¼¹æ¡ |
| | | /// äºåå龿¥ |
| | | @property (nonatomic, nullable, copy) NSString *cloudLink; |
| | | /// å¼¹æ¡ |
| | | @property (nonatomic, nullable, strong) NSDictionary *dialog; |
| | | /// æ¯å¦éè¦å±ç¤ºbanner |
| | | @property (nonatomic, assign) BOOL isShowBannerViews; |
| | |
| | | self.convertLinkUrl = dictionary[@"data"][@"convertLinkUrl"]; |
| | | self.tearcherLink = dictionary[@"data"][@"tearcherLink"]; |
| | | self.dialog = dictionary[@"data"][@"dialog"]; |
| | | self.cloudLink = dictionary[@"data"][@"cloudLink"]; |
| | | |
| | | if ([self isHaveValue:dictionary[@"data"][@"vipUpgradedNotify"]]) { |
| | | [self.mineManager popVipEquityView:dictionary[@"data"][@"vipUpgradedNotify"]]; |
| | |
| | | [self pushAnyInterfaceController:@"ALShareRecordController" parms:nil]; |
| | | } |
| | | if (type == MineSixCellCellSharedLibraries) { |
| | | [UMCustomUser umUser_XPK]; |
| | | //[self pushAnyInterfaceController:@"SJProLibViewController" parms:nil]; |
| | | [self pushAnyInterfaceController:@"ShonpingShareViewController" parms:@{@"url":_cloudLink?:@""}]; |
| | | } |
| | | if (type == MineSixCellCellLinksToConvert) { |
| | | [self pushAnyInterfaceController:@"ShonpingShareViewController" parms:@{@"url":_convertLinkUrl?:@""}]; |
| | |
| | | [UMCustomUser umUser_help]; |
| | | //[self pushAnyInterfaceController:@"ShonpingShareViewController" parms:@{@"url":[YTHsharedManger startManger].help?:@""}]; |
| | | |
| | | [self pushAnyInterfaceController:@"ShonpingShareViewController" parms:@{@"url":@"http://192.168.1.114:8848/flqFront/AppInside/cloudPushOrder/cloudPushOrderManage.html"}]; |
| | | //[self pushAnyInterfaceController:@"ShonpingShareViewController" parms:@{@"url":@"https://test-open.czb365.com/redirection/todo/?platformType=98645363&platformCode=17784739772"}]; |
| | | //[self pushAnyInterfaceController:@"ShonpingShareViewController" parms:@{@"url":@"http://192.168.1.114:8848/flqFront/AppInside/cloudPushOrder/cloudPushOrderManage.html"}]; |
| | | [self pushAnyInterfaceController:@"ShonpingShareViewController" parms:@{@"url":@"http://192.168.1.114:8848/flqFront/AppInside/activityDetailTempPage/index.html"}]; |
| | | |
| | | // [self pushAnyInterfaceController:@"WPHGoodsListShowController" parms:nil]; |
| | | |
| | | } else if (index == 202) { |
| | | [UMCustomUser umUser_service]; |
| | |
| | | if (!_viewMineUpgradeMember) { |
| | | _viewMineUpgradeMember = [[MineUpgradeMemberView alloc] init]; |
| | | _viewMineUpgradeMember.hidden = YES; |
| | | @weakify(self) |
| | | _viewMineUpgradeMember.touch = ^(NSDictionary * _Nonnull dictionary) { |
| | | @strongify(self) |
| | | if (!self.isLogin) { |
| | | [self onLoginVcName:nil]; |
| | | return; |
| | | } |
| | | // æ¯å¦æ¿æ´»é请åè½ |
| | | if (![ALUserInfoServiceManger isInvited]) { |
| | | [self onInviteVcName:nil]; |
| | | return; |
| | | } |
| | | [self pushAnyInterfaceController:@"ShonpingShareViewController" parms:@{@"url":dictionary[@"link"]?:@""}]; |
| | | }; |
| | | } |
| | | return _viewMineUpgradeMember; |
| | | } |
| | |
| | | #import "NewOrderViewController.h" |
| | | #import "NewOrderTopView.h" |
| | | #import "OrderCellBottomView.h" |
| | | #import "NewOrderTopCell.h" |
| | | #import "OrderTitleCell.h" |
| | | #import "NewOrderCell.h" |
| | | #import "OrderFiltrateView.h" |
| | | #import "OrderStatisticsView.h" |
| | |
| | | |
| | | self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightView]; |
| | | |
| | | self.orderFiltrateViewHeight = 590; |
| | | self.orderFiltrateViewHeight = 640; |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { |
| | | if (indexPath.row == 0) { |
| | | return 51; |
| | | return 50; |
| | | |
| | | } else { |
| | | return 109 / 375.0 * SCREEN_WIDTH; |
| | |
| | | |
| | | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { |
| | | if (indexPath.row == 0) { |
| | | static NSString *identifier = @"NewOrderTopCell"; |
| | | NewOrderTopCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; |
| | | static NSString *identifier = @"OrderTitleCell"; |
| | | OrderTitleCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; |
| | | if (!cell) { |
| | | cell = [[NewOrderTopCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier]; |
| | | cell = [[OrderTitleCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier]; |
| | | } |
| | | cell.selectionStyle = UITableViewCellSelectionStyleNone; |
| | | if (_arrayData.count > indexPath.section) { |
| | | ((NewOrderTopCell *)cell).model = (NewOrderListModel *)_arrayData[indexPath.section]; |
| | | ((OrderTitleCell *)cell).model = (NewOrderListModel *)_arrayData[indexPath.section]; |
| | | } |
| | | return cell; |
| | | |
| | |
| | | _orderTableview.estimatedRowHeight = 0; |
| | | _orderTableview.estimatedSectionHeaderHeight = 0; |
| | | _orderTableview.estimatedSectionFooterHeight = 0; |
| | | [_orderTableview registerNib:[UINib nibWithNibName:@"NewOrderTopCell" bundle:nil] forCellReuseIdentifier:@"NewOrderTopCell"]; |
| | | |
| | | [_orderTableview registerNib:[UINib nibWithNibName:@"NewOrderCell" bundle:nil] forCellReuseIdentifier:@"NewOrderCell"]; |
| | | |
| | | NSMutableArray *idleImages = [[NSMutableArray alloc] init]; |
| | |
| | | return _orderFiltrateView; |
| | | } |
| | | _orderFiltrateView = [[OrderFiltrateView alloc]initWithFrame:CGRectMake(0, -_orderFiltrateViewHeight, SCREEN_WIDTH, _orderFiltrateViewHeight)]; |
| | | _orderFiltrateView.backgroundColor = [UIColor redColor]; |
| | | _orderFiltrateView.delegate = self; |
| | | _orderFiltrateView.timeChooseView.dataSource = @[@{@"1":@"æè¿ä¸å¤©"},@{@"2":@"æè¿ä¸å¨"},@{@"3":@"æè¿åæ"},@{@"4":@"æ¬æ"},@{@"5":@"è¿ä¸æ"},@{@"6":@"è¿åå¹´"}]; |
| | | _orderFiltrateView.timeChooseView.numberIndex = 0; |
| | | |
| | | _orderFiltrateView.orderTypeView.dataSource = @[@{@"1":@"è¿å©è®¢å"},@{@"2":@"å享订å"},@{@"3":@"å¢é订å"},@{@"0":@"ææè®¢å"}]; |
| | | _orderFiltrateView.orderTypeView.numberIndex = 1; |
| | | _orderFiltrateView.orderSourceView.dataSource = @[@{@"1":@"æ·å®è®¢å"},@{@"2":@"京ä¸è®¢å"},@{@"3":@"æ¼å¤å¤è®¢å"}]; |
| | | |
| | | _orderFiltrateView.orderSourceView.dataSource = @[@{@"1":@"æ·å®è®¢å"},@{@"2":@"京ä¸è®¢å"},@{@"3":@"æ¼å¤å¤è®¢å"},@{@"4":@"å¯åä¼è®¢å"},@{@"5":@"èå®è®¢å"}]; |
| | | _orderFiltrateView.orderSourceView.numberIndex = 2; |
| | | |
| | | @weakify(self) |
| | | _orderFiltrateView.closeFiltrate = ^(NSInteger type) { |
| | | @strongify(self) |
| | |
| | | @strongify(self) |
| | | [self.FiltrateBackView removeFromSuperview]; |
| | | }]; |
| | | }else{ |
| | | |
| | | } else { |
| | | [self.FiltrateBackView removeFromSuperview]; |
| | | self.orderFiltrateView.frame = CGRectMake(0, -self.orderFiltrateViewHeight, SCREEN_WIDTH, self.orderFiltrateViewHeight); |
| | | } |
New file |
| | |
| | | // |
| | | // OrderTitleCell.h |
| | | // MIduo |
| | | // |
| | | // Created by aeline on 2020/6/2. |
| | | // Copyright © 2020 yeshi. All rights reserved. |
| | | // |
| | | |
| | | #import <UIKit/UIKit.h> |
| | | #import "NewOrderModel.h" |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | @interface OrderTitleCell : UITableViewCell |
| | | |
| | | @property (nonatomic,strong)NewOrderListModel *model; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // OrderTitleCell.m |
| | | // MIduo |
| | | // |
| | | // Created by aeline on 2020/6/2. |
| | | // Copyright © 2020 yeshi. All rights reserved. |
| | | // |
| | | |
| | | #import "OrderTitleCell.h" |
| | | |
| | | @interface OrderTitleCell () |
| | | |
| | | @property (nonatomic, nullable, strong) UILabel *labelType; |
| | | |
| | | @property (nonatomic, nullable, strong) UILabel *labelPayType; |
| | | |
| | | @property (nonatomic, nullable, strong) UIView *typeImagesView; |
| | | ///èæ¯åè§è§å¾ |
| | | @property (nonatomic, nullable, strong) UIView *viewYj; |
| | | |
| | | |
| | | @property (nonatomic, nullable, strong) UIImageView *typeimageOneView; |
| | | @property (nonatomic, nullable, strong) UIImageView *typeimageTwoView; |
| | | @property (nonatomic, nullable, strong) UIImageView *typeimageThreeView; |
| | | @property (nonatomic, nullable, strong) UIImageView *typeimageFourView; |
| | | @end |
| | | |
| | | @implementation OrderTitleCell |
| | | |
| | | - (void)awakeFromNib { |
| | | [super awakeFromNib]; |
| | | // Initialization code |
| | | } |
| | | |
| | | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { |
| | | [super setSelected:selected animated:animated]; |
| | | |
| | | // Configure the view for the selected state |
| | | } |
| | | |
| | | - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { |
| | | |
| | | self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; |
| | | |
| | | if (self) { |
| | | self.selectionStyle = UITableViewCellSelectionStyleNone; |
| | | self.backgroundColor = [UIColor clearColor]; |
| | | [self cellConfig]; |
| | | } |
| | | |
| | | return self; |
| | | } |
| | | |
| | | - (void)cellConfig { |
| | | [self.contentView addSubview:self.viewYj]; |
| | | [self.contentView addSubview:self.labelPayType]; |
| | | [self.contentView addSubview:self.labelType]; |
| | | [self.contentView addSubview:self.typeImagesView]; |
| | | |
| | | [self.typeImagesView addSubview:self.typeimageOneView]; |
| | | [self.typeImagesView addSubview:self.typeimageTwoView]; |
| | | [self.typeImagesView addSubview:self.typeimageThreeView]; |
| | | [self.typeImagesView addSubview:self.typeimageFourView]; |
| | | |
| | | self.viewYj.sd_layout.leftEqualToView(self.contentView).topEqualToView(self.contentView).rightEqualToView(self.contentView).bottomEqualToView(self.contentView); |
| | | |
| | | @weakify(self) |
| | | self.viewYj.didFinishAutoLayoutBlock = ^(CGRect frame) { |
| | | @strongify(self) |
| | | CGFloat radius = 10; // åè§å¤§å° |
| | | UIRectCorner corner = UIRectCornerTopLeft | UIRectCornerTopRight; |
| | | UIBezierPath * path = [UIBezierPath bezierPathWithRoundedRect:self.viewYj.bounds byRoundingCorners:corner cornerRadii:CGSizeMake(radius, radius)]; |
| | | CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init]; |
| | | maskLayer.frame = self.viewYj.bounds; |
| | | maskLayer.path = path.CGPath; |
| | | self.viewYj.layer.mask = maskLayer; |
| | | }; |
| | | |
| | | self.labelPayType.sd_layout.rightSpaceToView(self.contentView, 13).centerYEqualToView(self.contentView).autoWidthRatio(0).heightIs(15); |
| | | [self.labelPayType setSingleLineAutoResizeWithMaxWidth:100]; |
| | | |
| | | self.labelType.sd_layout.leftSpaceToView(self.contentView, 13).centerYEqualToView(self.contentView).widthIs(0).heightIs(15.5); |
| | | self.labelType.sd_cornerRadius = @4; |
| | | |
| | | self.typeImagesView.sd_layout.leftSpaceToView(self.labelType, 8).rightSpaceToView(self.labelPayType, 10).heightIs(15).centerYEqualToView(self.contentView); |
| | | |
| | | |
| | | } |
| | | |
| | | - (void)setModel:(NewOrderListModel *)model { |
| | | if (!_model) { |
| | | self.labelPayType.text = model.orderState.content; |
| | | self.labelPayType.textColor = [self hexColor:model.orderState.fontColor]; |
| | | |
| | | CGFloat width = [self getWidthWithText:model.shopType[@"content"] height:16 font:11]; |
| | | |
| | | self.labelType.text = model.shopType[@"content"]; |
| | | self.labelType.textColor = [self hexColor:model.shopType[@"color"]]; |
| | | self.labelType.layer.borderColor = [self hexColor:model.shopType[@"borderColor"]].CGColor; |
| | | |
| | | self.labelType.sd_resetLayout.leftSpaceToView(self.contentView, 13).centerYEqualToView(self.contentView).widthIs(width + 10).heightIs(16); |
| | | |
| | | if (model.signList.count == 1) { |
| | | ((UIImageView *)[self.typeImagesView subviews][1]).hidden = YES; |
| | | ((UIImageView *)[self.typeImagesView subviews][2]).hidden = YES; |
| | | ((UIImageView *)[self.typeImagesView subviews][3]).hidden = YES; |
| | | |
| | | @weakify(self) |
| | | [((UIImageView *)[self.typeImagesView subviews][0]) sd_setImageWithURL:[NSURL URLWithString:model.signList[0]] placeholderImage:nil options:SDWebImageRefreshCached completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) { |
| | | @strongify(self) |
| | | if (image) { |
| | | @weakify(self) |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | @strongify(self) |
| | | ((UIImageView *)[self.typeImagesView subviews][0]).frame = CGRectMake(0, 0, roundf(image.size.width / image.size.height * 15), 15); |
| | | }); |
| | | } |
| | | }]; |
| | | |
| | | } else if (model.signList.count == 2) { |
| | | ((UIImageView *)[self.typeImagesView subviews][1]).hidden = NO; |
| | | ((UIImageView *)[self.typeImagesView subviews][2]).hidden = YES; |
| | | ((UIImageView *)[self.typeImagesView subviews][3]).hidden = YES; |
| | | |
| | | @weakify(self) |
| | | [((UIImageView *)[self.typeImagesView subviews][0]) sd_setImageWithURL:[NSURL URLWithString:model.signList[0]] placeholderImage:[UIImage imageNamed:@"é»è®¤banner"] options:SDWebImageRefreshCached completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) { |
| | | @strongify(self) |
| | | if (image) { |
| | | @weakify(self) |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | @strongify(self) |
| | | ((UIImageView *)[self.typeImagesView subviews][0]).frame = CGRectMake(0, 0, roundf(image.size.width / image.size.height * 15), 15); |
| | | @weakify(self) |
| | | // 第äºå¼ å¾ç |
| | | [((UIImageView *)[self.typeImagesView subviews][1]) sd_setImageWithURL:[NSURL URLWithString:model.signList[1]] placeholderImage:[UIImage imageNamed:@"é»è®¤banner"] options:SDWebImageRefreshCached completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) { |
| | | @strongify(self) |
| | | if (image) { |
| | | @weakify(self) |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | @strongify(self) |
| | | ((UIImageView *)[self.typeImagesView subviews][1]).frame = CGRectMake(8 + ((UIImageView *)[self.typeImagesView subviews][0]).frame.size.width , 0, roundf(image.size.width / image.size.height * 15), 15); |
| | | }); |
| | | } |
| | | }]; |
| | | }); |
| | | } |
| | | }]; |
| | | |
| | | } else if (model.signList.count == 3) { |
| | | ((UIImageView *)[self.typeImagesView subviews][1]).hidden = NO; |
| | | ((UIImageView *)[self.typeImagesView subviews][2]).hidden = NO; |
| | | ((UIImageView *)[self.typeImagesView subviews][3]).hidden = YES; |
| | | |
| | | @weakify(self) |
| | | [((UIImageView *)[self.typeImagesView subviews][0]) sd_setImageWithURL:[NSURL URLWithString:model.signList[0]] placeholderImage:[UIImage imageNamed:@"é»è®¤banner"] options:SDWebImageRefreshCached completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) { |
| | | @strongify(self) |
| | | if (image) { |
| | | @weakify(self) |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | @strongify(self) |
| | | ((UIImageView *)[self.typeImagesView subviews][0]).frame = CGRectMake(0, 0, roundf(image.size.width / image.size.height * 15), 15); |
| | | @weakify(self) |
| | | // 第äºå¼ å¾ç |
| | | [((UIImageView *)[self.typeImagesView subviews][1]) sd_setImageWithURL:[NSURL URLWithString:model.signList[1]] placeholderImage:[UIImage imageNamed:@"é»è®¤banner"] options:SDWebImageRefreshCached completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) { |
| | | @strongify(self) |
| | | if (image) { |
| | | @weakify(self) |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | @strongify(self) |
| | | ((UIImageView *)[self.typeImagesView subviews][1]).frame = CGRectMake(8 + ((UIImageView *)[self.typeImagesView subviews][0]).frame.size.width , 0, roundf(image.size.width / image.size.height * 15), 15); |
| | | // 第ä¸å¼ å¾ç |
| | | @weakify(self) |
| | | [((UIImageView *)[self.typeImagesView subviews][2]) sd_setImageWithURL:[NSURL URLWithString:model.signList[2]] placeholderImage:[UIImage imageNamed:@"é»è®¤banner"] options:SDWebImageRefreshCached completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) { |
| | | @strongify(self) |
| | | if (image) { |
| | | @weakify(self) |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | @strongify(self) |
| | | ((UIImageView *)[self.typeImagesView subviews][2]).frame = CGRectMake(8 + ((UIImageView *)[self.typeImagesView subviews][0]).frame.size.width + 8 + ((UIImageView *)[self.typeImagesView subviews][1]).frame.size.width , 0, roundf(image.size.width / image.size.height * 15), 15); |
| | | }); |
| | | } |
| | | }]; |
| | | }); |
| | | } |
| | | }]; |
| | | }); |
| | | } |
| | | }]; |
| | | |
| | | } else if (model.signList.count == 4) { |
| | | |
| | | ((UIImageView *)[self.typeImagesView subviews][1]).hidden = NO; |
| | | ((UIImageView *)[self.typeImagesView subviews][2]).hidden = NO; |
| | | ((UIImageView *)[self.typeImagesView subviews][3]).hidden = NO; |
| | | |
| | | @weakify(self) |
| | | [((UIImageView *)[self.typeImagesView subviews][0]) sd_setImageWithURL:[NSURL URLWithString:model.signList[0]] placeholderImage:[UIImage imageNamed:@"é»è®¤banner"] options:SDWebImageRefreshCached completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) { |
| | | @strongify(self) |
| | | if (image) { |
| | | @weakify(self) |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | @strongify(self) |
| | | ((UIImageView *)[self.typeImagesView subviews][0]).frame = CGRectMake(0, 0, roundf(image.size.width / image.size.height * 15), 15); |
| | | // 第äºå¼ å¾ç |
| | | @weakify(self) |
| | | [((UIImageView *)[self.typeImagesView subviews][1]) sd_setImageWithURL:[NSURL URLWithString:model.signList[1]] placeholderImage:[UIImage imageNamed:@"é»è®¤banner"] options:SDWebImageRefreshCached completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) { |
| | | @strongify(self) |
| | | if (image) { |
| | | @weakify(self) |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | @strongify(self) |
| | | ((UIImageView *)[self.typeImagesView subviews][1]).frame = CGRectMake(8 + ((UIImageView *)[self.typeImagesView subviews][0]).frame.size.width , 0, roundf(image.size.width / image.size.height * 15), 15); |
| | | // 第ä¸å¼ å¾ç |
| | | @weakify(self) |
| | | [((UIImageView *)[self.typeImagesView subviews][2]) sd_setImageWithURL:[NSURL URLWithString:model.signList[2]] placeholderImage:[UIImage imageNamed:@"é»è®¤banner"] options:SDWebImageRefreshCached completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) { |
| | | @strongify(self) |
| | | if (image) { |
| | | @weakify(self) |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | @strongify(self) |
| | | ((UIImageView *)[self.typeImagesView subviews][2]).frame = CGRectMake(8 + ((UIImageView *)[self.typeImagesView subviews][0]).frame.size.width + 8 + ((UIImageView *)[self.typeImagesView subviews][1]).frame.size.width , 0, roundf(image.size.width / image.size.height * 15), 15); |
| | | // 第åå¼ å¾ç |
| | | @weakify(self) |
| | | [((UIImageView *)[self.typeImagesView subviews][3]) sd_setImageWithURL:[NSURL URLWithString:model.signList[3]] placeholderImage:[UIImage imageNamed:@"é»è®¤banner"] options:SDWebImageRefreshCached completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) { |
| | | @strongify(self) |
| | | if (image) { |
| | | @weakify(self) |
| | | dispatch_async(dispatch_get_main_queue(), ^{ |
| | | @strongify(self) |
| | | ((UIImageView *)[self.typeImagesView subviews][3]).frame = CGRectMake(8 + ((UIImageView *)[self.typeImagesView subviews][0]).frame.size.width + 8 + ((UIImageView *)[self.typeImagesView subviews][1]).frame.size.width + 8 + ((UIImageView *)[self.typeImagesView subviews][2]).frame.size.width , 0, roundf(image.size.width / image.size.height * 15), 15); |
| | | }); |
| | | } |
| | | }]; |
| | | }); |
| | | } |
| | | }]; |
| | | }); |
| | | } |
| | | }]; |
| | | }); |
| | | } |
| | | }]; |
| | | } |
| | | } |
| | | } |
| | | |
| | | - (UIView *)viewYj { |
| | | if (!_viewYj) { |
| | | _viewYj = [[UIView alloc] init]; |
| | | _viewYj.backgroundColor = [UIColor whiteColor]; |
| | | } |
| | | return _viewYj;; |
| | | } |
| | | |
| | | - (UILabel *)labelPayType { |
| | | if (!_labelPayType) { |
| | | _labelPayType = [[UILabel alloc] init]; |
| | | _labelPayType.font = [UIFont systemFontOfSize:15]; |
| | | _labelPayType.textAlignment = NSTextAlignmentRight; |
| | | } |
| | | return _labelPayType; |
| | | } |
| | | |
| | | - (UILabel *)labelType { |
| | | if (!_labelType) { |
| | | _labelType = [[UILabel alloc] init]; |
| | | _labelType.font = [UIFont systemFontOfSize:11]; |
| | | _labelType.textAlignment = NSTextAlignmentCenter; |
| | | self.labelType.layer.borderWidth = 0.6; |
| | | } |
| | | return _labelType; |
| | | } |
| | | |
| | | - (UIView *)typeImagesView { |
| | | if (!_typeImagesView) { |
| | | _typeImagesView = [[UIView alloc] init]; |
| | | } |
| | | return _typeImagesView;; |
| | | } |
| | | |
| | | - (UIImageView *)typeimageOneView { |
| | | if (!_typeimageOneView) { |
| | | _typeimageOneView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 0, 15)]; |
| | | _typeimageOneView.backgroundColor = ImagePlaceholder_white; |
| | | } |
| | | return _typeimageOneView; |
| | | } |
| | | - (UIImageView *)typeimageTwoView { |
| | | if (!_typeimageTwoView) { |
| | | _typeimageTwoView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 0, 15)]; |
| | | _typeimageTwoView.backgroundColor = ImagePlaceholder_white; |
| | | } |
| | | return _typeimageTwoView; |
| | | } |
| | | - (UIImageView *)typeimageThreeView { |
| | | if (!_typeimageThreeView) { |
| | | _typeimageThreeView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 0, 15)]; |
| | | _typeimageThreeView.backgroundColor = ImagePlaceholder_white; |
| | | } |
| | | return _typeimageThreeView; |
| | | } |
| | | - (UIImageView *)typeimageFourView { |
| | | if (!_typeimageFourView) { |
| | | _typeimageFourView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 0, 15)]; |
| | | _typeimageFourView.backgroundColor = ImagePlaceholder_white; |
| | | } |
| | | return _typeimageFourView; |
| | | } |
| | | |
| | | @end |
| | |
| | | @end |
| | | |
| | | @interface NewOrderListModel : NSObject |
| | | @property (nonatomic, nullable, strong) NSDictionary *shopType; |
| | | |
| | | @property (nonatomic, nullable, copy)NSString *hongBaoTypePic; |
| | | @property (nonatomic, nullable, copy)NSString *hongBao; |
| | | @property (nonatomic, nullable, copy)NSString *hongBaoState; |
| | |
| | | |
| | | - (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section |
| | | { |
| | | return self.dataSource.count; |
| | | return _dataSource.count; |
| | | } |
| | | |
| | | - (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath |
| | | { |
| | | OrdFitCoCell *cell=[collectionView dequeueReusableCellWithReuseIdentifier:@"OrdFitCoCell" forIndexPath:indexPath]; |
| | | NSDictionary *dic = self.dataSource[indexPath.row]; |
| | | NSDictionary *dic = _dataSource[indexPath.row]; |
| | | [cell.gradeButton setTitle:dic.allValues[0] forState:UIControlStateNormal]; |
| | | return cell; |
| | | } |
| | | |
| | | - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath |
| | | { |
| | | NSDictionary *dic = self.dataSource[indexPath.row]; |
| | | NSDictionary *dic = _dataSource[indexPath.row]; |
| | | self.tkRateString = dic.allKeys[0]; |
| | | OrdFitCoCell *cell = (OrdFitCoCell*)[collectionView cellForItemAtIndexPath:indexPath]; |
| | | |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> |
| | | <device id="retina4_7" orientation="portrait"> |
| | | <adaptation id="fullscreen"/> |
| | | </device> |
| | | <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="16096" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> |
| | | <device id="retina4_7" orientation="portrait" appearance="light"/> |
| | | <dependencies> |
| | | <deployment identifier="iOS"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/> |
| | | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="16087"/> |
| | | <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> |
| | | </dependencies> |
| | | <objects> |
| | |
| | | <rect key="frame" x="0.0" y="0.0" width="375" height="667"/> |
| | | <subviews> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wht-6T-Pcp"> |
| | | <rect key="frame" x="0.0" y="0.0" width="375" height="590"/> |
| | | <rect key="frame" x="0.0" y="0.0" width="375" height="640"/> |
| | | <subviews> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="éæ©æ¶é´ï¼" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MDg-wl-Cex"> |
| | | <rect key="frame" x="14" y="50" width="80" height="14"/> |
| | |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_up" translatesAutoresizingMaskIntoConstraints="NO" id="8VG-Ao-JMV"> |
| | | <rect key="frame" x="181.5" y="537" width="12" height="12"/> |
| | | <rect key="frame" x="181.5" y="577" width="12" height="12"/> |
| | | <constraints> |
| | | <constraint firstAttribute="width" constant="12" id="8rg-LB-RjI"/> |
| | | <constraint firstAttribute="height" constant="12" id="Gjv-Vq-Txf"/> |
| | | </constraints> |
| | | </imageView> |
| | | <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="å䏿¶èµ·" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZDd-5P-thn"> |
| | | <rect key="frame" x="30" y="559" width="315" height="14"/> |
| | | <rect key="frame" x="30" y="599" width="315" height="14"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="14" id="iIM-8q-M9S"/> |
| | | </constraints> |
| | |
| | | <nil key="highlightedColor"/> |
| | | </label> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6x6-Bc-5OH" customClass="OrdFitCollView"> |
| | | <rect key="frame" x="15" y="392" width="345" height="35"/> |
| | | <rect key="frame" x="15" y="392" width="345" height="80"/> |
| | | <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> |
| | | <constraints> |
| | | <constraint firstAttribute="height" constant="35" id="xvO-ip-pen"/> |
| | | <constraint firstAttribute="height" constant="80" id="xvO-ip-pen"/> |
| | | </constraints> |
| | | </view> |
| | | <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="b7w-GI-WaO"> |
| | | <rect key="frame" x="53" y="468" width="269" height="39"/> |
| | | <rect key="frame" x="53" y="508" width="269" height="39"/> |
| | | <subviews> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="k4Q-D5-DZN"> |
| | | <rect key="frame" x="0.0" y="0.0" width="134.5" height="39"/> |
| | |
| | | </userDefinedRuntimeAttributes> |
| | | </view> |
| | | <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UdQ-TS-wAx"> |
| | | <rect key="frame" x="0.0" y="517" width="375" height="73"/> |
| | | <rect key="frame" x="0.0" y="557" width="375" height="83"/> |
| | | <connections> |
| | | <action selector="closeClicked:" destination="iN0-l3-epB" eventType="touchUpInside" id="Pue-r1-hx4"/> |
| | | </connections> |
| | |
| | | <constraint firstAttribute="trailing" secondItem="ZDd-5P-thn" secondAttribute="trailing" constant="30" id="n2x-iK-viB"/> |
| | | <constraint firstItem="mdy-nX-6ww" firstAttribute="trailing" secondItem="dTq-Iu-3TH" secondAttribute="trailing" id="nCO-3j-zhv"/> |
| | | <constraint firstItem="dTq-Iu-3TH" firstAttribute="top" secondItem="MDg-wl-Cex" secondAttribute="bottom" constant="10" id="nvV-81-UdG"/> |
| | | <constraint firstAttribute="height" constant="590" id="ojp-QU-m79"/> |
| | | <constraint firstAttribute="height" constant="640" id="ojp-QU-m79"/> |
| | | <constraint firstItem="WMW-Vf-y7E" firstAttribute="leading" secondItem="wht-6T-Pcp" secondAttribute="leading" constant="15" id="p05-n1-esU"/> |
| | | <constraint firstItem="Yfi-er-LQz" firstAttribute="width" secondItem="wht-6T-Pcp" secondAttribute="width" multiplier="1:12.5" id="puh-dh-X6r"/> |
| | | <constraint firstItem="MDg-wl-Cex" firstAttribute="top" secondItem="wht-6T-Pcp" secondAttribute="top" constant="50" id="qV1-YV-Z7X"/> |
| | |
| | | <constraint firstItem="8VG-Ao-JMV" firstAttribute="centerX" secondItem="wht-6T-Pcp" secondAttribute="centerX" id="uNu-N9-4g1"/> |
| | | <constraint firstAttribute="trailing" secondItem="z2g-dl-nXJ" secondAttribute="trailing" constant="15" id="uTy-Ac-aMY"/> |
| | | <constraint firstItem="b7w-GI-WaO" firstAttribute="leading" secondItem="wht-6T-Pcp" secondAttribute="leading" constant="53" id="vzP-EM-cnM"/> |
| | | <constraint firstItem="b7w-GI-WaO" firstAttribute="top" secondItem="8JE-Bz-jLv" secondAttribute="bottom" constant="130" id="yHt-Mc-Ztg"/> |
| | | <constraint firstItem="b7w-GI-WaO" firstAttribute="top" secondItem="8JE-Bz-jLv" secondAttribute="bottom" constant="170" id="yHt-Mc-Ztg"/> |
| | | <constraint firstAttribute="trailing" secondItem="8JE-Bz-jLv" secondAttribute="trailing" constant="15" id="zbF-D8-qXZ"/> |
| | | </constraints> |
| | | </view> |
| | |
| | | self = [super initWithFrame:frame]; |
| | | if (self) { |
| | | self.backgroundColor = [UIColor whiteColor]; |
| | | self.titleArr = @[@"å
¨é¨",@"æ·å®",@"京ä¸",@"æ¼å¤å¤"]; |
| | | self.titleArr = @[@"å
¨é¨",@"æ·å®",@"京ä¸",@"æ¼å¤å¤",@"å¯åä¼",@"èå®"]; |
| | | [self setupViewConfig]; |
| | | } |
| | | return self; |
| | |
| | | |
| | | - (void)setupViewConfig |
| | | { |
| | | for (int i = 0; i < 4; i++) { |
| | | for (int i = 0; i < _titleArr.count; i++) { |
| | | ALButton *button = [ALButton buttonWithType:UIButtonTypeCustom]; |
| | | button.frame = CGRectMake([UIScreen mainScreen].bounds.size.width/4*i, 0, [UIScreen mainScreen].bounds.size.width/4,45); |
| | | button.frame = CGRectMake(SCREEN_WIDTH/_titleArr.count*i, 0, SCREEN_WIDTH/_titleArr.count,45); |
| | | button.titleLabel.font = [UIFont systemFontOfSize:15]; |
| | | button.tag = 1000+i; |
| | | //常ææåé¢è² |
| | |
| | | self.lastMonthYaoQingTitileLabel.sd_layout.leftSpaceToView(self.lastMonthYaoQingView, 0).rightSpaceToView(self.lastMonthYaoQingView, 0).topSpaceToView(self.lastMonthYaoQingContentLabel, 10).heightIs(13); |
| | | } |
| | | |
| | | - (void)buttonAction:(UIButton *)button |
| | | { |
| | | - (void)buttonAction:(UIButton *)button { |
| | | NSInteger index = button.tag - 1000; |
| | | [self showControllerIndex:index]; |
| | | } |
| | | |
| | | - (void)showControllerIndex:(NSInteger)index |
| | | { |
| | | - (void)showControllerIndex:(NSInteger)index { |
| | | UIButton *button = (UIButton *)[self viewWithTag:1000 + index]; |
| | | if (button.selected) { |
| | | return; |
| | |
| | | |
| | | #import "OrdSResultController.h" |
| | | #import "OrderCellBottomView.h" |
| | | #import "NewOrderTopCell.h" |
| | | #import "OrderTitleCell.h" |
| | | #import "NewOrderCell.h" |
| | | |
| | | #import "RewardCouponsView.h" |
| | |
| | | { |
| | | |
| | | if (indexPath.row == 0) { |
| | | NSString *identifier = @"NewOrderTopCell"; |
| | | NewOrderTopCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; |
| | | NSString *identifier = @"OrderTitleCell"; |
| | | OrderTitleCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier]; |
| | | if (!cell) { |
| | | cell = [[NewOrderTopCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier]; |
| | | cell = [[OrderTitleCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier]; |
| | | } |
| | | NewOrderListModel *model = (NewOrderListModel *)self.datasource[indexPath.section]; |
| | | cell.model = model; |
| | |
| | | _tableview.estimatedSectionHeaderHeight = 0; |
| | | _tableview.estimatedSectionFooterHeight = 0; |
| | | |
| | | [_tableview registerNib:[UINib nibWithNibName:@"NewOrderTopCell" bundle:nil] forCellReuseIdentifier:@"NewOrderTopCell"]; |
| | | [_tableview registerNib:[UINib nibWithNibName:@"NewOrderCell" bundle:nil] forCellReuseIdentifier:@"NewOrderCell"]; |
| | | |
| | | NSMutableArray *idleImages = [[NSMutableArray alloc] init]; |
| | |
| | | @property (nonatomic, nullable, strong) NSMutableArray *dataTwoMutableArray; |
| | | @property (nonatomic, nullable, strong) NSMutableArray *dataThreeMutableArray; |
| | | |
| | | @property (nonatomic, nullable, strong) NSMutableArray *dataFiveMutableArray; |
| | | @end |
| | | |
| | | @implementation SearchDetailConditionView |
| | | |
| | | - (instancetype)initWithFrame:(CGRect)frame |
| | | { |
| | | - (instancetype)initWithFrame:(CGRect)frame { |
| | | self = [super initWithFrame:frame]; |
| | | if (self) { |
| | | self.backgroundColor = UICOLOR_FROM_RGB(0x000000, 0.4); |
| | |
| | | return self; |
| | | } |
| | | |
| | | - (void)viewConfig |
| | | { |
| | | - (void)viewConfig { |
| | | [self addSubview:self.tableView]; |
| | | [self addSubview:self.clickView]; |
| | | UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onDisMis)]; |
| | | [self.clickView addGestureRecognizer:tap]; |
| | | } |
| | | |
| | | - (void)onDisMis |
| | | { |
| | | - (void)onDisMis { |
| | | if (_delegate && [_delegate respondsToSelector:@selector(noticeViewDisMis)]) { |
| | | [_delegate noticeViewDisMis]; |
| | | } |
| | | } |
| | | |
| | | - (void)resetDataConfig |
| | | { |
| | | - (void)resetDataConfig { |
| | | [self.dataOneMutableArray removeAllObjects]; |
| | | self.dataOneMutableArray = nil; |
| | | [self.dataTwoMutableArray removeAllObjects]; |
| | | self.dataTwoMutableArray = nil; |
| | | [self.dataThreeMutableArray removeAllObjects]; |
| | | self.dataThreeMutableArray = nil; |
| | | [self.dataFiveMutableArray removeAllObjects]; |
| | | self.dataFiveMutableArray = nil; |
| | | } |
| | | |
| | | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView |
| | | { |
| | | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { |
| | | return 1; |
| | | } |
| | | |
| | | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section |
| | | { |
| | | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { |
| | | if ([_goodsType integerValue] == 1) { |
| | | return _dataOneMutableArray.count; |
| | | |
| | |
| | | |
| | | } else if ([_goodsType integerValue] == 3) { |
| | | return _dataThreeMutableArray.count; |
| | | |
| | | } else if ([_goodsType integerValue] == 5) { |
| | | return _dataFiveMutableArray.count; |
| | | |
| | | } |
| | | return 1; |
| | | } |
| | |
| | | |
| | | } else if ([_goodsType integerValue] == 3) { |
| | | cell.dataDictionary = self.dataThreeMutableArray[indexPath.row]; |
| | | |
| | | } else if ([_goodsType integerValue] == 5) { |
| | | cell.dataDictionary = self.dataFiveMutableArray[indexPath.row]; |
| | | |
| | | } |
| | | return cell; |
| | | } |
| | |
| | | if (_delegate && [_delegate respondsToSelector:@selector(noticefilterData:)]) { |
| | | [_delegate noticefilterData:self.dataThreeMutableArray]; |
| | | } |
| | | |
| | | } else if ([_goodsType integerValue] == 5) { |
| | | NSMutableDictionary *dictionary = [[NSMutableDictionary alloc] initWithDictionary:self.dataFiveMutableArray[indexPath.row]]; |
| | | if ([self.dataFiveMutableArray[indexPath.row][@"isSelect"] boolValue]) { |
| | | [dictionary setObject:[NSNumber numberWithBool:NO] forKey:@"isSelect"]; |
| | | |
| | | } else { |
| | | [dictionary setObject:[NSNumber numberWithBool:YES] forKey:@"isSelect"]; |
| | | } |
| | | |
| | | [self.dataFiveMutableArray replaceObjectAtIndex:indexPath.row withObject:dictionary]; |
| | | @weakify(self) |
| | | [UIView performWithoutAnimation:^{ |
| | | @strongify(self) |
| | | [self.tableView reloadData]; |
| | | }]; |
| | | if (_delegate && [_delegate respondsToSelector:@selector(noticefilterData:)]) { |
| | | [_delegate noticefilterData:self.dataFiveMutableArray]; |
| | | } |
| | | } |
| | | } |
| | | |
| | | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath |
| | | { |
| | | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { |
| | | return 45; |
| | | } |
| | | |
| | | - (UITableView *)tableView |
| | | { |
| | | - (UITableView *)tableView { |
| | | if (!_tableView) { |
| | | _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 0) style:UITableViewStylePlain]; |
| | | _tableView.delegate = self; |
| | |
| | | return _tableView; |
| | | } |
| | | |
| | | - (UIView *)clickView |
| | | { |
| | | - (UIView *)clickView { |
| | | if (!_clickView) { |
| | | _clickView = [[UIView alloc] init]; |
| | | _clickView.frame = CGRectMake(0, CGRectGetMaxY(self.tableView.frame), SCREEN_WIDTH, SCREEN_HEIGHT); |
| | |
| | | return _clickView; |
| | | } |
| | | |
| | | - (void)setGoodsType:(NSString *)goodsType |
| | | { |
| | | - (void)setGoodsType:(NSString *)goodsType { |
| | | _goodsType = goodsType; |
| | | CGFloat height = 0; |
| | | if ([goodsType integerValue] == 1) { |
| | |
| | | |
| | | } else if ([goodsType integerValue] == 3) { |
| | | height = self.dataThreeMutableArray.count*45; |
| | | |
| | | } else if ([goodsType integerValue] == 5) { |
| | | height = self.dataFiveMutableArray.count*45; |
| | | } |
| | | self.tableView.frame = CGRectMake(0, 0, SCREEN_WIDTH, height); |
| | | self.clickView.frame = CGRectMake(0, CGRectGetMaxY(self.tableView.frame), SCREEN_WIDTH, SCREEN_HEIGHT); |
| | | [self.tableView reloadData]; |
| | | } |
| | | |
| | | - (NSMutableArray *)dataMutableArray |
| | | { |
| | | - (NSMutableArray *)dataMutableArray { |
| | | if (!_dataMutableArray) { |
| | | _dataMutableArray = [[NSMutableArray alloc] init]; |
| | | } |
| | | return _dataMutableArray; |
| | | } |
| | | |
| | | - (NSMutableArray *)dataOneMutableArray |
| | | { |
| | | - (NSMutableArray *)dataOneMutableArray { |
| | | if (!_dataOneMutableArray) { |
| | | _dataOneMutableArray = [[NSMutableArray alloc] init]; |
| | | [_dataOneMutableArray addObject:@{@"title" : @"天ç«", @"isSelect": [NSNumber numberWithBool:NO], @"type" : @"tmall"}]; |
| | |
| | | return _dataOneMutableArray; |
| | | } |
| | | |
| | | - (NSMutableArray *)dataTwoMutableArray |
| | | { |
| | | - (NSMutableArray *)dataTwoMutableArray { |
| | | if (!_dataTwoMutableArray) { |
| | | _dataTwoMutableArray = [[NSMutableArray alloc] init]; |
| | | [_dataTwoMutableArray addObject:@{@"title" : @"京ä¸èªè¥", @"isSelect": [NSNumber numberWithBool:NO], @"type" : @"zy"}]; |
| | |
| | | } |
| | | |
| | | |
| | | - (NSMutableArray *)dataThreeMutableArray |
| | | { |
| | | - (NSMutableArray *)dataThreeMutableArray { |
| | | if (!_dataThreeMutableArray) { |
| | | _dataThreeMutableArray = [[NSMutableArray alloc] init]; |
| | | [_dataThreeMutableArray addObject:@{@"title" : @"åçåºéº", @"isSelect": [NSNumber numberWithBool:NO], @"type" : @"brand"}]; |
| | |
| | | return _dataThreeMutableArray; |
| | | } |
| | | |
| | | - (NSMutableArray *)dataFiveMutableArray { |
| | | if (!_dataFiveMutableArray) { |
| | | _dataFiveMutableArray = [[NSMutableArray alloc] init]; |
| | | [_dataFiveMutableArray addObject:@{@"title" : @"èå®èªè¥", @"isSelect": [NSNumber numberWithBool:NO], @"type" : @"suningService"}]; |
| | | [_dataFiveMutableArray addObject:@{@"title" : @"èå®å½é
", @"isSelect": [NSNumber numberWithBool:NO], @"type" : @"snhwg"}]; |
| | | [_dataFiveMutableArray addObject:@{@"title" : @"è宿å¡", @"isSelect": [NSNumber numberWithBool:NO], @"type" : @"snfwservice"}]; |
| | | [_dataFiveMutableArray addObject:@{@"title" : @"æ¼è´", @"isSelect": [NSNumber numberWithBool:NO], @"type" : @"pgSearch"}]; |
| | | } |
| | | return _dataFiveMutableArray; |
| | | } |
| | | |
| | | @end |
| | |
| | | // Views |
| | | #import "SearchDetailFilterView.h" |
| | | #import "SearchDetailFilterWPHView.h" |
| | | #import "SearchDetailFilterSNView.h" |
| | | |
| | | #import "SearchDetailConditionView.h" |
| | | #import "SearchDetailFiltrPriceView.h" |
| | |
| | | /// çéè§å¾ |
| | | @property (nonatomic, nullable, strong) SearchDetailFilterView *searchDetailFilterView; |
| | | @property (nonatomic, nullable, strong) SearchDetailFilterWPHView *viewSearchDetailFilterWPH; |
| | | @property (nonatomic, nullable, strong) SearchDetailFilterSNView *viewSearchDetailFilterSN; |
| | | |
| | | @property (nonatomic, nullable, strong) SearchDetailConditionView *searchDetailConditionView; |
| | | |
| | |
| | | if ([_goodsType integerValue] == 4) { |
| | | [self.view addSubview:self.viewSearchDetailFilterWPH]; |
| | | |
| | | } else if ([_goodsType integerValue] == 5) { |
| | | [self.view addSubview:self.viewSearchDetailFilterSN]; |
| | | |
| | | } else { |
| | | [self.view addSubview:self.searchDetailFilterView]; |
| | | } |
| | |
| | | self.searchKey = searchKey; |
| | | [self resetDataCoing]; |
| | | [self resetDataWPHCoing]; |
| | | [self resetDataSNCoing]; |
| | | [self.tableView.mj_header beginRefreshing]; |
| | | } |
| | | |
| | |
| | | [self.viewSearchDetailFilterWPH.buttonSynthesis addTarget:self action:@selector(onFilterGoodsWPH:) forControlEvents:UIControlEventTouchUpInside]; |
| | | [self.viewSearchDetailFilterWPH.buttonDiscount addTarget:self action:@selector(onFilterGoodsWPH:) forControlEvents:UIControlEventTouchUpInside]; |
| | | [self.viewSearchDetailFilterWPH.priceButton addTarget:self action:@selector(onFilterGoodsWPH:) forControlEvents:UIControlEventTouchUpInside]; |
| | | |
| | | |
| | | self.viewSearchDetailFilterSN.buttonSynthesis.tag = 700; |
| | | self.viewSearchDetailFilterSN.priceButton.tag = 702; |
| | | self.viewSearchDetailFilterSN.rebatesButton.tag = 704; |
| | | self.viewSearchDetailFilterSN.filteringButton.tag = 705; |
| | | |
| | | [self.viewSearchDetailFilterSN.buttonSynthesis addTarget:self action:@selector(onFilterGoodsSN:) forControlEvents:UIControlEventTouchUpInside]; |
| | | |
| | | [self.viewSearchDetailFilterSN.priceButton addTarget:self action:@selector(onFilterGoodsSN:) forControlEvents:UIControlEventTouchUpInside]; |
| | | |
| | | [self.viewSearchDetailFilterSN.rebatesButton addTarget:self action:@selector(onFilterGoodsSN:) forControlEvents:UIControlEventTouchUpInside]; |
| | | |
| | | [self.viewSearchDetailFilterSN.filteringButton addTarget:self action:@selector(onFilterGoodsSN:) forControlEvents:UIControlEventTouchUpInside]; |
| | | } |
| | | |
| | | - (void)addNetWorkNotice { |
| | |
| | | } |
| | | [self resetDataCoing]; |
| | | [self resetDataWPHCoing]; |
| | | [self resetDataSNCoing]; |
| | | |
| | | [self.tableView.mj_header beginRefreshing]; |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | - (void)onFilterGoodsSN:(UIButton *)button { |
| | | switch (button.tag) { |
| | | case 700: { |
| | | if (!button.selected) { |
| | | button.selected = YES; |
| | | self.viewSearchDetailFilterSN.priceButton.selected = NO; |
| | | self.viewSearchDetailFilterSN.priceButton.tag = 702; |
| | | self.viewSearchDetailFilterSN.rebatesButton.selected = NO; |
| | | |
| | | [self hidePriceView]; |
| | | |
| | | self.order = 0; |
| | | [self.tableView.mj_header beginRefreshing]; |
| | | } |
| | | break; |
| | | } |
| | | |
| | | case 702: { |
| | | button.selected = YES; |
| | | button.tag = 703; |
| | | self.viewSearchDetailFilterSN.rebatesButton.selected = NO; |
| | | self.viewSearchDetailFilterSN.buttonSynthesis.selected = NO; |
| | | [button setImage:[UIImage imageNamed:@"ååº"] forState:UIControlStateSelected]; |
| | | |
| | | if ([self.goodsType integerValue] != 3) { // æ¼å¤å¤ä¸æ¯æè¾å
¥ä»·æ ¼ |
| | | [self showPriceView]; |
| | | } |
| | | |
| | | self.order = 3; |
| | | [self.tableView.mj_header beginRefreshing]; |
| | | |
| | | break; |
| | | } |
| | | case 703: { |
| | | button.selected = YES; |
| | | button.tag = 702; |
| | | self.viewSearchDetailFilterSN.rebatesButton.selected = NO; |
| | | self.viewSearchDetailFilterSN.buttonSynthesis.selected = NO; |
| | | [button setImage:[UIImage imageNamed:@"éåº"] forState:UIControlStateSelected]; |
| | | |
| | | if ([self.goodsType integerValue] != 3) { // æ¼å¤å¤ä¸æ¯æè¾å
¥ä»·æ ¼ |
| | | [self showPriceView]; |
| | | } |
| | | |
| | | self.order = 2; |
| | | [self.tableView.mj_header beginRefreshing]; |
| | | |
| | | break; |
| | | } |
| | | case 704: {// è¿å©æ¯ |
| | | if (!button.selected) { |
| | | button.selected = YES; |
| | | self.viewSearchDetailFilterSN.buttonSynthesis.selected = NO; |
| | | self.viewSearchDetailFilterSN.priceButton.selected = NO; |
| | | self.viewSearchDetailFilterSN.priceButton.tag = 702; |
| | | self.order = 4; |
| | | |
| | | [self hidePriceView]; |
| | | [self.tableView.mj_header beginRefreshing]; |
| | | } |
| | | |
| | | break; |
| | | } |
| | | case 705: { |
| | | [self setFilterButtonState:button]; |
| | | break; |
| | | } |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | |
| | | - (void)ClickConnectBtn:(UIButton *)sender { |
| | | if (iOS10) { |
| | | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString] |
| | |
| | | self.viewSearchDetailFilterWPH.buttonSynthesis.selected = YES; |
| | | |
| | | self.viewSearchDetailFilterWPH.buttonDiscount.selected = NO; |
| | | |
| | | self.viewSearchDetailFilterWPH.priceButton.selected = NO; |
| | | self.viewSearchDetailFilterWPH.priceButton.tag = 702; |
| | | |
| | |
| | | [self hidePriceView]; |
| | | } |
| | | |
| | | - (void)resetDataSNCoing { |
| | | self.page = 1; |
| | | self.order = 0; |
| | | self.isHaveFilterArray = nil; |
| | | |
| | | self.viewSearchDetailFilterSN.buttonSynthesis.selected = YES; |
| | | |
| | | self.viewSearchDetailFilterSN.priceButton.selected = NO; |
| | | self.viewSearchDetailFilterSN.priceButton.tag = 702; |
| | | |
| | | self.viewSearchDetailFilterSN.rebatesButton.selected = NO; |
| | | |
| | | self.viewSearchDetailFilterSN.filteringButton.selected = NO; |
| | | |
| | | self.searchDetailConditionView.hidden = YES; |
| | | self.isShow = NO; |
| | | [self.searchDetailConditionView resetDataConfig]; |
| | | |
| | | [self hidePriceView]; |
| | | } |
| | | |
| | | - (void)showPriceView { |
| | | if ([_goodsType integerValue] == 4) { |
| | | self.searchDetailFiltrPriceView.frame = CGRectMake(0, CGRectGetMaxY(self.viewSearchDetailFilterWPH.frame), SCREEN_WIDTH, 45); |
| | | self.tableView.frame = CGRectMake(0, CGRectGetMaxY(self.viewSearchDetailFilterWPH.frame), SCREEN_WIDTH, SCREEN_HEIGHT - kNavigationBarH - kStatusBarH - CGRectGetHeight(self.viewSearchDetailFilterWPH.frame) - CGRectGetHeight(self.searchDetailFiltrPriceView.frame)); |
| | | self.tableView.frame = CGRectMake(0, CGRectGetMaxY(self.searchDetailFiltrPriceView.frame), SCREEN_WIDTH, SCREEN_HEIGHT - kNavigationBarH - kStatusBarH - CGRectGetHeight(self.viewSearchDetailFilterWPH.frame) - CGRectGetHeight(self.searchDetailFiltrPriceView.frame)); |
| | | |
| | | |
| | | } else if ([_goodsType integerValue] == 5) { |
| | | self.searchDetailFiltrPriceView.frame = CGRectMake(0, CGRectGetMaxY(self.viewSearchDetailFilterSN.frame), SCREEN_WIDTH, 45); |
| | | self.tableView.frame = CGRectMake(0, CGRectGetMaxY(self.searchDetailFiltrPriceView.frame), SCREEN_WIDTH, SCREEN_HEIGHT - kNavigationBarH - kStatusBarH - CGRectGetHeight(self.viewSearchDetailFilterSN.frame) - CGRectGetHeight(self.searchDetailFiltrPriceView.frame)); |
| | | |
| | | |
| | | } else { |
| | |
| | | self.searchDetailFiltrPriceView.frame = CGRectMake(0, CGRectGetMaxY(self.viewSearchDetailFilterWPH.frame), SCREEN_WIDTH, 0); |
| | | self.tableView.frame = CGRectMake(0, CGRectGetMaxY(self.searchDetailFiltrPriceView.frame), SCREEN_WIDTH, SCREEN_HEIGHT - kNavigationBarH - kStatusBarH - CGRectGetHeight(self.viewSearchDetailFilterWPH.frame) - CGRectGetHeight(self.searchDetailFiltrPriceView.frame)); |
| | | |
| | | } else if ([_goodsType integerValue] == 5) { |
| | | self.searchDetailFiltrPriceView.frame = CGRectMake(0, CGRectGetMaxY(self.viewSearchDetailFilterSN.frame), SCREEN_WIDTH, 0); |
| | | self.tableView.frame = CGRectMake(0, CGRectGetMaxY(self.searchDetailFiltrPriceView.frame), SCREEN_WIDTH, SCREEN_HEIGHT - kNavigationBarH - kStatusBarH - CGRectGetHeight(self.viewSearchDetailFilterSN.frame) - CGRectGetHeight(self.searchDetailFiltrPriceView.frame)); |
| | | |
| | | } else { |
| | | self.searchDetailFiltrPriceView.frame = CGRectMake(0, CGRectGetMaxY(self.searchDetailFilterView.frame), SCREEN_WIDTH, 0); |
| | | self.tableView.frame = CGRectMake(0, CGRectGetMaxY(self.searchDetailFiltrPriceView.frame), SCREEN_WIDTH, SCREEN_HEIGHT - kNavigationBarH - kStatusBarH - CGRectGetHeight(self.searchDetailFilterView.frame) - CGRectGetHeight(self.searchDetailFiltrPriceView.frame)); |
| | |
| | | } |
| | | |
| | | - (void)setFilterButtonState:(UIButton *)button { |
| | | |
| | | if (!button.selected) { |
| | | button.selected = YES; |
| | | [button setImage:[UIImage imageNamed:@"synthesize_up"] forState:UIControlStateSelected]; |
| | |
| | | self.isShow = NO; |
| | | self.isHaveFilterArray = array; |
| | | BOOL isHaveFiltr = [self fetchIsHaveFilter:array]; |
| | | |
| | | if (isHaveFiltr) { |
| | | self.searchDetailFilterView.filteringButton.selected = YES; |
| | | [self.searchDetailFilterView.filteringButton setImage:[UIImage imageNamed:@"synthesize"] forState:UIControlStateSelected]; |
| | | |
| | | if ([_goodsType integerValue] == 5) { |
| | | self.viewSearchDetailFilterSN.filteringButton.selected = YES; |
| | | [self.viewSearchDetailFilterSN.filteringButton setImage:[UIImage imageNamed:@"synthesize"] forState:UIControlStateSelected]; |
| | | |
| | | } else { |
| | | self.searchDetailFilterView.filteringButton.selected = YES; |
| | | [self.searchDetailFilterView.filteringButton setImage:[UIImage imageNamed:@"synthesize"] forState:UIControlStateSelected]; |
| | | } |
| | | } else { |
| | | self.searchDetailFilterView.filteringButton.selected = NO; |
| | | [self.searchDetailFilterView.filteringButton setImage:[UIImage imageNamed:@"synthesize_down"] forState:UIControlStateSelected]; |
| | | if ([_goodsType integerValue] == 5) { |
| | | self.viewSearchDetailFilterSN.filteringButton.selected = NO; |
| | | [self.viewSearchDetailFilterSN.filteringButton setImage:[UIImage imageNamed:@"synthesize_down"] forState:UIControlStateSelected]; |
| | | |
| | | } else { |
| | | self.searchDetailFilterView.filteringButton.selected = NO; |
| | | [self.searchDetailFilterView.filteringButton setImage:[UIImage imageNamed:@"synthesize_down"] forState:UIControlStateSelected]; |
| | | } |
| | | } |
| | | [self.tableView.mj_header beginRefreshing]; |
| | | } |
| | | |
| | | - (void)noticeViewDisMis { |
| | | [self setFilterButtonState:self.searchDetailFilterView.filteringButton]; |
| | | if ([_goodsType integerValue] == 5) { |
| | | [self setFilterButtonState:self.viewSearchDetailFilterSN.filteringButton]; |
| | | |
| | | } else { |
| | | [self setFilterButtonState:self.searchDetailFilterView.filteringButton]; |
| | | } |
| | | } |
| | | |
| | | #pragma mark - YTHSearchTextFieldDelegate - |
| | |
| | | return _viewSearchDetailFilterWPH; |
| | | } |
| | | |
| | | - (SearchDetailFilterSNView *)viewSearchDetailFilterSN { |
| | | if (!_viewSearchDetailFilterSN) { |
| | | _viewSearchDetailFilterSN = [[SearchDetailFilterSNView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 40)]; |
| | | } |
| | | return _viewSearchDetailFilterSN; |
| | | } |
| | | |
| | | - (SearchDetailFiltrPriceView *)searchDetailFiltrPriceView { |
| | | if (!_searchDetailFiltrPriceView) { |
| | | _searchDetailFiltrPriceView = [[SearchDetailFiltrPriceView alloc] initWithFrame:CGRectMake(0, CGRectGetMaxY(self.searchDetailFilterView.frame), SCREEN_WIDTH, 0)]; |
New file |
| | |
| | | // |
| | | // SearchDetailFilterSNView.h |
| | | // MIduo |
| | | // |
| | | // Created by aeline on 2020/6/4. |
| | | // Copyright © 2020 yeshi. All rights reserved. |
| | | // |
| | | |
| | | #import <UIKit/UIKit.h> |
| | | |
| | | NS_ASSUME_NONNULL_BEGIN |
| | | |
| | | @interface SearchDetailFilterSNView : UIView |
| | | |
| | | /// 综å |
| | | @property (nonatomic, nullable, strong) ALButton *buttonSynthesis; |
| | | /// ä»·æ ¼ |
| | | @property (nonatomic, nullable, strong) ALButton *priceButton; |
| | | /// è¿å©æ¯ |
| | | @property (nonatomic, nullable, strong) ALButton *rebatesButton; |
| | | /// çé |
| | | @property (nonatomic, nullable, strong) ALButton *filteringButton; |
| | | |
| | | @end |
| | | |
| | | NS_ASSUME_NONNULL_END |
New file |
| | |
| | | // |
| | | // SearchDetailFilterSNView.m |
| | | // MIduo |
| | | // |
| | | // Created by aeline on 2020/6/4. |
| | | // Copyright © 2020 yeshi. All rights reserved. |
| | | // |
| | | |
| | | #import "SearchDetailFilterSNView.h" |
| | | |
| | | @interface SearchDetailFilterSNView () |
| | | |
| | | @property (nonatomic, nullable, strong) UIView *garyView; |
| | | |
| | | @end |
| | | |
| | | @implementation SearchDetailFilterSNView |
| | | |
| | | - (instancetype)initWithFrame:(CGRect)frame |
| | | { |
| | | self = [super initWithFrame:frame]; |
| | | if (self) { |
| | | self.backgroundColor = [UIColor whiteColor]; |
| | | [self viewConfig]; |
| | | } |
| | | return self; |
| | | } |
| | | |
| | | - (void)viewConfig { |
| | | [self addSubview:self.buttonSynthesis]; |
| | | self.buttonSynthesis.sd_layout.leftSpaceToView(self, 0).topEqualToView(self).bottomEqualToView(self).widthIs(SCREEN_WIDTH/4); |
| | | |
| | | [self addSubview:self.priceButton]; |
| | | self.priceButton.sd_layout.leftSpaceToView(self.buttonSynthesis, 0).topEqualToView(self).bottomEqualToView(self).widthIs(SCREEN_WIDTH/4); |
| | | [_priceButton setTitleEdgeInsets:UIEdgeInsetsMake(0, -_priceButton.imageView.bounds.size.width, 0, _priceButton.imageView.bounds.size.width)]; |
| | | [_priceButton setImageEdgeInsets:UIEdgeInsetsMake(0, _priceButton.titleLabel.bounds.size.width, 0, -_priceButton.titleLabel.bounds.size.width)]; |
| | | |
| | | [self addSubview:self.rebatesButton]; |
| | | self.rebatesButton.sd_layout.leftSpaceToView(self.priceButton, 0).topEqualToView(self).bottomEqualToView(self).widthIs(SCREEN_WIDTH/4); |
| | | |
| | | [self addSubview:self.filteringButton]; |
| | | self.filteringButton.sd_layout.leftSpaceToView(self.rebatesButton, 0).topEqualToView(self).bottomEqualToView(self).widthIs(SCREEN_WIDTH/4); |
| | | [_filteringButton setTitleEdgeInsets:UIEdgeInsetsMake(0, -_filteringButton.imageView.bounds.size.width, 0, _filteringButton.imageView.bounds.size.width)]; |
| | | [_filteringButton setImageEdgeInsets:UIEdgeInsetsMake(0, _filteringButton.titleLabel.bounds.size.width, 0, -_filteringButton.titleLabel.bounds.size.width)]; |
| | | |
| | | [self addSubview:self.garyView]; |
| | | self.garyView.sd_layout.leftEqualToView(self).bottomEqualToView(self).rightEqualToView(self).heightIs(0.5); |
| | | } |
| | | |
| | | - (ALButton *)buttonSynthesis { |
| | | if (!_buttonSynthesis) { |
| | | _buttonSynthesis = [ALButton buttonWithType:UIButtonTypeCustom]; |
| | | [_buttonSynthesis setTitle:@"综å" forState:UIControlStateNormal]; |
| | | [_buttonSynthesis setTitleColor:UICOLOR_FROM_RGB(0x333333, 1.0) forState:UIControlStateNormal]; |
| | | [_buttonSynthesis setTitleColor:UICOLOR_FROM_RGB(0xE5005C, 1.0) forState:UIControlStateSelected]; |
| | | _buttonSynthesis.titleLabel.font = [UIFont systemFontOfSize:15]; |
| | | _buttonSynthesis.selected = YES; |
| | | } |
| | | return _buttonSynthesis; |
| | | } |
| | | |
| | | - (ALButton *)priceButton { |
| | | if (!_priceButton) { |
| | | _priceButton = [ALButton buttonWithType:UIButtonTypeCustom]; |
| | | [_priceButton setImage:ALIMAGE_NAMED(@"æåºæªéä¸") forState:UIControlStateNormal]; |
| | | [_priceButton setTitle:@"ä»·æ ¼ " forState:UIControlStateNormal]; |
| | | [_priceButton setTitleColor:UICOLOR_FROM_RGB(0x333333, 1.0) forState:UIControlStateNormal]; |
| | | [_priceButton setTitleColor:UICOLOR_FROM_RGB(0xE5005C, 1.0) forState:UIControlStateSelected]; |
| | | _priceButton.titleLabel.font = [UIFont systemFontOfSize:15]; |
| | | } |
| | | return _priceButton; |
| | | } |
| | | |
| | | - (ALButton *)rebatesButton { |
| | | if (!_rebatesButton) { |
| | | _rebatesButton = [ALButton buttonWithType:UIButtonTypeCustom]; |
| | | [_rebatesButton setTitle:@"è¿å©æ¯" forState:UIControlStateNormal]; |
| | | [_rebatesButton setTitleColor:UICOLOR_FROM_RGB(0x333333, 1.0) forState:UIControlStateNormal]; |
| | | [_rebatesButton setTitleColor:UICOLOR_FROM_RGB(0xE5005C, 1.0) forState:UIControlStateSelected]; |
| | | _rebatesButton.titleLabel.font = [UIFont systemFontOfSize:15]; |
| | | } |
| | | return _rebatesButton; |
| | | } |
| | | |
| | | - (ALButton *)filteringButton { |
| | | if (!_filteringButton) { |
| | | _filteringButton = [ALButton buttonWithType:UIButtonTypeCustom]; |
| | | [_filteringButton setImage:ALIMAGE_NAMED(@"synthesize_down") forState:UIControlStateNormal]; |
| | | [_filteringButton setTitle:@"çé " forState:UIControlStateNormal]; |
| | | [_filteringButton setTitleColor:UICOLOR_FROM_RGB(0x333333, 1.0) forState:UIControlStateNormal]; |
| | | [_filteringButton setTitleColor:UICOLOR_FROM_RGB(0xE5005C, 1.0) forState:UIControlStateSelected]; |
| | | _filteringButton.titleLabel.font = [UIFont systemFontOfSize:15]; |
| | | } |
| | | return _filteringButton; |
| | | } |
| | | |
| | | - (UIView *)garyView { |
| | | if (!_garyView) { |
| | | _garyView = [[UIView alloc] init]; |
| | | _garyView.backgroundColor = UICOLOR_FROM_RGB(0xe0e0e0, 1.0); |
| | | } |
| | | return _garyView; |
| | | } |
| | | |
| | | @end |
| | |
| | | |
| | | CGFloat dyWidth = (SCREEN_WIDTH > 375)?50:30; |
| | | |
| | | self.buttonSynthesis.sd_layout.leftSpaceToView(self, 30).topEqualToView(self).bottomEqualToView(self).widthIs((SCREEN_WIDTH-dyWidth*2)/3); |
| | | self.buttonSynthesis.sd_layout.leftSpaceToView(self, dyWidth).topEqualToView(self).bottomEqualToView(self).widthIs((SCREEN_WIDTH-dyWidth*2)/3); |
| | | |
| | | self.buttonDiscount.sd_layout.leftSpaceToView(self.buttonSynthesis, 0).topEqualToView(self).bottomEqualToView(self).widthIs((SCREEN_WIDTH-dyWidth*2)/3); |
| | | |
| | |
| | | -(UIImageView *)imageViewContent { |
| | | if (!_imageViewContent) { |
| | | _imageViewContent = [[UIImageView alloc] init]; |
| | | _imageViewContent.backgroundColor = ImagePlaceholder_white; |
| | | } |
| | | return _imageViewContent; |
| | | } |
| | |
| | | * çé¨æç´¢ |
| | | */ |
| | | - (void)getHotSearch { |
| | | NSDictionary *params = @{@"goodsType":_goodsType}; |
| | | NSMutableDictionary *params = [[ NSMutableDictionary alloc] init]; |
| | | [params setObject:@"1" forKey:@"goodsType"]; |
| | | @weakify(self) |
| | | [[ALNetWorking startInterface] Post:[NSString stringWithFormat:@"%@/%@",domainHTTP, @"search/gethotsearch"] param:params success:^(NSDictionary *object) { |
| | | @strongify(self) |
| | |
| | | - (void)viewWillAppear:(BOOL)animated { |
| | | [super viewWillAppear:animated]; |
| | | [self.navigationController setNavigationBarHidden:NO animated:animated]; |
| | | self.navBarHairlineImageView.hidden = YES; |
| | | } |
| | | |
| | | - (void)viewDidLoad { |
| | |
| | | |
| | | /// 龿¥ |
| | | /// @param dictionary dictionary |
| | | - (void)guessLikeUrlPopView:(NSDictionary *)dictionary; |
| | | - (void)guessLikeUrlPopView:(NSDictionary *)dictionary :(void(^)(BOOL result))completeBlock; |
| | | |
| | | |
| | | /// æå |
| | | /// @param dictionary dictionary |
| | | - (void)searchCouponView:(NSDictionary *)dictionary; |
| | | - (void)searchCouponView:(NSDictionary *)dictionary :(void(^)(BOOL result))completeBlock; |
| | | |
| | | - (void)guessLikeSimilarityPopView:(NSDictionary *)dictionary; |
| | | - (void)guessLikeSimilarityPopView:(NSDictionary *)dictionary :(void(^)(BOOL result))completeBlock; |
| | | |
| | | - (void)homeMDLingQuView:(NSDictionary *)dictionary; |
| | | - (void)homeMDLingQuView:(NSDictionary *)dictionary :(void(^)(BOOL result))completeBlock; |
| | | |
| | | - (void)homeMDWuXiaoView:(NSDictionary *)dictionary; |
| | | - (void)homeMDWuXiaoView:(NSDictionary *)dictionary :(void(^)(BOOL result))completeBlock; |
| | | |
| | | - (void)GuessLikeTurnToLinkPopView:(NSDictionary *)dictionary; |
| | | - (void)GuessLikeTurnToLinkPopView:(NSDictionary *)dictionary :(void(^)(BOOL result))completeBlock; |
| | | |
| | | /// è¦ç卿ç¼åæ é¢ |
| | | - (void)postDynamicData; |
| | |
| | | |
| | | @implementation HomeManage |
| | | |
| | | - (void)guessLikeUrlPopView:(NSDictionary *)dictionary { |
| | | - (void)guessLikeUrlPopView:(NSDictionary *)dictionary :(nonnull void (^)(BOOL))completeBlock { |
| | | [UMCustom umMain_tbgoods_recommend_result:@"åå"]; |
| | | GoodsDetailBaseModel *goodsDetailBaseModel = [GoodsDetailBaseModel yy_modelWithJSON:dictionary[@"data"][@"goods"]]; |
| | | [self.guessLikeUrlPopView dismiss]; |
| | |
| | | self.guessLikeUrlPopView.hasIndex = ^(NSInteger index) { |
| | | @strongify(self) |
| | | if (index == 790) { // å
³é |
| | | completeBlock(YES); |
| | | [self.guessLikeUrlPopView dismiss]; |
| | | self.guessLikeUrlPopView = nil; |
| | | [self clearPasteboard];// æ¸
空ç²è´´æ¿ |
| | | |
| | | } else { |
| | | completeBlock(YES); |
| | | [self.guessLikeUrlPopView dismiss]; |
| | | self.guessLikeUrlPopView = nil; |
| | | [self clearPasteboard]; |
| | |
| | | [self.guessLikeUrlPopView show]; |
| | | } |
| | | |
| | | - (void)searchCouponView:(NSDictionary *)dictionary { |
| | | - (void)searchCouponView:(NSDictionary *)dictionary :(nonnull void (^)(BOOL))completeBlock { |
| | | [UMCustom umMain_tbgoods_recommend_result:@"æ é¢"]; |
| | | NSString *pasteboardStr = dictionary[@"data"][@"data"][@"title"]; |
| | | [self.searchCouponView dismiss]; |
| | |
| | | self.searchCouponView.hasIndex = ^(NSInteger index) { |
| | | @strongify(self) |
| | | if (index == 790) { // å
³é |
| | | completeBlock(YES); |
| | | [self.searchCouponView dismiss]; |
| | | self.searchCouponView = nil; |
| | | [self clearPasteboard]; // æ¸
空ç²è´´æ¿ |
| | | |
| | | } else { |
| | | completeBlock(YES); |
| | | [self clearPasteboard]; // æ¸
空ç²è´´æ¿ |
| | | if ([[self.commonMethodManage fetchCurrentVc] isKindOfClass:[SpreadGoodsDetailController class]]) { |
| | | [(SpreadGoodsDetailController *)[self.commonMethodManage fetchCurrentVc] redHongBaoDisMiss]; |
| | |
| | | [self.searchCouponView show]; |
| | | } |
| | | |
| | | - (void)guessLikeSimilarityPopView:(NSDictionary *)dictionary { |
| | | - (void)guessLikeSimilarityPopView:(NSDictionary *)dictionary :(nonnull void (^)(BOOL))completeBlock { |
| | | [self.guessLikeSimilarityPopView dismiss]; |
| | | self.guessLikeSimilarityPopView = [[GuessLikeSimilarityPopView alloc] initWithSearchData:dictionary[@"data"]]; |
| | | @weakify(self) |
| | | self.guessLikeSimilarityPopView.hasIndex = ^(NSInteger index) { |
| | | @strongify(self) |
| | | if (index == 790) {//å
³é |
| | | completeBlock(YES); |
| | | [self.guessLikeSimilarityPopView dismiss]; |
| | | self.guessLikeSimilarityPopView = nil; |
| | | [self clearPasteboard];//æ¸
空ç²è´´æ¿ |
| | | |
| | | } else { |
| | | completeBlock(YES); |
| | | [self.guessLikeSimilarityPopView dismiss]; |
| | | self.guessLikeSimilarityPopView = nil; |
| | | [self clearPasteboard]; |
| | |
| | | [self.guessLikeSimilarityPopView show]; |
| | | } |
| | | |
| | | - (void)homeMDLingQuView:(NSDictionary *)dictionary { |
| | | - (void)homeMDLingQuView:(NSDictionary *)dictionary :(nonnull void (^)(BOOL))completeBlock { |
| | | NSInteger type = [dictionary[@"data"][@"type"] integerValue]; |
| | | [self.homeMDLingQuView disAllMis]; |
| | | if (type == 10) { |
| | |
| | | self.homeMDLingQuView.hasIndex = ^(NSInteger index) { |
| | | @strongify(self) |
| | | if (index == 790) { // å
³é |
| | | completeBlock(YES); |
| | | [self clearPasteboard]; // æ¸
空ç²è´´æ¿ |
| | | |
| | | } else { |
| | |
| | | [[ALNetWorking startInterface] Post:[NSString stringWithFormat:@"%@/%@",domainHTTP2,@"search/tokenReceive"] param:params success:^(NSDictionary *object) { |
| | | @strongify(self) |
| | | if ([object[@"error_code"] integerValue] == 0) { |
| | | completeBlock(YES); |
| | | [self clearPasteboard]; // æ¸
空ç²è´´æ¿ |
| | | [self.homeMDLingQuView disAllMis]; |
| | | if (type == 13) { |
| | |
| | | }; |
| | | } |
| | | |
| | | - (void)homeMDWuXiaoView:(NSDictionary *)dictionary { |
| | | - (void)homeMDWuXiaoView:(NSDictionary *)dictionary :(nonnull void (^)(BOOL))completeBlock { |
| | | NSInteger type = [dictionary[@"data"][@"type"] integerValue]; |
| | | [self.homeMDWuXiaoView disAllMis]; |
| | | if (type == 10) { |
| | |
| | | @strongify(self) |
| | | if (index == 790) { // å
³é |
| | | [self clearPasteboard]; // æ¸
空ç²è´´æ¿ |
| | | completeBlock(YES); |
| | | |
| | | } else { |
| | | completeBlock(YES); |
| | | [self clearPasteboard]; // æ¸
空ç²è´´æ¿ |
| | | [self.homeMDWuXiaoView disAllMis]; |
| | | } |
| | | }; |
| | | } |
| | | |
| | | - (void)GuessLikeTurnToLinkPopView:(NSDictionary *)dictionary { |
| | | - (void)GuessLikeTurnToLinkPopView:(NSDictionary *)dictionary :(nonnull void (^)(BOOL))completeBlock { |
| | | [self.guessLikeTurnToLinkPopView dismiss]; |
| | | self.guessLikeTurnToLinkPopView = [[GuessLikeTurnToLinkPopView alloc] initWithSearchData:dictionary[@"data"]]; |
| | | @weakify(self) |
| | |
| | | @strongify(self) |
| | | if (index == 790) {//å
³é |
| | | //æ¸
空ç²è´´æ¿ |
| | | completeBlock(YES); |
| | | [self clearPasteboard]; |
| | | [self.guessLikeTurnToLinkPopView dismiss]; |
| | | |
| | |
| | | ALToastCenter(object[@"data"]); |
| | | } |
| | | } |
| | | completeBlock(YES); |
| | | [self.guessLikeTurnToLinkPopView dismiss]; |
| | | }); |
| | | |
| | |
| | | |
| | | } else if (state == 3) { |
| | | [self.commonMethodManage pushController:dictionary[@"data"][@"data"][@"guessLike"][@"jumpDetail"] params:dictionary[@"data"][@"data"][@"guessLike"][@"params"] typePush:^(BOOL other) {}]; |
| | | completeBlock(YES); |
| | | [self.guessLikeTurnToLinkPopView dismiss]; |
| | | } |
| | | |
| | |
| | | |
| | | [self.commonMethodManage pushController:dictionary[@"data"][@"data"][@"view"][@"jumpDetail"] params:dictionary[@"data"][@"data"][@"view"][@"params"] typePush:^(BOOL other) {}]; |
| | | } |
| | | completeBlock(YES); |
| | | [self.guessLikeTurnToLinkPopView dismiss]; |
| | | } |
| | | }; |
| | |
| | | @property (nonatomic, nullable, strong) HomeManage *homeManage; |
| | | /// åå
¥æä»¶ |
| | | @property (nonatomic, nullable, strong) PlistFileOperator *plist; |
| | | |
| | | /// ç²è´´æ¿å
容æ¯å¦å·²å°å¼¹åº |
| | | @property (nonatomic, assign) BOOL isboardShow; |
| | | @end |
| | | |
| | | @implementation NEWHomeViewController |
| | |
| | | [self.navigationController.navigationBar setShadowImage:[[UIImage alloc] init]]; |
| | | |
| | | [self getMessage]; |
| | | [self checkPasteboardIsHaveContent]; |
| | | |
| | | // å»¶æ¶æ£æµ |
| | | dispatch_time_t timer = dispatch_time(DISPATCH_TIME_NOW, 1 * NSEC_PER_SEC); |
| | | dispatch_after(timer, dispatch_get_main_queue(), ^{ |
| | | [self checkPasteboardIsHaveContent]; |
| | | }); |
| | | } |
| | | |
| | | - (void)viewWillDisappear:(BOOL)animated { |
| | |
| | | self.tabbar = (XHTabBarController *)[UIApplication sharedApplication].keyWindow.rootViewController; |
| | | self.tabbar.xhTabBarDelegate = self; |
| | | |
| | | [self onLoadLauchImage]; |
| | | // [self loadHomePopUpView]; |
| | | |
| | | [self.view addSubview:self.noNetworkViews]; |
| | | |
| | | NSDictionary *sourceDic = [[NSUserDefaults standardUserDefaults] objectForKey:@"ChangeTaobaolinks"]; |
| | |
| | | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(guessYouLike:) name:@"GUESSYOULIKE" object:nil]; |
| | | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onHomeExpand) name:@"homeExpand" object:nil]; |
| | | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(hideHomeHotReMen) name:@"hideHomeHotReMen" object:nil]; |
| | | // 广åä¸å
³é |
| | | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onSplashAdClosed) name:@"splashAdClosed" object:nil]; |
| | | // å¼å¯¼é¡µå夿¶å¤± |
| | | [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onLaunchIntroductionViewHide) name:@"launchIntroductionViewHide" object:nil]; |
| | | // å¼å¯¼é¡µå·²ç»æ¶å¤± |
| | |
| | | |
| | | - (void)checkPasteboardIsHaveContent { |
| | | UIPasteboard *board = [UIPasteboard generalPasteboard]; |
| | | if (board.string) { |
| | | if ([self isHaveValue:board.string]) { |
| | | NSNotification *notica = [[NSNotification alloc] initWithName:@"GUESSYOULIKE" object:board.string userInfo:nil]; |
| | | [self guessYouLike:notica]; |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | - (void)onLoadLauchImage { |
| | | [self loadHomePopUpView]; |
| | | } |
| | | |
| | | - (void)loadHomePopUpView { |
| | | self.plist.dataName = @"LaunchIntroductionViewShow"; |
| | | NSString *stringType = [self.plist readFile][0]; |
| | | if ([self isFirstLauchAPP] || [stringType isEqualToString:@"0"]) { |
| | | if ([stringType isEqualToString:@"0"]) { |
| | | return; |
| | | } |
| | | [self.homePopUpView removeFromSuperview]; |
| | |
| | | } |
| | | } |
| | | } |
| | | if ([self isFirstLauchAPP]) { |
| | | return; |
| | | } |
| | | //if ([self isFirstLauchAPP]) { |
| | | // return; |
| | | //} |
| | | //ç¨æ·åè®®(æ¯å¦åæè¿ç¨æ·åè®®) |
| | | if (![self popUserInfoProtocol]) { |
| | | return; |
| | |
| | | |
| | | - (void)showAppUpdateViewView { |
| | | self.appUpdateView.appUpdateData = [YTHsharedManger startManger].dictionaryUpdate; |
| | | [self.appUpdateView show]; |
| | | [self.appUpdateView show:self.view]; |
| | | @weakify(self) |
| | | self.appUpdateView.touchUpdate = ^{ |
| | | @strongify(self) |
| | |
| | | - (void)guessYouLike:(NSNotification *)notice { |
| | | self.plist.dataName = @"LaunchIntroductionViewShow"; |
| | | NSString *stringType = [self.plist readFile][0]; |
| | | if ([self isFirstLauchBoard] || [stringType isEqualToString:@"0"] || ![self popUserInfoProtocol] || ![self popAppUpdateData]) { |
| | | if ([self isFirstLauchBoard] || [stringType isEqualToString:@"0"] || [YTHsharedManger startManger].isShowSplash || ![self popUserInfoProtocol]) { |
| | | return; |
| | | } |
| | | [UMCustom umMain_tbgoods_recommend]; |
| | |
| | | if ([ALUserInfoServiceManger fetchUID]) { |
| | | [params setObject:[ALUserInfoServiceManger fetchUID] forKey:@"uid"]; |
| | | } |
| | | //[params setObject:@"https://detail.vip.com/detail-1710614229-6918666114614454357.html" forKey:@"text"]; |
| | | [params setObject:notice.object?:@"" forKey:@"text"]; |
| | | @weakify(self) |
| | | [JYNetWorking Post:[NSString stringWithFormat:@"%@/%@",domainHTTP2,@"search/getRecommendInfo"] param:params success:^(NSDictionary *object) |
| | |
| | | @strongify(self) |
| | | if (object && [object[@"code"] integerValue] == 0) { |
| | | NSInteger type = [object[@"data"][@"type"] integerValue]; |
| | | if ([YTHsharedManger startManger].isShowSplash || self.isboardShow) { |
| | | return; |
| | | } |
| | | |
| | | if (type == 3) { // 龿¥ |
| | | if ([self.homeManage isCompareController]) { |
| | | [self.homeManage guessLikeUrlPopView:object]; |
| | | self.isboardShow = YES; |
| | | [self.homeManage guessLikeUrlPopView:object :^(BOOL result) { |
| | | self.isboardShow = !result; |
| | | }]; |
| | | } |
| | | |
| | | } else if (type == 2) { // æ é¢ |
| | | if ([self.homeManage isCompareController]) { |
| | | [self.homeManage searchCouponView:object]; |
| | | self.isboardShow = YES; |
| | | [self.homeManage searchCouponView:object :^(BOOL result) { |
| | | self.isboardShow = !result; |
| | | }]; |
| | | } |
| | | |
| | | } else if (type == 4) { |
| | | if ([self.homeManage isCompareController]) { |
| | | [self.homeManage guessLikeSimilarityPopView:object]; |
| | | self.isboardShow = YES; |
| | | [self.homeManage guessLikeSimilarityPopView:object :^(BOOL result) { |
| | | self.isboardShow = !result; |
| | | }]; |
| | | } |
| | | |
| | | } else if (type == 20) {//è½¬é¾ |
| | | if ([self.homeManage isCompareController]) { |
| | | [self.homeManage GuessLikeTurnToLinkPopView:object]; |
| | | self.isboardShow = YES; |
| | | [self.homeManage GuessLikeTurnToLinkPopView:object :^(BOOL result) { |
| | | self.isboardShow = !result; |
| | | }]; |
| | | } |
| | | |
| | | } else { |
| | | if ([object[@"data"][@"state"] boolValue]) { // ææï¼ç¡®è®¤é¢å "state": true, // ææï¼ç¡®è®¤é¢å |
| | | [self.homeManage homeMDLingQuView:object]; |
| | | self.isboardShow = YES; |
| | | [self.homeManage homeMDLingQuView:object :^(BOOL result) { |
| | | self.isboardShow = !result; |
| | | }]; |
| | | |
| | | } else { |
| | | [self.homeManage homeMDWuXiaoView:object]; |
| | | self.isboardShow = YES; |
| | | [self.homeManage homeMDWuXiaoView:object :^(BOOL result) { |
| | | self.isboardShow = !result; |
| | | }]; |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | - (void)onLaunchIntroductionViewDidHide { |
| | | if ([self isHaveValue:self.arrayPopData]) { |
| | | //ç¨æ·åè®®(æ¯å¦åæè¿ç¨æ·åè®®) |
| | | if (![self popUserInfoProtocol]) { |
| | | return; |
| | | } |
| | | //ç¨æ·æ¯å¦æ¯é¦æ¬¡ä¸è½½å¹¶å®è£
ï¼å¸è½½åéæ°å®è£
ï¼2ï¼åçº§çæ¬åï¼é¦æ¬¡æå¼ |
| | | if ([self isFirstLauchGuidePage]) { |
| | | [self newPersonGuidePageShow]; |
| | | return; |
| | | } |
| | | |
| | | [self homePopFloatImageView]; |
| | | |
| | | } else { |
| | | if (_isNetWorking) { |
| | | [self loadHomePopUpView]; |
| | | } |
| | | //if ([self isHaveValue:self.arrayPopData]) { |
| | | //ç¨æ·åè®®(æ¯å¦åæè¿ç¨æ·åè®®) |
| | | // if (![self popUserInfoProtocol]) { |
| | | // return; |
| | | // } |
| | | //ç¨æ·æ¯å¦æ¯é¦æ¬¡ä¸è½½å¹¶å®è£
ï¼å¸è½½åéæ°å®è£
ï¼2ï¼åçº§çæ¬åï¼é¦æ¬¡æå¼ |
| | | // if ([self isFirstLauchGuidePage]) { |
| | | // [self newPersonGuidePageShow]; |
| | | // return; |
| | | // } |
| | | |
| | | // [self homePopFloatImageView]; |
| | | |
| | | //} else { |
| | | if (_isNetWorking) { |
| | | [self loadHomePopUpView]; |
| | | } |
| | | //} |
| | | } |
| | | |
| | | - (void)onSplashAdClosed { |
| | | [self loadHomePopUpView]; |
| | | [self checkPasteboardIsHaveContent]; |
| | | } |
| | | |
| | | - (BOOL)isFirstLauch { |
| | |
| | | maskLayer.path = maskPath.CGPath; |
| | | self.labelMaxFan.layer.mask = maskLayer; |
| | | }; |
| | | if (model.moneyInfo.maxMoney && ![model.moneyInfo.maxMoney isEqualToString:@""] && model.shopType != 40) { |
| | | if (model.moneyInfo.maxMoney && ![model.moneyInfo.maxMoney isEqualToString:@""]) { |
| | | self.imageSanJiao.hidden = NO; |
| | | self.labelMaxFan.hidden = NO; |
| | | |
| | |
| | | @property (nonatomic, nullable, strong) UILabel *couponLabel; |
| | | @property (nonatomic, strong) UIView *quanView; |
| | | @property (nonatomic, strong) UILabel *quanLabel; |
| | | /// ææ |
| | | @property (nonatomic, nullable, strong) UILabel *labelDisCount; |
| | | ///è¿å©æ¯ |
| | | @property (nonatomic, nullable, strong) UILabel *labelRebateRatio; |
| | | |
| | |
| | | |
| | | @implementation GuessLikeUrlPopView |
| | | |
| | | - (instancetype)initWithSearchData:(GoodsDetailBaseModel *)model |
| | | { |
| | | - (instancetype)initWithSearchData:(GoodsDetailBaseModel *)model { |
| | | self = [super init]; |
| | | if (self) { |
| | | self.frame = CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); |
| | |
| | | [self.backgroundsView addSubview:self.salesLabel]; |
| | | self.salesLabel.sd_layout.leftSpaceToView(self.orginLabel, 8).bottomEqualToView(self.priceLabel).heightIs(11).rightSpaceToView(self.backgroundsView, 0); |
| | | [self.salesLabel setMaxNumberOfLinesToShow:1]; |
| | | |
| | | NSString *salesString = nil; |
| | | if (self.model.salesType == 1) { |
| | | salesString = @"æé"; |
| | |
| | | } else if (self.model.salesType == 4) { |
| | | salesString = @"æ»éé"; |
| | | } |
| | | self.salesLabel.text = [NSString stringWithFormat:@"%@ %@",salesString, self.model.salesCount]; |
| | | if (_model.goodsType != 4) { |
| | | self.salesLabel.text = [NSString stringWithFormat:@"%@ %@",salesString, self.model.salesCount]; |
| | | } |
| | | |
| | | NSDictionary *attribtDic = @{NSStrikethroughStyleAttributeName: [NSNumber numberWithInteger:NSUnderlineStyleSingle]}; |
| | | NSMutableAttributedString *attribtStr = [[NSMutableAttributedString alloc]initWithString:[NSString stringWithFormat:@"Â¥%@",self.model.zkPrice] attributes:attribtDic]; |
| | | self.orginLabel.attributedText = attribtStr; |
| | | |
| | | NSString *totalPriceString = nil; |
| | | if (self.model.hasCoupon) { |
| | | totalPriceString = [NSString stringWithFormat:@"%@", self.model.couponPrice]; |
| | | |
| | | if (_model.goodsType != 4) { |
| | | if (self.model.hasCoupon) { |
| | | totalPriceString = [NSString stringWithFormat:@"%@", self.model.couponPrice]; |
| | | |
| | | } else { |
| | | totalPriceString = [NSString stringWithFormat:@"%@", self.model.zkPrice]; |
| | | } |
| | | |
| | | } else { |
| | | totalPriceString = [NSString stringWithFormat:@"%@", self.model.zkPrice]; |
| | | totalPriceString = [NSString stringWithFormat:@"%@", self.model.couponPrice]; |
| | | } |
| | | |
| | | self.priceLabel.text = totalPriceString; |
| | | |
| | | // è¿å© |
| | |
| | | |
| | | [self.quanView addSubview:self.couponLabel]; |
| | | self.couponLabel.sd_layout.leftSpaceToView(self.quanLabel, 0).rightSpaceToView(self.quanView, 0).topSpaceToView(self.quanView, 0).bottomSpaceToView(self.quanView, 0); |
| | | |
| | | // ææ£ |
| | | [self.backgroundsView addSubview:self.labelDisCount]; |
| | | self.labelDisCount.sd_layout.leftSpaceToView(self.titleImageView, 10).bottomSpaceToView(self.fanLabel, 4).heightIs(0).widthIs(0); |
| | | self.labelDisCount.sd_cornerRadius = @3; |
| | | |
| | | |
| | | // è¿å©æ¯ |
| | | [self.backgroundsView addSubview:self.labelRebateRatio]; |
| | | self.labelRebateRatio.sd_layout.leftSpaceToView(self.quanView, 7).bottomSpaceToView(self.fanLabel, 7).autoWidthRatio(0).heightIs(10); |
| | | [self.labelRebateRatio setSingleLineAutoResizeWithMaxWidth:200]; |
| | | |
| | | self.labelRebateRatio.text = @"è¿å©æ¯20.00%"; |
| | | self.labelRebateRatio.text = [NSString stringWithFormat:@"%@",_model.moneyInfo.rateInfo]; |
| | | |
| | | NSString *fanLiString = nil; |
| | | if (self.model.moneyInfo.moneyType == 1) { |
| | | self.fanLabel.textColor = UIColorFromRGBValue(0xE5005C); |
| | | self.fanLabel.backgroundColor = UIColorFromRGBValue(0xFFE7F1); |
| | | fanLiString = [NSString stringWithFormat:@"è¿ %@",self.model.moneyInfo.fanliMoney]; |
| | | |
| | | } else { |
| | | self.fanLabel.textColor = UIColorFromRGBValue(0xFF7800); |
| | | self.fanLabel.backgroundColor = UIColorFromRGBValue(0xFFE5C5); |
| | | fanLiString = [NSString stringWithFormat:@"å¥ %@",self.model.moneyInfo.fanliMoney]; |
| | | } |
| | | |
| | | self.fanLabel.textColor = UIColorFromRGBValue(0xE5005C); |
| | | self.fanLabel.backgroundColor = UIColorFromRGBValue(0xFFE7F1); |
| | | fanLiString = [NSString stringWithFormat:@"è¿ %@",self.model.moneyInfo.fanliMoney]; |
| | | |
| | | CGFloat fanLabelWidth = [self getWidthWithText:fanLiString height:18 font:self.fanLabel.font.pointSize]; |
| | | self.fanLabel.text = fanLiString; |
| | |
| | | self.labelMaxFan.hidden = YES; |
| | | } |
| | | |
| | | if (self.model.hasCoupon) { |
| | | self.quanView.hidden = NO; |
| | | NSString *couponCountStr = [NSString stringWithFormat:@"Â¥ %@",self.model.couponInfo.amount]; |
| | | CGFloat labelWidth = [self getWidthWithText:couponCountStr height:self.couponLabel.bounds.size.height font:self.couponLabel.font.pointSize]; |
| | | self.couponLabel.text = couponCountStr; |
| | | CGFloat quanHeight = 15; |
| | | self.quanView.sd_resetLayout.leftSpaceToView(self.titleImageView, 10).bottomSpaceToView(self.fanLabel, 4).heightIs(quanHeight).widthIs(labelWidth + quanHeight + 2 + 12); |
| | | if (_model.goodsType != 4) { |
| | | if (self.model.hasCoupon) { |
| | | self.quanView.hidden = NO; |
| | | NSString *couponCountStr = [NSString stringWithFormat:@"Â¥ %@",self.model.couponInfo.amount]; |
| | | CGFloat labelWidth = [self getWidthWithText:couponCountStr height:self.couponLabel.bounds.size.height font:self.couponLabel.font.pointSize]; |
| | | self.couponLabel.text = couponCountStr; |
| | | CGFloat quanHeight = 15; |
| | | self.quanView.sd_resetLayout.leftSpaceToView(self.titleImageView, 10).bottomSpaceToView(self.fanLabel, 4).heightIs(quanHeight).widthIs(labelWidth + quanHeight + 2 + 12); |
| | | |
| | | } else { |
| | | self.quanView.hidden = YES; |
| | | totalPriceString = [NSString stringWithFormat:@"%@", self.model.zkPrice]; |
| | | |
| | | self.labelRebateRatio.sd_resetLayout.leftSpaceToView(self.titleImageView, 10).bottomSpaceToView(self.fanLabel, 7).autoWidthRatio(0).heightIs(10); |
| | | [self.labelRebateRatio setSingleLineAutoResizeWithMaxWidth:200]; |
| | | } |
| | | |
| | | } else { |
| | | self.quanView.hidden = YES; |
| | | totalPriceString = [NSString stringWithFormat:@"%@", self.model.zkPrice]; |
| | | |
| | | self.labelRebateRatio.sd_resetLayout.leftSpaceToView(self.titleImageView, 10).bottomSpaceToView(self.fanLabel, 7).autoWidthRatio(0).heightIs(10); |
| | | CGFloat widthDisCount = [self getWidthWithText:_model.discount height:15 font:10]; |
| | | self.labelDisCount.text = _model.discount; |
| | | self.labelDisCount.sd_resetLayout.leftSpaceToView(self.titleImageView, 10).bottomSpaceToView(self.fanLabel, 4).heightIs(15).widthIs(widthDisCount + 10); |
| | | |
| | | self.labelRebateRatio.sd_resetLayout.leftSpaceToView(self.labelDisCount, 10).bottomSpaceToView(self.fanLabel, 7).autoWidthRatio(0).heightIs(10); |
| | | [self.labelRebateRatio setSingleLineAutoResizeWithMaxWidth:200]; |
| | | } |
| | | |
| | | |
| | | |
| | | [self.backgroundsView addSubview:self.pushGoLookButton]; |
| | | self.pushGoLookButton.sd_layout.leftSpaceToView(self.backgroundsView, 30).topSpaceToView(self.titleImageView, 30).rightSpaceToView(self.backgroundsView, 30).heightIs(40); |
| | |
| | | } |
| | | |
| | | - (UILabel *)salesLabel { |
| | | |
| | | if (!_salesLabel) { |
| | | _salesLabel = [[UILabel alloc] init]; |
| | | _salesLabel.textColor = UIColorFromRGBValue(0xAAAAAA); |
| | | _salesLabel.font = [UIFont systemFontOfSize:10]; |
| | | _salesLabel.textAlignment = NSTextAlignmentLeft; |
| | | if (SCREEN_WIDTH < 375) { |
| | | _salesLabel.font = [UIFont systemFontOfSize:10 - DYFont]; |
| | | } |
| | | } |
| | | return _salesLabel; |
| | | } |
| | |
| | | _quanView.layer.cornerRadius = 3; |
| | | return _quanView; |
| | | } |
| | | |
| | | - (UILabel *)quanLabel{ |
| | | if (_quanLabel) { |
| | | return _quanLabel; |
| | |
| | | return _couponLabel; |
| | | } |
| | | |
| | | |
| | | - (UILabel *)labelDisCount { |
| | | if (!_labelDisCount) { |
| | | _labelDisCount = [[UILabel alloc] init]; |
| | | _labelDisCount.font = [UIFont systemFontOfSize:10]; |
| | | _labelDisCount.textColor = [UIColor whiteColor]; |
| | | _labelDisCount.backgroundColor = XYRMainColor; |
| | | _labelDisCount.textAlignment = NSTextAlignmentCenter; |
| | | } |
| | | return _labelDisCount; |
| | | } |
| | | |
| | | - (UILabel *)fanLabel { |
| | | |
| | | if (!_fanLabel) { |
| | |
| | | <key>CRBoxInputView.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | | <key>orderHint</key> |
| | | <integer>23</integer> |
| | | <integer>1</integer> |
| | | </dict> |
| | | <key>GPUImage.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | | <key>orderHint</key> |
| | | <integer>17</integer> |
| | | <integer>15</integer> |
| | | </dict> |
| | | <key>IQKeyboardManager.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | | <key>orderHint</key> |
| | | <integer>26</integer> |
| | | <integer>27</integer> |
| | | </dict> |
| | | <key>MBProgressHUD.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | |
| | | <key>MJRefresh.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | | <key>orderHint</key> |
| | | <integer>22</integer> |
| | | <integer>25</integer> |
| | | </dict> |
| | | <key>Masonry.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | | <key>orderHint</key> |
| | | <integer>2</integer> |
| | | <integer>17</integer> |
| | | </dict> |
| | | <key>Pods-MIduo.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | | <key>orderHint</key> |
| | | <integer>15</integer> |
| | | <integer>4</integer> |
| | | </dict> |
| | | <key>ReactiveCocoa.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | | <key>orderHint</key> |
| | | <integer>20</integer> |
| | | <integer>2</integer> |
| | | </dict> |
| | | <key>SAMKeychain.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | | <key>orderHint</key> |
| | | <integer>21</integer> |
| | | <integer>11</integer> |
| | | </dict> |
| | | <key>SDAutoLayout.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | | <key>orderHint</key> |
| | | <integer>14</integer> |
| | | <integer>19</integer> |
| | | </dict> |
| | | <key>SDWebImage.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | | <key>orderHint</key> |
| | | <integer>7</integer> |
| | | <integer>6</integer> |
| | | </dict> |
| | | <key>SVProgressHUD.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | | <key>orderHint</key> |
| | | <integer>4</integer> |
| | | <integer>13</integer> |
| | | </dict> |
| | | <key>TYSnapshotScroll.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | | <key>orderHint</key> |
| | | <integer>8</integer> |
| | | <integer>5</integer> |
| | | </dict> |
| | | <key>TZImagePickerController.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | | <key>orderHint</key> |
| | | <integer>6</integer> |
| | | <integer>9</integer> |
| | | </dict> |
| | | <key>Toast.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | | <key>orderHint</key> |
| | | <integer>5</integer> |
| | | <integer>24</integer> |
| | | </dict> |
| | | <key>UICollectionViewLeftAlignedLayout.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | | <key>orderHint</key> |
| | | <integer>11</integer> |
| | | <integer>3</integer> |
| | | </dict> |
| | | <key>UICountingLabel.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | | <key>orderHint</key> |
| | | <integer>9</integer> |
| | | <integer>23</integer> |
| | | </dict> |
| | | <key>YYCache.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | | <key>orderHint</key> |
| | | <integer>10</integer> |
| | | <integer>8</integer> |
| | | </dict> |
| | | <key>YYImage.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | | <key>orderHint</key> |
| | | <integer>13</integer> |
| | | <integer>26</integer> |
| | | </dict> |
| | | <key>YYModel.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | | <key>orderHint</key> |
| | | <integer>1</integer> |
| | | <integer>10</integer> |
| | | </dict> |
| | | <key>YYText.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | | <key>orderHint</key> |
| | | <integer>25</integer> |
| | | <integer>14</integer> |
| | | </dict> |
| | | <key>YYWebImage.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | | <key>orderHint</key> |
| | | <integer>3</integer> |
| | | <integer>22</integer> |
| | | </dict> |
| | | <key>mob_sharesdk-ShareSDK.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | |
| | | <key>mob_sharesdk-ShareSDK_JS_QQ.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | | <key>orderHint</key> |
| | | <integer>24</integer> |
| | | <integer>7</integer> |
| | | </dict> |
| | | <key>mob_sharesdk-ShareSDK_JS_SinaWeibo.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | | <key>orderHint</key> |
| | | <integer>19</integer> |
| | | <integer>20</integer> |
| | | </dict> |
| | | <key>mob_sharesdk-ShareSDK_JS_WeChat.xcscheme_^#shared#^_</key> |
| | | <dict> |
| | | <key>orderHint</key> |
| | | <integer>27</integer> |
| | | <integer>21</integer> |
| | | </dict> |
| | | </dict> |
| | | </dict> |