Auto-publish.

This commit is contained in:
nebulaliu 2025-09-19 17:37:27 +08:00
parent 25827f8ab9
commit 7d97e19c86
188 changed files with 2004 additions and 335 deletions

View File

@ -0,0 +1,136 @@
#if TUANJIE_1_4_OR_NEWER
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using UnityEditor;
using UnityEngine;
using UnityEditor.Build.Profile;
namespace WeChatWASM
{
public class WeixinMiniGameSettings : MiniGameSettings
{
public WXProjectConf ProjectConf;
public SDKOptions SDKOptions;
public CompileOptions CompileOptions;
public CompressTexture CompressTexture;
public List<string> PlayerPrefsKeys = new List<string>();
public FontOptions FontOptions;
[SerializeField] public bool m_AutomaticFillInstantGame = true;
public WeixinMiniGameSettings(MiniGameSettingsEditor editor) : base(editor)
{
}
public bool PreprocessBuild(BuildProfile buildProfile, BuildOptions options)
{
bool result = true;
if (!string.IsNullOrEmpty(buildProfile.buildPath))
{
this.ProjectConf.DST = buildProfile.buildPath;
}
else
{
Debug.LogError("Build Path is empty!");
result = false;
}
this.CompileOptions.DevelopBuild = buildProfile.platformSettings.development;
this.CompileOptions.AutoProfile = buildProfile.platformSettings.connectProfiler;
this.CompileOptions.CleanBuild = ((int)options & (int)BuildOptions.CleanBuildCache) != 0;
this.CompileOptions.ScriptOnly = ((int)options & (int)BuildOptions.BuildScriptsOnly) != 0;
return result;
}
internal void FillAutoStreamingAutomatically()
{
// Instant Game
if (WXConvertCore.IsInstantGameAutoStreaming())
{
if (m_AutomaticFillInstantGame)
{
ProjectConf.CDN = WXConvertCore.GetInstantGameAutoStreamingCDN();
if (!ProjectConf.bundlePathIdentifier.Contains("CUS/CustomAB;"))
{
ProjectConf.bundlePathIdentifier = "CUS/CustomAB;" + ProjectConf.bundlePathIdentifier;
}
if (!ProjectConf.bundlePathIdentifier.Contains("AS;"))
{
ProjectConf.bundlePathIdentifier = "AS;" + ProjectConf.bundlePathIdentifier;
}
ProjectConf.dataFileSubPrefix = "CUS";
}
}
}
public static void AutoStreamingLoad()
{
if (!WXConvertCore.IsInstantGameAutoStreaming())
{
return;
}
// Generate
Type asTextureUIType = Type.GetType("Unity.AutoStreaming.ASTextureUI,Unity.InstantGame.Editor");
if (asTextureUIType == null)
{
Debug.LogError("Type 'Unity.AutoStreaming.ASTextureUI' not found. ");
return;
}
MethodInfo generateTextureAssetBundlesMethod = asTextureUIType.GetMethod("GenerateTextureAssetBundles", BindingFlags.NonPublic | BindingFlags.Static);
generateTextureAssetBundlesMethod?.Invoke(null, new object[] { false });
// reflection to get WXConvertCore.FirstBundlePath
String FirstBundlePath = "";
var type = Type.GetType("WeChatWASM.WXConvertCore,WxEditor");
if (type == null)
{
Debug.LogError("Type 'WeChatWASM.WXConvertCore,WxEditor' not found. ");
return;
}
FieldInfo fieldInfo = type.GetField("FirstBundlePath", BindingFlags.Public | BindingFlags.Static);
if (fieldInfo != null)
{
FirstBundlePath = fieldInfo.GetValue(null) as String;
}
if (!string.IsNullOrEmpty(FirstBundlePath) && File.Exists(FirstBundlePath))
{
Type igBuildPipelineType = Type.GetType("Unity.InstantGame.IGBuildPipeline,Unity.InstantGame.Editor");
if (igBuildPipelineType == null)
{
Debug.LogError("Type 'Unity.InstantGame.IGBuildPipeline' not found. ");
return;
}
MethodInfo uploadMethod = igBuildPipelineType.GetMethod("UploadWeChatDataFile", BindingFlags.Public | BindingFlags.Static);
bool returnValue = false;
if (uploadMethod != null)
{
object[] parameters = new object[] { FirstBundlePath };
object result = uploadMethod.Invoke(null, parameters);
returnValue = Convert.ToBoolean(result);
}
if (returnValue)
{
Debug.Log("转换完成并成功上传首包资源");
}
else
{
Debug.LogError("首包资源上传失败请检查网络以及Auto Streaming配置是否正确。");
}
}
else
{
Debug.LogError("转换失败");
}
}
}
}
#endif

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 9e8848058ea76f3fa52e8ea870b24e36
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,595 @@
#if TUANJIE_1_4_OR_NEWER
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using UnityEditor;
using UnityEditor.Build.Profile;
using UnityEngine;
using static WeChatWASM.WXConvertCore;
namespace WeChatWASM
{
public class WeixinMiniGameSettingsEditor : MiniGameSettingsEditor
{
private Vector2 scrollRoot;
private bool foldBaseInfo = true;
private bool foldLoadingConfig = true;
private bool foldSDKOptions = true;
private bool foldDebugOptions = true;
private bool foldInstantGame = false;
private bool foldFontOptions = false;
private Dictionary<string, string> formInputData = new Dictionary<string, string>();
private Dictionary<string, int> formIntPopupData = new Dictionary<string, int>();
private Dictionary<string, bool> formCheckboxData = new Dictionary<string, bool>();
public Texture tex;
public override void OnMiniGameSettingsIMGUI(SerializedObject serializedObject, SerializedProperty miniGameProperty)
{
OnSettingsGUI(serializedObject, miniGameProperty);
}
public void OnSettingsGUI(SerializedObject serializedObject, SerializedProperty miniGameProperty)
{
loadData(serializedObject, miniGameProperty);
scrollRoot = EditorGUILayout.BeginScrollView(scrollRoot);
GUIStyle linkStyle = new GUIStyle(GUI.skin.label);
linkStyle.normal.textColor = Color.yellow;
linkStyle.hover.textColor = Color.yellow;
linkStyle.stretchWidth = false;
linkStyle.alignment = TextAnchor.UpperLeft;
linkStyle.wordWrap = true;
foldBaseInfo = EditorGUILayout.Foldout(foldBaseInfo, "基本信息");
if (foldBaseInfo)
{
EditorGUILayout.BeginVertical("frameBox", GUILayout.ExpandWidth(true));
formInput("appid", "游戏AppID");
formInput("cdn", "游戏资源CDN");
formInput("projectName", "小游戏项目名");
formIntPopup("orientation", "游戏方向", new[] { "Portrait", "Landscape", "LandscapeLeft", "LandscapeRight" }, new[] { 0, 1, 2, 3 });
formInput("memorySize", "UnityHeap预留内存(?)", "单位MB预分配内存值超休闲游戏256/中轻度496/重度游戏768需预估游戏最大UnityHeap值以防止内存自动扩容带来的峰值尖刺。预估方法请查看GIT文档《优化Unity WebGL的内存》");
EditorGUILayout.EndVertical();
}
foldLoadingConfig = EditorGUILayout.Foldout(foldLoadingConfig, "启动Loading配置");
if (foldLoadingConfig)
{
EditorGUILayout.BeginVertical("frameBox", GUILayout.ExpandWidth(true));
GUILayout.BeginHorizontal();
string targetBg = "bgImageSrc";
EditorGUILayout.LabelField(string.Empty, GUILayout.Width(10));
tex = (Texture)EditorGUILayout.ObjectField("启动背景图/视频封面", tex, typeof(Texture2D), false);
var currentBgSrc = AssetDatabase.GetAssetPath(tex);
if (!string.IsNullOrEmpty(currentBgSrc) && currentBgSrc != formInputData[targetBg])
{
formInputData[targetBg] = currentBgSrc;
saveData(serializedObject, miniGameProperty);
}
GUILayout.EndHorizontal();
formInput("videoUrl", "加载阶段视频URL");
formIntPopup("assetLoadType", "首包资源加载方式", new[] { "CDN", "小游戏包内" }, new[] { 0, 1 });
formCheckbox("compressDataPackage", "压缩首包资源(?)", "将首包资源Brotli压缩, 降低资源大小. 注意: 首次启动耗时可能会增加200ms, 仅推荐使用小游戏分包加载时节省包体大小使用");
formInput("bundleExcludeExtensions", "不自动缓存文件类型(?)", "(使用;分割)当请求url包含资源'cdn+StreamingAssets'时会自动缓存但StreamingAssets目录下不是所有文件都需缓存此选项配置不需要自动缓存的文件拓展名。默认值json");
formInput("bundleHashLength", "Bundle名称Hash长度(?)", "自定义Bundle文件名中hash部分长度默认值32用于缓存控制。");
formInput("preloadFiles", "预下载文件列表(?)", "使用;间隔,支持模糊匹配");
EditorGUILayout.EndVertical();
}
foldSDKOptions = EditorGUILayout.Foldout(foldSDKOptions, "SDK功能选项");
if (foldSDKOptions)
{
EditorGUILayout.BeginVertical("frameBox", GUILayout.ExpandWidth(true));
formCheckbox("useFriendRelation", "使用好友关系链");
formCheckbox("useMiniGameChat", "使用社交组件");
formCheckbox("preloadWXFont", "预加载微信字体(?)", "在game.js执行开始时预载微信系统字体运行期间可使用WX.GetWXFont获取微信字体");
formCheckbox("disableMultiTouch", "禁止多点触控");
EditorGUILayout.EndVertical();
}
foldDebugOptions = EditorGUILayout.Foldout(foldDebugOptions, "调试编译选项");
if (foldDebugOptions)
{
EditorGUILayout.BeginVertical("frameBox", GUILayout.ExpandWidth(true));
// formCheckbox("developBuild", "Development Build");
formCheckbox("autoProfile", "Auto connect Profiler");
formCheckbox("scriptOnly", "Scripts Only Build");
#if TUANJIE_2022_3_OR_NEWER
// TODO: if overwrite by OverwritePlayerSettings
bool UseIL2CPP = PlayerSettings.GetScriptingBackend(BuildTargetGroup.WeixinMiniGame) == ScriptingImplementation.IL2CPP;
#else
bool UseIL2CPP = true;
#endif
formCheckbox("il2CppOptimizeSize", "Il2Cpp Optimize Size(?)", "对应于Il2CppCodeGeneration选项勾选时使用OptimizeSize(默认推荐)生成代码小15%左右取消勾选则使用OptimizeSpeed。游戏中大量泛型集合的高频访问建议OptimizeSpeed在使用HybridCLR等第三方组件时只能用OptimizeSpeed。(Dotnet Runtime模式下该选项无效)", !UseIL2CPP);
formCheckbox("profilingFuncs", "Profiling Funcs");
formCheckbox("profilingMemory", "Profiling Memory");
GUI.enabled = false;
// WebGL2.0
GUILayout.BeginHorizontal();
EditorGUILayout.LabelField(string.Empty, GUILayout.Width(10));
GUILayout.Label("WebGL2.0(beta)", GUILayout.Width(140));
EditorGUILayout.Toggle(false, GUILayout.Width(20));
GUILayout.Label("Set in PlayerSettings Override!", GUILayout.Width(200));
GUILayout.EndHorizontal();
GUI.enabled = true;
formCheckbox("iOSPerformancePlus", "iOSPerformancePlus(?)", "是否使用iOS高性能+渲染方案有助于提升渲染兼容性、降低WebContent进程内存");
formCheckbox("EmscriptenGLX", "EmscriptenGLX(?)", "是否使用EmscriptenGLX渲染方案");
formCheckbox("iOSMetal", "iOSMetal(?)", "是否使用iOSMetal渲染方案需要开启iOS高性能+模式有助于提升运行性能降低iOS功耗");
formCheckbox("deleteStreamingAssets", "Clear Streaming Assets");
formCheckbox("cleanBuild", "Clean WebGL Build");
// formCheckbox("cleanCloudDev", "Clean Cloud Dev");
formCheckbox("fbslim", "首包资源优化(?)", "导出时自动清理UnityEditor默认打包但游戏项目从未使用的资源瘦身首包资源体积。团结引擎已无需开启该能力", UnityUtil.GetEngineVersion() > 0, (res) =>
{
var fbWin = EditorWindow.GetWindow(typeof(WXFbSettingWindow), false, "首包资源优化配置面板", true);
fbWin.minSize = new Vector2(680, 350);
fbWin.Show();
});
formCheckbox("autoAdaptScreen", "自适应屏幕尺寸(?)", "移动端旋转屏幕和PC端拉伸窗口时自动调整画布尺寸");
formCheckbox("showMonitorSuggestModal", "显示优化建议弹窗");
formCheckbox("enableProfileStats", "显示性能面板");
formCheckbox("enableRenderAnalysis", "显示渲染日志(dev only)");
{
formCheckbox("brotliMT", "brotli多线程压缩(?)", "开启多线程压缩可以提高出包速度但会降低压缩率。如若不使用wasm代码分包请勿用多线程出包上线");
}
EditorGUILayout.EndVertical();
}
if (WXConvertCore.IsInstantGameAutoStreaming())
{
foldInstantGame = EditorGUILayout.Foldout(foldInstantGame, "Instant Game - AutoStreaming");
if (foldInstantGame)
{
var automaticfillinstantgame = miniGameProperty.FindPropertyRelative("m_AutomaticFillInstantGame");
EditorGUILayout.BeginVertical("frameBox", GUILayout.ExpandWidth(true));
GUILayout.BeginHorizontal();
EditorGUILayout.LabelField(string.Empty, GUILayout.Width(10));
formCheckbox("m_AutomaticFillInstantGame", "自动填写AutoStreaming", "仅在开启AutoStreaming生效");
GUILayout.EndHorizontal();
formInput("bundlePathIdentifier", "Bundle Path Identifier");
formInput("dataFileSubPrefix", "Data File Sub Prefix");
EditorGUI.BeginDisabledGroup(true);
formCheckbox("autoUploadFirstBundle", "构建后自动上传首包(?)", "仅在开启AutoStreaming生效", true);
EditorGUI.EndDisabledGroup();
GUILayout.BeginHorizontal();
EditorGUILayout.LabelField(string.Empty, GUILayout.Width(10));
GUILayout.Label(new GUIContent("清理AS配置(?)", "如需关闭AutoStreaming选用默认发布方案则需要清理AS配置项目。"), GUILayout.Width(140));
EditorGUI.BeginDisabledGroup(WXConvertCore.IsInstantGameAutoStreaming());
if (GUILayout.Button(new GUIContent("恢复"), GUILayout.Width(60)))
{
var ProjectConf = miniGameProperty.FindPropertyRelative("ProjectConf");
string identifier = ProjectConf.FindPropertyRelative("bundlePathIdentifier").stringValue;
string[] identifiers = identifier.Split(";");
string idStr = "";
foreach (string id in identifiers)
{
if (id != "AS" && id != "CUS/CustomAB")
{
idStr += id + ";";
}
}
ProjectConf.FindPropertyRelative("bundlePathIdentifier").stringValue = idStr.Trim(';');
if (ProjectConf.FindPropertyRelative("dataFileSubPrefix").stringValue == "CUS")
{
ProjectConf.FindPropertyRelative("dataFileSubPrefix").stringValue = "";
}
loadData(serializedObject, miniGameProperty);
}
EditorGUI.EndDisabledGroup();
GUILayout.EndHorizontal();
EditorGUILayout.BeginHorizontal();
EditorGUILayout.LabelField(string.Empty);
if (GUILayout.Button(new GUIContent("了解Instant Game AutoStreaming", ""), linkStyle))
{
Application.OpenURL("https://github.com/wechat-miniprogram/minigame-unity-webgl-transform/blob/main/Design/InstantGameGuide.md");
}
EditorGUILayout.EndHorizontal();
EditorGUILayout.EndVertical();
}
}
{
foldFontOptions = EditorGUILayout.Foldout(foldFontOptions, "字体配置");
if (foldFontOptions)
{
EditorGUILayout.BeginVertical("frameBox", GUILayout.ExpandWidth(true));
formCheckbox("CJK_Unified_Ideographs", "基本汉字(?)", "Unicode [0x4e00, 0x9fff]");
formCheckbox("C0_Controls_and_Basic_Latin", "基本拉丁语(英文大小写、数字、英文标点)(?)", "Unicode [0x0, 0x7f]");
formCheckbox("CJK_Symbols_and_Punctuation", "中文标点符号(?)", "Unicode [0x3000, 0x303f]");
formCheckbox("General_Punctuation", "通用标点符号(?)", "Unicode [0x2000, 0x206f]");
formCheckbox("Enclosed_CJK_Letters_and_Months", "CJK字母及月份(?)", "Unicode [0x3200, 0x32ff]");
formCheckbox("Vertical_Forms", "中文竖排标点(?)", "Unicode [0xfe10, 0xfe1f]");
formCheckbox("CJK_Compatibility_Forms", "CJK兼容符号(?)", "Unicode [0xfe30, 0xfe4f]");
formCheckbox("Miscellaneous_Symbols", "杂项符号(?)", "Unicode [0x2600, 0x26ff]");
formCheckbox("CJK_Compatibility", "CJK特殊符号(?)", "Unicode [0x3300, 0x33ff]");
formCheckbox("Halfwidth_and_Fullwidth_Forms", "全角ASCII、全角中英文标点、半宽片假名、半宽平假名、半宽韩文字母(?)", "Unicode [0xff00, 0xffef]");
formCheckbox("Dingbats", "装饰符号(?)", "Unicode [0x2700, 0x27bf]");
formCheckbox("Letterlike_Symbols", "字母式符号(?)", "Unicode [0x2100, 0x214f]");
formCheckbox("Enclosed_Alphanumerics", "带圈或括号的字母数字(?)", "Unicode [0x2460, 0x24ff]");
formCheckbox("Number_Forms", "数字形式(?)", "Unicode [0x2150, 0x218f]");
formCheckbox("Currency_Symbols", "货币符号(?)", "Unicode [0x20a0, 0x20cf]");
formCheckbox("Arrows", "箭头(?)", "Unicode [0x2190, 0x21ff]");
formCheckbox("Geometric_Shapes", "几何图形(?)", "Unicode [0x25a0, 0x25ff]");
formCheckbox("Mathematical_Operators", "数学运算符号(?)", "Unicode [0x2200, 0x22ff]");
formInput("CustomUnicode", "自定义Unicode(?)", "将填入的所有字符强制加入字体预加载列表");
EditorGUILayout.EndVertical();
}
}
EditorGUILayout.EndScrollView();
saveData(serializedObject, miniGameProperty);
}
private void loadData(SerializedObject serializedObject, SerializedProperty miniGameProperty)
{
serializedObject.UpdateIfRequiredOrScript();
var ProjectConf = miniGameProperty.FindPropertyRelative("ProjectConf");
// Instant Game
if (WXConvertCore.IsInstantGameAutoStreaming())
{
var automaticfillinstantgame = miniGameProperty.FindPropertyRelative("m_AutomaticFillInstantGame");
if (automaticfillinstantgame.boolValue)
{
ProjectConf.FindPropertyRelative("CDN").stringValue = WXConvertCore.GetInstantGameAutoStreamingCDN();
if (!ProjectConf.FindPropertyRelative("bundlePathIdentifier").stringValue.Contains("AS;"))
{
ProjectConf.FindPropertyRelative("bundlePathIdentifier").stringValue += "AS;";
}
if (!ProjectConf.FindPropertyRelative("bundlePathIdentifier").stringValue.Contains("CUS/CustomAB;"))
{
ProjectConf.FindPropertyRelative("bundlePathIdentifier").stringValue += "CUS/CustomAB;";
}
ProjectConf.FindPropertyRelative("dataFileSubPrefix").stringValue = "CUS";
}
}
setData("projectName", ProjectConf.FindPropertyRelative("projectName").stringValue);
setData("appid", ProjectConf.FindPropertyRelative("Appid").stringValue);
setData("cdn", ProjectConf.FindPropertyRelative("CDN").stringValue);
setData("assetLoadType", ProjectConf.FindPropertyRelative("assetLoadType").intValue);
setData("compressDataPackage", ProjectConf.FindPropertyRelative("compressDataPackage").boolValue);
setData("videoUrl", ProjectConf.FindPropertyRelative("VideoUrl").stringValue);
setData("orientation", (int)ProjectConf.FindPropertyRelative("Orientation").enumValueIndex);
//setData("dst", ProjectConf.FindPropertyRelative("relativeDST").stringValue);
setData("bundleHashLength", ProjectConf.FindPropertyRelative("bundleHashLength").intValue.ToString());
setData("bundlePathIdentifier", ProjectConf.FindPropertyRelative("bundlePathIdentifier").stringValue);
setData("bundleExcludeExtensions", ProjectConf.FindPropertyRelative("bundleExcludeExtensions").stringValue);
setData("preloadFiles", ProjectConf.FindPropertyRelative("preloadFiles").stringValue);
var CompileOptions = miniGameProperty.FindPropertyRelative("CompileOptions");
// setData("developBuild", CompileOptions.FindPropertyRelative("DevelopBuild").boolValue);
setData("autoProfile", CompileOptions.FindPropertyRelative("AutoProfile").boolValue);
setData("scriptOnly", CompileOptions.FindPropertyRelative("ScriptOnly").boolValue);
setData("il2CppOptimizeSize", CompileOptions.FindPropertyRelative("Il2CppOptimizeSize").boolValue);
setData("profilingFuncs", CompileOptions.FindPropertyRelative("profilingFuncs").boolValue);
setData("profilingMemory", CompileOptions.FindPropertyRelative("ProfilingMemory").boolValue);
setData("deleteStreamingAssets", CompileOptions.FindPropertyRelative("DeleteStreamingAssets").boolValue);
setData("cleanBuild", CompileOptions.FindPropertyRelative("CleanBuild").boolValue);
setData("customNodePath", CompileOptions.FindPropertyRelative("CustomNodePath").stringValue);
setData("webgl2", CompileOptions.FindPropertyRelative("Webgl2").boolValue);
setData("iOSPerformancePlus", CompileOptions.FindPropertyRelative("enableIOSPerformancePlus").boolValue);
setData("iOSMetal", CompileOptions.FindPropertyRelative("enableiOSMetal").boolValue);
setData("EmscriptenGLX", CompileOptions.FindPropertyRelative("enableEmscriptenGLX").boolValue);
setData("fbslim", CompileOptions.FindPropertyRelative("fbslim").boolValue);
var SDKOptions = miniGameProperty.FindPropertyRelative("SDKOptions");
setData("useFriendRelation", SDKOptions.FindPropertyRelative("UseFriendRelation").boolValue);
setData("useMiniGameChat", SDKOptions.FindPropertyRelative("UseMiniGameChat").boolValue);
setData("preloadWXFont", SDKOptions.FindPropertyRelative("PreloadWXFont").boolValue);
setData("disableMultiTouch", SDKOptions.FindPropertyRelative("disableMultiTouch").boolValue);
setData("bgImageSrc", ProjectConf.FindPropertyRelative("bgImageSrc").stringValue);
tex = AssetDatabase.LoadAssetAtPath<Texture>(ProjectConf.FindPropertyRelative("bgImageSrc").stringValue);
setData("memorySize", ProjectConf.FindPropertyRelative("MemorySize").intValue.ToString());
setData("hideAfterCallMain", ProjectConf.FindPropertyRelative("HideAfterCallMain").boolValue);
setData("dataFileSubPrefix", ProjectConf.FindPropertyRelative("dataFileSubPrefix").stringValue);
setData("maxStorage", ProjectConf.FindPropertyRelative("maxStorage").intValue.ToString());
setData("defaultReleaseSize", ProjectConf.FindPropertyRelative("defaultReleaseSize").intValue.ToString());
setData("texturesHashLength", ProjectConf.FindPropertyRelative("texturesHashLength").intValue.ToString());
setData("texturesPath", ProjectConf.FindPropertyRelative("texturesPath").stringValue);
setData("needCacheTextures", ProjectConf.FindPropertyRelative("needCacheTextures").boolValue);
setData("loadingBarWidth", ProjectConf.FindPropertyRelative("loadingBarWidth").intValue.ToString());
setData("needCheckUpdate", ProjectConf.FindPropertyRelative("needCheckUpdate").boolValue);
setData("disableHighPerformanceFallback", ProjectConf.FindPropertyRelative("disableHighPerformanceFallback").boolValue);
setData("autoAdaptScreen", CompileOptions.FindPropertyRelative("autoAdaptScreen").boolValue);
setData("showMonitorSuggestModal", CompileOptions.FindPropertyRelative("showMonitorSuggestModal").boolValue);
setData("enableProfileStats", CompileOptions.FindPropertyRelative("enableProfileStats").boolValue);
setData("enableRenderAnalysis", CompileOptions.FindPropertyRelative("enableRenderAnalysis").boolValue);
setData("brotliMT", CompileOptions.FindPropertyRelative("brotliMT").boolValue);
setData("autoUploadFirstBundle", true);
setData("m_AutomaticFillInstantGame", miniGameProperty.FindPropertyRelative("m_AutomaticFillInstantGame").boolValue);
// font options
var FontOptions = miniGameProperty.FindPropertyRelative("FontOptions");
setData("CJK_Unified_Ideographs", FontOptions.FindPropertyRelative("CJK_Unified_Ideographs").boolValue);
setData("C0_Controls_and_Basic_Latin", FontOptions.FindPropertyRelative("C0_Controls_and_Basic_Latin").boolValue);
setData("CJK_Symbols_and_Punctuation", FontOptions.FindPropertyRelative("CJK_Symbols_and_Punctuation").boolValue);
setData("General_Punctuation", FontOptions.FindPropertyRelative("General_Punctuation").boolValue);
setData("Enclosed_CJK_Letters_and_Months", FontOptions.FindPropertyRelative("Enclosed_CJK_Letters_and_Months").boolValue);
setData("Vertical_Forms", FontOptions.FindPropertyRelative("Vertical_Forms").boolValue);
setData("CJK_Compatibility_Forms", FontOptions.FindPropertyRelative("CJK_Compatibility_Forms").boolValue);
setData("Miscellaneous_Symbols", FontOptions.FindPropertyRelative("Miscellaneous_Symbols").boolValue);
setData("CJK_Compatibility", FontOptions.FindPropertyRelative("CJK_Compatibility").boolValue);
setData("Halfwidth_and_Fullwidth_Forms", FontOptions.FindPropertyRelative("Halfwidth_and_Fullwidth_Forms").boolValue);
setData("Dingbats", FontOptions.FindPropertyRelative("Dingbats").boolValue);
setData("Letterlike_Symbols", FontOptions.FindPropertyRelative("Letterlike_Symbols").boolValue);
setData("Enclosed_Alphanumerics", FontOptions.FindPropertyRelative("Enclosed_Alphanumerics").boolValue);
setData("Number_Forms", FontOptions.FindPropertyRelative("Number_Forms").boolValue);
setData("Currency_Symbols", FontOptions.FindPropertyRelative("Currency_Symbols").boolValue);
setData("Arrows", FontOptions.FindPropertyRelative("Arrows").boolValue);
setData("Geometric_Shapes", FontOptions.FindPropertyRelative("Geometric_Shapes").boolValue);
setData("Mathematical_Operators", FontOptions.FindPropertyRelative("Mathematical_Operators").boolValue);
setData("CustomUnicode", FontOptions.FindPropertyRelative("CustomUnicode").stringValue);
}
private void saveData(SerializedObject serializedObject, SerializedProperty miniGameProperty)
{
serializedObject.UpdateIfRequiredOrScript();
var ProjectConf = miniGameProperty.FindPropertyRelative("ProjectConf");
ProjectConf.FindPropertyRelative("projectName").stringValue = getDataInput("projectName");
ProjectConf.FindPropertyRelative("Appid").stringValue = getDataInput("appid");
ProjectConf.FindPropertyRelative("CDN").stringValue = getDataInput("cdn");
ProjectConf.FindPropertyRelative("assetLoadType").intValue = getDataPop("assetLoadType");
ProjectConf.FindPropertyRelative("compressDataPackage").boolValue = getDataCheckbox("compressDataPackage");
ProjectConf.FindPropertyRelative("VideoUrl").stringValue = getDataInput("videoUrl");
ProjectConf.FindPropertyRelative("Orientation").enumValueIndex = getDataPop("orientation");
ProjectConf.FindPropertyRelative("relativeDST").stringValue = serializedObject.FindProperty("m_BuildPath").stringValue;
ProjectConf.FindPropertyRelative("DST").stringValue = GetAbsolutePath(config.ProjectConf.relativeDST);
ProjectConf.FindPropertyRelative("bundleHashLength").intValue = int.Parse(getDataInput("bundleHashLength"));
ProjectConf.FindPropertyRelative("bundlePathIdentifier").stringValue = getDataInput("bundlePathIdentifier");
ProjectConf.FindPropertyRelative("bundleExcludeExtensions").stringValue = getDataInput("bundleExcludeExtensions");
ProjectConf.FindPropertyRelative("preloadFiles").stringValue = getDataInput("preloadFiles");
var CompileOptions = miniGameProperty.FindPropertyRelative("CompileOptions");
CompileOptions.FindPropertyRelative("DevelopBuild").boolValue = serializedObject.FindProperty("m_PlatformSettings").FindPropertyRelative("m_Development").boolValue;
CompileOptions.FindPropertyRelative("AutoProfile").boolValue = getDataCheckbox("autoProfile");
CompileOptions.FindPropertyRelative("ScriptOnly").boolValue = getDataCheckbox("scriptOnly");
CompileOptions.FindPropertyRelative("Il2CppOptimizeSize").boolValue = getDataCheckbox("il2CppOptimizeSize");
CompileOptions.FindPropertyRelative("profilingFuncs").boolValue = getDataCheckbox("profilingFuncs");
CompileOptions.FindPropertyRelative("ProfilingMemory").boolValue = getDataCheckbox("profilingMemory");
CompileOptions.FindPropertyRelative("DeleteStreamingAssets").boolValue = getDataCheckbox("deleteStreamingAssets");
CompileOptions.FindPropertyRelative("CleanBuild").boolValue = getDataCheckbox("cleanBuild");
CompileOptions.FindPropertyRelative("CustomNodePath").stringValue = getDataInput("customNodePath");
CompileOptions.FindPropertyRelative("Webgl2").boolValue = getDataCheckbox("webgl2");
CompileOptions.FindPropertyRelative("enableIOSPerformancePlus").boolValue = getDataCheckbox("iOSPerformancePlus");
CompileOptions.FindPropertyRelative("enableiOSMetal").boolValue = getDataCheckbox("iOSMetal");
CompileOptions.FindPropertyRelative("enableEmscriptenGLX").boolValue = getDataCheckbox("EmscriptenGLX");
CompileOptions.FindPropertyRelative("fbslim").boolValue = getDataCheckbox("fbslim");
var SDKOptions = miniGameProperty.FindPropertyRelative("SDKOptions");
SDKOptions.FindPropertyRelative("UseFriendRelation").boolValue = getDataCheckbox("useFriendRelation");
SDKOptions.FindPropertyRelative("UseMiniGameChat").boolValue = getDataCheckbox("useMiniGameChat");
SDKOptions.FindPropertyRelative("PreloadWXFont").boolValue = getDataCheckbox("preloadWXFont");
SDKOptions.FindPropertyRelative("disableMultiTouch").boolValue = getDataCheckbox("disableMultiTouch");
ProjectConf.FindPropertyRelative("bgImageSrc").stringValue = getDataInput("bgImageSrc");
ProjectConf.FindPropertyRelative("MemorySize").intValue = int.Parse(getDataInput("memorySize"));
ProjectConf.FindPropertyRelative("HideAfterCallMain").boolValue = getDataCheckbox("hideAfterCallMain");
ProjectConf.FindPropertyRelative("dataFileSubPrefix").stringValue = getDataInput("dataFileSubPrefix");
ProjectConf.FindPropertyRelative("maxStorage").intValue = int.Parse(getDataInput("maxStorage"));
ProjectConf.FindPropertyRelative("defaultReleaseSize").intValue = int.Parse(getDataInput("defaultReleaseSize"));
ProjectConf.FindPropertyRelative("texturesHashLength").intValue = int.Parse(getDataInput("texturesHashLength"));
ProjectConf.FindPropertyRelative("texturesPath").stringValue = getDataInput("texturesPath");
ProjectConf.FindPropertyRelative("needCacheTextures").boolValue = getDataCheckbox("needCacheTextures");
ProjectConf.FindPropertyRelative("loadingBarWidth").intValue = int.Parse(getDataInput("loadingBarWidth"));
ProjectConf.FindPropertyRelative("needCheckUpdate").boolValue = getDataCheckbox("needCheckUpdate");
ProjectConf.FindPropertyRelative("disableHighPerformanceFallback").boolValue = getDataCheckbox("disableHighPerformanceFallback");
CompileOptions.FindPropertyRelative("autoAdaptScreen").boolValue = getDataCheckbox("autoAdaptScreen");
CompileOptions.FindPropertyRelative("showMonitorSuggestModal").boolValue = getDataCheckbox("showMonitorSuggestModal");
CompileOptions.FindPropertyRelative("enableProfileStats").boolValue = getDataCheckbox("enableProfileStats");
CompileOptions.FindPropertyRelative("enableRenderAnalysis").boolValue = getDataCheckbox("enableRenderAnalysis");
CompileOptions.FindPropertyRelative("brotliMT").boolValue = getDataCheckbox("brotliMT");
// font options
var FontOptions = miniGameProperty.FindPropertyRelative("FontOptions");
FontOptions.FindPropertyRelative("CJK_Unified_Ideographs").boolValue = getDataCheckbox("CJK_Unified_Ideographs");
FontOptions.FindPropertyRelative("C0_Controls_and_Basic_Latin").boolValue = getDataCheckbox("C0_Controls_and_Basic_Latin");
FontOptions.FindPropertyRelative("CJK_Symbols_and_Punctuation").boolValue = getDataCheckbox("CJK_Symbols_and_Punctuation");
FontOptions.FindPropertyRelative("General_Punctuation").boolValue = getDataCheckbox("General_Punctuation");
FontOptions.FindPropertyRelative("Enclosed_CJK_Letters_and_Months").boolValue = getDataCheckbox("Enclosed_CJK_Letters_and_Months");
FontOptions.FindPropertyRelative("Vertical_Forms").boolValue = getDataCheckbox("Vertical_Forms");
FontOptions.FindPropertyRelative("CJK_Compatibility_Forms").boolValue = getDataCheckbox("CJK_Compatibility_Forms");
FontOptions.FindPropertyRelative("Miscellaneous_Symbols").boolValue = getDataCheckbox("Miscellaneous_Symbols");
FontOptions.FindPropertyRelative("CJK_Compatibility").boolValue = getDataCheckbox("CJK_Compatibility");
FontOptions.FindPropertyRelative("Halfwidth_and_Fullwidth_Forms").boolValue = getDataCheckbox("Halfwidth_and_Fullwidth_Forms");
FontOptions.FindPropertyRelative("Dingbats").boolValue = getDataCheckbox("Dingbats");
FontOptions.FindPropertyRelative("Letterlike_Symbols").boolValue = getDataCheckbox("Letterlike_Symbols");
FontOptions.FindPropertyRelative("Enclosed_Alphanumerics").boolValue = getDataCheckbox("Enclosed_Alphanumerics");
FontOptions.FindPropertyRelative("Number_Forms").boolValue = getDataCheckbox("Number_Forms");
FontOptions.FindPropertyRelative("Currency_Symbols").boolValue = getDataCheckbox("Currency_Symbols");
FontOptions.FindPropertyRelative("Arrows").boolValue = getDataCheckbox("Arrows");
FontOptions.FindPropertyRelative("Geometric_Shapes").boolValue = getDataCheckbox("Geometric_Shapes");
FontOptions.FindPropertyRelative("Mathematical_Operators").boolValue = getDataCheckbox("Mathematical_Operators");
FontOptions.FindPropertyRelative("CustomUnicode").stringValue = getDataInput("CustomUnicode");
FontOptions.FindPropertyRelative("Arrows").boolValue = getDataCheckbox("Arrows");
FontOptions.FindPropertyRelative("Geometric_Shapes").boolValue = getDataCheckbox("Geometric_Shapes");
FontOptions.FindPropertyRelative("Mathematical_Operators").boolValue = getDataCheckbox("Mathematical_Operators");
FontOptions.FindPropertyRelative("CustomUnicode").stringValue = getDataInput("CustomUnicode");
miniGameProperty.FindPropertyRelative("m_AutomaticFillInstantGame").boolValue = getDataCheckbox("m_AutomaticFillInstantGame");
serializedObject.ApplyModifiedProperties();
}
private bool getDataCheckbox(string target)
{
if (formCheckboxData.ContainsKey(target))
return formCheckboxData[target];
return false;
}
private string getDataInput(string target)
{
if (formInputData.ContainsKey(target))
return formInputData[target];
return "";
}
private int getDataPop(string target)
{
if (formIntPopupData.ContainsKey(target))
return formIntPopupData[target];
return 0;
}
private void setData(string target, string value)
{
if (formInputData.ContainsKey(target))
{
formInputData[target] = value;
}
else
{
formInputData.Add(target, value);
}
}
private void setData(string target, bool value)
{
if (formCheckboxData.ContainsKey(target))
{
formCheckboxData[target] = value;
}
else
{
formCheckboxData.Add(target, value);
}
}
private void setData(string target, int value)
{
if (formIntPopupData.ContainsKey(target))
{
formIntPopupData[target] = value;
}
else
{
formIntPopupData.Add(target, value);
}
}
private void formInput(string target, string label, string help = null)
{
if (!formInputData.ContainsKey(target))
{
formInputData[target] = "";
}
GUILayout.BeginHorizontal();
EditorGUILayout.LabelField(string.Empty, GUILayout.Width(10));
if (help == null)
{
GUILayout.Label(label, GUILayout.Width(140));
}
else
{
GUILayout.Label(new GUIContent(label, help), GUILayout.Width(140));
}
formInputData[target] = GUILayout.TextField(formInputData[target], GUILayout.MaxWidth(EditorGUIUtility.currentViewWidth - 195));
GUILayout.EndHorizontal();
}
private void formCheckbox(string target, string label, string help = null, bool disable = false, Action<bool> setting = null)
{
if (!formCheckboxData.ContainsKey(target))
{
formCheckboxData[target] = false;
}
GUILayout.BeginHorizontal();
EditorGUILayout.LabelField(string.Empty, GUILayout.Width(10));
if (help == null)
{
GUILayout.Label(label, GUILayout.Width(140));
}
else
{
GUILayout.Label(new GUIContent(label, help), GUILayout.Width(140));
}
EditorGUI.BeginDisabledGroup(disable);
formCheckboxData[target] = EditorGUILayout.Toggle(disable ? false : formCheckboxData[target]);
if (setting != null)
{
EditorGUILayout.LabelField("", GUILayout.Width(10));
// <20><><EFBFBD>ð<EFBFBD>ť
if (GUILayout.Button(new GUIContent("<22><><EFBFBD><EFBFBD>"), GUILayout.Width(40), GUILayout.Height(18)))
{
setting?.Invoke(true);
}
EditorGUILayout.LabelField("", GUILayout.MinWidth(10));
}
EditorGUI.EndDisabledGroup();
if (setting == null)
EditorGUILayout.LabelField(string.Empty);
GUILayout.EndHorizontal();
}
private void formIntPopup(string target, string label, string[] options, int[] values)
{
if (!formIntPopupData.ContainsKey(target))
{
formIntPopupData[target] = 0;
}
GUILayout.BeginHorizontal();
EditorGUILayout.LabelField(string.Empty, GUILayout.Width(10));
GUILayout.Label(label, GUILayout.Width(140));
formIntPopupData[target] = EditorGUILayout.IntPopup(formIntPopupData[target], options, values, GUILayout.MaxWidth(EditorGUIUtility.currentViewWidth - 195));
GUILayout.EndHorizontal();
}
public static bool IsAbsolutePath(string path)
{
// 检查是否为空或空白
if (string.IsNullOrWhiteSpace(path))
{
return false;
}
// 在 Windows 上,检查驱动器字母或网络路径
if (Application.platform == RuntimePlatform.WindowsEditor && Path.IsPathRooted(path))
{
return true;
}
// 在 Unix/Linux 和 macOS 上,检查是否以 '/' 开头
if (Application.platform == RuntimePlatform.OSXEditor && path.StartsWith("/"))
{
return true;
}
return false; // 否则为相对路径
}
public static string GetAbsolutePath(string path)
{
if (IsAbsolutePath(path))
{
return path;
}
string projectRootPath = System.IO.Path.GetFullPath(Application.dataPath + "/../");
return Path.Combine(projectRootPath, path);
}
}
}
#endif

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 58db49e1ed51d96fe75dd73450caca09
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,151 @@
#if TUANJIE_1_4_OR_NEWER
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using UnityEditor;
using UnityEditor.Build.Profile;
using UnityEngine;
using UnityEngine.Rendering;
namespace WeChatWASM
{
[InitializeOnLoad]
public static class WeixinSubTargetManager
{
static WeixinSubTargetManager()
{
MiniGameSubplatformManager.RegisterSubplatform(new WeixinSubplatformInterface());
}
}
public class WeixinSubplatformInterface : MiniGameSubplatformInterface
{
public override string GetSubplatformName()
{
return "WeChat:΢ÐÅСÓÎÏ·";
}
public override MiniGameSettings GetSubplatformSettings()
{
return new WeixinMiniGameSettings(new WeixinMiniGameSettingsEditor());
}
public override BuildMiniGameError Build(BuildProfile buildProfile)
{
// Useless
return BuildMiniGameError.InvalidInput;
}
public override BuildMiniGameError Build(BuildProfile buildProfile, BuildOptions options)
{
var bcLibPath = Path.GetFullPath(Path.Combine("Packages", "com.qq.weixin.minigame", "Editor", "BuildProfile", "lib", "libwx-metal-cpp.bc"));
var jsLibPath = Path.GetFullPath(Path.Combine("Packages", "com.qq.weixin.minigame", "Editor", "BuildProfile", "lib", "mtl_library.jslib"));
string libPath = bcLibPath + ';' + jsLibPath;
EditorUtility.SetMiniGameGfxLibraryPath(libPath);
WeixinMiniGameSettings settings = buildProfile.miniGameSettings as WeixinMiniGameSettings;
BuildMiniGameError buildMiniGameError = BuildMiniGameError.Unknown;
bool preprocessSuccess = WechatBuildPreprocess(buildProfile);
if (!preprocessSuccess)
{
return BuildMiniGameError.InvalidInput;
}
if (settings is not null)
{
settings.FillAutoStreamingAutomatically();
if (settings.PreprocessBuild(buildProfile, options))
{
var error = CallDoExport(buildProfile);
int enumIntValue = Convert.ToInt32(error);
switch (enumIntValue)
{
case 0: // SUCCEED
{
WeixinMiniGameSettings.AutoStreamingLoad();
buildMiniGameError = BuildMiniGameError.Succeeded;
break;
}
case 2: // BUILD_WEBGL_FAILED
{
buildMiniGameError = BuildMiniGameError.PlayerBuildFailed;
break;
}
case 1: // NODE_NOT_FOUND
default:
{
buildMiniGameError = BuildMiniGameError.Unknown;
break;
}
}
}
}
return buildMiniGameError;
}
private WXConvertCore.WXExportError CallDoExport(BuildProfile buildProfile)
{
WXEditorScriptObject config = UnityUtil.GetEditorConf();
WeixinMiniGameSettings weixinSettings = buildProfile.miniGameSettings as WeixinMiniGameSettings;
config.ProjectConf = weixinSettings.ProjectConf;
config.SDKOptions = weixinSettings.SDKOptions;
config.CompileOptions = weixinSettings.CompileOptions;
config.CompressTexture = weixinSettings.CompressTexture;
config.PlayerPrefsKeys = weixinSettings.PlayerPrefsKeys;
config.FontOptions = weixinSettings.FontOptions;
EditorUtility.SetDirty(config);
AssetDatabase.SaveAssets();
return WXConvertCore.DoExport();
}
private static bool WechatBuildPreprocess(BuildProfile buildProfile)
{
// Check GFX API and Color Space
if (buildProfile != null)
{
PlayerSettings playerSettings = buildProfile.playerSettings;
// Global PlayerSettings
ColorSpace colorSpace = PlayerSettings.colorSpace;
GraphicsDeviceType[] apis = PlayerSettings.GetGraphicsAPIs(buildProfile.buildTarget);
bool isAutomatic = PlayerSettings.GetUseDefaultGraphicsAPIs(buildProfile.buildTarget);
if (playerSettings != null)
{
// BuildProfile PlayerSettings Override
colorSpace = PlayerSettings.GetColorSpace_Internal(playerSettings);
apis = PlayerSettings.GetGraphicsAPIs_Internal(playerSettings, buildProfile.buildTarget);
isAutomatic = PlayerSettings.GetUseDefaultGraphicsAPIs_Internal(playerSettings, buildProfile.buildTarget);
// set override templatePath
var absolutePath = Path.GetFullPath(Path.Combine("Packages", "com.qq.weixin.minigame", "WebGLTemplates/WXTemplate2022TJ"));
if (!Directory.Exists(absolutePath))
absolutePath = Path.GetFullPath(Path.Combine(Application.dataPath, "WebGLTemplates/WXTemplate2022TJ"));
if (Directory.Exists(absolutePath))
PlayerSettings.MiniGame.SetTemplatePath_Internal(playerSettings, $"PATH:{absolutePath}");
PlayerSettings.MiniGame.SetThreadsSupport_Internal(playerSettings, false);
PlayerSettings.MiniGame.SetCompressionFormat_Internal(playerSettings, MiniGameCompressionFormat.Disabled);
PlayerSettings.MiniGame.SetLinkerTarget_Internal(playerSettings, MiniGameLinkerTarget.Wasm);
PlayerSettings.MiniGame.SetDataCaching_Internal(playerSettings, false);
PlayerSettings.MiniGame.SetDebugSymbolMode_Internal(playerSettings, MiniGameDebugSymbolMode.External);
PlayerSettings.SetRunInBackground_Internal(playerSettings, false);
}
return true;
}
else
{
throw new InvalidOperationException("Build profile has not been initialized.");
}
}
}
}
#endif

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 842ed9c7f2999a4701a8d6fc5f4eb828
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -186,7 +186,7 @@ namespace WeChatWASM
this.formCheckbox("webgl2", "WebGL2.0");
this.formCheckbox("iOSPerformancePlus", "iOSPerformancePlus(?)", "是否使用iOS高性能+渲染方案有助于提升渲染兼容性、降低WebContent进程内存");
this.formCheckbox("EmscriptenGLX", "EmscriptenGLX(?)", "是否使用EmscriptenGLX渲染方案");
// this.formCheckbox("iOSMetal", "iOSMetal(?)", "是否使用iOSMetal渲染方案需要开启iOS高性能+模式有助于提升运行性能降低iOS功耗");
this.formCheckbox("iOSMetal", "iOSMetal(?)", "是否使用iOSMetal渲染方案需要开启iOS高性能+模式有助于提升运行性能降低iOS功耗");
this.formCheckbox("deleteStreamingAssets", "Clear Streaming Assets");
this.formCheckbox("cleanBuild", "Clean WebGL Build");
// this.formCheckbox("cleanCloudDev", "Clean Cloud Dev");

