分享调整
This commit is contained in:
1 parent
ffc98f1a58
commit
8e0ce907d0
14 files changed
+1173
-529
No files matched your search
@@ -23,7 +23,8 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
GameObject ShareButton { get; set; }
|
||||
GameObject ToolBarPanel { get; set; }
|
||||
GameObject WeChatButton { get; set; }
|
||||
|
||||
GameObject WeChatGpButton { get; set; }
|
||||
|
||||
|
||||
RawImage TopHead { get; set; }
|
||||
RawImage SecondHead { get; set; }
|
||||
@@ -60,9 +61,9 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
ShareButton = transform.Find("ShareButton").gameObject;
|
||||
ToolBarPanel = transform.Find("ToolBarPanel").gameObject;
|
||||
WeChatButton = transform.Find("ToolBarPanel/WeChatButton").gameObject;
|
||||
ShareButton.SetActive(!cyclingController.isWatch);
|
||||
UIManager.AddEvent(ShareButton, UnityEngine.EventSystems.EventTriggerType.PointerClick, OpenShare);
|
||||
UIManager.AddEvent(WeChatButton, UnityEngine.EventSystems.EventTriggerType.PointerClick, OpenShare);
|
||||
WeChatGpButton = transform.Find("ToolBarPanel/GoogleButton").gameObject;
|
||||
UIManager.AddEvent(WeChatButton, UnityEngine.EventSystems.EventTriggerType.PointerClick, ShareWechat);
|
||||
UIManager.AddEvent(WeChatGpButton, UnityEngine.EventSystems.EventTriggerType.PointerClick, ShareWechatGp);
|
||||
#endif
|
||||
SpriteTop = Resources.Load<Sprite>("Images/Ride/Match/top-1");
|
||||
SpriteSecond = Resources.Load<Sprite>("Images/Ride/Match/top-2");
|
||||
@@ -114,7 +115,7 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
|
||||
Mine.SetActive(!cyclingController.isWatch);
|
||||
RankingPanel.SetActive(cyclingController.isWatch);
|
||||
TitleImage.SetActive(!cyclingController.isWatch);
|
||||
//TitleImage.SetActive(!cyclingController.isWatch);
|
||||
WatchTitle.SetActive(cyclingController.isWatch);
|
||||
|
||||
if (!cyclingController.isWatch)
|
||||
@@ -243,5 +244,17 @@ namespace Assets.Scenes.Ride.Scripts
|
||||
Utils.showToast(null, "未安装微信");
|
||||
}
|
||||
}
|
||||
|
||||
private void ShareWechatGp(BaseEventData baseEventData)
|
||||
{
|
||||
if (App.weChatController.IsWeChatAppInstalled())
|
||||
{
|
||||
App.weChatController.ShareWebpageToWX(1, $"{App.CurrentUser.WebHost}Mine/MatchPreview?id={cyclingController.competitionId}&Token={App.CurrentUser.cookie}", cyclingController.competition.NickName, "By " + App.CurrentUser.Nickname);
|
||||
}
|
||||
else
|
||||
{
|
||||
Utils.showToast(null, "未安装微信");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user