google 登录暂存
This commit is contained in:
parent
45b3ee5bbc
commit
58a8233697
@ -161,7 +161,7 @@ public class BannerController : MonoBehaviour
|
||||
right = GetSideIndex(false);
|
||||
if (center == -1 || left == -1 || right == -1 || animateLock) return;
|
||||
animateLock = true;
|
||||
DOTween.CompleteAll();
|
||||
if (leftse != null) leftse.Complete(true);
|
||||
DORight(itemList[left], itemList[center], itemList[right]);
|
||||
}
|
||||
void DORight(CanvasGroup left, CanvasGroup center, CanvasGroup right)
|
||||
@ -182,6 +182,7 @@ public class BannerController : MonoBehaviour
|
||||
se.Join(left.GetComponent<RectTransform>().DOScale(Vector3.one, 0.3f));
|
||||
se.Join(left.GetComponent<RectTransform>().DOLocalMoveX(0, 0.3f));
|
||||
se.Play().onComplete = ()=> { animateLock = false; };
|
||||
rightse = se;
|
||||
left.transform.SetAsLastSibling();
|
||||
//事件改变
|
||||
left.GetComponent<Button>().onClick.RemoveAllListeners();
|
||||
@ -196,6 +197,7 @@ public class BannerController : MonoBehaviour
|
||||
#else
|
||||
float offset = 43;
|
||||
#endif
|
||||
Sequence leftse, rightse;
|
||||
private void Left()
|
||||
{
|
||||
int center = GetCenterIndex(),
|
||||
@ -203,7 +205,7 @@ public class BannerController : MonoBehaviour
|
||||
right = GetSideIndex(false);
|
||||
if (center == -1 || left == -1 || right == -1|| animateLock) return;
|
||||
animateLock = true;
|
||||
DOTween.CompleteAll();
|
||||
if (rightse != null) rightse.Complete(true);
|
||||
DOLeft(itemList[left], itemList[center], itemList[right]);
|
||||
}
|
||||
void DOLeft(CanvasGroup left, CanvasGroup center, CanvasGroup right)
|
||||
@ -226,6 +228,7 @@ public class BannerController : MonoBehaviour
|
||||
se.Join(right.GetComponent<RectTransform>().DOScale(Vector3.one, 0.3f));
|
||||
se.Join(right.GetComponent<RectTransform>().DOLocalMoveX(0, 0.3f));
|
||||
se.Play().onComplete = () => { animateLock = false; };
|
||||
leftse = se;
|
||||
right.transform.SetAsLastSibling();
|
||||
//事件改变
|
||||
right.GetComponent<Button>().onClick.RemoveAllListeners();
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
<queries>
|
||||
<package android:name="com.tencent.mm" />
|
||||
<package android:name="com.zhixingpai.powerfun" />
|
||||
<package android:name="com.facebook.katana" />
|
||||
</queries>
|
||||
<application android:requestLegacyExternalStorage="true">
|
||||
<activity android:name="com.unityplugins.imageselector.TestMainActivity" android:theme="@style/UnityThemeSelector" android:screenOrientation="landscape" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale|layoutDirection|density" android:hardwareAccelerated="false">
|
||||
|
||||
Binary file not shown.
@ -47,7 +47,7 @@ public class RecommendController : MonoBehaviour
|
||||
break;
|
||||
case 1:
|
||||
var res = await ConfigHelper.mapApi.GetMapRouteAreaDetailItem(Area.AreaId);
|
||||
UIManager.ShowNewRouteDetailPanel(res.data);
|
||||
UIManager.ShowNewRouteDetailPanel(res.data.Id);
|
||||
break;
|
||||
case 2:
|
||||
Application.OpenURL(Area.Url);
|
||||
|
||||
@ -636,6 +636,7 @@ RectTransform:
|
||||
- {fileID: 7422200770415638701}
|
||||
- {fileID: 1128757190696039284}
|
||||
- {fileID: 3431565778213871763}
|
||||
- {fileID: 825902449212828960}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@ -1720,6 +1721,119 @@ MonoBehaviour:
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: 0000KM
|
||||
--- !u!1 &2882590459481290732
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 825902449212828960}
|
||||
- component: {fileID: 8679445741643427231}
|
||||
- component: {fileID: 3435410634832720573}
|
||||
- component: {fileID: 3924220547131846799}
|
||||
- component: {fileID: 1423584879003993720}
|
||||
m_Layer: 5
|
||||
m_Name: Panel (1)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!224 &825902449212828960
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2882590459481290732}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 6355271646832174643}
|
||||
m_Father: {fileID: 1777885814862178517}
|
||||
m_RootOrder: 7
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 323.4276, y: 163.92932}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8679445741643427231
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2882590459481290732}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &3435410634832720573
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2882590459481290732}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 0.15294118, b: 0.25882354, a: 0}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 0}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &3924220547131846799
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2882590459481290732}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 87a02f5a9d8ce2e43b46b9bbbc2a04c4, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!114 &1423584879003993720
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2882590459481290732}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 598e18fb001004a81960f552978ecf4e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
urlOnStart:
|
||||
showOnStart: 0
|
||||
fullScreen: 0
|
||||
useToolbar: 0
|
||||
toolbarPosition: 0
|
||||
frame:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 844
|
||||
height: 390
|
||||
referenceRectTransform: {fileID: 825902449212828960}
|
||||
--- !u!1 &2894462968154619168
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -1881,6 +1995,84 @@ MonoBehaviour:
|
||||
m_ChildControlHeight: 0
|
||||
m_ChildScaleWidth: 0
|
||||
m_ChildScaleHeight: 0
|
||||
--- !u!1 &3161307210594869611
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6355271646832174643}
|
||||
- component: {fileID: 8270654500462992248}
|
||||
- component: {fileID: 271283379993894462}
|
||||
m_Layer: 5
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6355271646832174643
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3161307210594869611}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 825902449212828960}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: 0, y: 100.6}
|
||||
m_SizeDelta: {x: 160, y: 30}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8270654500462992248
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3161307210594869611}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &271283379993894462
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3161307210594869611}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_FontSize: 14
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: New Text
|
||||
--- !u!1 &3462768965301733335
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@ -95,8 +95,7 @@ namespace Assets.Scripts.Apis.Models
|
||||
|
||||
public bool IsFav { get; set; }
|
||||
}
|
||||
|
||||
public class MapRouteAreaDetail
|
||||
public class MapRouteAreaDetail : MapRouteAreaItem
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
@ -114,35 +113,11 @@ namespace Assets.Scripts.Apis.Models
|
||||
///
|
||||
/// </summary>
|
||||
public int RideCount { get; set; }
|
||||
/// <summary>
|
||||
/// 环徐州
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string BannerImage { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string CoverImage { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime UpdateTime { get; set; }
|
||||
public bool IsFav { get; set; }
|
||||
public string CreateUserHead { get; set; }
|
||||
public string CreateUserName { get; set; }
|
||||
public List<MapRouteAreaDetailUser> UserList { get; set; }
|
||||
}
|
||||
|
||||
public class MapRouteAreaDetailUser
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
@ -77,5 +77,6 @@ namespace Assets.Scripts.Apis.Models
|
||||
//第三方userid
|
||||
public string AppleUserId { get; set; }
|
||||
public string FacebookUserId { get; set; }
|
||||
public string GoogleUserId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -310,6 +310,18 @@ namespace Assets.Scripts.Apis
|
||||
var r = await PostAsync<JsonResult<object>>("NoAuth/v1/OnFacebookLogin", new { faceBookUserId, token, phone, pwd, Captcha });
|
||||
return GetDataAfterSetCookie(r);
|
||||
}
|
||||
|
||||
public async Task<JsonResult<object>> OnGoogleIdLoginCheck(string googleUserId, string token)
|
||||
{
|
||||
var r = await PostAsync<JsonResult<object>>("NoAuth/v1/OnGoogleIdLoginCheck", new { googleUserId, token });
|
||||
return GetDataAfterSetCookie(r);
|
||||
}
|
||||
public async Task<JsonResult<object>> OnGoogleIdLogin(string googleUserId, string token, string phone, string pwd, string Captcha)
|
||||
{
|
||||
var r = await PostAsync<JsonResult<object>>("NoAuth/v1/OnGoogleIdLogin", new { googleUserId, token, phone, pwd, Captcha });
|
||||
return GetDataAfterSetCookie(r);
|
||||
}
|
||||
|
||||
private JsonResult<object> GetDataAfterSetCookie(JsonResult<object> r)
|
||||
{
|
||||
if (r.result)
|
||||
@ -329,6 +341,5 @@ namespace Assets.Scripts.Apis
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,11 +42,11 @@ public class LoginControllerMobile : MonoBehaviour, INativeOnMobileWxLoginResp
|
||||
DateTime.Now.ToString("HH:mm");
|
||||
weChat = App.weChatController;
|
||||
weChat.Init(App.WxAppId);
|
||||
transform.Find("Panel/LoginContainer/LoginScrollView/Viewport/Content/FormContainer-Login/Mask/FormContainer/otherContainer/Google")
|
||||
.gameObject.SetActive(Utils.CheckGooglePlayServices());
|
||||
#if UNITY_IOS
|
||||
transform.Find("Panel/LoginContainer/LoginScrollView/Viewport/Content/FormContainer-Login/Mask/FormContainer/otherContainer/Wechat")
|
||||
.gameObject.SetActive(App.weChatController.IsWeChatAppInstalled());
|
||||
transform.Find("Panel/LoginContainer/LoginScrollView/Viewport/Content/FormContainer-Login/Mask/FormContainer/otherContainer/Google")
|
||||
.gameObject.SetActive(false);
|
||||
#endif
|
||||
#if UNITY_IOS
|
||||
UIManager.AddEvent(transform.Find("Panel/LoginContainer/LoginScrollView/Viewport/Content/FormContainer-Login/Mask/FormContainer/otherContainer/Apple").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
||||
@ -68,7 +68,11 @@ public class LoginControllerMobile : MonoBehaviour, INativeOnMobileWxLoginResp
|
||||
});
|
||||
UIManager.AddEvent(transform.Find("Panel/LoginContainer/LoginScrollView/Viewport/Content/FormContainer-Login/Mask/FormContainer/otherContainer/Google").gameObject, UnityEngine.EventSystems.EventTriggerType.PointerClick, b =>
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
OnMobileGoogleLoginResp("true;105370187704207825625|eyJhbGciOiJSUzI1NiIsImtpZCI6ImNhMDA2MjBjNWFhN2JlOGNkMDNhNmYzYzY4NDA2ZTQ1ZTkzYjNjYWIiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL2FjY291bnRzLmdvb2dsZS5jb20iLCJhenAiOiI0OTI0NDAyMDA3NjYtMGZxc2toYjZlYnRhZzFobHFwbzdmbzkzY3VhYXJzbDYuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJhdWQiOiI0OTI0NDAyMDA3NjYtZjE0Yjl0OXRtcmF1bGg2N2dxb2JhYTlpc3EzN2cwbmMuYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJzdWIiOiIxMDUzNzAxODc3MDQyMDc4MjU2MjUiLCJlbWFpbCI6ImNhaXlhbnBlbmcwNjE5QGdtYWlsLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJuYW1lIjoi6JSh5Lil6bmPIiwicGljdHVyZSI6Imh0dHBzOi8vbGgzLmdvb2dsZXVzZXJjb250ZW50LmNvbS9hL0FBVFhBSnhjeWVkS05iZkcwZ3lIbkRhMXpWemVZRGVpdXI3OHUtNWZfbnVWPXM5Ni1jIiwiZ2l2ZW5fbmFtZSI6IuS4pem5jyIsImZhbWlseV9uYW1lIjoi6JShIiwibG9jYWxlIjoiemgtQ04iLCJpYXQiOjE2NDI0ODUxNzEsImV4cCI6MTY0MjQ4ODc3MX0.ZX-9jmB9GaWQEgcv8jbd4Ojy33DiVvl7m_PQZudJEQaLC1S5C6QJOaZRJEHNQ44mWmfSPlHPEhgsEoP-Qn7lKx7r609OuzMYGUE266bdbYer2KzztMtZIUKrI3i0UGLlybQm8YVGJh4vTvtaLZ3Fi2h2aKlDjx4MvFDaQKIwTDsOXzkCmhidYJ4KOhCToZsGIWmR8OhtwhL531p1oV3kOW28nXSbPhl0GalEbu-n970TtpxxQRvJeK61V8R3F29U71pn9PI863xQQ4itWsvQaFNz03pC8RRBGEKN8dvrmTqbKMuoo44fV4pLiY66EqUUoKYST7dOl15zUGfC-ckq5g");
|
||||
#else
|
||||
Utils.CallAndroidMethod("signInWithGoogle");
|
||||
#endif
|
||||
});
|
||||
//App.weChatController.Init(App.WxAppId);
|
||||
//var s = App.weChatController.isApplicationAvilible("com.gugoumainapp","powerfun").ToString();
|
||||
@ -203,16 +207,18 @@ public class LoginControllerMobile : MonoBehaviour, INativeOnMobileWxLoginResp
|
||||
|
||||
public void OnMobileGoogleLoginResp(string res)
|
||||
{
|
||||
Utils.showToast(null, res);
|
||||
Debug.Log(res);
|
||||
//if (res.Contains("true;"))
|
||||
//{
|
||||
// GetComponent<LoginController>().goWxLoginWithCode(res.Replace("true;", ""), "mobile");
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// Utils.showToast(null, res.Replace("false;", ""));
|
||||
//}
|
||||
#if UNITY_ANDROID
|
||||
var sp = res.Replace("true;", "").Split('|');
|
||||
if (sp.Length == 2)
|
||||
{
|
||||
GetComponent<LoginController>().OnGoogleIdLoginCheck(sp[0], sp[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.showToast(null, res.Replace("false;",""));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
public void OnAppleResp(string res)
|
||||
|
||||
@ -501,6 +501,37 @@ public class LoginController : BaseScene
|
||||
transform.Find("Panel").Find("Version").GetComponent<Text>().text = $"V{App.AppVersion}";
|
||||
#endif
|
||||
}
|
||||
|
||||
private string ggUserId = "";
|
||||
private string ggToken = "";
|
||||
public async void OnGoogleIdLoginCheck(string userId, string token)
|
||||
{
|
||||
ggUserId = userId;
|
||||
ggToken = token;
|
||||
signType = 4;
|
||||
var res = await ConfigHelper.userApi.OnGoogleIdLoginCheck(userId, token);
|
||||
if (res.result) //判断是否成功登录
|
||||
{
|
||||
var data = JObject.FromObject(res.data);
|
||||
if (data.ContainsKey("success") && data.Value<string>("success") == "False")
|
||||
{
|
||||
goSign();
|
||||
}
|
||||
else
|
||||
{
|
||||
RefreshWx3(data.ToObject<UserResultModel>(), 1);
|
||||
wxLogin3.gameObject.SetActive(true);
|
||||
signContainer.gameObject.SetActive(false);
|
||||
pageNums = 3;
|
||||
StartScrollPanel(2);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.showToast(null, res.errMsg);
|
||||
}
|
||||
}
|
||||
|
||||
private string fbUserId = "";
|
||||
private string fbToken = "";
|
||||
|
||||
@ -909,10 +940,14 @@ public class LoginController : BaseScene
|
||||
{
|
||||
r = await ConfigHelper.userApi.OnAppleIdLogin(appleUserId, appleToken, Email.text, Password.text, Captcha.text);
|
||||
}
|
||||
else
|
||||
else if (signType == 3)
|
||||
{
|
||||
r = await ConfigHelper.userApi.OnFacebookLogin(fbUserId, fbToken, Email.text, Password.text, Captcha.text);
|
||||
}
|
||||
else if (signType == 4)
|
||||
{
|
||||
r = await ConfigHelper.userApi.OnGoogleIdLogin(ggUserId, ggToken, Email.text, Password.text, Captcha.text);
|
||||
}
|
||||
if (r != null && r.result)
|
||||
{
|
||||
var u = JObject.FromObject(r.data).ToObject<UserResultModel>();
|
||||
@ -942,6 +977,10 @@ public class LoginController : BaseScene
|
||||
{
|
||||
r = await ConfigHelper.userApi.OnFacebookLogin(fbUserId, fbToken, Email.text, "", Captcha.text);
|
||||
}
|
||||
else if (signType == 4)
|
||||
{
|
||||
r = await ConfigHelper.userApi.OnGoogleIdLogin(ggUserId, ggToken, Email.text, "", Captcha.text);
|
||||
}
|
||||
else
|
||||
{
|
||||
r = await ConfigHelper.userApi.OnWebWxLogin(Email.text,
|
||||
|
||||
@ -358,7 +358,7 @@ public class MainController : BaseScene
|
||||
}
|
||||
if (App.MainSceneParam["Name"] == "NewRouteDetail" && App.currentArea != null)
|
||||
{
|
||||
UIManager.ShowNewRouteDetailPanel(App.currentArea);
|
||||
UIManager.ShowNewRouteDetailPanel(App.currentArea.Id);
|
||||
}
|
||||
if (App.MainSceneParam["Name"] == "UserInfoPanel")
|
||||
{
|
||||
|
||||
@ -27,7 +27,7 @@ public class NewRouteItemController : MonoBehaviour
|
||||
GetComponent<Button>().onClick.RemoveAllListeners();
|
||||
GetComponent<Button>().onClick.AddListener(() =>
|
||||
{
|
||||
UIManager.ShowNewRouteDetailPanel(area);
|
||||
UIManager.ShowNewRouteDetailPanel(area.Id);
|
||||
});
|
||||
StartCoroutine(displayImage(area, caches));
|
||||
}
|
||||
|
||||
@ -292,6 +292,10 @@ public class EditUserController : PFUIPanel, INativeOnMobileImageSelect
|
||||
string.IsNullOrEmpty(currentUser.AppleUserId)
|
||||
? Resources.Load<Sprite>("Images/link-apple")
|
||||
: Resources.Load<Sprite>("Images/Login_Apple");
|
||||
linkContainer.Find("Gg").GetComponent<Image>().sprite =
|
||||
string.IsNullOrEmpty(currentUser.GoogleUserId)
|
||||
? Resources.Load<Sprite>("Images/link-google")
|
||||
: Resources.Load<Sprite>("Images/Login_Google");
|
||||
}
|
||||
// Start is called before the first frame update
|
||||
protected override void Start()
|
||||
|
||||
@ -116,6 +116,7 @@ public class HomeController : PFUIPanel
|
||||
// }
|
||||
//},
|
||||
};
|
||||
|
||||
}
|
||||
private void GoRide(BaseEventData e)
|
||||
{
|
||||
@ -299,7 +300,7 @@ public class HomeController : PFUIPanel
|
||||
if (maxt <= 0)
|
||||
{
|
||||
GetMaxRanking();
|
||||
maxt += 60f;
|
||||
maxt += 60f * 5;
|
||||
}
|
||||
if (maxdataTime > 0)
|
||||
{
|
||||
@ -372,5 +373,6 @@ public class HomeController : PFUIPanel
|
||||
base.Show();
|
||||
transform.MyDOFade();
|
||||
GetSummary();
|
||||
//transform.Find("Panel (1)").GetComponent<test>().startPage();
|
||||
}
|
||||
}
|
||||
|
||||
@ -130,14 +130,13 @@ public class NewRouteDetailController : PFUIPanel
|
||||
// timer += 1f;
|
||||
//}
|
||||
}
|
||||
MapRouteAreaItem area;
|
||||
MapRouteAreaDetail area;
|
||||
int pageIndex = 0, pageSize = 10;
|
||||
bool isEnd = false, startMouse = false;
|
||||
public async void Initial(MapRouteAreaItem area)
|
||||
public async void Initial(int areaId)
|
||||
{
|
||||
isEnd = false;
|
||||
pageIndex = 0;
|
||||
this.area = area;
|
||||
var left = transform.Find("Container/Left");
|
||||
left.Find("Icon").GetComponent<RawImage>().texture = null;
|
||||
scroll.content.DestroyChildren();
|
||||
@ -151,46 +150,9 @@ public class NewRouteDetailController : PFUIPanel
|
||||
.text = string.Empty;
|
||||
transform.Find("Container/Left/DescScroll/Viewport/Content/Desc").GetComponent<Text>()
|
||||
.text = string.Empty;
|
||||
if (area.CoverImage != null)
|
||||
{
|
||||
Utils.DisplayImageTempDict(left.Find("Icon").GetComponent<RawImage>(), area.CoverImage, caches
|
||||
, b =>
|
||||
{
|
||||
// if (b != null)
|
||||
// {
|
||||
// cacheByte.Add(area.CoverImage, b);
|
||||
// }
|
||||
// else if(cacheByte.ContainsKey(area.CoverImage))
|
||||
// {
|
||||
// b = cacheByte[area.CoverImage];
|
||||
// }
|
||||
|
||||
//#if UNITY_EDITOR
|
||||
// var _t = new Texture2D(4, 4, TextureFormat.DXT5, false);
|
||||
//#else
|
||||
//#if UNITY_IOS
|
||||
// var _t = new Texture2D(4, 4, TextureFormat.ASTC_RGB_4x4,false);
|
||||
// Debug.Log("使用了壓縮");
|
||||
//#elif UNITY_ANDROID
|
||||
// var _t = new Texture2D(4, 4, TextureFormat.ASTC_RGB_4x4,false);
|
||||
// Debug.Log("使用了壓縮");
|
||||
//#else //pc
|
||||
// var _t = new Texture2D(4, 4, TextureFormat.DXT5,false);
|
||||
//#endif
|
||||
//#endif
|
||||
// _t.LoadImage(b);
|
||||
// //Graphics.CopyTexture(t, _t);
|
||||
// //Debug.Log($"{t.width},{t.height}");
|
||||
// left.Find("Thumbnail").GetComponent<RawImage>().texture =
|
||||
// ScaleTextureCutOut(_t, 0, _t.height / 2, _t.width / 3, _t.height / 3);
|
||||
});
|
||||
//Utils.DisplayImageTempDict(left.Find("Thumbnail").GetComponent<RawImage>(), area.CoverImage, caches);
|
||||
}
|
||||
Debug.Log(153 + area.IsFav.ToString());
|
||||
|
||||
left.Find("Name").GetComponent<Text>().text = area.Name;
|
||||
|
||||
GetData();
|
||||
GetData(areaId);
|
||||
GetList();
|
||||
|
||||
}
|
||||
@ -243,11 +205,13 @@ public class NewRouteDetailController : PFUIPanel
|
||||
GetList();
|
||||
}
|
||||
}
|
||||
private async void GetData()
|
||||
private async void GetData(int areaId)
|
||||
{
|
||||
var res = await ConfigHelper.mapApi.GetMapRouteAreaDetail(area.Id);
|
||||
var res = await ConfigHelper.mapApi.GetMapRouteAreaDetail(areaId);
|
||||
if (res.result)
|
||||
{
|
||||
this.area = res.data;
|
||||
transform.Find("Container/Left/Name").GetComponent<Text>().text = res.data.Name;
|
||||
transform.Find("Container/Left/RideContainer/Text").GetComponent<Text>()
|
||||
.text = res.data.RideCount.ToString();
|
||||
transform.Find("Container/Left/Infos/DistanceContainer/Text").GetComponent<Text>()
|
||||
@ -264,6 +228,41 @@ public class NewRouteDetailController : PFUIPanel
|
||||
transform.Find("Container/Left/Fav").GetComponent<Image>().sprite = FavDict[res.data.IsFav];
|
||||
LayoutRebuilder.ForceRebuildLayoutImmediate(transform.Find("Container/Left/RideContainer").GetComponent<RectTransform>());
|
||||
var userinfo = Resources.Load<GameObject>("UI/Prefab/NewRoute/UserInfo");
|
||||
if (res.data.CoverImage != null)
|
||||
{
|
||||
Utils.DisplayImageTempDict(transform.Find("Container/Left/Icon").GetComponent<RawImage>(), area.CoverImage, caches
|
||||
, b =>
|
||||
{
|
||||
// if (b != null)
|
||||
// {
|
||||
// cacheByte.Add(area.CoverImage, b);
|
||||
// }
|
||||
// else if(cacheByte.ContainsKey(area.CoverImage))
|
||||
// {
|
||||
// b = cacheByte[area.CoverImage];
|
||||
// }
|
||||
|
||||
//#if UNITY_EDITOR
|
||||
// var _t = new Texture2D(4, 4, TextureFormat.DXT5, false);
|
||||
//#else
|
||||
//#if UNITY_IOS
|
||||
// var _t = new Texture2D(4, 4, TextureFormat.ASTC_RGB_4x4,false);
|
||||
// Debug.Log("使用了壓縮");
|
||||
//#elif UNITY_ANDROID
|
||||
// var _t = new Texture2D(4, 4, TextureFormat.ASTC_RGB_4x4,false);
|
||||
// Debug.Log("使用了壓縮");
|
||||
//#else //pc
|
||||
// var _t = new Texture2D(4, 4, TextureFormat.DXT5,false);
|
||||
//#endif
|
||||
//#endif
|
||||
// _t.LoadImage(b);
|
||||
// //Graphics.CopyTexture(t, _t);
|
||||
// //Debug.Log($"{t.width},{t.height}");
|
||||
// left.Find("Thumbnail").GetComponent<RawImage>().texture =
|
||||
// ScaleTextureCutOut(_t, 0, _t.height / 2, _t.width / 3, _t.height / 3);
|
||||
});
|
||||
//Utils.DisplayImageTempDict(left.Find("Thumbnail").GetComponent<RawImage>(), area.CoverImage, caches);
|
||||
}
|
||||
#if !(UNITY_ANDROID || UNITY_IOS)
|
||||
transform.Find("Container/Left/NOData").gameObject.SetActive(res.data.UserList.Count == 0);
|
||||
transform.Find("Container/Left/Users").DestroyChildren();
|
||||
|
||||
@ -332,10 +332,10 @@ public class UIManager : MonoBehaviour
|
||||
return this.GetPanelInstance("NewRouteDetailPanel", ref this.mNewRouteDetailController);
|
||||
}
|
||||
}
|
||||
public static void ShowNewRouteDetailPanel(MapRouteAreaItem area)
|
||||
public static void ShowNewRouteDetailPanel(int areaId)
|
||||
{
|
||||
UIManager.Show(UIManager.Instance.NewRouteDetailPanel, UIManager.Instance.MainPanel);
|
||||
UIManager.Instance.NewRouteDetailPanel.GetComponent<NewRouteDetailController>().Initial(area);
|
||||
UIManager.Instance.NewRouteDetailPanel.GetComponent<NewRouteDetailController>().Initial(areaId);
|
||||
}
|
||||
#endregion
|
||||
private CountDownAnimation mCountDownAnimation;
|
||||
|
||||
@ -274,6 +274,20 @@ namespace Assets.Scripts
|
||||
#endif
|
||||
}
|
||||
|
||||
public static bool CheckGooglePlayServices()
|
||||
{
|
||||
#if UNITY_ANDROID && !UNITY_EDITOR
|
||||
AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
|
||||
var activity = jc.GetStatic<AndroidJavaObject>("currentActivity");
|
||||
return activity.Call<bool>("CheckGooglePlayServices");
|
||||
#elif UNITY_EDITOR
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
public static void showLoadingExtension(this GameObject game)
|
||||
{
|
||||
game.SetActive(true);
|
||||
|
||||
@ -9,20 +9,26 @@ public class test : MonoBehaviour
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
public void startPage()
|
||||
{
|
||||
Invoke("startPageFunc", 1f);
|
||||
}
|
||||
private void startPageFunc()
|
||||
{
|
||||
var rect = GetComponent<RectTransform>();
|
||||
var webView = gameObject.GetComponent<UniWebView>();
|
||||
webView.Frame = new Rect(0, 0, Screen.width, Screen.height);
|
||||
|
||||
webView.ReferenceRectTransform = rect;
|
||||
// Load a URL.
|
||||
webView.Load("http://192.168.0.101:3081");
|
||||
|
||||
// Show it.
|
||||
webView.Show();
|
||||
|
||||
webView.ReferenceRectTransform = GetComponent<RectTransform>();
|
||||
webView.OnMessageReceived -= FromJs;
|
||||
webView.OnMessageReceived += FromJs;
|
||||
}
|
||||
|
||||
private void FromJs(UniWebView webView, UniWebViewMessage message)
|
||||
{
|
||||
if (message.Path.Equals("Test"))
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
</packages>
|
||||
<files />
|
||||
<settings>
|
||||
<setting name="androidAbis" value="arm64-v8a,armeabi-v7a" />
|
||||
<setting name="androidAbis" value="armeabi-v7a" />
|
||||
<setting name="bundleId" value="com.ZhiXingPai.PowerFunUnity" />
|
||||
<setting name="explodeAars" value="True" />
|
||||
<setting name="gradleBuildEnabled" value="True" />
|
||||
|
||||
@ -6,8 +6,8 @@ EditorBuildSettings:
|
||||
serializedVersion: 2
|
||||
m_Scenes:
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/Login.unity
|
||||
guid: 6dce3e17997730b4492f91dd8fede429
|
||||
path: Assets/Scenes/Login-Mobile.unity
|
||||
guid: 4be878da00cf764499988cf403faf94d
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/MainScene.unity
|
||||
guid: ab586a3c1bacd4a48a55178eb06fe0cc
|
||||
|
||||
@ -133,7 +133,7 @@ PlayerSettings:
|
||||
16:10: 1
|
||||
16:9: 1
|
||||
Others: 1
|
||||
bundleVersion: 2.1.1
|
||||
bundleVersion: 2.1.2
|
||||
preloadedAssets: []
|
||||
metroInputSource: 0
|
||||
wsaTransparentSwapchain: 0
|
||||
@ -179,7 +179,7 @@ PlayerSettings:
|
||||
applicationIdentifier:
|
||||
Android: com.ZhiXingPai.PowerFunUnity
|
||||
buildNumber:
|
||||
iPhone: 2.1.1.2
|
||||
iPhone: 2.1.2.0
|
||||
AndroidBundleVersionCode: 15
|
||||
AndroidMinSdkVersion: 24
|
||||
AndroidTargetSdkVersion: 30
|
||||
@ -256,7 +256,7 @@ PlayerSettings:
|
||||
clonedFromGUID: c0afd0d1d80e3634a9dac47e8a0426ea
|
||||
templatePackageId: com.unity.template.3d@4.2.8
|
||||
templateDefaultScene: Assets/Scenes/SampleScene.unity
|
||||
AndroidTargetArchitectures: 3
|
||||
AndroidTargetArchitectures: 1
|
||||
AndroidSplashScreenScale: 0
|
||||
androidSplashScreen: {fileID: 0}
|
||||
AndroidKeystoreName: '{inproject}: Assets/Plugins/Android/powerfun.keystore'
|
||||
@ -868,7 +868,7 @@ PlayerSettings:
|
||||
platformArchitecture:
|
||||
iPhone: 1
|
||||
scriptingBackend:
|
||||
Android: 1
|
||||
Android: 0
|
||||
Standalone: 0
|
||||
il2cppCompilerConfiguration:
|
||||
Standalone: 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user