View File

@ -2,7 +2,7 @@ namespace WeChatWASM
{
public class WXPluginVersion
{
public static string pluginVersion = "202509160800"; // 这一行不要改他,导出的时候会自动替换
public static string pluginVersion = "202509190936"; // 这一行不要改他,导出的时候会自动替换
}
public class WXPluginConf

Binary file not shown.

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 785f17acd70f11683ea185abb2b70992
guid: 6d452b868804a329c42cf912ab16c2be
DefaultImporter:
externalObjects: {}
userData:

View File

@ -627,9 +627,6 @@ mergeInto(LibraryManager.library, {
stringToUTF8(returnStr, buffer, bufferSize);
return buffer;
},
WXSetSyncReadCacheEnabled: function(enabled) {
window.WXWASMSDK.WXSetSyncReadCacheEnabled(enabled);
},
WXGetPluginCachePath: function() {
var returnStr = window.WXWASMSDK.WXGetPluginCachePath();
var bufferSize = lengthBytesUTF8(returnStr || '') + 1;

View File

@ -51,6 +51,7 @@ var WXAssetBundleLibrary = {
WXFS.msg = "";
WXFS.fd2wxStream = new Map;
WXFS.path2fd = new Map;
WXFS.refRecord = new Map;
WXFS.fs = wx.getFileSystemManager();
WXFS.nowfd = FS.MAX_OPEN_FDS + 1;
WXFS.isWXAssetBundle = function(url){
@ -308,6 +309,9 @@ var WXAssetBundleLibrary = {
}
if(!WXFS.disk.has(path)){
WXFS.disk.set(path, 0);
WXFS.refRecord.set(path, 1);
} else {
WXFS.refRecord.set(path, WXFS.refRecord.get(path) + 1);
}
return true;
},
@ -315,11 +319,17 @@ var WXAssetBundleLibrary = {
UnloadbyPath: function (ptr) {
var path = WXFS.url2path(UTF8ToString(ptr));
var fd = WXFS.path2fd.get(path);
if(WXFS.cache.has(fd)){
WXFS.cache.delete(fd);
}
if(WXFS.disk.has(path)){
WXFS.disk.delete(path);
var refCount = WXFS.refRecord.get(path);
if(!refCount) return;
refCount -= 1;
WXFS.refRecord.set(path, refCount);
if(!refCount){
if(WXFS.cache.has(fd)){
WXFS.cache.delete(fd);
}
if(WXFS.disk.has(path)){
WXFS.disk.delete(path);
}
}
},

Binary file not shown.

Binary file not shown.

View File

@ -3139,6 +3139,11 @@
选填部分活动、功能允许接收自定义query参数请参阅渠道说明默认可不填
</summary>
</member>
<member name="F:WeChatWASM.GetGameExptInfoSuccessCallbackResult.list">
<summary>
结果对象的json字符串各项为实验的相关信息
</summary>
</member>
<member name="F:WeChatWASM.VirtualPaymentError.errMsg">
错误信息
@ -3589,6 +3594,26 @@
宽度单位px
</summary>
</member>
<member name="F:WeChatWASM.OfficialComponentsInfo.notificationComponentInfo">
<summary>
通知组件信息
</summary>
</member>
<member name="F:WeChatWASM.OfficialComponentInfo.boundingClientRect">
<summary>
组件的布局位置信息
</summary>
</member>
<member name="F:WeChatWASM.OfficialComponentInfo.isVisible">
<summary>
组件是否显示
</summary>
</member>
<member name="F:WeChatWASM.OfficialComponentInfo.name">
<summary>
组件的名称
</summary>
</member>
<member name="F:WeChatWASM.GetStorageInfoSyncOption.currentSize">
<summary>
当前占用的空间大小, 单位 KB
@ -3911,7 +3936,7 @@
</member>
<member name="F:WeChatWASM.DownloadFileOption.enableProfile">
<summary>
是否开启 profile,默认开启。开启后可在接口回调的 res.profile 中查看性能调试信息。
是否开启 profile。iOS 和 Android 端默认开启,其他端暂不支持。开启后可在接口回调的 res.profile 中查看性能调试信息。
</summary>
</member>
<member name="F:WeChatWASM.DownloadFileOption.enableQuic">
@ -3937,12 +3962,6 @@
超时时间,单位为毫秒,默认值为 60000 即一分钟。
</summary>
</member>
<member name="F:WeChatWASM.DownloadFileOption.useHighPerformanceMode">
<summary>
需要基础库: `3.4.1`
使用高性能模式,暂仅支持 Android默认关闭。该模式下有更优的网络性能表现。
</summary>
</member>
<member name="F:WeChatWASM.GeneralCallbackResult.errMsg">
<summary>
错误信息
@ -3956,7 +3975,7 @@
<member name="F:WeChatWASM.DownloadFileSuccessCallbackResult.profile">
<summary>
需要基础库: `2.10.4`
网络请求过程中一些调试信息,[查看详细说明](https://developers.weixin.qq.com/miniprogram/dev/framework/performance/network.html)
网络请求过程中一些调试信息,[查看详细说明](https://developers.weixin.qq.com/miniprogram/dev/framework/performance/network.html)。目前 iOS 和 Android 端支持。
</summary>
</member>
<member name="F:WeChatWASM.DownloadFileSuccessCallbackResult.statusCode">
@ -3991,12 +4010,12 @@
</member>
<member name="F:WeChatWASM.RequestProfile.domainLookUpEnd">
<summary>
DNS 域名查询完成的时间,如果使用了本地缓存(即无 DNS 查询)或持久连接,则与 fetchStart 值相等
Local DNS 域名查询完成的时间,如果使用了本地缓存(即无 DNS 查询)或持久连接,则与 fetchStart 值相等
</summary>
</member>
<member name="F:WeChatWASM.RequestProfile.domainLookUpStart">
<summary>
DNS 域名查询开始的时间,如果使用了本地缓存(即无 DNS 查询)或持久连接,则与 fetchStart 值相等
Local DNS 域名查询开始的时间,如果使用了本地缓存(即无 DNS 查询)或持久连接,则与 fetchStart 值相等
</summary>
</member>
<member name="F:WeChatWASM.RequestProfile.downstreamThroughputKbpsEstimate">
@ -4014,11 +4033,29 @@
组件准备好使用 HTTP 请求抓取资源的时间,这发生在检查本地缓存之前
</summary>
</member>
<member name="F:WeChatWASM.RequestProfile.httpDNSDomainLookUpEnd">
<summary>
需要基础库: `3.8.9`
httpDNS 完成查询的时间。仅当开启 httpDNS 功能时返回该字段。目前仅wx.request接口支持
</summary>
</member>
<member name="F:WeChatWASM.RequestProfile.httpDNSDomainLookUpStart">
<summary>
需要基础库: `3.8.9`
httpDNS 开始查询的时间。仅当开启 httpDNS 功能时返回该字段。目前仅wx.request接口支持
</summary>
</member>
<member name="F:WeChatWASM.RequestProfile.httpRttEstimate">
<summary>
协议层根据多个请求评估当前网络的 rtt仅供参考
</summary>
</member>
<member name="F:WeChatWASM.RequestProfile.invokeStart">
<summary>
需要基础库: `3.8.10`
调用接口的时间。
</summary>
</member>
<member name="F:WeChatWASM.RequestProfile.peerIP">
<summary>
当前请求的IP
@ -4034,6 +4071,18 @@
使用协议类型有效值http1.1, h2, quic, unknown
</summary>
</member>
<member name="F:WeChatWASM.RequestProfile.queueEnd">
<summary>
需要基础库: `3.8.10`
结束排队的时间。达到并行上限时才需要排队。如果未发生排队,则该字段和 queueStart 字段值相同
</summary>
</member>
<member name="F:WeChatWASM.RequestProfile.queueStart">
<summary>
需要基础库: `3.8.10`
开始排队的时间。达到并行上限时才需要排队。
</summary>
</member>
<member name="F:WeChatWASM.RequestProfile.receivedBytedCount">
<summary>
收到字节数
@ -5534,6 +5583,26 @@
预告状态0可用 1取消 2已用
</summary>
</member>
<member name="F:WeChatWASM.GetChatToolInfoSuccessCallbackResult.cloudID">
<summary>
敏感数据对应的云 ID开通[云开发](https://developers.weixin.qq.com/minigame/dev/wxcloud/basis/getting-started.html)的小程序才会返回,可通过云调用直接获取开放数据,详细见[云调用直接获取开放数据](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html#method-cloud)
</summary>
</member>
<member name="F:WeChatWASM.GetChatToolInfoSuccessCallbackResult.encryptedData">
<summary>
包括敏感数据在内的完整转发信息的加密数据,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html)
</summary>
</member>
<member name="F:WeChatWASM.GetChatToolInfoSuccessCallbackResult.errMsg">
<summary>
错误信息
</summary>
</member>
<member name="F:WeChatWASM.GetChatToolInfoSuccessCallbackResult.iv">
<summary>
加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html)
</summary>
</member>
<member name="F:WeChatWASM.GetClipboardDataSuccessCallbackOption.data">
<summary>
剪贴板的内容
@ -5619,6 +5688,11 @@
使用 sha1( rawData + sessionkey ) 得到字符串,用于校验用户信息
</summary>
</member>
<member name="F:WeChatWASM.GetGameExptInfoOption.keyList">
<summary>
实验参数数组,不填则获取所有实验参数
</summary>
</member>
<member name="F:WeChatWASM.GetGroupEnterInfoOption.allowSingleChat">
<summary>
需要基础库: `3.7.8`
@ -5670,6 +5744,56 @@
加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html)
</summary>
</member>
<member name="F:WeChatWASM.GetGroupMembersInfoOption.members">
<summary>
需要获取的群用户的 groupOpenId 列表
</summary>
</member>
<member name="F:WeChatWASM.GetGroupMembersInfoSuccessCallbackResult.membersInfo">
<summary>
所选用户的头像昵称列表
</summary>
</member>
<member name="F:WeChatWASM.ResultOpenDataContextUserInfo.avatarUrl">
<summary>
用户头像图片 url
</summary>
</member>
<member name="F:WeChatWASM.ResultOpenDataContextUserInfo.city">
<summary>
用户所在城市
</summary>
</member>
<member name="F:WeChatWASM.ResultOpenDataContextUserInfo.country">
<summary>
用户所在国家
</summary>
</member>
<member name="F:WeChatWASM.ResultOpenDataContextUserInfo.gender">
<summary>
用户性别
</summary>
</member>
<member name="F:WeChatWASM.ResultOpenDataContextUserInfo.language">
<summary>
显示 country province city 所用的语言
</summary>
</member>
<member name="F:WeChatWASM.ResultOpenDataContextUserInfo.nickName">
<summary>
用户昵称
</summary>
</member>
<member name="F:WeChatWASM.ResultOpenDataContextUserInfo.openId">
<summary>
用户 openId
</summary>
</member>
<member name="F:WeChatWASM.ResultOpenDataContextUserInfo.province">
<summary>
用户所在省份
</summary>
</member>
<member name="F:WeChatWASM.GetInferenceEnvInfoSuccessCallbackResult.ver">
<summary>
AI推理引擎版本
@ -5805,17 +5929,6 @@
- itemSettings 只返回用户勾选过订阅面板中的“总是保持以上选择,不再询问”的订阅消息。
</summary>
</member>
<member name="F:WeChatWASM.GetShareInfoOption.shareTicket">
<summary>
shareTicket详见[获取更多转发信息](#)
</summary>
</member>
<member name="F:WeChatWASM.GetShareInfoOption.timeout">
<summary>
需要基础库: `1.9.90`
超时时间,单位 ms
</summary>
</member>
<member name="F:WeChatWASM.GetShowSplashAdStatusSuccessCallbackResult.code">
<summary>
封面广告组件展示状态码
@ -6103,12 +6216,12 @@
超时时间单位ms
</summary>
</member>
<member name="F:WeChatWASM.RequestFailCallbackErr.errMsg">
<member name="F:WeChatWASM.LoginFailCallbackErr.errMsg">
<summary>
错误信息
</summary>
</member>
<member name="F:WeChatWASM.RequestFailCallbackErr.errno">
<member name="F:WeChatWASM.LoginFailCallbackErr.errno">
<summary>
需要基础库: `2.24.0`
errno 错误码,错误码的详细说明参考 [Errno错误码](https://developers.weixin.qq.com/minigame/dev/guide/runtime/debug/PublicErrno.html)
@ -6155,7 +6268,7 @@
</member>
<member name="F:WeChatWASM.NavigateToMiniProgramOption.extraData">
<summary>
需要传递给目标小程序的数据,目标小程序可在 `App.onLaunch``App.onShow` 中获取到这份数据。如果跳转的是小游戏,可以在 [wx.onShow](https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.onShow.html)、[wx.getLaunchOptionsSync](https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.getLaunchOptionsSync.html) 中可以获取到这份数据数据
需要传递给目标小程序的数据,目标小程序可在 `App.onLaunch``App.onShow` 中获取到这份数据。如果跳转的是小游戏,可以在 [wx.onShow](https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.onShow.html)、[wx.getLaunchOptionsSync](https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.getLaunchOptionsSync.html) 中可以获取到这份数据。
</summary>
</member>
<member name="F:WeChatWASM.NavigateToMiniProgramOption.noRelaunchIfPathUnchanged">
@ -6201,6 +6314,25 @@
设置特征订阅类型,有效值有 `notification` 和 `indication`
</summary>
</member>
<!-- Badly formed XML comment ignored for member "F:WeChatWASM.NotifyGroupMembersOption.entrancePath" -->
<member name="F:WeChatWASM.NotifyGroupMembersOption.members">
<summary>
需要提醒的用户 group_openid 列表
</summary>
</member>
<member name="F:WeChatWASM.NotifyGroupMembersOption.title">
<summary>
文字链标题,发送的内容将由微信拼接为:@的成员列表+“请完成:”/"请参与:"+打开小程序的文字链,如「@alex @cindy 请完成:团建报名统计」。
</summary>
</member>
<member name="F:WeChatWASM.NotifyGroupMembersOption.type">
<summary>
展示的动词
可选值:
- 'participate': 请参与;
- 'complete': 请完成;
</summary>
</member>
<member name="F:WeChatWASM.OnAccelerometerChangeListenerResult.x">
<summary>
X 轴
@ -6366,14 +6498,9 @@
- 'landscapeReverse': 横屏反方向,以 HOME 键在屏幕左侧为反方向;
</summary>
</member>
<member name="F:WeChatWASM.Error.message">
<member name="F:WeChatWASM.ListenerError.message">
<summary>
错误
</summary>
</member>
<member name="F:WeChatWASM.Error.stack">
<summary>
错误调用堆栈
错误信息,包含堆栈
</summary>
</member>
<member name="F:WeChatWASM.OnGamepadConnectedListenerResult.gamepad">
@ -6498,6 +6625,11 @@
当前是否处于弱网状态
</summary>
</member>
<member name="F:WeChatWASM.OnOfficialComponentsInfoChangeListenerResult.OfficialComponentsInfo">
<summary>
全部组件的信息
</summary>
</member>
<member name="F:WeChatWASM.OnScreenRecordingStateChangedListenerResult.state">
<summary>
录屏状态
@ -6691,6 +6823,14 @@
变化后的窗口宽度,单位 px
</summary>
</member>
<member name="F:WeChatWASM.OnWindowStateChangeListenerResult.state">
<summary>
改变的窗口状态,可能的值为:
- 'minimize':窗口最小化
- 'normalize':窗口恢复正常尺寸
- 'maximize':窗口最大化
</summary>
</member>
<member name="F:WeChatWASM.OpenBluetoothAdapterOption.mode">
<summary>
需要基础库: `2.10.0`
@ -6721,6 +6861,11 @@
视频号 id以“sph”开头的id可在视频号助手获取
</summary>
</member>
<member name="F:WeChatWASM.OpenChannelsActivityOption.nonceId">
<summary>
视频号的Feed的nonceId必填
</summary>
</member>
<member name="F:WeChatWASM.OpenChannelsEventOption.eventId">
<summary>
活动 id
@ -6751,6 +6896,21 @@
视频号 id
</summary>
</member>
<member name="F:WeChatWASM.OpenChatToolOption.chatType">
<summary>
群聊类型
可选值:
- 1: 微信联系人单聊;
- 2: 企业微信联系人单聊;
- 3: 普通微信群聊;
- 4: 企业微信互通群聊;
</summary>
</member>
<member name="F:WeChatWASM.OpenChatToolOption.roomid">
<summary>
聊天室 id不传则拉起群选择框可以传入多聊群的 opengid 值,或者单聊群的 open_single_roomid 值
</summary>
</member>
<member name="F:WeChatWASM.OpenCustomerServiceChatOption.corpId">
<summary>
企业ID
@ -7147,26 +7307,6 @@
| -10073015 | | 索要功能不可用 |
</summary>
</member>
<member name="F:WeChatWASM.RequestMidasFriendPaymentSuccessCallbackResult.cloudID">
<summary>
敏感数据对应的云 ID开通[云开发](https://developers.weixin.qq.com/minigame/dev/wxcloud/basis/getting-started.html)的小程序才会返回,可通过云调用直接获取开放数据,详细见[云调用直接获取开放数据](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html#method-cloud)
</summary>
</member>
<member name="F:WeChatWASM.RequestMidasFriendPaymentSuccessCallbackResult.encryptedData">
<summary>
包括敏感数据在内的完整转发信息的加密数据,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html)
</summary>
</member>
<member name="F:WeChatWASM.RequestMidasFriendPaymentSuccessCallbackResult.errMsg">
<summary>
错误信息
</summary>
</member>
<member name="F:WeChatWASM.RequestMidasFriendPaymentSuccessCallbackResult.iv">
<summary>
加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html)
</summary>
</member>
<member name="F:WeChatWASM.RequestMidasPaymentOption.currencyType">
<summary>
币种
@ -7426,6 +7566,16 @@
- 'CODE_25': 一维码;
</summary>
</member>
<member name="F:WeChatWASM.SelectGroupMembersOption.maxSelectCount">
<summary>
最多可选人数
</summary>
</member>
<member name="F:WeChatWASM.GroupMemberInfo.members">
<summary>
所选用户在此聊天室下的唯一标识同一个用户在不同的聊天室下id不同
</summary>
</member>
<member name="F:WeChatWASM.SetBLEMTUOption.deviceId">
<summary>
蓝牙设备 id
@ -7559,6 +7709,66 @@
是否转发到当前群。该参数只对从群工具栏打开的场景下生效默认转发到当前群填入false时可转发到其他会话。
</summary>
</member>
<member name="F:WeChatWASM.ShareAppMessageToGroupOption.title">
<summary>
转发标题
</summary>
</member>
<member name="F:WeChatWASM.ShareAppMessageToGroupOption.imageUrl">
<summary>
自定义图片路径支持PNG及JPG显示图片长宽比是 5:4默认使用截图
</summary>
</member>
<!-- Badly formed XML comment ignored for member "F:WeChatWASM.ShareAppMessageToGroupOption.path" -->
<member name="F:WeChatWASM.ShareEmojiToGroupOption.imagePath">
<summary>
要分享的表情地址,必须为本地路径或临时路径
</summary>
</member>
<!-- Badly formed XML comment ignored for member "F:WeChatWASM.ShareEmojiToGroupOption.entrancePath" -->
<member name="F:WeChatWASM.ShareEmojiToGroupOption.needShowEntrance">
<summary>
分享的表情消息是否要带小程序入口
</summary>
</member>
<member name="F:WeChatWASM.ShareImageToGroupOption.imagePath">
<summary>
要分享的图片地址,必须为本地路径或临时路径
</summary>
</member>
<!-- Badly formed XML comment ignored for member "F:WeChatWASM.ShareImageToGroupOption.entrancePath" -->
<member name="F:WeChatWASM.ShareImageToGroupOption.needShowEntrance">
<summary>
分享的图片消息是否要带小程序入口
</summary>
</member>
<member name="F:WeChatWASM.ShareTextToGroupOption.content">
<summary>
要分享的文本内容
</summary>
</member>
<!-- Badly formed XML comment ignored for member "F:WeChatWASM.ShareTextToGroupOption.entrancePath" -->
<member name="F:WeChatWASM.ShareTextToGroupOption.needShowEntrance">
<summary>
分享的表情消息是否要带小程序入口
</summary>
</member>
<member name="F:WeChatWASM.ShareVideoToGroupOption.videoPath">
<summary>
要分享的视频地址,必须为本地路径或临时路径
</summary>
</member>
<!-- Badly formed XML comment ignored for member "F:WeChatWASM.ShareVideoToGroupOption.entrancePath" -->
<member name="F:WeChatWASM.ShareVideoToGroupOption.needShowEntrance">
<summary>
分享的图片消息是否要带小程序入口
</summary>
</member>
<member name="F:WeChatWASM.ShareVideoToGroupOption.thumbPath">
<summary>
缩略图路径,若留空则使用视频首帧
</summary>
</member>
<member name="F:WeChatWASM.ShowActionSheetOption.itemList">
<summary>
按钮的文字数组,数组长度最大为 6
@ -7601,6 +7811,14 @@
键盘输入框显示的默认值
</summary>
</member>
<member name="F:WeChatWASM.ShowKeyboardOption.keyboardType">
<summary>
键盘类型默认为文本类型客户端8.0.57以上支持数字键盘
可选值:
- 'text': 文本;
- 'number': 数字;
</summary>
</member>
<member name="F:WeChatWASM.ShowKeyboardOption.maxLength">
<summary>
键盘中文本的最大长度

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 49ec059ae4f60346d43bd805e5cbef1b
guid: abbb194a3c4d062e79dd5b68148fbb1a
DefaultImporter:
externalObjects: {}
userData:

Binary file not shown.

View File

@ -3145,6 +3145,11 @@
选填部分活动、功能允许接收自定义query参数请参阅渠道说明默认可不填
</summary>
</member>
<member name="F:WeChatWASM.GetGameExptInfoSuccessCallbackResult.list">
<summary>
结果对象的json字符串各项为实验的相关信息
</summary>
</member>
<member name="F:WeChatWASM.VirtualPaymentError.errMsg">
错误信息
@ -3595,6 +3600,26 @@
宽度单位px
</summary>
</member>
<member name="F:WeChatWASM.OfficialComponentsInfo.notificationComponentInfo">
<summary>
通知组件信息
</summary>
</member>
<member name="F:WeChatWASM.OfficialComponentInfo.boundingClientRect">
<summary>
组件的布局位置信息
</summary>
</member>
<member name="F:WeChatWASM.OfficialComponentInfo.isVisible">
<summary>
组件是否显示
</summary>
</member>
<member name="F:WeChatWASM.OfficialComponentInfo.name">
<summary>
组件的名称
</summary>
</member>
<member name="F:WeChatWASM.GetStorageInfoSyncOption.currentSize">
<summary>
当前占用的空间大小, 单位 KB
@ -3917,7 +3942,7 @@
</member>
<member name="F:WeChatWASM.DownloadFileOption.enableProfile">
<summary>
是否开启 profile,默认开启。开启后可在接口回调的 res.profile 中查看性能调试信息。
是否开启 profile。iOS 和 Android 端默认开启,其他端暂不支持。开启后可在接口回调的 res.profile 中查看性能调试信息。
</summary>
</member>
<member name="F:WeChatWASM.DownloadFileOption.enableQuic">
@ -3943,12 +3968,6 @@
超时时间,单位为毫秒,默认值为 60000 即一分钟。
</summary>
</member>
<member name="F:WeChatWASM.DownloadFileOption.useHighPerformanceMode">
<summary>
需要基础库: `3.4.1`
使用高性能模式,暂仅支持 Android默认关闭。该模式下有更优的网络性能表现。
</summary>
</member>
<member name="F:WeChatWASM.GeneralCallbackResult.errMsg">
<summary>
错误信息
@ -3962,7 +3981,7 @@
<member name="F:WeChatWASM.DownloadFileSuccessCallbackResult.profile">
<summary>
需要基础库: `2.10.4`
网络请求过程中一些调试信息,[查看详细说明](https://developers.weixin.qq.com/miniprogram/dev/framework/performance/network.html)
网络请求过程中一些调试信息,[查看详细说明](https://developers.weixin.qq.com/miniprogram/dev/framework/performance/network.html)。目前 iOS 和 Android 端支持。
</summary>
</member>
<member name="F:WeChatWASM.DownloadFileSuccessCallbackResult.statusCode">
@ -3997,12 +4016,12 @@
</member>
<member name="F:WeChatWASM.RequestProfile.domainLookUpEnd">
<summary>
DNS 域名查询完成的时间,如果使用了本地缓存(即无 DNS 查询)或持久连接,则与 fetchStart 值相等
Local DNS 域名查询完成的时间,如果使用了本地缓存(即无 DNS 查询)或持久连接,则与 fetchStart 值相等
</summary>
</member>
<member name="F:WeChatWASM.RequestProfile.domainLookUpStart">
<summary>
DNS 域名查询开始的时间,如果使用了本地缓存(即无 DNS 查询)或持久连接,则与 fetchStart 值相等
Local DNS 域名查询开始的时间,如果使用了本地缓存(即无 DNS 查询)或持久连接,则与 fetchStart 值相等
</summary>
</member>
<member name="F:WeChatWASM.RequestProfile.downstreamThroughputKbpsEstimate">
@ -4020,11 +4039,29 @@
组件准备好使用 HTTP 请求抓取资源的时间,这发生在检查本地缓存之前
</summary>
</member>
<member name="F:WeChatWASM.RequestProfile.httpDNSDomainLookUpEnd">
<summary>
需要基础库: `3.8.9`
httpDNS 完成查询的时间。仅当开启 httpDNS 功能时返回该字段。目前仅wx.request接口支持
</summary>
</member>
<member name="F:WeChatWASM.RequestProfile.httpDNSDomainLookUpStart">
<summary>
需要基础库: `3.8.9`
httpDNS 开始查询的时间。仅当开启 httpDNS 功能时返回该字段。目前仅wx.request接口支持
</summary>
</member>
<member name="F:WeChatWASM.RequestProfile.httpRttEstimate">
<summary>
协议层根据多个请求评估当前网络的 rtt仅供参考
</summary>
</member>
<member name="F:WeChatWASM.RequestProfile.invokeStart">
<summary>
需要基础库: `3.8.10`
调用接口的时间。
</summary>
</member>
<member name="F:WeChatWASM.RequestProfile.peerIP">
<summary>
当前请求的IP
@ -4040,6 +4077,18 @@
使用协议类型有效值http1.1, h2, quic, unknown
</summary>
</member>
<member name="F:WeChatWASM.RequestProfile.queueEnd">
<summary>
需要基础库: `3.8.10`
结束排队的时间。达到并行上限时才需要排队。如果未发生排队,则该字段和 queueStart 字段值相同
</summary>
</member>
<member name="F:WeChatWASM.RequestProfile.queueStart">
<summary>
需要基础库: `3.8.10`
开始排队的时间。达到并行上限时才需要排队。
</summary>
</member>
<member name="F:WeChatWASM.RequestProfile.receivedBytedCount">
<summary>
收到字节数
@ -5540,6 +5589,26 @@
预告状态0可用 1取消 2已用
</summary>
</member>
<member name="F:WeChatWASM.GetChatToolInfoSuccessCallbackResult.cloudID">
<summary>
敏感数据对应的云 ID开通[云开发](https://developers.weixin.qq.com/minigame/dev/wxcloud/basis/getting-started.html)的小程序才会返回,可通过云调用直接获取开放数据,详细见[云调用直接获取开放数据](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html#method-cloud)
</summary>
</member>
<member name="F:WeChatWASM.GetChatToolInfoSuccessCallbackResult.encryptedData">
<summary>
包括敏感数据在内的完整转发信息的加密数据,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html)
</summary>
</member>
<member name="F:WeChatWASM.GetChatToolInfoSuccessCallbackResult.errMsg">
<summary>
错误信息
</summary>
</member>
<member name="F:WeChatWASM.GetChatToolInfoSuccessCallbackResult.iv">
<summary>
加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html)
</summary>
</member>
<member name="F:WeChatWASM.GetClipboardDataSuccessCallbackOption.data">
<summary>
剪贴板的内容
@ -5625,6 +5694,11 @@
使用 sha1( rawData + sessionkey ) 得到字符串,用于校验用户信息
</summary>
</member>
<member name="F:WeChatWASM.GetGameExptInfoOption.keyList">
<summary>
实验参数数组,不填则获取所有实验参数
</summary>
</member>
<member name="F:WeChatWASM.GetGroupEnterInfoOption.allowSingleChat">
<summary>
需要基础库: `3.7.8`
@ -5676,6 +5750,56 @@
加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html)
</summary>
</member>
<member name="F:WeChatWASM.GetGroupMembersInfoOption.members">
<summary>
需要获取的群用户的 groupOpenId 列表
</summary>
</member>
<member name="F:WeChatWASM.GetGroupMembersInfoSuccessCallbackResult.membersInfo">
<summary>
所选用户的头像昵称列表
</summary>
</member>
<member name="F:WeChatWASM.ResultOpenDataContextUserInfo.avatarUrl">
<summary>
用户头像图片 url
</summary>
</member>
<member name="F:WeChatWASM.ResultOpenDataContextUserInfo.city">
<summary>
用户所在城市
</summary>
</member>
<member name="F:WeChatWASM.ResultOpenDataContextUserInfo.country">
<summary>
用户所在国家
</summary>
</member>
<member name="F:WeChatWASM.ResultOpenDataContextUserInfo.gender">
<summary>
用户性别
</summary>
</member>
<member name="F:WeChatWASM.ResultOpenDataContextUserInfo.language">
<summary>
显示 country province city 所用的语言
</summary>
</member>
<member name="F:WeChatWASM.ResultOpenDataContextUserInfo.nickName">
<summary>
用户昵称
</summary>
</member>
<member name="F:WeChatWASM.ResultOpenDataContextUserInfo.openId">
<summary>
用户 openId
</summary>
</member>
<member name="F:WeChatWASM.ResultOpenDataContextUserInfo.province">
<summary>
用户所在省份
</summary>
</member>
<member name="F:WeChatWASM.GetInferenceEnvInfoSuccessCallbackResult.ver">
<summary>
AI推理引擎版本
@ -5811,17 +5935,6 @@
- itemSettings 只返回用户勾选过订阅面板中的“总是保持以上选择,不再询问”的订阅消息。
</summary>
</member>
<member name="F:WeChatWASM.GetShareInfoOption.shareTicket">
<summary>
shareTicket详见[获取更多转发信息](#)
</summary>
</member>
<member name="F:WeChatWASM.GetShareInfoOption.timeout">
<summary>
需要基础库: `1.9.90`
超时时间,单位 ms
</summary>
</member>
<member name="F:WeChatWASM.GetShowSplashAdStatusSuccessCallbackResult.code">
<summary>
封面广告组件展示状态码
@ -6109,12 +6222,12 @@
超时时间单位ms
</summary>
</member>
<member name="F:WeChatWASM.RequestFailCallbackErr.errMsg">
<member name="F:WeChatWASM.LoginFailCallbackErr.errMsg">
<summary>
错误信息
</summary>
</member>
<member name="F:WeChatWASM.RequestFailCallbackErr.errno">
<member name="F:WeChatWASM.LoginFailCallbackErr.errno">
<summary>
需要基础库: `2.24.0`
errno 错误码,错误码的详细说明参考 [Errno错误码](https://developers.weixin.qq.com/minigame/dev/guide/runtime/debug/PublicErrno.html)
@ -6161,7 +6274,7 @@
</member>
<member name="F:WeChatWASM.NavigateToMiniProgramOption.extraData">
<summary>
需要传递给目标小程序的数据,目标小程序可在 `App.onLaunch``App.onShow` 中获取到这份数据。如果跳转的是小游戏,可以在 [wx.onShow](https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.onShow.html)、[wx.getLaunchOptionsSync](https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.getLaunchOptionsSync.html) 中可以获取到这份数据数据
需要传递给目标小程序的数据,目标小程序可在 `App.onLaunch``App.onShow` 中获取到这份数据。如果跳转的是小游戏,可以在 [wx.onShow](https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.onShow.html)、[wx.getLaunchOptionsSync](https://developers.weixin.qq.com/minigame/dev/api/base/app/life-cycle/wx.getLaunchOptionsSync.html) 中可以获取到这份数据。
</summary>
</member>
<member name="F:WeChatWASM.NavigateToMiniProgramOption.noRelaunchIfPathUnchanged">
@ -6207,6 +6320,25 @@
设置特征订阅类型,有效值有 `notification` 和 `indication`
</summary>
</member>
<!-- Badly formed XML comment ignored for member "F:WeChatWASM.NotifyGroupMembersOption.entrancePath" -->
<member name="F:WeChatWASM.NotifyGroupMembersOption.members">
<summary>
需要提醒的用户 group_openid 列表
</summary>
</member>
<member name="F:WeChatWASM.NotifyGroupMembersOption.title">
<summary>
文字链标题,发送的内容将由微信拼接为:@的成员列表+“请完成:”/"请参与:"+打开小程序的文字链,如「@alex @cindy 请完成:团建报名统计」。
</summary>
</member>
<member name="F:WeChatWASM.NotifyGroupMembersOption.type">
<summary>
展示的动词
可选值:
- 'participate': 请参与;
- 'complete': 请完成;
</summary>
</member>
<member name="F:WeChatWASM.OnAccelerometerChangeListenerResult.x">
<summary>
X 轴
@ -6372,14 +6504,9 @@
- 'landscapeReverse': 横屏反方向,以 HOME 键在屏幕左侧为反方向;
</summary>
</member>
<member name="F:WeChatWASM.Error.message">
<member name="F:WeChatWASM.ListenerError.message">
<summary>
错误
</summary>
</member>
<member name="F:WeChatWASM.Error.stack">
<summary>
错误调用堆栈
错误信息,包含堆栈
</summary>
</member>
<member name="F:WeChatWASM.OnGamepadConnectedListenerResult.gamepad">
@ -6504,6 +6631,11 @@
当前是否处于弱网状态
</summary>
</member>
<member name="F:WeChatWASM.OnOfficialComponentsInfoChangeListenerResult.OfficialComponentsInfo">
<summary>
全部组件的信息
</summary>
</member>
<member name="F:WeChatWASM.OnScreenRecordingStateChangedListenerResult.state">
<summary>
录屏状态
@ -6697,6 +6829,14 @@
变化后的窗口宽度,单位 px
</summary>
</member>
<member name="F:WeChatWASM.OnWindowStateChangeListenerResult.state">
<summary>
改变的窗口状态,可能的值为:
- 'minimize':窗口最小化
- 'normalize':窗口恢复正常尺寸
- 'maximize':窗口最大化
</summary>
</member>
<member name="F:WeChatWASM.OpenBluetoothAdapterOption.mode">
<summary>
需要基础库: `2.10.0`
@ -6727,6 +6867,11 @@
视频号 id以“sph”开头的id可在视频号助手获取
</summary>
</member>
<member name="F:WeChatWASM.OpenChannelsActivityOption.nonceId">
<summary>
视频号的Feed的nonceId必填
</summary>
</member>
<member name="F:WeChatWASM.OpenChannelsEventOption.eventId">
<summary>
活动 id
@ -6757,6 +6902,21 @@
视频号 id
</summary>
</member>
<member name="F:WeChatWASM.OpenChatToolOption.chatType">
<summary>
群聊类型
可选值:
- 1: 微信联系人单聊;
- 2: 企业微信联系人单聊;
- 3: 普通微信群聊;
- 4: 企业微信互通群聊;
</summary>
</member>
<member name="F:WeChatWASM.OpenChatToolOption.roomid">
<summary>
聊天室 id不传则拉起群选择框可以传入多聊群的 opengid 值,或者单聊群的 open_single_roomid 值
</summary>
</member>
<member name="F:WeChatWASM.OpenCustomerServiceChatOption.corpId">
<summary>
企业ID
@ -7153,26 +7313,6 @@
| -10073015 | | 索要功能不可用 |
</summary>
</member>
<member name="F:WeChatWASM.RequestMidasFriendPaymentSuccessCallbackResult.cloudID">
<summary>
敏感数据对应的云 ID开通[云开发](https://developers.weixin.qq.com/minigame/dev/wxcloud/basis/getting-started.html)的小程序才会返回,可通过云调用直接获取开放数据,详细见[云调用直接获取开放数据](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html#method-cloud)
</summary>
</member>
<member name="F:WeChatWASM.RequestMidasFriendPaymentSuccessCallbackResult.encryptedData">
<summary>
包括敏感数据在内的完整转发信息的加密数据,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html)
</summary>
</member>
<member name="F:WeChatWASM.RequestMidasFriendPaymentSuccessCallbackResult.errMsg">
<summary>
错误信息
</summary>
</member>
<member name="F:WeChatWASM.RequestMidasFriendPaymentSuccessCallbackResult.iv">
<summary>
加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html)
</summary>
</member>
<member name="F:WeChatWASM.RequestMidasPaymentOption.currencyType">
<summary>
币种
@ -7432,6 +7572,16 @@
- 'CODE_25': 一维码;
</summary>
</member>
<member name="F:WeChatWASM.SelectGroupMembersOption.maxSelectCount">
<summary>
最多可选人数
</summary>
</member>
<member name="F:WeChatWASM.GroupMemberInfo.members">
<summary>
所选用户在此聊天室下的唯一标识同一个用户在不同的聊天室下id不同
</summary>
</member>
<member name="F:WeChatWASM.SetBLEMTUOption.deviceId">
<summary>
蓝牙设备 id
@ -7565,6 +7715,66 @@
是否转发到当前群。该参数只对从群工具栏打开的场景下生效默认转发到当前群填入false时可转发到其他会话。
</summary>
</member>
<member name="F:WeChatWASM.ShareAppMessageToGroupOption.title">
<summary>
转发标题
</summary>
</member>
<member name="F:WeChatWASM.ShareAppMessageToGroupOption.imageUrl">
<summary>
自定义图片路径支持PNG及JPG显示图片长宽比是 5:4默认使用截图
</summary>
</member>
<!-- Badly formed XML comment ignored for member "F:WeChatWASM.ShareAppMessageToGroupOption.path" -->
<member name="F:WeChatWASM.ShareEmojiToGroupOption.imagePath">
<summary>
要分享的表情地址,必须为本地路径或临时路径
</summary>
</member>
<!-- Badly formed XML comment ignored for member "F:WeChatWASM.ShareEmojiToGroupOption.entrancePath" -->
<member name="F:WeChatWASM.ShareEmojiToGroupOption.needShowEntrance">
<summary>
分享的表情消息是否要带小程序入口
</summary>
</member>
<member name="F:WeChatWASM.ShareImageToGroupOption.imagePath">
<summary>
要分享的图片地址,必须为本地路径或临时路径
</summary>
</member>
<!-- Badly formed XML comment ignored for member "F:WeChatWASM.ShareImageToGroupOption.entrancePath" -->
<member name="F:WeChatWASM.ShareImageToGroupOption.needShowEntrance">
<summary>
分享的图片消息是否要带小程序入口
</summary>
</member>
<member name="F:WeChatWASM.ShareTextToGroupOption.content">
<summary>
要分享的文本内容
</summary>
</member>
<!-- Badly formed XML comment ignored for member "F:WeChatWASM.ShareTextToGroupOption.entrancePath" -->
<member name="F:WeChatWASM.ShareTextToGroupOption.needShowEntrance">
<summary>
分享的表情消息是否要带小程序入口
</summary>
</member>
<member name="F:WeChatWASM.ShareVideoToGroupOption.videoPath">
<summary>
要分享的视频地址,必须为本地路径或临时路径
</summary>
</member>
<!-- Badly formed XML comment ignored for member "F:WeChatWASM.ShareVideoToGroupOption.entrancePath" -->
<member name="F:WeChatWASM.ShareVideoToGroupOption.needShowEntrance">
<summary>
分享的图片消息是否要带小程序入口
</summary>
</member>
<member name="F:WeChatWASM.ShareVideoToGroupOption.thumbPath">
<summary>
缩略图路径,若留空则使用视频首帧
</summary>
</member>
<member name="F:WeChatWASM.ShowActionSheetOption.itemList">
<summary>
按钮的文字数组,数组长度最大为 6
@ -7607,6 +7817,14 @@
键盘输入框显示的默认值
</summary>
</member>
<member name="F:WeChatWASM.ShowKeyboardOption.keyboardType">
<summary>
键盘类型默认为文本类型客户端8.0.57以上支持数字键盘
可选值:
- 'text': 文本;
- 'number': 数字;
</summary>
</member>
<member name="F:WeChatWASM.ShowKeyboardOption.maxLength">
<summary>
键盘中文本的最大长度

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 93451de6b6c6c97c35d7801ca242aada
guid: cbbac11478e94aaeb0b1af12eed27a70
DefaultImporter:
externalObjects: {}
userData:

View File

@ -276,6 +276,16 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.CreateBLEPeripheralServer(callback);
}
/// <summary>
/// [wx.exitChatTool(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.exitChatTool.html)
/// 需要基础库: `3.7.12`
/// 退出聊天工具模式
/// </summary>
public static void ExitChatTool(ExitChatToolOption callback)
{
WXSDKManagerHandler.Instance.ExitChatTool(callback);
}
/// <summary>
/// [wx.exitMiniProgram(Object object)](https://developers.weixin.qq.com/minigame/dev/api/navigate/wx.exitMiniProgram.html)
/// 需要基础库: `2.17.3`
@ -511,6 +521,45 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.GetChannelsLiveNoticeInfo(callback);
}
/// <summary>
/// [wx.getChatToolInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.getChatToolInfo.html)
/// 需要基础库: `3.7.12`
/// 获取聊天工具模式下的群聊信息。
/// 需要注意的是,单聊群和多聊群下返回的群唯一标识是不同的。
/// 1. 多聊群下返回 opengid
/// 2. 单聊群下返回 open_single_roomid
/// 同时将返回用户在群(含单聊)下的唯一标识 group_openid。
/// **示例代码**
/// ```js
/// wx.getChatToolInfo({
/// success(res) {
/// // res
/// {
/// errMsg: 'getChatToolInfo:ok',
/// encryptedData: '',
/// iv: ''
/// }
/// },
/// fail() {
/// }
/// })
/// ```
/// 敏感数据有两种获取方式,一是使用 [加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html#加密数据解密算法) 。
/// 获取得到的开放数据为以下 json 结构(其中 opengid 为当前群的唯一标识):
/// ```json
/// {
/// "opengid": "OPENGID", // 多聊群下返回的群唯一标识
/// "open_single_roomid": "", // 单聊群下返回的群唯一标识
/// "group_openid": "", // 用户在当前群的唯一标识
/// "chat_type": 3, // 聊天室类型
/// }
/// ```
/// </summary>
public static void GetChatToolInfo(GetChatToolInfoOption callback)
{
WXSDKManagerHandler.Instance.GetChatToolInfo(callback);
}
/// <summary>
/// [wx.getClipboardData(Object object)](https://developers.weixin.qq.com/minigame/dev/api/device/clipboard/wx.getClipboardData.html)
/// 需要基础库: `1.1.0`
@ -641,6 +690,16 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.GetGameClubData(callback);
}
/// <summary>
/// [wx.getGameExptInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/data-analysis/wx.getGameExptInfo.html)
/// 需要基础库: `3.8.8`
/// 给定实验参数数组,获取对应的实验参数值
/// </summary>
public static void GetGameExptInfo(GetGameExptInfoOption callback)
{
WXSDKManagerHandler.Instance.GetGameExptInfo(callback);
}
/// <summary>
/// [wx.getGroupEnterInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/group/wx.getGroupEnterInfo.html)
/// 需要基础库: `2.10.4`
@ -683,6 +742,16 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.GetGroupEnterInfo(callback);
}
/// <summary>
/// [wx.getGroupMembersInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/data/wx.getGroupMembersInfo.html)
/// 需要基础库: `3.7.12`
/// 获取所选群成员的头像、昵称,自行在开放数据域中渲染
/// </summary>
public static void GetGroupMembersInfo(GetGroupMembersInfoOption callback)
{
WXSDKManagerHandler.Instance.GetGroupMembersInfo(callback);
}
/// <summary>
/// [wx.getInferenceEnvInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/ai/inference/wx.getInferenceEnvInfo.html)
/// 需要基础库: `2.30.1`
@ -847,27 +916,6 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.GetSetting(callback);
}
/// <summary>
/// [wx.getShareInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/share/wx.getShareInfo.html)
/// 需要基础库: `1.1.0`
/// 获取转发详细信息主要是获取群ID。 从群聊内的小程序消息卡片打开小程序时,调用此接口才有效。从基础库 v2.17.3 开始,推荐用 [wx.getGroupEnterInfo](https://developers.weixin.qq.com/minigame/dev/api/open-api/group/wx.getGroupEnterInfo.html) 替代此接口。
/// **示例代码**
/// 敏感数据获取方式 [加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html#加密数据解密算法) 。
/// 获取得到的开放数据为以下 json 结构(其中 openGId 为当前群的唯一标识):
/// ```json
/// {
/// "openGId": "OPENGID"
/// }
/// ```
/// **Tips**
/// - 如需要展示群名称,小程序可以使用 [开放数据组件](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/open-data.html)
/// - 小游戏可以通过 [`wx.getGroupInfo`](https://developers.weixin.qq.com/minigame/dev/api/open-api/data/wx.getGroupInfo.html) 接口获取群名称
/// </summary>
public static void GetShareInfo(GetShareInfoOption callback)
{
WXSDKManagerHandler.Instance.GetShareInfo(callback);
}
/// <summary>
/// [wx.getShowSplashAdStatus(Object object)](https://developers.weixin.qq.com/minigame/dev/api/ad/wx.getShowSplashAdStatus.html)
/// 需要基础库: `3.7.8`
@ -1272,6 +1320,16 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.NotifyBLECharacteristicValueChange(callback);
}
/// <summary>
/// [wx.notifyGroupMembers(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.notifyGroupMembers.html)
/// 需要基础库: `3.7.12`
/// 提醒用户完成任务,标题长度不超过 30 个字符支持中英文和数字中文算2个字符。
/// </summary>
public static void NotifyGroupMembers(NotifyGroupMembersOption callback)
{
WXSDKManagerHandler.Instance.NotifyGroupMembers(callback);
}
/// <summary>
/// [wx.openAppAuthorizeSetting(Object object)](https://developers.weixin.qq.com/minigame/dev/api/base/system/wx.openAppAuthorizeSetting.html)
/// 需要基础库: `2.25.3`
@ -1383,6 +1441,19 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.OpenChannelsUserProfile(callback);
}
/// <summary>
/// [wx.openChatTool(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.openChatTool.html)
/// 需要基础库: `3.7.12`
/// 进入聊天工具模式。
/// 1. 不传入聊天室id时微信会拉起聊天列表让用户选择用户选择后绑定聊天室进入聊天工具模式。
/// 2. 传入聊天室id时群聊为opengid单聊为open_single_roomid会直接绑定该聊天室进入此时必须传入对应的 chatType。
/// 3. 聊天室类型可从 [[getGroupEnterInfo]](https://developers.weixin.qq.com/minigame/dev/api/open-api/group/wx.getGroupEnterInfo.html) 返回值中获取。
/// </summary>
public static void OpenChatTool(OpenChatToolOption callback)
{
WXSDKManagerHandler.Instance.OpenChatTool(callback);
}
/// <summary>
/// [wx.openCustomerServiceChat(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/service-chat/wx.openCustomerServiceChat.html)
/// 需要基础库: `2.30.4`
@ -1906,6 +1977,25 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.ScanCode(callback);
}
/// <summary>
/// [wx.selectGroupMembers(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.selectGroupMembers.html)
/// 需要基础库: `3.7.12`
/// 选择聊天室的成员,并返回选择成员的 group_openid。若当前为群聊则会拉起成员选择器若当前为单聊则直接返回双方的 group_openid。
/// ****
/// ```js
/// wx.selectGroupMembers({
/// maxSelectCount: 3,
/// success(res) {
/// // res.members
/// }
/// })
/// ```
/// </summary>
public static void SelectGroupMembers(SelectGroupMembersOption callback)
{
WXSDKManagerHandler.Instance.SelectGroupMembers(callback);
}
/// <summary>
/// [wx.setBLEMTU(Object object)](https://developers.weixin.qq.com/minigame/dev/api/device/bluetooth-ble/wx.setBLEMTU.html)
/// 需要基础库: `2.11.0`
@ -2068,6 +2158,56 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.SetVisualEffectOnCapture(callback);
}
/// <summary>
/// [wx.shareAppMessageToGroup(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.shareAppMessageToGroup.html)
/// 需要基础库: `3.7.12`
/// 转发小程序卡片到聊天
/// </summary>
public static void ShareAppMessageToGroup(ShareAppMessageToGroupOption callback)
{
WXSDKManagerHandler.Instance.ShareAppMessageToGroup(callback);
}
/// <summary>
/// [wx.shareEmojiToGroup(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.shareEmojiToGroup.html)
/// 需要基础库: `3.7.12`
/// 转发表情到聊天
/// </summary>
public static void ShareEmojiToGroup(ShareEmojiToGroupOption callback)
{
WXSDKManagerHandler.Instance.ShareEmojiToGroup(callback);
}
/// <summary>
/// [wx.shareImageToGroup(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.shareImageToGroup.html)
/// 需要基础库: `3.7.12`
/// 转发图片到聊天
/// </summary>
public static void ShareImageToGroup(ShareImageToGroupOption callback)
{
WXSDKManagerHandler.Instance.ShareImageToGroup(callback);
}
/// <summary>
/// [wx.shareTextToGroup(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.shareTextToGroup.html)
/// 需要基础库: `3.7.12`
/// 转发文本到聊天
/// </summary>
public static void ShareTextToGroup(ShareTextToGroupOption callback)
{
WXSDKManagerHandler.Instance.ShareTextToGroup(callback);
}
/// <summary>
/// [wx.shareVideoToGroup(Object object)](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.shareVideoToGroup.html)
/// 需要基础库: `3.7.12`
/// 转发视频到聊天
/// </summary>
public static void ShareVideoToGroup(ShareVideoToGroupOption callback)
{
WXSDKManagerHandler.Instance.ShareVideoToGroup(callback);
}
/// <summary>
/// [wx.showActionSheet(Object object)](https://developers.weixin.qq.com/minigame/dev/api/ui/interaction/wx.showActionSheet.html)
/// 显示操作菜单
@ -2578,6 +2718,16 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.ExitPointerLock();
}
/// <summary>
/// [wx.isChatTool()](https://developers.weixin.qq.com/minigame/dev/api/chattool/wx.isChatTool.html)
/// 需要基础库: `3.7.12`
/// 是否处于聊天工具模式
/// </summary>
public static void IsChatTool()
{
WXSDKManagerHandler.Instance.IsChatTool();
}
/// <summary>
/// [wx.removeStorageSync(string key)](https://developers.weixin.qq.com/minigame/dev/api/storage/wx.removeStorageSync.html)
/// [wx.removeStorage](https://developers.weixin.qq.com/minigame/dev/api/storage/wx.removeStorage.html) 的同步版本
@ -2992,12 +3142,12 @@ namespace WeChatWASM
/// [wx.onError(function listener)](https://developers.weixin.qq.com/minigame/dev/api/base/app/app-event/wx.onError.html)
/// 监听全局错误事件
/// </summary>
public static void OnError(Action<Error> error)
public static void OnError(Action<ListenerError> error)
{
WXSDKManagerHandler.Instance.OnError(error);
}
public static void OffError(Action<Error> error)
public static void OffError(Action<ListenerError> error)
{
WXSDKManagerHandler.Instance.OffError(error);
}
@ -3274,6 +3424,28 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.OffNetworkWeakChange(result);
}
/// <summary>
/// [wx.onOfficialComponentsInfoChange(function listener)](https://developers.weixin.qq.com/minigame/dev/api/ui/menu/wx.onOfficialComponentsInfoChange.html)
/// 需要基础库: `3.7.12`
/// 监听官方组件信息变化事件
/// **示例代码**
/// ```js
/// const callback = res => console.log('officialComponentsInfoChange', res)
/// wx.onOfficialComponentsInfoChange(callback)
/// // 取消监听
/// wx.offOfficialComponentsInfoChange(callback)
/// ```
/// </summary>
public static void OnOfficialComponentsInfoChange(Action<OnOfficialComponentsInfoChangeListenerResult> result)
{
WXSDKManagerHandler.Instance.OnOfficialComponentsInfoChange(result);
}
public static void OffOfficialComponentsInfoChange(Action<OnOfficialComponentsInfoChangeListenerResult> result)
{
WXSDKManagerHandler.Instance.OffOfficialComponentsInfoChange(result);
}
/// <summary>
/// [wx.onScreenRecordingStateChanged(function listener)](https://developers.weixin.qq.com/minigame/dev/api/device/screen/wx.onScreenRecordingStateChanged.html)
/// 需要基础库: `3.1.4`
@ -3455,10 +3627,25 @@ namespace WeChatWASM
WXSDKManagerHandler.Instance.OffWindowResize(result);
}
/// <summary>
/// [wx.onWindowStateChange(function listener)](https://developers.weixin.qq.com/minigame/dev/api/ui/window/wx.onWindowStateChange.html)
/// 需要基础库: `3.8.8`
/// 监听小程序窗口状态变化事件。仅适用于 PC 平台
/// </summary>
public static void OnWindowStateChange(Action<OnWindowStateChangeListenerResult> result)
{
WXSDKManagerHandler.Instance.OnWindowStateChange(result);
}
public static void OffWindowStateChange(Action<OnWindowStateChangeListenerResult> result)
{
WXSDKManagerHandler.Instance.OffWindowStateChange(result);
}
/// <summary>
/// [wx.onAddToFavorites(function listener)](https://developers.weixin.qq.com/minigame/dev/api/share/wx.onAddToFavorites.html)
/// 需要基础库: `2.10.3`
/// 监听用户点击菜单「收藏」按钮时触发的事件安卓7.0.15起支持iOS 暂不支持)
/// 监听用户点击菜单「收藏」按钮时触发的事件
/// </summary>
public static void OnAddToFavorites(Action<Action<OnAddToFavoritesListenerResult>> callback)
{
@ -3769,6 +3956,30 @@ namespace WeChatWASM
return WXSDKManagerHandler.GetMenuButtonBoundingClientRect();
}
/// <summary>
/// [Object wx.getOfficialComponentsInfo()](https://developers.weixin.qq.com/minigame/dev/api/ui/menu/wx.getOfficialComponentsInfo.html)
/// 需要基础库: `3.7.12`
/// 获取所有官方组件的相关信息
/// **示例代码**
/// ```js
/// const componentsInfo = wx.getOfficialComponentsInfo();
/// const { notificationComponentInfo } = componentsInfo;
/// if (notificationComponentInfo.isShow) {
/// console.log(notificationComponentInfo.boundingClientRect.width);
/// console.log(notificationComponentInfo.boundingClientRect.height);
/// console.log(notificationComponentInfo.boundingClientRect.top);
/// console.log(notificationComponentInfo.boundingClientRect.left);
/// console.log(notificationComponentInfo.boundingClientRect.bottom);
/// console.log(notificationComponentInfo.boundingClientRect.right);
/// }
/// ```
/// </summary>
/// <returns></returns>
public static OfficialComponentsInfo GetOfficialComponentsInfo()
{
return WXSDKManagerHandler.GetOfficialComponentsInfo();
}
/// <summary>
/// [Object wx.getStorageInfoSync()](https://developers.weixin.qq.com/minigame/dev/api/storage/wx.getStorageInfoSync.html)
/// [wx.getStorageInfo](https://developers.weixin.qq.com/minigame/dev/api/storage/wx.getStorageInfo.html) 的同步版本

