微信登录接入;卡片点击效果
This commit is contained in:
1 parent
51cea743be
commit
969835e4d7
20 files changed
+1558
-1352
No files matched your search
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Assets.Scripts.Mobile.Interface
|
||||
{
|
||||
interface INativeOnMobileWxLoginResp
|
||||
{
|
||||
void OnMobileWxLoginResp(string res);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 95e502fb53efbff428f077e54f0d5f1d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,4 +1,5 @@
|
||||
using Assets.Scripts;
|
||||
using Assets.Scripts.Mobile.Interface;
|
||||
using DG.Tweening;
|
||||
using System;
|
||||
using System.Collections;
|
||||
@@ -6,7 +7,7 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class LoginControllerMobile : MonoBehaviour
|
||||
public class LoginControllerMobile : MonoBehaviour, INativeOnMobileWxLoginResp
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
ScrollRect loginScrollView;
|
||||
@@ -70,6 +71,13 @@ public class LoginControllerMobile : MonoBehaviour
|
||||
/// <param name="res"></param>
|
||||
public void OnMobileWxLoginResp(string res)
|
||||
{
|
||||
Utils.showToast(gameObject, res, type: 1);
|
||||
if (res.Contains("true;"))
|
||||
{
|
||||
GetComponent<LoginController>().goWxLoginWithCode(res.Replace("true;", ""), "mobile");
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.showToast(null, res.Replace("false;", ""));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user