更新页面,目前是强制更新

This commit is contained in:
Caiyanpeng committed 2021-05-11 10:47:04 +08:00
1 parent 6645310601
commit 2c5501a096
25 files changed
+1922 -71

No files matched your search

+14 -16
View File
@@ -217,7 +217,7 @@ public class LoginController : MonoBehaviour
{
var info = Instantiate(Resources.Load<GameObject>("UI/Prefab/Login/QuickUserInfo")).transform;
info.GetComponent<QuickLoginUser>().Initial(user, transform);
info.parent = content;
info.SetParent(content);
info.localScale = new Vector3(1, 1, 1);
}
content.Find("empty1").transform.SetSiblingIndex(0);
@@ -459,24 +459,33 @@ public class LoginController : MonoBehaviour
async void Init()
{
GetRotateImage();
UIManager.Instance.ModalsPanel = this.transform.Find("ModalPanel").GetComponent<PFUIPanel>();
userInfos = UIManager.Instance.userInfos;
App.DefaultRotateTexture = Utils.ReadTextureFromPlayerPrefs("rotateImage");
var notifyId = PlayerPrefs.GetInt("notifyId");
App.firstEnter = PlayerPrefs.GetInt("firstEnter");
PlayerPrefs.SetInt("firstEnter", 1);
var notifyId = PlayerPrefs.GetInt("notifyId");
var r = await ConfigHelper.userApi.GetNotify();
if (r.result)
{
//#if !UNITY_EDITOR
var ver = r.data.Value<JObject>("Version").ToObject<UpdateModel>();
if (ver!=null && ver.HasUpdate)
{
App.UpdateObject = ver;
Debug.Log(Application.persistentDataPath + "/PowerFun.exe");
UIManager.ShowDownloadModal();
}
//#endif
App.notifyContent = r.data.Value<string>("Content");
if (r.data.Value<int>("Id") != notifyId)
{
UIManager.ShowNewsModal();
PlayerPrefs.SetInt("notifyId", r.data.Value<int>("Id"));
}
//content.GetComponent<Text>().text
}
GetRotateImage();
}
async void GetRotateImage()
@@ -518,14 +527,6 @@ public class LoginController : MonoBehaviour
private void AdjustWxQrCode()
{
wxBrowser.EvalJSCSP(@"
const f = ()=>{
//if(document.body.style.padding === '0px')
//{
// console.log('停止');
// isFinish();
// return;
//}
console.log('js调整');
document.getElementsByClassName('qrcode')[0].style.marginTop = 0;
document.getElementsByClassName('title')[0].style.display = 'none';
document.getElementById('wx_default_tip').childNodes[3].innerHTML = `""PowerFun""`;
@@ -533,10 +534,7 @@ public class LoginController : MonoBehaviour
document.body.style.overflow = 'hidden';
document.body.style.transformOrigin = 'top left';
document.body.style.transform = 'scale(0.85106382978)';
document.body.style.padding = '0';
}
f();").Done();
document.body.style.padding = '0';").Done();
}
//浏览器加载回调
private async void OnUserScan()