Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
5055bf244d | ||
![]() |
0855b81097 | ||
![]() |
157b67e5e0 | ||
![]() |
5e097ba6f9 | ||
![]() |
7109bdbd11 | ||
![]() |
e41907bd4e |
15
Podfile
15
Podfile
@@ -11,7 +11,7 @@ target 'yinmeng-ios' do
|
|||||||
pod 'MBProgressHUD'
|
pod 'MBProgressHUD'
|
||||||
pod 'SVGAPlayer'
|
pod 'SVGAPlayer'
|
||||||
pod 'YYText'
|
pod 'YYText'
|
||||||
pod 'YYWebImage', '~> 1.0.5'
|
pod 'YYWebImage'
|
||||||
#下拉刷新控件
|
#下拉刷新控件
|
||||||
pod 'MJRefresh'
|
pod 'MJRefresh'
|
||||||
# 滑动标签栏
|
# 滑动标签栏
|
||||||
@@ -22,26 +22,27 @@ target 'yinmeng-ios' do
|
|||||||
#cell
|
#cell
|
||||||
pod 'Reusable'
|
pod 'Reusable'
|
||||||
#约束
|
#约束
|
||||||
pod 'SnapKit', '~> 5.6.0'
|
pod 'SnapKit'
|
||||||
#获取设备信息
|
#获取设备信息
|
||||||
pod 'DeviceKit', '~> 4.0'
|
pod 'DeviceKit'
|
||||||
pod 'Nuke'
|
pod 'Nuke'
|
||||||
pod "NSObject+Rx"
|
pod "NSObject+Rx"
|
||||||
pod 'Qiniu'
|
pod 'Qiniu'
|
||||||
#文字自动滚动
|
#文字自动滚动
|
||||||
pod 'MarqueeLabel'
|
pod 'MarqueeLabel'
|
||||||
pod 'NIMSDK_LITE', '9.6.1'
|
pod 'NIMSDK_LITE'
|
||||||
|
|
||||||
pod 'TZImagePickerController'
|
pod 'TZImagePickerController'
|
||||||
pod 'LookinServer', :configurations => ['Debug']
|
pod 'LookinServer', :configurations => ['Debug']
|
||||||
#pop动画
|
#pop动画
|
||||||
pod 'pop', '~> 1.0.12'
|
pod 'pop'
|
||||||
pod 'FFPopup'
|
pod 'FFPopup'
|
||||||
pod 'TXLiteAVSDK_TRTC', '~> 11.4.14530'
|
pod 'TXLiteAVSDK_TRTC'
|
||||||
pod 'MJExtension'
|
pod 'MJExtension'
|
||||||
pod 'QGVAPlayer'
|
pod 'QGVAPlayer'
|
||||||
|
|
||||||
#声网
|
#声网
|
||||||
pod 'AgoraRtcEngine_iOS', '~> 4.2.2'
|
pod 'AgoraRtcEngine_iOS'
|
||||||
# Pods for yinmeng-ios
|
# Pods for yinmeng-ios
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@@ -7,6 +7,7 @@
|
|||||||
objects = {
|
objects = {
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
/* Begin PBXBuildFile section */
|
||||||
|
23116B0A2BDB8CA100F7F97A /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 23116B072BDB812600F7F97A /* PrivacyInfo.xcprivacy */; };
|
||||||
2311D69D2B8DC311001C70AB /* PlanetStarModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2311D69C2B8DC311001C70AB /* PlanetStarModel.swift */; };
|
2311D69D2B8DC311001C70AB /* PlanetStarModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2311D69C2B8DC311001C70AB /* PlanetStarModel.swift */; };
|
||||||
2311D6A12B8DD649001C70AB /* StarIcon.svga in Resources */ = {isa = PBXBuildFile; fileRef = 2311D6A02B8DD649001C70AB /* StarIcon.svga */; };
|
2311D6A12B8DD649001C70AB /* StarIcon.svga in Resources */ = {isa = PBXBuildFile; fileRef = 2311D6A02B8DD649001C70AB /* StarIcon.svga */; };
|
||||||
2311D6A52B8F0E06001C70AB /* StarGift.svga in Resources */ = {isa = PBXBuildFile; fileRef = 2311D6A42B8F0E06001C70AB /* StarGift.svga */; };
|
2311D6A52B8F0E06001C70AB /* StarGift.svga in Resources */ = {isa = PBXBuildFile; fileRef = 2311D6A42B8F0E06001C70AB /* StarGift.svga */; };
|
||||||
@@ -192,6 +193,7 @@
|
|||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
|
23116B072BDB812600F7F97A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
|
||||||
2311D69C2B8DC311001C70AB /* PlanetStarModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlanetStarModel.swift; sourceTree = "<group>"; };
|
2311D69C2B8DC311001C70AB /* PlanetStarModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlanetStarModel.swift; sourceTree = "<group>"; };
|
||||||
2311D6A02B8DD649001C70AB /* StarIcon.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = StarIcon.svga; sourceTree = "<group>"; };
|
2311D6A02B8DD649001C70AB /* StarIcon.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = StarIcon.svga; sourceTree = "<group>"; };
|
||||||
2311D6A42B8F0E06001C70AB /* StarGift.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = StarGift.svga; sourceTree = "<group>"; };
|
2311D6A42B8F0E06001C70AB /* StarGift.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = StarGift.svga; sourceTree = "<group>"; };
|
||||||
@@ -1207,6 +1209,7 @@
|
|||||||
E884E8672B6900C600ADE6EE /* Assets.xcassets */,
|
E884E8672B6900C600ADE6EE /* Assets.xcassets */,
|
||||||
E884E8692B6900C600ADE6EE /* LaunchScreen.storyboard */,
|
E884E8692B6900C600ADE6EE /* LaunchScreen.storyboard */,
|
||||||
E884E86C2B6900C600ADE6EE /* Info.plist */,
|
E884E86C2B6900C600ADE6EE /* Info.plist */,
|
||||||
|
23116B072BDB812600F7F97A /* PrivacyInfo.xcprivacy */,
|
||||||
);
|
);
|
||||||
path = "yinmeng-ios";
|
path = "yinmeng-ios";
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@@ -1379,6 +1382,7 @@
|
|||||||
E884E8582B6900C500ADE6EE /* Frameworks */,
|
E884E8582B6900C500ADE6EE /* Frameworks */,
|
||||||
E884E8592B6900C500ADE6EE /* Resources */,
|
E884E8592B6900C500ADE6EE /* Resources */,
|
||||||
0486212FDC8E85876369464E /* [CP] Embed Pods Frameworks */,
|
0486212FDC8E85876369464E /* [CP] Embed Pods Frameworks */,
|
||||||
|
342A0E7CD92CA856FA58E3A4 /* [CP] Copy Pods Resources */,
|
||||||
);
|
);
|
||||||
buildRules = (
|
buildRules = (
|
||||||
);
|
);
|
||||||
@@ -1428,6 +1432,7 @@
|
|||||||
isa = PBXResourcesBuildPhase;
|
isa = PBXResourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
23116B0A2BDB8CA100F7F97A /* PrivacyInfo.xcprivacy in Resources */,
|
||||||
23EE96FA2BA1A3A300475D69 /* YinSpeak.svga in Resources */,
|
23EE96FA2BA1A3A300475D69 /* YinSpeak.svga in Resources */,
|
||||||
2311D6D92B920442001C70AB /* yinLogo.png in Resources */,
|
2311D6D92B920442001C70AB /* yinLogo.png in Resources */,
|
||||||
E884E86B2B6900C600ADE6EE /* LaunchScreen.storyboard in Resources */,
|
E884E86B2B6900C600ADE6EE /* LaunchScreen.storyboard in Resources */,
|
||||||
@@ -1462,6 +1467,23 @@
|
|||||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-yinmeng-ios/Pods-yinmeng-ios-frameworks.sh\"\n";
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-yinmeng-ios/Pods-yinmeng-ios-frameworks.sh\"\n";
|
||||||
showEnvVarsInLog = 0;
|
showEnvVarsInLog = 0;
|
||||||
};
|
};
|
||||||
|
342A0E7CD92CA856FA58E3A4 /* [CP] Copy Pods Resources */ = {
|
||||||
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
buildActionMask = 2147483647;
|
||||||
|
files = (
|
||||||
|
);
|
||||||
|
inputFileListPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-yinmeng-ios/Pods-yinmeng-ios-resources-${CONFIGURATION}-input-files.xcfilelist",
|
||||||
|
);
|
||||||
|
name = "[CP] Copy Pods Resources";
|
||||||
|
outputFileListPaths = (
|
||||||
|
"${PODS_ROOT}/Target Support Files/Pods-yinmeng-ios/Pods-yinmeng-ios-resources-${CONFIGURATION}-output-files.xcfilelist",
|
||||||
|
);
|
||||||
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
|
shellPath = /bin/sh;
|
||||||
|
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-yinmeng-ios/Pods-yinmeng-ios-resources.sh\"\n";
|
||||||
|
showEnvVarsInLog = 0;
|
||||||
|
};
|
||||||
65A9458CEC329A8AC9C7F88D /* [CP] Check Pods Manifest.lock */ = {
|
65A9458CEC329A8AC9C7F88D /* [CP] Check Pods Manifest.lock */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
@@ -1813,7 +1835,7 @@
|
|||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = "yinmeng-ios/yinmeng-ios.entitlements";
|
CODE_SIGN_ENTITLEMENTS = "yinmeng-ios/yinmeng-ios.entitlements";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 2;
|
||||||
DEFINES_MODULE = YES;
|
DEFINES_MODULE = YES;
|
||||||
DEVELOPMENT_TEAM = 48UCG35Q9W;
|
DEVELOPMENT_TEAM = 48UCG35Q9W;
|
||||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||||
@@ -1835,7 +1857,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.5;
|
MARKETING_VERSION = 1.0.7;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "linyudan.yinmeng-ios";
|
PRODUCT_BUNDLE_IDENTIFIER = "linyudan.yinmeng-ios";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
@@ -1857,7 +1879,7 @@
|
|||||||
CLANG_ENABLE_MODULES = YES;
|
CLANG_ENABLE_MODULES = YES;
|
||||||
CODE_SIGN_ENTITLEMENTS = "yinmeng-ios/yinmeng-ios.entitlements";
|
CODE_SIGN_ENTITLEMENTS = "yinmeng-ios/yinmeng-ios.entitlements";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 1;
|
CURRENT_PROJECT_VERSION = 2;
|
||||||
DEFINES_MODULE = YES;
|
DEFINES_MODULE = YES;
|
||||||
DEVELOPMENT_TEAM = 48UCG35Q9W;
|
DEVELOPMENT_TEAM = 48UCG35Q9W;
|
||||||
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
ENABLE_USER_SCRIPT_SANDBOXING = NO;
|
||||||
@@ -1879,7 +1901,7 @@
|
|||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
);
|
);
|
||||||
MARKETING_VERSION = 1.0.5;
|
MARKETING_VERSION = 1.0.7;
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = "linyudan.yinmeng-ios";
|
PRODUCT_BUNDLE_IDENTIFIER = "linyudan.yinmeng-ios";
|
||||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||||
|
@@ -0,0 +1,78 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<Scheme
|
||||||
|
LastUpgradeVersion = "1540"
|
||||||
|
version = "1.7">
|
||||||
|
<BuildAction
|
||||||
|
parallelizeBuildables = "YES"
|
||||||
|
buildImplicitDependencies = "YES"
|
||||||
|
buildArchitectures = "Automatic">
|
||||||
|
<BuildActionEntries>
|
||||||
|
<BuildActionEntry
|
||||||
|
buildForTesting = "YES"
|
||||||
|
buildForRunning = "YES"
|
||||||
|
buildForProfiling = "YES"
|
||||||
|
buildForArchiving = "YES"
|
||||||
|
buildForAnalyzing = "YES">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "E884E85A2B6900C500ADE6EE"
|
||||||
|
BuildableName = "yinmeng-ios.app"
|
||||||
|
BlueprintName = "yinmeng-ios"
|
||||||
|
ReferencedContainer = "container:yinmeng-ios.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildActionEntry>
|
||||||
|
</BuildActionEntries>
|
||||||
|
</BuildAction>
|
||||||
|
<TestAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
shouldAutocreateTestPlan = "YES">
|
||||||
|
</TestAction>
|
||||||
|
<LaunchAction
|
||||||
|
buildConfiguration = "Debug"
|
||||||
|
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||||
|
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||||
|
launchStyle = "0"
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
ignoresPersistentStateOnLaunch = "NO"
|
||||||
|
debugDocumentVersioning = "YES"
|
||||||
|
debugServiceExtension = "internal"
|
||||||
|
allowLocationSimulation = "YES">
|
||||||
|
<BuildableProductRunnable
|
||||||
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "E884E85A2B6900C500ADE6EE"
|
||||||
|
BuildableName = "yinmeng-ios.app"
|
||||||
|
BlueprintName = "yinmeng-ios"
|
||||||
|
ReferencedContainer = "container:yinmeng-ios.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
</LaunchAction>
|
||||||
|
<ProfileAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||||
|
savedToolIdentifier = ""
|
||||||
|
useCustomWorkingDirectory = "NO"
|
||||||
|
debugDocumentVersioning = "YES">
|
||||||
|
<BuildableProductRunnable
|
||||||
|
runnableDebuggingMode = "0">
|
||||||
|
<BuildableReference
|
||||||
|
BuildableIdentifier = "primary"
|
||||||
|
BlueprintIdentifier = "E884E85A2B6900C500ADE6EE"
|
||||||
|
BuildableName = "yinmeng-ios.app"
|
||||||
|
BlueprintName = "yinmeng-ios"
|
||||||
|
ReferencedContainer = "container:yinmeng-ios.xcodeproj">
|
||||||
|
</BuildableReference>
|
||||||
|
</BuildableProductRunnable>
|
||||||
|
</ProfileAction>
|
||||||
|
<AnalyzeAction
|
||||||
|
buildConfiguration = "Debug">
|
||||||
|
</AnalyzeAction>
|
||||||
|
<ArchiveAction
|
||||||
|
buildConfiguration = "Release"
|
||||||
|
revealArchiveInOrganizer = "YES">
|
||||||
|
</ArchiveAction>
|
||||||
|
</Scheme>
|
Binary file not shown.
@@ -1,36 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Bucket
|
|
||||||
uuid = "265D86DA-810F-46B5-8843-7CF61C036487"
|
|
||||||
type = "0"
|
|
||||||
version = "2.0">
|
|
||||||
<Breakpoints>
|
|
||||||
<BreakpointProxy
|
|
||||||
BreakpointExtensionID = "Xcode.Breakpoint.ExceptionBreakpoint">
|
|
||||||
<BreakpointContent
|
|
||||||
uuid = "B72A7630-2547-456B-951B-4C7FD280A268"
|
|
||||||
shouldBeEnabled = "Yes"
|
|
||||||
ignoreCount = "0"
|
|
||||||
continueAfterRunningActions = "No"
|
|
||||||
breakpointStackSelectionBehavior = "1"
|
|
||||||
scope = "1"
|
|
||||||
stopOnStyle = "0">
|
|
||||||
</BreakpointContent>
|
|
||||||
</BreakpointProxy>
|
|
||||||
<BreakpointProxy
|
|
||||||
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
|
|
||||||
<BreakpointContent
|
|
||||||
uuid = "A13339C1-73DD-4996-91B1-602150B243F2"
|
|
||||||
shouldBeEnabled = "Yes"
|
|
||||||
ignoreCount = "0"
|
|
||||||
continueAfterRunningActions = "No"
|
|
||||||
filePath = "yinmeng-ios/Modules/Chat/VM/ChatViewModel.swift"
|
|
||||||
startingColumnNumber = "9223372036854775807"
|
|
||||||
endingColumnNumber = "9223372036854775807"
|
|
||||||
startingLineNumber = "329"
|
|
||||||
endingLineNumber = "329"
|
|
||||||
landmarkName = "onRecvMessages(_:)"
|
|
||||||
landmarkType = "7">
|
|
||||||
</BreakpointContent>
|
|
||||||
</BreakpointProxy>
|
|
||||||
</Breakpoints>
|
|
||||||
</Bucket>
|
|
@@ -11,59 +11,76 @@ import NSObject_Rx
|
|||||||
import NIMSDK
|
import NIMSDK
|
||||||
@main
|
@main
|
||||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||||
var window: UIWindow?
|
var window: UIWindow?
|
||||||
|
|
||||||
|
|
||||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
|
||||||
UIApplication.shared.applicationIconBadgeNumber = 0
|
UIApplication.shared.applicationIconBadgeNumber = 0
|
||||||
self.window = UIWindow.init(frame: UIScreen.main.bounds)
|
self.window = UIWindow.init(frame: UIScreen.main.bounds)
|
||||||
self.window?.backgroundColor = UIColor.white
|
self.window?.backgroundColor = UIColor.white
|
||||||
self.window?.rootViewController = BaseNavigationViewController(rootViewController:AuthLaunchVC())
|
|
||||||
loadNIMSDK()
|
|
||||||
loginStateListener()
|
|
||||||
|
|
||||||
|
showLoginPage()
|
||||||
|
|
||||||
|
loadNIMSDK()
|
||||||
|
loginStateListener()
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
private func loginStateListener() {
|
private func loginStateListener() {
|
||||||
AuthViewModel.authVM.appClientConfig()
|
AuthViewModel.authVM.appClientConfig()
|
||||||
///检车是否已经登录
|
|
||||||
AuthViewModel.authVM.checkUserIsLogin()
|
AuthViewModel.authVM.checkUserIsLogin()
|
||||||
AuthViewModel.authVM.loginSuccess.subscribe(onNext: { result in
|
AuthViewModel.authVM.loginSuccess.subscribe(onNext: { [weak self] result in
|
||||||
print("是否登录成功\(result)")
|
guard let strongSelf = self else { return }
|
||||||
|
|
||||||
if result == true {
|
if result == true {
|
||||||
///如果登录成功显示tabbar
|
|
||||||
self.window?.rootViewController = BaseTabBarViewController()
|
|
||||||
let uid = AuthManager.userUid
|
let uid = AuthManager.userUid
|
||||||
if uid > 0 {
|
if uid > 0 {
|
||||||
UserViewModel.userVM.getUserInfo(uid: uid)
|
UserViewModel.userVM.getUserInfo(uid: uid)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
strongSelf.showTabbar()
|
||||||
|
|
||||||
|
// MARK: 目前没有使用云信的场景
|
||||||
if NIMSDK.shared().loginManager.isLogined() == false {
|
if NIMSDK.shared().loginManager.isLogined() == false {
|
||||||
if let uid = LoginTokenConfig.config.getAccountInfo()?.uid, let token = LoginTokenConfig.config.getAccountInfo()?.netEaseToken {
|
if let uid = LoginTokenConfig.config.getAccountInfo()?.uid,
|
||||||
|
let token = LoginTokenConfig.config.getAccountInfo()?.netEaseToken {
|
||||||
NIMSDK.shared().loginManager.login("\(uid)", token: token) { error in
|
NIMSDK.shared().loginManager.login("\(uid)", token: token) { error in
|
||||||
print("aaa")
|
guard let error else {
|
||||||
|
// strongSelf.showTabbar()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
print("login error: \(String(describing: error))")
|
||||||
|
// strongSelf.showLoginPage()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
///去登录
|
// strongSelf.showLoginPage()
|
||||||
self.window?.rootViewController = BaseNavigationViewController(rootViewController:AuthLaunchVC())
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
|
// strongSelf.showTabbar()
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
///去登录
|
strongSelf.showLoginPage()
|
||||||
self.window?.rootViewController = BaseNavigationViewController(rootViewController:AuthLaunchVC())
|
|
||||||
}
|
}
|
||||||
}).disposed(by: rx.disposeBag)
|
}).disposed(by: rx.disposeBag)
|
||||||
|
|
||||||
UserViewModel.userVM.selfInfo.subscribe(onNext: { result in
|
UserViewModel.userVM.selfInfo.subscribe(onNext: { [weak self] result in
|
||||||
|
guard let strongSelf = self else { return }
|
||||||
if result.nick?.count ?? 0 <= 0 || result.avatar?.count ?? 0 <= 0 {
|
if result.nick?.count ?? 0 <= 0 || result.avatar?.count ?? 0 <= 0 {
|
||||||
let fillVC = AuthFillDataVC()
|
let fillVC = AuthFillDataVC()
|
||||||
fillVC.modalPresentationStyle = .fullScreen
|
fillVC.modalPresentationStyle = .fullScreen
|
||||||
self.window?.rootViewController = fillVC
|
strongSelf.window?.rootViewController = fillVC
|
||||||
}
|
}
|
||||||
}).disposed(by: rx.disposeBag)
|
}).disposed(by: rx.disposeBag)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private func showLoginPage() {
|
||||||
|
self.window?.rootViewController = BaseNavigationViewController(rootViewController:AuthLaunchVC())
|
||||||
|
}
|
||||||
|
|
||||||
|
private func showTabbar() {
|
||||||
|
///如果登录成功显示tabbar
|
||||||
|
self.window?.rootViewController = BaseTabBarViewController()
|
||||||
|
}
|
||||||
|
|
||||||
private func loadNIMSDK() {
|
private func loadNIMSDK() {
|
||||||
let opt = NIMSDKOption(appKey: AppKeys.nimAppid)
|
let opt = NIMSDKOption(appKey: AppKeys.nimAppid)
|
||||||
opt.apnsCername = "yinmeng_anps"
|
opt.apnsCername = "yinmeng_anps"
|
||||||
|
@@ -94,6 +94,11 @@ class YMNetworkHelper: NSObject {
|
|||||||
sessionNetMana.cancelAllRequests()
|
sessionNetMana.cancelAllRequests()
|
||||||
keyWindow.rootViewController = BaseNavigationViewController(rootViewController:AuthLaunchVC())
|
keyWindow.rootViewController = BaseNavigationViewController(rootViewController:AuthLaunchVC())
|
||||||
}
|
}
|
||||||
|
if (codeNum == 1415){
|
||||||
|
let fillVC = AuthFillDataVC()
|
||||||
|
fillVC.modalPresentationStyle = .fullScreen
|
||||||
|
keyWindow.rootViewController = fillVC
|
||||||
|
}
|
||||||
var messageIn = response1.error.debugDescription
|
var messageIn = response1.error.debugDescription
|
||||||
if ResultMo.keys.contains("message") { messageIn = ResultMo["message"] as? String ?? "" }
|
if ResultMo.keys.contains("message") { messageIn = ResultMo["message"] as? String ?? "" }
|
||||||
fail3?(codeNum,messageIn)
|
fail3?(codeNum,messageIn)
|
||||||
|
@@ -80,8 +80,6 @@ class AuthLaunchVC: BaseViewController, HiddenNavigationBarProtocol {
|
|||||||
make.bottom.equalTo(stackView.snp.top).offset(-56)
|
make.bottom.equalTo(stackView.snp.top).offset(-56)
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
|
|
||||||
appleView.snp.makeConstraints { make in
|
appleView.snp.makeConstraints { make in
|
||||||
make.width.equalTo(47)
|
make.width.equalTo(47)
|
||||||
make.height.equalTo(70)
|
make.height.equalTo(70)
|
||||||
@@ -135,7 +133,7 @@ class AuthLaunchVC: BaseViewController, HiddenNavigationBarProtocol {
|
|||||||
private lazy var phoneLoginBtn: UIButton = {
|
private lazy var phoneLoginBtn: UIButton = {
|
||||||
let button = UIButton(type: .custom)
|
let button = UIButton(type: .custom)
|
||||||
button.setBackgroundImage(UIImage.gradient([ThemeColor(hexStr: "#FF60FD"), ThemeColor(hexStr: "#8974FF"), ThemeColor(hexStr: "#69EBFF")], radius: 0), for: .normal)
|
button.setBackgroundImage(UIImage.gradient([ThemeColor(hexStr: "#FF60FD"), ThemeColor(hexStr: "#8974FF"), ThemeColor(hexStr: "#69EBFF")], radius: 0), for: .normal)
|
||||||
button.setTitle("手机号登录", for: .normal)
|
button.setTitle("手机号或账号登录", for: .normal)
|
||||||
button.setTitleColor(UIColor.white, for: .normal)
|
button.setTitleColor(UIColor.white, for: .normal)
|
||||||
button.titleLabel?.font = UIFont.systemFont(ofSize: 16, weight: .medium)
|
button.titleLabel?.font = UIFont.systemFont(ofSize: 16, weight: .medium)
|
||||||
button.layer.masksToBounds = true
|
button.layer.masksToBounds = true
|
||||||
|
@@ -113,6 +113,7 @@ class AuthLoginVC: BaseViewController, HiddenNavigationBarProtocol {
|
|||||||
phonetextFiled.snp.makeConstraints { make in
|
phonetextFiled.snp.makeConstraints { make in
|
||||||
make.top.bottom.equalTo(phoneNumView)
|
make.top.bottom.equalTo(phoneNumView)
|
||||||
make.left.equalTo(phoneNumView).offset(82)
|
make.left.equalTo(phoneNumView).offset(82)
|
||||||
|
make.right.equalTo(phoneNumView)
|
||||||
}
|
}
|
||||||
|
|
||||||
codeView.snp.makeConstraints { make in
|
codeView.snp.makeConstraints { make in
|
||||||
@@ -123,7 +124,7 @@ class AuthLoginVC: BaseViewController, HiddenNavigationBarProtocol {
|
|||||||
codetextFiled.snp.makeConstraints { make in
|
codetextFiled.snp.makeConstraints { make in
|
||||||
make.left.equalTo(codeView).offset(20)
|
make.left.equalTo(codeView).offset(20)
|
||||||
make.top.bottom.equalTo(codeView)
|
make.top.bottom.equalTo(codeView)
|
||||||
|
make.right.equalTo(codeView)
|
||||||
}
|
}
|
||||||
|
|
||||||
sepView.snp.makeConstraints { make in
|
sepView.snp.makeConstraints { make in
|
||||||
@@ -150,7 +151,7 @@ class AuthLoginVC: BaseViewController, HiddenNavigationBarProtocol {
|
|||||||
|
|
||||||
idTextFiled.snp.makeConstraints { make in
|
idTextFiled.snp.makeConstraints { make in
|
||||||
make.left.equalTo(idView).offset(20)
|
make.left.equalTo(idView).offset(20)
|
||||||
make.top.bottom.equalTo(idView)
|
make.top.bottom.right.equalTo(idView)
|
||||||
}
|
}
|
||||||
|
|
||||||
pwdView.snp.makeConstraints { make in
|
pwdView.snp.makeConstraints { make in
|
||||||
@@ -161,7 +162,7 @@ class AuthLoginVC: BaseViewController, HiddenNavigationBarProtocol {
|
|||||||
|
|
||||||
pwdTextFiled.snp.makeConstraints { make in
|
pwdTextFiled.snp.makeConstraints { make in
|
||||||
make.left.equalTo(pwdView).offset(20)
|
make.left.equalTo(pwdView).offset(20)
|
||||||
make.top.bottom.equalTo(pwdView)
|
make.top.bottom.right.equalTo(pwdView)
|
||||||
}
|
}
|
||||||
|
|
||||||
forgetBtn.snp.makeConstraints { make in
|
forgetBtn.snp.makeConstraints { make in
|
||||||
@@ -175,8 +176,6 @@ class AuthLoginVC: BaseViewController, HiddenNavigationBarProtocol {
|
|||||||
make.height.equalTo(52)
|
make.height.equalTo(52)
|
||||||
make.top.equalTo(phoneView.snp.bottom).offset(44)
|
make.top.equalTo(phoneView.snp.bottom).offset(44)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -20,28 +20,34 @@ class HomeVoiceVC: BaseViewController,HiddenNavigationBarProtocol {
|
|||||||
override func viewWillAppear(_ animated: Bool) {
|
override func viewWillAppear(_ animated: Bool) {
|
||||||
super.viewWillAppear(animated)
|
super.viewWillAppear(animated)
|
||||||
requestData()
|
requestData()
|
||||||
requsetFansListData()
|
requestFansListData()
|
||||||
}
|
}
|
||||||
override func viewDidLoad() {
|
override func viewDidLoad() {
|
||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
setUILayout()
|
setUILayout()
|
||||||
requestData()
|
requestData()
|
||||||
requsetFansListData()
|
requestFansListData()
|
||||||
|
displayGuide()
|
||||||
|
|
||||||
userInfoBtn.addTarget(self, action: #selector(userInfoBtnAction), for: .touchUpInside)
|
userInfoBtn.addTarget(self, action: #selector(userInfoBtnAction), for: .touchUpInside)
|
||||||
|
}
|
||||||
|
|
||||||
|
func displayGuide() {
|
||||||
if (UserDefaults.standard.value(forKey:"kIsShowGuide") != nil){return}
|
if (UserDefaults.standard.value(forKey:"kIsShowGuide") != nil){return}
|
||||||
UserDefaults.standard.setValue("yes", forKey: "kIsShowGuide")
|
UserDefaults.standard.setValue("yes", forKey: "kIsShowGuide")
|
||||||
let guideVeiw = HomeVoiceGuideView.init(frame: CGRect(x: 0, y: 0, width: ScreenWidth, height: ScreenHeight))
|
let guideVeiw = HomeVoiceGuideView.init(frame: CGRect(x: 0, y: 0, width: ScreenWidth, height: ScreenHeight))
|
||||||
keyWindow.addSubview(guideVeiw)
|
keyWindow.addSubview(guideVeiw)
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc func userInfoBtnAction(){
|
@objc func userInfoBtnAction(){
|
||||||
let userInfoView:HomeVoiceUserInfoView = HomeVoiceUserInfoView.init(frame: .zero)
|
let userInfoView:HomeVoiceUserInfoView = HomeVoiceUserInfoView.init(frame: .zero)
|
||||||
userInfoView.clickBtnBlock = {[weak self] (type,uid) in
|
userInfoView.clickBtnBlock = {[weak self] (type,uid) in
|
||||||
guard let weakSelf = self else {
|
guard let self = self else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if type == 3{
|
if type == 3{
|
||||||
let vc = UserPayViewController()
|
let vc = UserPayViewController()
|
||||||
weakSelf.navigationController?.pushViewController(vc, animated: true)
|
self.navigationController?.pushViewController(vc, animated: true)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -53,10 +59,12 @@ class HomeVoiceVC: BaseViewController,HiddenNavigationBarProtocol {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
func requsetFansListData(){
|
func requestFansListData(){
|
||||||
let uid = "\(AuthManager.userUid)"
|
let uid = "\(AuthManager.userUid)"
|
||||||
RequestGet(path: "fans/following", parma: ["uid":uid,"pageNo":"1","pageSize":"50"]) { data in
|
RequestGet(path: "fans/following", parma: ["uid":uid,"pageNo":"1","pageSize":"50"]) { [weak self] data in
|
||||||
|
guard let self else {
|
||||||
|
return
|
||||||
|
}
|
||||||
if let list = Deserialized<HomeVoiceModel>.toArray(with: data) {
|
if let list = Deserialized<HomeVoiceModel>.toArray(with: data) {
|
||||||
self.followView.modelList = list
|
self.followView.modelList = list
|
||||||
}
|
}
|
||||||
@@ -65,9 +73,9 @@ class HomeVoiceVC: BaseViewController,HiddenNavigationBarProtocol {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
func setUILayout(){
|
func setUILayout(){
|
||||||
|
|
||||||
view.addSubview(backgroundView)
|
view.addSubview(backgroundView)
|
||||||
view.addSubview(scrollView)
|
view.addSubview(scrollView)
|
||||||
|
|
||||||
scrollView.addSubview(topLogoIcon)
|
scrollView.addSubview(topLogoIcon)
|
||||||
scrollView.addSubview(searchView)
|
scrollView.addSubview(searchView)
|
||||||
scrollView.addSubview(chooseItemVeiw)
|
scrollView.addSubview(chooseItemVeiw)
|
||||||
@@ -76,11 +84,7 @@ class HomeVoiceVC: BaseViewController,HiddenNavigationBarProtocol {
|
|||||||
|
|
||||||
scrollView.addSubview(publishView)
|
scrollView.addSubview(publishView)
|
||||||
scrollView.addSubview(bgPlayMusicView)
|
scrollView.addSubview(bgPlayMusicView)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
backgroundView.snp.makeConstraints { make in
|
backgroundView.snp.makeConstraints { make in
|
||||||
make.edges.equalTo(self.view)
|
make.edges.equalTo(self.view)
|
||||||
}
|
}
|
||||||
@@ -131,6 +135,7 @@ class HomeVoiceVC: BaseViewController,HiddenNavigationBarProtocol {
|
|||||||
make.width.equalTo(ScreenWidth-28)
|
make.width.equalTo(ScreenWidth-28)
|
||||||
make.height.equalTo(144)
|
make.height.equalTo(144)
|
||||||
}
|
}
|
||||||
|
|
||||||
publishView.superview?.layoutIfNeeded()
|
publishView.superview?.layoutIfNeeded()
|
||||||
scrollView.contentSize = CGSize(width: ScreenWidth, height: publishView.frame.origin.y + publishView.frame.size.height)
|
scrollView.contentSize = CGSize(width: ScreenWidth, height: publishView.frame.origin.y + publishView.frame.size.height)
|
||||||
let margin:CGFloat = (ScreenWidth - 90 * 3 - 28)/4
|
let margin:CGFloat = (ScreenWidth - 90 * 3 - 28)/4
|
||||||
@@ -150,11 +155,7 @@ class HomeVoiceVC: BaseViewController,HiddenNavigationBarProtocol {
|
|||||||
|
|
||||||
let x = ScreenWidth - 28 - 44 - 3
|
let x = ScreenWidth - 28 - 44 - 3
|
||||||
followView.frame = CGRect(x:x , y: 3, width: 44, height: 418)
|
followView.frame = CGRect(x:x , y: 3, width: 44, height: 418)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
chooseTypeView.chooseTypeBlock = {[weak self] type in
|
chooseTypeView.chooseTypeBlock = {[weak self] type in
|
||||||
guard let weakSelf = self else {
|
guard let weakSelf = self else {
|
||||||
return
|
return
|
||||||
@@ -181,10 +182,18 @@ class HomeVoiceVC: BaseViewController,HiddenNavigationBarProtocol {
|
|||||||
}
|
}
|
||||||
let userInfoView:HomeVoiceUserInfoView = HomeVoiceUserInfoView.init(frame: .zero)
|
let userInfoView:HomeVoiceUserInfoView = HomeVoiceUserInfoView.init(frame: .zero)
|
||||||
userInfoView.clickBtnBlock = {[weak self] (type,uid) in
|
userInfoView.clickBtnBlock = {[weak self] (type,uid) in
|
||||||
|
guard let self else {
|
||||||
|
return
|
||||||
|
}
|
||||||
let session = NIMSession(uid, type: .P2P)
|
let session = NIMSession(uid, type: .P2P)
|
||||||
let chatVC = ChatVC.init(session: session)
|
let chatVC = ChatVC.init(session: session)
|
||||||
self?.navigationController?.pushViewController(chatVC, animated: true)
|
self.navigationController?.pushViewController(chatVC, animated: true)
|
||||||
|
}
|
||||||
|
userInfoView.followActionBlock = { [weak self] (isFollow, value) in
|
||||||
|
guard let self else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
self.requestFansListData()
|
||||||
}
|
}
|
||||||
userInfoView.model = model
|
userInfoView.model = model
|
||||||
userInfoView.type = 0
|
userInfoView.type = 0
|
||||||
@@ -211,7 +220,7 @@ class HomeVoiceVC: BaseViewController,HiddenNavigationBarProtocol {
|
|||||||
navigationController?.present(searchVC, animated: true, completion: nil)
|
navigationController?.present(searchVC, animated: true, completion: nil)
|
||||||
}
|
}
|
||||||
@objc func clickLongTapAction(sender:UIPanGestureRecognizer){
|
@objc func clickLongTapAction(sender:UIPanGestureRecognizer){
|
||||||
let i = (sender.view?.tag ?? 100) - 100
|
_ = (sender.view?.tag ?? 100) - 100
|
||||||
if sender.state == .began{
|
if sender.state == .began{
|
||||||
location = sender.view?.center
|
location = sender.view?.center
|
||||||
}else if sender.state == .changed{
|
}else if sender.state == .changed{
|
||||||
@@ -223,7 +232,6 @@ class HomeVoiceVC: BaseViewController,HiddenNavigationBarProtocol {
|
|||||||
sender.view?.center = CGPoint(x: x, y: y)
|
sender.view?.center = CGPoint(x: x, y: y)
|
||||||
sender.setTranslation(.zero, in: self.view)
|
sender.setTranslation(.zero, in: self.view)
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
guard let centerPoint = sender.view?.center else{return}
|
guard let centerPoint = sender.view?.center else{return}
|
||||||
let point = CGPoint(x: centerPoint.x + 14, y: centerPoint.y+136)
|
let point = CGPoint(x: centerPoint.x + 14, y: centerPoint.y+136)
|
||||||
|
|
||||||
@@ -239,7 +247,6 @@ class HomeVoiceVC: BaseViewController,HiddenNavigationBarProtocol {
|
|||||||
if let location = self.location{
|
if let location = self.location{
|
||||||
sender.view?.center = location
|
sender.view?.center = location
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -255,31 +262,38 @@ class HomeVoiceVC: BaseViewController,HiddenNavigationBarProtocol {
|
|||||||
let chatVC = ChatVC.init(session: session)
|
let chatVC = ChatVC.init(session: session)
|
||||||
self?.navigationController?.pushViewController(chatVC, animated: true)
|
self?.navigationController?.pushViewController(chatVC, animated: true)
|
||||||
}
|
}
|
||||||
|
userInfoView.followActionBlock = { [weak self] (isFollow, value) in
|
||||||
|
guard let self else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
self.requestFansListData()
|
||||||
|
}
|
||||||
userInfoView.type = 0
|
userInfoView.type = 0
|
||||||
userInfoView.model = view.model
|
userInfoView.model = view.model
|
||||||
self.view.addSubview(userInfoView)
|
self.view.addSubview(userInfoView)
|
||||||
userInfoView.snp.makeConstraints { make in
|
userInfoView.snp.makeConstraints { make in
|
||||||
make.edges.equalTo(self.view)
|
make.edges.equalTo(self.view)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc func changeItemAction(){
|
@objc func changeItemAction(){
|
||||||
requestData()
|
requestData()
|
||||||
makeRotationAnim(view: changeItemView.leftIconView)
|
makeRotationAnim(view: changeItemView.leftIconView)
|
||||||
}
|
}
|
||||||
|
|
||||||
func makeRotationAnim(view: UIView) {
|
func makeRotationAnim(view: UIView) {
|
||||||
// 1.创建动画
|
// 1.创建动画
|
||||||
let rotationAnim = CABasicAnimation(keyPath: "transform.rotation.z")
|
let rotationAnim = CABasicAnimation(keyPath: "transform.rotation.z")
|
||||||
// 2.设置动画属性
|
// 2.设置动画属性
|
||||||
rotationAnim.fromValue = 0 // 开始角度
|
rotationAnim.fromValue = 0 // 开始角度
|
||||||
rotationAnim.toValue = Double.pi * 2 // 结束角度
|
rotationAnim.toValue = Double.pi * 2 // 结束角度
|
||||||
rotationAnim.repeatCount = 2 // 重复次数
|
rotationAnim.repeatCount = 2 // 重复次数
|
||||||
rotationAnim.duration = 0.5
|
rotationAnim.duration = 0.5
|
||||||
rotationAnim.autoreverses = false // 动画完成后自动重新开始,默认为NO
|
rotationAnim.autoreverses = false // 动画完成后自动重新开始,默认为NO
|
||||||
rotationAnim.isRemovedOnCompletion = true //默认是true,切换到其他控制器再回来,动画效果会消失,需要设置成false,动画就不会停了
|
rotationAnim.isRemovedOnCompletion = true //默认是true,切换到其他控制器再回来,动画效果会消失,需要设置成false,动画就不会停了
|
||||||
view.layer.add(rotationAnim, forKey: nil) // 给需要旋转的view增加动画
|
view.layer.add(rotationAnim, forKey: nil) // 给需要旋转的view增加动画
|
||||||
|
}
|
||||||
}
|
|
||||||
func requestData(){
|
func requestData(){
|
||||||
RequestGet(path: "voiceShow/listRandom", parma: ["gender":gender]) { data in
|
RequestGet(path: "voiceShow/listRandom", parma: ["gender":gender]) { data in
|
||||||
guard let dic = data as? [String : Any]else {
|
guard let dic = data as? [String : Any]else {
|
||||||
@@ -296,7 +310,6 @@ class HomeVoiceVC: BaseViewController,HiddenNavigationBarProtocol {
|
|||||||
let view:HomeVoicePlayMusicItemView = self.itemViewList[i]
|
let view:HomeVoicePlayMusicItemView = self.itemViewList[i]
|
||||||
let model = list[i]
|
let model = list[i]
|
||||||
view.model = model
|
view.model = model
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -308,8 +321,8 @@ class HomeVoiceVC: BaseViewController,HiddenNavigationBarProtocol {
|
|||||||
@objc func chooseItemAction(){
|
@objc func chooseItemAction(){
|
||||||
chooseItemVeiw.isChoose = !chooseItemVeiw.isChoose
|
chooseItemVeiw.isChoose = !chooseItemVeiw.isChoose
|
||||||
chooseTypeView.isHidden = !chooseItemVeiw.isChoose
|
chooseTypeView.isHidden = !chooseItemVeiw.isChoose
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var gender = ""
|
var gender = ""
|
||||||
private lazy var backgroundView:UIImageView = {
|
private lazy var backgroundView:UIImageView = {
|
||||||
let _backgroundView = UIImageView()
|
let _backgroundView = UIImageView()
|
||||||
@@ -347,8 +360,6 @@ class HomeVoiceVC: BaseViewController,HiddenNavigationBarProtocol {
|
|||||||
let _userInfoBtn = UIButton()
|
let _userInfoBtn = UIButton()
|
||||||
_userInfoBtn.setBackgroundImage(UIImage(named: "yin_home_voice_user_info_bg"), for: .normal)
|
_userInfoBtn.setBackgroundImage(UIImage(named: "yin_home_voice_user_info_bg"), for: .normal)
|
||||||
_userInfoBtn.setImage(UIImage(named: "yin_home_voice_user_info_icon"), for: .normal)
|
_userInfoBtn.setImage(UIImage(named: "yin_home_voice_user_info_icon"), for: .normal)
|
||||||
|
|
||||||
|
|
||||||
return _userInfoBtn
|
return _userInfoBtn
|
||||||
}()
|
}()
|
||||||
var chooseTypeView:HomeVoiceChooseTypeView = {
|
var chooseTypeView:HomeVoiceChooseTypeView = {
|
||||||
|
@@ -10,14 +10,24 @@ import Nuke
|
|||||||
|
|
||||||
|
|
||||||
typealias ClickPublishBlock = ()->Void
|
typealias ClickPublishBlock = ()->Void
|
||||||
|
typealias PlayVoiceEndBlock = ()->Void
|
||||||
|
|
||||||
|
|
||||||
class HomeVoicePublishView: UIView {
|
class HomeVoicePublishView: UIView {
|
||||||
var clickPublishBlock:ClickPublishBlock?
|
var clickPublishBlock:ClickPublishBlock?
|
||||||
|
var playVoiceEndBlock:PlayVoiceEndBlock?
|
||||||
|
|
||||||
|
var currentAngle: CGFloat = 0.0
|
||||||
|
|
||||||
override init(frame: CGRect) {
|
override init(frame: CGRect) {
|
||||||
super.init(frame: frame)
|
super.init(frame: frame)
|
||||||
setUILayout()
|
setUILayout()
|
||||||
|
loadSVGA()
|
||||||
|
|
||||||
|
let tap = UITapGestureRecognizer(target: self, action: #selector(publishViewAction))
|
||||||
|
publishView.addGestureRecognizer(tap)
|
||||||
}
|
}
|
||||||
|
|
||||||
func setUILayout(){
|
func setUILayout(){
|
||||||
addSubview(backgroundView)
|
addSubview(backgroundView)
|
||||||
addSubview(discView)
|
addSubview(discView)
|
||||||
@@ -56,42 +66,69 @@ class HomeVoicePublishView: UIView {
|
|||||||
make.height.equalTo(52)
|
make.height.equalTo(52)
|
||||||
make.right.equalTo(-20)
|
make.right.equalTo(-20)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func loadSVGA() {
|
||||||
discParser.parse(withNamed: "RecordPlayer", in: Bundle.main) {[weak self] videoItem in
|
discParser.parse(withNamed: "RecordPlayer", in: Bundle.main) {[weak self] videoItem in
|
||||||
|
guard let self else {
|
||||||
self?.discView.videoItem = videoItem
|
return
|
||||||
self?.discView.loops = 100000;
|
}
|
||||||
self?.discView.clearsAfterStop = false
|
self.discView.videoItem = videoItem
|
||||||
|
self.discView.loops = 100000;
|
||||||
|
self.discView.clearsAfterStop = false
|
||||||
} failureBlock: { error in
|
} failureBlock: { error in
|
||||||
|
|
||||||
}
|
}
|
||||||
publishParser.parse(withNamed: "PublishVoice", in: Bundle.main) {[weak self] videoItem in
|
publishParser.parse(withNamed: "PublishVoice", in: Bundle.main) {[weak self] videoItem in
|
||||||
|
guard let self else {
|
||||||
self?.publishView.videoItem = videoItem
|
return
|
||||||
self?.publishView.loops = 100000;
|
}
|
||||||
self?.publishView.startAnimation()
|
self.publishView.videoItem = videoItem
|
||||||
|
self.publishView.loops = 100000;
|
||||||
|
self.publishView.startAnimation()
|
||||||
} failureBlock: { error in
|
} failureBlock: { error in
|
||||||
|
|
||||||
}
|
}
|
||||||
let tap = UITapGestureRecognizer(target: self, action: #selector(publishViewAction))
|
|
||||||
publishView.addGestureRecognizer(tap)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
required init?(coder: NSCoder) {
|
required init?(coder: NSCoder) {
|
||||||
fatalError("init(coder:) has not been implemented")
|
fatalError("init(coder:) has not been implemented")
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc func publishViewAction(){
|
@objc func publishViewAction(){
|
||||||
guard let _clickPublishBlock = self.clickPublishBlock else {
|
guard let _clickPublishBlock = self.clickPublishBlock else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
_clickPublishBlock()
|
_clickPublishBlock()
|
||||||
if playBtn.isSelected{
|
if playBtn.isSelected {
|
||||||
discView.stopAnimation()
|
discView.stopAnimation()
|
||||||
playBtn.isSelected = false
|
playBtn.isSelected = false
|
||||||
PlayVoiceManager.shared.stopPlayVoice()
|
PlayVoiceManager.shared.stopPlayVoice()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func playAvatarAnimation() {
|
||||||
|
let rotation = CABasicAnimation(keyPath: "transform.rotation")
|
||||||
|
rotation.fromValue = currentAngle
|
||||||
|
rotation.toValue = currentAngle + Double.pi * 2
|
||||||
|
rotation.duration = 4
|
||||||
|
rotation.repeatCount = Float.infinity
|
||||||
|
avatarView.layer.add(rotation, forKey: "rotationAnimation")
|
||||||
|
}
|
||||||
|
|
||||||
|
func stopAvatarAnimation() {
|
||||||
|
if let presentationLayer = avatarView.layer.presentation() {
|
||||||
|
let currentTransform = presentationLayer.transform
|
||||||
|
// 移除动画
|
||||||
|
avatarView.layer.removeAnimation(forKey: "rotationAnimation")
|
||||||
|
// 应用当前状态
|
||||||
|
avatarView.layer.transform = currentTransform
|
||||||
|
currentAngle = atan2(currentTransform.m12, currentTransform.m11)
|
||||||
|
} else {
|
||||||
|
avatarView.layer.removeAnimation(forKey: "rotationAnimation")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@objc func playBtnAction(){
|
@objc func playBtnAction(){
|
||||||
guard let _model = self.model else {
|
guard let _model = self.model else {
|
||||||
HUDTool.show(with: "把头像拖至唱片机才可播放")
|
HUDTool.show(with: "把头像拖至唱片机才可播放")
|
||||||
@@ -101,9 +138,11 @@ class HomeVoicePublishView: UIView {
|
|||||||
if (self.playBtn.isSelected){
|
if (self.playBtn.isSelected){
|
||||||
discView.startAnimation()
|
discView.startAnimation()
|
||||||
PlayVoiceManager.shared.downloadVoice(url: _model.userVoice)
|
PlayVoiceManager.shared.downloadVoice(url: _model.userVoice)
|
||||||
|
playAvatarAnimation()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
discView.stopAnimation()
|
discView.stopAnimation()
|
||||||
|
stopAvatarAnimation()
|
||||||
PlayVoiceManager.shared.stopPlayVoice()
|
PlayVoiceManager.shared.stopPlayVoice()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,6 +150,7 @@ class HomeVoicePublishView: UIView {
|
|||||||
avatarView.image = nil
|
avatarView.image = nil
|
||||||
model = nil
|
model = nil
|
||||||
discView.stopAnimation()
|
discView.stopAnimation()
|
||||||
|
stopAvatarAnimation()
|
||||||
PlayVoiceManager.shared.stopPlayVoice()
|
PlayVoiceManager.shared.stopPlayVoice()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -173,6 +213,7 @@ class HomeVoicePublishView: UIView {
|
|||||||
}
|
}
|
||||||
Nuke.loadImage(with: _model.avatar, into:avatarView)
|
Nuke.loadImage(with: _model.avatar, into:avatarView)
|
||||||
discView.startAnimation()
|
discView.startAnimation()
|
||||||
|
playAvatarAnimation()
|
||||||
PlayVoiceManager.shared.downloadVoice(url: _model.userVoice)
|
PlayVoiceManager.shared.downloadVoice(url: _model.userVoice)
|
||||||
playBtn.isSelected = true
|
playBtn.isSelected = true
|
||||||
}
|
}
|
||||||
|
@@ -10,10 +10,12 @@ import Nuke
|
|||||||
|
|
||||||
|
|
||||||
typealias ClickBtnBlock = (_ type: Int ,_ uid:String)->Void
|
typealias ClickBtnBlock = (_ type: Int ,_ uid:String)->Void
|
||||||
|
typealias FollowBlockType = (_ isFollow: Bool, _ value: Int) -> Void
|
||||||
|
|
||||||
class HomeVoiceUserInfoView: UIView {
|
class HomeVoiceUserInfoView: UIView {
|
||||||
var clickBtnBlock:ClickBtnBlock?
|
var clickBtnBlock:ClickBtnBlock?
|
||||||
|
var followActionBlock: FollowBlockType?
|
||||||
|
|
||||||
override init(frame: CGRect) {
|
override init(frame: CGRect) {
|
||||||
super.init(frame: frame)
|
super.init(frame: frame)
|
||||||
setUILayout()
|
setUILayout()
|
||||||
@@ -151,7 +153,6 @@ class HomeVoiceUserInfoView: UIView {
|
|||||||
if let _clickBtnBlock = clickBtnBlock,let uid = self.model?.uid{
|
if let _clickBtnBlock = clickBtnBlock,let uid = self.model?.uid{
|
||||||
_clickBtnBlock(3,"\(uid)")
|
_clickBtnBlock(3,"\(uid)")
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
self.attentionBtn.isSelected = !self.attentionBtn.isSelected
|
self.attentionBtn.isSelected = !self.attentionBtn.isSelected
|
||||||
@@ -160,14 +161,20 @@ class HomeVoiceUserInfoView: UIView {
|
|||||||
guard let getUid = uid else{return}
|
guard let getUid = uid else{return}
|
||||||
let params = ["uid":"\(AuthManager.userUid)","ticket":AuthManager.ticket,"type":type,"likedUid":"\(getUid)"] as [String : Any]
|
let params = ["uid":"\(AuthManager.userUid)","ticket":AuthManager.ticket,"type":type,"likedUid":"\(getUid)"] as [String : Any]
|
||||||
|
|
||||||
RequestPost(path: "fans/like", parma: params) { data in
|
RequestPost(path: "fans/like", parma: params) { [weak self] data in
|
||||||
|
guard let self else { return }
|
||||||
|
if let _followAction = followActionBlock {
|
||||||
|
_followAction(self.attentionBtn.isSelected, 1)
|
||||||
|
}
|
||||||
|
|
||||||
if(self.attentionBtn.isSelected){
|
if(self.attentionBtn.isSelected){
|
||||||
HUDTool.show(with: "关注成功")
|
HUDTool.show(with: "关注成功")
|
||||||
}else{
|
}else{
|
||||||
HUDTool.show(with: "取消关注成功")
|
HUDTool.show(with: "取消关注成功")
|
||||||
}
|
}
|
||||||
} fail: { code, data in
|
} fail: { code, data in
|
||||||
|
self.attentionBtn.isSelected = !self.attentionBtn.isSelected
|
||||||
|
HUDTool.show(with: data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@objc func chatBtnAction(){
|
@objc func chatBtnAction(){
|
||||||
|
@@ -19,8 +19,10 @@ class UserPayViewController: BaseViewController, HiddenNavigationBarProtocol{
|
|||||||
}
|
}
|
||||||
|
|
||||||
func requestData(){
|
func requestData(){
|
||||||
RequestGet(path: "chargeprod/list", parma: ["channelType":"8"]) { data in
|
RequestGet(path: "chargeprod/list", parma: ["channelType":"8"]) { [weak self] data in
|
||||||
|
guard let self else {
|
||||||
|
return
|
||||||
|
}
|
||||||
if let list = Deserialized<UserPayViewModel>.toArray(with: data) {
|
if let list = Deserialized<UserPayViewModel>.toArray(with: data) {
|
||||||
for (i,view) in self.viewList.enumerated() {
|
for (i,view) in self.viewList.enumerated() {
|
||||||
if i < list.count{
|
if i < list.count{
|
||||||
@@ -31,15 +33,15 @@ class UserPayViewController: BaseViewController, HiddenNavigationBarProtocol{
|
|||||||
}else{
|
}else{
|
||||||
view.isHidden = true
|
view.isHidden = true
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} fail: { code, data in
|
} fail: { code, data in
|
||||||
print(code)
|
print(code)
|
||||||
}
|
}
|
||||||
RequestGet(path: "purse/query", parma: ["channelType":"8"]) { data in
|
RequestGet(path: "purse/query", parma: ["channelType":"8"]) { [weak self] data in
|
||||||
|
guard let self else {
|
||||||
|
return
|
||||||
|
}
|
||||||
if let model = Deserialized<UserPayViewModel>.toModel(with: data) {
|
if let model = Deserialized<UserPayViewModel>.toModel(with: data) {
|
||||||
self.pricView.text = model.diamonds
|
self.pricView.text = model.diamonds
|
||||||
}
|
}
|
||||||
@@ -160,6 +162,7 @@ class UserPayViewController: BaseViewController, HiddenNavigationBarProtocol{
|
|||||||
let y = publishBtn.y + publishBtn.frame.height
|
let y = publishBtn.y + publishBtn.frame.height
|
||||||
self.scrollView.contentSize = CGSize(width: ScreenWidth, height: y)
|
self.scrollView.contentSize = CGSize(width: ScreenWidth, height: y)
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc func publishBtnAction(){
|
@objc func publishBtnAction(){
|
||||||
guard let chargeProdId = self.chooseModel?.chargeProdId else{
|
guard let chargeProdId = self.chooseModel?.chargeProdId else{
|
||||||
return
|
return
|
||||||
@@ -169,65 +172,65 @@ class UserPayViewController: BaseViewController, HiddenNavigationBarProtocol{
|
|||||||
let ticket = AuthManager.ticket
|
let ticket = AuthManager.ticket
|
||||||
let deviceInfo = UIDevice.current.identifierForVendor?.uuidString ?? ""
|
let deviceInfo = UIDevice.current.identifierForVendor?.uuidString ?? ""
|
||||||
let clientIp = "0.0.0.0"
|
let clientIp = "0.0.0.0"
|
||||||
RequestPost(path: "storeKitV2/placeOrder", parma: ["chargeProdId":chargeProdId,"uid":uid,"ticket":ticket,"deviceInfo":deviceInfo]) { data in
|
RequestPost(path: "storeKitV2/placeOrder", parma: ["chargeProdId":chargeProdId,"uid":uid,"ticket":ticket,"deviceInfo":deviceInfo]) { [weak self] data in
|
||||||
|
guard let self else {
|
||||||
|
return
|
||||||
|
}
|
||||||
if let _data = data as? [String:Any],let recordId = _data["recordId"] as? String,let appAccountToken = _data["appAccountToken"] as? String{
|
if let _data = data as? [String:Any],let recordId = _data["recordId"] as? String,let appAccountToken = _data["appAccountToken"] as? String{
|
||||||
self.initiatePaymentAction(recordId: recordId, appAccountToken: appAccountToken)
|
self.initiatePaymentAction(recordId: recordId, appAccountToken: appAccountToken)
|
||||||
}else{
|
}else{
|
||||||
HUDTool.show(with: "购买失败")
|
HUDTool.show(with: "购买失败")
|
||||||
MBProgressHUD.hide(for: keyWindow, animated: true)
|
MBProgressHUD.hide(for: keyWindow, animated: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} fail: { code, data in
|
} fail: { code, data in
|
||||||
HUDTool.show(with: data)
|
HUDTool.show(with: data)
|
||||||
MBProgressHUD.hide(for: keyWindow, animated: true)
|
MBProgressHUD.hide(for: keyWindow, animated: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
deinit{
|
deinit{
|
||||||
NotificationCenter.default.removeObserver(self)
|
NotificationCenter.default.removeObserver(self)
|
||||||
}
|
}
|
||||||
|
|
||||||
func initiatePaymentAction(recordId:String,appAccountToken:String) {
|
func initiatePaymentAction(recordId:String,appAccountToken:String) {
|
||||||
self.orderId = recordId
|
self.orderId = recordId
|
||||||
if #available(iOS 15.0, *) {
|
if #available(iOS 15.0, *) {
|
||||||
UserPayViewManager.shared._ConditionBlock = {[weak self] (state , result) in
|
UserPayViewManager.shared._ConditionBlock = {[weak self] (state , result) in
|
||||||
if state == .Pay || state == .Start || state == .VerifiedServer{
|
guard let self else {
|
||||||
ScreenWidth
|
return
|
||||||
}else if state == .Unowned{
|
|
||||||
HUDTool.show(with: "出现未知错误,请重新尝试")
|
|
||||||
MBProgressHUD.hide(for: keyWindow , animated: true)
|
|
||||||
}else{
|
|
||||||
HUDTool.show(with: "购买失败")
|
|
||||||
MBProgressHUD.hide(for: keyWindow, animated: true)
|
|
||||||
}
|
}
|
||||||
if state == .VerifiedServer{
|
DispatchQueue.main.async {
|
||||||
|
if state == .Pay || state == .Start || state == .VerifiedServer{
|
||||||
|
// ScreenWidth
|
||||||
if let data = result,let transactionId = data["transactionId"]{
|
}else if state == .Unowned{
|
||||||
self?.paySuccess(transactionId:"\(transactionId)")
|
HUDTool.show(with: "出现未知错误,请重新尝试")
|
||||||
|
MBProgressHUD.hide(for: keyWindow , animated: true)
|
||||||
}else{
|
}else{
|
||||||
HUDTool.show(with: "购买失败")
|
HUDTool.show(with: "购买失败")
|
||||||
MBProgressHUD.hide(for: keyWindow, animated: true)
|
MBProgressHUD.hide(for: keyWindow, animated: true)
|
||||||
}
|
}
|
||||||
|
if state == .VerifiedServer{
|
||||||
|
if let data = result,let transactionId = data["transactionId"]{
|
||||||
|
self.paySuccess(transactionId:"\(transactionId)")
|
||||||
|
}else{
|
||||||
|
HUDTool.show(with: "购买失败")
|
||||||
|
MBProgressHUD.hide(for: keyWindow, animated: true)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Task {
|
Task {
|
||||||
do {
|
do {
|
||||||
try await UserPayViewManager.shared._demandCommodityThing(productId: self.chooseModel?.chargeProdId ?? "", uuid: appAccountToken)
|
try await UserPayViewManager.shared._demandCommodityThing(productId: self.chooseModel?.chargeProdId ?? "", uuid: appAccountToken)
|
||||||
|
|
||||||
}catch{
|
}catch{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
HUDTool.show(with: "充值失败。当前仅支持运行iOS15及以上系统的手机进行充值,请升级系统版本后重试。")
|
HUDTool.show(with: "充值失败。当前仅支持运行iOS15及以上系统的手机进行充值,请升级系统版本后重试。")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func paySuccess(transactionId:String){
|
func paySuccess(transactionId:String){
|
||||||
let uid = "\(AuthManager.userUid)"
|
let uid = "\(AuthManager.userUid)"
|
||||||
let ticket = AuthManager.ticket
|
let ticket = AuthManager.ticket
|
||||||
@@ -236,33 +239,28 @@ class UserPayViewController: BaseViewController, HiddenNavigationBarProtocol{
|
|||||||
|
|
||||||
if #available(iOS 15.0, *) {
|
if #available(iOS 15.0, *) {
|
||||||
Task {
|
Task {
|
||||||
try await UserPayViewManager.shared._verifyBusinessAccomplish(transaction: transactionId)
|
await UserPayViewManager.shared._verifyBusinessAccomplish(transaction: transactionId)
|
||||||
self.orderId = ""
|
self.orderId = ""
|
||||||
RequestGet(path: "purse/query", parma: ["channelType":"8"]) { data in
|
RequestGet(path: "purse/query", parma: ["channelType":"8"]) { [weak self] data in
|
||||||
|
guard let self else {
|
||||||
|
return
|
||||||
|
}
|
||||||
if let model = Deserialized<UserPayViewModel>.toModel(with: data) {
|
if let model = Deserialized<UserPayViewModel>.toModel(with: data) {
|
||||||
self.pricView.text = model.diamonds
|
self.pricView.text = model.diamonds
|
||||||
}
|
}
|
||||||
|
|
||||||
} fail: { code, data in
|
} fail: { code, data in
|
||||||
print(code)
|
print(code)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} fail: { code, data in
|
} fail: { code, data in
|
||||||
if code == 1444{
|
if code == 1444{
|
||||||
Task {
|
Task {
|
||||||
if #available(iOS 15.0, *) {
|
if #available(iOS 15.0, *) {
|
||||||
try await UserPayViewManager.shared._verifyBusinessAccomplish(transaction: transactionId)
|
await UserPayViewManager.shared._verifyBusinessAccomplish(transaction: transactionId)
|
||||||
} else {
|
} else {
|
||||||
// Fallback on earlier versions
|
// Fallback on earlier versions
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
HUDTool.show(with: data)
|
HUDTool.show(with: data)
|
||||||
|
@@ -15,28 +15,20 @@ class PlanetStarVC: BaseViewController,HiddenNavigationBarProtocol {
|
|||||||
super.viewDidLoad()
|
super.viewDidLoad()
|
||||||
yin_initUI()
|
yin_initUI()
|
||||||
requestData()
|
requestData()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func requestData(){
|
func requestData(){
|
||||||
|
|
||||||
RequestGet(path: "home/recommendUsers", parma: ["pageNum":"\(self.page)","pageSize":"60"]) { data in
|
RequestGet(path: "home/recommendUsers", parma: ["pageNum":"\(self.page)","pageSize":"60"]) { data in
|
||||||
if let list = Deserialized<PlanetStarModel>.toArray(with: data) {
|
if let list = Deserialized<PlanetStarModel>.toArray(with: data) {
|
||||||
var dataList:[PlanetStarModel] = []
|
var dataList:[PlanetStarModel] = []
|
||||||
guard list.isEmpty else {
|
guard list.isEmpty else {
|
||||||
|
|
||||||
for i in 0..<12 {
|
for i in 0..<12 {
|
||||||
if i < list.count{
|
if i < list.count{
|
||||||
dataList.append(list[i])
|
dataList.append(list[i])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
self.dataArray = dataList
|
self.dataArray = dataList
|
||||||
|
|
||||||
self.dealWithViewData()
|
self.dealWithViewData()
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
self.page = 1
|
self.page = 1
|
||||||
@@ -52,19 +44,13 @@ class PlanetStarVC: BaseViewController,HiddenNavigationBarProtocol {
|
|||||||
} fail: { code, data in
|
} fail: { code, data in
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func dealWithViewData(){
|
func dealWithViewData(){
|
||||||
self.bgRadiusView.dataList = dataArray
|
self.bgRadiusView.dataList = dataArray
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private func yin_initUI(){
|
private func yin_initUI(){
|
||||||
|
|
||||||
view.addSubview(backgroundView)
|
view.addSubview(backgroundView)
|
||||||
view.addSubview(bgRadiusView)
|
view.addSubview(bgRadiusView)
|
||||||
bgRadiusView.frame = self.view.frame
|
bgRadiusView.frame = self.view.frame
|
||||||
@@ -74,7 +60,6 @@ class PlanetStarVC: BaseViewController,HiddenNavigationBarProtocol {
|
|||||||
make.edges.equalTo(self.view)
|
make.edges.equalTo(self.view)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bgRadiusView.refreshBlcok = {[weak self] (uid,type,name) in
|
bgRadiusView.refreshBlcok = {[weak self] (uid,type,name) in
|
||||||
if type == 0{
|
if type == 0{
|
||||||
self?.page = (self?.page ?? 1) + 1
|
self?.page = (self?.page ?? 1) + 1
|
||||||
@@ -123,6 +108,7 @@ class PlanetStarVC: BaseViewController,HiddenNavigationBarProtocol {
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let popUpView = PlanetStarPopUpView.init(frame: CGRect(x: 0, y: 0, width: ScreenWidth, height: ScreenHeight))
|
let popUpView = PlanetStarPopUpView.init(frame: CGRect(x: 0, y: 0, width: ScreenWidth, height: ScreenHeight))
|
||||||
self?.view.addSubview(popUpView)
|
self?.view.addSubview(popUpView)
|
||||||
popUpView.textView.text = text
|
popUpView.textView.text = text
|
||||||
@@ -159,14 +145,10 @@ class PlanetStarVC: BaseViewController,HiddenNavigationBarProtocol {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func showPayVC(){
|
func showPayVC(){
|
||||||
let popUpView = PlanetStarPopUpView.init(frame: CGRect(x: 0, y: 0, width: ScreenWidth, height: ScreenHeight))
|
let popUpView = PlanetStarPopUpView.init(frame: CGRect(x: 0, y: 0, width: ScreenWidth, height: ScreenHeight))
|
||||||
self.view.addSubview(popUpView)
|
self.view.addSubview(popUpView)
|
||||||
@@ -178,8 +160,8 @@ class PlanetStarVC: BaseViewController,HiddenNavigationBarProtocol {
|
|||||||
let vc = UserPayViewController()
|
let vc = UserPayViewController()
|
||||||
self?.navigationController?.pushViewController(vc, animated: true)
|
self?.navigationController?.pushViewController(vc, animated: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let activityView:UIActivityIndicatorView = UIActivityIndicatorView(style: .medium)
|
let activityView:UIActivityIndicatorView = UIActivityIndicatorView(style: .medium)
|
||||||
var giftModel:PlanetStarModel?
|
var giftModel:PlanetStarModel?
|
||||||
private lazy var backgroundView:UIImageView = {
|
private lazy var backgroundView:UIImageView = {
|
||||||
@@ -188,6 +170,7 @@ class PlanetStarVC: BaseViewController,HiddenNavigationBarProtocol {
|
|||||||
_backgroundView.isUserInteractionEnabled = true
|
_backgroundView.isUserInteractionEnabled = true
|
||||||
return _backgroundView
|
return _backgroundView
|
||||||
}()
|
}()
|
||||||
|
|
||||||
private var bgRadiusView:PlanetStarClickItemView = {
|
private var bgRadiusView:PlanetStarClickItemView = {
|
||||||
|
|
||||||
let _bgRadiusView = PlanetStarClickItemView.init(frame: CGRect(x: 0, y: 0, width: ScreenWidth , height: ScreenHeight))
|
let _bgRadiusView = PlanetStarClickItemView.init(frame: CGRect(x: 0, y: 0, width: ScreenWidth , height: ScreenHeight))
|
||||||
@@ -196,8 +179,6 @@ class PlanetStarVC: BaseViewController,HiddenNavigationBarProtocol {
|
|||||||
}()
|
}()
|
||||||
|
|
||||||
private var dataArray:[PlanetStarModel] = []
|
private var dataArray:[PlanetStarModel] = []
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -397,7 +397,7 @@ class YinUserInfoHeadView: UIView{
|
|||||||
}()
|
}()
|
||||||
private lazy var arrowView:UIButton = {
|
private lazy var arrowView:UIButton = {
|
||||||
let _arrowView = UIButton.getCustomBtn(image: UIImage(named: "yin_mine_header_arrow"))
|
let _arrowView = UIButton.getCustomBtn(image: UIImage(named: "yin_mine_header_arrow"))
|
||||||
|
_arrowView.isHidden = true
|
||||||
return _arrowView
|
return _arrowView
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
47
yinmeng-ios/PrivacyInfo.xcprivacy
Normal file
47
yinmeng-ios/PrivacyInfo.xcprivacy
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>NSPrivacyTracking</key>
|
||||||
|
<false/>
|
||||||
|
<key>NSPrivacyCollectedDataTypes</key>
|
||||||
|
<array/>
|
||||||
|
<key>NSPrivacyTrackingDomains</key>
|
||||||
|
<array/>
|
||||||
|
<key>NSPrivacyAccessedAPITypes</key>
|
||||||
|
<array>
|
||||||
|
<dict>
|
||||||
|
<key>NSPrivacyAccessedAPIType</key>
|
||||||
|
<string>NSPrivacyAccessedAPICategorySystemBootTime</string>
|
||||||
|
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||||
|
<array>
|
||||||
|
<string>35F9.1</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>NSPrivacyAccessedAPIType</key>
|
||||||
|
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
|
||||||
|
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||||
|
<array>
|
||||||
|
<string>E174.1</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>NSPrivacyAccessedAPIType</key>
|
||||||
|
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
|
||||||
|
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||||
|
<array>
|
||||||
|
<string>C617.1</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
<dict>
|
||||||
|
<key>NSPrivacyAccessedAPIType</key>
|
||||||
|
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
|
||||||
|
<key>NSPrivacyAccessedAPITypeReasons</key>
|
||||||
|
<array>
|
||||||
|
<string>CA92.1</string>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</array>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
Reference in New Issue
Block a user