diff --git a/yinmeng-ios.xcodeproj/project.pbxproj b/yinmeng-ios.xcodeproj/project.pbxproj index bec65a0..5d4bab1 100644 --- a/yinmeng-ios.xcodeproj/project.pbxproj +++ b/yinmeng-ios.xcodeproj/project.pbxproj @@ -26,6 +26,14 @@ 2311D6C42B917619001C70AB /* HomeVoiceRecordView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2311D6C32B917619001C70AB /* HomeVoiceRecordView.swift */; }; 2311D6C62B917949001C70AB /* HomeVoiceRecordBtnView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2311D6C52B917949001C70AB /* HomeVoiceRecordBtnView.swift */; }; 2311D6CB2B91BBF2001C70AB /* RecordVoiceManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 2311D6CA2B91BBF2001C70AB /* RecordVoiceManager.m */; }; + 2311D6CF2B91D35E001C70AB /* UserPayViewItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2311D6CE2B91D35E001C70AB /* UserPayViewItemView.swift */; }; + 2311D6D12B91DDDF001C70AB /* UserPayViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2311D6D02B91DDDF001C70AB /* UserPayViewModel.swift */; }; + 2311D6D52B91E732001C70AB /* UserPayViewManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2311D6D42B91E732001C70AB /* UserPayViewManager.swift */; }; + 2311D6D72B91EF62001C70AB /* PlanetStarPopUpView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2311D6D62B91EF62001C70AB /* PlanetStarPopUpView.swift */; }; + 2311D6D92B920442001C70AB /* yinLogo.png in Resources */ = {isa = PBXBuildFile; fileRef = 2311D6D82B920442001C70AB /* yinLogo.png */; }; + 2311D6DB2B920478001C70AB /* textLogo.png in Resources */ = {isa = PBXBuildFile; fileRef = 2311D6DA2B920478001C70AB /* textLogo.png */; }; + 2311D6DD2B9204EF001C70AB /* logoBg.png in Resources */ = {isa = PBXBuildFile; fileRef = 2311D6DC2B9204EF001C70AB /* logoBg.png */; }; + 2311D6DF2B9207AA001C70AB /* StoreKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2311D6DE2B9207AA001C70AB /* StoreKit.framework */; }; 233E515B2B8C849600582F9C /* PlanetStarClickItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 233E515A2B8C849600582F9C /* PlanetStarClickItemView.swift */; }; 25C63BC8F805551E8754E409 /* Pods_yinmeng_ios.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B2F175918AD0811681497739 /* Pods_yinmeng_ios.framework */; }; E81A7BAE2B885B20009E736E /* Base64.m in Sources */ = {isa = PBXBuildFile; fileRef = E81A7BAA2B885B20009E736E /* Base64.m */; }; @@ -118,6 +126,14 @@ 2311D6C52B917949001C70AB /* HomeVoiceRecordBtnView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeVoiceRecordBtnView.swift; sourceTree = ""; }; 2311D6C92B91BBF2001C70AB /* RecordVoiceManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RecordVoiceManager.h; sourceTree = ""; }; 2311D6CA2B91BBF2001C70AB /* RecordVoiceManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RecordVoiceManager.m; sourceTree = ""; }; + 2311D6CE2B91D35E001C70AB /* UserPayViewItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserPayViewItemView.swift; sourceTree = ""; }; + 2311D6D02B91DDDF001C70AB /* UserPayViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserPayViewModel.swift; sourceTree = ""; }; + 2311D6D42B91E732001C70AB /* UserPayViewManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserPayViewManager.swift; sourceTree = ""; }; + 2311D6D62B91EF62001C70AB /* PlanetStarPopUpView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlanetStarPopUpView.swift; sourceTree = ""; }; + 2311D6D82B920442001C70AB /* yinLogo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = yinLogo.png; sourceTree = ""; }; + 2311D6DA2B920478001C70AB /* textLogo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = textLogo.png; sourceTree = ""; }; + 2311D6DC2B9204EF001C70AB /* logoBg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = logoBg.png; sourceTree = ""; }; + 2311D6DE2B9207AA001C70AB /* StoreKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = StoreKit.framework; path = System/Library/Frameworks/StoreKit.framework; sourceTree = SDKROOT; }; 233E515A2B8C849600582F9C /* PlanetStarClickItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlanetStarClickItemView.swift; sourceTree = ""; }; A9FB906EB4D17C552C15A2B3 /* Pods-yinmeng-ios.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-yinmeng-ios.debug.xcconfig"; path = "Target Support Files/Pods-yinmeng-ios/Pods-yinmeng-ios.debug.xcconfig"; sourceTree = ""; }; B2F175918AD0811681497739 /* Pods_yinmeng_ios.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_yinmeng_ios.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -203,6 +219,7 @@ buildActionMask = 2147483647; files = ( 25C63BC8F805551E8754E409 /* Pods_yinmeng_ios.framework in Frameworks */, + 2311D6DF2B9207AA001C70AB /* StoreKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -212,7 +229,10 @@ 2311D6B82B908CDB001C70AB /* Pay */ = { isa = PBXGroup; children = ( + 2311D6D42B91E732001C70AB /* UserPayViewManager.swift */, 2311D6B92B908D01001C70AB /* UserPayViewController.swift */, + 2311D6CE2B91D35E001C70AB /* UserPayViewItemView.swift */, + 2311D6D02B91DDDF001C70AB /* UserPayViewModel.swift */, ); path = Pay; sourceTree = ""; @@ -229,6 +249,7 @@ 7F3805D681FD5B5B4DC3C5F5 /* Frameworks */ = { isa = PBXGroup; children = ( + 2311D6DE2B9207AA001C70AB /* StoreKit.framework */, B2F175918AD0811681497739 /* Pods_yinmeng_ios.framework */, ); name = Frameworks; @@ -451,6 +472,9 @@ E86A43A72B85DF7A0084C04D /* Base */, E884E85E2B6900C500ADE6EE /* AppDelegate.swift */, E884E8642B6900C500ADE6EE /* Main.storyboard */, + 2311D6DC2B9204EF001C70AB /* logoBg.png */, + 2311D6D82B920442001C70AB /* yinLogo.png */, + 2311D6DA2B920478001C70AB /* textLogo.png */, 2311D6BF2B90A221001C70AB /* RecordPlayer.svga */, 2311D6BD2B90A1E9001C70AB /* PublishVoice.svga */, 2311D6A02B8DD649001C70AB /* StarIcon.svga */, @@ -507,6 +531,7 @@ E8D15AB22B8B000400369467 /* PlanetStarVC.swift */, 2311D69C2B8DC311001C70AB /* PlanetStarModel.swift */, 233E515A2B8C849600582F9C /* PlanetStarClickItemView.swift */, + 2311D6D62B91EF62001C70AB /* PlanetStarPopUpView.swift */, ); path = Star; sourceTree = ""; @@ -677,12 +702,15 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 2311D6D92B920442001C70AB /* yinLogo.png in Resources */, E884E86B2B6900C600ADE6EE /* LaunchScreen.storyboard in Resources */, 2311D6BE2B90A1E9001C70AB /* PublishVoice.svga in Resources */, 2311D6A52B8F0E06001C70AB /* StarGift.svga in Resources */, E884E8682B6900C600ADE6EE /* Assets.xcassets in Resources */, 2311D6C02B90A221001C70AB /* RecordPlayer.svga in Resources */, E884E8662B6900C500ADE6EE /* Main.storyboard in Resources */, + 2311D6DD2B9204EF001C70AB /* logoBg.png in Resources */, + 2311D6DB2B920478001C70AB /* textLogo.png in Resources */, 2311D6A12B8DD649001C70AB /* StarIcon.svga in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -744,6 +772,7 @@ E89F19AF2B91C00F0098E797 /* BindMobileVC.swift in Sources */, E86A43B02B85E11B0084C04D /* BaseNavigationViewController.swift in Sources */, E86A43E82B884C5E0084C04D /* String+.swift in Sources */, + 2311D6D12B91DDDF001C70AB /* UserPayViewModel.swift in Sources */, 2311D6B12B9062A3001C70AB /* HomeVoiceFollowCell.swift in Sources */, E8D15AA32B89B03D00369467 /* Deserialized.swift in Sources */, E8E4AAB72B8F95CA0096D77C /* AuthAppleManager.swift in Sources */, @@ -756,6 +785,7 @@ 2311D6AB2B9024A9001C70AB /* HomeVoicePlayMusicItemView.swift in Sources */, E8D15AA62B89B0C600369467 /* List+.swift in Sources */, E81A7BAE2B885B20009E736E /* Base64.m in Sources */, + 2311D6D72B91EF62001C70AB /* PlanetStarPopUpView.swift in Sources */, E8479E462B8DD5BF009AF878 /* Date+.swift in Sources */, E81A7BB22B886299009E736E /* HUDTool.swift in Sources */, E8E4AAB52B8F8E3A0096D77C /* AuthItmeButton.swift in Sources */, @@ -806,8 +836,10 @@ 2311D6A72B8F2CFA001C70AB /* HomeVoiceChooseItemVeiw.swift in Sources */, E8D15AB02B8AFFCE00369467 /* HomeVoiceVC.swift in Sources */, E8E4AB282B902A9C0096D77C /* ChatListCell.swift in Sources */, + 2311D6D52B91E732001C70AB /* UserPayViewManager.swift in Sources */, E86A43D52B8774B70084C04D /* AuthViewModel.swift in Sources */, E89F19472B9197090098E797 /* ChatTimeCell.swift in Sources */, + 2311D6CF2B91D35E001C70AB /* UserPayViewItemView.swift in Sources */, E8D15AB32B8B000400369467 /* PlanetStarVC.swift in Sources */, E8FF28B62B90ED6C005D2BE7 /* ChatNavView.swift in Sources */, E8D15A9D2B899E1500369467 /* YMNetworkHelper.swift in Sources */, @@ -971,13 +1003,14 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = 7684Q29X5F; + DEVELOPMENT_TEAM = 48UCG35Q9W; ENABLE_USER_SCRIPT_SANDBOXING = NO; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = "yinmeng-ios/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "音萌"; INFOPLIST_KEY_NSCameraUsageDescription = "“音萌”需要您的同意,才可以访问进行拍照,才可以在聊天中分享图片给他人查看,或上传图片以更新头像"; INFOPLIST_KEY_NSMicrophoneUsageDescription = "\"音萌\"需要您的同意,才可以进行语音聊天"; + INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "“音萌”需要您的同意,才可以存储相片到相册"; INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "“音萌”需要您的同意,才可以访问相册并选择图片,然后在聊天中分享图片给他人查看,或上传图片以更新头像"; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; @@ -989,7 +1022,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0.0; - PRODUCT_BUNDLE_IDENTIFIER = "yinmeng.yinmeng-ios"; + PRODUCT_BUNDLE_IDENTIFIER = "linyudan.yinmeng-ios"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_OBJC_BRIDGING_HEADER = "yinmeng-ios/Base/Security/yinmeng-ios-Bridging-Header.h"; @@ -1010,13 +1043,14 @@ CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = 7684Q29X5F; + DEVELOPMENT_TEAM = 48UCG35Q9W; ENABLE_USER_SCRIPT_SANDBOXING = NO; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = "yinmeng-ios/Info.plist"; INFOPLIST_KEY_CFBundleDisplayName = "音萌"; INFOPLIST_KEY_NSCameraUsageDescription = "“音萌”需要您的同意,才可以访问进行拍照,才可以在聊天中分享图片给他人查看,或上传图片以更新头像"; INFOPLIST_KEY_NSMicrophoneUsageDescription = "\"音萌\"需要您的同意,才可以进行语音聊天"; + INFOPLIST_KEY_NSPhotoLibraryAddUsageDescription = "“音萌”需要您的同意,才可以存储相片到相册"; INFOPLIST_KEY_NSPhotoLibraryUsageDescription = "“音萌”需要您的同意,才可以访问相册并选择图片,然后在聊天中分享图片给他人查看,或上传图片以更新头像"; INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; INFOPLIST_KEY_UILaunchStoryboardName = LaunchScreen; @@ -1028,7 +1062,7 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0.0; - PRODUCT_BUNDLE_IDENTIFIER = "yinmeng.yinmeng-ios"; + PRODUCT_BUNDLE_IDENTIFIER = "linyudan.yinmeng-ios"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_OBJC_BRIDGING_HEADER = "yinmeng-ios/Base/Security/yinmeng-ios-Bridging-Header.h"; diff --git a/yinmeng-ios/Assets.xcassets/AccentColor.colorset/Contents.json b/yinmeng-ios/Assets.xcassets/AccentColor.colorset/Contents.json deleted file mode 100644 index eb87897..0000000 --- a/yinmeng-ios/Assets.xcassets/AccentColor.colorset/Contents.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "colors" : [ - { - "idiom" : "universal" - } - ], - "info" : { - "author" : "xcode", - "version" : 1 - } -} diff --git a/yinmeng-ios/Assets.xcassets/AppIcon.appiconset/1024 3.png b/yinmeng-ios/Assets.xcassets/AppIcon.appiconset/1024 3.png new file mode 100644 index 0000000..9cbbb63 Binary files /dev/null and b/yinmeng-ios/Assets.xcassets/AppIcon.appiconset/1024 3.png differ diff --git a/yinmeng-ios/Assets.xcassets/AppIcon.appiconset/Contents.json b/yinmeng-ios/Assets.xcassets/AppIcon.appiconset/Contents.json index 13613e3..5e8e88f 100644 --- a/yinmeng-ios/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/yinmeng-ios/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,6 +1,7 @@ { "images" : [ { + "filename" : "1024 3.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" diff --git a/yinmeng-ios/Assets.xcassets/Home/yin_home_voice_guide_arrow.imageset/Contents.json b/yinmeng-ios/Assets.xcassets/Home/yin_home_voice_guide_arrow.imageset/Contents.json new file mode 100644 index 0000000..34f7e0e --- /dev/null +++ b/yinmeng-ios/Assets.xcassets/Home/yin_home_voice_guide_arrow.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "yin_home_voice_guide_arrow@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "yin_home_voice_guide_arrow@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/Assets.xcassets/Home/yin_home_voice_guide_arrow.imageset/yin_home_voice_guide_arrow@2x.png b/yinmeng-ios/Assets.xcassets/Home/yin_home_voice_guide_arrow.imageset/yin_home_voice_guide_arrow@2x.png new file mode 100644 index 0000000..84781d2 Binary files /dev/null and b/yinmeng-ios/Assets.xcassets/Home/yin_home_voice_guide_arrow.imageset/yin_home_voice_guide_arrow@2x.png differ diff --git a/yinmeng-ios/Assets.xcassets/Home/yin_home_voice_guide_arrow.imageset/yin_home_voice_guide_arrow@3x.png b/yinmeng-ios/Assets.xcassets/Home/yin_home_voice_guide_arrow.imageset/yin_home_voice_guide_arrow@3x.png new file mode 100644 index 0000000..6de413e Binary files /dev/null and b/yinmeng-ios/Assets.xcassets/Home/yin_home_voice_guide_arrow.imageset/yin_home_voice_guide_arrow@3x.png differ diff --git a/yinmeng-ios/Assets.xcassets/Home/yin_home_voice_guide_icon.imageset/Contents.json b/yinmeng-ios/Assets.xcassets/Home/yin_home_voice_guide_icon.imageset/Contents.json new file mode 100644 index 0000000..cf1ef66 --- /dev/null +++ b/yinmeng-ios/Assets.xcassets/Home/yin_home_voice_guide_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "yin_home_voice_guide_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "yin_home_voice_guide_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/Assets.xcassets/Home/yin_home_voice_guide_icon.imageset/yin_home_voice_guide_icon@2x.png b/yinmeng-ios/Assets.xcassets/Home/yin_home_voice_guide_icon.imageset/yin_home_voice_guide_icon@2x.png new file mode 100644 index 0000000..695c463 Binary files /dev/null and b/yinmeng-ios/Assets.xcassets/Home/yin_home_voice_guide_icon.imageset/yin_home_voice_guide_icon@2x.png differ diff --git a/yinmeng-ios/Assets.xcassets/Home/yin_home_voice_guide_icon.imageset/yin_home_voice_guide_icon@3x.png b/yinmeng-ios/Assets.xcassets/Home/yin_home_voice_guide_icon.imageset/yin_home_voice_guide_icon@3x.png new file mode 100644 index 0000000..0bdbfa1 Binary files /dev/null and b/yinmeng-ios/Assets.xcassets/Home/yin_home_voice_guide_icon.imageset/yin_home_voice_guide_icon@3x.png differ diff --git a/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_arrow.imageset/Contents.json b/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_arrow.imageset/Contents.json new file mode 100644 index 0000000..e3d4d0c --- /dev/null +++ b/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_arrow.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "yin_user_pay_arrow@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "yin_user_pay_arrow@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_arrow.imageset/yin_user_pay_arrow@2x.png b/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_arrow.imageset/yin_user_pay_arrow@2x.png new file mode 100644 index 0000000..c03cd5c Binary files /dev/null and b/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_arrow.imageset/yin_user_pay_arrow@2x.png differ diff --git a/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_arrow.imageset/yin_user_pay_arrow@3x.png b/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_arrow.imageset/yin_user_pay_arrow@3x.png new file mode 100644 index 0000000..5108aae Binary files /dev/null and b/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_arrow.imageset/yin_user_pay_arrow@3x.png differ diff --git a/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_bg.imageset/Contents.json b/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_bg.imageset/Contents.json new file mode 100644 index 0000000..0d6a311 --- /dev/null +++ b/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "yin_user_pay_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "yin_user_pay_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_bg.imageset/yin_user_pay_bg@2x.png b/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_bg.imageset/yin_user_pay_bg@2x.png new file mode 100644 index 0000000..03dc2bb Binary files /dev/null and b/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_bg.imageset/yin_user_pay_bg@2x.png differ diff --git a/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_bg.imageset/yin_user_pay_bg@3x.png b/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_bg.imageset/yin_user_pay_bg@3x.png new file mode 100644 index 0000000..d73e1ee Binary files /dev/null and b/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_bg.imageset/yin_user_pay_bg@3x.png differ diff --git a/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_head_bg.imageset/Contents.json b/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_head_bg.imageset/Contents.json new file mode 100644 index 0000000..7ec8c5b --- /dev/null +++ b/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_head_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "yin_user_pay_head_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "yin_user_pay_head_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_head_bg.imageset/yin_user_pay_head_bg@2x.png b/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_head_bg.imageset/yin_user_pay_head_bg@2x.png new file mode 100644 index 0000000..3a61d90 Binary files /dev/null and b/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_head_bg.imageset/yin_user_pay_head_bg@2x.png differ diff --git a/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_head_bg.imageset/yin_user_pay_head_bg@3x.png b/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_head_bg.imageset/yin_user_pay_head_bg@3x.png new file mode 100644 index 0000000..27530d4 Binary files /dev/null and b/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_head_bg.imageset/yin_user_pay_head_bg@3x.png differ diff --git a/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_icon.imageset/Contents.json b/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_icon.imageset/Contents.json new file mode 100644 index 0000000..2ce7a7d --- /dev/null +++ b/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "yin_user_pay_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "yin_user_pay_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_icon.imageset/yin_user_pay_icon@2x.png b/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_icon.imageset/yin_user_pay_icon@2x.png new file mode 100644 index 0000000..549b204 Binary files /dev/null and b/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_icon.imageset/yin_user_pay_icon@2x.png differ diff --git a/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_icon.imageset/yin_user_pay_icon@3x.png b/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_icon.imageset/yin_user_pay_icon@3x.png new file mode 100644 index 0000000..282bd5d Binary files /dev/null and b/yinmeng-ios/Assets.xcassets/Home/yin_user_pay_icon.imageset/yin_user_pay_icon@3x.png differ diff --git a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_chat.imageset/tabbar_icon_chat@2x.png b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_chat.imageset/tabbar_icon_chat@2x.png index a637d85..97edd5f 100644 Binary files a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_chat.imageset/tabbar_icon_chat@2x.png and b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_chat.imageset/tabbar_icon_chat@2x.png differ diff --git a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_chat.imageset/tabbar_icon_chat@3x.png b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_chat.imageset/tabbar_icon_chat@3x.png index 222692e..11a52ac 100644 Binary files a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_chat.imageset/tabbar_icon_chat@3x.png and b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_chat.imageset/tabbar_icon_chat@3x.png differ diff --git a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_chat_sel.imageset/tabbar_icon_chat_sel@2x.png b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_chat_sel.imageset/tabbar_icon_chat_sel@2x.png index 75559e6..504521a 100644 Binary files a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_chat_sel.imageset/tabbar_icon_chat_sel@2x.png and b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_chat_sel.imageset/tabbar_icon_chat_sel@2x.png differ diff --git a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_chat_sel.imageset/tabbar_icon_chat_sel@3x.png b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_chat_sel.imageset/tabbar_icon_chat_sel@3x.png index 03e9194..27d42e7 100644 Binary files a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_chat_sel.imageset/tabbar_icon_chat_sel@3x.png and b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_chat_sel.imageset/tabbar_icon_chat_sel@3x.png differ diff --git a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_planet.imageset/tabbar_icon_planet@2x.png b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_planet.imageset/tabbar_icon_planet@2x.png index fe4694b..27f9443 100644 Binary files a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_planet.imageset/tabbar_icon_planet@2x.png and b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_planet.imageset/tabbar_icon_planet@2x.png differ diff --git a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_planet.imageset/tabbar_icon_planet@3x.png b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_planet.imageset/tabbar_icon_planet@3x.png index 4fc2b9c..8494fe2 100644 Binary files a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_planet.imageset/tabbar_icon_planet@3x.png and b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_planet.imageset/tabbar_icon_planet@3x.png differ diff --git a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_planet_sel.imageset/tabbar_icon_planet_sel@2x.png b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_planet_sel.imageset/tabbar_icon_planet_sel@2x.png index e1b187e..cfa4c53 100644 Binary files a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_planet_sel.imageset/tabbar_icon_planet_sel@2x.png and b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_planet_sel.imageset/tabbar_icon_planet_sel@2x.png differ diff --git a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_planet_sel.imageset/tabbar_icon_planet_sel@3x.png b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_planet_sel.imageset/tabbar_icon_planet_sel@3x.png index 88b0c05..0eb5fb5 100644 Binary files a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_planet_sel.imageset/tabbar_icon_planet_sel@3x.png and b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_planet_sel.imageset/tabbar_icon_planet_sel@3x.png differ diff --git a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_song.imageset/tabbar_icon_song@2x.png b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_song.imageset/tabbar_icon_song@2x.png index 7b2b89d..dbddca2 100644 Binary files a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_song.imageset/tabbar_icon_song@2x.png and b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_song.imageset/tabbar_icon_song@2x.png differ diff --git a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_song.imageset/tabbar_icon_song@3x.png b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_song.imageset/tabbar_icon_song@3x.png index 39f6385..264ce6c 100644 Binary files a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_song.imageset/tabbar_icon_song@3x.png and b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_song.imageset/tabbar_icon_song@3x.png differ diff --git a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_song_sel.imageset/tabbar_icon_song_sel@2x.png b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_song_sel.imageset/tabbar_icon_song_sel@2x.png index 03a380f..e2229ab 100644 Binary files a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_song_sel.imageset/tabbar_icon_song_sel@2x.png and b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_song_sel.imageset/tabbar_icon_song_sel@2x.png differ diff --git a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_song_sel.imageset/tabbar_icon_song_sel@3x.png b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_song_sel.imageset/tabbar_icon_song_sel@3x.png index 27cab33..d029e0f 100644 Binary files a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_song_sel.imageset/tabbar_icon_song_sel@3x.png and b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_song_sel.imageset/tabbar_icon_song_sel@3x.png differ diff --git a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_user.imageset/tabbar_icon_user@2x.png b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_user.imageset/tabbar_icon_user@2x.png index 691cbfb..b53e055 100644 Binary files a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_user.imageset/tabbar_icon_user@2x.png and b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_user.imageset/tabbar_icon_user@2x.png differ diff --git a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_user.imageset/tabbar_icon_user@3x.png b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_user.imageset/tabbar_icon_user@3x.png index 68b3c57..c8f042b 100644 Binary files a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_user.imageset/tabbar_icon_user@3x.png and b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_user.imageset/tabbar_icon_user@3x.png differ diff --git a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_user_sel.imageset/tabbar_icon_user_sel@2x.png b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_user_sel.imageset/tabbar_icon_user_sel@2x.png index f8cc5c7..362eede 100644 Binary files a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_user_sel.imageset/tabbar_icon_user_sel@2x.png and b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_user_sel.imageset/tabbar_icon_user_sel@2x.png differ diff --git a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_user_sel.imageset/tabbar_icon_user_sel@3x.png b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_user_sel.imageset/tabbar_icon_user_sel@3x.png index 79f2f06..e66b0b1 100644 Binary files a/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_user_sel.imageset/tabbar_icon_user_sel@3x.png and b/yinmeng-ios/Assets.xcassets/tab/tabbar_icon_user_sel.imageset/tabbar_icon_user_sel@3x.png differ diff --git a/yinmeng-ios/Base.lproj/LaunchScreen.storyboard b/yinmeng-ios/Base.lproj/LaunchScreen.storyboard index 865e932..d035f72 100644 --- a/yinmeng-ios/Base.lproj/LaunchScreen.storyboard +++ b/yinmeng-ios/Base.lproj/LaunchScreen.storyboard @@ -1,8 +1,11 @@ - - + + + - + + + @@ -11,15 +14,60 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + diff --git a/yinmeng-ios/Base/Utils/H5Utils.swift b/yinmeng-ios/Base/Utils/H5Utils.swift index 13324b4..0271715 100644 --- a/yinmeng-ios/Base/Utils/H5Utils.swift +++ b/yinmeng-ios/Base/Utils/H5Utils.swift @@ -11,4 +11,5 @@ enum H5Utils:String { case privacy = "modules/rule/privacy-wap.html" case user = "modules/rule/protocol.html" case logoff = "modules/logout/index.html" + case pay = "mew/modules/rule/rechargeAgreement.html" } diff --git a/yinmeng-ios/Info.plist b/yinmeng-ios/Info.plist index 5d433d1..f3ae914 100644 --- a/yinmeng-ios/Info.plist +++ b/yinmeng-ios/Info.plist @@ -2,14 +2,6 @@ - NSPhotoLibraryUsageDescription - “音萌”需要您的同意,才可以访问相册并选择图片,然后在聊天中分享图片给他人查看,或上传图片以更新头像 - NSPhotoLibraryAddUsageDescription - “音萌”需要您的同意,才可以存储相片到相册 - NSMicrophoneUsageDescription - "音萌"需要您的同意,才可以进行语音聊天 - NSCameraUsageDescription - “音萌”需要您的同意,才可以访问进行拍照,才可以在聊天中分享图片给他人查看,或上传图片以更新头像 NSAppTransportSecurity NSAllowsArbitraryLoads diff --git a/yinmeng-ios/Modules/Home/HomeVoiceGuideView.swift b/yinmeng-ios/Modules/Home/HomeVoiceGuideView.swift index 7fab370..95b64d1 100644 --- a/yinmeng-ios/Modules/Home/HomeVoiceGuideView.swift +++ b/yinmeng-ios/Modules/Home/HomeVoiceGuideView.swift @@ -8,16 +8,80 @@ import UIKit class HomeVoiceGuideView: UIView { - + override init(frame: CGRect) { super.init(frame: frame) setUILayout() } func setUILayout(){ - + backgroundColor = UIColor.init(white: 0, alpha: 0.5) + addSubview(imageView) + addSubview(arrowVeiw) + addSubview(bgTextVeiw) + bgTextVeiw.addSubview(textView) + addSubview(clickBtn) + imageView.snp.makeConstraints { make in + make.width.equalTo(124) + make.height.equalTo(106) + make.left.equalTo(64) + make.top.equalTo(480) + } + arrowVeiw.snp.makeConstraints { make in + make.width.equalTo(26) + make.height.equalTo(66) + make.left.equalTo(153) + make.top.equalTo(self.imageView.snp.bottom).offset(15) + + } + bgTextVeiw.snp.makeConstraints { make in + make.centerY.equalTo(self.arrowVeiw) + make.left.equalTo(self.arrowVeiw.snp.right) + make.width.equalTo(148) + make.height.equalTo(66) + } + textView.snp.makeConstraints { make in + make.top.equalTo(2) + make.left.right.bottom.equalTo(self.bgTextVeiw) + } + clickBtn.snp.makeConstraints { make in + make.edges.equalTo(self) + } } required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } + @objc func clickBtnAction(){ + self.removeFromSuperview() + } + var clickBtn:UIButton = { + let _clickBtn = UIButton() + _clickBtn.addTarget(self, action: #selector(clickBtnAction), for: .touchUpInside) + return _clickBtn + }() + var imageView:UIImageView = { + let _imageView = UIImageView() + _imageView.image = UIImage(named: "yin_home_voice_guide_icon") + return _imageView + }() + var arrowVeiw:UIImageView = { + let _arrowVeiw = UIImageView() + + _arrowVeiw.image = UIImage(named: "yin_home_voice_guide_arrow") + return _arrowVeiw + }() + var bgTextVeiw:UIImageView = { + let _bgTextVeiw = UIImageView() + let image = UIImage.image(color: ThemeColor(hexStr: "#6A60FF"), size: CGSize(width: 148, height: 66), corners: [.topRight,.bottomRight], radius: 10) + _bgTextVeiw.image = image + return _bgTextVeiw + }() + var textView:UILabel = { + let _textView = UILabel() + _textView.numberOfLines = 2 + _textView.textColor = .white + _textView.text = "选择感兴趣的声音\n拖动至唱片机播放" + _textView.font = UIFont.systemFont(ofSize: 14, weight: .medium) + return _textView + }() } diff --git a/yinmeng-ios/Modules/Home/HomeVoiceVC.swift b/yinmeng-ios/Modules/Home/HomeVoiceVC.swift index 1c91df3..4d16733 100644 --- a/yinmeng-ios/Modules/Home/HomeVoiceVC.swift +++ b/yinmeng-ios/Modules/Home/HomeVoiceVC.swift @@ -17,6 +17,10 @@ class HomeVoiceVC: BaseViewController,HiddenNavigationBarProtocol { requestData() requsetFansListData() userInfoBtn.addTarget(self, action: #selector(userInfoBtnAction), for: .touchUpInside) + if (UserDefaults.standard.value(forKey:"kIsShowGuide") != nil){return} + UserDefaults.standard.setValue("yes", forKey: "kIsShowGuide") + let guideVeiw = HomeVoiceGuideView.init(frame: CGRect(x: 0, y: 0, width: ScreenWidth, height: ScreenHeight)) + UIApplication.shared.keyWindow?.addSubview(guideVeiw) } @objc func userInfoBtnAction(){ let userInfoView:HomeVoiceUserInfoView = HomeVoiceUserInfoView.init(frame: .zero) diff --git a/yinmeng-ios/Modules/Pay/UserPayViewController.swift b/yinmeng-ios/Modules/Pay/UserPayViewController.swift index 2c13e29..97d4f74 100644 --- a/yinmeng-ios/Modules/Pay/UserPayViewController.swift +++ b/yinmeng-ios/Modules/Pay/UserPayViewController.swift @@ -6,16 +6,333 @@ // import UIKit +import MBProgressHUD class UserPayViewController: BaseViewController, HiddenNavigationBarProtocol{ - + var chooseModel:UserPayViewModel? + var orderId = "" override func viewDidLoad() { super.viewDidLoad() - - // Do any additional setup after loading the view. + + setUILayout() + requestData() + NotificationCenter.default.addObserver(self, selector: #selector(receiveInitiatePaymentNot(not:)), name: NSNotification.Name(rawValue: "kInitiatePayment"), object: nil) } - + @objc func receiveInitiatePaymentNot(not:Notification) async{ + if let _data = not.userInfo,let transactionId = _data["transactionId"] as? String{ + if #available(iOS 15.0, *) { + try? await UserPayViewManager.shared._verifyBusinessAccomplish(transaction: transactionId) + } + self.orderId = "" + RequestGet(path: "purse/query", parma: ["channelType":"8"]) { data in + + if let model = Deserialized.toModel(with: data) { + self.pricView.text = model.diamonds + } + + } fail: { code, data in + print(code) + } + return + } + + if let _data = not.userInfo,let recordId = _data["recordId"] as? String,let appAccountToken = _data["appAccountToken"] as? String{ + try? await self.initiatePaymentAction(recordId: recordId, appAccountToken: appAccountToken) + } + } + func requestData(){ + RequestGet(path: "chargeprod/list", parma: ["channelType":"8"]) { data in + + if let list = Deserialized.toArray(with: data) { + for (i,view) in self.viewList.enumerated() { + if i < list.count{ + + view.model = list[i] + self.chooseModel = list[0] + view.isHidden = false + }else{ + view.isHidden = true + } + + } + } + + } fail: { code, data in + print(code) + } + RequestGet(path: "purse/query", parma: ["channelType":"8"]) { data in + + if let model = Deserialized.toModel(with: data) { + self.pricView.text = model.diamonds + } + + } fail: { code, data in + print(code) + } + + } + @objc func clickPriceItemAction(tap:UITapGestureRecognizer){ + for view in viewList { + if tap.view == view{ + view.layer.borderWidth = 2 + self.chooseModel = view.model + }else{ + view.layer.borderWidth = 0 + } + + } + } + @objc func lookUpTap(){ + let web = WebViewController(url: "/\(H5Utils.pay.rawValue)") + self.navigationController?.pushViewController(web, animated: true) + } + func setUILayout(){ + view.addSubview(backgroundView) + view.addSubview(scrollView) + + view.addSubview(backBtn) + scrollView.addSubview(headBgView) + headBgView.addSubview(iconView) + headBgView.addSubview(textVeiw) + headBgView.addSubview(pricView) + scrollView.addSubview(itemVeiw1) + scrollView.addSubview(itemVeiw2) + scrollView.addSubview(itemVeiw3) + scrollView.addSubview(itemVeiw4) + scrollView.addSubview(payAgreement) + scrollView.addSubview(publishBtn) + viewList.append(itemVeiw1) + viewList.append(itemVeiw2) + viewList.append(itemVeiw3) + viewList.append(itemVeiw4) + + for (i,view) in viewList.enumerated() { + view.tag = i + 100 + let tap = UITapGestureRecognizer.init(target: self, action: #selector(clickPriceItemAction(tap:))) + view.addGestureRecognizer(tap) + } + + let lookUpTap = UITapGestureRecognizer.init(target: self, action: #selector(lookUpTap)) + payAgreement.addGestureRecognizer(lookUpTap) + scrollView.snp.makeConstraints { make in + make.edges.equalTo(self.view) + } + backgroundView.snp.makeConstraints { make in + make.edges.equalTo(self.view) + } + backBtn.snp.makeConstraints { make in + make.width.height.equalTo(30) + make.left.equalTo(16) + make.top.equalTo(StatusBarHeight + 12) + } + headBgView.snp.makeConstraints { make in + make.top.equalTo(self.backBtn.snp.bottom).offset(41) + make.width.equalTo(337) + make.centerX.equalTo(self.view) + make.height.equalTo(124) + } + iconView.snp.makeConstraints { make in + make.centerX.equalTo(self.headBgView).offset(-11) + make.width.height.equalTo(22) + make.top.equalTo(27) + } + textVeiw.snp.makeConstraints { make in + make.left.equalTo(self.iconView.snp.right).offset(6) + make.centerY.equalTo(self.iconView) + } + pricView.snp.makeConstraints { make in + make.top.equalTo(51) + make.centerX.equalTo(self.view) + } + itemVeiw1.snp.makeConstraints { make in + make.left.equalTo(self.headBgView.snp.left).offset(13) + make.width.equalTo(144) + make.height.equalTo(83) + make.top.equalTo(self.headBgView.snp.bottom).offset(19) + } + itemVeiw2.snp.makeConstraints { make in + make.left.equalTo(self.itemVeiw1.snp.right).offset(23) + make.width.equalTo(144) + make.height.equalTo(83) + make.top.equalTo(self.headBgView.snp.bottom).offset(19) + } + itemVeiw3.snp.makeConstraints { make in + make.left.equalTo(self.headBgView.snp.left).offset(13) + make.width.equalTo(144) + make.height.equalTo(83) + make.top.equalTo(self.itemVeiw1.snp.bottom).offset(20) + } + itemVeiw4.snp.makeConstraints { make in + make.left.equalTo(self.itemVeiw2) + make.width.equalTo(144) + make.height.equalTo(83) + make.top.equalTo(self.itemVeiw1.snp.bottom).offset(20) + } + payAgreement.snp.makeConstraints { make in + make.left.right.equalTo(self.view) + make.top.equalTo(self.itemVeiw4.snp.bottom).offset(40) + } + publishBtn.snp.makeConstraints { make in + make.width.equalTo(296) + make.height.equalTo(48) + make.centerX.equalTo(self.view) + make.top.equalTo(self.payAgreement.snp.bottom).offset(161) + } + publishBtn.superview?.layoutIfNeeded() + let y = publishBtn.y + publishBtn.frame.height + self.scrollView.contentSize = CGSize(width: ScreenWidth, height: y) + } + @objc func publishBtnAction(){ + guard let chargeProdId = self.chooseModel?.chargeProdId else{ + return + } + MBProgressHUD.showAdded(to: self.view, animated: true) + let uid = "\(AuthManager.userUid)" + let ticket = AuthManager.ticket + let deviceInfo = UIDevice.current.identifierForVendor?.uuidString ?? "" + let clientIp = "0.0.0.0" + RequestPost(path: "storeKitV2/placeOrder", parma: ["chargeProdId":chargeProdId,"uid":uid,"ticket":ticket,"deviceInfo":deviceInfo]) { data in + + if let _data = data as? [String : Any]{ - + NotificationCenter.default.post(name: NSNotification.Name(rawValue: "kInitiatePayment"), object: nil, userInfo: _data) + } + + } fail: { code, data in + MBProgressHUD.hide(for: self.view, animated: true) + } + + } + deinit{ + NotificationCenter.default.removeObserver(self) + } + func initiatePaymentAction(recordId:String,appAccountToken:String)async throws{ + self.orderId = recordId + if #available(iOS 15.0, *) { + try await UserPayViewManager.shared._demandCommodityThing(productId: recordId, uuid: appAccountToken) + UserPayViewManager.shared._ConditionBlock = {[weak self] (state , result) in + if state == .Pay || state == .Start || state == .VerifiedServer{ + + }else if state == .Unowned{ + HUDTool.show(with: "出现未知错误,请重新尝试") + }else{ + HUDTool.show(with: "购买失败") + } + if state == .VerifiedServer{ + if let transactionId = result?["transactionId"] as? String{ + self?.paySuccess(transactionId: transactionId) + } + } + } + } else { + HUDTool.show(with: "充值失败。当前仅支持运行iOS15及以上系统的手机进行充值,请升级系统版本后重试。") + } + } + func paySuccess(transactionId:String){ + let uid = "\(AuthManager.userUid)" + let ticket = AuthManager.ticket + + + RequestPost(path: "storeKitV2/verifyOrder", parma: ["chooseEnv":"true","uid":uid,"ticket":ticket,"transcationId":transactionId]) { data in + MBProgressHUD.hide(for: self.view, animated: true) + + NotificationCenter.default.post(name: NSNotification.Name(rawValue: "kInitiatePayment"), object: nil, userInfo: ["transactionId":transactionId]) + } fail: { code, data in + if code == 1444{ + NotificationCenter.default.post(name: NSNotification.Name(rawValue: "kInitiatePayment"), object: nil, userInfo: ["transactionId":transactionId]) + } + MBProgressHUD.hide(for: self.view, animated: true) + } + } + @objc func backBtnAction(){ + self.navigationController?.popViewController(animated: true) + } + var scrollView:UIScrollView = { + let _scrollView = UIScrollView() + _scrollView.backgroundColor = .clear + return _scrollView + }() + var backBtn:UIButton = { + let _backBtn = UIButton() + _backBtn.setImage(UIImage(named: "yin_user_pay_arrow"), for: .normal) + _backBtn.addTarget(self, action: #selector(backBtnAction), for: .touchUpInside) + return _backBtn + }() + private lazy var backgroundView:UIImageView = { + let _backgroundView = UIImageView() + _backgroundView.image = UIImage(named: "yin_user_pay_bg") + _backgroundView.isUserInteractionEnabled = true + return _backgroundView + }() + + var headBgView:UIImageView = { + let _headBgView = UIImageView() + _headBgView.image = UIImage(named: "yin_user_pay_head_bg") + return _headBgView + }() + var iconView:UIImageView = { + let _iconView = UIImageView() + _iconView.image = UIImage(named: "yin_user_pay_icon") + + return _iconView + }() + var textVeiw:UILabel = { + let _textVeiw = UILabel() + _textVeiw.text = "余额" + _textVeiw.font = UIFont.systemFont(ofSize: 18, weight: .regular) + _textVeiw.textColor = .white + return _textVeiw + }() + var pricView: UILabel = { + let _pricView = UILabel() + _pricView.text = "0" + _pricView.textColor = .white + _pricView.font = UIFont.systemFont(ofSize: 34, weight: .semibold) + return _pricView + }() + var viewList:[UserPayViewItemView] = [] + var itemVeiw1:UserPayViewItemView = { + let _itemVeiw1 = UserPayViewItemView.init(frame:.zero) + _itemVeiw1.layer.borderWidth = 2 + return _itemVeiw1 + }() + var itemVeiw2:UserPayViewItemView = { + let _itemVeiw2 = UserPayViewItemView.init(frame:.zero) + + return _itemVeiw2 + }() + var itemVeiw3:UserPayViewItemView = { + let _itemVeiw3 = UserPayViewItemView.init(frame:.zero) + + return _itemVeiw3 + }() + var itemVeiw4:UserPayViewItemView = { + let _itemVeiw4 = UserPayViewItemView.init(frame:.zero) + + return _itemVeiw4 + }() + var payAgreement:UILabel = { + let _payAgreement = UILabel() + let text = "已阅读并同意《用户充值协议》\n如有任何问题请咨询客服" + let attText = NSMutableAttributedString.init(string: text, attributes: [.foregroundColor:ThemeColor(hexStr: "#FFFFFF",alpha: 0.8),.font:UIFont.systemFont(ofSize: 13, weight: .regular)]) + attText.addAttributes([.foregroundColor:ThemeColor(hexStr: "#5DA4F5"),.font:UIFont.systemFont(ofSize: 13, weight: .regular)], range: NSRange(location: 6, length: 8)) + _payAgreement.textAlignment = .center + _payAgreement.attributedText = attText + _payAgreement.numberOfLines = 2 + _payAgreement.isUserInteractionEnabled = true + return _payAgreement + }() + + + var publishBtn:UIButton = { + let _publishBtn = UIButton() + + _publishBtn.setBackgroundImage(UIImage(named: "yin_hoem_voice_record_publish_btn"), for: .normal) + _publishBtn.setTitle("立即充值", for: .normal) + _publishBtn.setTitleColor(.white, for: .normal) + _publishBtn.titleLabel?.font = UIFont.systemFont(ofSize: 16, weight: .semibold) + _publishBtn.addTarget(self, action: #selector(publishBtnAction), for: .touchUpInside) + return _publishBtn + }() } diff --git a/yinmeng-ios/Modules/Pay/UserPayViewItemView.swift b/yinmeng-ios/Modules/Pay/UserPayViewItemView.swift new file mode 100644 index 0000000..e599438 --- /dev/null +++ b/yinmeng-ios/Modules/Pay/UserPayViewItemView.swift @@ -0,0 +1,77 @@ +// +// UserPayViewItemView.swift +// yinmeng-ios +// +// Created by duoban on 2024/3/1. +// + +import UIKit + +class UserPayViewItemView: UIView { + + override init(frame: CGRect) { + super.init(frame: frame) + setUILayout() + + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + var model:UserPayViewModel? = nil { + didSet{ + guard let _model = model else{return} + + numVeiw.text = _model.prodName + + + priceView.text = "\(_model.money)元" + + } + } + func setUILayout(){ + self.layer.cornerRadius = 8 + self.backgroundColor = ThemeColor(hexStr: "#525566", alpha: 0.8) + self.layer.masksToBounds = true + self.layer.borderColor = ThemeColor(hexStr: "9552FF").cgColor + addSubview(iconView) + addSubview(numVeiw) + addSubview(priceView) + iconView.snp.makeConstraints { make in + make.width.height.equalTo(20) + make.left.equalTo(24) + make.top.equalTo(16) + } + numVeiw.snp.makeConstraints { make in + make.left.equalTo(50) + make.top.equalTo(14) + } + priceView.snp.makeConstraints { make in + make.top.equalTo(49) + make.left.right.equalTo(self) + + } + } + + var iconView:UIImageView = { + let _iconView = UIImageView() + _iconView.image = UIImage(named: "yin_user_pay_icon") + + return _iconView + }() + var numVeiw:UILabel = { + let _numVeiw = UILabel() + _numVeiw.text = "0钻石" + _numVeiw.textColor = .white + _numVeiw.font = UIFont.systemFont(ofSize: 18, weight: .medium) + return _numVeiw + }() + var priceView:UILabel = { + let _priceView = UILabel() + _priceView.textColor = ThemeColor(hexStr: "#FFFFFF") + _priceView.text = "0元" + _priceView.font = UIFont.systemFont(ofSize: 14, weight: .regular) + _priceView.textAlignment = .center + return _priceView + }() +} diff --git a/yinmeng-ios/Modules/Pay/UserPayViewManager.swift b/yinmeng-ios/Modules/Pay/UserPayViewManager.swift new file mode 100644 index 0000000..fd5054d --- /dev/null +++ b/yinmeng-ios/Modules/Pay/UserPayViewManager.swift @@ -0,0 +1,247 @@ +// +// UserPayViewManager.swift +// yinmeng-ios +// +// Created by duoban on 2024/3/1. +// + +import UIKit +import StoreKit + +@available(iOS 15.0, *) +typealias Transaction = StoreKit.Transaction +@available(iOS 15.0, *) +typealias RenewalInfo = StoreKit.Product.SubscriptionInfo.RenewalInfo +@available(iOS 15.0, *) +typealias RenewalState = StoreKit.Product.SubscriptionInfo.RenewalState + + + +enum StoreError: Error { + + + // 错误回调枚举 + case FailedVerification + case NoProduct + +} + +@objc public enum StoreConditionResult: Int64 { // 支付状态 + case Start // 开始 + case Pay // 进行苹果支付 + case VerifiedServer // 服务器校验 + case UserCancelled // 用户取消 + case Pending // 等待(家庭用户才有的状态) + case Unowned + case NoProduct //没有商品 + case FailedVerification //验证失败 +} + + + +@available(iOS 15.0, *) +public class UserPayViewManager: NSObject { + public typealias _KConditionBlock = (_ state :StoreConditionResult,_ param:Dictionary?) ->() + @objc public var _ConditionBlock: _KConditionBlock! // 状态回调 + + var _updateListenerTask: Task? = nil // 支付事件监听 + + var _transactionMap :[String:Transaction] // 用于完成Id的缓存map + + var _name: String = "" // 单例的写法 + + @objc public static let shared = { + let instance = UserPayViewManager() + return instance + }() + + private override init() { // 单例需要保证private的私有性质 + + _transactionMap = [:] // 初始化 + super.init() + Task { + _updateListenerTask = _listenForTransactions() + } + + + } + + + + + + // 购买某个产品 + @objc public func _demandCommodityThing(productId:String, uuid: String) async throws { + if(_ConditionBlock != nil ){ + _ConditionBlock(StoreConditionResult.Start,nil) + } + do { + let list:[String] = [productId] + let storeProducts = try await Product.products(for: Set.init(list)) + + + + + if storeProducts.count > 0 { + try await _purchase(storeProducts[0],uuid) + }else { + print("iap: no found product") + if(_ConditionBlock != nil ){ + _ConditionBlock(StoreConditionResult.NoProduct,nil) + } + throw StoreError.NoProduct // 没有该产品 + } + } catch { + print("Failed product request from the App Store server: \(error)") + if(_ConditionBlock != nil ){ + _ConditionBlock(StoreConditionResult.NoProduct,nil) + } + throw StoreError.NoProduct // 没有该产品 + } + } + + // 购买 + private func _purchase(_ product: Product, _ uuid: String) async throws -> Transaction? { + if(_ConditionBlock != nil ){ + _ConditionBlock(StoreConditionResult.Pay,nil) + } + + guard let curUUID = UUID.init(uuidString: uuid) else{ + + if(_ConditionBlock != nil ){ + _ConditionBlock(StoreConditionResult.FailedVerification,nil) + } + return nil + } + let getUUID = Product.PurchaseOption.appAccountToken(curUUID) + let result = try await product.purchase(options: [getUUID]) + + switch result { + case .success(let verification): // 用户购买完成 + let transaction = try await _verifiedAndAccomplish(verification) + return transaction + case .userCancelled: // 用户取消 + if(_ConditionBlock != nil ){ + _ConditionBlock(StoreConditionResult.UserCancelled,nil) + } + return nil + case .pending: // 此次购买被挂起 + if(_ConditionBlock != nil ){ + _ConditionBlock(StoreConditionResult.Pending,nil) + } + return nil + default: + if(_ConditionBlock != nil ){ + _ConditionBlock(StoreConditionResult.Unowned,nil) + } + return nil + } + } + + // 校验 + func _checkVerified(_ result: VerificationResult) throws -> T { + //Check whether the JWS passes StoreKit verification. + switch result { + case .unverified: + //StoreKit parses the JWS, but it fails verification. + if(_ConditionBlock != nil ){ + _ConditionBlock(StoreConditionResult.FailedVerification,nil) + } + throw StoreError.FailedVerification + case .verified(let safe): + //The result is verified. Return the unwrapped value. + print("iap: verified success") + return safe + } + } + + // 校验&完成后传给服务器 + func _verifiedAndAccomplish(_ verification:VerificationResult) async throws -> Transaction?{ + //Check whether the transaction is verified. If it isn't, + //this function rethrows the verification error. + let transaction = try _checkVerified(verification) + // 这里将订单提交给服务器进行验证 ~~~ + let transactionId = try verification.payloadValue.id + + // 添加进入待完成map + let key = String(transactionId) + _transactionMap[key] = transaction + await _uploadServer(for: transactionId) + + // 这里不触发完成,等服务器验证再触发完成逻辑 + await transaction.finish() + + print("iap: finish") + return transaction + } + /*All transactions:全部的购买交易订单 + Latest transactions:最新的购买交易订单。(分为订阅品项和除订阅品项外的所有类型二种) + Current entitlements:当前用户有购买的权限。(全部的订阅品项、和非消耗品项) + */ + func _getAllBusiness(transactionId:String) async { + + let transactionIntId = UInt64(transactionId) + for await result in Transaction.all { + do { + let tran = try _checkVerified(result) + let resultId = try result.payloadValue.id + if transactionIntId == resultId { + await tran.finish() + break + } + } catch let error { + + print("error:----\(error)") + } + + } + + + //Transaction.latest(for: "pid") + + } + // 事件完成处理 + + @objc public func _verifyBusinessAccomplish(transaction:String) async{ + if(_transactionMap[transaction] != nil){ + await _transactionMap[transaction]!.finish() + _transactionMap.removeValue(forKey: transaction) + print("verifyBusinessFinish end") + }else { + await _getAllBusiness(transactionId: transaction) + } + } + + @MainActor + func _uploadServer(for transactionId:UInt64) async { + let dic :Dictionary = ["transactionId":transactionId] + if(_ConditionBlock != nil ){ + _ConditionBlock(StoreConditionResult.VerifiedServer,dic) + } + } + + // 支付监听事件 + func _listenForTransactions() -> Task { + return Task.detached { + //Iterate through any transactions that don't come from a direct call to `purchase()`. + // 修改update 为 unfinished? + for await result in Transaction.updates { //会导致二次校验? + do { + print("iap: updates") + print("result:\(result)") + try await self._verifiedAndAccomplish(result) + } catch { + //StoreKit has a transaction that fails verification. Don't deliver content to the user. + print("Transaction failed verification") + } + } + } + } + + // 销毁调用 + deinit { + _updateListenerTask?.cancel() + } + + +} diff --git a/yinmeng-ios/Modules/Pay/UserPayViewModel.swift b/yinmeng-ios/Modules/Pay/UserPayViewModel.swift new file mode 100644 index 0000000..9391047 --- /dev/null +++ b/yinmeng-ios/Modules/Pay/UserPayViewModel.swift @@ -0,0 +1,19 @@ +// +// UserPayViewModel.swift +// yinmeng-ios +// +// Created by duoban on 2024/3/1. +// + +import Foundation +import HandyJSON + +struct UserPayViewModel: HandyJSON, Codable { + var chargeProdId = "" + var prodName = "" + var prodDesc = "" + var money = 0 + var giftGoldNum = 0 + var channel = "" + var diamonds = "" +} diff --git a/yinmeng-ios/Modules/Star/PlanetStarPopUpView.swift b/yinmeng-ios/Modules/Star/PlanetStarPopUpView.swift new file mode 100644 index 0000000..6eccbe9 --- /dev/null +++ b/yinmeng-ios/Modules/Star/PlanetStarPopUpView.swift @@ -0,0 +1,160 @@ +// +// PlanetStarPopUpView.swift +// yinmeng-ios +// +// Created by duoban on 2024/3/1. +// + +import UIKit + +typealias ClickSendBlcok = ()->Void + +class PlanetStarPopUpView: UIView { + var clickSendBlcok:ClickSendBlcok? + override init(frame: CGRect) { + super.init(frame: frame) + setUILayout() + + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + func setUILayout(){ + backgroundColor = UIColor.init(white: 0, alpha: 0.6) + addSubview(bgWhiteView) + bgWhiteView.addSubview(textView) + bgWhiteView.addSubview(cancelView) + bgWhiteView.addSubview(senderView) + bgWhiteView.addSubview(pointTextView) + bgWhiteView.addSubview(bgPointView) + bgPointView.addSubview(pointView) + bgWhiteView.addSubview(pointBtn) + bgWhiteView.snp.makeConstraints { make in + make.center.equalTo(self) + make.width.equalTo(319) + make.height.equalTo(200) + } + textView.snp.makeConstraints { make in + make.top.equalTo(35) + make.left.right.equalTo(self.bgWhiteView).inset(50) + } + cancelView.snp.makeConstraints { make in + make.width.equalTo(124) + make.height.equalTo(42) + make.top.equalTo(100) + make.left.equalTo(28) + } + senderView.snp.makeConstraints { make in + make.width.equalTo(124) + make.height.equalTo(42) + make.top.equalTo(100) + make.left.equalTo(self.cancelView.snp.right).offset(15) + } + + pointTextView.snp.makeConstraints { make in + make.centerY.equalTo(self.bgPointView) + make.centerX.equalTo(self.bgWhiteView).offset(10) + } + bgPointView.snp.makeConstraints { make in + make.width.height.equalTo(12) + make.right.equalTo(self.pointTextView.snp.left).offset(-8) + make.top.equalTo(self.cancelView.snp.bottom).offset(27) + } + pointView.snp.makeConstraints { make in + make.width.height.equalTo(8) + make.center.equalTo(self.bgPointView) + } + pointBtn.snp.makeConstraints { make in + make.width.height.equalTo(30) + make.center.equalTo(self.bgPointView) + } + + } + @objc func cancelViewAction(){ + self.removeFromSuperview() + } + @objc func senderViewAction(){ + cancelViewAction() + if let _clickSendBlcok = self.clickSendBlcok{ + _clickSendBlcok() + } + } + @objc func pointBtnAction(){ + self.pointView.isHidden = !self.pointView.isHidden + if self.pointBtn.isHidden == false{ + UserDefaults.standard.setValue("YES", forKey: "kIsShowPopUp") + }else{ + UserDefaults.standard.removeObject(forKey: "kIsShowPopUp") + } + + + + } + var bgWhiteView:UIView = { + let _bgWhiteView = UIView() + _bgWhiteView.layer.cornerRadius = 22 + _bgWhiteView.layer.masksToBounds = true + _bgWhiteView.backgroundColor = .white + return _bgWhiteView + }() + var textView:UILabel = { + let _textView = UILabel() + _textView.font = UIFont.systemFont(ofSize: 16, weight: .regular) + _textView.textColor = ThemeColor(hexStr: "#1F1B4F") + _textView.numberOfLines = 0 + _textView.textAlignment = .center + return _textView + }() + var cancelView:UIButton = { + let _cancelView = UIButton() + _cancelView.setTitle("取消", for: .normal) + _cancelView.backgroundColor = ThemeColor(hexStr: "#D2D4D6") + _cancelView.titleLabel?.font = UIFont.systemFont(ofSize: 16, weight: .medium) + _cancelView.setTitleColor(.white, for: .normal) + _cancelView.layer.cornerRadius = 21 + _cancelView.layer.masksToBounds = true + _cancelView.addTarget(self, action: #selector(cancelViewAction), for: .touchUpInside) + return _cancelView + }() + var senderView:UIButton = { + let _senderView = UIButton() + _senderView.setTitle("赠送", for: .normal) + _senderView.setBackgroundImage(UIImage(named: "yin_hoem_voice_record_publish_btn"), for: .normal) + _senderView.titleLabel?.font = UIFont.systemFont(ofSize: 16, weight: .medium) + _senderView.setTitleColor(.white, for: .normal) + _senderView.addTarget(self, action: #selector(senderViewAction), for: .touchUpInside) + _senderView.layer.cornerRadius = 21 + _senderView.layer.masksToBounds = true + return _senderView + }() + var bgPointView:UIView = { + let _bgPointView = UIView() + _bgPointView.backgroundColor = ThemeColor(hexStr: "#9D9FA3") + _bgPointView.layer.cornerRadius = 6; + _bgPointView.layer.masksToBounds = true + return _bgPointView + }() + var pointView:UIView = { + let _pointView = UIView() + _pointView.backgroundColor = ThemeColor(hexStr: "#718CFF") + _pointView.layer.cornerRadius = 4; + _pointView.layer.masksToBounds = true + _pointView.layer.borderColor = UIColor.white.cgColor + _pointView.layer.borderWidth = 1 + _pointView.isHidden = true + return _pointView + }() + var pointBtn:UIButton = { + let _pointBtn = UIButton() + _pointBtn.addTarget(self, action: #selector(pointBtnAction), for: .touchUpInside) + return _pointBtn + }() + var pointTextView:UILabel = { + let _pointTextView = UILabel() + _pointTextView.text = "今日不再提示" + _pointTextView.textColor = ThemeColor(hexStr: "#9D9FA3") + _pointTextView.font = UIFont.systemFont(ofSize: 12, weight: .regular) + return _pointTextView + }() +} diff --git a/yinmeng-ios/Modules/Star/PlanetStarVC.swift b/yinmeng-ios/Modules/Star/PlanetStarVC.swift index d653776..71f4359 100644 --- a/yinmeng-ios/Modules/Star/PlanetStarVC.swift +++ b/yinmeng-ios/Modules/Star/PlanetStarVC.swift @@ -89,11 +89,44 @@ class PlanetStarVC: BaseViewController,HiddenNavigationBarProtocol { let giftName = self?.giftModel?.giftName ?? "" let giftNum = self?.giftModel?.goldPrice ?? "0" let text = "确认赠送 \(giftName)(\(giftNum)钻石)给\(name)吗" - let alert = UIAlertController.init(title: "提示", message:text , preferredStyle: .alert) - alert.addAction(UIAlertAction.init(title: "取消", style: .cancel, handler: { action in - - })) - alert.addAction(UIAlertAction.init(title: "确认", style: .default, handler: {[weak self] action in + + guard UserDefaults.standard.value(forKey: "kIsShowPopUp") == nil else{ + RequestGet(path: "special/gift/get", parma: ["targetId":_uid]) { data in + self?.activityView.removeFromSuperview() + if let _ = Deserialized.toModel(with: data) { + HUDTool.show(with: "送礼成功") + let imageView = UIImageView(frame: CGRect(x: ScreenWidth/2-50, y: -100, width: 0, height: 0)) + + Nuke.loadImage(with: self?.giftModel?.picUrl ?? "", into: imageView) + self?.view.addSubview(imageView) + UIView.animate(withDuration: 2) { + imageView.frame = CGRect(x: ScreenWidth/2-50, y: ScreenHeight/3 * 2, width: 100, height: 100) + + }completion: { isC in + DispatchQueue.main.asyncAfter(deadline: .now() + 2) { + UIView.animate(withDuration: 1) { + let x = self?.bgRadiusView.imageView.frame.origin.x ?? 0 + let y = self?.bgRadiusView.imageView.frame.origin.y ?? 0 + imageView.frame = CGRect(x: x + 50, y: y + 50, width: 10, height: 10) + + }completion: { isC in + imageView.removeFromSuperview() + } + } + } + } + } fail: { code, data in + self?.activityView.removeFromSuperview() + if code == 31005{ + self?.showPayVC() + } + } + return + } + let popUpView = PlanetStarPopUpView.init(frame: CGRect(x: 0, y: 0, width: ScreenWidth, height: ScreenHeight)) + self?.view.addSubview(popUpView) + popUpView.textView.text = text + popUpView.clickSendBlcok = {[weak self] in self?.view.addSubview(self!.activityView) RequestGet(path: "special/gift/get", parma: ["targetId":_uid]) { data in self?.activityView.removeFromSuperview() @@ -122,24 +155,31 @@ class PlanetStarVC: BaseViewController,HiddenNavigationBarProtocol { } fail: { code, data in self?.activityView.removeFromSuperview() if code == 31005{ - let alert = UIAlertController.init(title: "提示", message:"钻石余额不足" , preferredStyle: .alert) - alert.addAction(UIAlertAction.init(title: "取消", style: .cancel, handler: { action in - - })) - alert.addAction(UIAlertAction.init(title: "确认", style: .default, handler: {[weak self] action in - let vc = UserPayViewController() - self?.navigationController?.pushViewController(vc, animated: true) - })) - self?.present(alert, animated: true) + self?.showPayVC() } } - })) - self?.present(alert, animated: true) + } + + + } } } + func showPayVC(){ + let popUpView = PlanetStarPopUpView.init(frame: CGRect(x: 0, y: 0, width: ScreenWidth, height: ScreenHeight)) + self.view.addSubview(popUpView) + popUpView.textView.text = "钻石余额不足" + popUpView.senderView.setTitle("去充值", for: .normal) + popUpView.bgPointView.isHidden = true + popUpView.pointTextView.isHidden = true + popUpView.clickSendBlcok = {[weak self] in + let vc = UserPayViewController() + self?.navigationController?.pushViewController(vc, animated: true) + } + + } let activityView:UIActivityIndicatorView = UIActivityIndicatorView(style: .medium) var giftModel:PlanetStarModel? private lazy var backgroundView:UIImageView = { diff --git a/yinmeng-ios/Modules/User/VC/UserInfoVC.swift b/yinmeng-ios/Modules/User/VC/UserInfoVC.swift index 8c4cf09..f16250b 100644 --- a/yinmeng-ios/Modules/User/VC/UserInfoVC.swift +++ b/yinmeng-ios/Modules/User/VC/UserInfoVC.swift @@ -165,7 +165,8 @@ extension UserInfoVC: UserFunctionViewProtocol{ func didClickItem(type: UserFunctionType) { switch type { case .recharge: - //TODO: 充值 + let vc = UserPayViewController() + self.navigationController?.pushViewController(vc, animated: true) print("aaa") case .mobile: if self.info?.isBindPhone == true { diff --git a/yinmeng-ios/logoBg.png b/yinmeng-ios/logoBg.png new file mode 100644 index 0000000..d73e1ee Binary files /dev/null and b/yinmeng-ios/logoBg.png differ diff --git a/yinmeng-ios/textLogo.png b/yinmeng-ios/textLogo.png new file mode 100644 index 0000000..591c81c Binary files /dev/null and b/yinmeng-ios/textLogo.png differ diff --git a/yinmeng-ios/yinLogo.png b/yinmeng-ios/yinLogo.png new file mode 100644 index 0000000..65154ae Binary files /dev/null and b/yinmeng-ios/yinLogo.png differ