View File

@ -766,16 +766,6 @@ namespace WeChatWASM
return WXSDKManagerHandler.Instance.GetCachePath(url);
}
/// <summary>
/// 临时修复安卓在主线程繁忙时,异步读缓存耗时高,但需关注同步读文件可能导致掉帧
/// 仅在有需要的情况下主动开启,需要同步读的场景完成后再主动关闭
/// </summary>
/// <param name="enabled"></param>
public static void SetSyncReadCacheEnabled(bool enabled)
{
WXSDKManagerHandler.Instance.SetSyncReadCacheEnabled(enabled);
}
#endregion
/// <summary>
@ -1172,6 +1162,12 @@ namespace WeChatWASM
{
return WXSDKManagerHandler.Instance.CreatePageManager();
}
/// <returns></returns>
public static WXMiniReportManager GetMiniReportManager(GetMiniReportManagerParam param)
{
return WXSDKManagerHandler.Instance.GetMiniReportManager(param);
}
}
}
#endif

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 2612d39a2adf9a6014127cd39e6b3407
guid: 85074ea1195cea4dc0a46a0bfb98a7d8
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 9db32e7236ff03460e55a764bffa846f
guid: 85c73d7b573314a2bb1648ec8a89d777
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: db9548343468a2e8dde2f89e151158aa
guid: b287eb411321d82cbf3cbf7027600b0f
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: da96340677c85a07609fc9ccdb2fdf24
guid: 77449b16a6eb31d554e64b5b7e9fbfc0
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 745f86b07dbcdd56ff62b3681ffce1c9
guid: aae99d310ef1266ab48f1b8bb2663706
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 2744a3804c0377e30a5b0c5d51db2f6b
guid: 148bb1e71150864ea8af9a7b7c66f09c
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 2af611a65a2f1bbf650bd9c1d10b1aa5
guid: 789dded13ed47ff6f43b9d1db96c9801
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: b24e6e83b8de92590a80f407d3fe3d86
guid: 1d9c0457a12efec37489a9201279706d
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c87d2375a205f8546f74f0d50655013d
guid: 3dcb4891151a7f9a1674fb102698a3de
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 95aafc6e2a2de80a3828b19d70b20736
guid: 16a53f78803637316507c6e7b70df830
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 0b7bcc43f99a8c3fbee8a06897a24eb3
guid: 57fea65ef5083c71728b0d93e64557ba
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c9a6074eea58ed29d860754dafceba5a
guid: 8381e7c8034be38ad8f89c274cf18ed4
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 138b3932896ad9a137aab4ec8fc6968d
guid: 972cd60c341d667dfed2d0628e6efbd3
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 85d0efb5e64dec929be71386d5a3a849
guid: 95022c9e21d8bda567a546c806375549
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 1ef20c0b38c5b07c5536eaa23a8c608b
guid: 0589eec77d334144a63503a9e1408a0f
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: df42191698513563c97ee768190b167e
guid: 69090872420be96fd26f341c0199dfda
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: ea935edd486cdcf95e3db226d30f9bb4
guid: 8142668e9c0f6d62dca1dd14a031211e
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 4b7a82f0b678e556cd45dc018482af2c
guid: 94d1fcbe1e14e7cb8aad5df8db1707a8
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: fcb5b701ca418377f4b87aa57ad9e44f
guid: c6994bdd56913a23490531f54bb8ec3c
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 036ace672923b7964ca607be47797ff8
guid: 1af4ebae92856f1258f50df08ce7606f
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: f138d3d7e862c98ca876465d76614410
guid: 21743d893a9a2ff8c5df4a73fcfcfbe9
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 7e4f43362c5185fa63fd2368cde02947
guid: 81d642cf33e0e5cf75fb7694bd52ea0e
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: d507fcc681e3df61a68daefe78742477
guid: b54b67d83b77ef802d1c4a04706f0453
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 051e3ad4761d5bb61a28f8e9108082ab
guid: 2b1da7911c1e60a4c39a1deda26cbb95
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c438d3f8f415ad74021aac02b89c85fe
guid: 11694498892d9b306420d6c6f0f439e1
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 3d1b49fb81fe86f40c24585d3b404808
guid: 8260055bf27540c4404733c0322b83be
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 0032633c9aa4b01fd61e9459e65bc5ce
guid: 00e1f8304d36296e7d13880b79ef6eae
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 73b09a7d95e4911191700ec882b070f2
guid: 103c5f009a98687d444e3f63f0363fc0
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 5bf0f010954ad7c7188ec4a4e67bc84c
guid: 18630a2c15d210c13bafa28606ec29af
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 3192f10263543e32c6127a2724b631aa
guid: 8929794fa351f2e308accf2a637d39d9
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 3b762d5ea1a4f425455ae341319cb565
guid: 6a245677847578d1a6e4d4c3626288a3
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: ac4dc8990b0dc9d2ecb9e22fceb30c09
guid: 3850d11ec47db67b02910c57818ed120
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 660bbb210dcebf2e3bdc3e3adcedd22a
guid: 51a5b262fb8deac7c8136451ca1ab55f
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 1294735d54e3c7e85cc717243837b4ae
guid: ec6ff56942cbc5c5e61a85869fbcdca6
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 8f111902f93174de27cb26ceda552d74
guid: 07223c170d8a31b5b84454332ff0e098
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: dfe9a302c0cfaf5d50fc7c4ac231a8d2
guid: 5f9be664d7afe5be7ca05821763e8fc0
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 6f6bf7b1d614ea2cb43955e0926f6775
guid: a531d7e204b034de04673e26461ab68b
DefaultImporter:
externalObjects: {}
userData:

