修改细节
This commit is contained in:
parent
d8adb8a5b8
commit
3c540dece4
@ -4,6 +4,7 @@
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <CoreLocation/CoreLocation.h>
|
||||
#import "WXApi.h"
|
||||
|
||||
//这是向微信终端注册你的appid
|
||||
@ -108,4 +109,8 @@ bool checkAPPIsExist(const char * URLScheme)
|
||||
{
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
bool checkLocation()
|
||||
{
|
||||
return [CLLocationManager locationServicesEnabled] == YES;
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -100,7 +100,7 @@ public static class App
|
||||
{
|
||||
#if !UNITY_EDITOR
|
||||
//Host = "http://pf.juze.pro/";
|
||||
////Host = "http://192.168.0.101:5085/";
|
||||
//Host = "http://192.168.0.101:5083/";
|
||||
//UdpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21000);
|
||||
//TcpAddress = new IPEndPoint(IPAddress.Parse("47.97.84.8"), 21001);
|
||||
Host = "https://wx.powerfun.com.cn/";
|
||||
@ -114,6 +114,6 @@ public static class App
|
||||
App._IsRowerMode = bool.Parse(isRower);
|
||||
}
|
||||
Screen.sleepTimeout = SleepTimeout.NeverSleep;
|
||||
//Debug.Log(TimeSpan.FromSeconds(1).ToString(@"mm\:ss"));
|
||||
Debug.Log("117,"+ Utils.isUpdate("2.0.3","2.0.2"));
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,7 +55,7 @@ public class LoginControllerMobile : MonoBehaviour, INativeOnMobileWxLoginResp
|
||||
#if UNITY_ANDROID
|
||||
var info = r.data.Value<JObject>("UnityApk");
|
||||
Debug.Log(info.Value<string>("Version"));
|
||||
if (info.Value<string>("Version") != App.AppVersion)
|
||||
if (Utils.isUpdate(App.AppVersion, info.Value<string>("Version")))
|
||||
{
|
||||
transform.Find("Panel").gameObject.SetActive(false);
|
||||
transform.Find("Version").gameObject.SetActive(false);
|
||||
@ -63,7 +63,7 @@ public class LoginControllerMobile : MonoBehaviour, INativeOnMobileWxLoginResp
|
||||
}
|
||||
#elif UNITY_IOS
|
||||
var info = r.data.Value<JObject>("UnityIos");
|
||||
if (info.Value<string>("Version") != App.AppVersion)
|
||||
if (Utils.isUpdate(App.AppVersion, info.Value<string>("Version")))
|
||||
{
|
||||
Application.OpenURL(info.Value<string>("Url"));
|
||||
Application.Quit();
|
||||
|
||||
@ -24,6 +24,9 @@ public class WeChatController
|
||||
private static extern void WechatLogin(string scope,string state);
|
||||
[DllImport("__Internal")]
|
||||
private static extern bool checkAPPIsExist(string URLScheme);
|
||||
|
||||
[DllImport("__Internal")]
|
||||
private static extern bool checkLocation();
|
||||
#endif
|
||||
#endregion
|
||||
/// <summary>
|
||||
@ -175,6 +178,12 @@ public class WeChatController
|
||||
#endif
|
||||
|
||||
}
|
||||
#if UNITY_IOS
|
||||
public bool CheckLocation()
|
||||
{
|
||||
return checkLocation();
|
||||
}
|
||||
#endif
|
||||
public void SendMessageToUnity(string gameObjectName, string UnityMethodName)
|
||||
{
|
||||
mainActivityClass.CallStatic("SendMessageToUnity",gameObjectName, UnityMethodName);
|
||||
|
||||
@ -540,26 +540,27 @@ public class LoginController : BaseScene
|
||||
#elif UNITY_IOS
|
||||
var info = rr.data.Value<JObject>("UnityIos");
|
||||
#endif
|
||||
if (info.Value<string>("Version") != App.AppVersion) return;
|
||||
if (Utils.isUpdate(App.AppVersion,info.Value<string>("Version"))) return;
|
||||
}
|
||||
Debug.Log(545);
|
||||
Debug.Log(notifyId);
|
||||
var ver = r.data.Value<JObject>("Version").ToObject<UpdateModel>();
|
||||
if (ver.UpdateLog.Count != notifyId) //ver.UpdateLog.Count != notifyId
|
||||
if (ver.UpdateLog.Count + 1 != notifyId) //ver.UpdateLog.Count != notifyId
|
||||
{
|
||||
var log = ver.UpdateLog.FirstOrDefault();
|
||||
if (log != null)
|
||||
{
|
||||
App.notifyContent = log.Desc;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
App.notifyContent = r.data.Value<string>("Content");
|
||||
}
|
||||
PlayerPrefs.SetInt("notifyId", ver.UpdateLog.Count);
|
||||
PlayerPrefs.SetInt("notifyId", ver.UpdateLog.Count + 1);
|
||||
UIManager.ShowNewsModal();
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
GetRotateImage();
|
||||
}
|
||||
|
||||
@ -1117,7 +1118,9 @@ public class LoginController : BaseScene
|
||||
//wxLogin2.gameObject.SetActive(false);
|
||||
signPage1.Find("next").gameObject.SetActive(false);
|
||||
signPage1.Find("BtnModiPass").gameObject.SetActive(false);
|
||||
#if !(UNITY_ANDROID || UNITY_IOS)
|
||||
signPage1.Find("previousThird").gameObject.SetActive(true);
|
||||
#endif
|
||||
signPage1.Find("signThird").gameObject.SetActive(true);
|
||||
ShowPassword();
|
||||
this.StartScrollPanel(3);
|
||||
|
||||
@ -199,8 +199,13 @@ public class DeviceController : PFUIPanel
|
||||
App.MainDeviceAdapter.ClearDevice();
|
||||
#if UNITY_ANDROID || UNITY_IOS
|
||||
App.MainDeviceAdapter.StartScan();
|
||||
#if !UNITY_EDITOR && UNITY_ANDROID
|
||||
#if UNITY_ANDROID
|
||||
Utils.CallAndroidMethod("OpenLocationService");
|
||||
#else
|
||||
//if (!App.weChatController.CheckLocation())
|
||||
//{
|
||||
// Utils.showToast(null, "Please turn on location service");
|
||||
//}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@ -190,7 +190,23 @@ namespace Assets.Scripts
|
||||
}
|
||||
loading.GetComponent<LoadingPf>().Show();
|
||||
}
|
||||
|
||||
public static bool isUpdate(string currentVersion,string realVersion)
|
||||
{
|
||||
var a = currentVersion.Split('.');
|
||||
var b = realVersion.Split('.');
|
||||
if (a.Length != 3 || b.Length != 3) return false;
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
var f1 = int.TryParse(a[i], out int ai);
|
||||
var f2 = int.TryParse(b[i], out int bi);
|
||||
if (!f1 || !f2) return false;
|
||||
if (ai < bi)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public static void CallAndroidMethod(string methodName,params object[] args)
|
||||
{
|
||||
AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
|
||||
|
||||
@ -133,7 +133,7 @@ PlayerSettings:
|
||||
16:10: 1
|
||||
16:9: 1
|
||||
Others: 1
|
||||
bundleVersion: 2.0.1
|
||||
bundleVersion: 2.0.2
|
||||
preloadedAssets: []
|
||||
metroInputSource: 0
|
||||
wsaTransparentSwapchain: 0
|
||||
@ -179,7 +179,7 @@ PlayerSettings:
|
||||
applicationIdentifier:
|
||||
Android: com.ZhiXingPai.PowerFunUnity
|
||||
buildNumber:
|
||||
iPhone: 2.0.1.12
|
||||
iPhone: 2.0.2.2
|
||||
AndroidBundleVersionCode: 1
|
||||
AndroidMinSdkVersion: 24
|
||||
AndroidTargetSdkVersion: 0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user