From 92483a944baf262f5ec1c261e7bcbc5a6ab55935 Mon Sep 17 00:00:00 2001 From: zhangjie0072 Date: Wed, 3 Aug 2022 09:39:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E4=BA=AB=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/GameInterface/TKGSDKManager.cs | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/Assets/TKGSDK/Common/GameInterface/TKGSDKManager.cs b/Assets/TKGSDK/Common/GameInterface/TKGSDKManager.cs index 2cac3aa4..cee0723a 100644 --- a/Assets/TKGSDK/Common/GameInterface/TKGSDKManager.cs +++ b/Assets/TKGSDK/Common/GameInterface/TKGSDKManager.cs @@ -3,6 +3,7 @@ using System.Collections; using System.Collections.Generic; using UnityEngine; using Touka; +using WeChatWASM; public class TKGSDKManager : TKGSingleton { @@ -596,7 +597,45 @@ public class TKGSDKManager : TKGSingleton #region h5 + public void ShowShareMenu() + { + ShowShareMenuOption ssmo = new ShowShareMenuOption(); + ssmo.menus = new string[] { "shareAppMessage", "shareTimeline" }; + WX.ShowShareMenu(ssmo); + } + public void HideShareMenu() + { + HideShareMenuOption hsmo = new HideShareMenuOption(); + hsmo.menus = new string[] { "shareAppMessage", "shareTimeline" }; + WX.HideShareMenu(hsmo); + } + + public void ShareAppMessageOriginImg() + { + ShareAppMessageOption samo = new ShareAppMessageOption(); + samo.title = "高智商玩家的选择,能过20关的都不是一般人"; + //samo.imageUrlId = "这是图片路径ID"; + //samo.path ="独立分包路径"; + WX.ShareAppMessage(samo); + } + + public void ShareAppMessage() + { + ShareAppMessageOption samo = new ShareAppMessageOption(); + samo.title = "靠声音过关的游戏,有点意思~"; + samo.imageUrl = "https://touka-pkg.oss-cn-beijing.aliyuncs.com/Temp/chicken_webgl/ShareImg/ShareImg01.png"; + //samo.imageUrlId = "这是图片路径ID"; + //samo.path ="独立分包路径"; + WX.ShareAppMessage(samo); + } + + public void ShowShareImageMenu() + { + ShowShareImageMenuOption ssimo = new ShowShareImageMenuOption(); + ssimo.path = "Share.png"; + WX.ShowShareImageMenu(ssimo); + } #endregion } \ No newline at end of file