Commit 3fc6fb44 by ludi

完成line登录

parent 68b1d15e
......@@ -383,11 +383,11 @@ static const NSString *FUSCidUDKey = @"FUSCidUDKey";
#pragma mark - 第三方登录相关配置
@implementation FUSFuSiWebThirdLoginConfig
+ (void)fus_updateThirdLoginConfig:(void(^__nullable)(void))succeed failure:(void(^__nullable)(NSString *msg, int code))failure {
- (void)fus_updateThirdLoginConfig:(void(^__nullable)(void))succeed failure:(void(^__nullable)(NSString *msg, int code))failure {
[FUSCommonHttpRequest fus_requestOpenInitConfigsWithSuccess:^(NSDictionary *dataDict, int code) {
[self fus_updateAppiconWithDict:dataDict];
[FUSFuSiWebThirdLoginConfig fus_updateAppiconWithDict:dataDict];
if (dataDict[@"twitterUrl"]) {
FUSConfig.sharedInstanced.webLoginConfig.twitterUrl = dataDict[@"twitterUrl"];
......
......@@ -292,7 +292,8 @@ NSString * const FUSSocializedIsSafariLoginKey = @"FUSSocializedIsSafariLoginKey
{
if (facebookFromWeb) {
NSString *webUrl = [[NSUserDefaults standardUserDefaults] objectForKey:FUSConfig.sharedInstanced.webLoginConfig.lineUrl];
// NSString *webUrl = [[NSUserDefaults standardUserDefaults] objectForKey:FUSConfig.sharedInstanced.webLoginConfig.lineUrl];
NSString *webUrl = FUSConfig.sharedInstanced.webLoginConfig.lineUrl;
if (![NSString isNull:webUrl]) {
NSURL *url = [NSURL URLWithString:webUrl];
if ([[UIApplication sharedApplication] canOpenURL:url]) {
......@@ -320,7 +321,8 @@ NSString * const FUSSocializedIsSafariLoginKey = @"FUSSocializedIsSafariLoginKey
case FUSSocializedPlatformGoogle:
{
if (facebookFromWeb) {
NSString *webUrl = [[NSUserDefaults standardUserDefaults] objectForKey:FUSConfig.sharedInstanced.webLoginConfig.googleUrl];
// NSString *webUrl = [[NSUserDefaults standardUserDefaults] objectForKey:FUSConfig.sharedInstanced.webLoginConfig.googleUrl];
NSString *webUrl = FUSConfig.sharedInstanced.webLoginConfig.googleUrl;
if (![NSString isNull:webUrl]) {
NSURL *url = [NSURL URLWithString:webUrl];
if ([[UIApplication sharedApplication] canOpenURL:url]) {
......@@ -349,7 +351,8 @@ NSString * const FUSSocializedIsSafariLoginKey = @"FUSSocializedIsSafariLoginKey
{
if (facebookFromWeb) {
NSString *webUrl = [[NSUserDefaults standardUserDefaults] objectForKey:FUSConfig.sharedInstanced.webLoginConfig.twitterUrl];
// NSString *webUrl = [[NSUserDefaults standardUserDefaults] objectForKey:FUSConfig.sharedInstanced.webLoginConfig.twitterUrl];
NSString *webUrl = FUSConfig.sharedInstanced.webLoginConfig.twitterUrl;
if (![NSString isNull:webUrl]) {
NSURL *url = [NSURL URLWithString:webUrl];
if ([[UIApplication sharedApplication] canOpenURL:url]) {
......@@ -410,7 +413,8 @@ NSString * const FUSSocializedIsSafariLoginKey = @"FUSSocializedIsSafariLoginKey
case FUSSocializedPlatformFacebook:
{
if (facebookFromWeb) {
NSString *webUrl = [[NSUserDefaults standardUserDefaults] objectForKey:FUSConfig.sharedInstanced.webLoginConfig.facebookUrl];
// NSString *webUrl = [[NSUserDefaults standardUserDefaults] objectForKey:FUSConfig.sharedInstanced.webLoginConfig.facebookUrl];
NSString *webUrl = FUSConfig.sharedInstanced.webLoginConfig.facebookUrl;
if (![NSString isNull:webUrl]) {
NSURL *url = [NSURL URLWithString:webUrl];
if ([[UIApplication sharedApplication] canOpenURL:url]) {
......@@ -469,7 +473,7 @@ NSString * const FUSSocializedIsSafariLoginKey = @"FUSSocializedIsSafariLoginKey
- (void)fus_requestWebLoginUrlWithPlatform:(FUSSocializedPlatform)platform {
[FUSWebThirdLoginConfig fus_updateThirdLoginConfig:^{
[FUSConfig.sharedInstanced.webLoginConfig fus_updateThirdLoginConfig:^{
[self fus_loginWithPlatform:platform facebookFromWeb:YES viewController:self.viewController loadingFinish:self.finishLoading success:self.loginSuccess failure:self.loginFailure];
} failure:^(NSString *msg, int code) {
if (self.loginFailure) {
......
......@@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
/// google注册登录H5地址
@property (nonatomic, copy) NSString *googleUrl;
+ (void)fus_updateThirdLoginConfig:(void(^__nullable)(void))succeed failure:(void(^__nullable)(NSString *msg, int code))failure;
- (void)fus_updateThirdLoginConfig:(void(^__nullable)(void))succeed failure:(void(^__nullable)(NSString *msg, int code))failure;
@end
......
......@@ -484,7 +484,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = FuSiLive/FuSiLive.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 2025040105;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 6GG26BHUMC;
ENABLE_ON_DEMAND_RESOURCES = NO;
......@@ -752,7 +752,7 @@
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_ENTITLEMENTS = FuSiLive/FuSiLive.entitlements;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 5;
CURRENT_PROJECT_VERSION = 2025040105;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = 6GG26BHUMC;
ENABLE_ON_DEMAND_RESOURCES = NO;
......
......@@ -74,7 +74,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>5</string>
<string>2025040105</string>
<key>FacebookAdvertiserIDCollectionEnabled</key>
<true/>
<key>FacebookAppID</key>
......
......@@ -7,12 +7,12 @@
<key>FUSChatCenterBundle.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>75</integer>
<integer>74</integer>
</dict>
<key>FUSChatCenterModule.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>76</integer>
<integer>72</integer>
</dict>
</dict>
</dict>
......
......@@ -7,12 +7,12 @@
<key>FUSShowRoomBundle.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>72</integer>
<integer>78</integer>
</dict>
<key>FUSShowRoomModule.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>74</integer>
<integer>73</integer>
</dict>
</dict>
</dict>
......
......@@ -7,7 +7,7 @@
<key>FUSUserCenterModule.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>78</integer>
<integer>75</integer>
</dict>
<key>FUSUserCenterModuleBundle.xcscheme_^#shared#^_</key>
<dict>
......
......@@ -132,7 +132,7 @@
// 更新閃屏圖片
[FUSCommonCacheOperate getSplashImageUrlWithSuccess:nil failure:nil];
[FUSWebThirdLoginConfig fus_updateThirdLoginConfig:nil failure:nil];
[FUSConfig.sharedInstanced.webLoginConfig fus_updateThirdLoginConfig:nil failure:nil];
[self performSelector:@selector(fus_onClickSkip) withObject:nil afterDelay:2];
......@@ -427,14 +427,6 @@
[self.bgImageView addGestureRecognizer:tap];
}
//- (IBAction)onClickLineLogin:(UIButton *)sender {
// // Fire base 统计
//// [FIRAnalytics logEventWithName:@"join_group" parameters:@{@"group_id":@"line"}];
// [self socialLoginWithPlatform:FUSSocializedPlatformLine];
//
// [self fus_hideLoginFailView];
//}
// 注册按钮点击事件
- (IBAction)onRegisterButtonAction:(UIButton *)sender {
FUSMessageRegisterViewController *registViewCtrl = [[FUSMessageRegisterViewController alloc] init];
......@@ -461,6 +453,15 @@
[self fus_hideLoginFailView];
}
/// line登录
- (IBAction)onClickLineLogin:(UIButton *)sender {
// Fire base 统计
// [FIRAnalytics logEventWithName:@"join_group" parameters:@{@"group_id":@"line"}];
[self socialLoginWithPlatform:FUSSocializedPlatformLine];
[self fus_hideLoginFailView];
}
/**
点击手机号码登录
*/
......@@ -486,16 +487,16 @@
[self fus_hideLoginFailView];
}
///**
// 点击 Twitter 登录
// */
//- (IBAction)onClickTwitterLogin:(UIButton *)sender {
//
//// [FIRAnalytics logEventWithName:@"join_group" parameters:@{@"group_id":@"twitter"}];
// [self socialLoginWithPlatform:FUSSocializedPlatformTwitter];
//
// [self fus_hideLoginFailView];
//}
/**
点击 Twitter 登录
*/
- (IBAction)onClickTwitterLogin:(UIButton *)sender {
// [FIRAnalytics logEventWithName:@"join_group" parameters:@{@"group_id":@"twitter"}];
[self socialLoginWithPlatform:FUSSocializedPlatformTwitter];
[self fus_hideLoginFailView];
}
/**
点击 Google 登录
......@@ -710,7 +711,7 @@
{
requestPlatform = PlatformLine;
sign = signLine;
loginFromWeb = YES;
// loginFromWeb = YES;
}
break;
case FUSSocializedPlatformApple:
......
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="32700.99.1234" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="23504" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina5_5" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22685"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="23506"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
......@@ -53,7 +53,7 @@
</constraints>
</imageView>
<button hidden="YES" opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qTr-e3-gD2">
<rect key="frame" x="228.66666666666663" y="696.66666666666663" width="70" height="20"/>
<rect key="frame" x="226.66666666666663" y="696.66666666666663" width="68" height="20"/>
<constraints>
<constraint firstAttribute="height" constant="20" id="mEU-T9-RNI"/>
</constraints>
......@@ -66,7 +66,7 @@
</connections>
</button>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="当您注册时表示您已同意" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="m7f-da-Ehu">
<rect key="frame" x="100" y="700" width="124" height="14"/>
<rect key="frame" x="102" y="700" width="120.33333333333331" height="14"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" systemColor="lightTextColor"/>
......@@ -182,14 +182,40 @@
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="32" id="iwm-Pd-MoS"/>
</constraints>
</imageView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vYh-F2-uDj">
<rect key="frame" x="82" y="625" width="50" height="50"/>
<constraints>
<constraint firstAttribute="height" constant="50" id="nDl-9q-2VW"/>
<constraint firstAttribute="width" constant="50" id="zc0-zQ-EKb"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" backgroundImage="fus_login_loginBtn_line_icon"/>
<connections>
<action selector="onClickLineLogin:" destination="-1" eventType="touchUpInside" id="0Xo-ih-wYc"/>
</connections>
</button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="wF5-8K-63w">
<rect key="frame" x="282" y="625" width="50" height="50"/>
<constraints>
<constraint firstAttribute="width" constant="50" id="JGo-Ta-jbz"/>
<constraint firstAttribute="height" constant="50" id="uJs-bo-7oU"/>
</constraints>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" backgroundImage="fus_login_loginBtn_twitter_icon"/>
<connections>
<action selector="onClickTwitterLogin:" destination="-1" eventType="touchUpInside" id="GM5-Ls-PJN"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="pvx-eB-2ck" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="0uk-pM-kv4"/>
<constraint firstItem="q6U-26-eHf" firstAttribute="width" secondItem="pvx-eB-2ck" secondAttribute="width" multiplier="297:414" id="137-1u-uIc"/>
<constraint firstItem="x1a-J8-Ftd" firstAttribute="leading" secondItem="vYh-F2-uDj" secondAttribute="trailing" constant="50" id="2b1-4c-TYi"/>
<constraint firstItem="NRV-h2-AbK" firstAttribute="centerY" secondItem="xsu-jg-Zmy" secondAttribute="centerY" id="5GL-4o-bEJ"/>
<constraint firstItem="xsu-jg-Zmy" firstAttribute="width" secondItem="pvx-eB-2ck" secondAttribute="width" multiplier="297:414" id="8kU-y4-EMC"/>
<constraint firstItem="hcU-4M-876" firstAttribute="bottom" secondItem="m7f-da-Ehu" secondAttribute="top" constant="-25" id="9pV-CQ-zoF"/>
<constraint firstItem="wF5-8K-63w" firstAttribute="leading" secondItem="x1a-J8-Ftd" secondAttribute="trailing" constant="50" id="C8O-ds-JNO"/>
<constraint firstItem="kUp-xF-NS0" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="DUE-uQ-rLg"/>
<constraint firstAttribute="bottom" secondItem="kUp-xF-NS0" secondAttribute="bottom" id="Eej-Sm-7vm"/>
<constraint firstItem="m7f-da-Ehu" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" constant="-45" id="FaA-b3-XNe"/>
......@@ -206,10 +232,12 @@
<constraint firstAttribute="trailing" secondItem="pvx-eB-2ck" secondAttribute="trailing" id="Up6-gt-5W0"/>
<constraint firstItem="uXi-X7-nYp" firstAttribute="leading" secondItem="dPn-tm-zWL" secondAttribute="leading" constant="-11" id="dMR-CW-Ko5"/>
<constraint firstItem="xsu-jg-Zmy" firstAttribute="top" secondItem="uXi-X7-nYp" secondAttribute="bottom" constant="14" id="dpB-ft-W4y"/>
<constraint firstItem="vYh-F2-uDj" firstAttribute="centerY" secondItem="x1a-J8-Ftd" secondAttribute="centerY" id="egz-o8-U5p"/>
<constraint firstItem="xsu-jg-Zmy" firstAttribute="leading" secondItem="NRV-h2-AbK" secondAttribute="leading" constant="-11" id="hZ5-yw-s1n"/>
<constraint firstAttribute="trailing" secondItem="kUp-xF-NS0" secondAttribute="trailing" id="l3l-MS-GYh"/>
<constraint firstItem="uXi-X7-nYp" firstAttribute="width" secondItem="pvx-eB-2ck" secondAttribute="width" multiplier="297:414" id="mTG-z1-caZ"/>
<constraint firstItem="saR-iT-17B" firstAttribute="centerY" secondItem="q6U-26-eHf" secondAttribute="centerY" id="qO2-jr-JfH"/>
<constraint firstItem="wF5-8K-63w" firstAttribute="centerY" secondItem="x1a-J8-Ftd" secondAttribute="centerY" id="r1f-GV-UBE"/>
<constraint firstItem="dPn-tm-zWL" firstAttribute="centerY" secondItem="uXi-X7-nYp" secondAttribute="centerY" id="tIi-Gd-ev4"/>
<constraint firstAttribute="bottom" secondItem="pvx-eB-2ck" secondAttribute="bottom" id="wcr-CS-HiY"/>
<constraint firstItem="xsu-jg-Zmy" firstAttribute="centerX" secondItem="pvx-eB-2ck" secondAttribute="centerX" id="z1c-Kv-hD4"/>
......@@ -221,7 +249,9 @@
<image name="fus_login_loginBtn_apple_icon" width="29.666666030883789" height="29.666666030883789"/>
<image name="fus_login_loginBtn_faceBook_icon" width="29" height="29"/>
<image name="fus_login_loginBtn_google_icon" width="28.666666030883789" height="28.666666030883789"/>
<image name="fus_login_loginBtn_line_icon" width="45" height="45.666667938232422"/>
<image name="fus_login_loginBtn_phone_icon" width="44.666667938232422" height="44.666667938232422"/>
<image name="fus_login_loginBtn_twitter_icon" width="44.666667938232422" height="44.666667938232422"/>
<systemColor name="lightTextColor">
<color white="1" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
......
......@@ -399,7 +399,7 @@
<key>SSZipArchive.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>73</integer>
<integer>76</integer>
</dict>
<key>SnapKit-SnapKit_Privacy.xcscheme</key>
<dict>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment