Compare commits
23 Commits
2.1.3
...
ent_v1.1.0
Author | SHA1 | Date | |
---|---|---|---|
![]() |
db05952122 | ||
![]() |
c5d88e0d9e | ||
![]() |
8715a53481 | ||
![]() |
d44f97f376 | ||
![]() |
5b92f6657f | ||
![]() |
f6c53e8d35 | ||
![]() |
02679b6db7 | ||
![]() |
4b263646f2 | ||
![]() |
4f7a0b6341 | ||
![]() |
36d386bd62 | ||
![]() |
1aa7a5ead8 | ||
![]() |
c17576b974 | ||
![]() |
0f1ac77035 | ||
![]() |
da93ac2585 | ||
![]() |
c1f1020bf1 | ||
![]() |
39646fd7dd | ||
![]() |
fd4292bdb5 | ||
![]() |
4ab4d0b3d2 | ||
![]() |
c116928890 | ||
![]() |
b7e47123da | ||
![]() |
1ba5f41eab | ||
![]() |
46c9203d57 | ||
![]() |
173bcdb49b |
5
Podfile
@@ -44,7 +44,7 @@ target 'xplan-ios' do
|
||||
#登录的
|
||||
pod 'mob_sharesdk'
|
||||
pod 'mob_sharesdk/ShareSDKPlatforms/QQ'
|
||||
pod 'mob_sharesdk/ShareSDKPlatforms/WeChat'
|
||||
pod 'mob_sharesdk/ShareSDKPlatforms/WeChat_Lite'
|
||||
pod 'mob_sharesdk/ShareSDKPlatforms/Apple'
|
||||
pod 'mob_sharesdk/ShareSDKExtension'
|
||||
pod 'SVGAPlayer', '~> 2.3'
|
||||
@@ -65,6 +65,9 @@ target 'xplan-ios' do
|
||||
pod 'LinkedME_LinkPage'
|
||||
#上传音乐
|
||||
pod 'CocoaAsyncSocket',:modular_headers => true
|
||||
#微信支付,支付宝支付
|
||||
pod 'AlipaySDK-iOS'
|
||||
pod 'WechatOpenSDK'
|
||||
#调试
|
||||
pod 'LookinServer', :configurations => ['Debug']
|
||||
|
||||
|
34
Podfile.lock
@@ -15,6 +15,7 @@ PODS:
|
||||
- AFNetworking/UIKit (4.0.1):
|
||||
- AFNetworking/NSURLSession
|
||||
- AgoraRtcEngine_iOS (3.0.1.1)
|
||||
- AlipaySDK-iOS (15.8.8)
|
||||
- Base64 (1.1.2)
|
||||
- Bugly (2.5.93)
|
||||
- CocoaAsyncSocket (7.6.5)
|
||||
@@ -31,24 +32,24 @@ PODS:
|
||||
- MBProgressHUD (1.2.0)
|
||||
- MJExtension (3.3.0)
|
||||
- MJRefresh (3.7.3)
|
||||
- mob_sharesdk (4.4.2):
|
||||
- mob_sharesdk/ShareSDK (= 4.4.2)
|
||||
- mob_sharesdk (4.4.12):
|
||||
- mob_sharesdk/ShareSDK (= 4.4.12)
|
||||
- MOBFoundation (>= 3.2.9)
|
||||
- mob_sharesdk/ShareSDK (4.4.2):
|
||||
- mob_sharesdk/ShareSDK (4.4.12):
|
||||
- MOBFoundation (>= 3.2.9)
|
||||
- mob_sharesdk/ShareSDKExtension (4.4.2):
|
||||
- mob_sharesdk/ShareSDKExtension (4.4.12):
|
||||
- mob_sharesdk/ShareSDK
|
||||
- MOBFoundation (>= 3.2.9)
|
||||
- mob_sharesdk/ShareSDKPlatforms/Apple (4.4.2):
|
||||
- mob_sharesdk/ShareSDKPlatforms/Apple (4.4.12):
|
||||
- mob_sharesdk/ShareSDK
|
||||
- MOBFoundation (>= 3.2.9)
|
||||
- mob_sharesdk/ShareSDKPlatforms/QQ (4.4.2):
|
||||
- mob_sharesdk/ShareSDKPlatforms/QQ (4.4.12):
|
||||
- mob_sharesdk/ShareSDK
|
||||
- MOBFoundation (>= 3.2.9)
|
||||
- mob_sharesdk/ShareSDKPlatforms/WeChat (4.4.2):
|
||||
- mob_sharesdk/ShareSDKPlatforms/WeChat_Lite (4.4.12):
|
||||
- mob_sharesdk/ShareSDK
|
||||
- MOBFoundation (>= 3.2.9)
|
||||
- MOBFoundation (3.2.27)
|
||||
- MOBFoundation (3.2.44)
|
||||
- NIMSDK_LITE (8.9.110)
|
||||
- NTESBaseComponent (1.4)
|
||||
- NTESQuickPass (3.2.6):
|
||||
@@ -83,6 +84,7 @@ PODS:
|
||||
- UMCommon (7.3.5):
|
||||
- UMDevice
|
||||
- UMDevice (2.0.5)
|
||||
- WechatOpenSDK (1.8.7.1)
|
||||
- YYCache (1.0.4)
|
||||
- YYImage (1.0.4):
|
||||
- YYImage/Core (= 1.0.4)
|
||||
@@ -95,6 +97,7 @@ PODS:
|
||||
DEPENDENCIES:
|
||||
- AFNetworking
|
||||
- AgoraRtcEngine_iOS (~> 3.0.1)
|
||||
- AlipaySDK-iOS
|
||||
- Base64
|
||||
- Bugly
|
||||
- CocoaAsyncSocket
|
||||
@@ -114,7 +117,7 @@ DEPENDENCIES:
|
||||
- mob_sharesdk/ShareSDKExtension
|
||||
- mob_sharesdk/ShareSDKPlatforms/Apple
|
||||
- mob_sharesdk/ShareSDKPlatforms/QQ
|
||||
- mob_sharesdk/ShareSDKPlatforms/WeChat
|
||||
- mob_sharesdk/ShareSDKPlatforms/WeChat_Lite
|
||||
- NIMSDK_LITE (~> 8.9.0)
|
||||
- NTESQuickPass
|
||||
- pop (~> 1.0.12)
|
||||
@@ -131,6 +134,7 @@ DEPENDENCIES:
|
||||
- TZImagePickerController
|
||||
- UMCommon
|
||||
- UMDevice
|
||||
- WechatOpenSDK
|
||||
- YYText
|
||||
- YYWebImage (~> 1.0.5)
|
||||
|
||||
@@ -138,6 +142,7 @@ SPEC REPOS:
|
||||
https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git:
|
||||
- AFNetworking
|
||||
- AgoraRtcEngine_iOS
|
||||
- AlipaySDK-iOS
|
||||
- Base64
|
||||
- Bugly
|
||||
- CocoaAsyncSocket
|
||||
@@ -175,6 +180,7 @@ SPEC REPOS:
|
||||
- TZImagePickerController
|
||||
- UMCommon
|
||||
- UMDevice
|
||||
- WechatOpenSDK
|
||||
- YYCache
|
||||
- YYImage
|
||||
- YYText
|
||||
@@ -183,6 +189,7 @@ SPEC REPOS:
|
||||
SPEC CHECKSUMS:
|
||||
AFNetworking: 3bd23d814e976cd148d7d44c3ab78017b744cd58
|
||||
AgoraRtcEngine_iOS: 8ccceaaecff2e80ab28fcd33f3dfd2b417eb5365
|
||||
AlipaySDK-iOS: 9289d94792535cd14c5c241c720a7e981edd7035
|
||||
Base64: cecfb41a004124895a7bcee567a89bae5a89d49b
|
||||
Bugly: b8715e6ec4004b7f7fbffab0643ba80545aee3da
|
||||
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
|
||||
@@ -199,8 +206,8 @@ SPEC CHECKSUMS:
|
||||
MBProgressHUD: 3ee5efcc380f6a79a7cc9b363dd669c5e1ae7406
|
||||
MJExtension: 01704cca2b60a214c10761b6491eab74069d68a9
|
||||
MJRefresh: ec9c53ff4abf3a9237b4283862f1bd51c2ee3fdb
|
||||
mob_sharesdk: a60006891a079486ff3269ed326adfa05a967c01
|
||||
MOBFoundation: efdc3ce6b843fbc10ae8c1c6122a02b0d845b39b
|
||||
mob_sharesdk: 0f0508e54fc8c0bc00c448ab9b236d6fc9eee105
|
||||
MOBFoundation: 9e9f2275f146ee864f23a881e327744c5e6f0bbd
|
||||
NIMSDK_LITE: 299ff39677d705b91413d14ad352b32a1b0e72fe
|
||||
NTESBaseComponent: 9e97373eec7e5a26c39db26477bf99a37ee9e71a
|
||||
NTESQuickPass: 781bd12ee63681389fe9b646c837fa76e3a00e6e
|
||||
@@ -220,11 +227,12 @@ SPEC CHECKSUMS:
|
||||
TZImagePickerController: 943511626019431372cf908f24c114521e484f0e
|
||||
UMCommon: ab4d875ddefe1b06c60b577e4a58bc4d433ee067
|
||||
UMDevice: c13bbb2e8ca6c67d1e23e03162553e3ec5a8b5b0
|
||||
WechatOpenSDK: 6a4d1436c15b3b5fe2a0bd383f3046010186da44
|
||||
YYCache: 8105b6638f5e849296c71f331ff83891a4942952
|
||||
YYImage: 1e1b62a9997399593e4b9c4ecfbbabbf1d3f3b54
|
||||
YYText: 5c461d709e24d55a182d1441c41dc639a18a4849
|
||||
YYWebImage: 5f7f36aee2ae293f016d418c7d6ba05c4863e928
|
||||
|
||||
PODFILE CHECKSUM: 80e5d8c189fc55c6d05dc07c7cd910f6559c0b38
|
||||
PODFILE CHECKSUM: 1350d4bbe4b1dc436d08543f1b1c7e8bbb3f8ec6
|
||||
|
||||
COCOAPODS: 1.11.3
|
||||
COCOAPODS: 1.12.0
|
||||
|
@@ -64,7 +64,7 @@ platform :ios do
|
||||
desc "2. 发布iOS Release ipa 到 firim 网站"
|
||||
lane :r do
|
||||
CONFIGURATION = "Release"
|
||||
EXPORT_METHOD = "development"
|
||||
EXPORT_METHOD = "ad-hoc"
|
||||
|
||||
archiveAction
|
||||
end
|
||||
|
@@ -22,10 +22,8 @@
|
||||
1497CCE429C1E1FB0015D135 /* sailing_prize_cowry.svga in Resources */ = {isa = PBXBuildFile; fileRef = 1497CCE229C1E1FB0015D135 /* sailing_prize_cowry.svga */; };
|
||||
1497CCE529C1E1FB0015D135 /* sailing_prize.svga in Resources */ = {isa = PBXBuildFile; fileRef = 1497CCE329C1E1FB0015D135 /* sailing_prize.svga */; };
|
||||
14A0CF3B29C014B400B2375A /* moment_living.svga in Resources */ = {isa = PBXBuildFile; fileRef = 14A0CF3A29C014B400B2375A /* moment_living.svga */; };
|
||||
14A0CF3E29C01E8500B2375A /* XPMineNewRechargeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A0CF3D29C01E8500B2375A /* XPMineNewRechargeViewController.m */; };
|
||||
14A0CF4129C01F0400B2375A /* XPMineRechargeCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A0CF4029C01F0400B2375A /* XPMineRechargeCollectionViewCell.m */; };
|
||||
14A0CF4429C022D300B2375A /* XPMineRechargePayCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A0CF4329C022D300B2375A /* XPMineRechargePayCollectionViewCell.m */; };
|
||||
14A0CF4729C0268800B2375A /* XPMinePayTypeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A0CF4629C0268800B2375A /* XPMinePayTypeModel.m */; };
|
||||
14A0CF4A29C0470E00B2375A /* XPMineRechargeHeaderReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A0CF4929C0470E00B2375A /* XPMineRechargeHeaderReusableView.m */; };
|
||||
14A0CF4D29C0511200B2375A /* XPMineRechargeFooterReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A0CF4C29C0511200B2375A /* XPMineRechargeFooterReusableView.m */; };
|
||||
14A0CF5029C0542D00B2375A /* XPMinePayHeaderReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A0CF4F29C0542D00B2375A /* XPMinePayHeaderReusableView.m */; };
|
||||
@@ -673,6 +671,8 @@
|
||||
E82325FC274E4735003A3332 /* XPUserCardItemModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E82325FB274E4735003A3332 /* XPUserCardItemModel.m */; };
|
||||
E8232600274E48EA003A3332 /* XPUserCardItemCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E82325FF274E48EA003A3332 /* XPUserCardItemCollectionViewCell.m */; };
|
||||
E8232603274E4AA0003A3332 /* ThemeColor+UserCard.m in Sources */ = {isa = PBXBuildFile; fileRef = E8232602274E4AA0003A3332 /* ThemeColor+UserCard.m */; };
|
||||
E823E37C290BB1FD00EADD86 /* XPNobleRechargeView.m in Sources */ = {isa = PBXBuildFile; fileRef = E823E37B290BB1FD00EADD86 /* XPNobleRechargeView.m */; };
|
||||
E823E37F290BB54F00EADD86 /* XPNobleRechargeTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E823E37E290BB54F00EADD86 /* XPNobleRechargeTableViewCell.m */; };
|
||||
E823E38E290BE8BD00EADD86 /* WishGiftInfoUpdateModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E823E38D290BE8BD00EADD86 /* WishGiftInfoUpdateModel.m */; };
|
||||
E824543526F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E824543426F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.m */; };
|
||||
E824543826F5820A00BE8163 /* XPLoginVerifBindPhonePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E824543726F5820A00BE8163 /* XPLoginVerifBindPhonePresenter.m */; };
|
||||
@@ -699,6 +699,8 @@
|
||||
E82D5C76276AEB5100858D6D /* NameplateModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E82D5C75276AEB5100858D6D /* NameplateModel.m */; };
|
||||
E82D5C7A276B25D100858D6D /* SpriteSheetImageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E82D5C79276B25D100858D6D /* SpriteSheetImageManager.m */; };
|
||||
E82D5C7D276B343300858D6D /* YYAnimatedImageView+ImageShow.m in Sources */ = {isa = PBXBuildFile; fileRef = E82D5C7C276B343300858D6D /* YYAnimatedImageView+ImageShow.m */; };
|
||||
E82E19E929C1D43400AB4DF2 /* XPMineNewRechargeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E82E19E829C1D43300AB4DF2 /* XPMineNewRechargeViewController.m */; };
|
||||
E82E19EC29C1D43D00AB4DF2 /* XPMinePayTypeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E82E19EA29C1D43D00AB4DF2 /* XPMinePayTypeModel.m */; };
|
||||
E82E74FD2828B23D00C25EF7 /* xplan-ios.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = E82E74FB2828B23D00C25EF7 /* xplan-ios.xcdatamodeld */; };
|
||||
E82E75062828E76400C25EF7 /* XPCoreDataManager.m in Sources */ = {isa = PBXBuildFile; fileRef = E82E75052828E76400C25EF7 /* XPCoreDataManager.m */; };
|
||||
E82EE0F8272FDDFA00D15DC1 /* UserPrivacyView.m in Sources */ = {isa = PBXBuildFile; fileRef = E82EE0F7272FDDFA00D15DC1 /* UserPrivacyView.m */; };
|
||||
@@ -715,6 +717,16 @@
|
||||
E839533C276A0CCD00CF2F24 /* XPMineCarTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E839533B276A0CCD00CF2F24 /* XPMineCarTableViewCell.m */; };
|
||||
E839533F276A0CDB00CF2F24 /* XPMineNameplateTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E839533E276A0CDB00CF2F24 /* XPMineNameplateTableViewCell.m */; };
|
||||
E839806B290288660084BFC8 /* XPMessageInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E839806A290288660084BFC8 /* XPMessageInfoModel.m */; };
|
||||
E83A2A37282F4E85002AD58F /* XPMineRechargeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E83A2A36282F4E85002AD58F /* XPMineRechargeViewController.m */; };
|
||||
E83A2A3A282F4EA7002AD58F /* XPEnterpriseRechargePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E83A2A39282F4EA7002AD58F /* XPEnterpriseRechargePresenter.m */; };
|
||||
E83A2A3E282F4ED3002AD58F /* Api+EnterpriseRecharge.m in Sources */ = {isa = PBXBuildFile; fileRef = E83A2A3D282F4ED3002AD58F /* Api+EnterpriseRecharge.m */; };
|
||||
E83A2A41282F4EFA002AD58F /* EnterpriseRechargeListInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E83A2A40282F4EFA002AD58F /* EnterpriseRechargeListInfoModel.m */; };
|
||||
E83A2A46282F5662002AD58F /* XPEnterpriseRechargeHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = E83A2A45282F5662002AD58F /* XPEnterpriseRechargeHeaderView.m */; };
|
||||
E83A2A4C282F5B6A002AD58F /* XPEnterpriseChargeTypeTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E83A2A4B282F5B6A002AD58F /* XPEnterpriseChargeTypeTableViewCell.m */; };
|
||||
E83A2A4F282F5B95002AD58F /* XPEnterpriseChargeListTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E83A2A4E282F5B95002AD58F /* XPEnterpriseChargeListTableViewCell.m */; };
|
||||
E83A2A52282F5BBA002AD58F /* XPEnterpriseChargeListCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E83A2A51282F5BBA002AD58F /* XPEnterpriseChargeListCollectionViewCell.m */; };
|
||||
E83A2A55282F5C50002AD58F /* XPEnterpriseRechargeFootView.m in Sources */ = {isa = PBXBuildFile; fileRef = E83A2A54282F5C50002AD58F /* XPEnterpriseRechargeFootView.m */; };
|
||||
E83A2A58282F8590002AD58F /* EnterPrieseRechargeTypeItemModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E83A2A57282F8590002AD58F /* EnterPrieseRechargeTypeItemModel.m */; };
|
||||
E83ABEF6280E9AD800322EE4 /* MessageContentUnSupportView.m in Sources */ = {isa = PBXBuildFile; fileRef = E83ABEF5280E9AD800322EE4 /* MessageContentUnSupportView.m */; };
|
||||
E83ABEF9280EAF3F00322EE4 /* MessageContentOpenLiveView.m in Sources */ = {isa = PBXBuildFile; fileRef = E83ABEF8280EAF3F00322EE4 /* MessageContentOpenLiveView.m */; };
|
||||
E83ABEFD280EB5E200322EE4 /* ContentOpenLiveInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E83ABEFC280EB5E200322EE4 /* ContentOpenLiveInfoModel.m */; };
|
||||
@@ -742,6 +754,7 @@
|
||||
E84150C527747E0900A7F548 /* FirstRechargeRewardModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E84150C427747E0900A7F548 /* FirstRechargeRewardModel.m */; };
|
||||
E841ED61280FB0BD00904808 /* ContentLevelUpgradeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E841ED60280FB0BD00904808 /* ContentLevelUpgradeModel.m */; };
|
||||
E844D7B729C07795008A0EB2 /* XPRoomMessageAvatarTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E844D7B629C07795008A0EB2 /* XPRoomMessageAvatarTableViewCell.m */; };
|
||||
E845D16F283354A300BE21F7 /* XPEnterpriseTarotPayView.m in Sources */ = {isa = PBXBuildFile; fileRef = E845D16E283354A300BE21F7 /* XPEnterpriseTarotPayView.m */; };
|
||||
E84843AF27F59E7E0050D365 /* XPRoomPKResultView.m in Sources */ = {isa = PBXBuildFile; fileRef = E84843AE27F59E7E0050D365 /* XPRoomPKResultView.m */; };
|
||||
E84843B227F5A0740050D365 /* XPRomPKResultTitleLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = E84843B127F5A0740050D365 /* XPRomPKResultTitleLabel.m */; };
|
||||
E84B0E3F2727EDF6008818C6 /* XPRoomMessageTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E84B0E3E2727EDF6008818C6 /* XPRoomMessageTableViewCell.m */; };
|
||||
@@ -771,6 +784,9 @@
|
||||
E852D74728633E92001465ED /* MonentsCommentReplyModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E852D74628633E92001465ED /* MonentsCommentReplyModel.m */; };
|
||||
E85410352864155A005CFD9F /* XPMonentDetailPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E85410342864155A005CFD9F /* XPMonentDetailPresenter.m */; };
|
||||
E854103928646A00005CFD9F /* XPMonentsReplyMoreTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E854103828646A00005CFD9F /* XPMonentsReplyMoreTableViewCell.m */; };
|
||||
E854DFD72850AAC20033120D /* XPMineHalfRechargeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E854DFD62850AAC20033120D /* XPMineHalfRechargeViewController.m */; };
|
||||
E854DFDA2850AC8D0033120D /* XPEnterprisePayTypeView.m in Sources */ = {isa = PBXBuildFile; fileRef = E854DFD92850AC8D0033120D /* XPEnterprisePayTypeView.m */; };
|
||||
E854DFDD2850BCE30033120D /* XPEnterpriseHalfCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E854DFDC2850BCE30033120D /* XPEnterpriseHalfCollectionViewCell.m */; };
|
||||
E855514E2805152B005F293F /* XPGuildTimePickView.m in Sources */ = {isa = PBXBuildFile; fileRef = E855514D2805152B005F293F /* XPGuildTimePickView.m */; };
|
||||
E855515128055581005F293F /* XPGuildTimeMonthPickerView.m in Sources */ = {isa = PBXBuildFile; fileRef = E855515028055581005F293F /* XPGuildTimeMonthPickerView.m */; };
|
||||
E855515B280559FE005F293F /* NSDate+DateUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = E855515A280559FE005F293F /* NSDate+DateUtils.m */; };
|
||||
@@ -862,6 +878,7 @@
|
||||
E87E914E2796678D00A7B3F2 /* XPMineDressEmptyTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E87E914D2796678D00A7B3F2 /* XPMineDressEmptyTableViewCell.m */; };
|
||||
E87E91522796A15500A7B3F2 /* MicroExtModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E87E91512796A15500A7B3F2 /* MicroExtModel.m */; };
|
||||
E87E91552796B6DE00A7B3F2 /* XPRoomInviteUserViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E87E91542796B6DE00A7B3F2 /* XPRoomInviteUserViewController.m */; };
|
||||
E87FCE53282FABC600301132 /* XPEnterpriseRechargePayTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E87FCE52282FABC600301132 /* XPEnterpriseRechargePayTableViewCell.m */; };
|
||||
E880B39E278BD49E00A83B0D /* XPAcrossRoomPKViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E880B39D278BD49E00A83B0D /* XPAcrossRoomPKViewController.m */; };
|
||||
E880B3A1278BD60C00A83B0D /* XPAcrossRoomPKSelectRoomView.m in Sources */ = {isa = PBXBuildFile; fileRef = E880B3A0278BD60C00A83B0D /* XPAcrossRoomPKSelectRoomView.m */; };
|
||||
E880B3A6278BD69900A83B0D /* XPAcrossRoomPKTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E880B3A5278BD69900A83B0D /* XPAcrossRoomPKTableViewCell.m */; };
|
||||
@@ -968,7 +985,6 @@
|
||||
E89DA66427005932008483C1 /* XPIAPHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = E89DA66327005932008483C1 /* XPIAPHelper.m */; };
|
||||
E89DA66727006443008483C1 /* RechargeStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = E89DA66627006443008483C1 /* RechargeStorage.m */; };
|
||||
E89DA67227008D59008483C1 /* WalletInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E89DA67127008D59008483C1 /* WalletInfoModel.m */; };
|
||||
E89DA67527009ACD008483C1 /* XPMineRechargeNavView.m in Sources */ = {isa = PBXBuildFile; fileRef = E89DA67427009ACD008483C1 /* XPMineRechargeNavView.m */; };
|
||||
E89DCF5428FFEC67001647EC /* XPWishGiftHistoryTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E89DCF5328FFEC67001647EC /* XPWishGiftHistoryTableViewCell.m */; };
|
||||
E89DCF5728FFF076001647EC /* XPWishGiftEmptyTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E89DCF5628FFF076001647EC /* XPWishGiftEmptyTableViewCell.m */; };
|
||||
E89DCF5A28FFF1AD001647EC /* XPWishGiftSectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = E89DCF5928FFF1AD001647EC /* XPWishGiftSectionView.m */; };
|
||||
@@ -1093,8 +1109,6 @@
|
||||
E8B846C226FD82DC00A777FE /* XPMineUserInfoAlbumCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8B846C126FD82DC00A777FE /* XPMineUserInfoAlbumCollectionViewCell.m */; };
|
||||
E8B846C526FDB41A00A777FE /* XPMineUserInfolbumPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8B846C426FDB41A00A777FE /* XPMineUserInfolbumPresenter.m */; };
|
||||
E8B846C726FDB45000A777FE /* XPMineUserInfoAlbumProtocol.h in Sources */ = {isa = PBXBuildFile; fileRef = E8B846C626FDB44100A777FE /* XPMineUserInfoAlbumProtocol.h */; };
|
||||
E8B846CB26FDD7CD00A777FE /* XPMineRechargeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8B846CA26FDD7CD00A777FE /* XPMineRechargeViewController.m */; };
|
||||
E8B846CF26FDD96100A777FE /* XPMineRechageHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8B846CE26FDD96100A777FE /* XPMineRechageHeadView.m */; };
|
||||
E8B846D326FDDBE600A777FE /* XPMineRechargeTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8B846D226FDDBE600A777FE /* XPMineRechargeTableViewCell.m */; };
|
||||
E8B846D626FDE01B00A777FE /* XPMineRechargePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8B846D526FDE01B00A777FE /* XPMineRechargePresenter.m */; };
|
||||
E8B846D826FDE17300A777FE /* XPMineRechargeProtocol.h in Sources */ = {isa = PBXBuildFile; fileRef = E8B846D726FDE16300A777FE /* XPMineRechargeProtocol.h */; };
|
||||
@@ -1278,6 +1292,7 @@
|
||||
E8F9168727EC927C00F10D8F /* XPHomeLittleGamePesenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F9168627EC927C00F10D8F /* XPHomeLittleGamePesenter.m */; };
|
||||
E8F9168B27EC940E00F10D8F /* XPHomeLittleGameTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F9168A27EC940E00F10D8F /* XPHomeLittleGameTableViewCell.m */; };
|
||||
E8F9168E27ECA69500F10D8F /* HomeLittleGameRoomModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8F9168D27ECA69500F10D8F /* HomeLittleGameRoomModel.m */; };
|
||||
E8FDB61D28325187003EFEA9 /* XPEnterpriseFirstRechargePayView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8FDB61C28325187003EFEA9 /* XPEnterpriseFirstRechargePayView.m */; };
|
||||
F183EF412935E1C000E2465F /* HomeEveryOneSearchModel.m in Sources */ = {isa = PBXBuildFile; fileRef = F183EF402935E1C000E2465F /* HomeEveryOneSearchModel.m */; };
|
||||
F1D8556F2931FC86008C418F /* XPRoomYearActivityView.m in Sources */ = {isa = PBXBuildFile; fileRef = F1D8556E2931FC86008C418F /* XPRoomYearActivityView.m */; };
|
||||
/* End PBXBuildFile section */
|
||||
@@ -1322,14 +1337,10 @@
|
||||
1497CCE229C1E1FB0015D135 /* sailing_prize_cowry.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = sailing_prize_cowry.svga; sourceTree = "<group>"; };
|
||||
1497CCE329C1E1FB0015D135 /* sailing_prize.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = sailing_prize.svga; sourceTree = "<group>"; };
|
||||
14A0CF3A29C014B400B2375A /* moment_living.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = moment_living.svga; sourceTree = "<group>"; };
|
||||
14A0CF3C29C01E8500B2375A /* XPMineNewRechargeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineNewRechargeViewController.h; sourceTree = "<group>"; };
|
||||
14A0CF3D29C01E8500B2375A /* XPMineNewRechargeViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineNewRechargeViewController.m; sourceTree = "<group>"; };
|
||||
14A0CF3F29C01F0400B2375A /* XPMineRechargeCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPMineRechargeCollectionViewCell.h; sourceTree = "<group>"; };
|
||||
14A0CF4029C01F0400B2375A /* XPMineRechargeCollectionViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPMineRechargeCollectionViewCell.m; sourceTree = "<group>"; };
|
||||
14A0CF4229C022D300B2375A /* XPMineRechargePayCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineRechargePayCollectionViewCell.h; sourceTree = "<group>"; };
|
||||
14A0CF4329C022D300B2375A /* XPMineRechargePayCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineRechargePayCollectionViewCell.m; sourceTree = "<group>"; };
|
||||
14A0CF4529C0268800B2375A /* XPMinePayTypeModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMinePayTypeModel.h; sourceTree = "<group>"; };
|
||||
14A0CF4629C0268800B2375A /* XPMinePayTypeModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMinePayTypeModel.m; sourceTree = "<group>"; };
|
||||
14A0CF4829C0470E00B2375A /* XPMineRechargeHeaderReusableView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineRechargeHeaderReusableView.h; sourceTree = "<group>"; };
|
||||
14A0CF4929C0470E00B2375A /* XPMineRechargeHeaderReusableView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineRechargeHeaderReusableView.m; sourceTree = "<group>"; };
|
||||
14A0CF4B29C0511200B2375A /* XPMineRechargeFooterReusableView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineRechargeFooterReusableView.h; sourceTree = "<group>"; };
|
||||
@@ -2476,6 +2487,10 @@
|
||||
E82325FF274E48EA003A3332 /* XPUserCardItemCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPUserCardItemCollectionViewCell.m; sourceTree = "<group>"; };
|
||||
E8232601274E4AA0003A3332 /* ThemeColor+UserCard.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ThemeColor+UserCard.h"; sourceTree = "<group>"; };
|
||||
E8232602274E4AA0003A3332 /* ThemeColor+UserCard.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "ThemeColor+UserCard.m"; sourceTree = "<group>"; };
|
||||
E823E37A290BB1FD00EADD86 /* XPNobleRechargeView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNobleRechargeView.h; sourceTree = "<group>"; };
|
||||
E823E37B290BB1FD00EADD86 /* XPNobleRechargeView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNobleRechargeView.m; sourceTree = "<group>"; };
|
||||
E823E37D290BB54F00EADD86 /* XPNobleRechargeTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNobleRechargeTableViewCell.h; sourceTree = "<group>"; };
|
||||
E823E37E290BB54F00EADD86 /* XPNobleRechargeTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNobleRechargeTableViewCell.m; sourceTree = "<group>"; };
|
||||
E823E38C290BE8BD00EADD86 /* WishGiftInfoUpdateModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WishGiftInfoUpdateModel.h; sourceTree = "<group>"; };
|
||||
E823E38D290BE8BD00EADD86 /* WishGiftInfoUpdateModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WishGiftInfoUpdateModel.m; sourceTree = "<group>"; };
|
||||
E824543326F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPLoginVerifBindPhoneViewController.h; sourceTree = "<group>"; };
|
||||
@@ -2525,6 +2540,10 @@
|
||||
E82D5C79276B25D100858D6D /* SpriteSheetImageManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SpriteSheetImageManager.m; sourceTree = "<group>"; };
|
||||
E82D5C7B276B343300858D6D /* YYAnimatedImageView+ImageShow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "YYAnimatedImageView+ImageShow.h"; sourceTree = "<group>"; };
|
||||
E82D5C7C276B343300858D6D /* YYAnimatedImageView+ImageShow.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "YYAnimatedImageView+ImageShow.m"; sourceTree = "<group>"; };
|
||||
E82E19E729C1D43300AB4DF2 /* XPMineNewRechargeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XPMineNewRechargeViewController.h; path = View/XPMineNewRechargeViewController.h; sourceTree = "<group>"; };
|
||||
E82E19E829C1D43300AB4DF2 /* XPMineNewRechargeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = XPMineNewRechargeViewController.m; path = View/XPMineNewRechargeViewController.m; sourceTree = "<group>"; };
|
||||
E82E19EA29C1D43D00AB4DF2 /* XPMinePayTypeModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPMinePayTypeModel.m; sourceTree = "<group>"; };
|
||||
E82E19EB29C1D43D00AB4DF2 /* XPMinePayTypeModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPMinePayTypeModel.h; sourceTree = "<group>"; };
|
||||
E82E74FC2828B23D00C25EF7 /* xplan-ios.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "xplan-ios.xcdatamodel"; sourceTree = "<group>"; };
|
||||
E82E75042828E76400C25EF7 /* XPCoreDataManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPCoreDataManager.h; sourceTree = "<group>"; };
|
||||
E82E75052828E76400C25EF7 /* XPCoreDataManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPCoreDataManager.m; sourceTree = "<group>"; };
|
||||
@@ -2557,6 +2576,27 @@
|
||||
E839533E276A0CDB00CF2F24 /* XPMineNameplateTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineNameplateTableViewCell.m; sourceTree = "<group>"; };
|
||||
E8398069290288660084BFC8 /* XPMessageInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMessageInfoModel.h; sourceTree = "<group>"; };
|
||||
E839806A290288660084BFC8 /* XPMessageInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMessageInfoModel.m; sourceTree = "<group>"; };
|
||||
E83A2A35282F4E85002AD58F /* XPMineRechargeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineRechargeViewController.h; sourceTree = "<group>"; };
|
||||
E83A2A36282F4E85002AD58F /* XPMineRechargeViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineRechargeViewController.m; sourceTree = "<group>"; };
|
||||
E83A2A38282F4EA7002AD58F /* XPEnterpriseRechargePresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPEnterpriseRechargePresenter.h; sourceTree = "<group>"; };
|
||||
E83A2A39282F4EA7002AD58F /* XPEnterpriseRechargePresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPEnterpriseRechargePresenter.m; sourceTree = "<group>"; };
|
||||
E83A2A3B282F4EBB002AD58F /* XPEnterpriseRechargeProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPEnterpriseRechargeProtocol.h; sourceTree = "<group>"; };
|
||||
E83A2A3C282F4ED3002AD58F /* Api+EnterpriseRecharge.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Api+EnterpriseRecharge.h"; sourceTree = "<group>"; };
|
||||
E83A2A3D282F4ED3002AD58F /* Api+EnterpriseRecharge.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "Api+EnterpriseRecharge.m"; sourceTree = "<group>"; };
|
||||
E83A2A3F282F4EFA002AD58F /* EnterpriseRechargeListInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EnterpriseRechargeListInfoModel.h; sourceTree = "<group>"; };
|
||||
E83A2A40282F4EFA002AD58F /* EnterpriseRechargeListInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EnterpriseRechargeListInfoModel.m; sourceTree = "<group>"; };
|
||||
E83A2A44282F5662002AD58F /* XPEnterpriseRechargeHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPEnterpriseRechargeHeaderView.h; sourceTree = "<group>"; };
|
||||
E83A2A45282F5662002AD58F /* XPEnterpriseRechargeHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPEnterpriseRechargeHeaderView.m; sourceTree = "<group>"; };
|
||||
E83A2A4A282F5B6A002AD58F /* XPEnterpriseChargeTypeTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPEnterpriseChargeTypeTableViewCell.h; sourceTree = "<group>"; };
|
||||
E83A2A4B282F5B6A002AD58F /* XPEnterpriseChargeTypeTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPEnterpriseChargeTypeTableViewCell.m; sourceTree = "<group>"; };
|
||||
E83A2A4D282F5B95002AD58F /* XPEnterpriseChargeListTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPEnterpriseChargeListTableViewCell.h; sourceTree = "<group>"; };
|
||||
E83A2A4E282F5B95002AD58F /* XPEnterpriseChargeListTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPEnterpriseChargeListTableViewCell.m; sourceTree = "<group>"; };
|
||||
E83A2A50282F5BBA002AD58F /* XPEnterpriseChargeListCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPEnterpriseChargeListCollectionViewCell.h; sourceTree = "<group>"; };
|
||||
E83A2A51282F5BBA002AD58F /* XPEnterpriseChargeListCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPEnterpriseChargeListCollectionViewCell.m; sourceTree = "<group>"; };
|
||||
E83A2A53282F5C50002AD58F /* XPEnterpriseRechargeFootView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPEnterpriseRechargeFootView.h; sourceTree = "<group>"; };
|
||||
E83A2A54282F5C50002AD58F /* XPEnterpriseRechargeFootView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPEnterpriseRechargeFootView.m; sourceTree = "<group>"; };
|
||||
E83A2A56282F8590002AD58F /* EnterPrieseRechargeTypeItemModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = EnterPrieseRechargeTypeItemModel.h; sourceTree = "<group>"; };
|
||||
E83A2A57282F8590002AD58F /* EnterPrieseRechargeTypeItemModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = EnterPrieseRechargeTypeItemModel.m; sourceTree = "<group>"; };
|
||||
E83ABEF4280E9AD800322EE4 /* MessageContentUnSupportView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageContentUnSupportView.h; sourceTree = "<group>"; };
|
||||
E83ABEF5280E9AD800322EE4 /* MessageContentUnSupportView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageContentUnSupportView.m; sourceTree = "<group>"; };
|
||||
E83ABEF7280EAF3F00322EE4 /* MessageContentOpenLiveView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageContentOpenLiveView.h; sourceTree = "<group>"; };
|
||||
@@ -2613,6 +2653,8 @@
|
||||
E841ED60280FB0BD00904808 /* ContentLevelUpgradeModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ContentLevelUpgradeModel.m; sourceTree = "<group>"; };
|
||||
E844D7B529C07795008A0EB2 /* XPRoomMessageAvatarTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMessageAvatarTableViewCell.h; sourceTree = "<group>"; };
|
||||
E844D7B629C07795008A0EB2 /* XPRoomMessageAvatarTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomMessageAvatarTableViewCell.m; sourceTree = "<group>"; };
|
||||
E845D16D283354A300BE21F7 /* XPEnterpriseTarotPayView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPEnterpriseTarotPayView.h; sourceTree = "<group>"; };
|
||||
E845D16E283354A300BE21F7 /* XPEnterpriseTarotPayView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPEnterpriseTarotPayView.m; sourceTree = "<group>"; };
|
||||
E84843AD27F59E7E0050D365 /* XPRoomPKResultView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomPKResultView.h; sourceTree = "<group>"; };
|
||||
E84843AE27F59E7E0050D365 /* XPRoomPKResultView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomPKResultView.m; sourceTree = "<group>"; };
|
||||
E84843B027F5A0740050D365 /* XPRomPKResultTitleLabel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRomPKResultTitleLabel.h; sourceTree = "<group>"; };
|
||||
@@ -2675,6 +2717,12 @@
|
||||
E8541036286443D8005CFD9F /* XPMonentsDetailProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsDetailProtocol.h; sourceTree = "<group>"; };
|
||||
E854103728646A00005CFD9F /* XPMonentsReplyMoreTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMonentsReplyMoreTableViewCell.h; sourceTree = "<group>"; };
|
||||
E854103828646A00005CFD9F /* XPMonentsReplyMoreTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMonentsReplyMoreTableViewCell.m; sourceTree = "<group>"; };
|
||||
E854DFD52850AAC20033120D /* XPMineHalfRechargeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineHalfRechargeViewController.h; sourceTree = "<group>"; };
|
||||
E854DFD62850AAC20033120D /* XPMineHalfRechargeViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineHalfRechargeViewController.m; sourceTree = "<group>"; };
|
||||
E854DFD82850AC8D0033120D /* XPEnterprisePayTypeView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPEnterprisePayTypeView.h; sourceTree = "<group>"; };
|
||||
E854DFD92850AC8D0033120D /* XPEnterprisePayTypeView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPEnterprisePayTypeView.m; sourceTree = "<group>"; };
|
||||
E854DFDB2850BCE30033120D /* XPEnterpriseHalfCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPEnterpriseHalfCollectionViewCell.h; sourceTree = "<group>"; };
|
||||
E854DFDC2850BCE30033120D /* XPEnterpriseHalfCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPEnterpriseHalfCollectionViewCell.m; sourceTree = "<group>"; };
|
||||
E855514C2805152B005F293F /* XPGuildTimePickView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPGuildTimePickView.h; sourceTree = "<group>"; };
|
||||
E855514D2805152B005F293F /* XPGuildTimePickView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPGuildTimePickView.m; sourceTree = "<group>"; };
|
||||
E855514F28055581005F293F /* XPGuildTimeMonthPickerView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPGuildTimeMonthPickerView.h; sourceTree = "<group>"; };
|
||||
@@ -2866,6 +2914,8 @@
|
||||
E87E91512796A15500A7B3F2 /* MicroExtModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MicroExtModel.m; sourceTree = "<group>"; };
|
||||
E87E91532796B6DE00A7B3F2 /* XPRoomInviteUserViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomInviteUserViewController.h; sourceTree = "<group>"; };
|
||||
E87E91542796B6DE00A7B3F2 /* XPRoomInviteUserViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomInviteUserViewController.m; sourceTree = "<group>"; };
|
||||
E87FCE51282FABC600301132 /* XPEnterpriseRechargePayTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPEnterpriseRechargePayTableViewCell.h; sourceTree = "<group>"; };
|
||||
E87FCE52282FABC600301132 /* XPEnterpriseRechargePayTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPEnterpriseRechargePayTableViewCell.m; sourceTree = "<group>"; };
|
||||
E880B39C278BD49E00A83B0D /* XPAcrossRoomPKViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPAcrossRoomPKViewController.h; sourceTree = "<group>"; };
|
||||
E880B39D278BD49E00A83B0D /* XPAcrossRoomPKViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPAcrossRoomPKViewController.m; sourceTree = "<group>"; };
|
||||
E880B39F278BD60C00A83B0D /* XPAcrossRoomPKSelectRoomView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPAcrossRoomPKSelectRoomView.h; sourceTree = "<group>"; };
|
||||
@@ -3074,8 +3124,6 @@
|
||||
E89DA66627006443008483C1 /* RechargeStorage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RechargeStorage.m; sourceTree = "<group>"; };
|
||||
E89DA67027008D59008483C1 /* WalletInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WalletInfoModel.h; sourceTree = "<group>"; };
|
||||
E89DA67127008D59008483C1 /* WalletInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WalletInfoModel.m; sourceTree = "<group>"; };
|
||||
E89DA67327009ACD008483C1 /* XPMineRechargeNavView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineRechargeNavView.h; sourceTree = "<group>"; };
|
||||
E89DA67427009ACD008483C1 /* XPMineRechargeNavView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineRechargeNavView.m; sourceTree = "<group>"; };
|
||||
E89DCF5228FFEC67001647EC /* XPWishGiftHistoryTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPWishGiftHistoryTableViewCell.h; sourceTree = "<group>"; };
|
||||
E89DCF5328FFEC67001647EC /* XPWishGiftHistoryTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPWishGiftHistoryTableViewCell.m; sourceTree = "<group>"; };
|
||||
E89DCF5528FFF076001647EC /* XPWishGiftEmptyTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPWishGiftEmptyTableViewCell.h; sourceTree = "<group>"; };
|
||||
@@ -3323,10 +3371,6 @@
|
||||
E8B846C326FDB41A00A777FE /* XPMineUserInfolbumPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineUserInfolbumPresenter.h; sourceTree = "<group>"; };
|
||||
E8B846C426FDB41A00A777FE /* XPMineUserInfolbumPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineUserInfolbumPresenter.m; sourceTree = "<group>"; };
|
||||
E8B846C626FDB44100A777FE /* XPMineUserInfoAlbumProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineUserInfoAlbumProtocol.h; sourceTree = "<group>"; };
|
||||
E8B846C926FDD7CD00A777FE /* XPMineRechargeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineRechargeViewController.h; sourceTree = "<group>"; };
|
||||
E8B846CA26FDD7CD00A777FE /* XPMineRechargeViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineRechargeViewController.m; sourceTree = "<group>"; };
|
||||
E8B846CD26FDD96100A777FE /* XPMineRechageHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineRechageHeadView.h; sourceTree = "<group>"; };
|
||||
E8B846CE26FDD96100A777FE /* XPMineRechageHeadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineRechageHeadView.m; sourceTree = "<group>"; };
|
||||
E8B846D126FDDBE600A777FE /* XPMineRechargeTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineRechargeTableViewCell.h; sourceTree = "<group>"; };
|
||||
E8B846D226FDDBE600A777FE /* XPMineRechargeTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineRechargeTableViewCell.m; sourceTree = "<group>"; };
|
||||
E8B846D426FDE01B00A777FE /* XPMineRechargePresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineRechargePresenter.h; sourceTree = "<group>"; };
|
||||
@@ -3693,6 +3737,8 @@
|
||||
E8F9168A27EC940E00F10D8F /* XPHomeLittleGameTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeLittleGameTableViewCell.m; sourceTree = "<group>"; };
|
||||
E8F9168C27ECA69500F10D8F /* HomeLittleGameRoomModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeLittleGameRoomModel.h; sourceTree = "<group>"; };
|
||||
E8F9168D27ECA69500F10D8F /* HomeLittleGameRoomModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeLittleGameRoomModel.m; sourceTree = "<group>"; };
|
||||
E8FDB61B28325187003EFEA9 /* XPEnterpriseFirstRechargePayView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPEnterpriseFirstRechargePayView.h; sourceTree = "<group>"; };
|
||||
E8FDB61C28325187003EFEA9 /* XPEnterpriseFirstRechargePayView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPEnterpriseFirstRechargePayView.m; sourceTree = "<group>"; };
|
||||
F183EF3F2935E1C000E2465F /* HomeEveryOneSearchModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeEveryOneSearchModel.h; sourceTree = "<group>"; };
|
||||
F183EF402935E1C000E2465F /* HomeEveryOneSearchModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeEveryOneSearchModel.m; sourceTree = "<group>"; };
|
||||
F1D8556D2931FC86008C418F /* XPRoomYearActivityView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomYearActivityView.h; sourceTree = "<group>"; };
|
||||
@@ -3735,15 +3781,6 @@
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
14A0CF5429C0679D00B2375A /* Model */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
14A0CF4529C0268800B2375A /* XPMinePayTypeModel.h */,
|
||||
14A0CF4629C0268800B2375A /* XPMinePayTypeModel.m */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
14F9795929B6D020004BBFEB /* CycleVerticalView */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -5053,6 +5090,10 @@
|
||||
E8A1F7A7290690E00099C952 /* XPNobleRankUpdateView.m */,
|
||||
E83CD19C2909171900920A94 /* XPNobleDiscountView.h */,
|
||||
E83CD19D2909171900920A94 /* XPNobleDiscountView.m */,
|
||||
E823E37A290BB1FD00EADD86 /* XPNobleRechargeView.h */,
|
||||
E823E37B290BB1FD00EADD86 /* XPNobleRechargeView.m */,
|
||||
E823E37D290BB54F00EADD86 /* XPNobleRechargeTableViewCell.h */,
|
||||
E823E37E290BB54F00EADD86 /* XPNobleRechargeTableViewCell.m */,
|
||||
);
|
||||
path = SubViews;
|
||||
sourceTree = "<group>";
|
||||
@@ -6573,6 +6614,106 @@
|
||||
path = Cell;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E83A2A2F282F4E06002AD58F /* EnterpriseRecharge */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E82E19E729C1D43300AB4DF2 /* XPMineNewRechargeViewController.h */,
|
||||
E82E19E829C1D43300AB4DF2 /* XPMineNewRechargeViewController.m */,
|
||||
E83A2A34282F4E67002AD58F /* Model */,
|
||||
E83A2A33282F4E5F002AD58F /* Api */,
|
||||
E83A2A32282F4E58002AD58F /* View */,
|
||||
E83A2A31282F4E50002AD58F /* Presenter */,
|
||||
E83A2A30282F4E34002AD58F /* Protocol */,
|
||||
);
|
||||
path = EnterpriseRecharge;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E83A2A30282F4E34002AD58F /* Protocol */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E83A2A3B282F4EBB002AD58F /* XPEnterpriseRechargeProtocol.h */,
|
||||
);
|
||||
path = Protocol;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E83A2A31282F4E50002AD58F /* Presenter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E83A2A38282F4EA7002AD58F /* XPEnterpriseRechargePresenter.h */,
|
||||
E83A2A39282F4EA7002AD58F /* XPEnterpriseRechargePresenter.m */,
|
||||
);
|
||||
path = Presenter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E83A2A32282F4E58002AD58F /* View */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E83A2A43282F5632002AD58F /* SubViews */,
|
||||
E83A2A42282F562A002AD58F /* Cell */,
|
||||
E83A2A35282F4E85002AD58F /* XPMineRechargeViewController.h */,
|
||||
E83A2A36282F4E85002AD58F /* XPMineRechargeViewController.m */,
|
||||
E8FDB61B28325187003EFEA9 /* XPEnterpriseFirstRechargePayView.h */,
|
||||
E8FDB61C28325187003EFEA9 /* XPEnterpriseFirstRechargePayView.m */,
|
||||
E845D16D283354A300BE21F7 /* XPEnterpriseTarotPayView.h */,
|
||||
E845D16E283354A300BE21F7 /* XPEnterpriseTarotPayView.m */,
|
||||
E854DFD52850AAC20033120D /* XPMineHalfRechargeViewController.h */,
|
||||
E854DFD62850AAC20033120D /* XPMineHalfRechargeViewController.m */,
|
||||
);
|
||||
path = View;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E83A2A33282F4E5F002AD58F /* Api */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E83A2A3C282F4ED3002AD58F /* Api+EnterpriseRecharge.h */,
|
||||
E83A2A3D282F4ED3002AD58F /* Api+EnterpriseRecharge.m */,
|
||||
);
|
||||
path = Api;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E83A2A34282F4E67002AD58F /* Model */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E82E19EB29C1D43D00AB4DF2 /* XPMinePayTypeModel.h */,
|
||||
E82E19EA29C1D43D00AB4DF2 /* XPMinePayTypeModel.m */,
|
||||
E83A2A3F282F4EFA002AD58F /* EnterpriseRechargeListInfoModel.h */,
|
||||
E83A2A40282F4EFA002AD58F /* EnterpriseRechargeListInfoModel.m */,
|
||||
E83A2A56282F8590002AD58F /* EnterPrieseRechargeTypeItemModel.h */,
|
||||
E83A2A57282F8590002AD58F /* EnterPrieseRechargeTypeItemModel.m */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E83A2A42282F562A002AD58F /* Cell */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E83A2A4A282F5B6A002AD58F /* XPEnterpriseChargeTypeTableViewCell.h */,
|
||||
E83A2A4B282F5B6A002AD58F /* XPEnterpriseChargeTypeTableViewCell.m */,
|
||||
E87FCE51282FABC600301132 /* XPEnterpriseRechargePayTableViewCell.h */,
|
||||
E87FCE52282FABC600301132 /* XPEnterpriseRechargePayTableViewCell.m */,
|
||||
E83A2A4D282F5B95002AD58F /* XPEnterpriseChargeListTableViewCell.h */,
|
||||
E83A2A4E282F5B95002AD58F /* XPEnterpriseChargeListTableViewCell.m */,
|
||||
E83A2A50282F5BBA002AD58F /* XPEnterpriseChargeListCollectionViewCell.h */,
|
||||
E83A2A51282F5BBA002AD58F /* XPEnterpriseChargeListCollectionViewCell.m */,
|
||||
E854DFDB2850BCE30033120D /* XPEnterpriseHalfCollectionViewCell.h */,
|
||||
E854DFDC2850BCE30033120D /* XPEnterpriseHalfCollectionViewCell.m */,
|
||||
);
|
||||
path = Cell;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E83A2A43282F5632002AD58F /* SubViews */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E83A2A44282F5662002AD58F /* XPEnterpriseRechargeHeaderView.h */,
|
||||
E83A2A45282F5662002AD58F /* XPEnterpriseRechargeHeaderView.m */,
|
||||
E83A2A53282F5C50002AD58F /* XPEnterpriseRechargeFootView.h */,
|
||||
E83A2A54282F5C50002AD58F /* XPEnterpriseRechargeFootView.m */,
|
||||
E854DFD82850AC8D0033120D /* XPEnterprisePayTypeView.h */,
|
||||
E854DFD92850AC8D0033120D /* XPEnterprisePayTypeView.m */,
|
||||
);
|
||||
path = SubViews;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E83ABEFA280EB5A000322EE4 /* SessionContent */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -8114,29 +8255,6 @@
|
||||
path = UploadImage;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E8B846C826FDD79700A777FE /* Recharge */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
14A0CF5429C0679D00B2375A /* Model */,
|
||||
E8B846C926FDD7CD00A777FE /* XPMineRechargeViewController.h */,
|
||||
E8B846CA26FDD7CD00A777FE /* XPMineRechargeViewController.m */,
|
||||
14A0CF3C29C01E8500B2375A /* XPMineNewRechargeViewController.h */,
|
||||
14A0CF3D29C01E8500B2375A /* XPMineNewRechargeViewController.m */,
|
||||
);
|
||||
path = Recharge;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E8B846CC26FDD93D00A777FE /* Recharge */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
E8B846CD26FDD96100A777FE /* XPMineRechageHeadView.h */,
|
||||
E8B846CE26FDD96100A777FE /* XPMineRechageHeadView.m */,
|
||||
E89DA67327009ACD008483C1 /* XPMineRechargeNavView.h */,
|
||||
E89DA67427009ACD008483C1 /* XPMineRechargeNavView.m */,
|
||||
);
|
||||
path = Recharge;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
E8B846D026FDDBCD00A777FE /* Recharge */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -8900,6 +9018,7 @@
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9BCB999D28F5716E00466D64 /* CollectRoom */,
|
||||
E83A2A2F282F4E06002AD58F /* EnterpriseRecharge */,
|
||||
E8E20BDF281695430033B688 /* Setting */,
|
||||
E800805227FD33950055A8AB /* Guild */,
|
||||
E896EF912771AA6C00AD2CC1 /* Friend */,
|
||||
@@ -8919,7 +9038,6 @@
|
||||
9BD2ECCD288F829600F5CD9A /* XPMineFootPrintViewController.m */,
|
||||
9B1B729328002099003FACE9 /* XPMineFansTeamViewController.h */,
|
||||
9B1B729428002099003FACE9 /* XPMineFansTeamViewController.m */,
|
||||
E8B846C826FDD79700A777FE /* Recharge */,
|
||||
E88B5CBE26FB404800DA9178 /* MineInfo */,
|
||||
E88B5CA926FB15B900DA9178 /* Teenager */,
|
||||
9BAA5FEB277A1BBE007453F3 /* XPPrivacyViewController.h */,
|
||||
@@ -9027,7 +9145,6 @@
|
||||
children = (
|
||||
E8C219F62948525500344FC5 /* AnchorLevel */,
|
||||
9BBC02882786E0060007C24B /* NobleCenter */,
|
||||
E8B846CC26FDD93D00A777FE /* Recharge */,
|
||||
E88B5CC226FB429C00DA9178 /* MineInfo */,
|
||||
E88B5CAA26FB168200DA9178 /* Teenager */,
|
||||
E8E70D8126F2F51A00F03460 /* XPMineHeadView.h */,
|
||||
@@ -9710,6 +9827,7 @@
|
||||
E80E236F299A195F0013FD40 /* XPStarredKitchenGiftView.m in Sources */,
|
||||
E86E79D628A4EA0C006DAF48 /* SessionRiskCache.m in Sources */,
|
||||
E824543826F5820A00BE8163 /* XPLoginVerifBindPhonePresenter.m in Sources */,
|
||||
E83A2A4F282F5B95002AD58F /* XPEnterpriseChargeListTableViewCell.m in Sources */,
|
||||
E8B846BF26FD827900A777FE /* XPMineUserInfoAlbumViewController.m in Sources */,
|
||||
14EDBBBF29B60A52001D3E16 /* XPMomentTopicHeaderView.m in Sources */,
|
||||
E84CBCE128436D3C00D43221 /* XPMineContactViewController.m in Sources */,
|
||||
@@ -9755,6 +9873,7 @@
|
||||
E8E5E19427C36BA600F457D8 /* XPHomeBannerTableViewCell.m in Sources */,
|
||||
E8950189282CFFB1007E459A /* XPMonentsLayoutConfig.m in Sources */,
|
||||
9BD9A18727A120FD004186FE /* XPMineVisitorUnReadModel.m in Sources */,
|
||||
E83A2A46282F5662002AD58F /* XPEnterpriseRechargeHeaderView.m in Sources */,
|
||||
E824543D26F58C3A00BE8163 /* XPLoginBindSuccessView.m in Sources */,
|
||||
E8A6C29527CF441200AC7442 /* XPHomeAttentionCollectionViewCell.m in Sources */,
|
||||
9BE01AF72893E7F500B50299 /* XPNewUserRechargeCollectionViewCell.m in Sources */,
|
||||
@@ -9829,7 +9948,6 @@
|
||||
E8BD0F8828A9E9E400DE050D /* RoomSailingPrizeModel.m in Sources */,
|
||||
E8A1F79C290644DC0099C952 /* XPRoomMorePlayCollectionViewCell.m in Sources */,
|
||||
E8659909273E800D00EE349D /* XPGiftCollectionViewFlowLayout.m in Sources */,
|
||||
E8B846CB26FDD7CD00A777FE /* XPMineRechargeViewController.m in Sources */,
|
||||
E86596512701A1C000846EBD /* StatisticsService.m in Sources */,
|
||||
E824544026F58F9400BE8163 /* XPMinePayPwdViewController.m in Sources */,
|
||||
9BE01AED2893D0DF00B50299 /* XPDressShopSearchTableViewCell.m in Sources */,
|
||||
@@ -9873,6 +9991,7 @@
|
||||
E8A3538E28FE5CED0014A784 /* Api+WishGift.m in Sources */,
|
||||
180116F9279E8C4C00F2CBC0 /* PLTimeUtil.m in Sources */,
|
||||
9BA708A12823D4C900C474A2 /* LittleGameScrollStageView.m in Sources */,
|
||||
E83A2A41282F4EFA002AD58F /* EnterpriseRechargeListInfoModel.m in Sources */,
|
||||
E8834E4828003E1E0029CCC1 /* XPGuildMangerListPresenter.m in Sources */,
|
||||
E8ACEFF227C8E8F000F66D1A /* HomePlayRoomModel.m in Sources */,
|
||||
E80016232803CA5D00D6D17A /* XPMineGuildIncomeRecordViewController.m in Sources */,
|
||||
@@ -9892,6 +10011,7 @@
|
||||
E8998D8B2859CB6A00C68558 /* XPMineUserInfoGiftWallSubViewController.m in Sources */,
|
||||
E8DEC9A42764A6600078CB70 /* XPMoreMenuPresenter.m in Sources */,
|
||||
9B2A12D82783F42300CED41B /* XPNoblePrivilegeContentCell.m in Sources */,
|
||||
E854DFD72850AAC20033120D /* XPMineHalfRechargeViewController.m in Sources */,
|
||||
189DD53426DE255300AB55B1 /* TabbarViewController.m in Sources */,
|
||||
E81EF6E4279AB92E00FF3EDE /* LittleGameInfoModel.m in Sources */,
|
||||
9BA3B40B293DCDFD0071DF1C /* XPVersionUpdateModel.m in Sources */,
|
||||
@@ -9954,6 +10074,7 @@
|
||||
187EEEFE26E8A82C002833B2 /* NSObject+AutoCoding.m in Sources */,
|
||||
E873EB0C2809850D0071030D /* MessageContentCustomView.m in Sources */,
|
||||
E884C36F2743AAC800E1EBED /* AttachmentModel.m in Sources */,
|
||||
E8FDB61D28325187003EFEA9 /* XPEnterpriseFirstRechargePayView.m in Sources */,
|
||||
E8AC721926F46E0B007D6E91 /* XPMineSettingItemModel.m in Sources */,
|
||||
E8E859D428264C2300EE4857 /* DDASLLogger.m in Sources */,
|
||||
9BE01AF02893E31700B50299 /* NewUserRechargeModel.m in Sources */,
|
||||
@@ -9966,6 +10087,7 @@
|
||||
E800805D27FD34E90055A8AB /* XPMineGuildViewController.m in Sources */,
|
||||
E8834E50280051600029CCC1 /* XPMineGuildManagerPerViewController.m in Sources */,
|
||||
9BC5C8F9277B02EA007C8719 /* Api+NobleCenter.m in Sources */,
|
||||
E83A2A3A282F4EA7002AD58F /* XPEnterpriseRechargePresenter.m in Sources */,
|
||||
E83ABF06280EDE2B00322EE4 /* MessageContentLevelUpgradeView.m in Sources */,
|
||||
180806D827293794001FD836 /* NSObject+MJExtension.m in Sources */,
|
||||
E88863D3278ED4C0004BCFAB /* Timestamp.m in Sources */,
|
||||
@@ -9985,13 +10107,13 @@
|
||||
E80A086527F318620027B30C /* XPRoomPKPlayingView.m in Sources */,
|
||||
E8E70D9226F2F60C00F03460 /* XPMineItemModel.m in Sources */,
|
||||
189DD74A26E21D8400AB55B1 /* SSKeychain.m in Sources */,
|
||||
E854DFDD2850BCE30033120D /* XPEnterpriseHalfCollectionViewCell.m in Sources */,
|
||||
E8DACCFE27673F870052092C /* GiftValueInfoModel.m in Sources */,
|
||||
E8412F9927799249006E1101 /* InviteFansModel.m in Sources */,
|
||||
E88C72912828EA4E0047FB2B /* Music+CoreDataProperties.m in Sources */,
|
||||
E84BF7CA277AF79D00EF8877 /* XPRoomSettingTagCell.m in Sources */,
|
||||
9BE9F0F927FED12D00667200 /* XPAnchorFansPrivilegeModel.m in Sources */,
|
||||
E8AB631628ADE2D20023B0D2 /* XPMonentsTopicLatestViewController.m in Sources */,
|
||||
E8B846CF26FDD96100A777FE /* XPMineRechageHeadView.m in Sources */,
|
||||
E852D74728633E92001465ED /* MonentsCommentReplyModel.m in Sources */,
|
||||
E887532929BB31F80017A41A /* XPCandyTreeRecordTableViewCell.m in Sources */,
|
||||
186A534926FC6ED900D67B2C /* TTAlertMessageAttributedConfig.m in Sources */,
|
||||
@@ -10028,6 +10150,7 @@
|
||||
E8AC722426F47E5E007D6E91 /* XPMineFeedbackViewController.m in Sources */,
|
||||
E8664ED627E434D5000171BA /* XPRoomPKRecordViewController.m in Sources */,
|
||||
E87E914E2796678D00A7B3F2 /* XPMineDressEmptyTableViewCell.m in Sources */,
|
||||
E83A2A4C282F5B6A002AD58F /* XPEnterpriseChargeTypeTableViewCell.m in Sources */,
|
||||
9B7D804D27537950003DAC0C /* MessageCell.m in Sources */,
|
||||
9B044D9D282D2A6400DE4859 /* XPRoomAnchorRankEnterView.m in Sources */,
|
||||
E8950180282CAC49007E459A /* XPMonentsUserInfoView.m in Sources */,
|
||||
@@ -10048,6 +10171,7 @@
|
||||
9B1B72AF280031F8003FACE9 /* XPAnchorPKSelectRoomView.m in Sources */,
|
||||
E8D4824A278D1F73003C1D08 /* XPAcrossRoomPKInviteView.m in Sources */,
|
||||
189DD73F26E21C3F00AB55B1 /* YYUtility+Carrier.m in Sources */,
|
||||
E83A2A55282F5C50002AD58F /* XPEnterpriseRechargeFootView.m in Sources */,
|
||||
E87AE7F9277AABE50037823A /* XPRoomTagListViewController.m in Sources */,
|
||||
18E7B26926E8D5D60064BC9B /* XCCurrentVCStackManager.m in Sources */,
|
||||
E824544326F58FCE00BE8163 /* XPMinePayPwdInputView.m in Sources */,
|
||||
@@ -10069,6 +10193,7 @@
|
||||
E84BF7DD277C765400EF8877 /* XPRoomRoleEmptyTableViewCell.m in Sources */,
|
||||
E8F6135C291E26BD00E12650 /* NSMutableDictionary+Saft.m in Sources */,
|
||||
E8E859C428264C2300EE4857 /* HTTPDynamicFileResponse.m in Sources */,
|
||||
E854DFDA2850AC8D0033120D /* XPEnterprisePayTypeView.m in Sources */,
|
||||
E8E859D028264C2300EE4857 /* DDData.m in Sources */,
|
||||
E800162F2803FF6200D6D17A /* GuildPersonIncomeRecordModel.m in Sources */,
|
||||
9BAC92EE28E6989400147DD8 /* XPRoomActivityPlayView.m in Sources */,
|
||||
@@ -10175,6 +10300,7 @@
|
||||
E8DBB70127B6501200AA285D /* XPLittleGameMiniStageView.m in Sources */,
|
||||
E851E46227FF1314002F3ACB /* XPMineGuildEmptyTableViewCell.m in Sources */,
|
||||
E8DD25DA295583920043C7D5 /* XPAnchorRandomPKRuleView.m in Sources */,
|
||||
E83A2A52282F5BBA002AD58F /* XPEnterpriseChargeListCollectionViewCell.m in Sources */,
|
||||
E8834E3B280012B60029CCC1 /* XPMineGuildRemoveMemberViewController.m in Sources */,
|
||||
9B734F79288A9C4B00CBDAA9 /* XPMineGameTableViewCell.m in Sources */,
|
||||
E8664EDC27E43632000171BA /* XPRoomPKEmptyTableViewCell.m in Sources */,
|
||||
@@ -10194,6 +10320,7 @@
|
||||
9B5BF8A827E1BED1005DD346 /* Api+RoomTrumpet.m in Sources */,
|
||||
E8751E6B28A64C6E0056EF44 /* XPSailingRankTableViewCell.m in Sources */,
|
||||
9B1B72B528003664003FACE9 /* Api+AnchorPk.m in Sources */,
|
||||
E823E37F290BB54F00EADD86 /* XPNobleRechargeTableViewCell.m in Sources */,
|
||||
E8EEB90626FC5772007C6EBA /* XPMineUserInfoEditViewController.m in Sources */,
|
||||
E8B846D626FDE01B00A777FE /* XPMineRechargePresenter.m in Sources */,
|
||||
E8834E53280052580029CCC1 /* XPMineGuildManagerPerTableViewCell.m in Sources */,
|
||||
@@ -10224,6 +10351,7 @@
|
||||
E82D5C70276AE60000858D6D /* HeadwearModel.m in Sources */,
|
||||
14B65C6529BECD8A00EC02EF /* XPMineMomentTableViewCell.m in Sources */,
|
||||
E8A03DEC276301EF0098D9EA /* XPCandyTreeRankView.m in Sources */,
|
||||
E83A2A37282F4E85002AD58F /* XPMineRechargeViewController.m in Sources */,
|
||||
E880B3A1278BD60C00A83B0D /* XPAcrossRoomPKSelectRoomView.m in Sources */,
|
||||
9B3C181A292CE4FA003AF543 /* XPAnchorPKMatchView.m in Sources */,
|
||||
E80EC80D28ACD84000D133C5 /* QInputBarView.m in Sources */,
|
||||
@@ -10258,6 +10386,7 @@
|
||||
E8E7DAEB2745158500C631CC /* XPGiftUserInfoModel.m in Sources */,
|
||||
E83DB487274670DA00D8CBD1 /* XPRoomGiftBroadCastModel.m in Sources */,
|
||||
9BCF585C279909D7008401A4 /* XPSkillCardEditPropCell.m in Sources */,
|
||||
E83A2A58282F8590002AD58F /* EnterPrieseRechargeTypeItemModel.m in Sources */,
|
||||
E88863C6278EAFC3004BCFAB /* XPAcrossRoomPKResultView.m in Sources */,
|
||||
E8AC722C26F49580007D6E91 /* XPMineNotificaViewController.m in Sources */,
|
||||
9B335B492925D8A00048A116 /* XPAnchorPKSelectTypeController.m in Sources */,
|
||||
@@ -10272,6 +10401,7 @@
|
||||
E8A1E4572762092700B294CA /* XPCandyTreePresenter.m in Sources */,
|
||||
E8B9843328ABA2FF0022D026 /* MonentsPicResInfo.m in Sources */,
|
||||
9BE9F10227FEE5C200667200 /* XPAnchorFansTaskDetailModel.m in Sources */,
|
||||
E82E19EC29C1D43D00AB4DF2 /* XPMinePayTypeModel.m in Sources */,
|
||||
E8E0DAE6285C280E00566A2F /* XPSessionFindNewAlertView.m in Sources */,
|
||||
E86596542701A55500846EBD /* StatisticsServiceHelper.m in Sources */,
|
||||
E8E21A9B28B4BD92008F7C9D /* XPRoomGraffitiGiftAnimationView.m in Sources */,
|
||||
@@ -10391,7 +10521,6 @@
|
||||
E8F1559028125E2D00EE8C06 /* MessageAudioCenter.m in Sources */,
|
||||
9B9DFD9A27DB2194000F95B3 /* XPSessionMessageHeadView.m in Sources */,
|
||||
E8901CF628B38D89001E9A92 /* XPGraffitiGiftView.m in Sources */,
|
||||
E89DA67527009ACD008483C1 /* XPMineRechargeNavView.m in Sources */,
|
||||
E81A6546283519CA00F55894 /* MonentsTopicModel.m in Sources */,
|
||||
E8C1672A2806B1E500ECB15C /* XPGuildSuperAdminSetTableViewCell.m in Sources */,
|
||||
14973CAE29C1BD9E008E93E0 /* XPRoomRankListModel.m in Sources */,
|
||||
@@ -10435,6 +10564,7 @@
|
||||
E87AE7FC277AAC450037823A /* XPRoomTagPresenter.m in Sources */,
|
||||
E878894C273A607C00BF1D57 /* XPGiftUserCollectionViewCell.m in Sources */,
|
||||
181D7F212727D9DB00B7C059 /* SocialStageView.m in Sources */,
|
||||
E823E37C290BB1FD00EADD86 /* XPNobleRechargeView.m in Sources */,
|
||||
E8AB630D28ADD8C60023B0D2 /* XPMonentTopicContainerViewController.m in Sources */,
|
||||
E8D4DE472940473500EC788D /* GiftTwelveStarFirstModel.m in Sources */,
|
||||
14973CA729C16816008E93E0 /* XPHomeGiftRecordModel.m in Sources */,
|
||||
@@ -10460,7 +10590,6 @@
|
||||
E81EF6E0279AB7D900FF3EDE /* XPCreateLittleGameCollectionViewCell.m in Sources */,
|
||||
E8C167302806C01500ECB15C /* GuildSuperAdminInfoModel.m in Sources */,
|
||||
9B4D449328F15765002572D5 /* XPGiftLuckyGiftBroadcastView.m in Sources */,
|
||||
14A0CF3E29C01E8500B2375A /* XPMineNewRechargeViewController.m in Sources */,
|
||||
E81C278C26EAFAF60031E639 /* Base64.m in Sources */,
|
||||
E8C1CD7027D894B800376F83 /* RoomFaceTitleItemModel.m in Sources */,
|
||||
189DD73D26E21C3F00AB55B1 /* YYUtility+Device.m in Sources */,
|
||||
@@ -10475,6 +10604,7 @@
|
||||
E877A7EE278428FB00EFACED /* MicroDatingProgressView.m in Sources */,
|
||||
E8E0DAE9285C2E8C00566A2F /* FindNewGreetMessageModel.m in Sources */,
|
||||
E8C6FFE32754F349004DC9F0 /* XPSearchListTableViewCell.m in Sources */,
|
||||
E82E19E929C1D43400AB4DF2 /* XPMineNewRechargeViewController.m in Sources */,
|
||||
E87A27032758BC81002DDC7A /* XPRoomSearchContainerViewController.m in Sources */,
|
||||
E884C3722743AEDE00E1EBED /* CustomAttachmentDecoder.m in Sources */,
|
||||
18EE3FEE2750CE6D00A452BF /* NIMMessageUtils.m in Sources */,
|
||||
@@ -10505,6 +10635,7 @@
|
||||
E81E09CF290F750800A1F410 /* AdvertiseModel.m in Sources */,
|
||||
E852D74428633A08001465ED /* MonentsCommentModel.m in Sources */,
|
||||
E8C1CD6D27D8938C00376F83 /* XPRoomFaceTitleCollectionViewCell.m in Sources */,
|
||||
E83A2A3E282F4ED3002AD58F /* Api+EnterpriseRecharge.m in Sources */,
|
||||
E8C1CD7627D8AE3D00376F83 /* XPRoomFacePresenter.m in Sources */,
|
||||
18F4043A275E20D900A6C548 /* TRTCRtcImpl.m in Sources */,
|
||||
E8899C7F27853B6A007944BE /* DatingMicroView.m in Sources */,
|
||||
@@ -10578,7 +10709,6 @@
|
||||
E852D73B286317F0001465ED /* XPMonentsDetailViewController.m in Sources */,
|
||||
14C1F15729B874FB000A960F /* XPMineMoreItemTableViewCell.m in Sources */,
|
||||
E8ACEFEC27C8C22C00F66D1A /* XPHomeHappyViewController.m in Sources */,
|
||||
14A0CF4729C0268800B2375A /* XPMinePayTypeModel.m in Sources */,
|
||||
E890BC10273D23F00007C46B /* GiftInfoModel.m in Sources */,
|
||||
E8A30BEB28534A96003B4873 /* XPSessionFindNewFiltrateView.m in Sources */,
|
||||
E84BF7E0277C869A00EF8877 /* XPRoomOnLineViewController.m in Sources */,
|
||||
@@ -10592,6 +10722,7 @@
|
||||
E80EC80F28ACD84000D133C5 /* QEmotion.m in Sources */,
|
||||
E887531929BB26680017A41A /* CandyTreeMoreItemModel.m in Sources */,
|
||||
E8E859C628264C2300EE4857 /* HTTPAsyncFileResponse.m in Sources */,
|
||||
E845D16F283354A300BE21F7 /* XPEnterpriseTarotPayView.m in Sources */,
|
||||
E877A7EB2783E24700EFACED /* DatingStageView.m in Sources */,
|
||||
9BD2ECDA288F867000F5CD9A /* XPMineFootPrintTableViewCell.m in Sources */,
|
||||
E8001635280410BD00D6D17A /* XPGuildIncomeSectionView.m in Sources */,
|
||||
@@ -10605,6 +10736,7 @@
|
||||
E851E45B27FF02DF002F3ACB /* XPGuildSearchPresenter.m in Sources */,
|
||||
E884C36C2743951B00E1EBED /* GiftReceiveInfoModel.m in Sources */,
|
||||
9B7B606227BB96E40070BB72 /* XPRoomAnchorInfoCardView.m in Sources */,
|
||||
E87FCE53282FABC600301132 /* XPEnterpriseRechargePayTableViewCell.m in Sources */,
|
||||
E80B0734280D740600A79F63 /* MessageContentGuildView.m in Sources */,
|
||||
E8395334276A03C300CF2F24 /* XPMineDressUpPresenter.m in Sources */,
|
||||
9BC5C8F6277B0263007C8719 /* XPNobleCenterListViewController.m in Sources */,
|
||||
|
@@ -45,8 +45,8 @@ UIKIT_EXTERN NSString * adImageName;
|
||||
- (void)configShareSDK {
|
||||
[ShareSDK registPlatforms:^(SSDKRegister *platformsRegister) {
|
||||
//QQ
|
||||
NSString *universalLink = @"https://a6lno.share2dlink.com/";
|
||||
NSString *qqUniversalLink = @"https://a6lno.share2dlink.com/qq_conn/101902443";
|
||||
NSString *universalLink = @"https://f02efc69cbad775287063e8ee37733a5.share2dlink.com/";
|
||||
NSString *qqUniversalLink = @"https://f02efc69cbad775287063e8ee37733a5.share2dlink.com/qq_conn/102044928";
|
||||
[platformsRegister setupQQWithAppId:KeyWithType(KeyType_QQAppid) appkey:KeyWithType(KeyType_QQSecret) enableUniversalLink:YES universalLink:qqUniversalLink];
|
||||
[platformsRegister setupWeChatWithAppId:KeyWithType(KeyType_WechatAppid) appSecret:KeyWithType(KeyType_WechatSecret) universalLink:universalLink];
|
||||
}];
|
||||
|
6
xplan-ios/Assets.xcassets/Mine/Recharge/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
22
xplan-ios/Assets.xcassets/Mine/Recharge/mine_recharge_alipay.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_recharge_alipay@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_recharge_alipay@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Mine/Recharge/mine_recharge_alipay.imageset/mine_recharge_alipay@2x.png
vendored
Normal file
After Width: | Height: | Size: 2.5 KiB |
BIN
xplan-ios/Assets.xcassets/Mine/Recharge/mine_recharge_alipay.imageset/mine_recharge_alipay@3x.png
vendored
Normal file
After Width: | Height: | Size: 5.0 KiB |
22
xplan-ios/Assets.xcassets/Mine/Recharge/mine_recharge_choose_normal.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_recharge_choose_normal@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_recharge_choose_normal@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 320 B |
After Width: | Height: | Size: 459 B |
22
xplan-ios/Assets.xcassets/Mine/Recharge/mine_recharge_choose_select.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_recharge_choose_select@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_recharge_choose_select@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 520 B |
After Width: | Height: | Size: 804 B |
22
xplan-ios/Assets.xcassets/Mine/Recharge/mine_recharge_wechat.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_recharge_wechat@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_recharge_wechat@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Mine/Recharge/mine_recharge_wechat.imageset/mine_recharge_wechat@2x.png
vendored
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
xplan-ios/Assets.xcassets/Mine/Recharge/mine_recharge_wechat.imageset/mine_recharge_wechat@3x.png
vendored
Normal file
After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 64 KiB |
22
xplan-ios/Assets.xcassets/Mine/mine_recharge_halt_pay_choose.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_recharge_halt_pay_choose@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "mine_recharge_halt_pay_choose@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 900 B |
After Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 62 KiB |
Before Width: | Height: | Size: 69 KiB After Width: | Height: | Size: 136 KiB |
@@ -44,12 +44,36 @@
|
||||
<string>yinmengapplink</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict/>
|
||||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>daeplayapp</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>xdx.api.lecheng163.com</string>
|
||||
</array>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>CFBundleTypeRole</key>
|
||||
<string>Editor</string>
|
||||
<key>CFBundleURLSchemes</key>
|
||||
<array>
|
||||
<string>xdx.api.uat.lecheng163.com</string>
|
||||
</array>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2022111001</string>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>LSApplicationQueriesSchemes</key>
|
||||
<array>
|
||||
<string>alipays</string>
|
||||
<string>pubgmhd1106467070</string>
|
||||
<string>weixin</string>
|
||||
<string>wechat</string>
|
||||
|
@@ -400,8 +400,8 @@ typedef NS_ENUM(NSUInteger, CustomMessageSubChatRiskAlert) {
|
||||
|
||||
///first = CustomMessageType_First_Recharge_Reward
|
||||
typedef NS_ENUM(NSUInteger, CustomMessageSubFirstRecharge) {
|
||||
/// 首充完成
|
||||
Custom_Message_Sub_Room_First_Recharge_Reward= 761,
|
||||
/// 首充完成
|
||||
Custom_Message_Sub_Room_First_Recharge_Reward= 761,
|
||||
/// 新用户专享优惠充值完成
|
||||
Custom_Message_Sub_New_User_Recharge_Reward = 762,
|
||||
};
|
||||
|
@@ -21,7 +21,7 @@
|
||||
int second = [dict[@"second"] intValue];
|
||||
NSDictionary *data = dict[@"data"];
|
||||
if ([data isKindOfClass:[NSString class]]) {
|
||||
data = [(NSString *)data model2dictionary];
|
||||
data = [self dictionaryWithJsonString:(NSString *)data];
|
||||
}
|
||||
if ([data isKindOfClass:[NSDictionary class]]) {
|
||||
AttachmentModel *attachment = [[AttachmentModel alloc]init];
|
||||
@@ -36,4 +36,35 @@
|
||||
return attachment;
|
||||
}
|
||||
|
||||
//json格式字符串转字典:
|
||||
- (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString {
|
||||
|
||||
if (jsonString == nil) {
|
||||
|
||||
return nil;
|
||||
|
||||
}
|
||||
|
||||
NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding];
|
||||
|
||||
NSError *err;
|
||||
|
||||
NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:jsonData
|
||||
|
||||
options:NSJSONReadingMutableContainers
|
||||
|
||||
error:&err];
|
||||
|
||||
if(err) {
|
||||
|
||||
NSLog(@"json解析失败:%@",err);
|
||||
|
||||
return nil;
|
||||
|
||||
}
|
||||
|
||||
return dic;
|
||||
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// Api+EnterpriseRecharge.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/14.
|
||||
//
|
||||
|
||||
#import "Api.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface Api (EnterpriseRecharge)
|
||||
///企业包的充值列表
|
||||
+ (void)enterpriseRechargeList:(HttpRequestHelperCompletion)completion channelType:(NSString *)channelTyp;
|
||||
/// 请求支付参数
|
||||
/// @param completion 完成
|
||||
/// @param chargeProdId 订单的id
|
||||
/// @param payChannel 支付的渠道
|
||||
/// @param clientIp ip
|
||||
/// @param uid uid
|
||||
/// @param ticket ticket
|
||||
+ (void)requestPay:(HttpRequestHelperCompletion)completion chargeProdId:(NSString *)chargeProdId payChannel:(NSString *)payChannel clientIp:(NSString *)clientIp uid:(NSString *)uid ticket:(NSString *)ticket roomUid:(NSString *)roomUid;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -24,13 +24,13 @@
|
||||
/// @param ticket ticket
|
||||
+ (void)requestPay:(HttpRequestHelperCompletion)completion chargeProdId:(NSString *)chargeProdId payChannel:(NSString *)payChannel clientIp:(NSString *)clientIp uid:(NSString *)uid ticket:(NSString *)ticket roomUid:(NSString *)roomUid {
|
||||
NSMutableDictionary * dic = [NSMutableDictionary dictionary];
|
||||
[dic safeSetObject:chargeProdId forKey:@"chargeProdId"];
|
||||
[dic safeSetObject:payChannel forKey:@"payChannel"];
|
||||
[dic safeSetObject:clientIp forKey:@"clientIp"];
|
||||
[dic safeSetObject:uid forKey:@"uid"];
|
||||
[dic safeSetObject:ticket forKey:@"ticket"];
|
||||
[dic setValue:chargeProdId forKey:@"chargeProdId"];
|
||||
[dic setValue:payChannel forKey:@"payChannel"];
|
||||
[dic setValue:clientIp forKey:@"clientIp"];
|
||||
[dic setValue:uid forKey:@"uid"];
|
||||
[dic setValue:ticket forKey:@"ticket"];
|
||||
if (roomUid.integerValue> 0) {
|
||||
[dic safeSetObject:roomUid forKey:@"roomUid"];
|
||||
[dic setValue:roomUid forKey:@"roomUid"];
|
||||
}
|
||||
[HttpRequestHelper request:@"charge/pay/apply" method:HttpRequestHelperMethodPOST params:dic completion:completion];
|
||||
}
|
||||
|
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// EnterPrieseRechargeTypeItemModel.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/14.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
typedef NS_ENUM(NSInteger, RechargeType) {
|
||||
RechargeType_WX = 1,
|
||||
RechargeType_ZFB = 2,
|
||||
RechargeType_Coin = 3,
|
||||
};
|
||||
|
||||
@interface EnterPrieseRechargeTypeItemModel : NSObject
|
||||
///图片
|
||||
@property (nonatomic,copy) NSString *imageName;
|
||||
///标题
|
||||
@property (nonatomic,copy) NSString *title;
|
||||
///充值的类型
|
||||
@property (nonatomic,assign) RechargeType type;
|
||||
///是否选中
|
||||
@property (nonatomic,assign) BOOL isSelect;
|
||||
///是否是最后一个
|
||||
@property (nonatomic,assign) BOOL isLastOne;
|
||||
///副标题
|
||||
@property (nonatomic,copy) NSString *subTitle;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// EnterPrieseRechargeTypeItemModel.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/14.
|
||||
//
|
||||
|
||||
#import "EnterPrieseRechargeTypeItemModel.h"
|
||||
|
||||
@implementation EnterPrieseRechargeTypeItemModel
|
||||
|
||||
@end
|
@@ -0,0 +1,46 @@
|
||||
//
|
||||
// EnterpriseRechargeInfoModel.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/14.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class EnterpriseRechargeInfoModel;
|
||||
typedef NS_ENUM(NSInteger, RechargeDefaultPayType) {
|
||||
///支付宝
|
||||
RechargeDefaultPayType_ZFB = 1,
|
||||
///微信
|
||||
RechargeDefaultPayType_WX,
|
||||
///支付宝 微信
|
||||
RechargeDefaultPayType_ZFB_WX,
|
||||
///微信支付宝
|
||||
RechargeDefaultPayType_WX_ZFB,
|
||||
///金币
|
||||
RechargeDefaultPayType_Coin,
|
||||
};
|
||||
|
||||
@interface EnterpriseRechargeListInfoModel : NSObject
|
||||
///大额充值
|
||||
@property(nonatomic,strong) NSArray <EnterpriseRechargeInfoModel *> *bigList;
|
||||
///充值列表
|
||||
@property(nonatomic,strong) NSArray <EnterpriseRechargeInfoModel *> *list;
|
||||
///默认的支付方式
|
||||
@property(nonatomic,assign) RechargeDefaultPayType defaultPay;
|
||||
@end
|
||||
|
||||
|
||||
@interface EnterpriseRechargeInfoModel : NSObject
|
||||
@property(nonatomic, strong) NSString *chargeProdId;
|
||||
@property(nonatomic, strong) NSString *prodName;
|
||||
@property (copy, nonatomic) NSString *prodDesc;
|
||||
@property(nonatomic, strong) NSNumber *money;
|
||||
@property(nonatomic, strong) NSNumber *giftGoldNum;
|
||||
@property(nonatomic, strong) NSString *channel;
|
||||
///是否选中
|
||||
@property (nonatomic,assign) BOOL isSelect;
|
||||
|
||||
@end
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// EnterpriseRechargeInfoModel.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/14.
|
||||
//
|
||||
|
||||
#import "EnterpriseRechargeListInfoModel.h"
|
||||
|
||||
@implementation EnterpriseRechargeListInfoModel
|
||||
|
||||
+ (NSDictionary *)objectClassInArray {
|
||||
return @{@"bigList":EnterpriseRechargeInfoModel.class,
|
||||
@"list":EnterpriseRechargeInfoModel.class
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation EnterpriseRechargeInfoModel
|
||||
|
||||
@end
|
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// XPEnterpriseRechargePresenter.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/14.
|
||||
//
|
||||
|
||||
#import "BaseMvpPresenter.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPEnterpriseRechargePresenter : BaseMvpPresenter
|
||||
///获取充值列表
|
||||
- (void)getRechargeList:(NSString *)channelType;
|
||||
|
||||
/// 请求内购列表
|
||||
/// @param channel 目前是8
|
||||
- (void)requestRechargeListWithChannel:(NSString *)channel;
|
||||
/// 获取钱包信息
|
||||
- (void)getUserWalletInfo;
|
||||
///发起支付
|
||||
- (void)requestPay:(NSString *)chargeProdId payChannel:(NSString *)payChannel roomUid:(NSString *)roomUid;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,55 @@
|
||||
//
|
||||
// XPEnterpriseRechargePresenter.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/14.
|
||||
//
|
||||
|
||||
#import "XPEnterpriseRechargePresenter.h"
|
||||
#import "XPEnterpriseRechargeProtocol.h"
|
||||
#import "Api+EnterpriseRecharge.h"
|
||||
#import "Api+Mine.h"
|
||||
#import "EnterpriseRechargeListInfoModel.h"
|
||||
#import "WalletInfoModel.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "YYUtility.h"
|
||||
#import "RechargeListModel.h"
|
||||
@implementation XPEnterpriseRechargePresenter
|
||||
|
||||
///获取充值列表
|
||||
- (void)getRechargeList:(NSString *)channelType {
|
||||
[Api enterpriseRechargeList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
EnterpriseRechargeListInfoModel * info = [EnterpriseRechargeListInfoModel modelWithDictionary:data.data];
|
||||
[[self getView] getRechargeListSuccess:info];
|
||||
}] channelType:channelType];
|
||||
}
|
||||
|
||||
/// 请求内购列表
|
||||
/// @param channel 目前是8
|
||||
- (void)requestRechargeListWithChannel:(NSString *)channel {
|
||||
[Api getRechargeList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
NSArray * array = [RechargeListModel modelsWithArray:data.data];
|
||||
[[self getView] requestRechargeListSucccess:array];
|
||||
}] channelType:channel];
|
||||
}
|
||||
|
||||
/// 获取钱包信息
|
||||
- (void)getUserWalletInfo {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
||||
[Api getUserWalletInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
WalletInfoModel * model = [WalletInfoModel modelWithDictionary:data.data];
|
||||
[[self getView] getUserWalletInfo:model];
|
||||
}] uid:uid ticket:ticket];
|
||||
}
|
||||
|
||||
///发起支付
|
||||
- (void)requestPay:(NSString *)chargeProdId payChannel:(NSString *)payChannel roomUid:(NSString *)roomUid {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
||||
NSString * clientIp= [YYUtility ipAddress];
|
||||
[Api requestPay:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
[[self getView] requestPaySuccess:data.data payChannel:payChannel];
|
||||
} showLoading:YES] chargeProdId:chargeProdId payChannel:payChannel clientIp:clientIp uid:uid ticket:ticket roomUid:roomUid];
|
||||
}
|
||||
@end
|
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// XPEnterpriseProtocol.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/14.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class EnterpriseRechargeListInfoModel, WalletInfoModel;
|
||||
@protocol XPEnterpriseRechargeProtocol <NSObject>
|
||||
///请求钱包余额信息
|
||||
- (void)getUserWalletInfo:(WalletInfoModel *)balanceInfo;
|
||||
|
||||
///获取充值列表成功
|
||||
- (void)getRechargeListSuccess:(EnterpriseRechargeListInfoModel *)info;
|
||||
///请求订单成功
|
||||
- (void)requestPaySuccess:(id)data payChannel:(NSString *)payChannel;
|
||||
|
||||
|
||||
- (void)requestRechargeListSucccess:(NSArray *)array;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPEnterpriseChargeListCollectionViewCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/14.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class EnterpriseRechargeInfoModel;
|
||||
@interface XPEnterpriseChargeListCollectionViewCell : UICollectionViewCell
|
||||
@property (nonatomic,strong) EnterpriseRechargeInfoModel *infoModel;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,114 @@
|
||||
//
|
||||
// XPEnterpriseChargeListCollectionViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/14.
|
||||
//
|
||||
|
||||
#import "XPEnterpriseChargeListCollectionViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
///Model
|
||||
#import "EnterpriseRechargeListInfoModel.h"
|
||||
|
||||
@interface XPEnterpriseChargeListCollectionViewCell ()
|
||||
///背景
|
||||
@property (nonatomic,strong) UIView * backView;
|
||||
///显示金币数
|
||||
@property (nonatomic,strong) UILabel *coinLabel;
|
||||
///显示价格
|
||||
@property (nonatomic,strong) UILabel *priceLabel;
|
||||
@end
|
||||
|
||||
@implementation XPEnterpriseChargeListCollectionViewCell
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
[self.contentView addSubview:self.backView];
|
||||
[self.backView addSubview:self.coinLabel];
|
||||
[self.backView addSubview:self.priceLabel];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.backView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
[self.coinLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.backView);
|
||||
make.bottom.mas_equalTo(self.backView.mas_centerY).offset(-2);
|
||||
}];
|
||||
|
||||
[self.priceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.backView);
|
||||
make.top.mas_equalTo(self.backView.mas_centerY).offset(2);
|
||||
}];
|
||||
}
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setInfoModel:(EnterpriseRechargeInfoModel *)infoModel {
|
||||
_infoModel = infoModel;
|
||||
if (_infoModel) {
|
||||
self.coinLabel.text = _infoModel.prodName;
|
||||
if (_infoModel.prodName) {
|
||||
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] initWithString:_infoModel.prodName attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:16], NSForegroundColorAttributeName:[ThemeColor mainTextColor]}];
|
||||
NSRange range = [_infoModel.prodName rangeOfString:@"钻石"];
|
||||
if (range.location < _infoModel.prodName.length) {
|
||||
[attribute addAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:14]} range:range];
|
||||
[attribute addAttributes:@{NSForegroundColorAttributeName:[ThemeColor appMainColor]} range:range];
|
||||
}
|
||||
self.coinLabel.attributedText = attribute;
|
||||
self.coinLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
|
||||
self.priceLabel.text = [NSString stringWithFormat:@"%.2f元",_infoModel.money.floatValue];
|
||||
//设置是否选中
|
||||
if (_infoModel.isSelect) {
|
||||
self.backView.layer.borderColor = [ThemeColor appMainColor].CGColor;
|
||||
}else {
|
||||
self.backView.layer.borderColor = [ThemeColor appCellBackgroundColor].CGColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (UIView *)backView {
|
||||
if (!_backView) {
|
||||
_backView = [[UIView alloc] init];
|
||||
_backView.backgroundColor = [ThemeColor appCellBackgroundColor];
|
||||
_backView.layer.cornerRadius = 10;
|
||||
_backView.layer.borderWidth = 1.5;
|
||||
}
|
||||
return _backView;
|
||||
}
|
||||
|
||||
- (UILabel *)coinLabel {
|
||||
if (!_coinLabel) {
|
||||
_coinLabel = [[UILabel alloc] init];
|
||||
_coinLabel.font = [UIFont systemFontOfSize:18];
|
||||
_coinLabel.textColor = [ThemeColor appMainColor];
|
||||
_coinLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _coinLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)priceLabel {
|
||||
if (!_priceLabel) {
|
||||
_priceLabel = [[UILabel alloc] init];
|
||||
_priceLabel.font = [UIFont systemFontOfSize:15];
|
||||
_priceLabel.textColor = [ThemeColor mainTextColor];
|
||||
_priceLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _priceLabel;
|
||||
}
|
||||
|
||||
@end
|
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// XPEnterpriseChargeListTableViewCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/14.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class EnterpriseRechargeInfoModel, WalletInfoModel, XPEnterpriseChargeListTableViewCell;
|
||||
|
||||
@protocol XPEnterpriseChargeListTableViewCellDelegate <NSObject>
|
||||
|
||||
- (void)xPEnterpriseChargeListTableViewCell:(XPEnterpriseChargeListTableViewCell *)cell didSelectItem:(EnterpriseRechargeInfoModel *)infoModel;
|
||||
|
||||
@end
|
||||
@interface XPEnterpriseChargeListTableViewCell : UITableViewCell
|
||||
@property (nonatomic,strong) NSArray<EnterpriseRechargeInfoModel *> *rechargeList;
|
||||
@property (nonatomic,strong) WalletInfoModel *balanceInfo;
|
||||
///代理
|
||||
@property (nonatomic,weak) id<XPEnterpriseChargeListTableViewCellDelegate> delegate;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,170 @@
|
||||
//
|
||||
// XPEnterpriseChargeListTableViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/14.
|
||||
//
|
||||
|
||||
#import "XPEnterpriseChargeListTableViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "XPMacro.h"
|
||||
///Model
|
||||
#import "EnterpriseRechargeListInfoModel.h"
|
||||
///View
|
||||
#import "XPEnterpriseHalfCollectionViewCell.h"
|
||||
#import "XPEnterpriseRechargeHeaderView.h"
|
||||
|
||||
@interface XPEnterpriseChargeListTableViewCell ()<UICollectionViewDelegate, UICollectionViewDataSource>
|
||||
///大的背景
|
||||
@property (nonatomic,strong) UIImageView *backImageView;
|
||||
///钱包信息
|
||||
@property (nonatomic,strong) XPEnterpriseRechargeHeaderView *infoView;
|
||||
///列表
|
||||
@property (nonatomic,strong) UICollectionView *collectionView;
|
||||
///显示充值限制
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
///当前选中的
|
||||
@property (nonatomic,strong) EnterpriseRechargeInfoModel *selectInfo;
|
||||
@end
|
||||
|
||||
@implementation XPEnterpriseChargeListTableViewCell
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
[self.contentView addSubview:self.backImageView];
|
||||
[self.contentView addSubview:self.infoView];
|
||||
[self.contentView addSubview:self.collectionView];
|
||||
[self.contentView addSubview:self.titleLabel];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
CGFloat kscale = 260.0/ 375.0;
|
||||
[self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.top.mas_equalTo(self);
|
||||
make.height.mas_equalTo(KScreenWidth * kscale);
|
||||
}];
|
||||
|
||||
[self.infoView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self);
|
||||
make.width.mas_equalTo(375);
|
||||
make.top.mas_equalTo(self).offset(92);
|
||||
make.height.mas_equalTo(106);
|
||||
}];
|
||||
|
||||
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.infoView.mas_bottom).offset(15);
|
||||
make.left.right.mas_equalTo(self.contentView);
|
||||
make.bottom.mas_equalTo(self.titleLabel.mas_top).offset(-12);
|
||||
}];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.contentView).inset(30);
|
||||
make.bottom.mas_equalTo(self.contentView).offset(-15);
|
||||
}];
|
||||
}
|
||||
#pragma mark - UICollectionViewCellDelegate And UICollectionViewDatasource
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
return self.rechargeList.count;
|
||||
}
|
||||
|
||||
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
XPEnterpriseHalfCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPEnterpriseHalfCollectionViewCell class]) forIndexPath:indexPath];
|
||||
EnterpriseRechargeInfoModel * info = [self.rechargeList objectAtIndex:indexPath.row];
|
||||
if ([info.chargeProdId isEqualToString:self.selectInfo.chargeProdId]) {
|
||||
info.isSelect = YES;
|
||||
} else {
|
||||
info.isSelect = NO;
|
||||
}
|
||||
cell.infoModel = info;
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (self.rechargeList.count > 0) {
|
||||
EnterpriseRechargeInfoModel * infor = [self.rechargeList objectAtIndex:indexPath.row];
|
||||
self.selectInfo = infor;
|
||||
[self.collectionView reloadData];
|
||||
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPEnterpriseChargeListTableViewCell:didSelectItem:)]) {
|
||||
[self.delegate xPEnterpriseChargeListTableViewCell:self didSelectItem:infor];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setRechargeList:(NSArray<EnterpriseRechargeInfoModel *> *)rechargeList {
|
||||
_rechargeList = rechargeList;
|
||||
if (_rechargeList.count > 0) {
|
||||
self.selectInfo = [rechargeList firstObject];
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPEnterpriseChargeListTableViewCell:didSelectItem:)]) {
|
||||
[self.delegate xPEnterpriseChargeListTableViewCell:self didSelectItem:self.selectInfo];
|
||||
}
|
||||
}
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
|
||||
- (void)setBalanceInfo:(WalletInfoModel *)balanceInfo {
|
||||
_balanceInfo = balanceInfo;
|
||||
self.infoView.walletInfo =balanceInfo;
|
||||
}
|
||||
|
||||
- (UICollectionView *)collectionView{
|
||||
if (!_collectionView) {
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
layout.itemSize = CGSizeMake((CGFloat)(KScreenWidth - 15 * 2 - 8 * 2 - 3) / 3.0, 64);
|
||||
layout.sectionInset = UIEdgeInsetsMake(0, 15, 0, 15);
|
||||
layout.minimumLineSpacing = 8;
|
||||
layout.minimumInteritemSpacing = 8;
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
|
||||
_collectionView.dataSource = self;
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.backgroundColor = [UIColor clearColor];
|
||||
_collectionView.scrollEnabled = NO;
|
||||
[_collectionView registerClass:[XPEnterpriseHalfCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPEnterpriseHalfCollectionViewCell class])];
|
||||
}
|
||||
return _collectionView;
|
||||
}
|
||||
|
||||
- (XPEnterpriseRechargeHeaderView *)infoView {
|
||||
if (!_infoView) {
|
||||
_infoView = [[XPEnterpriseRechargeHeaderView alloc] init];
|
||||
}
|
||||
return _infoView;
|
||||
}
|
||||
|
||||
- (UIImageView *)backImageView {
|
||||
if (!_backImageView) {
|
||||
_backImageView = [[UIImageView alloc] init];
|
||||
_backImageView.userInteractionEnabled = YES;
|
||||
_backImageView.image = [UIImage imageNamed:@"mine_recharge_header_bg"];
|
||||
_backImageView.layer.masksToBounds = YES;
|
||||
_backImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
}
|
||||
return _backImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
_titleLabel.textColor = [ThemeColor secondTextColor];
|
||||
_titleLabel.text = @"未成年禁止充值消费!请勿轻易相信各类刷单、退款等信息,以免上当受骗!";
|
||||
_titleLabel.numberOfLines = 2;
|
||||
_titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
@end
|
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// XPEnterpriseChargeTypeTableViewCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/14.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class EnterPrieseRechargeTypeItemModel;
|
||||
|
||||
@interface XPEnterpriseChargeTypeTableViewCell : UITableViewCell
|
||||
@property (nonatomic,strong) EnterPrieseRechargeTypeItemModel *rechargeTypeModel;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,141 @@
|
||||
//
|
||||
// XPEnterpriseChargeTypeTableViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/14.
|
||||
//
|
||||
|
||||
#import "XPEnterpriseChargeTypeTableViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
///Model
|
||||
#import "EnterPrieseRechargeTypeItemModel.h"
|
||||
|
||||
@interface XPEnterpriseChargeTypeTableViewCell ()
|
||||
///支付的logo
|
||||
@property (nonatomic,strong) UIImageView *logoImageView;
|
||||
///显示支付名
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
///钻石余额
|
||||
@property (nonatomic,strong) UILabel *subtitleLabel;
|
||||
///选中的支付
|
||||
@property (nonatomic,strong) UIButton *chooseButton;
|
||||
///分割线
|
||||
@property (nonatomic,strong) UIView * lineView;
|
||||
@end
|
||||
|
||||
@implementation XPEnterpriseChargeTypeTableViewCell
|
||||
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
[self.contentView addSubview:self.logoImageView];
|
||||
[self.contentView addSubview:self.titleLabel];
|
||||
[self.contentView addSubview:self.subtitleLabel];
|
||||
[self.contentView addSubview:self.chooseButton];
|
||||
[self.contentView addSubview:self.lineView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
|
||||
[self.logoImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.contentView).offset(0);
|
||||
make.centerY.mas_equalTo(self.contentView);
|
||||
make.size.mas_equalTo(CGSizeMake(24, 24));
|
||||
}];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.logoImageView);
|
||||
make.left.mas_equalTo(self.logoImageView.mas_right).offset(10);
|
||||
}];
|
||||
|
||||
[self.subtitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.titleLabel.mas_right).offset(10);
|
||||
make.bottom.equalTo(self.titleLabel);
|
||||
}];
|
||||
|
||||
[self.chooseButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(18, 18));
|
||||
make.centerY.mas_equalTo(self.contentView);
|
||||
make.right.mas_equalTo(self.contentView).offset(-10);
|
||||
}];
|
||||
|
||||
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.contentView).inset(10);
|
||||
make.bottom.mas_equalTo(self.contentView);
|
||||
make.height.mas_equalTo(1);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setRechargeTypeModel:(EnterPrieseRechargeTypeItemModel *)rechargeTypeModel {
|
||||
_rechargeTypeModel = rechargeTypeModel;
|
||||
if (_rechargeTypeModel) {
|
||||
_logoImageView.image = [UIImage imageNamed:_rechargeTypeModel.imageName];
|
||||
_titleLabel.text = _rechargeTypeModel.title;
|
||||
_chooseButton.selected = _rechargeTypeModel.isSelect;
|
||||
self.lineView.hidden = _rechargeTypeModel.isLastOne;
|
||||
if (_rechargeTypeModel.subTitle.length > 0) {
|
||||
self.subtitleLabel.text = _rechargeTypeModel.subTitle;
|
||||
self.subtitleLabel.hidden = NO;
|
||||
} else {
|
||||
self.subtitleLabel.hidden = YES;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (UIImageView *)logoImageView {
|
||||
if (!_logoImageView) {
|
||||
_logoImageView = [[UIImageView alloc] init];
|
||||
_logoImageView.userInteractionEnabled = YES;
|
||||
}
|
||||
return _logoImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:15];
|
||||
_titleLabel.textColor = [ThemeColor mainTextColor];
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)subtitleLabel {
|
||||
if (!_subtitleLabel) {
|
||||
_subtitleLabel = [[UILabel alloc] init];
|
||||
_subtitleLabel.font = [UIFont systemFontOfSize:10];
|
||||
_subtitleLabel.textColor = [ThemeColor secondTextColor];
|
||||
_subtitleLabel.hidden = YES;
|
||||
}
|
||||
return _subtitleLabel;
|
||||
}
|
||||
|
||||
- (UIButton *)chooseButton {
|
||||
if (!_chooseButton) {
|
||||
_chooseButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_chooseButton setImage:[UIImage imageNamed:@"mine_recharge_choose_normal"] forState:UIControlStateNormal];
|
||||
[_chooseButton setImage:[UIImage imageNamed:@"mine_recharge_choose_select"] forState:UIControlStateSelected];
|
||||
}
|
||||
return _chooseButton;
|
||||
}
|
||||
- (UIView *)lineView {
|
||||
if (!_lineView) {
|
||||
_lineView = [[UIView alloc] init];
|
||||
_lineView.backgroundColor = [ThemeColor dividerColor];
|
||||
}
|
||||
return _lineView;
|
||||
}
|
||||
|
||||
@end
|
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPEnterpriseHalfCollectionViewCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/6/8.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class EnterpriseRechargeInfoModel;
|
||||
@interface XPEnterpriseHalfCollectionViewCell : UICollectionViewCell
|
||||
@property (nonatomic,strong) EnterpriseRechargeInfoModel *infoModel;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,123 @@
|
||||
//
|
||||
// XPEnterpriseHalfCollectionViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/6/8.
|
||||
//
|
||||
|
||||
#import "XPEnterpriseHalfCollectionViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
///Model
|
||||
#import "EnterpriseRechargeListInfoModel.h"
|
||||
@interface XPEnterpriseHalfCollectionViewCell ()
|
||||
///背景
|
||||
@property (nonatomic,strong) UIView * backView;
|
||||
///钻石
|
||||
@property (nonatomic,strong) UIImageView *diamondImageView;
|
||||
///金币
|
||||
@property (nonatomic,strong) UILabel *coinLabel;
|
||||
///💰
|
||||
@property (nonatomic,strong) UILabel *moneyLabel;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPEnterpriseHalfCollectionViewCell
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
[self.contentView addSubview:self.backView];
|
||||
[self.backView addSubview:self.diamondImageView];
|
||||
[self.backView addSubview:self.coinLabel];
|
||||
[self.backView addSubview:self.moneyLabel];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.backView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
[self.diamondImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(20, 20));
|
||||
make.right.mas_equalTo(self.coinLabel.mas_left).offset(-2);
|
||||
make.centerY.mas_equalTo(self.coinLabel);
|
||||
}];
|
||||
|
||||
[self.coinLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.backView.mas_centerX).offset(11);
|
||||
make.bottom.mas_equalTo(self.backView.mas_centerY).offset(-1.5);
|
||||
}];
|
||||
|
||||
[self.moneyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.backView);
|
||||
make.top.mas_equalTo(self.backView.mas_centerY).offset(1.5);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setInfoModel:(EnterpriseRechargeInfoModel *)infoModel {
|
||||
_infoModel = infoModel;
|
||||
if (_infoModel) {
|
||||
self.coinLabel.text = [_infoModel.prodName stringByReplacingOccurrencesOfString:@"钻石" withString:@""];
|
||||
self.moneyLabel.text = [NSString stringWithFormat:@"%.2f元",_infoModel.money.floatValue];
|
||||
//设置是否选中
|
||||
if (_infoModel.isSelect) {
|
||||
self.backView.layer.borderColor = [ThemeColor appMainColor].CGColor;
|
||||
}else {
|
||||
self.backView.layer.borderColor = [ThemeColor appCellBackgroundColor].CGColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (UIImageView *)diamondImageView {
|
||||
if (!_diamondImageView) {
|
||||
_diamondImageView = [[UIImageView alloc] init];
|
||||
_diamondImageView.userInteractionEnabled = YES;
|
||||
_diamondImageView.image = [UIImage imageNamed:@"common_diamond"];
|
||||
}
|
||||
return _diamondImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)coinLabel {
|
||||
if (!_coinLabel) {
|
||||
_coinLabel = [[UILabel alloc] init];
|
||||
_coinLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
|
||||
_coinLabel.textColor = [ThemeColor mainTextColor];
|
||||
}
|
||||
return _coinLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)moneyLabel {
|
||||
if (!_moneyLabel) {
|
||||
_moneyLabel = [[UILabel alloc] init];
|
||||
_moneyLabel.font = [UIFont systemFontOfSize:12];
|
||||
_moneyLabel.textColor = [ThemeColor textThirdColor];
|
||||
_moneyLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _moneyLabel;
|
||||
}
|
||||
|
||||
- (UIView *)backView {
|
||||
if (!_backView) {
|
||||
_backView = [[UIView alloc] init];
|
||||
_backView.backgroundColor = [ThemeColor appCellBackgroundColor];
|
||||
_backView.layer.cornerRadius = 10;
|
||||
_backView.layer.borderWidth = 1.5;
|
||||
}
|
||||
return _backView;
|
||||
}
|
||||
|
||||
@end
|
@@ -0,0 +1,27 @@
|
||||
//
|
||||
// XPEnterpriseRechargePayTableViewCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/14.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "EnterpriseRechargeListInfoModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class XPEnterpriseRechargePayTableViewCell, EnterPrieseRechargeTypeItemModel;
|
||||
@protocol XPEnterpriseRechargePayTableViewCellDelegate <NSObject>
|
||||
|
||||
|
||||
- (void)xPEnterpriseRechargePayTableViewCell:(XPEnterpriseRechargePayTableViewCell *)view didChooseItem:(EnterPrieseRechargeTypeItemModel *)itemInfo;
|
||||
|
||||
@end
|
||||
@interface XPEnterpriseRechargePayTableViewCell : UITableViewCell
|
||||
///默认的充值类型
|
||||
@property (nonatomic,assign) RechargeDefaultPayType type;
|
||||
///当前选中的支付类型
|
||||
@property (nonatomic,strong, readonly) EnterPrieseRechargeTypeItemModel *currentItem;
|
||||
///代理
|
||||
@property (nonatomic,weak) id<XPEnterpriseRechargePayTableViewCellDelegate> delegate;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,312 @@
|
||||
//
|
||||
// XPEnterpriseRechargePayTableViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/14.
|
||||
//
|
||||
|
||||
#import "XPEnterpriseRechargePayTableViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
///Model
|
||||
#import "EnterPrieseRechargeTypeItemModel.h"
|
||||
///View
|
||||
#import "XPEnterpriseChargeTypeTableViewCell.h"
|
||||
|
||||
@interface XPEnterpriseRechargePayTableViewCell ()<UITableViewDelegate, UITableViewDataSource>
|
||||
///背景
|
||||
@property (nonatomic,strong) UIView * backView;
|
||||
///容器
|
||||
@property (nonatomic,strong) UIStackView *stackView;
|
||||
///显示充值方式
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
///列表
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
///查看更多支付方式
|
||||
@property (nonatomic,strong) UIView * moreView;
|
||||
///箭头
|
||||
@property (nonatomic,strong) UIButton *arrowButton;
|
||||
///更多方式
|
||||
@property (nonatomic,strong) UILabel *moreLabel;
|
||||
///充值的列表
|
||||
@property (nonatomic,strong) NSMutableArray<EnterPrieseRechargeTypeItemModel *> *rechargeTypeList;
|
||||
///当前选中的支付类型
|
||||
@property (nonatomic,strong) EnterPrieseRechargeTypeItemModel *currentItem;
|
||||
///支付宝
|
||||
@property (nonatomic,strong) EnterPrieseRechargeTypeItemModel *aliPayItem;
|
||||
///微信
|
||||
@property (nonatomic,strong) EnterPrieseRechargeTypeItemModel *wxPayItem;
|
||||
@end
|
||||
|
||||
@implementation XPEnterpriseRechargePayTableViewCell
|
||||
|
||||
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
[self.contentView addSubview:self.backView];
|
||||
|
||||
[self.backView addSubview:self.stackView];
|
||||
|
||||
[self.stackView addArrangedSubview:self.titleLabel];
|
||||
[self.stackView addArrangedSubview:self.tableView];
|
||||
[self.stackView addArrangedSubview:self.moreView];
|
||||
|
||||
[self.moreView addSubview:self.moreLabel];
|
||||
[self.moreView addSubview:self.arrowButton];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.backView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.contentView).inset(15);
|
||||
make.top.bottom.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.backView).inset(10);
|
||||
make.top.mas_equalTo(self.backView).offset(15);
|
||||
make.bottom.mas_equalTo(self.backView);
|
||||
}];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(15);
|
||||
}];
|
||||
|
||||
[self.moreView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(50);
|
||||
}];
|
||||
|
||||
[self.moreLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.moreView).offset(-7);
|
||||
make.centerY.mas_equalTo(self.moreView);
|
||||
}];
|
||||
|
||||
[self.arrowButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(11, 20));
|
||||
make.centerY.mas_equalTo(self.moreView);
|
||||
make.left.mas_equalTo(self.moreLabel.mas_right).offset(3);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDelegate And UITableViewDataSource
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return self.rechargeTypeList.count;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return 50;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
XPEnterpriseChargeTypeTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPEnterpriseChargeTypeTableViewCell class])];
|
||||
EnterPrieseRechargeTypeItemModel * infoModel = [self.rechargeTypeList objectAtIndex:indexPath.row];
|
||||
if (infoModel.type == self.currentItem.type) {
|
||||
infoModel.isSelect = YES;
|
||||
} else {
|
||||
infoModel.isSelect = NO;
|
||||
}
|
||||
infoModel.isLastOne = (indexPath.row == (self.rechargeTypeList.count - 1));
|
||||
cell.rechargeTypeModel = infoModel;
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (self.rechargeTypeList.count > 0) {
|
||||
if (self.rechargeTypeList.count == 1) {
|
||||
return;
|
||||
}
|
||||
self.currentItem = [self.rechargeTypeList objectAtIndex:indexPath.row];
|
||||
[self.tableView reloadData];
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPEnterpriseRechargePayTableViewCell:didChooseItem:)]) {
|
||||
[self.delegate xPEnterpriseRechargePayTableViewCell:self didChooseItem:self.currentItem];
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma mark - Event Response
|
||||
- (void)tapMoreTypeRecognizer {
|
||||
self.arrowButton.selected = !self.arrowButton.selected;
|
||||
if (self.type == RechargeDefaultPayType_WX) {
|
||||
self.moreView.hidden = YES;
|
||||
if (![self.rechargeTypeList containsObject:self.aliPayItem]) {
|
||||
[self.rechargeTypeList addObject:self.aliPayItem];
|
||||
}
|
||||
[self.tableView reloadData];
|
||||
} else if(self.type == RechargeDefaultPayType_ZFB) {
|
||||
self.moreView.hidden = YES;
|
||||
if (![self.rechargeTypeList containsObject:self.wxPayItem]) {
|
||||
[self.rechargeTypeList addObject:self.wxPayItem];
|
||||
}
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setType:(RechargeDefaultPayType)type {
|
||||
_type =type;
|
||||
[self.rechargeTypeList removeAllObjects];
|
||||
switch (_type) {
|
||||
case RechargeDefaultPayType_WX:
|
||||
{
|
||||
[self.rechargeTypeList addObject:self.wxPayItem];
|
||||
self.currentItem = self.wxPayItem;
|
||||
self.moreView.hidden = NO;
|
||||
}
|
||||
break;
|
||||
case RechargeDefaultPayType_ZFB:
|
||||
{
|
||||
[self.rechargeTypeList addObject:self.aliPayItem];
|
||||
self.currentItem = self.aliPayItem;
|
||||
self.moreView.hidden = NO;
|
||||
}
|
||||
break;
|
||||
case RechargeDefaultPayType_WX_ZFB:
|
||||
{
|
||||
[self.rechargeTypeList addObject:self.wxPayItem];
|
||||
[self.rechargeTypeList addObject:self.aliPayItem];
|
||||
self.currentItem = self.wxPayItem;
|
||||
self.moreView.hidden = YES;
|
||||
}
|
||||
break;
|
||||
case RechargeDefaultPayType_ZFB_WX:
|
||||
{
|
||||
[self.rechargeTypeList addObject:self.aliPayItem];
|
||||
[self.rechargeTypeList addObject:self.wxPayItem];
|
||||
self.currentItem = self.aliPayItem;
|
||||
self.moreView.hidden = YES;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
[self.rechargeTypeList addObject:self.aliPayItem];
|
||||
[self.rechargeTypeList addObject:self.wxPayItem];
|
||||
self.currentItem = self.aliPayItem;
|
||||
self.moreView.hidden = YES;
|
||||
}
|
||||
break;
|
||||
}
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
- (UITableView *)tableView {
|
||||
if (!_tableView) {
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
|
||||
_tableView.delegate = self;
|
||||
_tableView.dataSource = self;
|
||||
_tableView.tableFooterView = [UIView new];
|
||||
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
_tableView.backgroundColor = [UIColor clearColor];
|
||||
if (@available(iOS 11.0, *)) {
|
||||
_tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
}
|
||||
[_tableView registerClass:[XPEnterpriseChargeTypeTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPEnterpriseChargeTypeTableViewCell class])];
|
||||
}
|
||||
return _tableView;
|
||||
}
|
||||
|
||||
- (NSMutableArray<EnterPrieseRechargeTypeItemModel *> *)rechargeTypeList {
|
||||
if (!_rechargeTypeList) {
|
||||
_rechargeTypeList = [NSMutableArray array];
|
||||
}
|
||||
return _rechargeTypeList;
|
||||
}
|
||||
|
||||
- (EnterPrieseRechargeTypeItemModel *)aliPayItem {
|
||||
if (!_aliPayItem) {
|
||||
EnterPrieseRechargeTypeItemModel * zfbItem = [[EnterPrieseRechargeTypeItemModel alloc] init];
|
||||
zfbItem.imageName = @"mine_recharge_alipay";
|
||||
zfbItem.title = @"支付宝";
|
||||
zfbItem.isSelect = YES;
|
||||
zfbItem.type = RechargeType_ZFB;
|
||||
_aliPayItem = zfbItem;
|
||||
}
|
||||
return _aliPayItem;
|
||||
}
|
||||
|
||||
- (EnterPrieseRechargeTypeItemModel *)wxPayItem {
|
||||
if (!_wxPayItem) {
|
||||
EnterPrieseRechargeTypeItemModel * wxItem = [[EnterPrieseRechargeTypeItemModel alloc] init];
|
||||
wxItem.imageName = @"mine_recharge_wechat";
|
||||
wxItem.title = @"微信";
|
||||
wxItem.type = RechargeType_WX;
|
||||
_wxPayItem = wxItem;
|
||||
}
|
||||
return _wxPayItem;
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:13];
|
||||
_titleLabel.textColor = [ThemeColor mainTextColor];
|
||||
_titleLabel.text = @"支付方式";
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
- (UIStackView *)stackView {
|
||||
if (!_stackView) {
|
||||
_stackView = [[UIStackView alloc] init];
|
||||
_stackView.axis = UILayoutConstraintAxisVertical;
|
||||
_stackView.distribution = UIStackViewDistributionFill;
|
||||
_stackView.alignment = UIStackViewAlignmentFill;
|
||||
_stackView.spacing = 0;
|
||||
}
|
||||
return _stackView;
|
||||
}
|
||||
|
||||
- (UIView *)backView {
|
||||
if (!_backView) {
|
||||
_backView = [[UIView alloc] init];
|
||||
_backView.backgroundColor = [ThemeColor appCellBackgroundColor];
|
||||
_backView.layer.masksToBounds = YES;
|
||||
_backView.layer.cornerRadius = 10;
|
||||
}
|
||||
return _backView;
|
||||
}
|
||||
|
||||
- (UIView *)moreView {
|
||||
if (!_moreView) {
|
||||
_moreView = [[UIView alloc] init];
|
||||
_moreView.backgroundColor = [UIColor clearColor];
|
||||
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapMoreTypeRecognizer)];
|
||||
[_moreView addGestureRecognizer:tap];
|
||||
}
|
||||
return _moreView;
|
||||
}
|
||||
|
||||
|
||||
- (UILabel *)moreLabel {
|
||||
if (!_moreLabel) {
|
||||
_moreLabel = [[UILabel alloc] init];
|
||||
_moreLabel.font = [UIFont systemFontOfSize:13];
|
||||
_moreLabel.textColor = [ThemeColor mainTextColor];
|
||||
_moreLabel.text = @"展开更多支付方式";
|
||||
}
|
||||
return _moreLabel;
|
||||
}
|
||||
|
||||
- (UIButton *)arrowButton {
|
||||
if (!_arrowButton) {
|
||||
_arrowButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_arrowButton setImage:[UIImage imageNamed:@"room_setting_arrow"] forState:UIControlStateNormal];
|
||||
[_arrowButton setImage:[UIImage imageNamed:@"room_setting_arrow"] forState:UIControlStateSelected];
|
||||
_arrowButton.transform = CGAffineTransformMakeRotation(M_PI / 2);
|
||||
}
|
||||
return _arrowButton;
|
||||
}
|
||||
|
||||
|
||||
@end
|
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPEnterprisePayTypeView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/6/8.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class EnterPrieseRechargeTypeItemModel;
|
||||
@interface XPEnterprisePayTypeView : UIView
|
||||
@property (nonatomic,strong) EnterPrieseRechargeTypeItemModel *rechargeTypeModel;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,102 @@
|
||||
//
|
||||
// XPEnterprisePayTypeView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/6/8.
|
||||
//
|
||||
|
||||
#import "XPEnterprisePayTypeView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
///Model
|
||||
#import "EnterPrieseRechargeTypeItemModel.h"
|
||||
|
||||
@interface XPEnterprisePayTypeView ()
|
||||
|
||||
///显示logo
|
||||
@property (nonatomic,strong) UIImageView *logoImageView;
|
||||
///标题
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
///是否被选中
|
||||
@property (nonatomic,strong) UIImageView *chooseImageView;
|
||||
@end
|
||||
|
||||
|
||||
@implementation XPEnterprisePayTypeView
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [ThemeColor appCellBackgroundColor];
|
||||
self.layer.masksToBounds = YES;
|
||||
self.layer.cornerRadius = 8;
|
||||
[self addSubview:self.logoImageView];
|
||||
[self addSubview:self.titleLabel];
|
||||
[self addSubview:self.chooseImageView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.logoImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(28, 28));
|
||||
make.centerY.mas_equalTo(self);
|
||||
make.left.mas_equalTo(self).offset(16);
|
||||
}];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self);
|
||||
make.left.mas_equalTo(self.logoImageView.mas_right).offset(16);
|
||||
}];
|
||||
|
||||
[self.chooseImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(24, 24));
|
||||
make.right.bottom.mas_equalTo(self);
|
||||
}];
|
||||
}
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setRechargeTypeModel:(EnterPrieseRechargeTypeItemModel *)rechargeTypeModel {
|
||||
_rechargeTypeModel = rechargeTypeModel;
|
||||
if (_rechargeTypeModel) {
|
||||
_logoImageView.image = [UIImage imageNamed:_rechargeTypeModel.imageName];
|
||||
_titleLabel.text = _rechargeTypeModel.title;
|
||||
_chooseImageView.hidden = !_rechargeTypeModel.isSelect;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (UIImageView *)logoImageView {
|
||||
if (!_logoImageView) {
|
||||
_logoImageView = [[UIImageView alloc] init];
|
||||
_logoImageView.userInteractionEnabled = YES;
|
||||
}
|
||||
return _logoImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium];
|
||||
_titleLabel.textColor = [ThemeColor mainTextColor];
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
- (UIImageView *)chooseImageView {
|
||||
if (!_chooseImageView) {
|
||||
_chooseImageView = [[UIImageView alloc] init];
|
||||
_chooseImageView.userInteractionEnabled = YES;
|
||||
_chooseImageView.image = [UIImage imageNamed:@"mine_recharge_halt_pay_choose"];
|
||||
_chooseImageView.hidden = YES;
|
||||
}
|
||||
return _chooseImageView;
|
||||
}
|
||||
|
||||
@end
|
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// XPEnterpriseRechargeFootView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/14.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class XPEnterpriseRechargeFootView;
|
||||
@protocol XPEnterpriseRechargeFootViewDelegate <NSObject>
|
||||
///点击了充值按钮
|
||||
- (void)xPEnterpriseRechargeFootView:(XPEnterpriseRechargeFootView *)view didClickRecharge:(UIButton *)sender;
|
||||
///点击了充值协议
|
||||
- (void)xPEnterpriseRechargeFootView:(XPEnterpriseRechargeFootView *)view didClickRechargeProtocol:(UILabel *)label;
|
||||
@end
|
||||
|
||||
@interface XPEnterpriseRechargeFootView : UIView
|
||||
///代理
|
||||
@property (nonatomic,weak) id<XPEnterpriseRechargeFootViewDelegate> delegate;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,119 @@
|
||||
//
|
||||
// XPEnterpriseRechargeFootView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/14.
|
||||
//
|
||||
|
||||
#import "XPEnterpriseRechargeFootView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <YYText/YYText.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "UIImage+Utils.h"
|
||||
#import "XPMacro.h"
|
||||
|
||||
@interface XPEnterpriseRechargeFootView ()
|
||||
///充值按钮
|
||||
@property (nonatomic,strong) UIButton *rechargeButton;
|
||||
///充值协议
|
||||
@property (nonatomic,strong) YYLabel *privacyLable;
|
||||
///联系客服
|
||||
@property (nonatomic,strong) UILabel *descriptionLabel;
|
||||
@end
|
||||
|
||||
@implementation XPEnterpriseRechargeFootView
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self addSubview:self.rechargeButton];
|
||||
[self addSubview:self.privacyLable];
|
||||
[self addSubview:self.descriptionLabel];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
self.frame = CGRectMake(0, 0, KScreenWidth, kNavigationHeight +190);
|
||||
|
||||
[self.rechargeButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(20);
|
||||
make.left.right.mas_equalTo(self).inset(47);
|
||||
make.height.mas_equalTo(44);
|
||||
}];
|
||||
|
||||
[self.privacyLable mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.rechargeButton.mas_bottom).offset(15);
|
||||
make.centerX.mas_equalTo(self);
|
||||
}];
|
||||
|
||||
[self.descriptionLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self);
|
||||
make.top.mas_equalTo(self.privacyLable.mas_bottom).offset(10);
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Event Response
|
||||
- (void)rechargeButtonAction:(UIButton *)sender {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPEnterpriseRechargeFootView:didClickRecharge:)]) {
|
||||
[self.delegate xPEnterpriseRechargeFootView:self didClickRecharge:sender];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (UIButton *)rechargeButton {
|
||||
if (!_rechargeButton) {
|
||||
_rechargeButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_rechargeButton setTitle:@"确认充值" forState:UIControlStateNormal];
|
||||
_rechargeButton.titleLabel.font = [UIFont systemFontOfSize:15];
|
||||
[_rechargeButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
|
||||
[_rechargeButton setTitleColor:[ThemeColor confirmButtonTextColor] forState:UIControlStateNormal];
|
||||
_rechargeButton.layer.masksToBounds = YES;
|
||||
_rechargeButton.layer.cornerRadius = 22;
|
||||
[_rechargeButton addTarget:self action:@selector(rechargeButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _rechargeButton;
|
||||
}
|
||||
|
||||
- (YYLabel *)privacyLable {
|
||||
if (!_privacyLable) {
|
||||
_privacyLable = [[YYLabel alloc] init];
|
||||
NSMutableAttributedString *attString = [[NSMutableAttributedString alloc] initWithString:@"已阅读并同意"];
|
||||
attString.yy_color = [ThemeColor secondTextColor];
|
||||
attString.yy_font = [UIFont systemFontOfSize:12];
|
||||
NSMutableAttributedString *rechargeAttString = [[NSMutableAttributedString alloc] initWithString:@"《用户充值协议》" attributes:@{NSForegroundColorAttributeName:[ThemeColor appMainColor]}];
|
||||
@kWeakify(self);
|
||||
[rechargeAttString yy_setTextHighlightRange:NSMakeRange(0, rechargeAttString.length) color:nil backgroundColor:nil userInfo:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||
@kStrongify(self);
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPEnterpriseRechargeFootView:didClickRechargeProtocol:)]) {
|
||||
[self.delegate xPEnterpriseRechargeFootView:self didClickRechargeProtocol:self.privacyLable];
|
||||
}
|
||||
|
||||
} longPressAction:nil];
|
||||
[attString appendAttributedString:rechargeAttString];
|
||||
_privacyLable.textAlignment = NSTextAlignmentCenter;
|
||||
_privacyLable.attributedText = attString;
|
||||
}
|
||||
return _privacyLable;
|
||||
}
|
||||
|
||||
- (UILabel *)descriptionLabel {
|
||||
if (!_descriptionLabel) {
|
||||
_descriptionLabel = [[UILabel alloc] init];
|
||||
_descriptionLabel.font = [UIFont systemFontOfSize:12];
|
||||
_descriptionLabel.textColor = [ThemeColor appMainColor];
|
||||
_descriptionLabel.text = @"如有任何问题请咨询客服,魔力号:88001";
|
||||
_descriptionLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _descriptionLabel;
|
||||
}
|
||||
|
||||
|
||||
@end
|
@@ -1,16 +1,15 @@
|
||||
//
|
||||
// XPMineRechageHeadView.h
|
||||
// XPEnterpriseRechargeHeaderView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/24.
|
||||
// Created by 冯硕 on 2022/5/14.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class WalletInfoModel;
|
||||
@interface XPMineRechageHeadView : UIView
|
||||
///钱包信息
|
||||
@interface XPEnterpriseRechargeHeaderView : UIView
|
||||
@property (nonatomic,strong) WalletInfoModel *walletInfo;
|
||||
@end
|
||||
|
@@ -1,11 +1,11 @@
|
||||
//
|
||||
// XPMineRechageHeadView.m
|
||||
// XPEnterpriseRechargeHeaderView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/24.
|
||||
// Created by 冯硕 on 2022/5/14.
|
||||
//
|
||||
|
||||
#import "XPMineRechageHeadView.h"
|
||||
#import "XPEnterpriseRechargeHeaderView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
@@ -14,9 +14,7 @@
|
||||
///Model
|
||||
#import "WalletInfoModel.h"
|
||||
|
||||
@interface XPMineRechageHeadView ()
|
||||
///大的背景
|
||||
@property (nonatomic,strong) UIImageView *backImageView;
|
||||
@interface XPEnterpriseRechargeHeaderView ()
|
||||
///底部的背景
|
||||
@property (nonatomic,strong) UIImageView *bottomBackImg;
|
||||
///显示钻石图标
|
||||
@@ -29,7 +27,7 @@
|
||||
@end
|
||||
|
||||
|
||||
@implementation XPMineRechageHeadView
|
||||
@implementation XPEnterpriseRechargeHeaderView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
@@ -41,21 +39,15 @@
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initView {
|
||||
[self addSubview:self.backImageView];
|
||||
[self.backImageView addSubview:self.bottomBackImg];
|
||||
[self addSubview:self.bottomBackImg];
|
||||
[self.bottomBackImg addSubview:self.coinImageView];
|
||||
[self.bottomBackImg addSubview:self.coinLabel];
|
||||
[self.bottomBackImg addSubview:self.amountLabel];
|
||||
}
|
||||
|
||||
- (void)initContrations {
|
||||
self.frame = CGRectMake(0, 0, KScreenWidth, 190 + kSafeAreaTopHeight);
|
||||
[self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self);
|
||||
}];
|
||||
|
||||
[self.bottomBackImg mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.bottom.mas_equalTo(self.backImageView);
|
||||
make.left.right.bottom.mas_equalTo(self);
|
||||
make.height.mas_equalTo(110);
|
||||
}];
|
||||
|
||||
@@ -84,17 +76,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (UIImageView *)backImageView {
|
||||
if (!_backImageView) {
|
||||
_backImageView = [[UIImageView alloc] init];
|
||||
_backImageView.userInteractionEnabled = YES;
|
||||
_backImageView.image = [UIImage imageNamed:@"mine_recharge_header_bg"];
|
||||
_backImageView.layer.masksToBounds = YES;
|
||||
_backImageView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
}
|
||||
return _backImageView;
|
||||
}
|
||||
|
||||
- (UIImageView *)bottomBackImg {
|
||||
if (!_bottomBackImg) {
|
||||
_bottomBackImg = [[UIImageView alloc] init];
|
||||
@@ -120,7 +101,7 @@
|
||||
_coinLabel = [[UILabel alloc] init];
|
||||
_coinLabel.text = @"我的钻石";
|
||||
_coinLabel.font = [UIFont systemFontOfSize:13];
|
||||
_coinLabel.textColor = [UIColor whiteColor];
|
||||
_coinLabel.textColor = [ThemeColor mainTextColor];
|
||||
}
|
||||
return _coinLabel;
|
||||
}
|
||||
@@ -128,11 +109,10 @@
|
||||
- (UILabel *)amountLabel {
|
||||
if (!_amountLabel) {
|
||||
_amountLabel = [[UILabel alloc] init];
|
||||
_amountLabel.font = [UIFont boldSystemFontOfSize:36];
|
||||
_amountLabel.textColor = [ThemeColor appMainColor];
|
||||
_amountLabel.font = [UIFont systemFontOfSize:24 weight:UIFontWeightMedium];
|
||||
_amountLabel.textColor = [ThemeColor mainTextColor];
|
||||
_amountLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _amountLabel;
|
||||
}
|
||||
|
||||
@end
|
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// XPEnterpriseFirstRechargePayView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/16.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@interface XPEnterpriseFirstRechargePayView : UIView
|
||||
///充值的id
|
||||
@property (nonatomic,copy) NSString *chargeProdId;
|
||||
///充值的金额
|
||||
@property (nonatomic,copy) NSString *chargeMoney;
|
||||
///房主的uid
|
||||
@property (nonatomic,copy) NSString *roomUid;
|
||||
///首充的vc
|
||||
@property (nonatomic,weak) UIViewController *firstrechargeVC;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,280 @@
|
||||
//
|
||||
// XPEnterpriseFirstRechargePayView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/16.
|
||||
//
|
||||
|
||||
#import "XPEnterpriseFirstRechargePayView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <AlipaySDK/AlipaySDK.h>
|
||||
#import <WXApi.h>
|
||||
#import <WXApiObject.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "XPMacro.h"
|
||||
#import "UIImage+Utils.h"
|
||||
#import "Api+EnterpriseRecharge.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "YYUtility.h"
|
||||
#import "XCHUDTool.h"
|
||||
#import "XCCurrentVCStackManager.h"
|
||||
#import "TTPopup.h"
|
||||
///Model
|
||||
#import "EnterpriseRechargeListInfoModel.h"
|
||||
#import "EnterPrieseRechargeTypeItemModel.h"
|
||||
///View
|
||||
#import "XPEnterpriseRechargePayTableViewCell.h"
|
||||
#import "XPWebViewController.h"
|
||||
|
||||
@interface XPEnterpriseFirstRechargePayView ()<UITableViewDelegate, UITableViewDataSource, XPEnterpriseRechargePayTableViewCellDelegate>
|
||||
///
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
///显示金额
|
||||
@property (nonatomic,strong) UILabel *moneyLabel;
|
||||
///列表
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
///支付
|
||||
@property (nonatomic,strong) UIButton *payButton;
|
||||
///充值信息
|
||||
@property (nonatomic,strong) EnterpriseRechargeListInfoModel *listInfo;
|
||||
///支付类型
|
||||
@property (nonatomic,assign) RechargeDefaultPayType payType;
|
||||
///当前选中的支付渠道
|
||||
@property (nonatomic,strong) EnterPrieseRechargeTypeItemModel *currentItem;
|
||||
@end
|
||||
|
||||
@implementation XPEnterpriseFirstRechargePayView
|
||||
|
||||
- (void)dealloc {
|
||||
NSLog(@"aaaaaa");
|
||||
}
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initData];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initData {
|
||||
[Api enterpriseRechargeList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if (code == 200) {
|
||||
EnterpriseRechargeListInfoModel * listInfo = [EnterpriseRechargeListInfoModel modelWithDictionary:data.data];
|
||||
self.payType = listInfo.defaultPay;
|
||||
} else {
|
||||
self.payType = RechargeDefaultPayType_ZFB;
|
||||
}
|
||||
[self.tableView reloadData];
|
||||
} channelType:@"1"];
|
||||
}
|
||||
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [ThemeColor appCellBackgroundColor];
|
||||
[self addSubview:self.titleLabel];
|
||||
[self addSubview:self.moneyLabel];
|
||||
[self addSubview:self.tableView];
|
||||
[self addSubview:self.payButton];
|
||||
UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, KScreenWidth, 310) byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(12, 12)];
|
||||
CAShapeLayer *maskLayer = [CAShapeLayer layer];
|
||||
maskLayer.path = path.CGPath;
|
||||
self.layer.mask = maskLayer;
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(KScreenWidth);
|
||||
make.height.mas_equalTo(310);
|
||||
}];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.mas_centerX);
|
||||
make.top.mas_equalTo(15);
|
||||
}];
|
||||
[self.moneyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.mas_centerX);
|
||||
make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(15);
|
||||
}];
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.moneyLabel.mas_bottom).offset(10);
|
||||
make.left.right.mas_equalTo(self);
|
||||
make.height.mas_equalTo(130);
|
||||
}];
|
||||
[self.payButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(45);
|
||||
make.left.right.mas_equalTo(self).inset(47);
|
||||
make.bottom.mas_equalTo(self.mas_bottom).offset(-15);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDelegate And UITableViewDataSource
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return 130;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
XPEnterpriseRechargePayTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPEnterpriseRechargePayTableViewCell class])];
|
||||
cell.delegate = self;
|
||||
cell.type = self.payType;
|
||||
return cell;
|
||||
}
|
||||
|
||||
#pragma mark - XPEnterpriseRechargePayTableViewCellDelegate
|
||||
- (void)xPEnterpriseRechargePayTableViewCell:(XPEnterpriseRechargePayTableViewCell *)view didChooseItem:(EnterPrieseRechargeTypeItemModel *)itemInfo {
|
||||
self.currentItem = itemInfo;
|
||||
}
|
||||
|
||||
#pragma mark - Event Response
|
||||
- (void)payButtonAction:(UIButton *)sender {
|
||||
if (self.currentItem == nil) {
|
||||
XPEnterpriseRechargePayTableViewCell * cell = (XPEnterpriseRechargePayTableViewCell *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
|
||||
self.currentItem = cell.currentItem;
|
||||
}
|
||||
NSString * payChannel= self.currentItem.type == RechargeType_WX ? @"wx" : @"alipay_v2";
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
||||
NSString * clientIp= [YYUtility ipAddress];
|
||||
[XCHUDTool showLoading];
|
||||
[Api requestPay:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
[XCHUDTool hideHUD];
|
||||
if (code == 200) {
|
||||
[TTPopup dismiss];
|
||||
id infoData = data.data;
|
||||
if ([payChannel isEqualToString:@"alipay_v2"]) {
|
||||
if ([infoData isKindOfClass:[NSDictionary class]]) {
|
||||
if ([[infoData objectForKey:@"payType"] isEqualToString:@"h5"]) {
|
||||
if (self.firstrechargeVC) {
|
||||
[self.firstrechargeVC dismissViewControllerAnimated:NO completion:^{
|
||||
XPWebViewController *webView = [[XPWebViewController alloc] init];
|
||||
webView.url = [infoData objectForKey:@"orderData"];
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webView animated:YES];
|
||||
}];
|
||||
} else {
|
||||
XPWebViewController *webView = [[XPWebViewController alloc] init];
|
||||
webView.url = [infoData objectForKey:@"orderData"];
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webView animated:YES];
|
||||
}
|
||||
}else if ([[infoData objectForKey:@"payType"] isEqualToString:@"native"]) {
|
||||
if (self.firstrechargeVC) {
|
||||
[self.firstrechargeVC dismissViewControllerAnimated:NO completion:nil];
|
||||
}
|
||||
NSString * signedStr = [infoData objectForKey:@"orderData"];
|
||||
NSString * scheme = @"daeplayapp";
|
||||
[[AlipaySDK defaultService] payOrder:signedStr fromScheme:scheme callback:^(NSDictionary *resultDic) {
|
||||
|
||||
}];
|
||||
}
|
||||
}
|
||||
} else if ([payChannel isEqualToString:@"alipay"]) {
|
||||
if (self.firstrechargeVC) {
|
||||
[self.firstrechargeVC dismissViewControllerAnimated:NO completion:nil];
|
||||
}
|
||||
if ([data isKindOfClass:[NSString class]]) {
|
||||
NSString * scheme = @"daeplayapp";
|
||||
NSString * signedStr = [infoData objectForKey:@"orderData"];
|
||||
[[AlipaySDK defaultService] payOrder:signedStr fromScheme:scheme callback:^(NSDictionary *resultDic) {
|
||||
|
||||
}];
|
||||
}
|
||||
}else if ([payChannel isEqualToString:@"wx"]){
|
||||
if ([infoData isKindOfClass:[NSDictionary class]]) {
|
||||
if (self.firstrechargeVC) {
|
||||
[self.firstrechargeVC dismissViewControllerAnimated:NO completion:nil];
|
||||
}
|
||||
|
||||
// 微信支付
|
||||
if (((NSString *)infoData[@"appid"]).length > 0) {
|
||||
[WXApi registerApp:infoData[@"appid"] universalLink:@"https://f02efc69cbad775287063e8ee37733a5.share2dlink.com/"];
|
||||
}
|
||||
PayReq *req = [[PayReq alloc] init];
|
||||
NSDictionary * dict = infoData;
|
||||
NSMutableString *stamp = [dict objectForKey:@"timestamp"];
|
||||
req.partnerId = [dict objectForKey:@"partnerid"];
|
||||
req.prepayId = [dict objectForKey:@"prepayid"];
|
||||
req.nonceStr = [dict objectForKey:@"noncestr"];
|
||||
req.timeStamp = stamp.intValue;
|
||||
req.package = @"Sign=WXPay";
|
||||
req.sign = [dict objectForKey:@"sign"];
|
||||
[WXApi sendReq:req completion:^(BOOL success) {
|
||||
if (success) {
|
||||
NSLog(@"********调起微信支付成功");
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
[XCHUDTool showErrorWithMessage:msg];
|
||||
}
|
||||
} chargeProdId:self.chargeProdId payChannel:payChannel clientIp:clientIp uid:uid ticket:ticket roomUid:self.roomUid];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setChargeMoney:(NSString *)chargeMoney {
|
||||
_chargeMoney = chargeMoney;
|
||||
if (_chargeMoney.length > 0) {
|
||||
self.moneyLabel.text = [NSString stringWithFormat:@"¥%@", _chargeMoney];
|
||||
}
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:16];
|
||||
_titleLabel.textColor = [ThemeColor mainTextColor];
|
||||
_titleLabel.text = @"支付";
|
||||
_titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)moneyLabel {
|
||||
if (!_moneyLabel) {
|
||||
_moneyLabel = [[UILabel alloc] init];
|
||||
_moneyLabel.font = [UIFont systemFontOfSize:28];
|
||||
_moneyLabel.textColor = [ThemeColor mainTextColor];
|
||||
_moneyLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _moneyLabel;
|
||||
}
|
||||
|
||||
- (UITableView *)tableView {
|
||||
if (!_tableView) {
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
|
||||
_tableView.delegate = self;
|
||||
_tableView.dataSource = self;
|
||||
_tableView.tableFooterView = [UIView new];
|
||||
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
_tableView.backgroundColor = [UIColor clearColor];
|
||||
if (@available(iOS 11.0, *)) {
|
||||
_tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
}
|
||||
[_tableView registerClass:[XPEnterpriseRechargePayTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPEnterpriseRechargePayTableViewCell class])];
|
||||
}
|
||||
return _tableView;
|
||||
}
|
||||
|
||||
- (UIButton *)payButton {
|
||||
if (!_payButton) {
|
||||
_payButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_payButton setTitle:@"确认支付" forState:UIControlStateNormal];
|
||||
[_payButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
_payButton.titleLabel.font = [UIFont systemFontOfSize:15];
|
||||
[_payButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
|
||||
_payButton.layer.masksToBounds = YES;
|
||||
_payButton.layer.cornerRadius = 45/2;
|
||||
[_payButton addTarget:self action:@selector(payButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _payButton;
|
||||
}
|
||||
|
||||
@end
|
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// XPEnterpriseTarotPayView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/17.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPEnterpriseTarotPayView : UIView
|
||||
|
||||
@property (nonatomic,copy) NSString *url;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,75 @@
|
||||
//
|
||||
// XPEnterpriseTarotPayView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/17.
|
||||
//
|
||||
|
||||
#import "XPEnterpriseTarotPayView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///View
|
||||
#import "XPWebViewController.h"
|
||||
@interface XPEnterpriseTarotPayView ()
|
||||
@property (nonatomic, strong) XPWebViewController *webVC;
|
||||
@end
|
||||
|
||||
@implementation XPEnterpriseTarotPayView
|
||||
|
||||
- (void)dealloc {
|
||||
NSLog(@"aaaaaaa");
|
||||
}
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.layer.masksToBounds = YES;
|
||||
self.layer.cornerRadius = 15;
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
[self addSubview:self.webVC.view];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.webVC.view mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self);;
|
||||
make.top.mas_equalTo(self);
|
||||
make.bottom.mas_equalTo(self);
|
||||
}];
|
||||
[self.webVC.webview mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.webVC.view);
|
||||
}];
|
||||
}
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setUrl:(NSString *)url {
|
||||
_url = url;
|
||||
self.webVC.url = url;
|
||||
}
|
||||
|
||||
- (XPWebViewController *)webVC {
|
||||
if (_webVC == nil) {
|
||||
_webVC = [[XPWebViewController alloc] init];
|
||||
_webVC.view.backgroundColor = [UIColor clearColor];
|
||||
_webVC.webview.backgroundColor = UIColor.clearColor;
|
||||
_webVC.webview.scrollView.backgroundColor = UIColor.clearColor;
|
||||
_webVC.webview.opaque = NO;
|
||||
__weak typeof(self) weakSelf = self;
|
||||
_webVC.urlLoadCompleted = ^(BOOL result, NSError * _Nullable error) {
|
||||
UIColor *aimColor = result ? UIColor.clearColor : UIColor.whiteColor;
|
||||
if (weakSelf.webVC.webview.backgroundColor != aimColor) {
|
||||
weakSelf.webVC.webview.backgroundColor = aimColor;
|
||||
}
|
||||
};
|
||||
}
|
||||
return _webVC;
|
||||
}
|
||||
|
||||
|
||||
@end
|
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// XPMineHalfRechargeViewController.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/6/8.
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMineHalfRechargeViewController : MvpViewController
|
||||
@property (nonatomic,copy) NSString *roomUid;
|
||||
@property (nonatomic,weak) UINavigationController *currentNav;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,616 @@
|
||||
//
|
||||
// XPMineHalfRechargeViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/6/8.
|
||||
//
|
||||
|
||||
#import "XPMineHalfRechargeViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <AlipaySDK/AlipaySDK.h>
|
||||
#import <WXApi.h>
|
||||
#import <WXApiObject.h>
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
#import <YYText/YYText.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "XPMacro.h"
|
||||
#import "XPConstant.h"
|
||||
#import "UIImage+Utils.h"
|
||||
///Model
|
||||
#import "EnterpriseRechargeListInfoModel.h"
|
||||
#import "EnterPrieseRechargeTypeItemModel.h"
|
||||
#import "AttachmentModel.h"
|
||||
#import "WalletInfoModel.h"
|
||||
///P
|
||||
#import "XPEnterpriseRechargePresenter.h"
|
||||
#import "XPEnterpriseRechargeProtocol.h"
|
||||
///View
|
||||
#import "XPEnterpriseHalfCollectionViewCell.h"
|
||||
#import "XPEnterprisePayTypeView.h"
|
||||
#import "XPWebViewController.h"
|
||||
@interface XPMineHalfRechargeViewController ()<XPEnterpriseRechargeProtocol,UICollectionViewDelegate, UICollectionViewDataSource, NIMSystemNotificationManagerDelegate>
|
||||
///数据源
|
||||
@property (nonatomic,strong) NSMutableArray<EnterpriseRechargeInfoModel *> *datasource;
|
||||
///顶部的View
|
||||
@property (nonatomic,strong) UIView * topView;
|
||||
///内容
|
||||
@property (nonatomic,strong) UIView * contentView;
|
||||
///显示标题
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
///显示钻石
|
||||
@property (nonatomic,strong) UILabel *diamondLabel;
|
||||
///未成年禁止充值
|
||||
@property (nonatomic,strong) UILabel *limitLabel;
|
||||
///列表
|
||||
@property (nonatomic,strong) UICollectionView *collectionView;
|
||||
///支付方式
|
||||
@property (nonatomic,strong) UILabel *payTypeLabel;
|
||||
///支付
|
||||
@property (nonatomic,strong) UIStackView *payStackView;
|
||||
///微信
|
||||
@property (nonatomic,strong) XPEnterprisePayTypeView *wxPayView;
|
||||
///支付宝
|
||||
@property (nonatomic,strong) XPEnterprisePayTypeView *aliPayView;
|
||||
///更多类型
|
||||
@property (nonatomic,strong) UIView *morePayView;
|
||||
///箭头
|
||||
@property (nonatomic,strong) UIButton *arrowButton;
|
||||
///更多方式
|
||||
@property (nonatomic,strong) UILabel *moreLabel;
|
||||
///充值按钮
|
||||
@property (nonatomic,strong) UIButton *rechargeButton;
|
||||
///充值协议
|
||||
@property (nonatomic,strong) YYLabel *privacyLable;
|
||||
///需要充值信息
|
||||
@property (nonatomic,strong) EnterpriseRechargeInfoModel *rechargeInfo;
|
||||
///充值的列表信息
|
||||
@property (nonatomic,strong) EnterpriseRechargeListInfoModel *listInfo;
|
||||
///当前选中的支付类型
|
||||
@property (nonatomic,strong) EnterPrieseRechargeTypeItemModel *currentItem;
|
||||
///支付宝
|
||||
@property (nonatomic,strong) EnterPrieseRechargeTypeItemModel *aliPayItem;
|
||||
///微信
|
||||
@property (nonatomic,strong) EnterPrieseRechargeTypeItemModel *wxPayItem;
|
||||
@end
|
||||
|
||||
@implementation XPMineHalfRechargeViewController
|
||||
|
||||
- (void)dealloc {
|
||||
[[NIMSDK sharedSDK].systemNotificationManager removeDelegate:self];
|
||||
}
|
||||
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (__kindof id)createPresenter {
|
||||
return [[XPEnterpriseRechargePresenter alloc] init];
|
||||
}
|
||||
|
||||
- (void)viewDidLayoutSubviews {
|
||||
self.topView.hidden = NO;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
self.view.backgroundColor = [UIColor clearColor];
|
||||
[[NIMSDK sharedSDK].systemNotificationManager addDelegate:self];
|
||||
[self initData];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initData {
|
||||
[self.presenter getUserWalletInfo];
|
||||
[self.presenter getRechargeList:@"1"];
|
||||
}
|
||||
|
||||
- (void)initSubViews {
|
||||
[self.view addSubview:self.topView];
|
||||
[self.view addSubview:self.contentView];
|
||||
[self.contentView addSubview:self.titleLabel];
|
||||
[self.contentView addSubview:self.diamondLabel];
|
||||
[self.contentView addSubview:self.limitLabel];
|
||||
[self.contentView addSubview:self.collectionView];
|
||||
[self.contentView addSubview:self.payTypeLabel];
|
||||
[self.contentView addSubview:self.payStackView];
|
||||
[self.contentView addSubview:self.rechargeButton];
|
||||
[self.contentView addSubview:self.privacyLable];
|
||||
|
||||
[self.payStackView addArrangedSubview:self.wxPayView];
|
||||
[self.payStackView addArrangedSubview:self.aliPayView];
|
||||
[self.payStackView addArrangedSubview:self.morePayView];
|
||||
|
||||
[self.morePayView addSubview:self.moreLabel];
|
||||
[self.morePayView addSubview:self.arrowButton];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.topView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.top.mas_equalTo(self.view);
|
||||
make.bottom.mas_equalTo(self.contentView.mas_top);
|
||||
}];
|
||||
|
||||
[self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.bottom.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(492 + kSafeAreaBottomHeight);
|
||||
}];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.contentView).offset(16);
|
||||
make.centerX.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
[self.diamondLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.contentView).offset(15);
|
||||
make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(20);
|
||||
make.right.mas_lessThanOrEqualTo(self.limitLabel.mas_left).offset(-5);
|
||||
}];
|
||||
|
||||
[self.limitLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(self.contentView).offset(-15);
|
||||
make.centerY.mas_equalTo(self.diamondLabel);
|
||||
}];
|
||||
|
||||
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.diamondLabel.mas_bottom).offset(0);
|
||||
make.left.right.mas_equalTo(self.contentView);
|
||||
make.height.mas_equalTo(54 * 3 + 8 * 2 + 16 * 2);
|
||||
}];
|
||||
|
||||
[self.payTypeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(self.diamondLabel);
|
||||
make.top.mas_equalTo(self.collectionView.mas_bottom).offset(0);
|
||||
}];
|
||||
|
||||
[self.payStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.contentView).inset(15);
|
||||
make.height.mas_equalTo(48);
|
||||
make.top.mas_equalTo(self.payTypeLabel.mas_bottom).offset(12);
|
||||
}];
|
||||
|
||||
|
||||
[self.moreLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.morePayView).offset(-7);
|
||||
make.centerY.mas_equalTo(self.morePayView);
|
||||
}];
|
||||
|
||||
[self.arrowButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(11, 20));
|
||||
make.centerY.mas_equalTo(self.morePayView);
|
||||
make.left.mas_equalTo(self.moreLabel.mas_right).offset(3);
|
||||
}];
|
||||
|
||||
[self.rechargeButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self.privacyLable.mas_top).offset(-12);
|
||||
make.left.right.mas_equalTo(self.view).inset(47);
|
||||
make.height.mas_equalTo(44);
|
||||
}];
|
||||
|
||||
[self.privacyLable mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self.view).offset(-31 - kSafeAreaBottomHeight);
|
||||
make.centerX.mas_equalTo(self.view);
|
||||
}];
|
||||
}
|
||||
#pragma mark - UICollectionViewDatasource And UICollectionViewDelegate
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
return self.datasource.count;
|
||||
}
|
||||
|
||||
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
XPEnterpriseHalfCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPEnterpriseHalfCollectionViewCell class]) forIndexPath:indexPath];
|
||||
EnterpriseRechargeInfoModel * info = [self.datasource objectAtIndex:indexPath.row];
|
||||
if ([info.chargeProdId isEqualToString:self.rechargeInfo.chargeProdId]) {
|
||||
info.isSelect = YES;
|
||||
} else {
|
||||
info.isSelect = NO;
|
||||
}
|
||||
cell.infoModel = info;
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (self.datasource.count > 0) {
|
||||
EnterpriseRechargeInfoModel * infor = [self.datasource objectAtIndex:indexPath.row];
|
||||
self.rechargeInfo = infor;
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - XPEnterpriseRechargeProtocol
|
||||
- (void)getUserWalletInfo:(WalletInfoModel *)balanceInfo {
|
||||
self.diamondLabel.text = [NSString stringWithFormat:@"我的钻石:%@", balanceInfo.diamonds];
|
||||
}
|
||||
|
||||
- (void)getRechargeListSuccess:(EnterpriseRechargeListInfoModel *)info {
|
||||
self.listInfo = info;
|
||||
if (info.list.count > 0) {
|
||||
[self.datasource addObjectsFromArray:info.list];
|
||||
}
|
||||
if ((info.defaultPay == RechargeDefaultPayType_ZFB || info.defaultPay == RechargeDefaultPayType_ZFB_WX) && info.bigList.count > 0) {
|
||||
[self.datasource addObjectsFromArray: info.bigList];
|
||||
}
|
||||
|
||||
if (self.datasource.count > 0) {
|
||||
self.rechargeInfo = self.datasource.firstObject;
|
||||
}
|
||||
|
||||
switch (info.defaultPay) {
|
||||
case RechargeDefaultPayType_WX:
|
||||
{
|
||||
self.wxPayItem.isSelect = YES;
|
||||
self.aliPayItem.isSelect = NO;
|
||||
self.currentItem = self.wxPayItem;
|
||||
self.morePayView.hidden = NO;
|
||||
self.aliPayView.hidden = YES;
|
||||
[self.payStackView insertArrangedSubview:self.wxPayView atIndex:0];
|
||||
}
|
||||
break;
|
||||
case RechargeDefaultPayType_ZFB:
|
||||
{
|
||||
self.wxPayItem.isSelect = NO;
|
||||
self.aliPayItem.isSelect = YES;
|
||||
self.currentItem = self.aliPayItem;
|
||||
self.morePayView.hidden = NO;
|
||||
self.wxPayView.hidden = YES;
|
||||
[self.payStackView insertArrangedSubview:self.aliPayView atIndex:0];
|
||||
}
|
||||
break;
|
||||
case RechargeDefaultPayType_WX_ZFB:
|
||||
{
|
||||
self.wxPayItem.isSelect = YES;
|
||||
self.aliPayItem.isSelect = NO;
|
||||
self.currentItem = self.wxPayItem;
|
||||
self.morePayView.hidden = YES;
|
||||
self.wxPayView.hidden = NO;
|
||||
self.aliPayView.hidden = NO;
|
||||
[self.payStackView insertArrangedSubview:self.wxPayView atIndex:0];
|
||||
}
|
||||
break;
|
||||
case RechargeDefaultPayType_ZFB_WX:
|
||||
{
|
||||
self.wxPayItem.isSelect = NO;
|
||||
self.aliPayItem.isSelect = YES;
|
||||
self.currentItem = self.aliPayItem;
|
||||
self.morePayView.hidden = YES;
|
||||
self.aliPayView.hidden = NO;
|
||||
self.wxPayView.hidden = NO;
|
||||
[self.payStackView insertArrangedSubview:self.aliPayView atIndex:0];
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
self.wxPayItem.isSelect = NO;
|
||||
self.aliPayItem.isSelect = YES;
|
||||
self.currentItem = self.aliPayItem;
|
||||
self.morePayView.hidden = YES;
|
||||
self.wxPayView.hidden = YES;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
self.wxPayView.rechargeTypeModel = self.wxPayItem;
|
||||
self.aliPayView.rechargeTypeModel = self.aliPayItem;
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
|
||||
- (void)requestPaySuccess:(id)data payChannel:(NSString *)payChannel {
|
||||
if ([payChannel isEqualToString:@"alipay_v2"]) {
|
||||
if ([data isKindOfClass:[NSDictionary class]]) {
|
||||
if ([[data objectForKey:@"payType"] isEqualToString:@"h5"]) {
|
||||
[self dismissViewControllerAnimated:NO completion:nil];
|
||||
XPWebViewController *webView = [[XPWebViewController alloc] init];
|
||||
webView.url = [data objectForKey:@"orderData"];
|
||||
[self.currentNav pushViewController:webView animated:YES];
|
||||
}else if ([[data objectForKey:@"payType"] isEqualToString:@"native"]) {
|
||||
NSString * signedStr = [data objectForKey:@"orderData"];
|
||||
NSString * scheme = @"daeplayapp";
|
||||
[[AlipaySDK defaultService] payOrder:signedStr fromScheme:scheme callback:^(NSDictionary *resultDic) {
|
||||
|
||||
}];
|
||||
}
|
||||
}
|
||||
} else if ([payChannel isEqualToString:@"alipay"]) {
|
||||
if ([data isKindOfClass:[NSString class]]) {
|
||||
NSString * scheme = @"daeplayapp";
|
||||
NSString * signedStr = [data objectForKey:@"orderData"];
|
||||
[[AlipaySDK defaultService] payOrder:signedStr fromScheme:scheme callback:^(NSDictionary *resultDic) {
|
||||
|
||||
}];
|
||||
}
|
||||
}else if ([payChannel isEqualToString:@"wx"]){
|
||||
if ([data isKindOfClass:[NSDictionary class]]) {
|
||||
// 微信支付
|
||||
if (((NSString *)data[@"appid"]).length > 0) {
|
||||
[WXApi registerApp:data[@"appid"] universalLink:@"https://f02efc69cbad775287063e8ee37733a5.share2dlink.com/"];
|
||||
}
|
||||
PayReq *req = [[PayReq alloc] init];
|
||||
NSDictionary * dict = data;
|
||||
NSMutableString *stamp = [dict objectForKey:@"timestamp"];
|
||||
req.partnerId = [dict objectForKey:@"partnerid"];
|
||||
req.prepayId = [dict objectForKey:@"prepayid"];
|
||||
req.nonceStr = [dict objectForKey:@"noncestr"];
|
||||
req.timeStamp = stamp.intValue;
|
||||
req.package = @"Sign=WXPay";
|
||||
req.sign = [dict objectForKey:@"sign"];
|
||||
[WXApi sendReq:req completion:^(BOOL success) {
|
||||
if (success) {
|
||||
NSLog(@"********调起微信支付成功");
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - NIMSystemNotificationManagerDelegate
|
||||
- (void)onReceiveCustomSystemNotification:(NIMCustomSystemNotification *)notification {
|
||||
if (notification.receiverType == NIMSessionTypeP2P) {
|
||||
AttachmentModel *attachment = [AttachmentModel modelWithJSON:notification.content];
|
||||
if (attachment.first == CustomMessageType_Account && attachment.second == Custom_Message_Sub_Account_Changed) {
|
||||
WalletInfoModel * balanceInfo = [WalletInfoModel modelWithDictionary:attachment.data];
|
||||
self.diamondLabel.text = [NSString stringWithFormat:@"我的钻石:%@", balanceInfo.diamonds];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Event Response
|
||||
- (void)tapMoreTypeRecognizer {
|
||||
switch (self.listInfo.defaultPay) {
|
||||
case RechargeDefaultPayType_WX:
|
||||
{
|
||||
self.aliPayView.hidden = NO;
|
||||
self.morePayView.hidden = YES;
|
||||
}
|
||||
break;
|
||||
case RechargeDefaultPayType_ZFB:
|
||||
{
|
||||
self.wxPayView.hidden = NO;
|
||||
self.morePayView.hidden = YES;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)dismissHalfRecharge {
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
}
|
||||
|
||||
- (void)rechargeButtonAction:(UIButton *)sender {
|
||||
NSString * payType= self.currentItem.type == RechargeType_WX ? @"wx" : @"alipay_v2";
|
||||
[self.presenter requestPay:self.rechargeInfo.chargeProdId payChannel:payType roomUid:self.roomUid];
|
||||
}
|
||||
|
||||
- (void)tapPayViewRecognizer:(UITapGestureRecognizer *)tap {
|
||||
XPEnterprisePayTypeView * view = (XPEnterprisePayTypeView *)tap.view;
|
||||
if (view == self.wxPayView) {
|
||||
self.wxPayItem.isSelect = YES;
|
||||
self.aliPayItem.isSelect = NO;
|
||||
self.currentItem = self.wxPayItem;
|
||||
} else {
|
||||
self.wxPayItem.isSelect = NO;
|
||||
self.aliPayItem.isSelect = YES;
|
||||
self.currentItem = self.aliPayItem;
|
||||
}
|
||||
self.wxPayView.rechargeTypeModel = self.wxPayItem;
|
||||
self.aliPayView.rechargeTypeModel = self.aliPayItem;
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (UICollectionView *)collectionView{
|
||||
if (!_collectionView) {
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
layout.itemSize = CGSizeMake((CGFloat)(KScreenWidth - 15 * 2 - 8 * 2 - 2) / 3.0, 54);
|
||||
layout.sectionInset = UIEdgeInsetsMake(16, 15, 16, 15);
|
||||
layout.minimumLineSpacing = 8;
|
||||
layout.minimumInteritemSpacing = 8;
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
|
||||
_collectionView.dataSource = self;
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.backgroundColor = [UIColor clearColor];
|
||||
_collectionView.scrollEnabled = NO;
|
||||
[_collectionView registerClass:[XPEnterpriseHalfCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPEnterpriseHalfCollectionViewCell class])];
|
||||
}
|
||||
return _collectionView;
|
||||
}
|
||||
|
||||
- (UIView *)topView {
|
||||
if (!_topView) {
|
||||
_topView = [[UIView alloc] init];
|
||||
_topView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.5];
|
||||
_topView.hidden = YES;
|
||||
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissHalfRecharge)];
|
||||
[_topView addGestureRecognizer:tap];
|
||||
}
|
||||
return _topView;
|
||||
}
|
||||
|
||||
- (UIView *)contentView {
|
||||
if (!_contentView) {
|
||||
_contentView = [[UIView alloc] init];
|
||||
_contentView.backgroundColor = [ThemeColor appBackgroundColor];
|
||||
CAShapeLayer * layer = [CAShapeLayer layer];
|
||||
layer.path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, KScreenWidth, 492) byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(8, 8)].CGPath;
|
||||
_contentView.layer.mask = layer;
|
||||
}
|
||||
return _contentView;
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightMedium];
|
||||
_titleLabel.textColor = [ThemeColor mainTextColor];
|
||||
_titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_titleLabel.text = @"充值";
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)diamondLabel {
|
||||
if (!_diamondLabel) {
|
||||
_diamondLabel = [[UILabel alloc] init];
|
||||
_diamondLabel.font = [UIFont systemFontOfSize:14];
|
||||
_diamondLabel.textColor = [ThemeColor mainTextColor];
|
||||
}
|
||||
return _diamondLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)limitLabel {
|
||||
if (!_limitLabel) {
|
||||
_limitLabel = [[UILabel alloc] init];
|
||||
_limitLabel.font = [UIFont systemFontOfSize:12];
|
||||
_limitLabel.textColor = [ThemeColor secondTextColor];
|
||||
_limitLabel.text = @"未成年人禁止充值";
|
||||
_limitLabel.textAlignment = NSTextAlignmentRight;
|
||||
}
|
||||
return _limitLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)payTypeLabel {
|
||||
if (!_payTypeLabel) {
|
||||
_payTypeLabel = [[UILabel alloc] init];
|
||||
_payTypeLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
|
||||
_payTypeLabel.textColor = [ThemeColor mainTextColor];
|
||||
_payTypeLabel.text = @"支付方式";
|
||||
}
|
||||
return _payTypeLabel;
|
||||
}
|
||||
|
||||
- (UIStackView *)payStackView {
|
||||
if (!_payStackView) {
|
||||
_payStackView = [[UIStackView alloc] init];
|
||||
_payStackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
_payStackView.distribution = UIStackViewDistributionFillEqually;
|
||||
_payStackView.alignment = UIStackViewAlignmentFill;
|
||||
_payStackView.spacing = 13;
|
||||
}
|
||||
return _payStackView;
|
||||
}
|
||||
|
||||
- (XPEnterprisePayTypeView *)aliPayView {
|
||||
if (!_aliPayView) {
|
||||
_aliPayView = [[XPEnterprisePayTypeView alloc] init];
|
||||
_aliPayView.rechargeTypeModel = self.aliPayItem;
|
||||
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapPayViewRecognizer:)];
|
||||
[_aliPayView addGestureRecognizer:tap];
|
||||
}
|
||||
return _aliPayView;
|
||||
}
|
||||
|
||||
- (XPEnterprisePayTypeView *)wxPayView {
|
||||
if (!_wxPayView) {
|
||||
_wxPayView = [[XPEnterprisePayTypeView alloc] init];
|
||||
_wxPayView.rechargeTypeModel = self.wxPayItem;
|
||||
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapPayViewRecognizer:)];
|
||||
[_wxPayView addGestureRecognizer:tap];
|
||||
}
|
||||
return _wxPayView;
|
||||
}
|
||||
|
||||
- (UIView *)morePayView {
|
||||
if (!_morePayView) {
|
||||
_morePayView = [[UIView alloc] init];
|
||||
_morePayView.backgroundColor = [UIColor clearColor];
|
||||
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapMoreTypeRecognizer)];
|
||||
[_morePayView addGestureRecognizer:tap];
|
||||
}
|
||||
return _morePayView;
|
||||
}
|
||||
|
||||
|
||||
- (UILabel *)moreLabel {
|
||||
if (!_moreLabel) {
|
||||
_moreLabel = [[UILabel alloc] init];
|
||||
_moreLabel.font = [UIFont systemFontOfSize:13];
|
||||
_moreLabel.textColor = [ThemeColor mainTextColor];
|
||||
_moreLabel.text = @"展开更多支付方式";
|
||||
}
|
||||
return _moreLabel;
|
||||
}
|
||||
|
||||
- (UIButton *)arrowButton {
|
||||
if (!_arrowButton) {
|
||||
_arrowButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_arrowButton setImage:[UIImage imageNamed:@"room_setting_arrow"] forState:UIControlStateNormal];
|
||||
[_arrowButton setImage:[UIImage imageNamed:@"room_setting_arrow"] forState:UIControlStateSelected];
|
||||
_arrowButton.transform = CGAffineTransformMakeRotation(M_PI / 2);
|
||||
}
|
||||
return _arrowButton;
|
||||
}
|
||||
|
||||
- (UIButton *)rechargeButton {
|
||||
if (!_rechargeButton) {
|
||||
_rechargeButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_rechargeButton setTitle:@"确认充值" forState:UIControlStateNormal];
|
||||
_rechargeButton.titleLabel.font = [UIFont systemFontOfSize:15];
|
||||
[_rechargeButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
|
||||
[_rechargeButton setTitleColor:[ThemeColor confirmButtonTextColor] forState:UIControlStateNormal];
|
||||
_rechargeButton.layer.masksToBounds = YES;
|
||||
_rechargeButton.layer.cornerRadius = 22;
|
||||
[_rechargeButton addTarget:self action:@selector(rechargeButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _rechargeButton;
|
||||
}
|
||||
|
||||
- (YYLabel *)privacyLable {
|
||||
if (!_privacyLable) {
|
||||
_privacyLable = [[YYLabel alloc] init];
|
||||
NSMutableAttributedString *attString = [[NSMutableAttributedString alloc] initWithString:@"已阅读并同意"];
|
||||
attString.yy_color = [ThemeColor secondTextColor];
|
||||
attString.yy_font = [UIFont systemFontOfSize:14];
|
||||
NSMutableAttributedString *rechargeAttString = [[NSMutableAttributedString alloc] initWithString:@"《用户充值协议》" attributes:@{NSForegroundColorAttributeName:[ThemeColor appMainColor]}];
|
||||
@kWeakify(self);
|
||||
[rechargeAttString yy_setTextHighlightRange:NSMakeRange(0, rechargeAttString.length) color:nil backgroundColor:nil userInfo:nil tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
|
||||
@kStrongify(self);
|
||||
[self dismissViewControllerAnimated:NO completion:nil];
|
||||
XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
||||
webVC.url = @"yinyou/modules/rule/rechargeAgreement.html";
|
||||
[self.currentNav pushViewController:webVC animated:YES];
|
||||
|
||||
} longPressAction:nil];
|
||||
[attString appendAttributedString:rechargeAttString];
|
||||
_privacyLable.textAlignment = NSTextAlignmentCenter;
|
||||
_privacyLable.attributedText = attString;
|
||||
}
|
||||
return _privacyLable;
|
||||
}
|
||||
|
||||
- (NSMutableArray<EnterpriseRechargeInfoModel *> *)datasource {
|
||||
if (!_datasource) {
|
||||
_datasource = [NSMutableArray array];
|
||||
}
|
||||
return _datasource;
|
||||
}
|
||||
|
||||
- (EnterPrieseRechargeTypeItemModel *)aliPayItem {
|
||||
if (!_aliPayItem) {
|
||||
EnterPrieseRechargeTypeItemModel * zfbItem = [[EnterPrieseRechargeTypeItemModel alloc] init];
|
||||
zfbItem.imageName = @"mine_recharge_alipay";
|
||||
zfbItem.title = @"支付宝";
|
||||
zfbItem.isSelect = YES;
|
||||
zfbItem.type = RechargeType_ZFB;
|
||||
_aliPayItem = zfbItem;
|
||||
}
|
||||
return _aliPayItem;
|
||||
}
|
||||
|
||||
- (EnterPrieseRechargeTypeItemModel *)wxPayItem {
|
||||
if (!_wxPayItem) {
|
||||
EnterPrieseRechargeTypeItemModel * wxItem = [[EnterPrieseRechargeTypeItemModel alloc] init];
|
||||
wxItem.imageName = @"mine_recharge_wechat";
|
||||
wxItem.title = @"微信";
|
||||
wxItem.type = RechargeType_WX;
|
||||
_wxPayItem = wxItem;
|
||||
}
|
||||
return _wxPayItem;
|
||||
}
|
||||
|
||||
@end
|
@@ -10,7 +10,7 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMineNewRechargeViewController : MvpViewController
|
||||
|
||||
@property (nonatomic,strong) NSString *roomUid;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -8,31 +8,33 @@
|
||||
#import "XPMineNewRechargeViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <AlipaySDK/AlipaySDK.h>
|
||||
#import <WXApi.h>
|
||||
#import <WXApiObject.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "XPMacro.h"
|
||||
#import "XPHtmlUrl.h"
|
||||
#import "NSArray+Safe.h"
|
||||
#import "UIImage+Utils.h"
|
||||
#import "XPConstant.h"
|
||||
///Model
|
||||
#import "RechargeListModel.h"
|
||||
#import "XPMinePayTypeModel.h"
|
||||
///View
|
||||
#import "XPMineRechageHeadView.h"
|
||||
#import "XPMineRechargeCollectionViewCell.h"
|
||||
#import "XPMineRechargeNavView.h"
|
||||
#import "XPMineRechargePayCollectionViewCell.h"
|
||||
#import "XPMineRechargeHeaderReusableView.h"
|
||||
#import "XPMineRechargeFooterReusableView.h"
|
||||
#import "XPMinePayHeaderReusableView.h"
|
||||
#import "XPMinePayFooterReusableView.h"
|
||||
///P
|
||||
#import "XPMineRechargePresenter.h"
|
||||
#import "XPMineRechargeProtocol.h"
|
||||
#import "XPEnterpriseRechargePresenter.h"
|
||||
#import "XPEnterpriseRechargeProtocol.h"
|
||||
///VC
|
||||
#import "XPWebViewController.h"
|
||||
|
||||
@interface XPMineNewRechargeViewController ()<UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, XPMineRechargeProtocol, XPMineRechargeNavViewDelegate>
|
||||
@interface XPMineNewRechargeViewController ()<UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, XPEnterpriseRechargeProtocol>
|
||||
|
||||
@property (nonatomic, strong) UICollectionView *collectionView;
|
||||
|
||||
@@ -69,12 +71,18 @@
|
||||
|
||||
@implementation XPMineNewRechargeViewController
|
||||
|
||||
|
||||
+ (void)load {
|
||||
NSString *universalLink = @"https://f02efc69cbad775287063e8ee37733a5.share2dlink.com/";
|
||||
[WXApi registerApp:KeyWithType(KeyType_WechatAppid) universalLink:universalLink];
|
||||
}
|
||||
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (XPMineRechargePresenter *)createPresenter {
|
||||
return [[XPMineRechargePresenter alloc] init];
|
||||
- (XPEnterpriseRechargePresenter *)createPresenter {
|
||||
return [[XPEnterpriseRechargePresenter alloc] init];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
@@ -163,7 +171,9 @@
|
||||
|
||||
/// 我的收益
|
||||
- (void)myIncomeBtnAction {
|
||||
|
||||
XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
||||
webVC.url = @"yinmeng/modules/myincome/index.html#/myincome";
|
||||
[self.navigationController pushViewController:webVC animated:YES];
|
||||
}
|
||||
|
||||
/// 点击充值
|
||||
@@ -174,12 +184,14 @@
|
||||
switch (payTypeModel.payType) {
|
||||
case XPMinePayWechat: {
|
||||
//TODO: 微信支付
|
||||
|
||||
NSString * payType= @"wx";
|
||||
[self.presenter requestPay:rechargModel.chargeProdId payChannel:payType roomUid:self.roomUid];
|
||||
}
|
||||
break;
|
||||
case XPMinePayAlipay: {
|
||||
//TODO: 支付宝支付
|
||||
|
||||
NSString * payType = @"alipay_v2";
|
||||
[self.presenter requestPay:rechargModel.chargeProdId payChannel:payType roomUid:self.roomUid];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -188,6 +200,56 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)requestPaySuccess:(id)data payChannel:(NSString *)payChannel {
|
||||
if ([payChannel isEqualToString:@"alipay_v2"]) {
|
||||
if ([data isKindOfClass:[NSDictionary class]]) {
|
||||
if ([[data objectForKey:@"payType"] isEqualToString:@"h5"]) {
|
||||
XPWebViewController *webView = [[XPWebViewController alloc] init];
|
||||
webView.url = [data objectForKey:@"orderData"];
|
||||
[self.navigationController pushViewController:webView animated:YES];
|
||||
}else if ([[data objectForKey:@"payType"] isEqualToString:@"native"]) {
|
||||
NSString * signedStr = [data objectForKey:@"orderData"];
|
||||
NSString * scheme = @"daeplayapp";
|
||||
[[AlipaySDK defaultService] payOrder:signedStr fromScheme:scheme callback:^(NSDictionary *resultDic) {
|
||||
|
||||
}];
|
||||
}
|
||||
}
|
||||
} else if ([payChannel isEqualToString:@"alipay"]) {
|
||||
if ([data isKindOfClass:[NSString class]]) {
|
||||
NSString * scheme = @"daeplayapp";
|
||||
NSString * signedStr = [data objectForKey:@"orderData"];
|
||||
[[AlipaySDK defaultService] payOrder:signedStr fromScheme:scheme callback:^(NSDictionary *resultDic) {
|
||||
|
||||
}];
|
||||
}
|
||||
}else if ([payChannel isEqualToString:@"wx"]){
|
||||
|
||||
// 微信支付
|
||||
if (((NSString *)data[@"appid"]).length > 0) {
|
||||
[WXApi registerApp:data[@"appid"] universalLink:@"https://f02efc69cbad775287063e8ee37733a5.share2dlink.com/"];
|
||||
}
|
||||
|
||||
if ([data isKindOfClass:[NSDictionary class]]) {
|
||||
PayReq *req = [[PayReq alloc] init];
|
||||
NSDictionary * dict = data;
|
||||
NSMutableString *stamp = [dict objectForKey:@"timestamp"];
|
||||
req.partnerId = [dict objectForKey:@"partnerid"];
|
||||
req.prepayId = [dict objectForKey:@"prepayid"];
|
||||
req.nonceStr = [dict objectForKey:@"noncestr"];
|
||||
req.timeStamp = stamp.intValue;
|
||||
req.package = @"Sign=WXPay";
|
||||
req.sign = [dict objectForKey:@"sign"];
|
||||
[WXApi sendReq:req completion:^(BOOL success) {
|
||||
if (success) {
|
||||
NSLog(@"********调起微信支付成功");
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// 点击协议
|
||||
- (void)protcoloButtonAction:(UIButton *)sender {
|
||||
XPWebViewController * webVC= [[XPWebViewController alloc] init];
|
||||
@@ -281,10 +343,6 @@
|
||||
[collectionView reloadData];
|
||||
}
|
||||
|
||||
#pragma mark - XPMineRechargeNavViewDelegate
|
||||
- (void)xPMineRechargeNavView:(XPMineRechargeNavView *)view didClickBackButton:(UIButton *)sender {
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
#pragma mark - XPMineRechargeProtocol
|
||||
- (void)requestRechargeListSucccess:(NSArray *)list {
|
@@ -1,8 +1,8 @@
|
||||
//
|
||||
// XPMineRechargeViewController.h
|
||||
// XPEnterPriseRechargeViewController.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/24.
|
||||
// Created by 冯硕 on 2022/5/14.
|
||||
//
|
||||
|
||||
#import "MvpViewController.h"
|
||||
@@ -10,7 +10,7 @@
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPMineRechargeViewController : MvpViewController
|
||||
|
||||
@property (nonatomic,copy) NSString *roomUid;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,388 @@
|
||||
//
|
||||
// XPEnterPriseRechargeViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/5/14.
|
||||
//
|
||||
|
||||
#import "XPMineRechargeViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <AlipaySDK/AlipaySDK.h>
|
||||
#import <WXApi.h>
|
||||
#import <WXApiObject.h>
|
||||
#import <NIMSDK/NIMSDK.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "XPMacro.h"
|
||||
#import "XPConstant.h"
|
||||
///Model
|
||||
#import "EnterpriseRechargeListInfoModel.h"
|
||||
#import "EnterPrieseRechargeTypeItemModel.h"
|
||||
#import "AttachmentModel.h"
|
||||
#import "WalletInfoModel.h"
|
||||
///P
|
||||
#import "XPEnterpriseRechargePresenter.h"
|
||||
#import "XPEnterpriseRechargeProtocol.h"
|
||||
///View
|
||||
#import "XPEnterpriseChargeListTableViewCell.h"
|
||||
#import "XPEnterpriseRechargePayTableViewCell.h"
|
||||
#import "XPEnterpriseRechargeFootView.h"
|
||||
#import "XPWebViewController.h"
|
||||
@interface XPMineRechargeViewController ()<XPEnterpriseRechargeProtocol, UITableViewDelegate, UITableViewDataSource, XPEnterpriseRechargeFootViewDelegate, XPEnterpriseChargeListTableViewCellDelegate, XPEnterpriseRechargePayTableViewCellDelegate, NIMSystemNotificationManagerDelegate>
|
||||
///列表
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
///数据源
|
||||
@property (nonatomic,strong) NSMutableArray<EnterpriseRechargeInfoModel *> *datasource;
|
||||
///导航栏
|
||||
@property (nonatomic,strong) UIView * navView;
|
||||
///返回按钮
|
||||
@property (nonatomic,strong) UIButton *backButton;
|
||||
///显示标题
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
///我的收益
|
||||
@property (nonatomic,strong) UIButton *incomeButton;
|
||||
///显示底部的操作按钮
|
||||
@property (nonatomic,strong) XPEnterpriseRechargeFootView *footView;
|
||||
///钱包余额
|
||||
@property (nonatomic,strong) WalletInfoModel *balanceInfo;
|
||||
///需要充值信息
|
||||
@property (nonatomic,strong) EnterpriseRechargeInfoModel *rechargeInfo;
|
||||
///充值的列表信息
|
||||
@property (nonatomic,strong) EnterpriseRechargeListInfoModel *listInfo;
|
||||
///当前选中的那种充值方式
|
||||
@property (nonatomic,strong) EnterPrieseRechargeTypeItemModel *currentItem;
|
||||
@end
|
||||
|
||||
@implementation XPMineRechargeViewController
|
||||
|
||||
+ (void)load {
|
||||
NSString *universalLink = @"https://f02efc69cbad775287063e8ee37733a5.share2dlink.com/";
|
||||
[WXApi registerApp:KeyWithType(KeyType_WechatAppid) universalLink:universalLink];
|
||||
}
|
||||
|
||||
- (void)dealloc {
|
||||
[[NIMSDK sharedSDK].systemNotificationManager removeDelegate:self];
|
||||
}
|
||||
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (__kindof id)createPresenter {
|
||||
return [[XPEnterpriseRechargePresenter alloc] init];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
[[NIMSDK sharedSDK].systemNotificationManager addDelegate:self];
|
||||
[self initData];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initData {
|
||||
[self.presenter getUserWalletInfo];
|
||||
[self.presenter getRechargeList:@"1"];
|
||||
}
|
||||
|
||||
- (void)initSubViews {
|
||||
[self.view addSubview:self.tableView];
|
||||
[self.view addSubview:self.navView];
|
||||
[self.navView addSubview:self.backButton];
|
||||
[self.navView addSubview:self.titleLabel];
|
||||
[self.navView addSubview:self.incomeButton];
|
||||
self.tableView.tableFooterView = self.footView;
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.view);
|
||||
}];
|
||||
|
||||
[self.navView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.top.right.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(kNavigationHeight);
|
||||
}];
|
||||
|
||||
[self.backButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(15);
|
||||
make.centerY.equalTo(self.navView.mas_bottom).mas_offset(-22);
|
||||
}];
|
||||
|
||||
[self.incomeButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.right.mas_equalTo(-15);
|
||||
make.centerY.equalTo(self.backButton);
|
||||
}];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.view);
|
||||
make.centerY.equalTo(self.backButton);
|
||||
}];
|
||||
}
|
||||
#pragma mark - UITableViewDelegate And UITableViewDataSource
|
||||
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
|
||||
return 2;
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (indexPath.section == 0) {
|
||||
CGFloat wallInfoHeight = 211 + 72;
|
||||
if (self.datasource.count > 0) {
|
||||
CGFloat listHeight= 0;
|
||||
int page = self.datasource.count % 3;
|
||||
int line = (int)self.datasource.count / 3;
|
||||
if (page == 0) {
|
||||
listHeight = 64 * line + (line - 1) * 8;
|
||||
} else {
|
||||
listHeight = (line + 1) * 64 + line * 8;
|
||||
}
|
||||
return (listHeight + wallInfoHeight);
|
||||
} else {
|
||||
return wallInfoHeight;
|
||||
}
|
||||
} else {
|
||||
return 50 * 2 + 30;
|
||||
}
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (indexPath.section == 0) {
|
||||
XPEnterpriseChargeListTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPEnterpriseChargeListTableViewCell class]) forIndexPath:indexPath];
|
||||
cell.rechargeList = self.datasource;
|
||||
cell.balanceInfo = self.balanceInfo;
|
||||
cell.delegate = self;
|
||||
return cell;
|
||||
} else {
|
||||
XPEnterpriseRechargePayTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPEnterpriseRechargePayTableViewCell class])];
|
||||
if (self.currentItem == nil) {
|
||||
cell.type = self.listInfo.defaultPay;
|
||||
}
|
||||
cell.delegate = self;
|
||||
return cell;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - XPEnterpriseRechargeFootViewDelegate
|
||||
- (void)xPEnterpriseRechargeFootView:(XPEnterpriseRechargeFootView *)view didClickRecharge:(UIButton *)sender {
|
||||
if (self.rechargeInfo.chargeProdId.length >0) {
|
||||
if (self.currentItem == nil) {
|
||||
XPEnterpriseRechargePayTableViewCell * cell = (XPEnterpriseRechargePayTableViewCell *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:1]];
|
||||
self.currentItem = cell.currentItem;
|
||||
}
|
||||
NSString * payType= self.currentItem.type == RechargeType_WX ? @"wx" : @"alipay_v2";
|
||||
[self.presenter requestPay:self.rechargeInfo.chargeProdId payChannel:payType roomUid:self.roomUid];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)xPEnterpriseRechargeFootView:(XPEnterpriseRechargeFootView *)view didClickRechargeProtocol:(UILabel *)label {
|
||||
XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
||||
webVC.url = @"yinyou/modules/rule/rechargeAgreement.html";
|
||||
[self.navigationController pushViewController:webVC animated:YES];
|
||||
}
|
||||
|
||||
#pragma mark - XPEnterpriseChargeListTableViewCellDelegate
|
||||
- (void)xPEnterpriseChargeListTableViewCell:(XPEnterpriseChargeListTableViewCell *)cell didSelectItem:(EnterpriseRechargeInfoModel *)infoModel {
|
||||
self.rechargeInfo = infoModel;
|
||||
}
|
||||
|
||||
#pragma mark - XPEnterpriseRechargePayTableViewCellDelegate
|
||||
- (void)xPEnterpriseRechargePayTableViewCell:(XPEnterpriseRechargePayTableViewCell *)view didChooseItem:(EnterPrieseRechargeTypeItemModel *)itemInfo {
|
||||
self.currentItem = itemInfo;
|
||||
[self.datasource removeAllObjects];
|
||||
switch (itemInfo.type) {
|
||||
case RechargeType_WX:
|
||||
{
|
||||
if (self.listInfo.list.count > 0) {
|
||||
[self.datasource addObjectsFromArray:self.listInfo.list];
|
||||
}
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
break;
|
||||
case RechargeType_ZFB:
|
||||
{
|
||||
if (self.listInfo.list.count > 0) {
|
||||
[self.datasource addObjectsFromArray:self.listInfo.list];
|
||||
}
|
||||
|
||||
if (itemInfo.type == RechargeType_ZFB && self.listInfo.bigList.count > 0) {
|
||||
[self.datasource addObjectsFromArray: self.listInfo.bigList];
|
||||
}
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - XPEnterpriseRechargeProtocol
|
||||
- (void)getUserWalletInfo:(WalletInfoModel *)balanceInfo {
|
||||
self.balanceInfo = balanceInfo;
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
- (void)getRechargeListSuccess:(EnterpriseRechargeListInfoModel *)info {
|
||||
self.listInfo = info;
|
||||
if (info.list.count > 0) {
|
||||
[self.datasource addObjectsFromArray:info.list];
|
||||
}
|
||||
|
||||
if ((info.defaultPay == RechargeDefaultPayType_ZFB || info.defaultPay == RechargeDefaultPayType_ZFB_WX) && info.bigList.count > 0) {
|
||||
[self.datasource addObjectsFromArray: info.bigList];
|
||||
}
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
- (void)requestPaySuccess:(id)data payChannel:(NSString *)payChannel {
|
||||
if ([payChannel isEqualToString:@"alipay_v2"]) {
|
||||
if ([data isKindOfClass:[NSDictionary class]]) {
|
||||
if ([[data objectForKey:@"payType"] isEqualToString:@"h5"]) {
|
||||
XPWebViewController *webView = [[XPWebViewController alloc] init];
|
||||
webView.url = [data objectForKey:@"orderData"];
|
||||
[self.navigationController pushViewController:webView animated:YES];
|
||||
}else if ([[data objectForKey:@"payType"] isEqualToString:@"native"]) {
|
||||
NSString * signedStr = [data objectForKey:@"orderData"];
|
||||
NSString * scheme = @"daeplayapp";
|
||||
[[AlipaySDK defaultService] payOrder:signedStr fromScheme:scheme callback:^(NSDictionary *resultDic) {
|
||||
|
||||
}];
|
||||
}
|
||||
}
|
||||
} else if ([payChannel isEqualToString:@"alipay"]) {
|
||||
if ([data isKindOfClass:[NSString class]]) {
|
||||
NSString * scheme = @"daeplayapp";
|
||||
NSString * signedStr = [data objectForKey:@"orderData"];
|
||||
[[AlipaySDK defaultService] payOrder:signedStr fromScheme:scheme callback:^(NSDictionary *resultDic) {
|
||||
|
||||
}];
|
||||
}
|
||||
}else if ([payChannel isEqualToString:@"wx"]){
|
||||
|
||||
// 微信支付
|
||||
if (((NSString *)data[@"appid"]).length > 0) {
|
||||
[WXApi registerApp:data[@"appid"] universalLink:@"https://f02efc69cbad775287063e8ee37733a5.share2dlink.com/"];
|
||||
}
|
||||
|
||||
if ([data isKindOfClass:[NSDictionary class]]) {
|
||||
PayReq *req = [[PayReq alloc] init];
|
||||
NSDictionary * dict = data;
|
||||
NSMutableString *stamp = [dict objectForKey:@"timestamp"];
|
||||
req.partnerId = [dict objectForKey:@"partnerid"];
|
||||
req.prepayId = [dict objectForKey:@"prepayid"];
|
||||
req.nonceStr = [dict objectForKey:@"noncestr"];
|
||||
req.timeStamp = stamp.intValue;
|
||||
req.package = @"Sign=WXPay";
|
||||
req.sign = [dict objectForKey:@"sign"];
|
||||
[WXApi sendReq:req completion:^(BOOL success) {
|
||||
if (success) {
|
||||
NSLog(@"********调起微信支付成功");
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - NIMSystemNotificationManagerDelegate
|
||||
- (void)onReceiveCustomSystemNotification:(NIMCustomSystemNotification *)notification {
|
||||
if (notification.receiverType == NIMSessionTypeP2P) {
|
||||
AttachmentModel *attachment = [AttachmentModel modelWithJSON:notification.content];
|
||||
if (attachment.first == CustomMessageType_Account && attachment.second == Custom_Message_Sub_Account_Changed) {
|
||||
WalletInfoModel * balanceInfo = [WalletInfoModel modelWithDictionary:attachment.data];
|
||||
self.balanceInfo = balanceInfo;
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Event Response
|
||||
- (void)backButtonAction:(UIButton *)sender {
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
- (void)incomeButtonAction:(UIButton *)sender {
|
||||
XPWebViewController * webVC = [[XPWebViewController alloc] init];
|
||||
webVC.url = @"yinyou/modules/myincome/index.html#/myincome";
|
||||
[self.navigationController pushViewController:webVC animated:YES];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (UITableView *)tableView {
|
||||
if (!_tableView) {
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
|
||||
_tableView.delegate = self;
|
||||
_tableView.dataSource = self;
|
||||
_tableView.tableFooterView = [UIView new];
|
||||
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
_tableView.backgroundColor = [UIColor clearColor];
|
||||
if (@available(iOS 11.0, *)) {
|
||||
_tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
}
|
||||
[_tableView registerClass:[XPEnterpriseRechargePayTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPEnterpriseRechargePayTableViewCell class])];
|
||||
[_tableView registerClass:[XPEnterpriseChargeListTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPEnterpriseChargeListTableViewCell class])];
|
||||
}
|
||||
return _tableView;
|
||||
}
|
||||
|
||||
- (XPEnterpriseRechargeFootView *)footView {
|
||||
if (!_footView) {
|
||||
_footView = [[XPEnterpriseRechargeFootView alloc] init];
|
||||
_footView.delegate = self;
|
||||
}
|
||||
return _footView;
|
||||
}
|
||||
|
||||
- (UIView *)navView {
|
||||
if (!_navView) {
|
||||
_navView = [[UIView alloc] init];
|
||||
_navView.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
return _navView;
|
||||
}
|
||||
|
||||
- (UIButton *)backButton {
|
||||
if (!_backButton) {
|
||||
_backButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_backButton setImage:[UIImage imageNamed:@"common_nav_back"] forState:UIControlStateNormal];
|
||||
[_backButton setImage:[UIImage imageNamed:@"common_nav_back"] forState:UIControlStateSelected];
|
||||
[_backButton addTarget:self action:@selector(backButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _backButton;
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:18 weight:UIFontWeightMedium];
|
||||
_titleLabel.textColor = [ThemeColor mainTextColor];
|
||||
_titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_titleLabel.text = @"我的账户";
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
- (UIButton *)incomeButton {
|
||||
if (!_incomeButton) {
|
||||
_incomeButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_incomeButton setTitle:@"我的收益" forState:UIControlStateNormal];
|
||||
[_incomeButton setTitleColor:[ThemeColor mainTextColor] forState:UIControlStateNormal];
|
||||
_incomeButton.titleLabel.font = [UIFont systemFontOfSize:13];
|
||||
[_incomeButton addTarget:self action:@selector(incomeButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _incomeButton;
|
||||
}
|
||||
|
||||
- (NSMutableArray<EnterpriseRechargeInfoModel *> *)datasource {
|
||||
if (!_datasource) {
|
||||
_datasource = [NSMutableArray array];
|
||||
}
|
||||
return _datasource;
|
||||
}
|
||||
|
||||
@end
|
@@ -55,6 +55,11 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
/// 获取贵族排行榜
|
||||
/// @param complection 完成回调
|
||||
+ (void)vipRankList:(HttpRequestHelperCompletion)complection;
|
||||
|
||||
/// 使用钻石开通贵族
|
||||
/// @param complection 完成回调
|
||||
/// @param roomUid 房主的uid
|
||||
+ (void)openWithDiamond:(HttpRequestHelperCompletion)complection roomUid:(NSString *)roomUid;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -86,4 +86,5 @@
|
||||
[HttpRequestHelper request:@"vip/openWithDiamond" method:HttpRequestHelperMethodPOST params:dic completion:complection];
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
@@ -23,6 +23,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,assign) CGFloat money;
|
||||
///原价
|
||||
@property (nonatomic,assign) CGFloat oriPrice;
|
||||
///换算率
|
||||
@property (nonatomic,assign) NSInteger rate;
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -46,6 +46,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
///获取贵族升级列表
|
||||
- (void)getNobleUpgradeList;
|
||||
|
||||
/// 钻石开通贵族
|
||||
/// - Parameter roomUid: 房主的uid
|
||||
- (void)opeNobleWishtDiamond:(NSString *)roomUid;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -122,4 +122,12 @@
|
||||
}]];
|
||||
}
|
||||
|
||||
/// 钻石开通贵族
|
||||
/// - Parameter roomUid: 房主的uid
|
||||
- (void)opeNobleWishtDiamond:(NSString *)roomUid {
|
||||
[Api openWithDiamond:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
[[self getView] opeNobleWishtDiamondSuccess];
|
||||
}] roomUid:roomUid];
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -45,4 +45,7 @@
|
||||
///获取排行
|
||||
- (void)getNobleRankListSuccess:(NobleRankListModel *)rankInfo;
|
||||
|
||||
///开通贵族成功
|
||||
- (void)opeNobleWishtDiamondSuccess;
|
||||
|
||||
@end
|
||||
|
@@ -0,0 +1,31 @@
|
||||
//
|
||||
// XPNobleRechargeTableViewCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/10/28.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "EnterpriseRechargeListInfoModel.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class XPNobleRechargeTableViewCell, EnterPrieseRechargeTypeItemModel;
|
||||
@protocol XPNobleRechargeTableViewCellDelegate <NSObject>
|
||||
|
||||
|
||||
- (void)xPNobleRechargeTableViewCell:(XPNobleRechargeTableViewCell *)view didChooseItem:(EnterPrieseRechargeTypeItemModel *)itemInfo;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface XPNobleRechargeTableViewCell : UITableViewCell
|
||||
///钻石数
|
||||
@property (nonatomic,assign) CGFloat diamondNum;
|
||||
///默认的充值类型
|
||||
@property (nonatomic,assign) RechargeDefaultPayType type;
|
||||
///当前选中的支付类型
|
||||
@property (nonatomic,strong, readonly) EnterPrieseRechargeTypeItemModel *currentItem;
|
||||
///代理
|
||||
@property (nonatomic,weak) id<XPNobleRechargeTableViewCellDelegate> delegate;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,334 @@
|
||||
//
|
||||
// XPNobleRechargeTableViewCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/10/28.
|
||||
//
|
||||
|
||||
#import "XPNobleRechargeTableViewCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
///Model
|
||||
#import "EnterPrieseRechargeTypeItemModel.h"
|
||||
///View
|
||||
#import "XPEnterpriseChargeTypeTableViewCell.h"
|
||||
|
||||
@interface XPNobleRechargeTableViewCell ()<UITableViewDelegate, UITableViewDataSource>
|
||||
///背景
|
||||
@property (nonatomic,strong) UIView * backView;
|
||||
///容器
|
||||
@property (nonatomic,strong) UIStackView *stackView;
|
||||
///显示充值方式
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
///列表
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
///查看更多支付方式
|
||||
@property (nonatomic,strong) UIView * moreView;
|
||||
///箭头
|
||||
@property (nonatomic,strong) UIButton *arrowButton;
|
||||
///更多方式
|
||||
@property (nonatomic,strong) UILabel *moreLabel;
|
||||
///充值的列表
|
||||
@property (nonatomic,strong) NSMutableArray<EnterPrieseRechargeTypeItemModel *> *rechargeTypeList;
|
||||
///当前选中的支付类型
|
||||
@property (nonatomic,strong) EnterPrieseRechargeTypeItemModel *currentItem;
|
||||
///支付宝
|
||||
@property (nonatomic,strong) EnterPrieseRechargeTypeItemModel *aliPayItem;
|
||||
///微信
|
||||
@property (nonatomic,strong) EnterPrieseRechargeTypeItemModel *wxPayItem;
|
||||
///
|
||||
@property (nonatomic,strong) EnterPrieseRechargeTypeItemModel *coinPayItem;
|
||||
@end
|
||||
|
||||
@implementation XPNobleRechargeTableViewCell
|
||||
|
||||
|
||||
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
||||
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
self.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
[self.contentView addSubview:self.backView];
|
||||
|
||||
[self.backView addSubview:self.stackView];
|
||||
|
||||
[self.stackView addArrangedSubview:self.titleLabel];
|
||||
[self.stackView addArrangedSubview:self.tableView];
|
||||
[self.stackView addArrangedSubview:self.moreView];
|
||||
|
||||
[self.moreView addSubview:self.moreLabel];
|
||||
[self.moreView addSubview:self.arrowButton];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.backView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.contentView).inset(15);
|
||||
make.top.bottom.mas_equalTo(self.contentView);
|
||||
}];
|
||||
|
||||
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.backView).inset(10);
|
||||
make.top.mas_equalTo(self.backView).offset(15);
|
||||
make.bottom.mas_equalTo(self.backView);
|
||||
}];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(15);
|
||||
}];
|
||||
|
||||
[self.moreView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(50);
|
||||
}];
|
||||
|
||||
[self.moreLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.moreView).offset(-7);
|
||||
make.centerY.mas_equalTo(self.moreView);
|
||||
}];
|
||||
|
||||
[self.arrowButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.size.mas_equalTo(CGSizeMake(11, 20));
|
||||
make.centerY.mas_equalTo(self.moreView);
|
||||
make.left.mas_equalTo(self.moreLabel.mas_right).offset(3);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDelegate And UITableViewDataSource
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return self.rechargeTypeList.count;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return 50;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
XPEnterpriseChargeTypeTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPEnterpriseChargeTypeTableViewCell class])];
|
||||
EnterPrieseRechargeTypeItemModel * infoModel = [self.rechargeTypeList objectAtIndex:indexPath.row];
|
||||
if (infoModel.type == self.currentItem.type) {
|
||||
infoModel.isSelect = YES;
|
||||
} else {
|
||||
infoModel.isSelect = NO;
|
||||
}
|
||||
infoModel.isLastOne = (indexPath.row == (self.rechargeTypeList.count - 1));
|
||||
cell.rechargeTypeModel = infoModel;
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (self.rechargeTypeList.count > 0) {
|
||||
if (self.rechargeTypeList.count == 1) {
|
||||
return;
|
||||
}
|
||||
self.currentItem = [self.rechargeTypeList objectAtIndex:indexPath.row];
|
||||
[self.tableView reloadData];
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPNobleRechargeTableViewCell:didChooseItem:)]) {
|
||||
[self.delegate xPNobleRechargeTableViewCell:self didChooseItem:self.currentItem];
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma mark - Event Response
|
||||
- (void)tapMoreTypeRecognizer {
|
||||
self.arrowButton.selected = !self.arrowButton.selected;
|
||||
if (self.type == RechargeDefaultPayType_WX) {
|
||||
self.moreView.hidden = YES;
|
||||
if (![self.rechargeTypeList containsObject:self.aliPayItem]) {
|
||||
[self.rechargeTypeList addObject:self.aliPayItem];
|
||||
}
|
||||
[self.tableView reloadData];
|
||||
} else if(self.type == RechargeDefaultPayType_ZFB) {
|
||||
self.moreView.hidden = YES;
|
||||
if (![self.rechargeTypeList containsObject:self.wxPayItem]) {
|
||||
[self.rechargeTypeList addObject:self.wxPayItem];
|
||||
}
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setType:(RechargeDefaultPayType)type {
|
||||
_type =type;
|
||||
[self.rechargeTypeList removeAllObjects];
|
||||
[self.rechargeTypeList addObject:self.coinPayItem];
|
||||
switch (_type) {
|
||||
case RechargeDefaultPayType_WX:
|
||||
{
|
||||
[self.rechargeTypeList addObject:self.wxPayItem];
|
||||
self.currentItem = self.wxPayItem;
|
||||
self.moreView.hidden = NO;
|
||||
}
|
||||
break;
|
||||
case RechargeDefaultPayType_ZFB:
|
||||
{
|
||||
[self.rechargeTypeList addObject:self.aliPayItem];
|
||||
self.currentItem = self.aliPayItem;
|
||||
self.moreView.hidden = NO;
|
||||
}
|
||||
break;
|
||||
case RechargeDefaultPayType_WX_ZFB:
|
||||
{
|
||||
[self.rechargeTypeList addObject:self.wxPayItem];
|
||||
[self.rechargeTypeList addObject:self.aliPayItem];
|
||||
self.currentItem = self.wxPayItem;
|
||||
self.moreView.hidden = YES;
|
||||
}
|
||||
break;
|
||||
case RechargeDefaultPayType_ZFB_WX:
|
||||
{
|
||||
[self.rechargeTypeList addObject:self.aliPayItem];
|
||||
[self.rechargeTypeList addObject:self.wxPayItem];
|
||||
self.currentItem = self.aliPayItem;
|
||||
self.moreView.hidden = YES;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
[self.rechargeTypeList addObject:self.aliPayItem];
|
||||
[self.rechargeTypeList addObject:self.wxPayItem];
|
||||
self.currentItem = self.aliPayItem;
|
||||
self.moreView.hidden = YES;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (_type == RechargeDefaultPayType_Coin) {
|
||||
self.currentItem = self.coinPayItem;
|
||||
}
|
||||
self.coinPayItem.subTitle = [NSString stringWithFormat:@"(%.2f钻石)", _diamondNum > 0 ? _diamondNum : 0];
|
||||
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
- (UITableView *)tableView {
|
||||
if (!_tableView) {
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
|
||||
_tableView.delegate = self;
|
||||
_tableView.dataSource = self;
|
||||
_tableView.tableFooterView = [UIView new];
|
||||
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
_tableView.backgroundColor = [UIColor clearColor];
|
||||
_tableView.scrollEnabled = NO;
|
||||
if (@available(iOS 11.0, *)) {
|
||||
_tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
}
|
||||
[_tableView registerClass:[XPEnterpriseChargeTypeTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPEnterpriseChargeTypeTableViewCell class])];
|
||||
}
|
||||
return _tableView;
|
||||
}
|
||||
|
||||
- (NSMutableArray<EnterPrieseRechargeTypeItemModel *> *)rechargeTypeList {
|
||||
if (!_rechargeTypeList) {
|
||||
_rechargeTypeList = [NSMutableArray array];
|
||||
}
|
||||
return _rechargeTypeList;
|
||||
}
|
||||
|
||||
- (EnterPrieseRechargeTypeItemModel *)aliPayItem {
|
||||
if (!_aliPayItem) {
|
||||
EnterPrieseRechargeTypeItemModel * zfbItem = [[EnterPrieseRechargeTypeItemModel alloc] init];
|
||||
zfbItem.imageName = @"mine_recharge_alipay";
|
||||
zfbItem.title = @"支付宝";
|
||||
zfbItem.type = RechargeType_ZFB;
|
||||
_aliPayItem = zfbItem;
|
||||
}
|
||||
return _aliPayItem;
|
||||
}
|
||||
|
||||
- (EnterPrieseRechargeTypeItemModel *)coinPayItem {
|
||||
if (!_coinPayItem) {
|
||||
EnterPrieseRechargeTypeItemModel * zfbItem = [[EnterPrieseRechargeTypeItemModel alloc] init];
|
||||
zfbItem.imageName = @"common_diamond";
|
||||
zfbItem.title = @"钻石支付";
|
||||
zfbItem.isSelect = YES;
|
||||
zfbItem.type = RechargeType_Coin;
|
||||
_coinPayItem = zfbItem;
|
||||
}
|
||||
return _coinPayItem;
|
||||
}
|
||||
|
||||
- (EnterPrieseRechargeTypeItemModel *)wxPayItem {
|
||||
if (!_wxPayItem) {
|
||||
EnterPrieseRechargeTypeItemModel * wxItem = [[EnterPrieseRechargeTypeItemModel alloc] init];
|
||||
wxItem.imageName = @"mine_recharge_wechat";
|
||||
wxItem.title = @"微信";
|
||||
wxItem.type = RechargeType_WX;
|
||||
_wxPayItem = wxItem;
|
||||
}
|
||||
return _wxPayItem;
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:13];
|
||||
_titleLabel.textColor = [ThemeColor mainTextColor];
|
||||
_titleLabel.text = @"支付方式";
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
- (UIStackView *)stackView {
|
||||
if (!_stackView) {
|
||||
_stackView = [[UIStackView alloc] init];
|
||||
_stackView.axis = UILayoutConstraintAxisVertical;
|
||||
_stackView.distribution = UIStackViewDistributionFill;
|
||||
_stackView.alignment = UIStackViewAlignmentFill;
|
||||
_stackView.spacing = 0;
|
||||
}
|
||||
return _stackView;
|
||||
}
|
||||
|
||||
- (UIView *)backView {
|
||||
if (!_backView) {
|
||||
_backView = [[UIView alloc] init];
|
||||
_backView.backgroundColor = [ThemeColor appCellBackgroundColor];
|
||||
_backView.layer.masksToBounds = YES;
|
||||
_backView.layer.cornerRadius = 10;
|
||||
}
|
||||
return _backView;
|
||||
}
|
||||
|
||||
- (UIView *)moreView {
|
||||
if (!_moreView) {
|
||||
_moreView = [[UIView alloc] init];
|
||||
_moreView.backgroundColor = [UIColor clearColor];
|
||||
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapMoreTypeRecognizer)];
|
||||
[_moreView addGestureRecognizer:tap];
|
||||
}
|
||||
return _moreView;
|
||||
}
|
||||
|
||||
|
||||
- (UILabel *)moreLabel {
|
||||
if (!_moreLabel) {
|
||||
_moreLabel = [[UILabel alloc] init];
|
||||
_moreLabel.font = [UIFont systemFontOfSize:13];
|
||||
_moreLabel.textColor = [ThemeColor mainTextColor];
|
||||
_moreLabel.text = @"展开更多支付方式";
|
||||
}
|
||||
return _moreLabel;
|
||||
}
|
||||
|
||||
- (UIButton *)arrowButton {
|
||||
if (!_arrowButton) {
|
||||
_arrowButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_arrowButton setImage:[UIImage imageNamed:@"room_setting_arrow"] forState:UIControlStateNormal];
|
||||
[_arrowButton setImage:[UIImage imageNamed:@"room_setting_arrow"] forState:UIControlStateSelected];
|
||||
_arrowButton.transform = CGAffineTransformMakeRotation(M_PI / 2);
|
||||
}
|
||||
return _arrowButton;
|
||||
}
|
||||
|
||||
|
||||
@end
|
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// XPNobleRechargeView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/10/28.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPNobleRechargeView : UIView
|
||||
///充值的id
|
||||
@property (nonatomic,copy) NSString *chargeProdId;
|
||||
///充值的金额
|
||||
@property (nonatomic,copy) NSString *chargeMoney;
|
||||
///房主的uid
|
||||
@property (nonatomic,copy) NSString *roomUid;
|
||||
///利率
|
||||
@property (nonatomic,assign) NSInteger rate;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,347 @@
|
||||
//
|
||||
// XPNobleRechargeView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2022/10/28.
|
||||
//
|
||||
|
||||
#import "XPNobleRechargeView.h"
|
||||
////Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <AlipaySDK/AlipaySDK.h>
|
||||
#import <WXApi.h>
|
||||
#import <WXApiObject.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "XPMacro.h"
|
||||
#import "UIImage+Utils.h"
|
||||
#import "Api+EnterpriseRecharge.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "YYUtility.h"
|
||||
#import "XCHUDTool.h"
|
||||
#import "XCCurrentVCStackManager.h"
|
||||
#import "TTPopup.h"
|
||||
#import "Api.h"
|
||||
#import "Api+NobleCenter.h"
|
||||
///Model
|
||||
#import "EnterpriseRechargeListInfoModel.h"
|
||||
#import "EnterPrieseRechargeTypeItemModel.h"
|
||||
#import "WalletInfoModel.h"
|
||||
///View
|
||||
#import "XPNobleRechargeTableViewCell.h"
|
||||
#import "XPWebViewController.h"
|
||||
|
||||
@interface XPNobleRechargeView ()<UITableViewDelegate, UITableViewDataSource, XPNobleRechargeTableViewCellDelegate>
|
||||
///
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
///支付容器
|
||||
@property (nonatomic,strong) UIStackView *moneyStackView;
|
||||
///钻石
|
||||
@property (nonatomic,strong) UIImageView *diamondImageView;
|
||||
///显示金额
|
||||
@property (nonatomic,strong) UILabel *moneyLabel;
|
||||
///列表
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
///支付
|
||||
@property (nonatomic,strong) UIButton *payButton;
|
||||
///充值信息
|
||||
@property (nonatomic,strong) EnterpriseRechargeListInfoModel *listInfo;
|
||||
///支付类型
|
||||
@property (nonatomic,assign) RechargeDefaultPayType payType;
|
||||
///当前选中的支付渠道
|
||||
@property (nonatomic,strong) EnterPrieseRechargeTypeItemModel *currentItem;
|
||||
///钱包信息
|
||||
@property (nonatomic,strong) WalletInfoModel *walletInfo;
|
||||
@end
|
||||
|
||||
@implementation XPNobleRechargeView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initData];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initData {
|
||||
[Api enterpriseRechargeList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if (code == 200) {
|
||||
EnterpriseRechargeListInfoModel * listInfo = [EnterpriseRechargeListInfoModel modelWithDictionary:data.data];
|
||||
self.payType = listInfo.defaultPay;
|
||||
} else {
|
||||
self.payType = RechargeDefaultPayType_ZFB;
|
||||
}
|
||||
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
||||
[Api getUserWalletInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if (code == 200) {
|
||||
WalletInfoModel * model = [WalletInfoModel modelWithDictionary:data.data];
|
||||
self.walletInfo = model;
|
||||
if (model.diamonds.integerValue >= (self.chargeMoney.integerValue * 10)) {
|
||||
self.payType = RechargeDefaultPayType_Coin;
|
||||
}
|
||||
}
|
||||
[self.tableView reloadData];
|
||||
} uid:uid ticket:ticket];
|
||||
} channelType:@"1"];
|
||||
|
||||
|
||||
}
|
||||
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [ThemeColor appCellBackgroundColor];
|
||||
[self addSubview:self.titleLabel];
|
||||
[self addSubview:self.moneyStackView];
|
||||
[self addSubview:self.tableView];
|
||||
[self addSubview:self.payButton];
|
||||
|
||||
[self.moneyStackView addArrangedSubview:self.diamondImageView];
|
||||
[self.moneyStackView addArrangedSubview:self.moneyLabel];
|
||||
UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, KScreenWidth, 416 + kSafeAreaBottomHeight) byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(12, 12)];
|
||||
CAShapeLayer *maskLayer = [CAShapeLayer layer];
|
||||
maskLayer.path = path.CGPath;
|
||||
self.layer.mask = maskLayer;
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(KScreenWidth);
|
||||
make.height.mas_equalTo(416 + kSafeAreaBottomHeight);
|
||||
}];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.mas_centerX);
|
||||
make.top.mas_equalTo(87);
|
||||
}];
|
||||
[self.moneyStackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.mas_centerX);
|
||||
make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(20);
|
||||
make.height.mas_equalTo(30);
|
||||
}];
|
||||
|
||||
[self.diamondImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.width.mas_equalTo(20);
|
||||
make.height.mas_equalTo(20);
|
||||
}];
|
||||
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(self.moneyLabel.mas_bottom).offset(10);
|
||||
make.left.right.mas_equalTo(self);
|
||||
make.height.mas_equalTo(180);
|
||||
}];
|
||||
[self.payButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(38);
|
||||
make.left.right.mas_equalTo(self).inset(44);
|
||||
make.bottom.mas_equalTo(self.mas_bottom).offset(-9 - kSafeAreaBottomHeight);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDelegate And UITableViewDataSource
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return 180;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
XPNobleRechargeTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPNobleRechargeTableViewCell class])];
|
||||
cell.delegate = self;
|
||||
cell.diamondNum = self.walletInfo.diamonds.floatValue;
|
||||
if (self.payType > 0) {
|
||||
cell.type = self.payType;
|
||||
}
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
||||
#pragma mark - XPNobleRechargeTableViewCell
|
||||
- (void)xPNobleRechargeTableViewCell:(XPNobleRechargeTableViewCell *)view didChooseItem:(EnterPrieseRechargeTypeItemModel *)itemInfo {
|
||||
self.currentItem = itemInfo;
|
||||
if (self.currentItem.type == RechargeType_Coin) {
|
||||
self.diamondImageView.hidden = NO;
|
||||
self.moneyLabel.text = [NSString stringWithFormat:@"%.0f", _chargeMoney.floatValue * _rate];
|
||||
} else {
|
||||
self.diamondImageView.hidden = YES;
|
||||
self.moneyLabel.text = [NSString stringWithFormat:@"¥%@", _chargeMoney];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Event Response
|
||||
- (void)payButtonAction:(UIButton *)sender {
|
||||
if (self.currentItem == nil) {
|
||||
XPNobleRechargeTableViewCell * cell = (XPNobleRechargeTableViewCell *)[self.tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
|
||||
self.currentItem = cell.currentItem;
|
||||
}
|
||||
|
||||
if (self.currentItem.type == RechargeType_Coin) {
|
||||
[Api openWithDiamond:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if (code == 200) {
|
||||
[XCHUDTool showSuccessWithMessage:@"开通成功"];
|
||||
} else {
|
||||
[XCHUDTool showErrorWithMessage:msg];
|
||||
}
|
||||
[TTPopup dismiss];
|
||||
} roomUid:self.roomUid];
|
||||
return;
|
||||
}
|
||||
|
||||
NSString * payChannel= self.currentItem.type == RechargeType_WX ? @"wx" : @"alipay_v2";
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
||||
NSString * clientIp= [YYUtility ipAddress];
|
||||
[XCHUDTool showLoading];
|
||||
[Api requestPay:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
[XCHUDTool hideHUD];
|
||||
if (code == 200) {
|
||||
[TTPopup dismiss];
|
||||
id infoData = data.data;
|
||||
if ([payChannel isEqualToString:@"alipay_v2"]) {
|
||||
if ([infoData isKindOfClass:[NSDictionary class]]) {
|
||||
if ([[infoData objectForKey:@"payType"] isEqualToString:@"h5"]) {
|
||||
XPWebViewController *webView = [[XPWebViewController alloc] init];
|
||||
webView.url = [infoData objectForKey:@"orderData"];
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:webView animated:YES];
|
||||
}else if ([[infoData objectForKey:@"payType"] isEqualToString:@"native"]) {
|
||||
NSString * signedStr = [infoData objectForKey:@"orderData"];
|
||||
NSString * scheme = @"daeplayapp";
|
||||
[[AlipaySDK defaultService] payOrder:signedStr fromScheme:scheme callback:^(NSDictionary *resultDic) {
|
||||
|
||||
}];
|
||||
}
|
||||
}
|
||||
} else if ([payChannel isEqualToString:@"alipay"]) {
|
||||
if ([data isKindOfClass:[NSString class]]) {
|
||||
NSString * scheme = @"daeplayapp";
|
||||
NSString * signedStr = [infoData objectForKey:@"orderData"];
|
||||
[[AlipaySDK defaultService] payOrder:signedStr fromScheme:scheme callback:^(NSDictionary *resultDic) {
|
||||
|
||||
}];
|
||||
}
|
||||
}else if ([payChannel isEqualToString:@"wx"]){
|
||||
if ([infoData isKindOfClass:[NSDictionary class]]) {
|
||||
// 微信支付
|
||||
if (((NSString *)infoData[@"appid"]).length > 0) {
|
||||
[WXApi registerApp:infoData[@"appid"] universalLink:@"https://f02efc69cbad775287063e8ee37733a5.share2dlink.com/"];
|
||||
}
|
||||
PayReq *req = [[PayReq alloc] init];
|
||||
NSDictionary * dict = infoData;
|
||||
NSMutableString *stamp = [dict objectForKey:@"timestamp"];
|
||||
req.partnerId = [dict objectForKey:@"partnerid"];
|
||||
req.prepayId = [dict objectForKey:@"prepayid"];
|
||||
req.nonceStr = [dict objectForKey:@"noncestr"];
|
||||
req.timeStamp = stamp.intValue;
|
||||
req.package = @"Sign=WXPay";
|
||||
req.sign = [dict objectForKey:@"sign"];
|
||||
[WXApi sendReq:req completion:^(BOOL success) {
|
||||
if (success) {
|
||||
NSLog(@"********调起微信支付成功");
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
}
|
||||
} else {
|
||||
[XCHUDTool showErrorWithMessage:msg];
|
||||
}
|
||||
} chargeProdId:self.chargeProdId payChannel:payChannel clientIp:clientIp uid:uid ticket:ticket roomUid:self.roomUid];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setChargeMoney:(NSString *)chargeMoney {
|
||||
_chargeMoney = chargeMoney;
|
||||
if (_chargeMoney.length > 0) {
|
||||
self.moneyLabel.text = [NSString stringWithFormat:@"¥%@", _chargeMoney];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setPayType:(RechargeDefaultPayType)payType {
|
||||
_payType = payType;
|
||||
if (_payType == RechargeDefaultPayType_Coin) {
|
||||
self.diamondImageView.hidden = NO;
|
||||
self.moneyLabel.text = [NSString stringWithFormat:@"%.0f", _chargeMoney.floatValue * 10];
|
||||
} else {
|
||||
self.diamondImageView.hidden = YES;
|
||||
self.moneyLabel.text = [NSString stringWithFormat:@"¥%@", _chargeMoney];
|
||||
}
|
||||
}
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium];
|
||||
_titleLabel.textColor = [ThemeColor mainTextColor];
|
||||
_titleLabel.text = @"支付";
|
||||
_titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
- (UIStackView *)moneyStackView {
|
||||
if (!_moneyStackView) {
|
||||
_moneyStackView = [[UIStackView alloc] init];
|
||||
_moneyStackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
_moneyStackView.distribution = UIStackViewDistributionFill;
|
||||
_moneyStackView.alignment = UIStackViewAlignmentCenter;
|
||||
_moneyStackView.spacing = 2;
|
||||
}
|
||||
return _moneyStackView;
|
||||
}
|
||||
|
||||
- (UIImageView *)diamondImageView {
|
||||
if (!_diamondImageView) {
|
||||
_diamondImageView = [[UIImageView alloc] init];
|
||||
_diamondImageView.userInteractionEnabled = YES;
|
||||
_diamondImageView.image = [UIImage imageNamed:@"common_diamond"];
|
||||
_diamondImageView.hidden = YES;
|
||||
}
|
||||
return _diamondImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)moneyLabel {
|
||||
if (!_moneyLabel) {
|
||||
_moneyLabel = [[UILabel alloc] init];
|
||||
_moneyLabel.font = [UIFont systemFontOfSize:30 weight:UIFontWeightMedium];
|
||||
_moneyLabel.textColor = [ThemeColor colorWithHexString:@"#FFBC52"];
|
||||
_moneyLabel.textAlignment = NSTextAlignmentCenter;
|
||||
}
|
||||
return _moneyLabel;
|
||||
}
|
||||
|
||||
- (UITableView *)tableView {
|
||||
if (!_tableView) {
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain];
|
||||
_tableView.delegate = self;
|
||||
_tableView.dataSource = self;
|
||||
_tableView.tableFooterView = [UIView new];
|
||||
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
_tableView.backgroundColor = [UIColor clearColor];
|
||||
if (@available(iOS 11.0, *)) {
|
||||
_tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
}
|
||||
[_tableView registerClass:[XPNobleRechargeTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPNobleRechargeTableViewCell class])];
|
||||
}
|
||||
return _tableView;
|
||||
}
|
||||
|
||||
- (UIButton *)payButton {
|
||||
if (!_payButton) {
|
||||
_payButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_payButton setTitle:@"确认支付" forState:UIControlStateNormal];
|
||||
[_payButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||
_payButton.titleLabel.font = [UIFont systemFontOfSize:15];
|
||||
[_payButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[[ThemeColor confirmButtonGradientStartColor], [ThemeColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
|
||||
_payButton.layer.masksToBounds = YES;
|
||||
_payButton.layer.cornerRadius = 45/2;
|
||||
[_payButton addTarget:self action:@selector(payButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _payButton;
|
||||
}
|
||||
|
||||
@end
|
@@ -34,6 +34,7 @@
|
||||
#import "XPNobleSettingViewController.h"
|
||||
#import "XPNobleRankViewController.h"
|
||||
#import "XPNobleDiscountView.h"
|
||||
#import "XPNobleRechargeView.h"
|
||||
///P
|
||||
#import "XPNobleCenterPresenter.h"
|
||||
///model
|
||||
@@ -173,7 +174,7 @@
|
||||
- (void)requestHttp {
|
||||
[self.presenter getUserInfo];
|
||||
[self checkTranscationIds];
|
||||
[self.presenter getNobleChargeProductListWithChannelType:@"10"];
|
||||
[self.presenter getNobleChargeProductListWithChannelType:@"9"];
|
||||
}
|
||||
|
||||
///批量验证
|
||||
@@ -382,9 +383,12 @@
|
||||
#pragma mark - events
|
||||
- (void)onOpenNobleButtonClick:(UITapGestureRecognizer *)button {
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventVipOpenClick];
|
||||
RechargeListModel *rechargeModel = [self.rechargeModel.list safeObjectAtIndex1:0];
|
||||
[self showLoading];
|
||||
[self.presenter requestNobleIAPRechargeOrderWithChargeProdId:rechargeModel.chargeProdId roomUid:self.roomUid ? [NSString stringWithFormat:@"%zd", self.roomUid] : nil];
|
||||
XPNobleRechargeView * rechargetView =[[XPNobleRechargeView alloc] init];
|
||||
rechargetView.rate = self.rechargeModel.rate;
|
||||
rechargetView.chargeMoney = [NSString stringWithFormat:@"%.0f", self.rechargeModel.money];
|
||||
rechargetView.chargeProdId = self.rechargeModel.chargeProdId;
|
||||
rechargetView.roomUid = [NSString stringWithFormat:@"%ld", self.roomUid];
|
||||
[TTPopup popupView:rechargetView style:TTPopupStyleActionSheet];
|
||||
}
|
||||
|
||||
- (void)nobleRankButtonAction:(UIButton *)sender {
|
||||
|
@@ -1,311 +0,0 @@
|
||||
//
|
||||
// XPMineRechargeViewController.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/24.
|
||||
//
|
||||
|
||||
#import "XPMineRechargeViewController.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <Base64/MF_Base64Additions.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "XPMacro.h"
|
||||
#import "XPHtmlUrl.h"
|
||||
#import "XPIAPHelper.h"
|
||||
#import "RechargeStorage.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "NSObject+MJExtension.h"
|
||||
#import "NSArray+Safe.h"
|
||||
///Model
|
||||
#import "RechargeListModel.h"
|
||||
///View
|
||||
#import "XPMineRechageHeadView.h"
|
||||
#import "XPMineRechargeTableViewCell.h"
|
||||
#import "XPMineRechargeNavView.h"
|
||||
///P
|
||||
#import "XPMineRechargePresenter.h"
|
||||
#import "XPMineRechargeProtocol.h"
|
||||
///VC
|
||||
#import "XPWebViewController.h"
|
||||
|
||||
@interface XPMineRechargeViewController ()<XPMineRechargeProtocol, UITableViewDelegate, UITableViewDataSource, XPMineRechargeTableViewCellDelegate, XPIAPHelperDelegate, XPMineRechargeNavViewDelegate>
|
||||
///数据源
|
||||
@property (nonatomic,strong) NSArray *datasource;
|
||||
///列表
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
///
|
||||
@property (nonatomic,strong) XPMineRechageHeadView *headeView;
|
||||
///订单编号
|
||||
@property (nonatomic,copy) NSString *orderId;
|
||||
///导航栏
|
||||
@property (nonatomic,strong) XPMineRechargeNavView *navView;
|
||||
///
|
||||
@property (nonatomic,strong) UIStackView *stackView;
|
||||
///同意
|
||||
@property (nonatomic,strong) UILabel *agreeLabel;
|
||||
///充值协议
|
||||
@property (nonatomic,strong) UIButton *protcoloButton;
|
||||
@end
|
||||
|
||||
@implementation XPMineRechargeViewController
|
||||
|
||||
- (void)dealloc {
|
||||
[XPIAPHelper shareHelper].delegate = nil;
|
||||
}
|
||||
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (XPMineRechargePresenter *)createPresenter {
|
||||
return [[XPMineRechargePresenter alloc] init];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
[self initHttpData];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
#pragma mark - Response
|
||||
- (void)protcoloButtonAction:(UIButton *)sender {
|
||||
XPWebViewController * webVC= [[XPWebViewController alloc] init];
|
||||
webVC.url = URLWithType(kRechargePrivacyURL);
|
||||
[self.navigationController pushViewController:webVC animated:YES];
|
||||
}
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
[self.view addSubview:self.tableView];
|
||||
[self.view addSubview:self.navView];
|
||||
[self.view addSubview:self.stackView];
|
||||
|
||||
[self.stackView addArrangedSubview:self.agreeLabel];
|
||||
[self.stackView addArrangedSubview:self.protcoloButton];
|
||||
self.tableView.tableHeaderView = self.headeView;
|
||||
|
||||
[XPIAPHelper shareHelper].delegate = self;
|
||||
self.automaticallyAdjustsScrollViewInsets = NO;
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.view);
|
||||
}];
|
||||
|
||||
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.view);
|
||||
make.bottom.mas_equalTo(self.view).offset(-20 - kSafeAreaBottomHeight);
|
||||
}];
|
||||
|
||||
[self.navView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.top.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(kNavigationHeight);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)initHttpData {
|
||||
[self getRechargeList];
|
||||
[self getUserWalletBalanceInfo];
|
||||
[self checkTranscationIds];
|
||||
}
|
||||
|
||||
- (void)getRechargeList {
|
||||
[self.presenter requestRechargeListWithChannel:@"8"];
|
||||
}
|
||||
|
||||
- (void)getUserWalletBalanceInfo {
|
||||
[self.presenter getUserWalletInfo];
|
||||
}
|
||||
|
||||
///批量验证
|
||||
- (void)checkTranscationIds {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSArray * array = [RechargeStorage getAllReciptsWithUid:uid];
|
||||
if (array.count > 0) {
|
||||
[self.presenter checkTranscationIds:array];
|
||||
}
|
||||
}
|
||||
|
||||
///充值成功之后保存订单到钥匙串
|
||||
- (void)saveRechageReciptWithTransactionIdentifier:(NSString *)transactionIdentifier {
|
||||
NSData *receipt = [NSData dataWithContentsOfURL:[[NSBundle mainBundle] appStoreReceiptURL]];
|
||||
NSString *encodeStr = [receipt base64EncodedStringWithOptions:NSDataBase64EncodingEndLineWithLineFeed];
|
||||
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
|
||||
[dictionary setObject:transactionIdentifier forKey:@"transcationId"];
|
||||
[dictionary setObject:encodeStr forKey:@"recipt"];
|
||||
[dictionary setObject:self.orderId forKey:@"orderId"];
|
||||
NSString *reciptJson = [dictionary toJSONString];
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
BOOL saveSuccess = [RechargeStorage saveTranscationId:transactionIdentifier recipt:reciptJson uid:uid];
|
||||
if (!saveSuccess) {
|
||||
#warning to do 保存失败 需要埋点
|
||||
}
|
||||
}
|
||||
|
||||
///删除本地保存的
|
||||
- (void)deleteRechageReciptWithTransactionIdentifier:(NSString *)transactionIdentifier {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
BOOL deleteSuccess = [RechargeStorage delegateTranscationId:transactionIdentifier uid:uid];
|
||||
if (deleteSuccess) {
|
||||
#warning to do 保存失败 需要埋点
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - UITableViewDelegate And UITableViewDataSource
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return self.datasource.count;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
XPMineRechargeTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineRechargeTableViewCell class]) forIndexPath:indexPath];
|
||||
cell.listModel = [self.datasource safeObjectAtIndex1:indexPath.row];
|
||||
cell.delegate = self;
|
||||
return cell;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return 65;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:true];
|
||||
}
|
||||
|
||||
#pragma mark - XPMineRechargeTableViewCellDelegate
|
||||
- (void)xPMineRechargeTableViewCell:(XPMineRechargeTableViewCell *)cell didSelectItem:(RechargeListModel *)listModel {
|
||||
if (listModel.chargeProdId) {
|
||||
[self showLoading];
|
||||
[self.presenter requestIAPRechargeOrderWithChargeProdId:listModel.chargeProdId];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - XPMineRechargeNavViewDelegate
|
||||
- (void)xPMineRechargeNavView:(XPMineRechargeNavView *)view didClickBackButton:(UIButton *)sender {
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
#pragma mark - XPIAPHelperDelegate
|
||||
///当前充值的状态
|
||||
- (void)rechargeProcessStatus:(PaymentStatus)status {
|
||||
[self hideHUD];
|
||||
if (status == PaymentStatus_Purchased) {
|
||||
[self showLoading];
|
||||
} else if (status == PaymentStatus_Purchasing) {
|
||||
[self showLoading];
|
||||
} else if (status == PaymentStatus_Failed) {
|
||||
[self showErrorToast:@"购买失败"];
|
||||
} else if (status == PaymentStatus_Deferred) {
|
||||
[self showErrorToast:@"出现未知错误,请重新尝试"];
|
||||
}
|
||||
}
|
||||
|
||||
///充值成功回调id
|
||||
- (void)rechargeSuccess:(NSString *)transactionIdentifier {
|
||||
///保存唯一凭证
|
||||
[self saveRechageReciptWithTransactionIdentifier:transactionIdentifier];
|
||||
NSData *receiptData = [NSData dataWithContentsOfURL:[[NSBundle mainBundle] appStoreReceiptURL]];
|
||||
NSString * receipt = [MF_Base64Codec base64StringFromData:receiptData];
|
||||
///二次验证
|
||||
[self.presenter checkReceiptWithData:receipt orderId:self.orderId transcationId:transactionIdentifier];
|
||||
}
|
||||
|
||||
#pragma mark - XPMineRechargeProtocol
|
||||
- (void)requestRechargeListSucccess:(NSArray *)list {
|
||||
self.datasource = list;
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
- (void)requestIAPRechargeOrderSuccess:(NSString *)orderId chargeProdId:(NSString *)chargeProdId {
|
||||
if (orderId.length > 0) {
|
||||
self.orderId = orderId;
|
||||
[[XPIAPHelper shareHelper] buyAppProductWithAppProductId:chargeProdId];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)requestIAPRechargeOrderFail {
|
||||
///获取订单失败
|
||||
}
|
||||
|
||||
///二次验证成功
|
||||
- (void)checkReceiptSuccess:(NSString *)transcationId {
|
||||
[self deleteRechageReciptWithTransactionIdentifier:transcationId];
|
||||
///刷新一下用户的💎
|
||||
[self getUserWalletBalanceInfo];
|
||||
self.orderId = nil;
|
||||
}
|
||||
|
||||
- (void)getUserWalletInfo:(WalletInfoModel *)balanceInfo {
|
||||
self.headeView.walletInfo = balanceInfo;
|
||||
}
|
||||
|
||||
- (void)checkTranscationIdsSuccess {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
[RechargeStorage delegateAllTranscationIdsWithUid:uid];
|
||||
}
|
||||
#pragma mark - Getters And Setters
|
||||
- (UITableView *)tableView {
|
||||
if (!_tableView) {
|
||||
_tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped];
|
||||
_tableView.delegate = self;
|
||||
_tableView.dataSource = self;
|
||||
_tableView.tableFooterView = [UIView new];
|
||||
_tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
|
||||
_tableView.backgroundColor = [UIColor clearColor];
|
||||
if (@available(iOS 11.0, *)) {
|
||||
_tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
|
||||
}
|
||||
[_tableView registerClass:[XPMineRechargeTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineRechargeTableViewCell class])];
|
||||
}
|
||||
return _tableView;
|
||||
}
|
||||
|
||||
- (XPMineRechageHeadView *)headeView {
|
||||
if (!_headeView) {
|
||||
_headeView = [[XPMineRechageHeadView alloc] init];
|
||||
}
|
||||
return _headeView;
|
||||
}
|
||||
|
||||
|
||||
- (UIStackView *)stackView {
|
||||
if (!_stackView) {
|
||||
_stackView = [[UIStackView alloc] init];
|
||||
_stackView.axis = UILayoutConstraintAxisHorizontal;
|
||||
_stackView.distribution = UIStackViewDistributionFill;
|
||||
_stackView.alignment = UIStackViewAlignmentFill;
|
||||
_stackView.spacing = 2;
|
||||
}
|
||||
return _stackView;
|
||||
}
|
||||
|
||||
- (UIButton *)protcoloButton {
|
||||
if (!_protcoloButton) {
|
||||
_protcoloButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_protcoloButton setTitle:@"《用户充值协议》" forState:UIControlStateNormal];
|
||||
[_protcoloButton setTitleColor:[ThemeColor appMainColor] forState:UIControlStateNormal];
|
||||
_protcoloButton.titleLabel.font = [UIFont systemFontOfSize:12];
|
||||
[_protcoloButton addTarget:self action:@selector(protcoloButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _protcoloButton;
|
||||
}
|
||||
- (UILabel *)agreeLabel {
|
||||
if (!_agreeLabel) {
|
||||
_agreeLabel = [[UILabel alloc] init];
|
||||
_agreeLabel.text = @"已阅读并同意";
|
||||
_agreeLabel.font = [UIFont systemFontOfSize:12];
|
||||
_agreeLabel.textColor = [ThemeColor textThirdColor];
|
||||
}
|
||||
return _agreeLabel;
|
||||
}
|
||||
|
||||
- (XPMineRechargeNavView *)navView {
|
||||
if (!_navView) {
|
||||
_navView = [[XPMineRechargeNavView alloc] init];
|
||||
_navView.delegate = self;
|
||||
}
|
||||
return _navView;
|
||||
}
|
||||
|
||||
@end
|
@@ -1,21 +0,0 @@
|
||||
//
|
||||
// XPMineRechargeNavView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/26.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@class XPMineRechargeNavView;
|
||||
@protocol XPMineRechargeNavViewDelegate <NSObject>
|
||||
///点击了返回按钮
|
||||
- (void)xPMineRechargeNavView:(XPMineRechargeNavView *)view didClickBackButton:(UIButton *)sender;
|
||||
@end
|
||||
@interface XPMineRechargeNavView : UIView
|
||||
///代理
|
||||
@property (nonatomic,weak) id<XPMineRechargeNavViewDelegate> delegate;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -1,82 +0,0 @@
|
||||
//
|
||||
// XPMineRechargeNavView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by 冯硕 on 2021/9/26.
|
||||
//
|
||||
|
||||
#import "XPMineRechargeNavView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "UIButton+EnlargeTouchArea.h"
|
||||
|
||||
@interface XPMineRechargeNavView ()
|
||||
///返回按钮
|
||||
@property (nonatomic,strong) UIButton *backButton;
|
||||
///显示文本
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
@end
|
||||
|
||||
@implementation XPMineRechargeNavView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
#pragma mark - Response
|
||||
- (void)backButtonAction:(UIButton *)sender {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPMineRechargeNavView:didClickBackButton:)]) {
|
||||
[self.delegate xPMineRechargeNavView:self didClickBackButton:sender];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
[self addSubview:self.backButton];
|
||||
[self addSubview:self.titleLabel];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.backButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(15);
|
||||
make.centerY.equalTo(self.mas_bottom).mas_offset(-22);
|
||||
}];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self);
|
||||
make.centerY.equalTo(self.mas_bottom).mas_offset(-22);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (UIButton *)backButton {
|
||||
if (!_backButton) {
|
||||
_backButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_backButton setImage:[UIImage imageNamed:@"home_search_white_back"] forState:UIControlStateNormal];
|
||||
_backButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
|
||||
[_backButton addTarget:self action:@selector(backButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[_backButton setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10];
|
||||
}
|
||||
return _backButton;
|
||||
}
|
||||
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_titleLabel.font = [UIFont systemFontOfSize:15];
|
||||
_titleLabel.text = @"账户";
|
||||
_titleLabel.textColor = [UIColor whiteColor];
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
@end
|
@@ -41,7 +41,7 @@
|
||||
///P
|
||||
#import "XPGiftProtocol.h"
|
||||
///VC
|
||||
#import "XPMineNewRechargeViewController.h"
|
||||
#import "XPMineHalfRechargeViewController.h"
|
||||
#import "XPWebViewController.h"
|
||||
#import "XPFirstRechargeViewController.h"
|
||||
#import "XPNobleCenterViewController.h"
|
||||
@@ -413,14 +413,19 @@
|
||||
///充值
|
||||
- (void)xPGiftBarViewDidClickRecharge:(XPGiftBarView *)view {
|
||||
[self dismissViewControllerAnimated:NO completion:^{
|
||||
XPMineNewRechargeViewController * rechargeVC = [[XPMineNewRechargeViewController alloc] init];
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:rechargeVC animated:YES];
|
||||
XPMineHalfRechargeViewController * rechargeVC = [[XPMineHalfRechargeViewController alloc] init];
|
||||
rechargeVC.modalPresentationStyle = UIModalPresentationOverFullScreen;
|
||||
if (self.delegate.getRoomInfo) {
|
||||
rechargeVC.roomUid = [NSString stringWithFormat:@"%ld", self.delegate.getRoomInfo.uid];
|
||||
}
|
||||
rechargeVC.currentNav = self.delegate.getCurrentNav ? self.delegate.getCurrentNav : [XCCurrentVCStackManager shareManager].getCurrentVC.navigationController;
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC presentViewController:rechargeVC animated:YES completion:nil];
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)xPGiftBarViewDidClickFirstRecharge:(XPGiftBarView *)view {
|
||||
[self dismissViewControllerAnimated:NO completion:^{
|
||||
XPFirstRechargeViewController * firstRechargeVC = [[XPFirstRechargeViewController alloc] initWithNavigation:self.delegate.getCurrentNav];
|
||||
XPFirstRechargeViewController * firstRechargeVC = [[XPFirstRechargeViewController alloc] initWithNavigation:[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController];
|
||||
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController presentViewController:firstRechargeVC animated:YES completion:nil];
|
||||
}];
|
||||
}
|
||||
|
@@ -14,6 +14,7 @@
|
||||
#import "UIImage+Utils.h"
|
||||
#import "XPFirstRechargeFlowLayout.h"
|
||||
#import "NSArray+Safe.h"
|
||||
#import "TTPopup.h"
|
||||
///Model
|
||||
#import "FirstRechargeModel.h"
|
||||
///View
|
||||
@@ -23,6 +24,7 @@
|
||||
#import "XPFirstRechargeProtocol.h"
|
||||
///VC
|
||||
#import "XPMineNewRechargeViewController.h"
|
||||
#import "XPEnterpriseFirstRechargePayView.h"
|
||||
|
||||
@interface XPFirstRechargeViewController ()<XPFirstRechargeProtocol, UICollectionViewDelegate, UICollectionViewDataSource>
|
||||
///顶部的View
|
||||
@@ -53,6 +55,8 @@
|
||||
@property (nonatomic,strong) NSArray<FirstRechargeModel *> *originArray;
|
||||
///当前的导航栏
|
||||
@property (nonatomic,weak) UINavigationController * currentNav;
|
||||
///选中的充值信息
|
||||
@property (nonatomic,strong) FirstRechargeModel *selectRechargeInfo;
|
||||
@end
|
||||
|
||||
@implementation XPFirstRechargeViewController
|
||||
@@ -161,6 +165,7 @@
|
||||
}
|
||||
|
||||
- (void)createExtraRewardAttrebute:(FirstRechargeModel *)model {
|
||||
self.selectRechargeInfo = model;
|
||||
self.descripTextView.text = model.chargeProdDesc;
|
||||
NSString * title = model.chargeProdTitle;
|
||||
NSString * giveMoneyStr = [NSString stringWithFormat:@"%ld", model.giveMoney];
|
||||
@@ -225,8 +230,12 @@
|
||||
|
||||
- (void)rechargeButtonAction:(UIButton *)sender {
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
XPMineNewRechargeViewController * rechargeVC = [[XPMineNewRechargeViewController alloc] init];
|
||||
[self.currentNav pushViewController:rechargeVC animated:YES];
|
||||
XPEnterpriseFirstRechargePayView * rechargetView =[[XPEnterpriseFirstRechargePayView alloc] init];
|
||||
rechargetView.chargeMoney = [NSString stringWithFormat:@"%ld", self.selectRechargeInfo.chargeMoney];
|
||||
rechargetView.chargeProdId = self.selectRechargeInfo.chargeProdId;
|
||||
rechargetView.firstrechargeVC = self;
|
||||
[TTPopup popupView:rechargetView style:TTPopupStyleActionSheet];
|
||||
|
||||
}
|
||||
|
||||
- (void)buttonAction:(UIButton *)sender {
|
||||
|
@@ -88,6 +88,10 @@
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_Hall_Super_Admin_Kick_Manager_Out_Room),
|
||||
nil],
|
||||
@(CustomMessageType_Tarot):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_Tarot),
|
||||
nil],
|
||||
@(CustomMessageType_Room_PK):
|
||||
[NSSet setWithObjects:
|
||||
@(Custom_Message_Sub_Room_PK_Manager_Up_Mic),
|
||||
|
@@ -928,9 +928,9 @@
|
||||
NSString *text = [NSString stringWithFormat:@" %@", attachment.data[@"drawMsgText"]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:text color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
if ([attachment.data[@"drawGoldNum"] intValue] > 1) {
|
||||
[attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@"%d",[attachment.data[@"drawGoldNum"] intValue]] color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@"%d",[attachment.data[@"drawGoldNum"] intValue]] color:[ThemeColor messageNickColor] font:kRoomMessageDefalutFont]];
|
||||
}
|
||||
[attribute appendAttributedString:[self createTextAttribute:[NSString stringWithFormat:@"%@ ", attachment.data[@"chargeProdName"]] color:[ThemeColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
|
||||
[attribute appendAttributedString:[self createTextAttribute:@"钻石" color:[ThemeColor messageNickColor] font:kRoomMessageDefalutFont]];
|
||||
}
|
||||
messageInfo.content = attribute;
|
||||
return messageInfo;
|
||||
|
@@ -107,11 +107,11 @@
|
||||
|
||||
- (UICollectionView *)collectionView{
|
||||
if (!_collectionView) {
|
||||
XPFirstRechargeFlowLayout *layout = [[XPFirstRechargeFlowLayout alloc] init];
|
||||
layout.itemSize = CGSizeMake(70, 70+ 16);
|
||||
layout.minimumLineSpacing = 12;
|
||||
layout.sectionInset = UIEdgeInsetsMake(10, 10, 10, 10);
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
layout.itemSize = CGSizeMake(64, 94);
|
||||
layout.scrollDirection = UICollectionViewScrollDirectionHorizontal;
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
|
||||
_collectionView.showsHorizontalScrollIndicator = NO;
|
||||
_collectionView.dataSource = self;
|
||||
_collectionView.delegate = self;
|
||||
_collectionView.backgroundColor = [UIColor clearColor];
|
||||
|
@@ -16,10 +16,12 @@
|
||||
#import "Timestamp.h"
|
||||
#import "StatisticsServiceHelper.h"
|
||||
#import "NSArray+Safe.h"
|
||||
#import "TTPopup.h"
|
||||
///Model
|
||||
#import "NewUserRechargeModel.h"
|
||||
///View
|
||||
#import "XPNewUserRechargeCollectionViewCell.h"
|
||||
#import "XPEnterpriseFirstRechargePayView.h"
|
||||
///P
|
||||
#import "MainPresenter.h"
|
||||
#import "MainProtocol.h"
|
||||
@@ -60,6 +62,8 @@
|
||||
@property (nonatomic,weak) UINavigationController * currentNav;
|
||||
///转场动画
|
||||
@property (nonatomic, strong) XPNewUserRechargePresentTrasition *animatedTransition;
|
||||
///选中的充值信息
|
||||
@property (nonatomic,strong) FirstRechargeModel *selectRechargeInfo;
|
||||
|
||||
@end
|
||||
|
||||
@@ -211,6 +215,7 @@
|
||||
self.rechargeButton.enabled = NO;
|
||||
}
|
||||
button.selected = YES;
|
||||
self.selectRechargeInfo = modelInfo;
|
||||
[self.extraButton setTitle:modelInfo.chargeProdTitle forState:UIControlStateNormal];
|
||||
self.rewardArray = modelInfo.firstChargeRewardList;
|
||||
if (self.rewardArray.count < 4) {
|
||||
@@ -269,14 +274,19 @@
|
||||
|
||||
- (void)rechargeButtonAction:(UIButton *)sender {
|
||||
[self dismissViewControllerAnimated:YES completion:nil];
|
||||
XPMineNewRechargeViewController * rechargeVC = [[XPMineNewRechargeViewController alloc] init];
|
||||
[self.currentNav pushViewController:rechargeVC animated:YES];
|
||||
XPEnterpriseFirstRechargePayView * rechargetView =[[XPEnterpriseFirstRechargePayView alloc] init];
|
||||
rechargetView.chargeMoney = [NSString stringWithFormat:@"%ld", self.selectRechargeInfo.chargeMoney];
|
||||
rechargetView.chargeProdId = self.selectRechargeInfo.chargeProdId;
|
||||
rechargetView.firstrechargeVC = self;
|
||||
[TTPopup popupView:rechargetView style:TTPopupStyleActionSheet];
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventNugiftPopClick eventAttributes:@{@"buy_level" : [NSString stringWithFormat:@"%ld", self.selectRechargeInfo.chargeMoney]}];
|
||||
}
|
||||
|
||||
- (void)buttonAction:(UIButton *)sender {
|
||||
if (sender.tag <= self.originArray.count) {
|
||||
FirstRechargeModel * model = [self.originArray safeObjectAtIndex1:sender.tag];
|
||||
self.rechargeButton.enabled = !model.finishCharge;
|
||||
self.selectRechargeInfo = model;
|
||||
[self.extraButton setTitle:model.chargeProdTitle forState:UIControlStateNormal];
|
||||
self.rewardArray = model.firstChargeRewardList;
|
||||
if (self.rewardArray.count < 4) {
|
||||
@@ -403,6 +413,7 @@
|
||||
_rechargeButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_rechargeButton setImage:[UIImage imageNamed:@"NewUserRecharge_goto"] forState:UIControlStateNormal];
|
||||
[_rechargeButton setImage:[UIImage imageNamed:@"NewUserRecharge_had_rewcharge"] forState:UIControlStateDisabled];
|
||||
[_rechargeButton addTarget:self action:@selector(rechargeButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
return _rechargeButton;
|
||||
}
|
||||
|
@@ -491,6 +491,18 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (message.messageType == NIMMessageTypeCustom) {
|
||||
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
|
||||
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
|
||||
AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
|
||||
if (attachment.first == CustomMessageType_First_Recharge_Reward && attachment.second == Custom_Message_Sub_New_User_Recharge_Reward) {
|
||||
FirstRechargeModel *model = [FirstRechargeModel modelWithJSON:attachment.data];
|
||||
XPNewUserRechargeSucessView * firstRechargeView= [[XPNewUserRechargeSucessView alloc] init];
|
||||
firstRechargeView.rechargeInfo = model;
|
||||
[TTPopup popupView:firstRechargeView style:TTPopupStyleAlert];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -22,12 +22,21 @@
|
||||
#import "XPMineNewRechargeViewController.h"
|
||||
#import "NSMutableDictionary+Saft.h"
|
||||
#import "Base64.h"
|
||||
#import <WXApi.h>
|
||||
///vc
|
||||
#import "XPMineDressUpViewController.h"
|
||||
#import "XPDressUpShopViewController.h"
|
||||
#import "XPRoomViewController.h"
|
||||
#import "RoomHostDelegate.h"
|
||||
#import "XPMonentTopicContainerViewController.h"
|
||||
#import "XPRoomHalfWebView.h"
|
||||
#import "XPEnterpriseTarotPayView.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
static const NSString *CompanyFirstDomainByWeChatRegister = @"api.uat.lecheng163.com";
|
||||
#else
|
||||
static const NSString *CompanyFirstDomainByWeChatRegister = @"api.lecheng163.com";
|
||||
#endif
|
||||
|
||||
typedef NS_ENUM(NSUInteger, RightNavigationPushType){
|
||||
///跳转h5页面
|
||||
@@ -98,6 +107,9 @@ NSString * const kJSOpenRoom = @"openRoom";
|
||||
NSString * const kJSOpenRoomForGiftId = @"openRoomForGiftId";
|
||||
NSString * const kProhibitRightSlip = @"prohibitRightSlip";
|
||||
NSString * const kSaveBase64Image = @"saveBase64Image";
|
||||
NSString * const kOpenDialogWebview = @"openDialogWebview";
|
||||
NSString * const kCheckResultFinish = @"checkResultFinish";
|
||||
NSString * const kOpenNativeTarotPay = @"openNativeTarotPay";
|
||||
|
||||
@implementation XPWebViewController
|
||||
|
||||
@@ -118,6 +130,8 @@ NSString * const kSaveBase64Image = @"saveBase64Image";
|
||||
}
|
||||
|
||||
- (void)initView {
|
||||
///塔罗牌
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(checkResultFinish:) name:kCheckResultFinish object:nil];
|
||||
if (self.navigationController.viewControllers.count > 1){
|
||||
UIBarButtonItem *leftBarButtonItem = [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"common_nav_back"] style:UIBarButtonItemStylePlain target:self action:@selector(backButtonClick)];
|
||||
|
||||
@@ -161,8 +175,35 @@ NSString * const kSaveBase64Image = @"saveBase64Image";
|
||||
NSURL *URL = navigationAction.request.URL;
|
||||
NSString *scheme = [URL scheme];
|
||||
NSURLRequest *request = navigationAction.request;
|
||||
|
||||
///卡罗牌
|
||||
NSString *absoluteString = [navigationAction.request.URL.absoluteString stringByRemovingPercentEncoding];
|
||||
static NSString *endPayRedirectURL = nil;
|
||||
if ([absoluteString hasPrefix:@"https://wx.tenpay.com/cgi-bin/mmpayweb-bin/checkmweb"] && ![absoluteString hasSuffix:[NSString stringWithFormat:@"redirect_url=xdx.%@://",CompanyFirstDomainByWeChatRegister]]) {
|
||||
NSString *redirectUrl = nil;
|
||||
if ([absoluteString containsString:@"redirect_url="]) {
|
||||
NSRange redirectRange = [absoluteString rangeOfString:@"redirect_url"];
|
||||
endPayRedirectURL = [absoluteString substringFromIndex:redirectRange.location+redirectRange.length+1];
|
||||
// stringByAddingPercentEncodingWithAllowedCharacters:[[NSCharacterSet characterSetWithCharactersInString:@"?!@#$^&%*+,:;='\"`<>()[]{}/\\| "] invertedSet]]
|
||||
redirectUrl = [[absoluteString substringToIndex:redirectRange.location] stringByAppendingString:[NSString stringWithFormat:@"redirect_url=xdx.%@://",CompanyFirstDomainByWeChatRegister]];
|
||||
}else {
|
||||
redirectUrl = [absoluteString stringByAppendingString:[NSString stringWithFormat:@"&redirect_url=xdx.%@://",CompanyFirstDomainByWeChatRegister]];
|
||||
}
|
||||
|
||||
NSMutableURLRequest *newRequest = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:redirectUrl] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10];
|
||||
newRequest.allHTTPHeaderFields = request.allHTTPHeaderFields;
|
||||
newRequest.URL = [NSURL URLWithString:redirectUrl];
|
||||
[webView loadRequest:newRequest];
|
||||
decisionHandler(WKNavigationActionPolicyCancel);
|
||||
return;
|
||||
}
|
||||
// Judge is whether to jump to other app.
|
||||
if (![scheme isEqualToString:@"https"] && ![scheme isEqualToString:@"http"]) {
|
||||
if ([scheme isEqualToString:@"weixin"]) {
|
||||
if (endPayRedirectURL) {
|
||||
[webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:endPayRedirectURL] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:10]];
|
||||
}
|
||||
}
|
||||
BOOL canOpen = [[UIApplication sharedApplication] canOpenURL:request.URL];
|
||||
if (canOpen) {
|
||||
[[UIApplication sharedApplication] openURL:request.URL];
|
||||
@@ -343,7 +384,6 @@ NSString * const kSaveBase64Image = @"saveBase64Image";
|
||||
[XPRoomViewController openRoom:uid giftId:giftId viewController:[XCCurrentVCStackManager shareManager].getCurrentVC];
|
||||
});
|
||||
}
|
||||
|
||||
} else if([message.name isEqualToString:kSaveBase64Image]) {
|
||||
NSString * base64 = message.body;
|
||||
NSArray * array = [base64 componentsSeparatedByString:@","];
|
||||
@@ -352,12 +392,55 @@ NSString * const kSaveBase64Image = @"saveBase64Image";
|
||||
UIImage * image = [UIImage imageWithData:data];
|
||||
UIImageWriteToSavedPhotosAlbum(image, self, @selector(image:didFinishSavingWithError:contextInfo:), (__bridge void *)self);
|
||||
}
|
||||
}
|
||||
} else if([message.name isEqualToString:kOpenDialogWebview]) {
|
||||
XPEnterpriseTarotPayView *alert = [[XPEnterpriseTarotPayView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth - 37 * 2, 200)];
|
||||
alert.url = message.body;
|
||||
TTPopupService * service = [[TTPopupService alloc] init];
|
||||
service.shouldDismissOnBackgroundTouch = NO;
|
||||
service.contentView = alert;
|
||||
[TTPopup popupWithConfig:service];
|
||||
} else if([message.name isEqualToString:kCheckResultFinish]) {
|
||||
[TTPopup dismiss];
|
||||
NSString * body = message.body;
|
||||
///这个为什么不能直接调用下面的的方法?收到这个刷新的方法的是当前半屏的这个webview 但是刷新的话是刷新 打开塔罗牌的那个webView
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:kCheckResultFinish object:body];
|
||||
} else if([message.name isEqualToString:kOpenNativeTarotPay]) {
|
||||
NSDictionary *bodyDict;
|
||||
if ([message.body isKindOfClass:[NSDictionary class]]) {
|
||||
bodyDict = message.body;
|
||||
} else if ([message.body isKindOfClass:[NSString class]]) {
|
||||
NSString *str = (NSString *)message.body;
|
||||
bodyDict = [str toJSONObject];
|
||||
}
|
||||
NSLog(@"%@",bodyDict);
|
||||
// 微信支付
|
||||
[WXApi registerApp:bodyDict[@"appid"] universalLink:@"https://f02efc69cbad775287063e8ee37733a5.share2dlink.com/"];
|
||||
|
||||
PayReq *req = [[PayReq alloc] init];
|
||||
NSMutableString *stamp = [bodyDict objectForKey:@"timestamp"];
|
||||
req.partnerId = [bodyDict objectForKey:@"partnerid"];
|
||||
req.prepayId = [bodyDict objectForKey:@"prepayid"];
|
||||
req.nonceStr = [bodyDict objectForKey:@"noncestr"];
|
||||
req.timeStamp = stamp.intValue;
|
||||
req.package = [bodyDict objectForKey:@"package"];
|
||||
req.sign = [bodyDict objectForKey:@"sign"];
|
||||
[WXApi sendReq:req completion:^(BOOL success) {
|
||||
if (success) {
|
||||
NSLog(@"********调起微信支付成功");
|
||||
}
|
||||
}];
|
||||
|
||||
XPEnterpriseTarotPayView *alert = [[XPEnterpriseTarotPayView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth - 37 * 2, 200)];
|
||||
alert.url = bodyDict[@"url"];
|
||||
TTPopupService * service = [[TTPopupService alloc] init];
|
||||
service.shouldDismissOnBackgroundTouch = NO;
|
||||
service.contentView = alert;
|
||||
[TTPopup popupWithConfig:service];
|
||||
}
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - private metho
|
||||
- (void)image:(UIImage *)image didFinishSavingWithError:(NSError *)error contextInfo:(void *)contextInfo{
|
||||
if (error == nil) {
|
||||
@@ -372,6 +455,7 @@ NSString * const kSaveBase64Image = @"saveBase64Image";
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)handleRouterType:(NSInteger)skyType message:(WKScriptMessage *)message {
|
||||
NSDictionary *bodyDict;
|
||||
if ([message.body isKindOfClass:[NSDictionary class]]) {
|
||||
@@ -417,6 +501,13 @@ NSString * const kSaveBase64Image = @"saveBase64Image";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)checkResultFinish:(NSNotification *)notification {
|
||||
NSString *js = [NSString stringWithFormat:@"taroPayResultCallback(\"%@\")",notification.object];
|
||||
[self.webview evaluateJavaScript:js completionHandler:^(id _Nullable other, NSError * _Nullable error) {
|
||||
NSLog(@"%@",error);
|
||||
}];
|
||||
}
|
||||
|
||||
- (void)setUrl:(NSString *)urlString{
|
||||
_url = urlString;
|
||||
@@ -426,17 +517,21 @@ NSString * const kSaveBase64Image = @"saveBase64Image";
|
||||
if (![_url hasPrefix:@"http"] && ![_url hasPrefix:@"https"]){
|
||||
_url = [NSString stringWithFormat:@"%@/%@", API_HOST_H5_URL, _url];
|
||||
}
|
||||
|
||||
if (![_url containsString:@"?"]) {
|
||||
_url = [NSString stringWithFormat:@"%@?platform=%@", _url, [YYUtility appName]];
|
||||
} else {
|
||||
_url = [NSString stringWithFormat:@"%@&platform=%@", _url, [YYUtility appName]];
|
||||
}
|
||||
if (![_url containsString:@"alipayh5"]) {
|
||||
if (![_url containsString:@"?"]) {
|
||||
_url = [NSString stringWithFormat:@"%@?platform=%@", _url, [YYUtility appName]];
|
||||
} else {
|
||||
_url = [NSString stringWithFormat:@"%@&platform=%@", _url, [YYUtility appName]];
|
||||
}
|
||||
}
|
||||
|
||||
// 去掉 urlString 中的空格。
|
||||
NSString *noSpaceTextUrl = [_url stringByReplacingOccurrencesOfString:@" " withString:@""];
|
||||
|
||||
NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:noSpaceTextUrl]];
|
||||
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:noSpaceTextUrl]];
|
||||
if ([_url containsString:@"wx.tenpay"]) {
|
||||
[request setValue:[NSString stringWithFormat:@"xdx.%@://", CompanyFirstDomainByWeChatRegister] forHTTPHeaderField:@"Referer"];
|
||||
}
|
||||
[self.webview loadRequest:request];
|
||||
}
|
||||
|
||||
@@ -683,6 +778,10 @@ NSString * const kSaveBase64Image = @"saveBase64Image";
|
||||
[_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kProhibitRightSlip];
|
||||
///保存图片到本地
|
||||
[_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kSaveBase64Image];
|
||||
// 卡罗牌
|
||||
[_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kOpenDialogWebview];
|
||||
[_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kCheckResultFinish];
|
||||
[_userContentController addScriptMessageHandler:weakScriptMessageDelegate name:kOpenNativeTarotPay];
|
||||
}
|
||||
return _userContentController;
|
||||
}
|
||||
|