View File

@ -93,6 +93,14 @@ export const ResType = {
top: 'number',
width: 'number',
},
OfficialComponentsInfo: {
notificationComponentInfo: 'OfficialComponentInfo',
},
OfficialComponentInfo: {
boundingClientRect: 'ClientRect',
isVisible: 'bool',
name: 'string',
},
GetStorageInfoSyncOption: {
currentSize: 'number',
keys: 'string[]',
@ -180,10 +188,15 @@ export const ResType = {
downstreamThroughputKbpsEstimate: 'number',
estimate_nettype: 'number',
fetchStart: 'number',
httpDNSDomainLookUpEnd: 'number',
httpDNSDomainLookUpStart: 'number',
httpRttEstimate: 'number',
invokeStart: 'number',
peerIP: 'string',
port: 'number',
protocol: 'string',
queueEnd: 'number',
queueStart: 'number',
receivedBytedCount: 'number',
redirectEnd: 'number',
redirectStart: 'number',
@ -518,6 +531,12 @@ export const ResType = {
status: 'number',
errMsg: 'string',
},
GetChatToolInfoSuccessCallbackResult: {
cloudID: 'string',
encryptedData: 'string',
errMsg: 'string',
iv: 'string',
},
GetClipboardDataSuccessCallbackOption: {
data: 'string',
errMsg: 'string',
@ -555,6 +574,10 @@ export const ResType = {
signature: 'string',
errMsg: 'string',
},
GetGameExptInfoSuccessCallbackResult: {
list: 'object',
errMsg: 'string',
},
GetGroupEnterInfoError: {
errMsg: 'string',
errCode: 'number',
@ -565,6 +588,20 @@ export const ResType = {
errMsg: 'string',
iv: 'string',
},
GetGroupMembersInfoSuccessCallbackResult: {
membersInfo: 'ResultOpenDataContextUserInfo[]',
errMsg: 'string',
},
ResultOpenDataContextUserInfo: {
avatarUrl: 'string',
city: 'string',
country: 'string',
gender: 'number',
language: 'string',
nickName: 'string',
openId: 'string',
province: 'string',
},
GetInferenceEnvInfoSuccessCallbackResult: {
ver: 'string',
errMsg: 'string',
@ -667,7 +704,7 @@ export const ResType = {
errMsg: 'string',
openIdList: 'string[]',
},
RequestFailCallbackErr: {
LoginFailCallbackErr: {
errMsg: 'string',
errno: 'number',
},
@ -736,9 +773,8 @@ export const ResType = {
OnDeviceOrientationChangeListenerResult: {
value: 'string',
},
Error: {
ListenerError: {
message: 'string',
stack: 'string',
},
OnGamepadConnectedListenerResult: {
gamepad: 'string',
@ -784,6 +820,9 @@ export const ResType = {
networkType: 'string',
weakNet: 'bool',
},
OnOfficialComponentsInfoChangeListenerResult: {
OfficialComponentsInfo: 'OfficialComponentsInfo',
},
OnScreenRecordingStateChangedListenerResult: {
state: 'string',
},
@ -846,6 +885,9 @@ export const ResType = {
windowHeight: 'number',
windowWidth: 'number',
},
OnWindowStateChangeListenerResult: {
state: 'string',
},
OpenCardRequestInfo: {
cardId: 'string',
code: 'string',
@ -889,12 +931,6 @@ export const ResType = {
errMsg: 'string',
errCode: 'number',
},
RequestMidasFriendPaymentSuccessCallbackResult: {
cloudID: 'string',
encryptedData: 'string',
errMsg: 'string',
iv: 'string',
},
MidasPaymentError: {
errMsg: 'string',
errCode: 'number',
@ -940,6 +976,10 @@ export const ResType = {
scanType: 'string',
errMsg: 'string',
},
GroupMemberInfo: {
members: 'string[]',
errMsg: 'string',
},
SetBLEMTUFailCallbackResult: {
mtu: 'number',
},

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 41c8deca0ff34d264f1244b563739b50
guid: 74c35fd281e875ac0f5163c114be4e50
DefaultImporter:
externalObjects: {}
userData:

View File

@ -86,4 +86,12 @@ export const ResTypeOther = {
status: 'number',
errMsg: 'string',
},
LoadOption: {
openlink: 'string',
query: 'object',
},
ShowOption: {
openlink: 'string',
query: 'object',
},
};

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 5329bb0b502c4916572146e7353c8880
guid: cb4bcdfb384ea26700614a047f93d2f2
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 9aa844e47796f1fe344b8d60b82fa9b7
guid: 282a4f6f81f9d1727c30334796bf923e
DefaultImporter:
externalObjects: {}
userData:

View File

@ -27,10 +27,12 @@ function WX_OneWayNoFunction(functionName, ...params) {
}
const onlyReadyResponse = [
const onlyReadResponse = [
'getSystemSetting',
'getAppAuthorizeSetting',
];
const needParseJson = ['WXMiniReportManagerReport'];
// eslint-disable-next-line @typescript-eslint/naming-convention
function WX_SyncFunction(functionName, ...params) {
return wx[functionName.replace(/^\w/, (a) => a.toLowerCase())](...params);
@ -72,6 +74,10 @@ export default {
...config,
success(res) {
formatResponse(successType, res);
if (lowerFunctionName === 'getGameExptInfo') {
res.list = JSON.stringify(res.list);
}
moduleHelper.send(`${functionName}Callback`, JSON.stringify({
callbackId, type: 'success', res: JSON.stringify(res),
}));
@ -234,7 +240,7 @@ export default {
},
WX_SyncFunction_t(functionName, returnType) {
const res = WX_SyncFunction(functionName);
if (onlyReadyResponse.includes(functionName.replace(/^\w/, (a) => a.toLowerCase()))) {
if (onlyReadResponse.includes(functionName.replace(/^\w/, (a) => a.toLowerCase()))) {
formatResponse(returnType, JSON.parse(JSON.stringify(res)));
return JSON.stringify(res);
}
@ -391,6 +397,10 @@ export default {
WX_ClassOneWayNoFunction(className, functionName, id);
},
WX_ClassOneWayNoFunction_vs(className, functionName, id, param1) {
if (needParseJson.includes(className + functionName)) {
// eslint-disable-next-line no-param-reassign
param1 = JSON.parse(param1);
}
WX_ClassOneWayNoFunction(className, functionName, id, param1);
},
WX_ClassOneWayNoFunction_t(className, functionName, returnType, id) {

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 6b3e5628522459cc3dd7964d0a814173
guid: 6cf44b298674a75b8b16cb5dce7b607e
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 4b7402032742928010f5479de54a3d93
guid: 9a826fc4f0dec6800dec9ec83c0e12bd
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 29ce6695da09a0631c4ec513c0da92ae
guid: f20ab2f7df47748140752452d880b30e
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: d2f786864680ee6890aa7b3f9a91e748
guid: b3217d51259d771746c800717988bf34
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 14b58d35b818a6a38adec667a7a4aac3
guid: 882eb69539e639758d9aedc4c822ae10
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: f1c0b302460c710eb5d6f78e7bbc77b6
guid: 0c935c087a201047b5ca51e2136e1a2b
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 23d83e7ac4b7b30b2f8202d7147cd332
guid: 6cfa2e90d193917cef63ff5eb3c439d8
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 970ffb90d4864c9490b01e9bc44c5de1
guid: 37fe8a5b9835c0a8a12be7d559117844
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 01fc114f60b2df8e2e439805212c97df
guid: 8a25194c5eaf62c5d69b6c2f19bdfbcf
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: ba12dcb22c6474a3ca54b389f5a3332c
guid: 452ea71c22033fd322868f3484daecbd
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 0e128f7c44dd1bce2d633506e5a47d40
guid: 6f6802fd060c8c905361fca69608c06f
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: fd4e694f43b0aa3f5a5092bd0511f7d2
guid: ef4fd4bdb08cd47ef207b83427707c28
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: ade8e1257dceffd8772fecb37c8c20fb
guid: 7892b6b63da04f7a9f49a3eddd2d9734
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: b93c9a0067d6f24d0ee31907c9b8dee0
guid: 76ffba57beda8291e72c524f138e3c7b
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 159d3ecf3853f33f27f82dc14eb1223f
guid: 9477ddeec94e7cd489c852ec07d4b14f
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: ccfdb628122b7b06b4050606f8eafd89
guid: cf726be5a4c6c7b8d9706bd9f46c71f3
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: e21691107c19c03863b6b94613ee293b
guid: 0c7b9deb292b35f3cd37758c948bf51b
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: f9dcd5068f86566abbb47b7dc12581a4
guid: aca150053609100ba38bd14f884c33a9
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 7d49b22178f2450803293d12a61eb31e
guid: 5a16b2bbf4341e6652939df336ffa502
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 7a1cdee40104ef4f2d71cce0739e9c5c
guid: a1cf3744e58e0605e13ed15af0404a55
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 5ab2fd9f05d6d847703e15429e8745a3
guid: cc4a83e98feeeb8170f09978246d16e0
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a1bedbee2f4f8aa1e5e1881b864c7183
guid: 14104e9d52bae43f860035fe2a99cae1
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 5ede05d304e27f419955e65b3e270d9e
guid: 7bb3d14dfef460bff260c69ecc0fdcf4
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 94f7f561ba2e9090cb9ccaefe8fdef90
guid: 2d83368db532e179b43a73413fbf8616
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: d3ca90f5308418f9e8f878fa484f6aa9
guid: 9cfdb9a5ee03babcc63760fc7e1b987b
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c7081b3840feb201cfbe20e241877fb5
guid: 30e140e34d54506f01135206af82fc71
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 424d12a4cf887bd4cf31b2757a7e3345
guid: 08052fc6f949a118010c477c2a40d3dc
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a97f287cbcbf865f60ede1c89af50756
guid: 7c2fd02750be5f91d91bbe55508f1341
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: c077b7c5073887a22817a1de3463cbaa
guid: 51978d8d1a0a9eb64d5fb9a6f8b3fc10
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 7ca9ace473c408950c8e70a9b587f59b
guid: 92e16dac86b7482407aac27d2d6809d8
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: ed7b40fffc12b226d0f17c68ec425955
guid: 4ac3d1684b62c6cd26c4ff2b8750d41e
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 35a524449d53878bbdf7b5b5c5ee52e0
guid: 1b74c9166f839482efda30f48c8669d6
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 2562183ed446cc91b818a488f02b810b
guid: c5d32de025038af6d3d99fc7a9d9e302
DefaultImporter:
externalObjects: {}
userData:

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a9e9ca6bcf166e7557365863b246dd5f
guid: b4172409d2775d02cb9302c3f0044fd7
DefaultImporter:
externalObjects: {}
userData:

Some files were not shown because too many files have changed in this diff Show More