diff --git a/Editor/WXConvertCore.cs b/Editor/WXConvertCore.cs index 275d4847..953a2c20 100644 --- a/Editor/WXConvertCore.cs +++ b/Editor/WXConvertCore.cs @@ -118,7 +118,7 @@ namespace WeChatWASM CheckBuildTarget(); Init(); - ProcessWxPerfBinaries(); + ProcessWxPerfBinaries(); // JSLib SettingWXTextureMinJSLib(); UpdateGraphicAPI(); @@ -241,7 +241,7 @@ namespace WeChatWASM $"{jsLibRootDir}wx_perf_2021.a", }; } - + { // WxPerfJsBridge.jslib var wxPerfJSBridgeImporter = AssetImporter.GetAtPath(wxPerfPlugins[0]) as PluginImporter; @@ -254,7 +254,7 @@ namespace WeChatWASM { // wx_perf_2022.a - bool bShouldEnablePerf2022Plugin = config.CompileOptions.enablePerfAnalysis && IsCompatibleWithUnity202203OrNewer(); + bool bShouldEnablePerf2022Plugin = config.CompileOptions.enablePerfAnalysis && IsCompatibleWithUnity202203OrNewer(); var wxPerf2022Importer = AssetImporter.GetAtPath(wxPerfPlugins[1]) as PluginImporter; #if PLATFORM_WEIXINMINIGAME @@ -266,7 +266,7 @@ namespace WeChatWASM { // wx_perf_2021.a - bool bShouldEnablePerf2021Plugin = config.CompileOptions.enablePerfAnalysis && IsCompatibleWithUnity202103To202203(); + bool bShouldEnablePerf2021Plugin = config.CompileOptions.enablePerfAnalysis && IsCompatibleWithUnity202103To202203(); var wxPerf2021Importer = AssetImporter.GetAtPath(wxPerfPlugins[2]) as PluginImporter; #if PLATFORM_WEIXINMINIGAME @@ -422,8 +422,8 @@ namespace WeChatWASM { const string MACRO_ENABLE_WX_PERF_FEATURE = "ENABLE_WX_PERF_FEATURE"; string defineSymbols = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup); - - return (!config.CompileOptions.DevelopBuild) && (defineSymbols.IndexOf(MACRO_ENABLE_WX_PERF_FEATURE) != -1); + + return (!config.CompileOptions.DevelopBuild) && (defineSymbols.IndexOf(MACRO_ENABLE_WX_PERF_FEATURE) != -1); } private static void ConvertDotnetCode() @@ -1518,9 +1518,9 @@ namespace WeChatWASM config.FontOptions.Mathematical_Operators ? "true" : "false", customUnicodeRange, boolConfigInfo, - config.CompileOptions.DevelopBuild ? "true" : "false", - config.CompileOptions.enablePerfAnalysis ? "true" : "false", - config.ProjectConf.MemorySize.ToString(), + config.CompileOptions.DevelopBuild ? "true" : "false", + config.CompileOptions.enablePerfAnalysis ? "true" : "false", + config.ProjectConf.MemorySize.ToString(), }); List replaceList = new List(replaceArrayList); diff --git a/Editor/WXEditorSettingHelper.cs b/Editor/WXEditorSettingHelper.cs index c14a3c06..dde0d0b3 100644 --- a/Editor/WXEditorSettingHelper.cs +++ b/Editor/WXEditorSettingHelper.cs @@ -59,7 +59,7 @@ namespace WeChatWASM } private static WXEditorScriptObject config; - private static bool m_EnablePerfTool = false; + private static bool m_EnablePerfTool = false; private static string _dstCache; @@ -206,7 +206,7 @@ namespace WeChatWASM { this.formCheckbox("enablePerfAnalysis", "集成性能分析工具", "将性能分析工具集成入Development Build包中", false, null, OnPerfAnalysisFeatureToggleChanged); } - + EditorGUILayout.EndVertical(); } @@ -470,7 +470,7 @@ namespace WeChatWASM this.setData("enableProfileStats", config.CompileOptions.enableProfileStats); this.setData("enableRenderAnalysis", config.CompileOptions.enableRenderAnalysis); this.setData("brotliMT", config.CompileOptions.brotliMT); - this.setData("enablePerfAnalysis", config.CompileOptions.enablePerfAnalysis); + this.setData("enablePerfAnalysis", config.CompileOptions.enablePerfAnalysis); this.setData("autoUploadFirstBundle", true); // font options @@ -565,7 +565,7 @@ namespace WeChatWASM config.FontOptions.Mathematical_Operators = this.getDataCheckbox("Mathematical_Operators"); config.FontOptions.CustomUnicode = this.getDataInput("CustomUnicode"); - ApplyPerfAnalysisSetting(); + ApplyPerfAnalysisSetting(); } private string getDataInput(string target) @@ -703,7 +703,7 @@ namespace WeChatWASM // 针对non-dev build,取消性能分析工具的集成 if (!InNewValue) { - this.setData("enablePerfAnalysis", false); + this.setData("enablePerfAnalysis", false); } } @@ -712,7 +712,7 @@ namespace WeChatWASM // 针对non-dev build,取消性能分析工具的集成 if (!formCheckboxData["developBuild"] && InNewValue) { - this.setData("enablePerfAnalysis", false); + this.setData("enablePerfAnalysis", false); } } @@ -720,7 +720,7 @@ namespace WeChatWASM { const string MACRO_ENABLE_WX_PERF_FEATURE = "ENABLE_WX_PERF_FEATURE"; string defineSymbols = PlayerSettings.GetScriptingDefineSymbolsForGroup(EditorUserBuildSettings.selectedBuildTargetGroup); - if (this.getDataCheckbox("enablePerfAnalysis") && this.getDataCheckbox("developBuild")) + if (this.getDataCheckbox("enablePerfAnalysis") && this.getDataCheckbox("developBuild")) { if (defineSymbols.IndexOf(MACRO_ENABLE_WX_PERF_FEATURE) == -1) { @@ -767,7 +767,7 @@ namespace WeChatWASM { return path; } - + return Path.Combine(projectRootPath, path); } } diff --git a/Editor/WXPluginVersion.cs b/Editor/WXPluginVersion.cs index 940f5760..037e58c7 100644 --- a/Editor/WXPluginVersion.cs +++ b/Editor/WXPluginVersion.cs @@ -1,8 +1,8 @@ -namespace WeChatWASM +namespace WeChatWASM { public class WXPluginVersion { - public static string pluginVersion = "202410100917"; // 这一行不要改他,导出的时候会自动替换 + public static string pluginVersion = "202410120627"; // 这一行不要改他,导出的时候会自动替换 } public class WXPluginConf diff --git a/Editor/wx-editor.dll b/Editor/wx-editor.dll index 912a6d3a..4c7ae1c2 100644 Binary files a/Editor/wx-editor.dll and b/Editor/wx-editor.dll differ diff --git a/Runtime/Plugins/SDK-Call-JS.jslib b/Runtime/Plugins/SDK-Call-JS.jslib index 17a85e0b..9e61350d 100644 --- a/Runtime/Plugins/SDK-Call-JS.jslib +++ b/Runtime/Plugins/SDK-Call-JS.jslib @@ -1,694 +1,32 @@ mergeInto(LibraryManager.library, { -WX_AddCard:function(conf, callbackId) { - window.WXWASMSDK.WX_AddCard(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); +WX_OneWayFunction:function(functionName, successType, failType, completeType, conf, callbackId) { + window.WXWASMSDK.WX_OneWayFunction(_WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(successType), _WXPointer_stringify_adaptor(failType), _WXPointer_stringify_adaptor(completeType), _WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); }, -WX_AuthPrivateMessage:function(conf, callbackId) { - window.WXWASMSDK.WX_AuthPrivateMessage(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); +WX_OneWayNoFunction_v: function (functionName) { + window.WXWASMSDK.WX_OneWayNoFunction_v(_WXPointer_stringify_adaptor(functionName)); }, -WX_Authorize:function(conf, callbackId) { - window.WXWASMSDK.WX_Authorize(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); +WX_OneWayNoFunction_vs: function (functionName, param1) { + window.WXWASMSDK.WX_OneWayNoFunction_vs(_WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(param1)); }, -WX_CheckIsAddedToMyMiniProgram:function(conf, callbackId) { - window.WXWASMSDK.WX_CheckIsAddedToMyMiniProgram(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); +WX_OneWayNoFunction_vt: function (functionName, param1) { + window.WXWASMSDK.WX_OneWayNoFunction_vt(_WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(param1)); }, -WX_CheckSession:function(conf, callbackId) { - window.WXWASMSDK.WX_CheckSession(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); +WX_OneWayNoFunction_vst: function (functionName, param1, param2) { + window.WXWASMSDK.WX_OneWayNoFunction_vst(_WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(param1), _WXPointer_stringify_adaptor(param2)); }, -WX_ChooseImage:function(conf, callbackId) { - window.WXWASMSDK.WX_ChooseImage(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); +WX_OneWayNoFunction_vsn: function (functionName, param1, param2) { + window.WXWASMSDK.WX_OneWayNoFunction_vsn(_WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(param1), param2); }, -WX_ChooseMedia:function(conf, callbackId) { - window.WXWASMSDK.WX_ChooseMedia(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); +WX_OneWayNoFunction_vnns: function (functionName, param1, param2, param3) { + window.WXWASMSDK.WX_OneWayNoFunction_vnns(_WXPointer_stringify_adaptor(functionName), param1, param2, _WXPointer_stringify_adaptor(param3)); }, -WX_ChooseMessageFile:function(conf, callbackId) { - window.WXWASMSDK.WX_ChooseMessageFile(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_CloseBLEConnection:function(conf, callbackId) { - window.WXWASMSDK.WX_CloseBLEConnection(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_CloseBluetoothAdapter:function(conf, callbackId) { - window.WXWASMSDK.WX_CloseBluetoothAdapter(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_CompressImage:function(conf, callbackId) { - window.WXWASMSDK.WX_CompressImage(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_CreateBLEConnection:function(conf, callbackId) { - window.WXWASMSDK.WX_CreateBLEConnection(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_CreateBLEPeripheralServer:function(conf, callbackId) { - window.WXWASMSDK.WX_CreateBLEPeripheralServer(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_ExitMiniProgram:function(conf, callbackId) { - window.WXWASMSDK.WX_ExitMiniProgram(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_ExitVoIPChat:function(conf, callbackId) { - window.WXWASMSDK.WX_ExitVoIPChat(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_FaceDetect:function(conf, callbackId) { - window.WXWASMSDK.WX_FaceDetect(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetAvailableAudioSources:function(conf, callbackId) { - window.WXWASMSDK.WX_GetAvailableAudioSources(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetBLEDeviceCharacteristics:function(conf, callbackId) { - window.WXWASMSDK.WX_GetBLEDeviceCharacteristics(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetBLEDeviceRSSI:function(conf, callbackId) { - window.WXWASMSDK.WX_GetBLEDeviceRSSI(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetBLEDeviceServices:function(conf, callbackId) { - window.WXWASMSDK.WX_GetBLEDeviceServices(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetBLEMTU:function(conf, callbackId) { - window.WXWASMSDK.WX_GetBLEMTU(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetBackgroundFetchData:function(conf, callbackId) { - window.WXWASMSDK.WX_GetBackgroundFetchData(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetBackgroundFetchToken:function(conf, callbackId) { - window.WXWASMSDK.WX_GetBackgroundFetchToken(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetBatteryInfo:function(conf, callbackId) { - window.WXWASMSDK.WX_GetBatteryInfo(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetBeacons:function(conf, callbackId) { - window.WXWASMSDK.WX_GetBeacons(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetBluetoothAdapterState:function(conf, callbackId) { - window.WXWASMSDK.WX_GetBluetoothAdapterState(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetBluetoothDevices:function(conf, callbackId) { - window.WXWASMSDK.WX_GetBluetoothDevices(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetChannelsLiveInfo:function(conf, callbackId) { - window.WXWASMSDK.WX_GetChannelsLiveInfo(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetChannelsLiveNoticeInfo:function(conf, callbackId) { - window.WXWASMSDK.WX_GetChannelsLiveNoticeInfo(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetClipboardData:function(conf, callbackId) { - window.WXWASMSDK.WX_GetClipboardData(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetConnectedBluetoothDevices:function(conf, callbackId) { - window.WXWASMSDK.WX_GetConnectedBluetoothDevices(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetDeviceBenchmarkInfo:function(conf, callbackId) { - window.WXWASMSDK.WX_GetDeviceBenchmarkInfo(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetExtConfig:function(conf, callbackId) { - window.WXWASMSDK.WX_GetExtConfig(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetFuzzyLocation:function(conf, callbackId) { - window.WXWASMSDK.WX_GetFuzzyLocation(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetGameClubData:function(conf, callbackId) { - window.WXWASMSDK.WX_GetGameClubData(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetGroupEnterInfo:function(conf, callbackId) { - window.WXWASMSDK.WX_GetGroupEnterInfo(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetInferenceEnvInfo:function(conf, callbackId) { - window.WXWASMSDK.WX_GetInferenceEnvInfo(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetLocalIPAddress:function(conf, callbackId) { - window.WXWASMSDK.WX_GetLocalIPAddress(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetNetworkType:function(conf, callbackId) { - window.WXWASMSDK.WX_GetNetworkType(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetPrivacySetting:function(conf, callbackId) { - window.WXWASMSDK.WX_GetPrivacySetting(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetScreenBrightness:function(conf, callbackId) { - window.WXWASMSDK.WX_GetScreenBrightness(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetScreenRecordingState:function(conf, callbackId) { - window.WXWASMSDK.WX_GetScreenRecordingState(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetSetting:function(conf, callbackId) { - window.WXWASMSDK.WX_GetSetting(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetShareInfo:function(conf, callbackId) { - window.WXWASMSDK.WX_GetShareInfo(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetStorageInfo:function(conf, callbackId) { - window.WXWASMSDK.WX_GetStorageInfo(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetSystemInfo:function(conf, callbackId) { - window.WXWASMSDK.WX_GetSystemInfo(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetSystemInfoAsync:function(conf, callbackId) { - window.WXWASMSDK.WX_GetSystemInfoAsync(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetUserInfo:function(conf, callbackId) { - window.WXWASMSDK.WX_GetUserInfo(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetUserInteractiveStorage:function(conf, callbackId) { - window.WXWASMSDK.WX_GetUserInteractiveStorage(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetWeRunData:function(conf, callbackId) { - window.WXWASMSDK.WX_GetWeRunData(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_HideKeyboard:function(conf, callbackId) { - window.WXWASMSDK.WX_HideKeyboard(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_HideLoading:function(conf, callbackId) { - window.WXWASMSDK.WX_HideLoading(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_HideShareMenu:function(conf, callbackId) { - window.WXWASMSDK.WX_HideShareMenu(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_HideToast:function(conf, callbackId) { - window.WXWASMSDK.WX_HideToast(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_InitFaceDetect:function(conf, callbackId) { - window.WXWASMSDK.WX_InitFaceDetect(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_IsBluetoothDevicePaired:function(conf, callbackId) { - window.WXWASMSDK.WX_IsBluetoothDevicePaired(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_JoinVoIPChat:function(conf, callbackId) { - window.WXWASMSDK.WX_JoinVoIPChat(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_Login:function(conf, callbackId) { - window.WXWASMSDK.WX_Login(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_MakeBluetoothPair:function(conf, callbackId) { - window.WXWASMSDK.WX_MakeBluetoothPair(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_NavigateToMiniProgram:function(conf, callbackId) { - window.WXWASMSDK.WX_NavigateToMiniProgram(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_NotifyBLECharacteristicValueChange:function(conf, callbackId) { - window.WXWASMSDK.WX_NotifyBLECharacteristicValueChange(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_OpenAppAuthorizeSetting:function(conf, callbackId) { - window.WXWASMSDK.WX_OpenAppAuthorizeSetting(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_OpenBluetoothAdapter:function(conf, callbackId) { - window.WXWASMSDK.WX_OpenBluetoothAdapter(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_OpenCard:function(conf, callbackId) { - window.WXWASMSDK.WX_OpenCard(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_OpenChannelsActivity:function(conf, callbackId) { - window.WXWASMSDK.WX_OpenChannelsActivity(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_OpenChannelsEvent:function(conf, callbackId) { - window.WXWASMSDK.WX_OpenChannelsEvent(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_OpenChannelsLive:function(conf, callbackId) { - window.WXWASMSDK.WX_OpenChannelsLive(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_OpenChannelsUserProfile:function(conf, callbackId) { - window.WXWASMSDK.WX_OpenChannelsUserProfile(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_OpenCustomerServiceChat:function(conf, callbackId) { - window.WXWASMSDK.WX_OpenCustomerServiceChat(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_OpenCustomerServiceConversation:function(conf, callbackId) { - window.WXWASMSDK.WX_OpenCustomerServiceConversation(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_OpenPrivacyContract:function(conf, callbackId) { - window.WXWASMSDK.WX_OpenPrivacyContract(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_OpenSetting:function(conf, callbackId) { - window.WXWASMSDK.WX_OpenSetting(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_OpenSystemBluetoothSetting:function(conf, callbackId) { - window.WXWASMSDK.WX_OpenSystemBluetoothSetting(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_PreviewImage:function(conf, callbackId) { - window.WXWASMSDK.WX_PreviewImage(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_PreviewMedia:function(conf, callbackId) { - window.WXWASMSDK.WX_PreviewMedia(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_ReadBLECharacteristicValue:function(conf, callbackId) { - window.WXWASMSDK.WX_ReadBLECharacteristicValue(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_RemoveStorage:function(conf, callbackId) { - window.WXWASMSDK.WX_RemoveStorage(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_RemoveUserCloudStorage:function(conf, callbackId) { - window.WXWASMSDK.WX_RemoveUserCloudStorage(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_ReportScene:function(conf, callbackId) { - window.WXWASMSDK.WX_ReportScene(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_RequestMidasFriendPayment:function(conf, callbackId) { - window.WXWASMSDK.WX_RequestMidasFriendPayment(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_RequestMidasPayment:function(conf, callbackId) { - window.WXWASMSDK.WX_RequestMidasPayment(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_RequestMidasPaymentGameItem:function(conf, callbackId) { - window.WXWASMSDK.WX_RequestMidasPaymentGameItem(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_RequestSubscribeMessage:function(conf, callbackId) { - window.WXWASMSDK.WX_RequestSubscribeMessage(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_RequestSubscribeSystemMessage:function(conf, callbackId) { - window.WXWASMSDK.WX_RequestSubscribeSystemMessage(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_RequirePrivacyAuthorize:function(conf, callbackId) { - window.WXWASMSDK.WX_RequirePrivacyAuthorize(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_RestartMiniProgram:function(conf, callbackId) { - window.WXWASMSDK.WX_RestartMiniProgram(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_SaveFileToDisk:function(conf, callbackId) { - window.WXWASMSDK.WX_SaveFileToDisk(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_SaveImageToPhotosAlbum:function(conf, callbackId) { - window.WXWASMSDK.WX_SaveImageToPhotosAlbum(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_ScanCode:function(conf, callbackId) { - window.WXWASMSDK.WX_ScanCode(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_SetBLEMTU:function(conf, callbackId) { - window.WXWASMSDK.WX_SetBLEMTU(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_SetBackgroundFetchToken:function(conf, callbackId) { - window.WXWASMSDK.WX_SetBackgroundFetchToken(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_SetClipboardData:function(conf, callbackId) { - window.WXWASMSDK.WX_SetClipboardData(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_SetDeviceOrientation:function(conf, callbackId) { - window.WXWASMSDK.WX_SetDeviceOrientation(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_SetEnableDebug:function(conf, callbackId) { - window.WXWASMSDK.WX_SetEnableDebug(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_SetInnerAudioOption:function(conf, callbackId) { - window.WXWASMSDK.WX_SetInnerAudioOption(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_SetKeepScreenOn:function(conf, callbackId) { - window.WXWASMSDK.WX_SetKeepScreenOn(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_SetMenuStyle:function(conf, callbackId) { - window.WXWASMSDK.WX_SetMenuStyle(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_SetScreenBrightness:function(conf, callbackId) { - window.WXWASMSDK.WX_SetScreenBrightness(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_SetStatusBarStyle:function(conf, callbackId) { - window.WXWASMSDK.WX_SetStatusBarStyle(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_SetUserCloudStorage:function(conf, callbackId) { - window.WXWASMSDK.WX_SetUserCloudStorage(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_SetVisualEffectOnCapture:function(conf, callbackId) { - window.WXWASMSDK.WX_SetVisualEffectOnCapture(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_ShowActionSheet:function(conf, callbackId) { - window.WXWASMSDK.WX_ShowActionSheet(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_ShowKeyboard:function(conf, callbackId) { - window.WXWASMSDK.WX_ShowKeyboard(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_ShowLoading:function(conf, callbackId) { - window.WXWASMSDK.WX_ShowLoading(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_ShowModal:function(conf, callbackId) { - window.WXWASMSDK.WX_ShowModal(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_ShowShareImageMenu:function(conf, callbackId) { - window.WXWASMSDK.WX_ShowShareImageMenu(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_ShowShareMenu:function(conf, callbackId) { - window.WXWASMSDK.WX_ShowShareMenu(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_ShowToast:function(conf, callbackId) { - window.WXWASMSDK.WX_ShowToast(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_StartAccelerometer:function(conf, callbackId) { - window.WXWASMSDK.WX_StartAccelerometer(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_StartBeaconDiscovery:function(conf, callbackId) { - window.WXWASMSDK.WX_StartBeaconDiscovery(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_StartBluetoothDevicesDiscovery:function(conf, callbackId) { - window.WXWASMSDK.WX_StartBluetoothDevicesDiscovery(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_StartCompass:function(conf, callbackId) { - window.WXWASMSDK.WX_StartCompass(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_StartDeviceMotionListening:function(conf, callbackId) { - window.WXWASMSDK.WX_StartDeviceMotionListening(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_StopAccelerometer:function(conf, callbackId) { - window.WXWASMSDK.WX_StopAccelerometer(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_StopBeaconDiscovery:function(conf, callbackId) { - window.WXWASMSDK.WX_StopBeaconDiscovery(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_StopBluetoothDevicesDiscovery:function(conf, callbackId) { - window.WXWASMSDK.WX_StopBluetoothDevicesDiscovery(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_StopCompass:function(conf, callbackId) { - window.WXWASMSDK.WX_StopCompass(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_StopDeviceMotionListening:function(conf, callbackId) { - window.WXWASMSDK.WX_StopDeviceMotionListening(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_StopFaceDetect:function(conf, callbackId) { - window.WXWASMSDK.WX_StopFaceDetect(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_UpdateKeyboard:function(conf, callbackId) { - window.WXWASMSDK.WX_UpdateKeyboard(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_UpdateShareMenu:function(conf, callbackId) { - window.WXWASMSDK.WX_UpdateShareMenu(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_UpdateVoIPChatMuteConfig:function(conf, callbackId) { - window.WXWASMSDK.WX_UpdateVoIPChatMuteConfig(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_UpdateWeChatApp:function(conf, callbackId) { - window.WXWASMSDK.WX_UpdateWeChatApp(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_VibrateLong:function(conf, callbackId) { - window.WXWASMSDK.WX_VibrateLong(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_VibrateShort:function(conf, callbackId) { - window.WXWASMSDK.WX_VibrateShort(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_WriteBLECharacteristicValue:function(conf, callbackId) { - window.WXWASMSDK.WX_WriteBLECharacteristicValue(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_StartGameLive:function(conf, callbackId) { - window.WXWASMSDK.WX_StartGameLive(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_CheckGameLiveEnabled:function(conf, callbackId) { - window.WXWASMSDK.WX_CheckGameLiveEnabled(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetUserCurrentGameliveInfo:function(conf, callbackId) { - window.WXWASMSDK.WX_GetUserCurrentGameliveInfo(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetUserRecentGameLiveInfo:function(conf, callbackId) { - window.WXWASMSDK.WX_GetUserRecentGameLiveInfo(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_GetUserGameLiveDetails:function(conf, callbackId) { - window.WXWASMSDK.WX_GetUserGameLiveDetails(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_OpenChannelsLiveCollection:function(conf, callbackId) { - window.WXWASMSDK.WX_OpenChannelsLiveCollection(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_OpenPage:function(conf, callbackId) { - window.WXWASMSDK.WX_OpenPage(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_RequestSubscribeLiveActivity:function(conf, callbackId) { - window.WXWASMSDK.WX_RequestSubscribeLiveActivity(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); -}, -WX_OpenBusinessView:function(conf, callbackId) { - window.WXWASMSDK.WX_OpenBusinessView(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId)); +WX_OnEventRegister:function(functionName, resType) { + window.WXWASMSDK.WX_OnEventRegister(_WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(resType)); }, -WX_ExitPointerLock:function() { - window.WXWASMSDK.WX_ExitPointerLock(); +WX_OffEventRegister:function(functionName) { + window.WXWASMSDK.WX_OffEventRegister(_WXPointer_stringify_adaptor(functionName)); }, -WX_OperateGameRecorderVideo:function(option){ - window.WXWASMSDK.WX_OperateGameRecorderVideo(_WXPointer_stringify_adaptor(option)); -}, -WX_RemoveStorageSync:function(key){ - window.WXWASMSDK.WX_RemoveStorageSync(_WXPointer_stringify_adaptor(key)); -}, -WX_ReportEvent:function(eventId, data){ - window.WXWASMSDK.WX_ReportEvent(_WXPointer_stringify_adaptor(eventId), _WXPointer_stringify_adaptor(data)); -}, -WX_ReportPerformance:function(id, value, dimensions){ - window.WXWASMSDK.WX_ReportPerformance(id, value, _WXPointer_stringify_adaptor(dimensions)); -}, -WX_ReportUserBehaviorBranchAnalytics:function(option){ - window.WXWASMSDK.WX_ReportUserBehaviorBranchAnalytics(_WXPointer_stringify_adaptor(option)); -}, -WX_RequestPointerLock:function() { - window.WXWASMSDK.WX_RequestPointerLock(); -}, -WX_ReserveChannelsLive:function(option){ - window.WXWASMSDK.WX_ReserveChannelsLive(_WXPointer_stringify_adaptor(option)); -}, -WX_RevokeBufferURL:function(url){ - window.WXWASMSDK.WX_RevokeBufferURL(_WXPointer_stringify_adaptor(url)); -}, -WX_SetPreferredFramesPerSecond:function(fps){ - window.WXWASMSDK.WX_SetPreferredFramesPerSecond(fps); -}, -WX_SetStorageSync:function(key, data){ - window.WXWASMSDK.WX_SetStorageSync(_WXPointer_stringify_adaptor(key), _WXPointer_stringify_adaptor(data)); -}, -WX_ShareAppMessage:function(option){ - window.WXWASMSDK.WX_ShareAppMessage(_WXPointer_stringify_adaptor(option)); -}, -WX_TriggerGC:function() { - window.WXWASMSDK.WX_TriggerGC(); -}, - -WX_OnAccelerometerChange:function() { - window.WXWASMSDK.WX_OnAccelerometerChange(); -}, -WX_OffAccelerometerChange:function() { - window.WXWASMSDK.WX_OffAccelerometerChange(); -}, -WX_OnAudioInterruptionBegin:function() { - window.WXWASMSDK.WX_OnAudioInterruptionBegin(); -}, -WX_OffAudioInterruptionBegin:function() { - window.WXWASMSDK.WX_OffAudioInterruptionBegin(); -}, -WX_OnAudioInterruptionEnd:function() { - window.WXWASMSDK.WX_OnAudioInterruptionEnd(); -}, -WX_OffAudioInterruptionEnd:function() { - window.WXWASMSDK.WX_OffAudioInterruptionEnd(); -}, -WX_OnBLEConnectionStateChange:function() { - window.WXWASMSDK.WX_OnBLEConnectionStateChange(); -}, -WX_OffBLEConnectionStateChange:function() { - window.WXWASMSDK.WX_OffBLEConnectionStateChange(); -}, -WX_OnBLEMTUChange:function() { - window.WXWASMSDK.WX_OnBLEMTUChange(); -}, -WX_OffBLEMTUChange:function() { - window.WXWASMSDK.WX_OffBLEMTUChange(); -}, -WX_OnBLEPeripheralConnectionStateChanged:function() { - window.WXWASMSDK.WX_OnBLEPeripheralConnectionStateChanged(); -}, -WX_OffBLEPeripheralConnectionStateChanged:function() { - window.WXWASMSDK.WX_OffBLEPeripheralConnectionStateChanged(); -}, -WX_OnBackgroundFetchData:function() { - window.WXWASMSDK.WX_OnBackgroundFetchData(); -}, -WX_OnBeaconServiceChange:function() { - window.WXWASMSDK.WX_OnBeaconServiceChange(); -}, -WX_OffBeaconServiceChange:function() { - window.WXWASMSDK.WX_OffBeaconServiceChange(); -}, -WX_OnBeaconUpdate:function() { - window.WXWASMSDK.WX_OnBeaconUpdate(); -}, -WX_OffBeaconUpdate:function() { - window.WXWASMSDK.WX_OffBeaconUpdate(); -}, -WX_OnBluetoothAdapterStateChange:function() { - window.WXWASMSDK.WX_OnBluetoothAdapterStateChange(); -}, -WX_OffBluetoothAdapterStateChange:function() { - window.WXWASMSDK.WX_OffBluetoothAdapterStateChange(); -}, -WX_OnBluetoothDeviceFound:function() { - window.WXWASMSDK.WX_OnBluetoothDeviceFound(); -}, -WX_OffBluetoothDeviceFound:function() { - window.WXWASMSDK.WX_OffBluetoothDeviceFound(); -}, -WX_OnCompassChange:function() { - window.WXWASMSDK.WX_OnCompassChange(); -}, -WX_OffCompassChange:function() { - window.WXWASMSDK.WX_OffCompassChange(); -}, -WX_OnDeviceMotionChange:function() { - window.WXWASMSDK.WX_OnDeviceMotionChange(); -}, -WX_OffDeviceMotionChange:function() { - window.WXWASMSDK.WX_OffDeviceMotionChange(); -}, -WX_OnDeviceOrientationChange:function() { - window.WXWASMSDK.WX_OnDeviceOrientationChange(); -}, -WX_OffDeviceOrientationChange:function() { - window.WXWASMSDK.WX_OffDeviceOrientationChange(); -}, -WX_OnError:function() { - window.WXWASMSDK.WX_OnError(); -}, -WX_OffError:function() { - window.WXWASMSDK.WX_OffError(); -}, -WX_OnHide:function() { - window.WXWASMSDK.WX_OnHide(); -}, -WX_OffHide:function() { - window.WXWASMSDK.WX_OffHide(); -}, -WX_OnInteractiveStorageModified:function() { - window.WXWASMSDK.WX_OnInteractiveStorageModified(); -}, -WX_OffInteractiveStorageModified:function() { - window.WXWASMSDK.WX_OffInteractiveStorageModified(); -}, -WX_OnKeyDown:function() { - window.WXWASMSDK.WX_OnKeyDown(); -}, -WX_OffKeyDown:function() { - window.WXWASMSDK.WX_OffKeyDown(); -}, -WX_OnKeyUp:function() { - window.WXWASMSDK.WX_OnKeyUp(); -}, -WX_OffKeyUp:function() { - window.WXWASMSDK.WX_OffKeyUp(); -}, -WX_OnKeyboardComplete:function() { - window.WXWASMSDK.WX_OnKeyboardComplete(); -}, -WX_OffKeyboardComplete:function() { - window.WXWASMSDK.WX_OffKeyboardComplete(); -}, -WX_OnKeyboardConfirm:function() { - window.WXWASMSDK.WX_OnKeyboardConfirm(); -}, -WX_OffKeyboardConfirm:function() { - window.WXWASMSDK.WX_OffKeyboardConfirm(); -}, -WX_OnKeyboardHeightChange:function() { - window.WXWASMSDK.WX_OnKeyboardHeightChange(); -}, -WX_OffKeyboardHeightChange:function() { - window.WXWASMSDK.WX_OffKeyboardHeightChange(); -}, -WX_OnKeyboardInput:function() { - window.WXWASMSDK.WX_OnKeyboardInput(); -}, -WX_OffKeyboardInput:function() { - window.WXWASMSDK.WX_OffKeyboardInput(); -}, -WX_OnMemoryWarning:function() { - window.WXWASMSDK.WX_OnMemoryWarning(); -}, -WX_OffMemoryWarning:function() { - window.WXWASMSDK.WX_OffMemoryWarning(); -}, -WX_OnMenuButtonBoundingClientRectWeightChange:function() { - window.WXWASMSDK.WX_OnMenuButtonBoundingClientRectWeightChange(); -}, -WX_OffMenuButtonBoundingClientRectWeightChange:function() { - window.WXWASMSDK.WX_OffMenuButtonBoundingClientRectWeightChange(); -}, -WX_OnMessage:function() { - window.WXWASMSDK.WX_OnMessage(); -}, -WX_OnMouseDown:function() { - window.WXWASMSDK.WX_OnMouseDown(); -}, -WX_OffMouseDown:function() { - window.WXWASMSDK.WX_OffMouseDown(); -}, -WX_OnMouseMove:function() { - window.WXWASMSDK.WX_OnMouseMove(); -}, -WX_OffMouseMove:function() { - window.WXWASMSDK.WX_OffMouseMove(); -}, -WX_OnMouseUp:function() { - window.WXWASMSDK.WX_OnMouseUp(); -}, -WX_OffMouseUp:function() { - window.WXWASMSDK.WX_OffMouseUp(); -}, -WX_OnNetworkStatusChange:function() { - window.WXWASMSDK.WX_OnNetworkStatusChange(); -}, -WX_OffNetworkStatusChange:function() { - window.WXWASMSDK.WX_OffNetworkStatusChange(); -}, -WX_OnNetworkWeakChange:function() { - window.WXWASMSDK.WX_OnNetworkWeakChange(); -}, -WX_OffNetworkWeakChange:function() { - window.WXWASMSDK.WX_OffNetworkWeakChange(); -}, -WX_OnScreenRecordingStateChanged:function() { - window.WXWASMSDK.WX_OnScreenRecordingStateChanged(); -}, -WX_OffScreenRecordingStateChanged:function() { - window.WXWASMSDK.WX_OffScreenRecordingStateChanged(); -}, -WX_OnShareMessageToFriend:function() { - window.WXWASMSDK.WX_OnShareMessageToFriend(); -}, -WX_OnShow:function() { - window.WXWASMSDK.WX_OnShow(); -}, -WX_OffShow:function() { - window.WXWASMSDK.WX_OffShow(); -}, -WX_OnUnhandledRejection:function() { - window.WXWASMSDK.WX_OnUnhandledRejection(); -}, -WX_OffUnhandledRejection:function() { - window.WXWASMSDK.WX_OffUnhandledRejection(); -}, -WX_OnUserCaptureScreen:function() { - window.WXWASMSDK.WX_OnUserCaptureScreen(); -}, -WX_OffUserCaptureScreen:function() { - window.WXWASMSDK.WX_OffUserCaptureScreen(); -}, -WX_OnVoIPChatInterrupted:function() { - window.WXWASMSDK.WX_OnVoIPChatInterrupted(); -}, -WX_OffVoIPChatInterrupted:function() { - window.WXWASMSDK.WX_OffVoIPChatInterrupted(); -}, -WX_OnVoIPChatMembersChanged:function() { - window.WXWASMSDK.WX_OnVoIPChatMembersChanged(); -}, -WX_OffVoIPChatMembersChanged:function() { - window.WXWASMSDK.WX_OffVoIPChatMembersChanged(); -}, -WX_OnVoIPChatSpeakersChanged:function() { - window.WXWASMSDK.WX_OnVoIPChatSpeakersChanged(); -}, -WX_OffVoIPChatSpeakersChanged:function() { - window.WXWASMSDK.WX_OffVoIPChatSpeakersChanged(); -}, -WX_OnVoIPChatStateChanged:function() { - window.WXWASMSDK.WX_OnVoIPChatStateChanged(); -}, -WX_OffVoIPChatStateChanged:function() { - window.WXWASMSDK.WX_OffVoIPChatStateChanged(); -}, -WX_OnWheel:function() { - window.WXWASMSDK.WX_OnWheel(); -}, -WX_OffWheel:function() { - window.WXWASMSDK.WX_OffWheel(); -}, -WX_OnWindowResize:function() { - window.WXWASMSDK.WX_OnWindowResize(); -}, -WX_OffWindowResize:function() { - window.WXWASMSDK.WX_OffWindowResize(); -}, - WX_OnAddToFavorites:function() { window.WXWASMSDK.WX_OnAddToFavorites(); }, @@ -735,332 +73,87 @@ WX_OnGameLiveStateChange_Resolve:function(conf){ window.WXWASMSDK.WX_OnGameLiveStateChange_Resolve(_WXPointer_stringify_adaptor(conf)); }, -WX_SetHandoffQuery:function( - query -){ - var res = window.WXWASMSDK.WX_SetHandoffQuery(_WXPointer_stringify_adaptor(query)); - return res; +WX_SyncFunction_bs: function(functionName, param1){ + return window.WXWASMSDK.WX_SyncFunction_bs(_WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(param1)); }, -WX_GetAccountInfoSync:function( -){ - var res = window.WXWASMSDK.WX_GetAccountInfoSync(); +WX_SyncFunction_t: function(functionName, returnType){ + var res = window.WXWASMSDK.WX_SyncFunction_t(_WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(returnType)); var bufferSize = lengthBytesUTF8(res || '') + 1; var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); - return buffer; + stringToUTF8((res || ''), buffer, bufferSize); + return buffer; }, -WX_GetAppAuthorizeSetting:function( -){ - var res = window.WXWASMSDK.WX_GetAppAuthorizeSetting(); +WX_SyncFunction_tt: function(functionName, returnType, param1){ + var res = window.WXWASMSDK.WX_SyncFunction_tt(_WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(returnType), _WXPointer_stringify_adaptor(param1)); var bufferSize = lengthBytesUTF8(res || '') + 1; var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); + stringToUTF8((res || ''), buffer, bufferSize); return buffer; }, -WX_GetAppBaseInfo:function( -){ - var res = window.WXWASMSDK.WX_GetAppBaseInfo(); +WX_SyncFunction_b: function(functionName){ + return window.WXWASMSDK.WX_SyncFunction_b(_WXPointer_stringify_adaptor(functionName)); +}, +WX_SyncFunction_bsnn: function(functionName, param1, param2, param3){ + return window.WXWASMSDK.WX_SyncFunction_bsnn(_WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(param1), param2, param3); +}, +WX_SyncFunction_bt: function(functionName, param1){ + return window.WXWASMSDK.WX_SyncFunction_bt(_WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(param1)); +}, +WX_SyncFunction_nt: function(functionName, param1){ + return window.WXWASMSDK.WX_SyncFunction_nt(_WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(param1)); +}, +WX_SyncFunction_ss: function(functionName, param1){ + var res = window.WXWASMSDK.WX_SyncFunction_ss(_WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(param1)); var bufferSize = lengthBytesUTF8(res || '') + 1; var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); + stringToUTF8((res || ''), buffer, bufferSize); return buffer; }, -WX_GetBatteryInfoSync:function( -){ - var res = window.WXWASMSDK.WX_GetBatteryInfoSync(); +WX_SyncFunction_tnn: function(functionName, returnType, param1, param2){ + var res = window.WXWASMSDK.WX_SyncFunction_tnn(_WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(returnType), param1, param2); var bufferSize = lengthBytesUTF8(res || '') + 1; var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); + stringToUTF8((res || ''), buffer, bufferSize); return buffer; }, -WX_GetDeviceInfo:function( -){ - var res = window.WXWASMSDK.WX_GetDeviceInfo(); +WX_ClassOneWayFunction:function(functionName, returnType, successType, failType, completeType, conf) { + var res = window.WXWASMSDK.WX_ClassOneWayFunction(_WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(returnType), _WXPointer_stringify_adaptor(successType), _WXPointer_stringify_adaptor(failType), _WXPointer_stringify_adaptor(completeType), _WXPointer_stringify_adaptor(conf)); var bufferSize = lengthBytesUTF8(res || '') + 1; var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); + stringToUTF8((res || ''), buffer, bufferSize); return buffer; }, -WX_GetEnterOptionsSync:function( -){ - var res = window.WXWASMSDK.WX_GetEnterOptionsSync(); +WX_ClassFunction: function(functionName, returnType, option) { + var res = window.WXWASMSDK.WX_ClassFunction(_WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(returnType), _WXPointer_stringify_adaptor(option)); var bufferSize = lengthBytesUTF8(res || '') + 1; var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); + stringToUTF8((res || ''), buffer, bufferSize); return buffer; }, -WX_GetExptInfoSync:function( - keys -){ - var res = window.WXWASMSDK.WX_GetExptInfoSync(_WXPointer_stringify_adaptor(keys)); +WX_ClassSetProperty: function(className, id, key, value) { + window.WXWASMSDK.WX_ClassSetProperty(_WXPointer_stringify_adaptor(className), _WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(key), _WXPointer_stringify_adaptor(value)); +}, +WX_ClassOnEventFunction: function(className, functionName, returnType, id, eventName) { + window.WXWASMSDK.WX_ClassOnEventFunction(_WXPointer_stringify_adaptor(className), _WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(returnType), _WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(eventName)); +},WX_ClassOffEventFunction: function(className, functionName, id, eventType) { + window.WXWASMSDK.WX_ClassOffEventFunction(_WXPointer_stringify_adaptor(className), _WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(eventType)); +},WX_ClassOneWayNoFunction_v: function(className, functionName, id) { + window.WXWASMSDK.WX_ClassOneWayNoFunction_v(_WXPointer_stringify_adaptor(className), _WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(id)); +}, +WX_ClassOneWayNoFunction_vs: function(className, functionName, id, param1) { + window.WXWASMSDK.WX_ClassOneWayNoFunction_vs(_WXPointer_stringify_adaptor(className), _WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(param1)); +}, +WX_ClassOneWayNoFunction_t: function(className, functionName, returnType, id) { + var res = window.WXWASMSDK.WX_ClassOneWayNoFunction_t(_WXPointer_stringify_adaptor(className), _WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(returnType), _WXPointer_stringify_adaptor(id)); var bufferSize = lengthBytesUTF8(res || '') + 1; var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); + stringToUTF8((res || ''), buffer, bufferSize); return buffer; }, -WX_GetExtConfigSync:function( -){ - var res = window.WXWASMSDK.WX_GetExtConfigSync(); - var bufferSize = lengthBytesUTF8(res || '') + 1; - var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); - return buffer; +WX_ClassOneWayNoFunction_vt: function(className, functionName, id, param1) { + window.WXWASMSDK.WX_ClassOneWayNoFunction_vt(_WXPointer_stringify_adaptor(className), _WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(param1)); }, -WX_GetLaunchOptionsSync:function( -){ - var res = window.WXWASMSDK.WX_GetLaunchOptionsSync(); - var bufferSize = lengthBytesUTF8(res || '') + 1; - var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); - return buffer; +WX_ClassOneWayNoFunction_vn: function(className, functionName, id, param1) { + window.WXWASMSDK.WX_ClassOneWayNoFunction_vs(_WXPointer_stringify_adaptor(className), _WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(id), param1); }, -WX_GetMenuButtonBoundingClientRect:function( -){ - var res = window.WXWASMSDK.WX_GetMenuButtonBoundingClientRect(); - var bufferSize = lengthBytesUTF8(res || '') + 1; - var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); - return buffer; -}, -WX_GetStorageInfoSync:function( -){ - var res = window.WXWASMSDK.WX_GetStorageInfoSync(); - var bufferSize = lengthBytesUTF8(res || '') + 1; - var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); - return buffer; -}, -WX_GetSystemInfoSync:function( -){ - var res = window.WXWASMSDK.WX_GetSystemInfoSync(); - var bufferSize = lengthBytesUTF8(res || '') + 1; - var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); - return buffer; -}, -WX_GetSystemSetting:function( -){ - var res = window.WXWASMSDK.WX_GetSystemSetting(); - var bufferSize = lengthBytesUTF8(res || '') + 1; - var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); - return buffer; -}, -WX_GetWindowInfo:function( -){ - var res = window.WXWASMSDK.WX_GetWindowInfo(); - var bufferSize = lengthBytesUTF8(res || '') + 1; - var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); - return buffer; -}, -WX_CreateImageData:function( - width,height -){ - var res = window.WXWASMSDK.WX_CreateImageData(width,height); - var bufferSize = lengthBytesUTF8(res || '') + 1; - var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); - return buffer; -}, -WX_CreatePath2D:function( -){ - var res = window.WXWASMSDK.WX_CreatePath2D(); - var bufferSize = lengthBytesUTF8(res || '') + 1; - var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); - return buffer; -}, -WX_IsPointerLocked:function( -){ - var res = window.WXWASMSDK.WX_IsPointerLocked(); - return res; -}, -WX_IsVKSupport:function( - version -){ - var res = window.WXWASMSDK.WX_IsVKSupport(_WXPointer_stringify_adaptor(version)); - return res; -}, -WX_SetCursor:function( - path,x,y -){ - var res = window.WXWASMSDK.WX_SetCursor(_WXPointer_stringify_adaptor(path),x,y); - return res; -}, -WX_SetMessageToFriendQuery:function( - option -){ - var res = window.WXWASMSDK.WX_SetMessageToFriendQuery(_WXPointer_stringify_adaptor(option)); - return res; -}, -WX_GetTextLineHeight:function( - option -){ - var res = window.WXWASMSDK.WX_GetTextLineHeight(_WXPointer_stringify_adaptor(option)); - return res; -}, -WX_LoadFont:function( - path -){ - var res = window.WXWASMSDK.WX_LoadFont(_WXPointer_stringify_adaptor(path)); - var bufferSize = lengthBytesUTF8(res || '') + 1; - var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); - return buffer; -}, -WX_GetGameLiveState:function( -){ - var res = window.WXWASMSDK.WX_GetGameLiveState(); - var bufferSize = lengthBytesUTF8(res || '') + 1; - var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); - return buffer; -}, - -WX_DownloadFile:function(conf) { - var res = window.WXWASMSDK.WX_DownloadFile(_WXPointer_stringify_adaptor(conf)); - var bufferSize = lengthBytesUTF8(res || '') + 1; - var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); - return buffer; -}, -WX_CreateFeedbackButton:function(option) { - var res = window.WXWASMSDK.WX_CreateFeedbackButton(_WXPointer_stringify_adaptor(option)); - var bufferSize = lengthBytesUTF8(res || '') + 1; - var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); - return buffer; -}, -WX_GetLogManager:function(option) { - var res = window.WXWASMSDK.WX_GetLogManager(_WXPointer_stringify_adaptor(option)); - var bufferSize = lengthBytesUTF8(res || '') + 1; - var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); - return buffer; -}, -WX_GetRealtimeLogManager:function() { - var res = window.WXWASMSDK.WX_GetRealtimeLogManager(); - var bufferSize = lengthBytesUTF8(res || '') + 1; - var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); - return buffer; -}, -WX_GetUpdateManager:function() { - var res = window.WXWASMSDK.WX_GetUpdateManager(); - var bufferSize = lengthBytesUTF8(res || '') + 1; - var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); - return buffer; -}, -WX_CreateVideoDecoder:function() { - var res = window.WXWASMSDK.WX_CreateVideoDecoder(); - var bufferSize = lengthBytesUTF8(res || '') + 1; - var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); - return buffer; -}, - -WX_DownloadTaskAbort:function(id) { - window.WXWASMSDK.WX_DownloadTaskAbort(_WXPointer_stringify_adaptor(id)); -}, -WX_DownloadTaskOffHeadersReceived:function(id) { - window.WXWASMSDK.WX_DownloadTaskOffHeadersReceived(_WXPointer_stringify_adaptor(id)); -}, -WX_DownloadTaskOffProgressUpdate:function(id) { - window.WXWASMSDK.WX_DownloadTaskOffProgressUpdate(_WXPointer_stringify_adaptor(id)); -}, -WX_DownloadTaskOnHeadersReceived:function(id) { - window.WXWASMSDK.WX_DownloadTaskOnHeadersReceived(_WXPointer_stringify_adaptor(id)); -}, -WX_DownloadTaskOnProgressUpdate:function(id) { - window.WXWASMSDK.WX_DownloadTaskOnProgressUpdate(_WXPointer_stringify_adaptor(id)); -}, -WXFeedbackButtonSetProperty: function(id, key, value) { - window.WXWASMSDK.WXFeedbackButtonSetProperty(_WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(key), _WXPointer_stringify_adaptor(value)); -}, - - - - -WX_FeedbackButtonDestroy:function(id) { - window.WXWASMSDK.WX_FeedbackButtonDestroy(_WXPointer_stringify_adaptor(id)); -}, -WX_FeedbackButtonHide:function(id) { - window.WXWASMSDK.WX_FeedbackButtonHide(_WXPointer_stringify_adaptor(id)); -}, -WX_FeedbackButtonOffTap:function(id) { - window.WXWASMSDK.WX_FeedbackButtonOffTap(_WXPointer_stringify_adaptor(id)); -}, -WX_FeedbackButtonOnTap:function(id) { - window.WXWASMSDK.WX_FeedbackButtonOnTap(_WXPointer_stringify_adaptor(id)); -}, -WX_FeedbackButtonShow:function(id) { - window.WXWASMSDK.WX_FeedbackButtonShow(_WXPointer_stringify_adaptor(id)); -}, -WX_LogManagerDebug:function(id, args) { - window.WXWASMSDK.WX_LogManagerDebug(_WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(args)); -}, -WX_LogManagerInfo:function(id, args) { - window.WXWASMSDK.WX_LogManagerInfo(_WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(args)); -}, -WX_LogManagerLog:function(id, args) { - window.WXWASMSDK.WX_LogManagerLog(_WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(args)); -}, -WX_LogManagerWarn:function(id, args) { - window.WXWASMSDK.WX_LogManagerWarn(_WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(args)); -}, -WX_RealtimeLogManagerAddFilterMsg:function(id, msg) { - window.WXWASMSDK.WX_RealtimeLogManagerAddFilterMsg(_WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(msg)); -}, -WX_RealtimeLogManagerError:function(id, args) { - window.WXWASMSDK.WX_RealtimeLogManagerError(_WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(args)); -}, -WX_RealtimeLogManagerInfo:function(id, args) { - window.WXWASMSDK.WX_RealtimeLogManagerInfo(_WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(args)); -}, -WX_RealtimeLogManagerSetFilterMsg:function(id, msg) { - window.WXWASMSDK.WX_RealtimeLogManagerSetFilterMsg(_WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(msg)); -}, -WX_RealtimeLogManagerWarn:function(id, args) { - window.WXWASMSDK.WX_RealtimeLogManagerWarn(_WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(args)); -}, -WX_UpdateManagerApplyUpdate:function(id) { - window.WXWASMSDK.WX_UpdateManagerApplyUpdate(_WXPointer_stringify_adaptor(id)); -}, -WX_UpdateManagerOnCheckForUpdate:function(id) { - window.WXWASMSDK.WX_UpdateManagerOnCheckForUpdate(_WXPointer_stringify_adaptor(id)); -}, -WX_UpdateManagerOnUpdateFailed:function(id) { - window.WXWASMSDK.WX_UpdateManagerOnUpdateFailed(_WXPointer_stringify_adaptor(id)); -}, -WX_UpdateManagerOnUpdateReady:function(id) { - window.WXWASMSDK.WX_UpdateManagerOnUpdateReady(_WXPointer_stringify_adaptor(id)); -}, -WX_VideoDecoderGetFrameData:function(id) { - var res = window.WXWASMSDK.WX_VideoDecoderGetFrameData(_WXPointer_stringify_adaptor(id)); - var bufferSize = lengthBytesUTF8(res) + 1; - var buffer = _malloc(bufferSize); - stringToUTF8(res, buffer, bufferSize); - return buffer; -}, -WX_VideoDecoderRemove:function(id) { - window.WXWASMSDK.WX_VideoDecoderRemove(_WXPointer_stringify_adaptor(id)); -}, -WX_VideoDecoderSeek:function(id, position) { - window.WXWASMSDK.WX_VideoDecoderSeek(_WXPointer_stringify_adaptor(id), position); -}, -WX_VideoDecoderStart:function(id, option) { - window.WXWASMSDK.WX_VideoDecoderStart(_WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(option)); -}, -WX_VideoDecoderStop:function(id) { - window.WXWASMSDK.WX_VideoDecoderStop(_WXPointer_stringify_adaptor(id)); -}, -WX_VideoDecoderOff:function(id, eventName) { - window.WXWASMSDK.WX_VideoDecoderOff(_WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(eventName)); -}, -WX_VideoDecoderOn:function(id, eventName) { - window.WXWASMSDK.WX_VideoDecoderOn(_WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(eventName)); -}, - }) \ No newline at end of file diff --git a/Runtime/Plugins/wx-perf.dll b/Runtime/Plugins/wx-perf.dll index 2dd5f0de..15e3ac7c 100644 Binary files a/Runtime/Plugins/wx-perf.dll and b/Runtime/Plugins/wx-perf.dll differ diff --git a/Runtime/Plugins/wx-runtime-editor.dll b/Runtime/Plugins/wx-runtime-editor.dll index ba27dec2..ec0c2903 100644 Binary files a/Runtime/Plugins/wx-runtime-editor.dll and b/Runtime/Plugins/wx-runtime-editor.dll differ diff --git a/Runtime/Plugins/wx-runtime-editor.xml b/Runtime/Plugins/wx-runtime-editor.xml index cd7cc8de..36a4246f 100644 --- a/Runtime/Plugins/wx-runtime-editor.xml +++ b/Runtime/Plugins/wx-runtime-editor.xml @@ -329,14 +329,14 @@ 成功回调 失败回调 - + [DownloadTask.abort()](https://developers.weixin.qq.com/minigame/dev/api/network/download/DownloadTask.abort.html) 需要基础库: `1.4.0` 中断下载任务 - + [DownloadTask.offHeadersReceived(function listener)](https://developers.weixin.qq.com/minigame/dev/api/network/download/DownloadTask.offHeadersReceived.html) 需要基础库: `2.1.0` @@ -349,7 +349,7 @@ ``` - + [DownloadTask.offProgressUpdate(function listener)](https://developers.weixin.qq.com/minigame/dev/api/network/download/DownloadTask.offProgressUpdate.html) 需要基础库: `2.1.0` @@ -362,14 +362,14 @@ ``` - + [DownloadTask.onHeadersReceived(function listener)](https://developers.weixin.qq.com/minigame/dev/api/network/download/DownloadTask.onHeadersReceived.html) 需要基础库: `2.1.0` 监听 HTTP Response Header 事件。会比请求完成事件更早 - + [DownloadTask.onProgressUpdate(function listener)](https://developers.weixin.qq.com/minigame/dev/api/network/download/DownloadTask.onProgressUpdate.html) 需要基础库: `1.4.0` @@ -404,19 +404,19 @@ 按钮上的文本,仅当 type 为 `text` 时有效 - + [FeedbackButton.destroy()](https://developers.weixin.qq.com/minigame/dev/api/open-api/feedback/FeedbackButton.destroy.html) 销毁意见反馈按钮 - + [FeedbackButton.hide()](https://developers.weixin.qq.com/minigame/dev/api/open-api/feedback/FeedbackButton.hide.html) 隐藏意见反馈按钮。 - + [FeedbackButton.offTap(function listener)](https://developers.weixin.qq.com/minigame/dev/api/open-api/feedback/FeedbackButton.offTap.html) 移除意见反馈按钮的点击事件的监听函数 @@ -428,13 +428,13 @@ ``` - + [FeedbackButton.onTap(function listener)](https://developers.weixin.qq.com/minigame/dev/api/open-api/feedback/FeedbackButton.onTap.html) 监听意见反馈按钮的点击事件 - + [FeedbackButton.show()](https://developers.weixin.qq.com/minigame/dev/api/open-api/feedback/FeedbackButton.show.html) 显示意见反馈按钮 @@ -1378,25 +1378,25 @@ 运行JS函数 - + [LogManager.debug()](https://developers.weixin.qq.com/minigame/dev/api/base/debug/LogManager.debug.html) 写 debug 日志 - + [LogManager.info()](https://developers.weixin.qq.com/minigame/dev/api/base/debug/LogManager.info.html) 写 info 日志 - + [LogManager.log()](https://developers.weixin.qq.com/minigame/dev/api/base/debug/LogManager.log.html) 写 log 日志 - + [LogManager.warn()](https://developers.weixin.qq.com/minigame/dev/api/base/debug/LogManager.warn.html) 写 warn 日志 @@ -3124,7 +3124,7 @@ - 允许微信使用蓝牙的开关(仅 iOS 有效) + 允许微信使用蓝牙的开关(安卓基础库 3.5.0 以上有效) @@ -3720,7 +3720,7 @@ 下载资源的 url - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -3742,7 +3742,7 @@ 是否开启 Quic 协议(gQUIC Q43) - + 接口调用失败的回调函数 @@ -3758,7 +3758,7 @@ HTTP 请求的 Header,Header 中不能设置 Referer - + 接口调用成功的回调函数 @@ -4106,12 +4106,12 @@ 文本的内容 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -4137,7 +4137,7 @@ - 'bold': 粗体; - + 接口调用成功的回调函数 @@ -4147,17 +4147,17 @@ 需要添加的卡券列表 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -4198,17 +4198,17 @@ shareTicket。可以从 wx.getEnterOptionsSync 中获取。详情 [shareTicket](#) - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -4238,32 +4238,32 @@ 需要获取权限的 scope,详见 [scope 列表](https://developers.weixin.qq.com/minigame/dev/guide/base-ability/authorize.html#scope-列表) - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -4273,22 +4273,22 @@ 是否被添加至 「我的小程序」 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -4298,7 +4298,7 @@ 最多可以选择的图片张数 - + 接口调用失败的回调函数 @@ -4319,7 +4319,7 @@ - 'camera': 使用相机; - + 接口调用成功的回调函数 @@ -4353,7 +4353,7 @@ - 'front': 使用前置摄像头; - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -4363,7 +4363,7 @@ 最多可以选择的文件个数,基础库2.25.0前,最多可支持9个文件,2.25.0及以后最多可支持20个文件 - + 接口调用失败的回调函数 @@ -4395,7 +4395,7 @@ - 'camera': 使用相机拍摄; - + 接口调用成功的回调函数 @@ -4453,7 +4453,7 @@ 最多可以选择的文件个数,可以 0~100 - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -4464,12 +4464,12 @@ 根据文件拓展名过滤,仅 type==file 时有效。每一项都不能是空字符串。默认不过滤。 - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -4523,17 +4523,17 @@ 蓝牙设备 id - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -4580,17 +4580,17 @@ | 10013 | invalid_data | 连接 deviceId 为空或者是格式不正确 | - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -4600,7 +4600,7 @@ 图片路径,图片的路径,支持本地路径、代码包路径 - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -4617,7 +4617,7 @@ 压缩后图片的宽度,单位为px,若不填写则默认以compressedHeight为准等比缩放。 - + 接口调用失败的回调函数 @@ -4627,7 +4627,7 @@ 压缩质量,范围0~100,数值越小,质量越低,压缩率越高(仅对jpg有效)。 - + 接口调用成功的回调函数 @@ -4642,17 +4642,17 @@ 蓝牙设备 id - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -4662,17 +4662,17 @@ 超时时间,单位 ms,不填表示不会超时 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -4809,17 +4809,17 @@ 描述service的Object - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -4979,17 +4979,17 @@ service 的 UUID - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -4999,12 +4999,12 @@ 广播自定义参数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -5018,7 +5018,7 @@ - 'high': 功率高; - + 接口调用成功的回调函数 @@ -5079,17 +5079,17 @@ 制造商信息 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5119,47 +5119,47 @@ 可选,处理回包时使用 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5179,7 +5179,7 @@ 图像宽度 - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -5204,12 +5204,12 @@ 是否返回当前图像的人脸(106 个点) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5289,17 +5289,17 @@ 右眼可信度 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5327,17 +5327,17 @@ 蓝牙服务 UUID。需要先调用 [wx.getBLEDeviceServices](https://developers.weixin.qq.com/minigame/dev/api/device/bluetooth-ble/wx.getBLEDeviceServices.html) 获取 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5392,17 +5392,17 @@ 蓝牙设备 id - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5417,17 +5417,17 @@ 蓝牙设备 id。需要已经通过 [wx.createBLEConnection](https://developers.weixin.qq.com/minigame/dev/api/device/bluetooth-ble/wx.createBLEConnection.html) 建立连接 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5452,17 +5452,17 @@ 蓝牙设备 id - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5485,17 +5485,17 @@ 缓存数据类别,取值为 periodic 或 pre - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5525,17 +5525,17 @@ 客户端拿到缓存数据的时间戳 ms。(iOS 时间戳存在异常,8.0.27 修复) - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5550,17 +5550,17 @@ 自定义的登录态 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5581,17 +5581,17 @@ 设备电量,范围 1 - 100 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5666,17 +5666,17 @@ Beacon 设备广播的 UUID - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5691,17 +5691,17 @@ 是否正在搜索设备 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5756,7 +5756,7 @@ 视频号 id,以“sph”开头的id,可在视频号助手获取 - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -5767,7 +5767,7 @@ 结束时间,筛选指定时间段的直播。若上传了startTime,未上传endTime,则endTime默认取当前时间 - + 接口调用失败的回调函数 @@ -5778,7 +5778,7 @@ 起始时间,筛选指定时间段的直播。若上传了endTime,未上传startTime,则startTime默认为0 - + 接口调用成功的回调函数 @@ -5829,8 +5829,10 @@ 直播状态 可选值: + - 1: 直播状态不存在(针对未开过直播的主播); - 2: 直播中; - - 3: 直播结束; + - 3: 直播已结束; + - 4: 直播准备中(未开播); @@ -5838,17 +5840,17 @@ 视频号 id,以“sph”开头的id,可在视频号助手获取 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5889,17 +5891,17 @@ 预告状态:0可用 1取消 2已用 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5914,17 +5916,17 @@ 蓝牙设备主服务的 UUID 列表(支持 16/32/128 位 UUID) - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5944,34 +5946,34 @@ 蓝牙设备名称,某些设备可能没有 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5981,17 +5983,17 @@ 第三方平台自定义的数据 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6019,17 +6021,17 @@ 需要获取的数据指标的对象数组 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6064,17 +6066,17 @@ 使用 sha1( rawData + sessionkey ) 得到字符串,用于校验用户信息 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6118,17 +6120,17 @@ 加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html) - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6138,17 +6140,17 @@ AI推理引擎版本 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6168,17 +6170,17 @@ 本机局域网子网掩码,基础库 2.24.0 开始支持 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6207,24 +6209,55 @@ 信号强弱,单位 dbm - + + + 需要基础库: `3.5.3` + 是否处于弱网环境 + + + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + + + 手机号实时验证,向用户申请,并在用户同意后,快速填写和实时验证手机号 [具体说明](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/getRealtimePhoneNumber.html)。 + + + + + 当手机号快速验证或手机号实时验证额度用尽时,是否对用户展示“申请获取你的手机号,但该功能使用次数已达当前小程序上限,暂时无法使用”的提示,默认展示。 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + 接口调用成功的回调函数 - 是否需要用户授权隐私协议(如果开发者没有在[mp后台-设置-服务内容声明-用户隐私保护指引]中声明隐私收集类型则会返回false;如果开发者声明了隐私收集,且用户之前同意过隐私协议则会返回false;如果开发者声明了隐私收集,且用户还没同意过则返回true;如果用户之前同意过、但后来小程序又新增了隐私收集类型也会返回true) + 是否需要用户授权隐私协议(如果开发者没有在「MP后台-设置-服务内容声明-用户隐私保护指引」中声明隐私收集类型则会返回false;如果开发者声明了隐私收集,且用户之前同意过隐私协议则会返回false;如果开发者声明了隐私收集,且用户还没同意过则返回true;如果用户之前同意过、但后来小程序又新增了隐私收集类型也会返回true) @@ -6232,17 +6265,17 @@ 隐私授权协议的名称 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6252,17 +6285,17 @@ 屏幕亮度值,范围 0 ~ 1,0 最暗,1 最亮 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6275,17 +6308,17 @@ - 'off': 关闭; - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6332,17 +6365,17 @@ shareTicket,详见[获取更多转发信息](#) - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6353,17 +6386,17 @@ 超时时间,单位 ms - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6383,42 +6416,42 @@ 限制的空间大小,单位 KB - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -6432,7 +6465,7 @@ - 'zh_TW': 繁体中文; - + 接口调用成功的回调函数 @@ -6522,17 +6555,17 @@ 要获取的 key 列表 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6564,17 +6597,17 @@ 加密算法的初始向量,详见 [用户数据的签名验证和加解密](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html#加密数据解密算法) - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6595,27 +6628,27 @@ 加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html) - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -6626,17 +6659,17 @@ 目前 toast 和 loading 相关接口可以相互混用,此参数可用于取消混用特性 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -6647,17 +6680,17 @@ 本接口为 Beta 版本,暂只在 Android 平台支持。需要隐藏的转发按钮名称列表,默认['shareAppMessage', 'shareTimeline']。按钮名称合法值包含 "shareAppMessage"、"shareTimeline" 两种 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -6668,22 +6701,22 @@ 目前 toast 和 loading 相关接口可以相互混用,此参数可用于取消混用特性 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6693,17 +6726,17 @@ 蓝牙设备 id - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6728,12 +6761,12 @@ 验证所需的时间戳 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -6757,7 +6790,7 @@ - 'video': 视频房间,结合 [voip-room](#) 组件可显示成员画面; - + 接口调用成功的回调函数 @@ -6809,17 +6842,17 @@ 在此通话中的成员 openId 名单 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6856,17 +6889,17 @@ pin 码,Base64 格式。 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6876,12 +6909,32 @@ 超时时间,单位 ms + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 需要返回给上一个小程序的数据,上一个小程序可在 `App.onShow` 中获取到这份数据。 [详情](#)。 + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 要打开的小程序 appId - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -6900,7 +6953,7 @@ 需要传递给目标小程序的数据,目标小程序可在 `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) 中可以获取到这份数据数据。 - + 接口调用失败的回调函数 @@ -6922,7 +6975,7 @@ 小程序链接,当传递该参数后,可以不传 appId 和 path。链接可以通过【小程序菜单】->【复制链接】获取。 - + 接口调用成功的回调函数 @@ -6947,17 +7000,17 @@ 是否启用 notify - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -7488,27 +7541,27 @@ 变化后的窗口宽度,单位 px - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -7522,7 +7575,7 @@ - 'peripheral': 从机(外围设备)模式; - + 接口调用成功的回调函数 @@ -7532,17 +7585,17 @@ 需要打开的卡券列表 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -7563,17 +7616,17 @@ 视频号 id,以“sph”开头的id,可在视频号助手获取 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -7588,17 +7641,17 @@ 视频号 id,以“sph”开头的id,可在视频号助手获取 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -7608,12 +7661,12 @@ 视频号 id,以“sph”开头的id,可在视频号助手获取 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -7628,7 +7681,7 @@ 直播 nonceId,通过 getChannelsLiveInfo 接口获取(基础库 v2.19.2 之前的版本需要填写) - + 接口调用成功的回调函数 @@ -7638,17 +7691,17 @@ 视频号 id - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -7663,12 +7716,12 @@ 客服信息 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -7693,7 +7746,7 @@ 是否发送小程序气泡消息 - + 接口调用成功的回调函数 @@ -7703,12 +7756,12 @@ 客服链接 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -7738,7 +7791,7 @@ 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,用户点击后可以快速发送小程序消息 - + 接口调用成功的回调函数 @@ -7753,32 +7806,32 @@ 在客服会话内点击小程序消息卡片进入小程序时,所带的小程序打开参数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -7802,17 +7855,17 @@ 用户订阅消息设置,接口参数`withSubscriptions`值为`true`时才会返回。 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -7867,7 +7920,7 @@ 需要预览的图片链接列表。[2.2.3](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html) 起支持云文件ID。 - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -7877,7 +7930,7 @@ 当前显示图片的链接 - + 接口调用失败的回调函数 @@ -7894,7 +7947,7 @@ 是否显示长按菜单。 - + 接口调用成功的回调函数 @@ -7904,7 +7957,7 @@ 需要预览的资源列表 - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -7914,7 +7967,7 @@ 当前显示的资源序号 - + 接口调用失败的回调函数 @@ -7931,7 +7984,7 @@ 是否显示长按菜单。 - + 接口调用成功的回调函数 @@ -7969,17 +8022,17 @@ 蓝牙特征对应服务的 UUID - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -7989,17 +8042,17 @@ 本地缓存中指定的 key - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8009,17 +8062,17 @@ 要删除掉 key 列表 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8029,7 +8082,7 @@ 场景ID,在「小程序管理后台」获取 - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -8044,7 +8097,7 @@ 自定义维度数据,key在「小程序管理后台」获取。只支持能够通过JSON.stringify序列化的对象,且序列化后长度不超过1024个字符 - + 接口调用失败的回调函数 @@ -8054,7 +8107,7 @@ 自定义指标数据,key在「小程序管理后台」获取。只支持能够通过JSON.stringify序列化的对象,且序列化后长度不超过1024个字符 - + 接口调用成功的回调函数 @@ -8184,17 +8237,17 @@ 分区 ID - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8278,7 +8331,7 @@ 购买数量。mode=game 时必填。购买数量。详见 [buyQuantity 限制说明](#buyquantity-限制说明)。 - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -8291,7 +8344,7 @@ - 1: 米大师沙箱环境; - + 接口调用失败的回调函数 @@ -8303,7 +8356,7 @@ - 'android': android; - + 接口调用成功的回调函数 @@ -8331,7 +8384,11 @@ | -15009 | | 虚拟支付接口错误码,由于健康系统限制,本次支付已超过限额(这种错误情况会有默认弹窗提示) | | -15010 | | 虚拟支付接口错误码,正式版小游戏不允许在沙箱环境支付 | | -15011 | | 请求的数据类型错误 | + | -15012 | | SIGNATURE错误 | | -15013 | | 代币未发布 | + | -15014 | | paysig错误 | + | -15015 | | sessionkey过期 | + | -15016 | | 道具价格错误 | | -15017 | | 订单已关闭 | | 1 | | 虚拟支付接口错误码,用户取消支付 | | 2 | | 虚拟支付接口错误码,客户端错误,判断到小程序在用户处于支付中时,又发起了一笔支付请求 | @@ -8365,7 +8422,11 @@ | -15009 | | 虚拟支付接口错误码,由于健康系统限制,本次支付已超过限额(这种错误情况会有默认弹窗提示) | | -15010 | | 虚拟支付接口错误码,正式版小游戏不允许在沙箱环境支付 | | -15011 | | 请求的数据类型错误 | + | -15012 | | SIGNATURE错误 | | -15013 | | 代币未发布 | + | -15014 | | paysig错误 | + | -15015 | | sessionkey过期 | + | -15016 | | 道具价格错误 | | -15017 | | 订单已关闭 | | 1 | | 虚拟支付接口错误码,用户取消支付 | | 2 | | 虚拟支付接口错误码,客户端错误,判断到小程序在用户处于支付中时,又发起了一笔支付请求 | @@ -8417,17 +8478,17 @@ 可参考[calc_signature](https://docs.qq.com/doc/DVUN0QWJja0J5c2x4) - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8506,17 +8567,17 @@ 需要订阅的消息模板的id的集合,一次调用最多可订阅3条消息(注意:iOS客户端7.0.6版本、Android客户端7.0.7版本之后的一次性订阅/长期订阅才支持多个模板消息,iOS客户端7.0.5版本、Android客户端7.0.6版本之前的一次订阅只支持一个模板消息)消息模板id在[微信公众平台(mp.weixin.qq.com)-功能-订阅消息]中配置。每个tmplId对应的模板标题需要不相同,否则会被过滤。 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8544,17 +8605,17 @@ 系统订阅消息类型列表,一次调用最多可订阅3种类型的消息,目前支持两种类型,"SYS_MSG_TYPE_INTERACTIVE"(好友互动提醒)、"SYS_MSG_TYPE_RANK"(排行榜超越提醒) - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8567,17 +8628,17 @@ 接口调用成功时errMsg值为'requestSubscribeSystemMessage:ok' - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8587,12 +8648,12 @@ 预告 id,通过 getChannelsLiveNoticeInfo 接口获取 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -8602,7 +8663,7 @@ 打开的页面路径,path 中 ? 后面的部分会成为 query - + 接口调用成功的回调函数 @@ -8612,17 +8673,17 @@ 待保存文件路径 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8632,27 +8693,27 @@ 图片文件路径,可以是临时文件路径或永久文件路径 (本地路径) ,不支持网络路径 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -8674,7 +8735,7 @@ - 'pdf417': PDF417 条码; - + 接口调用成功的回调函数 @@ -8734,17 +8795,17 @@ 最大传输单元。设置范围为 (22,512) 区间内,单位 bytes - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8764,17 +8825,17 @@ 自定义的登录态 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8784,17 +8845,17 @@ 剪贴板的内容 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8807,17 +8868,17 @@ - 'portrait': 竖屏; - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8827,27 +8888,27 @@ 是否打开调试 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -8867,7 +8928,7 @@ true 代表用扬声器播放,false 代表听筒播放,默认值为 true。 - + 接口调用成功的回调函数 @@ -8877,17 +8938,17 @@ 是否保持屏幕常亮 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8900,17 +8961,17 @@ - 'dark': 深色; - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8920,17 +8981,17 @@ 屏幕亮度值,范围 0 ~ 1,0 最暗,1 最亮。在安卓端支持传入特殊值 -1,表示屏幕亮度跟随系统变化 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8943,17 +9004,17 @@ - 'black': 浅色; - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8963,17 +9024,17 @@ 要修改的 KV 数据列表 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8988,17 +9049,17 @@ 数据的 value - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9048,12 +9109,12 @@ 警示文案 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -9063,7 +9124,7 @@ 按钮的文字颜色 - + 接口调用成功的回调函数 @@ -9104,17 +9165,17 @@ 是否为多行输入 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9124,12 +9185,12 @@ 提示的内容 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -9139,7 +9200,7 @@ 是否显示透明蒙层,防止触摸穿透 - + 接口调用成功的回调函数 @@ -9154,7 +9215,7 @@ 取消按钮的文字,最多 4 个字符 - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -9180,7 +9241,7 @@ 是否显示输入框 - + 接口调用失败的回调函数 @@ -9196,7 +9257,7 @@ 是否显示取消按钮 - + 接口调用成功的回调函数 @@ -9227,7 +9288,7 @@ 要分享的图片地址,必须为本地路径或临时路径 - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -9238,7 +9299,7 @@ 从消息小程序入口打开小程序的路径,如果当前页面允许分享给朋友,则默认为当前页面路径,否则默认为小程序首页 - + 接口调用失败的回调函数 @@ -9252,20 +9313,20 @@ 需要基础库: `3.2.0` - 分享样式,可选 v2 + 分享样式,小程序可选 v2 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -9276,7 +9337,7 @@ 本接口为 Beta 版本,暂只在 Android 平台支持。需要显示的转发按钮名称列表,默认['shareAppMessage']。按钮名称合法值包含 "shareAppMessage"、"shareTimeline" 两种 - + 接口调用成功的回调函数 @@ -9291,7 +9352,7 @@ 提示的内容 - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -9301,7 +9362,7 @@ 提示的延迟时间 - + 接口调用失败的回调函数 @@ -9327,17 +9388,17 @@ 是否显示透明蒙层,防止触摸穿透 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -9352,7 +9413,7 @@ - 'normal': 普通的回调频率,在 200ms/次 左右; - + 接口调用成功的回调函数 @@ -9362,12 +9423,12 @@ Beacon 设备广播的 UUID 列表 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -9377,7 +9438,7 @@ 是否校验蓝牙开关,仅在 iOS 下有效。iOS 11 起,控制面板里关掉蓝牙,还是能继续使用 Beacon 服务。 - + 接口调用成功的回调函数 @@ -9387,12 +9448,12 @@ 是否允许重复上报同一设备。如果允许重复上报,则 [wx.onBlueToothDeviceFound](#) 方法会多次上报同一设备,但是 RSSI 值会有不同。 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -9416,32 +9477,32 @@ 要搜索的蓝牙设备主服务的 UUID 列表(支持 16/32/128 位 UUID)。某些蓝牙设备会广播自己的主 service 的 UUID。如果设置此参数,则只搜索广播包有对应 UUID 的主服务的蓝牙设备。建议通过该参数过滤掉周边不需要处理的其他蓝牙设备。 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -9455,97 +9516,97 @@ - 'normal': 普通的回调频率,在 200ms/次 左右; - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9555,17 +9616,17 @@ 键盘输入框的当前值 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9576,12 +9637,12 @@ 动态消息的 activityId。通过 [updatableMessage.createActivityId](https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/updatable-message/updatableMessage.createActivityId.html) 接口获取 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -9598,7 +9659,7 @@ 是否是动态消息,详见[动态消息](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/share/updatable-message.html) - + 接口调用成功的回调函数 @@ -9645,47 +9706,47 @@ 静音设置 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9696,17 +9757,17 @@ 震动强度类型,有效值为:heavy、medium、light - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9738,17 +9799,17 @@ 蓝牙设备特征对应的二进制值 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9766,32 +9827,32 @@ 自定义query - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9826,17 +9887,17 @@ 是否正在直播 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9846,17 +9907,17 @@ 最近几场直播的 feedId 列表 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9891,17 +9952,17 @@ 要查询的直播的id - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9911,17 +9972,17 @@ 支持填写最多4个openid,该用户的直播间将在直播专区置顶显示;可不填 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9931,32 +9992,32 @@ 用于打开指定游戏内容页面的开放链接 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9976,17 +10037,17 @@ 要打开的业务类型,目前仅支持 'servicecommentpage' - + 调用成功、失败都会执行 - + 评价失败的回调 - + 评价成功的回调 @@ -10022,35 +10083,35 @@ 要发送的消息 - + [RealtimeLogManager.addFilterMsg(string msg)](https://developers.weixin.qq.com/minigame/dev/api/base/debug/RealtimeLogManager.addFilterMsg.html) 需要基础库: `2.14.4` 添加过滤关键字,暂不支持在插件使用 - + [RealtimeLogManager.error()](https://developers.weixin.qq.com/minigame/dev/api/base/debug/RealtimeLogManager.error.html) 需要基础库: `2.14.4` 写 error 日志,暂不支持在插件使用 - + [RealtimeLogManager.info()](https://developers.weixin.qq.com/minigame/dev/api/base/debug/RealtimeLogManager.info.html) 需要基础库: `2.14.4` 写 info 日志,暂不支持在插件使用 - + [RealtimeLogManager.setFilterMsg(string msg)](https://developers.weixin.qq.com/minigame/dev/api/base/debug/RealtimeLogManager.setFilterMsg.html) 需要基础库: `2.14.4` 设置过滤关键字,暂不支持在插件使用 - + [RealtimeLogManager.warn()](https://developers.weixin.qq.com/minigame/dev/api/base/debug/RealtimeLogManager.warn.html) 需要基础库: `2.14.4` @@ -10421,7 +10482,7 @@ 绑定一个系统随机分配的可用端口,或绑定一个指定的端口号 - + [UpdateManager.applyUpdate()](https://developers.weixin.qq.com/minigame/dev/api/base/update/UpdateManager.applyUpdate.html) 强制小程序重启并使用新版本。在小程序新版本下载完成后(即收到 `onUpdateReady` 回调)调用。 @@ -10429,7 +10490,7 @@ [示例代码](https://developers.weixin.qq.com/minigame/dev/api/base/update/UpdateManager.html#示例代码) - + [UpdateManager.onCheckForUpdate(function listener)](https://developers.weixin.qq.com/minigame/dev/api/base/update/UpdateManager.onCheckForUpdate.html) 监听向微信后台请求检查更新结果事件。微信在小程序每次启动(包括热启动)时自动检查更新,不需由开发者主动触发。 @@ -10437,7 +10498,7 @@ [示例代码](https://developers.weixin.qq.com/minigame/dev/api/base/update/UpdateManager.html#示例代码) - + [UpdateManager.onUpdateFailed(function listener)](https://developers.weixin.qq.com/minigame/dev/api/base/update/UpdateManager.onUpdateFailed.html) 监听小程序更新失败事件。小程序有新版本,客户端主动触发下载(无需开发者触发),下载失败(可能是网络原因等)后回调 @@ -10445,7 +10506,7 @@ [示例代码](https://developers.weixin.qq.com/minigame/dev/api/base/update/UpdateManager.html#示例代码) - + [UpdateManager.onUpdateReady(function listener)](https://developers.weixin.qq.com/minigame/dev/api/base/update/UpdateManager.onUpdateReady.html) 监听小程序有版本更新事件。客户端主动触发下载(无需开发者触发),下载成功后回调 @@ -10705,49 +10766,49 @@ 取消监听视频下载(缓冲)事件 ,action 为空表示移除全部事件监听 - + [Object VideoDecoder.getFrameData()](https://developers.weixin.qq.com/minigame/dev/api/media/video-decoder/VideoDecoder.getFrameData.html) 需要基础库: `2.11.1` 获取下一帧的解码数据 - + [Promise VideoDecoder.remove()](https://developers.weixin.qq.com/minigame/dev/api/media/video-decoder/VideoDecoder.remove.html) 需要基础库: `2.11.1` 移除解码器 - + [Promise VideoDecoder.seek(number position)](https://developers.weixin.qq.com/minigame/dev/api/media/video-decoder/VideoDecoder.seek.html) 需要基础库: `2.11.1` 跳到某个时间点解码 - + [Promise VideoDecoder.start(Object object)](https://developers.weixin.qq.com/minigame/dev/api/media/video-decoder/VideoDecoder.start.html) 需要基础库: `2.11.1` 开始解码 - + [Promise VideoDecoder.stop()](https://developers.weixin.qq.com/minigame/dev/api/media/video-decoder/VideoDecoder.stop.html) 需要基础库: `2.11.1` 停止解码 - + [VideoDecoder.off(string eventName, function callback)](https://developers.weixin.qq.com/minigame/dev/api/media/video-decoder/VideoDecoder.off.html) 需要基础库: `2.11.1` 取消监听录制事件。当对应事件触发时,该回调函数不再执行 - + [VideoDecoder.on(string eventName, function callback)](https://developers.weixin.qq.com/minigame/dev/api/media/video-decoder/VideoDecoder.on.html) 需要基础库: `2.11.1` diff --git a/Runtime/Plugins/wx-runtime.dll b/Runtime/Plugins/wx-runtime.dll index 3ae075dc..da5110ad 100644 Binary files a/Runtime/Plugins/wx-runtime.dll and b/Runtime/Plugins/wx-runtime.dll differ diff --git a/Runtime/Plugins/wx-runtime.xml b/Runtime/Plugins/wx-runtime.xml index 052c8601..5c9172b4 100644 --- a/Runtime/Plugins/wx-runtime.xml +++ b/Runtime/Plugins/wx-runtime.xml @@ -335,14 +335,14 @@ 成功回调 失败回调 - + [DownloadTask.abort()](https://developers.weixin.qq.com/minigame/dev/api/network/download/DownloadTask.abort.html) 需要基础库: `1.4.0` 中断下载任务 - + [DownloadTask.offHeadersReceived(function listener)](https://developers.weixin.qq.com/minigame/dev/api/network/download/DownloadTask.offHeadersReceived.html) 需要基础库: `2.1.0` @@ -355,7 +355,7 @@ ``` - + [DownloadTask.offProgressUpdate(function listener)](https://developers.weixin.qq.com/minigame/dev/api/network/download/DownloadTask.offProgressUpdate.html) 需要基础库: `2.1.0` @@ -368,14 +368,14 @@ ``` - + [DownloadTask.onHeadersReceived(function listener)](https://developers.weixin.qq.com/minigame/dev/api/network/download/DownloadTask.onHeadersReceived.html) 需要基础库: `2.1.0` 监听 HTTP Response Header 事件。会比请求完成事件更早 - + [DownloadTask.onProgressUpdate(function listener)](https://developers.weixin.qq.com/minigame/dev/api/network/download/DownloadTask.onProgressUpdate.html) 需要基础库: `1.4.0` @@ -410,19 +410,19 @@ 按钮上的文本,仅当 type 为 `text` 时有效 - + [FeedbackButton.destroy()](https://developers.weixin.qq.com/minigame/dev/api/open-api/feedback/FeedbackButton.destroy.html) 销毁意见反馈按钮 - + [FeedbackButton.hide()](https://developers.weixin.qq.com/minigame/dev/api/open-api/feedback/FeedbackButton.hide.html) 隐藏意见反馈按钮。 - + [FeedbackButton.offTap(function listener)](https://developers.weixin.qq.com/minigame/dev/api/open-api/feedback/FeedbackButton.offTap.html) 移除意见反馈按钮的点击事件的监听函数 @@ -434,13 +434,13 @@ ``` - + [FeedbackButton.onTap(function listener)](https://developers.weixin.qq.com/minigame/dev/api/open-api/feedback/FeedbackButton.onTap.html) 监听意见反馈按钮的点击事件 - + [FeedbackButton.show()](https://developers.weixin.qq.com/minigame/dev/api/open-api/feedback/FeedbackButton.show.html) 显示意见反馈按钮 @@ -1384,25 +1384,25 @@ 运行JS函数 - + [LogManager.debug()](https://developers.weixin.qq.com/minigame/dev/api/base/debug/LogManager.debug.html) 写 debug 日志 - + [LogManager.info()](https://developers.weixin.qq.com/minigame/dev/api/base/debug/LogManager.info.html) 写 info 日志 - + [LogManager.log()](https://developers.weixin.qq.com/minigame/dev/api/base/debug/LogManager.log.html) 写 log 日志 - + [LogManager.warn()](https://developers.weixin.qq.com/minigame/dev/api/base/debug/LogManager.warn.html) 写 warn 日志 @@ -3130,7 +3130,7 @@ - 允许微信使用蓝牙的开关(仅 iOS 有效) + 允许微信使用蓝牙的开关(安卓基础库 3.5.0 以上有效) @@ -3726,7 +3726,7 @@ 下载资源的 url - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -3748,7 +3748,7 @@ 是否开启 Quic 协议(gQUIC Q43) - + 接口调用失败的回调函数 @@ -3764,7 +3764,7 @@ HTTP 请求的 Header,Header 中不能设置 Referer - + 接口调用成功的回调函数 @@ -4112,12 +4112,12 @@ 文本的内容 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -4143,7 +4143,7 @@ - 'bold': 粗体; - + 接口调用成功的回调函数 @@ -4153,17 +4153,17 @@ 需要添加的卡券列表 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -4204,17 +4204,17 @@ shareTicket。可以从 wx.getEnterOptionsSync 中获取。详情 [shareTicket](#) - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -4244,32 +4244,32 @@ 需要获取权限的 scope,详见 [scope 列表](https://developers.weixin.qq.com/minigame/dev/guide/base-ability/authorize.html#scope-列表) - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -4279,22 +4279,22 @@ 是否被添加至 「我的小程序」 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -4304,7 +4304,7 @@ 最多可以选择的图片张数 - + 接口调用失败的回调函数 @@ -4325,7 +4325,7 @@ - 'camera': 使用相机; - + 接口调用成功的回调函数 @@ -4359,7 +4359,7 @@ - 'front': 使用前置摄像头; - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -4369,7 +4369,7 @@ 最多可以选择的文件个数,基础库2.25.0前,最多可支持9个文件,2.25.0及以后最多可支持20个文件 - + 接口调用失败的回调函数 @@ -4401,7 +4401,7 @@ - 'camera': 使用相机拍摄; - + 接口调用成功的回调函数 @@ -4459,7 +4459,7 @@ 最多可以选择的文件个数,可以 0~100 - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -4470,12 +4470,12 @@ 根据文件拓展名过滤,仅 type==file 时有效。每一项都不能是空字符串。默认不过滤。 - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -4529,17 +4529,17 @@ 蓝牙设备 id - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -4586,17 +4586,17 @@ | 10013 | invalid_data | 连接 deviceId 为空或者是格式不正确 | - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -4606,7 +4606,7 @@ 图片路径,图片的路径,支持本地路径、代码包路径 - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -4623,7 +4623,7 @@ 压缩后图片的宽度,单位为px,若不填写则默认以compressedHeight为准等比缩放。 - + 接口调用失败的回调函数 @@ -4633,7 +4633,7 @@ 压缩质量,范围0~100,数值越小,质量越低,压缩率越高(仅对jpg有效)。 - + 接口调用成功的回调函数 @@ -4648,17 +4648,17 @@ 蓝牙设备 id - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -4668,17 +4668,17 @@ 超时时间,单位 ms,不填表示不会超时 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -4815,17 +4815,17 @@ 描述service的Object - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -4985,17 +4985,17 @@ service 的 UUID - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5005,12 +5005,12 @@ 广播自定义参数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -5024,7 +5024,7 @@ - 'high': 功率高; - + 接口调用成功的回调函数 @@ -5085,17 +5085,17 @@ 制造商信息 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5125,47 +5125,47 @@ 可选,处理回包时使用 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5185,7 +5185,7 @@ 图像宽度 - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -5210,12 +5210,12 @@ 是否返回当前图像的人脸(106 个点) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5295,17 +5295,17 @@ 右眼可信度 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5333,17 +5333,17 @@ 蓝牙服务 UUID。需要先调用 [wx.getBLEDeviceServices](https://developers.weixin.qq.com/minigame/dev/api/device/bluetooth-ble/wx.getBLEDeviceServices.html) 获取 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5398,17 +5398,17 @@ 蓝牙设备 id - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5423,17 +5423,17 @@ 蓝牙设备 id。需要已经通过 [wx.createBLEConnection](https://developers.weixin.qq.com/minigame/dev/api/device/bluetooth-ble/wx.createBLEConnection.html) 建立连接 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5458,17 +5458,17 @@ 蓝牙设备 id - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5491,17 +5491,17 @@ 缓存数据类别,取值为 periodic 或 pre - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5531,17 +5531,17 @@ 客户端拿到缓存数据的时间戳 ms。(iOS 时间戳存在异常,8.0.27 修复) - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5556,17 +5556,17 @@ 自定义的登录态 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5587,17 +5587,17 @@ 设备电量,范围 1 - 100 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5672,17 +5672,17 @@ Beacon 设备广播的 UUID - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5697,17 +5697,17 @@ 是否正在搜索设备 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5762,7 +5762,7 @@ 视频号 id,以“sph”开头的id,可在视频号助手获取 - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -5773,7 +5773,7 @@ 结束时间,筛选指定时间段的直播。若上传了startTime,未上传endTime,则endTime默认取当前时间 - + 接口调用失败的回调函数 @@ -5784,7 +5784,7 @@ 起始时间,筛选指定时间段的直播。若上传了endTime,未上传startTime,则startTime默认为0 - + 接口调用成功的回调函数 @@ -5835,8 +5835,10 @@ 直播状态 可选值: + - 1: 直播状态不存在(针对未开过直播的主播); - 2: 直播中; - - 3: 直播结束; + - 3: 直播已结束; + - 4: 直播准备中(未开播); @@ -5844,17 +5846,17 @@ 视频号 id,以“sph”开头的id,可在视频号助手获取 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5895,17 +5897,17 @@ 预告状态:0可用 1取消 2已用 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5920,17 +5922,17 @@ 蓝牙设备主服务的 UUID 列表(支持 16/32/128 位 UUID) - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5950,34 +5952,34 @@ 蓝牙设备名称,某些设备可能没有 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -5987,17 +5989,17 @@ 第三方平台自定义的数据 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6025,17 +6027,17 @@ 需要获取的数据指标的对象数组 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6070,17 +6072,17 @@ 使用 sha1( rawData + sessionkey ) 得到字符串,用于校验用户信息 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6124,17 +6126,17 @@ 加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html) - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6144,17 +6146,17 @@ AI推理引擎版本 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6174,17 +6176,17 @@ 本机局域网子网掩码,基础库 2.24.0 开始支持 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6213,24 +6215,55 @@ 信号强弱,单位 dbm - + + + 需要基础库: `3.5.3` + 是否处于弱网环境 + + + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + + + 手机号实时验证,向用户申请,并在用户同意后,快速填写和实时验证手机号 [具体说明](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/getRealtimePhoneNumber.html)。 + + + + + 当手机号快速验证或手机号实时验证额度用尽时,是否对用户展示“申请获取你的手机号,但该功能使用次数已达当前小程序上限,暂时无法使用”的提示,默认展示。 + + + + + 接口调用成功的回调函数 + + + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 接口调用失败的回调函数 + + + 接口调用成功的回调函数 - 是否需要用户授权隐私协议(如果开发者没有在[mp后台-设置-服务内容声明-用户隐私保护指引]中声明隐私收集类型则会返回false;如果开发者声明了隐私收集,且用户之前同意过隐私协议则会返回false;如果开发者声明了隐私收集,且用户还没同意过则返回true;如果用户之前同意过、但后来小程序又新增了隐私收集类型也会返回true) + 是否需要用户授权隐私协议(如果开发者没有在「MP后台-设置-服务内容声明-用户隐私保护指引」中声明隐私收集类型则会返回false;如果开发者声明了隐私收集,且用户之前同意过隐私协议则会返回false;如果开发者声明了隐私收集,且用户还没同意过则返回true;如果用户之前同意过、但后来小程序又新增了隐私收集类型也会返回true) @@ -6238,17 +6271,17 @@ 隐私授权协议的名称 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6258,17 +6291,17 @@ 屏幕亮度值,范围 0 ~ 1,0 最暗,1 最亮 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6281,17 +6314,17 @@ - 'off': 关闭; - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6338,17 +6371,17 @@ shareTicket,详见[获取更多转发信息](#) - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6359,17 +6392,17 @@ 超时时间,单位 ms - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6389,42 +6422,42 @@ 限制的空间大小,单位 KB - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -6438,7 +6471,7 @@ - 'zh_TW': 繁体中文; - + 接口调用成功的回调函数 @@ -6528,17 +6561,17 @@ 要获取的 key 列表 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6570,17 +6603,17 @@ 加密算法的初始向量,详见 [用户数据的签名验证和加解密](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html#加密数据解密算法) - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6601,27 +6634,27 @@ 加密算法的初始向量,详细见[加密数据解密算法](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html) - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -6632,17 +6665,17 @@ 目前 toast 和 loading 相关接口可以相互混用,此参数可用于取消混用特性 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -6653,17 +6686,17 @@ 本接口为 Beta 版本,暂只在 Android 平台支持。需要隐藏的转发按钮名称列表,默认['shareAppMessage', 'shareTimeline']。按钮名称合法值包含 "shareAppMessage"、"shareTimeline" 两种 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -6674,22 +6707,22 @@ 目前 toast 和 loading 相关接口可以相互混用,此参数可用于取消混用特性 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6699,17 +6732,17 @@ 蓝牙设备 id - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6734,12 +6767,12 @@ 验证所需的时间戳 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -6763,7 +6796,7 @@ - 'video': 视频房间,结合 [voip-room](#) 组件可显示成员画面; - + 接口调用成功的回调函数 @@ -6815,17 +6848,17 @@ 在此通话中的成员 openId 名单 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6862,17 +6895,17 @@ pin 码,Base64 格式。 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -6882,12 +6915,32 @@ 超时时间,单位 ms + + + 接口调用结束的回调函数(调用成功、失败都会执行) + + + + + 需要返回给上一个小程序的数据,上一个小程序可在 `App.onShow` 中获取到这份数据。 [详情](#)。 + + + + + 接口调用失败的回调函数 + + + + + 接口调用成功的回调函数 + + 要打开的小程序 appId - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -6906,7 +6959,7 @@ 需要传递给目标小程序的数据,目标小程序可在 `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) 中可以获取到这份数据数据。 - + 接口调用失败的回调函数 @@ -6928,7 +6981,7 @@ 小程序链接,当传递该参数后,可以不传 appId 和 path。链接可以通过【小程序菜单】->【复制链接】获取。 - + 接口调用成功的回调函数 @@ -6953,17 +7006,17 @@ 是否启用 notify - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -7494,27 +7547,27 @@ 变化后的窗口宽度,单位 px - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -7528,7 +7581,7 @@ - 'peripheral': 从机(外围设备)模式; - + 接口调用成功的回调函数 @@ -7538,17 +7591,17 @@ 需要打开的卡券列表 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -7569,17 +7622,17 @@ 视频号 id,以“sph”开头的id,可在视频号助手获取 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -7594,17 +7647,17 @@ 视频号 id,以“sph”开头的id,可在视频号助手获取 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -7614,12 +7667,12 @@ 视频号 id,以“sph”开头的id,可在视频号助手获取 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -7634,7 +7687,7 @@ 直播 nonceId,通过 getChannelsLiveInfo 接口获取(基础库 v2.19.2 之前的版本需要填写) - + 接口调用成功的回调函数 @@ -7644,17 +7697,17 @@ 视频号 id - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -7669,12 +7722,12 @@ 客服信息 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -7699,7 +7752,7 @@ 是否发送小程序气泡消息 - + 接口调用成功的回调函数 @@ -7709,12 +7762,12 @@ 客服链接 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -7744,7 +7797,7 @@ 是否显示会话内消息卡片,设置此参数为 true,用户进入客服会话会在右下角显示"可能要发送的小程序"提示,用户点击后可以快速发送小程序消息 - + 接口调用成功的回调函数 @@ -7759,32 +7812,32 @@ 在客服会话内点击小程序消息卡片进入小程序时,所带的小程序打开参数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -7808,17 +7861,17 @@ 用户订阅消息设置,接口参数`withSubscriptions`值为`true`时才会返回。 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -7873,7 +7926,7 @@ 需要预览的图片链接列表。[2.2.3](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html) 起支持云文件ID。 - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -7883,7 +7936,7 @@ 当前显示图片的链接 - + 接口调用失败的回调函数 @@ -7900,7 +7953,7 @@ 是否显示长按菜单。 - + 接口调用成功的回调函数 @@ -7910,7 +7963,7 @@ 需要预览的资源列表 - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -7920,7 +7973,7 @@ 当前显示的资源序号 - + 接口调用失败的回调函数 @@ -7937,7 +7990,7 @@ 是否显示长按菜单。 - + 接口调用成功的回调函数 @@ -7975,17 +8028,17 @@ 蓝牙特征对应服务的 UUID - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -7995,17 +8048,17 @@ 本地缓存中指定的 key - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8015,17 +8068,17 @@ 要删除掉 key 列表 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8035,7 +8088,7 @@ 场景ID,在「小程序管理后台」获取 - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -8050,7 +8103,7 @@ 自定义维度数据,key在「小程序管理后台」获取。只支持能够通过JSON.stringify序列化的对象,且序列化后长度不超过1024个字符 - + 接口调用失败的回调函数 @@ -8060,7 +8113,7 @@ 自定义指标数据,key在「小程序管理后台」获取。只支持能够通过JSON.stringify序列化的对象,且序列化后长度不超过1024个字符 - + 接口调用成功的回调函数 @@ -8190,17 +8243,17 @@ 分区 ID - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8284,7 +8337,7 @@ 购买数量。mode=game 时必填。购买数量。详见 [buyQuantity 限制说明](#buyquantity-限制说明)。 - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -8297,7 +8350,7 @@ - 1: 米大师沙箱环境; - + 接口调用失败的回调函数 @@ -8309,7 +8362,7 @@ - 'android': android; - + 接口调用成功的回调函数 @@ -8337,7 +8390,11 @@ | -15009 | | 虚拟支付接口错误码,由于健康系统限制,本次支付已超过限额(这种错误情况会有默认弹窗提示) | | -15010 | | 虚拟支付接口错误码,正式版小游戏不允许在沙箱环境支付 | | -15011 | | 请求的数据类型错误 | + | -15012 | | SIGNATURE错误 | | -15013 | | 代币未发布 | + | -15014 | | paysig错误 | + | -15015 | | sessionkey过期 | + | -15016 | | 道具价格错误 | | -15017 | | 订单已关闭 | | 1 | | 虚拟支付接口错误码,用户取消支付 | | 2 | | 虚拟支付接口错误码,客户端错误,判断到小程序在用户处于支付中时,又发起了一笔支付请求 | @@ -8371,7 +8428,11 @@ | -15009 | | 虚拟支付接口错误码,由于健康系统限制,本次支付已超过限额(这种错误情况会有默认弹窗提示) | | -15010 | | 虚拟支付接口错误码,正式版小游戏不允许在沙箱环境支付 | | -15011 | | 请求的数据类型错误 | + | -15012 | | SIGNATURE错误 | | -15013 | | 代币未发布 | + | -15014 | | paysig错误 | + | -15015 | | sessionkey过期 | + | -15016 | | 道具价格错误 | | -15017 | | 订单已关闭 | | 1 | | 虚拟支付接口错误码,用户取消支付 | | 2 | | 虚拟支付接口错误码,客户端错误,判断到小程序在用户处于支付中时,又发起了一笔支付请求 | @@ -8423,17 +8484,17 @@ 可参考[calc_signature](https://docs.qq.com/doc/DVUN0QWJja0J5c2x4) - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8512,17 +8573,17 @@ 需要订阅的消息模板的id的集合,一次调用最多可订阅3条消息(注意:iOS客户端7.0.6版本、Android客户端7.0.7版本之后的一次性订阅/长期订阅才支持多个模板消息,iOS客户端7.0.5版本、Android客户端7.0.6版本之前的一次订阅只支持一个模板消息)消息模板id在[微信公众平台(mp.weixin.qq.com)-功能-订阅消息]中配置。每个tmplId对应的模板标题需要不相同,否则会被过滤。 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8550,17 +8611,17 @@ 系统订阅消息类型列表,一次调用最多可订阅3种类型的消息,目前支持两种类型,"SYS_MSG_TYPE_INTERACTIVE"(好友互动提醒)、"SYS_MSG_TYPE_RANK"(排行榜超越提醒) - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8573,17 +8634,17 @@ 接口调用成功时errMsg值为'requestSubscribeSystemMessage:ok' - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8593,12 +8654,12 @@ 预告 id,通过 getChannelsLiveNoticeInfo 接口获取 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -8608,7 +8669,7 @@ 打开的页面路径,path 中 ? 后面的部分会成为 query - + 接口调用成功的回调函数 @@ -8618,17 +8679,17 @@ 待保存文件路径 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8638,27 +8699,27 @@ 图片文件路径,可以是临时文件路径或永久文件路径 (本地路径) ,不支持网络路径 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -8680,7 +8741,7 @@ - 'pdf417': PDF417 条码; - + 接口调用成功的回调函数 @@ -8740,17 +8801,17 @@ 最大传输单元。设置范围为 (22,512) 区间内,单位 bytes - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8770,17 +8831,17 @@ 自定义的登录态 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8790,17 +8851,17 @@ 剪贴板的内容 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8813,17 +8874,17 @@ - 'portrait': 竖屏; - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8833,27 +8894,27 @@ 是否打开调试 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -8873,7 +8934,7 @@ true 代表用扬声器播放,false 代表听筒播放,默认值为 true。 - + 接口调用成功的回调函数 @@ -8883,17 +8944,17 @@ 是否保持屏幕常亮 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8906,17 +8967,17 @@ - 'dark': 深色; - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8926,17 +8987,17 @@ 屏幕亮度值,范围 0 ~ 1,0 最暗,1 最亮。在安卓端支持传入特殊值 -1,表示屏幕亮度跟随系统变化 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8949,17 +9010,17 @@ - 'black': 浅色; - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8969,17 +9030,17 @@ 要修改的 KV 数据列表 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -8994,17 +9055,17 @@ 数据的 value - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9054,12 +9115,12 @@ 警示文案 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -9069,7 +9130,7 @@ 按钮的文字颜色 - + 接口调用成功的回调函数 @@ -9110,17 +9171,17 @@ 是否为多行输入 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9130,12 +9191,12 @@ 提示的内容 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -9145,7 +9206,7 @@ 是否显示透明蒙层,防止触摸穿透 - + 接口调用成功的回调函数 @@ -9160,7 +9221,7 @@ 取消按钮的文字,最多 4 个字符 - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -9186,7 +9247,7 @@ 是否显示输入框 - + 接口调用失败的回调函数 @@ -9202,7 +9263,7 @@ 是否显示取消按钮 - + 接口调用成功的回调函数 @@ -9233,7 +9294,7 @@ 要分享的图片地址,必须为本地路径或临时路径 - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -9244,7 +9305,7 @@ 从消息小程序入口打开小程序的路径,如果当前页面允许分享给朋友,则默认为当前页面路径,否则默认为小程序首页 - + 接口调用失败的回调函数 @@ -9258,20 +9319,20 @@ 需要基础库: `3.2.0` - 分享样式,可选 v2 + 分享样式,小程序可选 v2 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -9282,7 +9343,7 @@ 本接口为 Beta 版本,暂只在 Android 平台支持。需要显示的转发按钮名称列表,默认['shareAppMessage']。按钮名称合法值包含 "shareAppMessage"、"shareTimeline" 两种 - + 接口调用成功的回调函数 @@ -9297,7 +9358,7 @@ 提示的内容 - + 接口调用结束的回调函数(调用成功、失败都会执行) @@ -9307,7 +9368,7 @@ 提示的延迟时间 - + 接口调用失败的回调函数 @@ -9333,17 +9394,17 @@ 是否显示透明蒙层,防止触摸穿透 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -9358,7 +9419,7 @@ - 'normal': 普通的回调频率,在 200ms/次 左右; - + 接口调用成功的回调函数 @@ -9368,12 +9429,12 @@ Beacon 设备广播的 UUID 列表 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -9383,7 +9444,7 @@ 是否校验蓝牙开关,仅在 iOS 下有效。iOS 11 起,控制面板里关掉蓝牙,还是能继续使用 Beacon 服务。 - + 接口调用成功的回调函数 @@ -9393,12 +9454,12 @@ 是否允许重复上报同一设备。如果允许重复上报,则 [wx.onBlueToothDeviceFound](#) 方法会多次上报同一设备,但是 RSSI 值会有不同。 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -9422,32 +9483,32 @@ 要搜索的蓝牙设备主服务的 UUID 列表(支持 16/32/128 位 UUID)。某些蓝牙设备会广播自己的主 service 的 UUID。如果设置此参数,则只搜索广播包有对应 UUID 的主服务的蓝牙设备。建议通过该参数过滤掉周边不需要处理的其他蓝牙设备。 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -9461,97 +9522,97 @@ - 'normal': 普通的回调频率,在 200ms/次 左右; - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9561,17 +9622,17 @@ 键盘输入框的当前值 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9582,12 +9643,12 @@ 动态消息的 activityId。通过 [updatableMessage.createActivityId](https://developers.weixin.qq.com/minigame/dev/api-backend/open-api/updatable-message/updatableMessage.createActivityId.html) 接口获取 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 @@ -9604,7 +9665,7 @@ 是否是动态消息,详见[动态消息](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/share/updatable-message.html) - + 接口调用成功的回调函数 @@ -9651,47 +9712,47 @@ 静音设置 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9702,17 +9763,17 @@ 震动强度类型,有效值为:heavy、medium、light - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9744,17 +9805,17 @@ 蓝牙设备特征对应的二进制值 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9772,32 +9833,32 @@ 自定义query - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9832,17 +9893,17 @@ 是否正在直播 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9852,17 +9913,17 @@ 最近几场直播的 feedId 列表 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9897,17 +9958,17 @@ 要查询的直播的id - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9917,17 +9978,17 @@ 支持填写最多4个openid,该用户的直播间将在直播专区置顶显示;可不填 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9937,32 +9998,32 @@ 用于打开指定游戏内容页面的开放链接 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 - + 接口调用结束的回调函数(调用成功、失败都会执行) - + 接口调用失败的回调函数 - + 接口调用成功的回调函数 @@ -9982,17 +10043,17 @@ 要打开的业务类型,目前仅支持 'servicecommentpage' - + 调用成功、失败都会执行 - + 评价失败的回调 - + 评价成功的回调 @@ -10028,35 +10089,35 @@ 要发送的消息 - + [RealtimeLogManager.addFilterMsg(string msg)](https://developers.weixin.qq.com/minigame/dev/api/base/debug/RealtimeLogManager.addFilterMsg.html) 需要基础库: `2.14.4` 添加过滤关键字,暂不支持在插件使用 - + [RealtimeLogManager.error()](https://developers.weixin.qq.com/minigame/dev/api/base/debug/RealtimeLogManager.error.html) 需要基础库: `2.14.4` 写 error 日志,暂不支持在插件使用 - + [RealtimeLogManager.info()](https://developers.weixin.qq.com/minigame/dev/api/base/debug/RealtimeLogManager.info.html) 需要基础库: `2.14.4` 写 info 日志,暂不支持在插件使用 - + [RealtimeLogManager.setFilterMsg(string msg)](https://developers.weixin.qq.com/minigame/dev/api/base/debug/RealtimeLogManager.setFilterMsg.html) 需要基础库: `2.14.4` 设置过滤关键字,暂不支持在插件使用 - + [RealtimeLogManager.warn()](https://developers.weixin.qq.com/minigame/dev/api/base/debug/RealtimeLogManager.warn.html) 需要基础库: `2.14.4` @@ -10427,7 +10488,7 @@ 绑定一个系统随机分配的可用端口,或绑定一个指定的端口号 - + [UpdateManager.applyUpdate()](https://developers.weixin.qq.com/minigame/dev/api/base/update/UpdateManager.applyUpdate.html) 强制小程序重启并使用新版本。在小程序新版本下载完成后(即收到 `onUpdateReady` 回调)调用。 @@ -10435,7 +10496,7 @@ [示例代码](https://developers.weixin.qq.com/minigame/dev/api/base/update/UpdateManager.html#示例代码) - + [UpdateManager.onCheckForUpdate(function listener)](https://developers.weixin.qq.com/minigame/dev/api/base/update/UpdateManager.onCheckForUpdate.html) 监听向微信后台请求检查更新结果事件。微信在小程序每次启动(包括热启动)时自动检查更新,不需由开发者主动触发。 @@ -10443,7 +10504,7 @@ [示例代码](https://developers.weixin.qq.com/minigame/dev/api/base/update/UpdateManager.html#示例代码) - + [UpdateManager.onUpdateFailed(function listener)](https://developers.weixin.qq.com/minigame/dev/api/base/update/UpdateManager.onUpdateFailed.html) 监听小程序更新失败事件。小程序有新版本,客户端主动触发下载(无需开发者触发),下载失败(可能是网络原因等)后回调 @@ -10451,7 +10512,7 @@ [示例代码](https://developers.weixin.qq.com/minigame/dev/api/base/update/UpdateManager.html#示例代码) - + [UpdateManager.onUpdateReady(function listener)](https://developers.weixin.qq.com/minigame/dev/api/base/update/UpdateManager.onUpdateReady.html) 监听小程序有版本更新事件。客户端主动触发下载(无需开发者触发),下载成功后回调 @@ -10711,49 +10772,49 @@ 取消监听视频下载(缓冲)事件 ,action 为空表示移除全部事件监听 - + [Object VideoDecoder.getFrameData()](https://developers.weixin.qq.com/minigame/dev/api/media/video-decoder/VideoDecoder.getFrameData.html) 需要基础库: `2.11.1` 获取下一帧的解码数据 - + [Promise VideoDecoder.remove()](https://developers.weixin.qq.com/minigame/dev/api/media/video-decoder/VideoDecoder.remove.html) 需要基础库: `2.11.1` 移除解码器 - + [Promise VideoDecoder.seek(number position)](https://developers.weixin.qq.com/minigame/dev/api/media/video-decoder/VideoDecoder.seek.html) 需要基础库: `2.11.1` 跳到某个时间点解码 - + [Promise VideoDecoder.start(Object object)](https://developers.weixin.qq.com/minigame/dev/api/media/video-decoder/VideoDecoder.start.html) 需要基础库: `2.11.1` 开始解码 - + [Promise VideoDecoder.stop()](https://developers.weixin.qq.com/minigame/dev/api/media/video-decoder/VideoDecoder.stop.html) 需要基础库: `2.11.1` 停止解码 - + [VideoDecoder.off(string eventName, function callback)](https://developers.weixin.qq.com/minigame/dev/api/media/video-decoder/VideoDecoder.off.html) 需要基础库: `2.11.1` 取消监听录制事件。当对应事件触发时,该回调函数不再执行 - + [VideoDecoder.on(string eventName, function callback)](https://developers.weixin.qq.com/minigame/dev/api/media/video-decoder/VideoDecoder.on.html) 需要基础库: `2.11.1` diff --git a/Runtime/WX.cs b/Runtime/WX.cs index 046d53e3..b67d1e2e 100644 --- a/Runtime/WX.cs +++ b/Runtime/WX.cs @@ -489,6 +489,11 @@ namespace WeChatWASM /// [wx.getChannelsLiveInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/channels/wx.getChannelsLiveInfo.html) /// 需要基础库: `2.15.0` /// 获取视频号直播信息 + /// **常见错误码说明** + /// 100008 视频号需要认证 + /// 40097 入参异常 + /// 1416104 视频号获取到的数据为空 + /// 1416100 非法的视频号id /// public static void GetChannelsLiveInfo(GetChannelsLiveInfoOption callback) { @@ -719,6 +724,7 @@ namespace WeChatWASM /// wx.getNetworkType({ /// success (res) { /// const networkType = res.networkType + /// const weakNet = res.weakNet /// } /// }) /// ``` @@ -728,6 +734,18 @@ namespace WeChatWASM WXSDKManagerHandler.Instance.GetNetworkType(callback); } + /// + /// [wx.getPhoneNumber(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/user-info/wx.getPhoneNumber.html) + /// 手机号快速验证,向用户申请,并在用户同意后,快速填写和验证手机 [具体说明](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/getPhoneNumber.html) + /// **** + /// ## 注意事项 + /// - 用户点击后才可进行调用 + /// + public static void GetPhoneNumber(GetPhoneNumberOption callback) + { + WXSDKManagerHandler.Instance.GetPhoneNumber(callback); + } + /// /// [wx.getPrivacySetting(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/privacy/wx.getPrivacySetting.html) /// 需要基础库: `2.32.3` @@ -1143,6 +1161,28 @@ namespace WeChatWASM WXSDKManagerHandler.Instance.MakeBluetoothPair(callback); } + /// + /// [wx.navigateBackMiniProgram(Object object)](https://developers.weixin.qq.com/minigame/dev/api/navigate/wx.navigateBackMiniProgram.html) + /// 需要基础库: `3.5.6` + /// 返回到上一个小程序。只有在当前小程序是被其他小程序打开时可以调用成功。 + /// 注意:**微信客户端 iOS 6.5.9,Android 6.5.10 及以上版本支持** + /// **示例代码** + /// ```js + /// wx.navigateBackMiniProgram({ + /// extraData: { + /// foo: 'bar' + /// }, + /// success(res) { + /// // 返回成功 + /// } + /// }) + /// ``` + /// + public static void NavigateBackMiniProgram(NavigateBackMiniProgramOption callback) + { + WXSDKManagerHandler.Instance.NavigateBackMiniProgram(callback); + } + /// /// [wx.navigateToMiniProgram(Object object)](https://developers.weixin.qq.com/minigame/dev/api/navigate/wx.navigateToMiniProgram.html) /// 需要基础库: `2.2.0` @@ -1422,11 +1462,11 @@ namespace WeChatWASM /// | 类型 | 说明 | 最低版本 | /// |------|------| -------| /// | 小程序码 | | - /// | 微信个人码 | 不支持小游戏 | [2.18.0](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html) | - /// | 企业微信个人码 | 不支持小游戏 | [2.18.0](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html) | - /// | 普通群码 | 指仅包含微信用户的群,不支持小游戏 | [2.18.0](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html) | - /// | 互通群码 | 指既有微信用户也有企业微信用户的群,不支持小游戏 | [2.18.0](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html) | - /// | 公众号二维码 | 不支持小游戏 | [2.18.0](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html) | + /// | 微信个人码 | | [2.18.0](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html) | + /// | 企业微信个人码 | | [2.18.0](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html) | + /// | 普通群码 | 指仅包含微信用户的群 | [2.18.0](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html) | + /// | 互通群码 | 指既有微信用户也有企业微信用户的群 | [2.18.0](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html) | + /// | 公众号二维码 | | [2.18.0](https://developers.weixin.qq.com/miniprogram/dev/framework/compatibility.html) | /// **示例代码** /// ```js /// wx.previewImage({ @@ -1569,8 +1609,7 @@ namespace WeChatWASM /// /// [wx.requestMidasPayment(Object object)](https://developers.weixin.qq.com/minigame/dev/api/midas-payment/wx.requestMidasPayment.html) /// 需要基础库: `2.19.2` - /// 发起购买游戏币支付请求,可参考[虚拟支付2.0游戏币](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/virtual-payment/coins.html) - /// 虚拟支付全流程可参考[技术手册-虚拟支付篇](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/virtual-payment/guide.html) + /// 发起购买游戏币支付请求,可参考[虚拟支付2.0游戏币](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/virtual-payment/coins.html),虚拟支付全流程可参考[技术手册-虚拟支付篇](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/virtual-payment/guide.html) /// **buyQuantity 限制说明** /// 购买游戏币的时候,buyQuantity 不可任意填写。需满足 buyQuantity * 游戏币单价 = 限定的价格等级。如:游戏币单价为 0.1 元,一次购买最少数量是 10。 /// 有效价格等级如下: @@ -1614,7 +1653,7 @@ namespace WeChatWASM /// /// [wx.requestMidasPaymentGameItem(Object object)](https://developers.weixin.qq.com/minigame/dev/api/midas-payment/wx.requestMidasPaymentGameItem.html) /// 需要基础库: `2.19.2` - /// 发起道具直购支付请求,可参考[虚拟支付2.0道具直购](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/virtual-payment/goods.html ),虚拟支付全流程可参考[技术手册-虚拟支付篇](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/virtual-payment/guide.html) + /// 发起道具直购支付请求,可参考[虚拟支付2.0道具直购](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/virtual-payment/goods.html),虚拟支付全流程可参考[技术手册-虚拟支付篇](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/virtual-payment/guide.html) /// **示例代码** /// ```js /// wx.requestMidasPaymentGameItem({ @@ -2651,7 +2690,7 @@ namespace WeChatWASM /// 主动拉起转发,进入选择通讯录界面。 /// **** /// ## 注意事项 - /// - 转发图片说明:仅当自定义分享图片权限被封禁时用 imageUrlId,其他情况都会用 imageUrl。 imageUrl 不填时使用游戏画面截图。 + /// - 转发图片说明:imageUrl,imageUrlId 都存在时,优先使用 imageUrl。 imageUrl,imageUrlId 都不填时使用游戏画面截图。 /// public static void ShareAppMessage(ShareAppMessageOption option) { @@ -3456,7 +3495,7 @@ namespace WeChatWASM /// 监听用户点击右上角菜单的「分享到朋友圈」按钮时触发的事件。本接口为 Beta 版本,暂只在 Android 平台支持。 /// **** /// ## 注意事项 - /// - 转发图片说明:仅当自定义分享图片权限被封禁时用 imageUrlId,其他情况都会用 imageUrl。 imageUrl 不填时使用当前游戏的icon。 + /// - 转发图片说明:imageUrl,imageUrlId 都存在时,优先使用 imageUrl。 imageUrl,imageUrlId 都不填时使用当前游戏的icon。 /// public static void OnShareTimeline(Action> callback) { diff --git a/Runtime/WXRuntimeExtDef.cs b/Runtime/WXRuntimeExtDef.cs index 5137e5aa..abeb85aa 100644 --- a/Runtime/WXRuntimeExtDef.cs +++ b/Runtime/WXRuntimeExtDef.cs @@ -15,7 +15,7 @@ namespace WeChatWASM private static void Init() { - + #if UNITY_2018_1_OR_NEWER WXRuntimeExtEnvDef.SETDEF("UNITY_2018_1_OR_NEWER", true); #else @@ -118,16 +118,16 @@ namespace WeChatWASM */ WXRuntimeExtEnvDef.RegisterAction("Unity.GetObjectInstanceID", (args) => { - #if UNITY_2021_3_OR_NEWER +#if UNITY_2021_3_OR_NEWER if (args is UnityEngine.Object unityObject) { return unityObject.GetInstanceID(); } - #endif +#endif // unityObject.GetInstanceID() would never return 0. - return 0; + return 0; }); } } - + } \ No newline at end of file diff --git a/Runtime/wechat-default/check-version.js.meta b/Runtime/wechat-default/check-version.js.meta index ff69e22e..62d10b50 100644 --- a/Runtime/wechat-default/check-version.js.meta +++ b/Runtime/wechat-default/check-version.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: bc3369325bce4e7f94719abcffc6b7cd +guid: 0c8d93b0ea292348711ec48835b05d00 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/data-package/game.js.meta b/Runtime/wechat-default/data-package/game.js.meta index 4b9d8b22..6e3a464d 100644 --- a/Runtime/wechat-default/data-package/game.js.meta +++ b/Runtime/wechat-default/data-package/game.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 2b898fd5d1d0ebfaa9f43fc70617cb92 +guid: 1ead1764b05003094ec35918bfa5f44b DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/events.js.meta b/Runtime/wechat-default/events.js.meta index 02e9c681..9d9a0419 100644 --- a/Runtime/wechat-default/events.js.meta +++ b/Runtime/wechat-default/events.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f209fd22f12ae9a0ed98728a962cf355 +guid: 38ff96afa9bcd2a0bf0a8117bcbd39ca DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/game.js.meta b/Runtime/wechat-default/game.js.meta index 2b8b13d0..067924a7 100644 --- a/Runtime/wechat-default/game.js.meta +++ b/Runtime/wechat-default/game.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: badec549958656cbbad1003d30fdbdf8 +guid: 1355eb10e427d58ea1900cd9565002b4 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/game.json.meta b/Runtime/wechat-default/game.json.meta index 729b45bf..73e6d843 100644 --- a/Runtime/wechat-default/game.json.meta +++ b/Runtime/wechat-default/game.json.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ed8876b6a2692c8a247a1e0b6baccf6b +guid: b705406d87f678fe7eaaf118cc01c5a1 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/images/background.jpg.meta b/Runtime/wechat-default/images/background.jpg.meta index 2753ddb6..4c8a1a03 100644 --- a/Runtime/wechat-default/images/background.jpg.meta +++ b/Runtime/wechat-default/images/background.jpg.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 570059cfd68e561f19880762a18c3af5 +guid: 89611baa8b7fbfe8884013faa3304bbf DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/images/unity_logo.png.meta b/Runtime/wechat-default/images/unity_logo.png.meta index 298da79a..e4636fec 100644 --- a/Runtime/wechat-default/images/unity_logo.png.meta +++ b/Runtime/wechat-default/images/unity_logo.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: dc8baabe125bb015e1ca664b027b55c7 +guid: cbf02c9e0f903659a047d8fd36a53b78 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data/data/index.js.meta b/Runtime/wechat-default/open-data/data/index.js.meta index f696d961..34ad48b4 100644 --- a/Runtime/wechat-default/open-data/data/index.js.meta +++ b/Runtime/wechat-default/open-data/data/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: bc0fab21f817ed12d1273809db4e7c5c +guid: 3b068ac38ce59de54bbda60b119a3903 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data/data/utils.js.meta b/Runtime/wechat-default/open-data/data/utils.js.meta index 4adba94a..9cfabd60 100644 --- a/Runtime/wechat-default/open-data/data/utils.js.meta +++ b/Runtime/wechat-default/open-data/data/utils.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 6bc12a6887d59b476817d127d75e17fe +guid: 356558a333113e3a99d31ed5058c7d44 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data/index.js.meta b/Runtime/wechat-default/open-data/index.js.meta index 49cf18a9..e4899866 100644 --- a/Runtime/wechat-default/open-data/index.js.meta +++ b/Runtime/wechat-default/open-data/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7e7bca6c0f97498c6d521420e55e6ca1 +guid: 9cbd1fdf012a766b587cd2e832bf874f DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data/loading.js.meta b/Runtime/wechat-default/open-data/loading.js.meta index ab89af90..7bd0486c 100644 --- a/Runtime/wechat-default/open-data/loading.js.meta +++ b/Runtime/wechat-default/open-data/loading.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4723cad8ec76733231d8052efa345832 +guid: 00c51a95c6898380aabec6e7a2233a96 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data/render/image/avatar.png.meta b/Runtime/wechat-default/open-data/render/image/avatar.png.meta index 4c017429..5e2e9e96 100644 --- a/Runtime/wechat-default/open-data/render/image/avatar.png.meta +++ b/Runtime/wechat-default/open-data/render/image/avatar.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: aa5d16ec185b68c23a7bbf933a05bb18 +guid: 3c6a7fc2500e5e251575068a25e4a233 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data/render/image/button1.png.meta b/Runtime/wechat-default/open-data/render/image/button1.png.meta index 902bfa30..317d3cfb 100644 --- a/Runtime/wechat-default/open-data/render/image/button1.png.meta +++ b/Runtime/wechat-default/open-data/render/image/button1.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4ef2b8d892d3e5dc1ea56eb31da53ac1 +guid: 8815c0fcad342b263cb7c5cf94909f05 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data/render/image/button2.png.meta b/Runtime/wechat-default/open-data/render/image/button2.png.meta index 72e4afd6..1c0ab40b 100644 --- a/Runtime/wechat-default/open-data/render/image/button2.png.meta +++ b/Runtime/wechat-default/open-data/render/image/button2.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4a30ac2ec43ec4d2c256434dad0681a1 +guid: c3401bbacec50d76b6423422ec618772 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data/render/image/button3.png.meta b/Runtime/wechat-default/open-data/render/image/button3.png.meta index f9ee39c6..5adb8997 100644 --- a/Runtime/wechat-default/open-data/render/image/button3.png.meta +++ b/Runtime/wechat-default/open-data/render/image/button3.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 17d5912a1d3eb6827e70ab1491ac09d2 +guid: 7c5e2ee4decc0735799388231ce3c91b DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data/render/image/loading.png.meta b/Runtime/wechat-default/open-data/render/image/loading.png.meta index d62c6cbc..38a0ba2c 100644 --- a/Runtime/wechat-default/open-data/render/image/loading.png.meta +++ b/Runtime/wechat-default/open-data/render/image/loading.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 66b55a92e192c57f681c8c236a8257c0 +guid: 88c2897eed785cd19d064490f4e8f6cf DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data/render/image/nameBg.png.meta b/Runtime/wechat-default/open-data/render/image/nameBg.png.meta index 026b186b..a19c8b97 100644 --- a/Runtime/wechat-default/open-data/render/image/nameBg.png.meta +++ b/Runtime/wechat-default/open-data/render/image/nameBg.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 725801743ad90c144bbe8894bdf1def1 +guid: 539f46f8cb81f15df92d8589aeeba0f4 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data/render/image/rankAvatar.png.meta b/Runtime/wechat-default/open-data/render/image/rankAvatar.png.meta index 0d1b17a6..d804483a 100644 --- a/Runtime/wechat-default/open-data/render/image/rankAvatar.png.meta +++ b/Runtime/wechat-default/open-data/render/image/rankAvatar.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c0b6e720fb4775b6b307b37ae9cb1b77 +guid: 5c39ac10931bbf90374ec55341de5876 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data/render/image/rankBg.png.meta b/Runtime/wechat-default/open-data/render/image/rankBg.png.meta index 8e56c4cc..21dfae87 100644 --- a/Runtime/wechat-default/open-data/render/image/rankBg.png.meta +++ b/Runtime/wechat-default/open-data/render/image/rankBg.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4f956b3cd71f7a5f0300edca4f677af1 +guid: 7f2eeb821478ea551350fea0d58ae2db DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data/render/image/shareBg.png.meta b/Runtime/wechat-default/open-data/render/image/shareBg.png.meta index 24652864..a3faf55a 100644 --- a/Runtime/wechat-default/open-data/render/image/shareBg.png.meta +++ b/Runtime/wechat-default/open-data/render/image/shareBg.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9526b8b9100f3f361de0d5d780fdf13a +guid: b365fae27ba533db70b24bec253da63d DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data/render/image/shareBg2.png.meta b/Runtime/wechat-default/open-data/render/image/shareBg2.png.meta index 2a7edb0c..c1b3063f 100644 --- a/Runtime/wechat-default/open-data/render/image/shareBg2.png.meta +++ b/Runtime/wechat-default/open-data/render/image/shareBg2.png.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 3bb44be0cc21ddcc324abbe33b5fe331 +guid: 5572aecb5b1f492089b8dc905cef97a1 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data/render/styles/friendRank.js.meta b/Runtime/wechat-default/open-data/render/styles/friendRank.js.meta index 650fe8fc..e85c019e 100644 --- a/Runtime/wechat-default/open-data/render/styles/friendRank.js.meta +++ b/Runtime/wechat-default/open-data/render/styles/friendRank.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ae5a5ab64eaa959bb6838339470eabdb +guid: 11c2357e9e640c12f41a3141f9392c00 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data/render/styles/tips.js.meta b/Runtime/wechat-default/open-data/render/styles/tips.js.meta index d8d443e9..5f90a96a 100644 --- a/Runtime/wechat-default/open-data/render/styles/tips.js.meta +++ b/Runtime/wechat-default/open-data/render/styles/tips.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: b5631d759bbd484c4447794fed1457e4 +guid: 0120a7c1c16963e5a564853bf27f668d DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data/render/tpls/friendRank.js.meta b/Runtime/wechat-default/open-data/render/tpls/friendRank.js.meta index 5d5958f3..52b469cd 100644 --- a/Runtime/wechat-default/open-data/render/tpls/friendRank.js.meta +++ b/Runtime/wechat-default/open-data/render/tpls/friendRank.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 04bc1deb8e62fa99f8594f345e8a0897 +guid: 496775563372cd85cd8a5b50d89b45f8 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/open-data/render/tpls/tips.js.meta b/Runtime/wechat-default/open-data/render/tpls/tips.js.meta index 91718e3d..f146f955 100644 --- a/Runtime/wechat-default/open-data/render/tpls/tips.js.meta +++ b/Runtime/wechat-default/open-data/render/tpls/tips.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 5e9d7f2025ba992752b1ff86dfa8ce58 +guid: f4ba4f244732e70389cd13d40cf3b6cb DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/plugin-config.js.meta b/Runtime/wechat-default/plugin-config.js.meta index 1665e16d..4bd71a3f 100644 --- a/Runtime/wechat-default/plugin-config.js.meta +++ b/Runtime/wechat-default/plugin-config.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 25a2bee4d56ec238b69a22b486f6264f +guid: cd428863185543ff57ecbd33295f1c29 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/plugins/check-update.js.meta b/Runtime/wechat-default/plugins/check-update.js.meta index 17171d38..83a7f442 100644 --- a/Runtime/wechat-default/plugins/check-update.js.meta +++ b/Runtime/wechat-default/plugins/check-update.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 0cfed6e3e9c1286393df3fd5445cdec3 +guid: 65c7addd4989f77bcc3eed23514441b3 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/plugins/screen-adapter.js.meta b/Runtime/wechat-default/plugins/screen-adapter.js.meta index 6c9d2801..aeda9763 100644 --- a/Runtime/wechat-default/plugins/screen-adapter.js.meta +++ b/Runtime/wechat-default/plugins/screen-adapter.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: db75dec93076a6a40c4abceb60994d61 +guid: 074808359ef072c02e45407997606149 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/project.config.json.meta b/Runtime/wechat-default/project.config.json.meta index a05a1a26..7a3bd074 100644 --- a/Runtime/wechat-default/project.config.json.meta +++ b/Runtime/wechat-default/project.config.json.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 6d6c4df2732b90a3bfa38fef723cf945 +guid: 39ea6053ac87654819ce879cf229b860 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/texture-config.js.meta b/Runtime/wechat-default/texture-config.js.meta index 4b2e8544..c6e18620 100644 --- a/Runtime/wechat-default/texture-config.js.meta +++ b/Runtime/wechat-default/texture-config.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 342aa9e96cb9f0f4baf07fa6f8180be2 +guid: 8788a36aa3903b657758c40d06080e48 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-namespace.js.meta b/Runtime/wechat-default/unity-namespace.js.meta index bae38178..a633de55 100644 --- a/Runtime/wechat-default/unity-namespace.js.meta +++ b/Runtime/wechat-default/unity-namespace.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9961582ef10038bec67da0d4f6b6d579 +guid: e874c36bf7bc7aaef7e9cf798974259a DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/TCPSocket/index.js.meta b/Runtime/wechat-default/unity-sdk/TCPSocket/index.js.meta index e40f3de4..7bfefb88 100644 --- a/Runtime/wechat-default/unity-sdk/TCPSocket/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/TCPSocket/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 98613bf26ea421e1792309e23dde6248 +guid: fadd86c84861737cfeac89c3da4c4fb7 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/UDPSocket/index.js.meta b/Runtime/wechat-default/unity-sdk/UDPSocket/index.js.meta index 0a1ff097..7b414ea0 100644 --- a/Runtime/wechat-default/unity-sdk/UDPSocket/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/UDPSocket/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: c73574e2f64f9b18aad6c9e185277e11 +guid: 3c3cfdc5db892873839dfe594db0f3cd DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/ad.js.meta b/Runtime/wechat-default/unity-sdk/ad.js.meta index c931f555..8965de1e 100644 --- a/Runtime/wechat-default/unity-sdk/ad.js.meta +++ b/Runtime/wechat-default/unity-sdk/ad.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 118040602ee29959486023fe4ed498ed +guid: 48630e0ef477d99d88686aeaffe7ec3a DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/audio/common.js.meta b/Runtime/wechat-default/unity-sdk/audio/common.js.meta index 66eb0cc4..1d2ace60 100644 --- a/Runtime/wechat-default/unity-sdk/audio/common.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/common.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 96a23e188a0739be90ea38ff3fda04fe +guid: 5854e1ce99e1fc6025c23eec78a48a7f DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/audio/const.js.meta b/Runtime/wechat-default/unity-sdk/audio/const.js.meta index 24bde13b..7aecc7c5 100644 --- a/Runtime/wechat-default/unity-sdk/audio/const.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/const.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 3c9d0529a3ae9c2f22f79499bd3911a9 +guid: 1d0c49cb5a0d021c59d15e79fc692488 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/audio/index.js.meta b/Runtime/wechat-default/unity-sdk/audio/index.js.meta index 41159a0a..b9a791fc 100644 --- a/Runtime/wechat-default/unity-sdk/audio/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 2181d224f5eec7f71471bac5e4fd4b35 +guid: 2f7b7fade32454b62fb63ab3dc61be65 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/audio/inner-audio.js.meta b/Runtime/wechat-default/unity-sdk/audio/inner-audio.js.meta index 6811443f..092df543 100644 --- a/Runtime/wechat-default/unity-sdk/audio/inner-audio.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/inner-audio.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 818555d87541e6b2d0f894e6cccb710e +guid: 56a8b4ef76114b9289e2ad197949cab9 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/audio/store.js.meta b/Runtime/wechat-default/unity-sdk/audio/store.js.meta index 0ca8fe18..08f703f5 100644 --- a/Runtime/wechat-default/unity-sdk/audio/store.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/store.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 84c12505394bb62c89745200fa64c90c +guid: c4b3e50eca6e67ca27cca891636e3269 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/audio/unity-audio.js.meta b/Runtime/wechat-default/unity-sdk/audio/unity-audio.js.meta index 67598521..50be9029 100644 --- a/Runtime/wechat-default/unity-sdk/audio/unity-audio.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/unity-audio.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a3ad5abcba137ec5742121956515bab1 +guid: b99e7ce1d02a8821e12260cbe33cd20f DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/audio/utils.js.meta b/Runtime/wechat-default/unity-sdk/audio/utils.js.meta index 1e1742f3..fd3940e1 100644 --- a/Runtime/wechat-default/unity-sdk/audio/utils.js.meta +++ b/Runtime/wechat-default/unity-sdk/audio/utils.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 51ec2bb09696a181540f4406f7ac377f +guid: d95286e46e90467a085b3bca736c7e44 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/authorize.js.meta b/Runtime/wechat-default/unity-sdk/authorize.js.meta index 9e368f67..f29bd304 100644 --- a/Runtime/wechat-default/unity-sdk/authorize.js.meta +++ b/Runtime/wechat-default/unity-sdk/authorize.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 84b9b551322d6b51badc3a2c10eae7e1 +guid: 41be3bc48024c2894ec16aeea82f793b DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/bluetooth/index.js.meta b/Runtime/wechat-default/unity-sdk/bluetooth/index.js.meta index 750fedc4..83def69e 100644 --- a/Runtime/wechat-default/unity-sdk/bluetooth/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/bluetooth/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 6c1886f133b4e6e4e917dfa99b591f81 +guid: 39497742eb5bb60c11593497722da94c DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/camera.js.meta b/Runtime/wechat-default/unity-sdk/camera.js.meta index 27efbb0c..5ab36f1d 100644 --- a/Runtime/wechat-default/unity-sdk/camera.js.meta +++ b/Runtime/wechat-default/unity-sdk/camera.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 24b7fa879530884b9650e985b63ba645 +guid: d78f908b38b0e4d31174127416d9dd1b DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/canvas-context.js.meta b/Runtime/wechat-default/unity-sdk/canvas-context.js.meta index 8d4ea4f2..c5624119 100644 --- a/Runtime/wechat-default/unity-sdk/canvas-context.js.meta +++ b/Runtime/wechat-default/unity-sdk/canvas-context.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 858bab81baeedf0a91177ad739ec2db9 +guid: 8efb571e27b6229cf92ede011b3808d1 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/canvas.js.meta b/Runtime/wechat-default/unity-sdk/canvas.js.meta index 83c6f401..8c529bc8 100644 --- a/Runtime/wechat-default/unity-sdk/canvas.js.meta +++ b/Runtime/wechat-default/unity-sdk/canvas.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 97297009369a7a666dd0ca824cc39f5f +guid: c4310e8889326b655a6ef3eae54ac8ec DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/chat.js.meta b/Runtime/wechat-default/unity-sdk/chat.js.meta index 261b1a6d..fff92ed1 100644 --- a/Runtime/wechat-default/unity-sdk/chat.js.meta +++ b/Runtime/wechat-default/unity-sdk/chat.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 21400a9d979fb6c3b0e8e36a873bbb99 +guid: 0675b96704953598acd3b265a60ad672 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/cloud.js b/Runtime/wechat-default/unity-sdk/cloud.js index babe75e4..48ad3ebb 100644 --- a/Runtime/wechat-default/unity-sdk/cloud.js +++ b/Runtime/wechat-default/unity-sdk/cloud.js @@ -32,7 +32,7 @@ export default { wx.cloud.init(); } else { - CloudList[config.env].init(config); + wx.cloud.init(config); } }, WX_CloudCallFunction(env, conf, callbackId) { diff --git a/Runtime/wechat-default/unity-sdk/cloud.js.meta b/Runtime/wechat-default/unity-sdk/cloud.js.meta index d7989683..3e47fb9e 100644 --- a/Runtime/wechat-default/unity-sdk/cloud.js.meta +++ b/Runtime/wechat-default/unity-sdk/cloud.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e47692c8adb6f7788aaf9232b8ca2141 +guid: 0738534389f7807695502f538d18216c DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/conf.js.meta b/Runtime/wechat-default/unity-sdk/conf.js.meta index 22db8020..77bbc3eb 100644 --- a/Runtime/wechat-default/unity-sdk/conf.js.meta +++ b/Runtime/wechat-default/unity-sdk/conf.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: df2a56812d43a2d016e715157db1f76c +guid: abc4a7bf77268a013c8bd75d96aad326 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/file-info.js.meta b/Runtime/wechat-default/unity-sdk/file-info.js.meta index 716f0921..fd3d5302 100644 --- a/Runtime/wechat-default/unity-sdk/file-info.js.meta +++ b/Runtime/wechat-default/unity-sdk/file-info.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9b5a3a0c8c8c8a76efc33b881c246309 +guid: e30c9c08c436704bc8e6a45bd1b44061 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/fix.js.meta b/Runtime/wechat-default/unity-sdk/fix.js.meta index 79fdb5a3..f1f72be8 100644 --- a/Runtime/wechat-default/unity-sdk/fix.js.meta +++ b/Runtime/wechat-default/unity-sdk/fix.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 0f7ea31c72e2306ef930279c351b9c30 +guid: 20ff93e28136a006603bca1fb902ceec DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/font/fix-cmap.js.meta b/Runtime/wechat-default/unity-sdk/font/fix-cmap.js.meta index 17fc066c..4fd14628 100644 --- a/Runtime/wechat-default/unity-sdk/font/fix-cmap.js.meta +++ b/Runtime/wechat-default/unity-sdk/font/fix-cmap.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e3879bc1f510ef173ea86062516cb465 +guid: 333b55146e8d5cb368fdd9fe254a622c DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/font/index.js.meta b/Runtime/wechat-default/unity-sdk/font/index.js.meta index 2e76fad5..ce424328 100644 --- a/Runtime/wechat-default/unity-sdk/font/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/font/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: fe3c8b3f2617b38ae16a293af33d07b4 +guid: 8298e8ef6eab73f80cc7ddc746e227a6 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/font/read-metrics.js.meta b/Runtime/wechat-default/unity-sdk/font/read-metrics.js.meta index 05612e8b..b92aabe8 100644 --- a/Runtime/wechat-default/unity-sdk/font/read-metrics.js.meta +++ b/Runtime/wechat-default/unity-sdk/font/read-metrics.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: fbdaeb8308fa12af4fea9b0462826722 +guid: 5eeda0d8218b5c6cb6dbb37a70ad08f1 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/font/split-sc.js.meta b/Runtime/wechat-default/unity-sdk/font/split-sc.js.meta index 2caa81e0..a0d6217a 100644 --- a/Runtime/wechat-default/unity-sdk/font/split-sc.js.meta +++ b/Runtime/wechat-default/unity-sdk/font/split-sc.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 73738aa5e7544d0a13eb5db1a442cf1f +guid: ae941bd4bfa6f52f7359e9d6fdde3e8f DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/font/util.js.meta b/Runtime/wechat-default/unity-sdk/font/util.js.meta index a19a6ca1..63ec64e5 100644 --- a/Runtime/wechat-default/unity-sdk/font/util.js.meta +++ b/Runtime/wechat-default/unity-sdk/font/util.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 27931e4280713227217ed2fd6818a909 +guid: ec65c144818d3b3eaf6a50050a4821f8 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/fs.js.meta b/Runtime/wechat-default/unity-sdk/fs.js.meta index 8ef40038..5e71a727 100644 --- a/Runtime/wechat-default/unity-sdk/fs.js.meta +++ b/Runtime/wechat-default/unity-sdk/fs.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 3570f5f04e7c466c3fb5f02432f04d7b +guid: 1f829358f5b5b9955716cb3c9149dd5f DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/game-club.js.meta b/Runtime/wechat-default/unity-sdk/game-club.js.meta index 65974853..b28a4dd2 100644 --- a/Runtime/wechat-default/unity-sdk/game-club.js.meta +++ b/Runtime/wechat-default/unity-sdk/game-club.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e39ed2db27fd43405b53d48cc4073483 +guid: d08c12d368d93d47b4a9c838f9bd4d57 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/game-recorder.js.meta b/Runtime/wechat-default/unity-sdk/game-recorder.js.meta index 13b5df05..a1d4ef55 100644 --- a/Runtime/wechat-default/unity-sdk/game-recorder.js.meta +++ b/Runtime/wechat-default/unity-sdk/game-recorder.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 48bc41a6ab502370aa136e78c13885e3 +guid: 8430aa4903a39c3a30938f2ced9df9be DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/gyroscope/index.js.meta b/Runtime/wechat-default/unity-sdk/gyroscope/index.js.meta index 5fdd314c..6583ebf1 100644 --- a/Runtime/wechat-default/unity-sdk/gyroscope/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/gyroscope/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 6912f30b6dda79c092b43e48829cef31 +guid: 08a937fd4c977d129f4c86d1c0364014 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/index.js.meta b/Runtime/wechat-default/unity-sdk/index.js.meta index 6879f872..ba3a2ea2 100644 --- a/Runtime/wechat-default/unity-sdk/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 22529578cec3aa5c37ae97ced1f61cd1 +guid: 5fcecb97067c7859d9d9ceed359c2fb0 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/logger.js.meta b/Runtime/wechat-default/unity-sdk/logger.js.meta index d54ee033..12c26af8 100644 --- a/Runtime/wechat-default/unity-sdk/logger.js.meta +++ b/Runtime/wechat-default/unity-sdk/logger.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: d61ad816a2706b6916b3dca6ef9ddc08 +guid: 8e6afef7396fa4c1b26c996f777a22af DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/mobileKeyboard/index.js.meta b/Runtime/wechat-default/unity-sdk/mobileKeyboard/index.js.meta index 497b4c4e..da52b9a6 100644 --- a/Runtime/wechat-default/unity-sdk/mobileKeyboard/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/mobileKeyboard/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 56c818e351fddd0043b1664c1391c236 +guid: fb85a14a6cdf0ea945016de0ac3a3349 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/module-helper.js.meta b/Runtime/wechat-default/unity-sdk/module-helper.js.meta index 68ea5bd5..e0d06bf0 100644 --- a/Runtime/wechat-default/unity-sdk/module-helper.js.meta +++ b/Runtime/wechat-default/unity-sdk/module-helper.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4c2ac42fd85ffa23ddf6cdfcb267ceeb +guid: fdbe2c00a5ec8585ca5cf666cf6bc66f DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/open-data.js.meta b/Runtime/wechat-default/unity-sdk/open-data.js.meta index b77d2ed8..f0d31643 100644 --- a/Runtime/wechat-default/unity-sdk/open-data.js.meta +++ b/Runtime/wechat-default/unity-sdk/open-data.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 9af53a183921f1491061cdec8e3a82f5 +guid: d57e04ee18a06956bc2bd4c2ed4271ce DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/recorder.js.meta b/Runtime/wechat-default/unity-sdk/recorder.js.meta index 25880169..5385c2f6 100644 --- a/Runtime/wechat-default/unity-sdk/recorder.js.meta +++ b/Runtime/wechat-default/unity-sdk/recorder.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 3b6efb49f990648b97997cc382244d9c +guid: ae58a8b39492611c4f2cbf82894a05cf DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/resType.js b/Runtime/wechat-default/unity-sdk/resType.js index 9235347b..7ce705b8 100644 --- a/Runtime/wechat-default/unity-sdk/resType.js +++ b/Runtime/wechat-default/unity-sdk/resType.js @@ -571,6 +571,7 @@ export const ResType = { hasSystemProxy: 'bool', networkType: 'string', signalStrength: 'number', + weakNet: 'bool', errMsg: 'string', }, GetPrivacySettingSuccessCallbackResult: { diff --git a/Runtime/wechat-default/unity-sdk/resType.js.meta b/Runtime/wechat-default/unity-sdk/resType.js.meta index c1b266f9..f3498332 100644 --- a/Runtime/wechat-default/unity-sdk/resType.js.meta +++ b/Runtime/wechat-default/unity-sdk/resType.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 3e043b6a2fdbb58d942737637833e376 +guid: 1406550ffe32da111828d1bd512be195 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/resTypeOther.js.meta b/Runtime/wechat-default/unity-sdk/resTypeOther.js.meta index df0a5d83..6bcbd545 100644 --- a/Runtime/wechat-default/unity-sdk/resTypeOther.js.meta +++ b/Runtime/wechat-default/unity-sdk/resTypeOther.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 535b9cbf7a7c6998905202c1354c04e4 +guid: 415e727c004ce6b6606ddf26da41d38e DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/response.js.meta b/Runtime/wechat-default/unity-sdk/response.js.meta index 0e2193f4..910423ab 100644 --- a/Runtime/wechat-default/unity-sdk/response.js.meta +++ b/Runtime/wechat-default/unity-sdk/response.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ab7de73f2038815ff93ffc15413fb778 +guid: 9b911f7dd08140b10eeab032b9dacd42 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/sdk.js b/Runtime/wechat-default/unity-sdk/sdk.js index c0de7e82..e56b055d 100644 --- a/Runtime/wechat-default/unity-sdk/sdk.js +++ b/Runtime/wechat-default/unity-sdk/sdk.js @@ -1,4035 +1,121 @@ import moduleHelper from './module-helper'; -import { uid, formatResponse, formatJsonStr, onEventCallback, offEventCallback, getListObject, stringifyRes } from './utils'; -let OnAccelerometerChangeList; -let OnAudioInterruptionBeginList; -let OnAudioInterruptionEndList; -let OnBLEConnectionStateChangeList; -let OnBLEMTUChangeList; -let OnBLEPeripheralConnectionStateChangedList; -let OnBeaconServiceChangeList; -let OnBeaconUpdateList; -let OnBluetoothAdapterStateChangeList; -let OnBluetoothDeviceFoundList; -let OnCompassChangeList; -let OnDeviceMotionChangeList; -let OnDeviceOrientationChangeList; -let OnErrorList; -let OnHideList; -let OnInteractiveStorageModifiedList; -let OnKeyDownList; -let OnKeyUpList; -let OnKeyboardCompleteList; -let OnKeyboardConfirmList; -let OnKeyboardHeightChangeList; -let OnKeyboardInputList; -let OnMemoryWarningList; -let OnMenuButtonBoundingClientRectWeightChangeList; -let OnMouseDownList; -let OnMouseMoveList; -let OnMouseUpList; -let OnNetworkStatusChangeList; -let OnNetworkWeakChangeList; -let OnScreenRecordingStateChangedList; -let OnShowList; -let OnUnhandledRejectionList; -let OnUserCaptureScreenList; -let OnVoIPChatInterruptedList; -let OnVoIPChatMembersChangedList; -let OnVoIPChatSpeakersChangedList; -let OnVoIPChatStateChangedList; -let OnWheelList; -let OnWindowResizeList; +import { uid, formatResponse, formatJsonStr, stringifyRes } from './utils'; +const onEventLists = {}; let wxOnAddToFavoritesResolveConf; let wxOnCopyUrlResolveConf; let wxOnHandoffResolveConf; let wxOnShareTimelineResolveConf; let wxOnGameLiveStateChangeResolveConf; -const DownloadTaskList = {}; -const FeedbackButtonList = {}; -const LogManagerList = {}; -const RealtimeLogManagerList = {}; -const UpdateManagerList = {}; -const VideoDecoderList = {}; -const wxDownloadTaskHeadersReceivedList = {}; -const wxDownloadTaskProgressUpdateList = {}; -const wxFeedbackButtonTapList = {}; -const wxVideoDecoderList = {}; -const getDownloadTaskObject = getListObject(DownloadTaskList, 'DownloadTask'); -const getFeedbackButtonObject = getListObject(FeedbackButtonList, 'FeedbackButton'); -const getLogManagerObject = getListObject(LogManagerList, 'LogManager'); -const getRealtimeLogManagerObject = getListObject(RealtimeLogManagerList, 'RealtimeLogManager'); -const getUpdateManagerObject = getListObject(UpdateManagerList, 'UpdateManager'); -const getVideoDecoderObject = getListObject(VideoDecoderList, 'VideoDecoder'); +const ClassLists = {}; +const ClassOnEventLists = {}; +function getClassObject(className, id) { + if (!ClassLists[className]) { + ClassLists[className] = {}; + } + const obj = ClassLists[className][id]; + if (!obj) { + console.error(`${className} 不存在:`, id); + } + return obj; +} +; + +// eslint-disable-next-line @typescript-eslint/naming-convention +function WX_OneWayNoFunction(functionName, ...params) { + wx[functionName.replace(/^\w/, a => a.toLowerCase())](...params); +} + + +const onlyReadyResponse = [ + 'getSystemSetting', + 'getAppAuthorizeSetting', +]; +// eslint-disable-next-line @typescript-eslint/naming-convention +function WX_SyncFunction(functionName, ...params) { + return wx[functionName.replace(/^\w/, a => a.toLowerCase())](...params); +} + +// eslint-disable-next-line @typescript-eslint/naming-convention +function WX_ClassOneWayNoFunction(className, functionName, id, ...params) { + const obj = getClassObject(className, id); + if (!obj) { + return; + } + obj[functionName.replace(/^\w/, a => a.toLowerCase())](...params); +} export default { - WX_AddCard(conf, callbackId) { + WX_OneWayFunction(functionName, successType, failType, completeType, conf, callbackId) { + const lowerFunctionName = functionName.replace(/^\w/, a => a.toLowerCase()); const config = formatJsonStr(conf); - wx.addCard({ - ...config, - success(res) { - formatResponse('AddCardSuccessCallbackResult', res); - moduleHelper.send('AddCardCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('AddCardCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('AddCardCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_AuthPrivateMessage(conf, callbackId) { - const config = formatJsonStr(conf); - wx.authPrivateMessage({ - ...config, - success(res) { - formatResponse('AuthPrivateMessageSuccessCallbackResult', res); - moduleHelper.send('AuthPrivateMessageCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('AuthPrivateMessageCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('AuthPrivateMessageCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_Authorize(conf, callbackId) { - const config = formatJsonStr(conf); - wx.authorize({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('AuthorizeCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('AuthorizeCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('AuthorizeCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_CheckIsAddedToMyMiniProgram(conf, callbackId) { - const config = formatJsonStr(conf); - wx.checkIsAddedToMyMiniProgram({ - ...config, - success(res) { - formatResponse('CheckIsAddedToMyMiniProgramSuccessCallbackResult', res); - moduleHelper.send('CheckIsAddedToMyMiniProgramCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('CheckIsAddedToMyMiniProgramCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('CheckIsAddedToMyMiniProgramCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_CheckSession(conf, callbackId) { - const config = formatJsonStr(conf); - wx.checkSession({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('CheckSessionCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('CheckSessionCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('CheckSessionCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_ChooseImage(conf, callbackId) { - const config = formatJsonStr(conf); - wx.chooseImage({ - ...config, - success(res) { - formatResponse('ChooseImageSuccessCallbackResult', res); - moduleHelper.send('ChooseImageCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ChooseImageCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ChooseImageCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_ChooseMedia(conf, callbackId) { - const config = formatJsonStr(conf); - wx.chooseMedia({ - ...config, - success(res) { - formatResponse('ChooseMediaSuccessCallbackResult', res); - moduleHelper.send('ChooseMediaCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ChooseMediaCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ChooseMediaCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_ChooseMessageFile(conf, callbackId) { - const config = formatJsonStr(conf); - wx.chooseMessageFile({ - ...config, - success(res) { - formatResponse('ChooseMessageFileSuccessCallbackResult', res); - moduleHelper.send('ChooseMessageFileCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ChooseMessageFileCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ChooseMessageFileCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_CloseBLEConnection(conf, callbackId) { - const config = formatJsonStr(conf); - wx.closeBLEConnection({ - ...config, - success(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('CloseBLEConnectionCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('CloseBLEConnectionCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('CloseBLEConnectionCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_CloseBluetoothAdapter(conf, callbackId) { - const config = formatJsonStr(conf); - wx.closeBluetoothAdapter({ - ...config, - success(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('CloseBluetoothAdapterCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('CloseBluetoothAdapterCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('CloseBluetoothAdapterCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_CompressImage(conf, callbackId) { - const config = formatJsonStr(conf); - wx.compressImage({ - ...config, - success(res) { - formatResponse('CompressImageSuccessCallbackResult', res); - moduleHelper.send('CompressImageCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('CompressImageCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('CompressImageCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_CreateBLEConnection(conf, callbackId) { - const config = formatJsonStr(conf); - wx.createBLEConnection({ - ...config, - success(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('CreateBLEConnectionCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('CreateBLEConnectionCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('CreateBLEConnectionCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_CreateBLEPeripheralServer(conf, callbackId) { - const config = formatJsonStr(conf); - wx.createBLEPeripheralServer({ - ...config, - success(res) { - formatResponse('CreateBLEPeripheralServerSuccessCallbackResult', res); - moduleHelper.send('CreateBLEPeripheralServerCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('CreateBLEPeripheralServerCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('CreateBLEPeripheralServerCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_ExitMiniProgram(conf, callbackId) { - const config = formatJsonStr(conf); - wx.exitMiniProgram({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ExitMiniProgramCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ExitMiniProgramCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ExitMiniProgramCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_ExitVoIPChat(conf, callbackId) { - const config = formatJsonStr(conf); - wx.exitVoIPChat({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ExitVoIPChatCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ExitVoIPChatCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ExitVoIPChatCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_FaceDetect(conf, callbackId) { - const config = formatJsonStr(conf); - wx.faceDetect({ - ...config, - success(res) { - formatResponse('FaceDetectSuccessCallbackResult', res); - moduleHelper.send('FaceDetectCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('FaceDetectCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('FaceDetectCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetAvailableAudioSources(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getAvailableAudioSources({ - ...config, - success(res) { - formatResponse('GetAvailableAudioSourcesSuccessCallbackResult', res); - moduleHelper.send('GetAvailableAudioSourcesCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetAvailableAudioSourcesCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetAvailableAudioSourcesCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetBLEDeviceCharacteristics(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getBLEDeviceCharacteristics({ - ...config, - success(res) { - formatResponse('GetBLEDeviceCharacteristicsSuccessCallbackResult', res); - moduleHelper.send('GetBLEDeviceCharacteristicsCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('GetBLEDeviceCharacteristicsCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('GetBLEDeviceCharacteristicsCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetBLEDeviceRSSI(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getBLEDeviceRSSI({ - ...config, - success(res) { - formatResponse('GetBLEDeviceRSSISuccessCallbackResult', res); - moduleHelper.send('GetBLEDeviceRSSICallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetBLEDeviceRSSICallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetBLEDeviceRSSICallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetBLEDeviceServices(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getBLEDeviceServices({ - ...config, - success(res) { - formatResponse('GetBLEDeviceServicesSuccessCallbackResult', res); - moduleHelper.send('GetBLEDeviceServicesCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('GetBLEDeviceServicesCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('GetBLEDeviceServicesCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetBLEMTU(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getBLEMTU({ - ...config, - success(res) { - formatResponse('GetBLEMTUSuccessCallbackResult', res); - moduleHelper.send('GetBLEMTUCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('GetBLEMTUCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('GetBLEMTUCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetBackgroundFetchData(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getBackgroundFetchData({ - ...config, - success(res) { - formatResponse('GetBackgroundFetchDataSuccessCallbackResult', res); - moduleHelper.send('GetBackgroundFetchDataCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetBackgroundFetchDataCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetBackgroundFetchDataCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetBackgroundFetchToken(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getBackgroundFetchToken({ - ...config, - success(res) { - formatResponse('GetBackgroundFetchTokenSuccessCallbackResult', res); - moduleHelper.send('GetBackgroundFetchTokenCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetBackgroundFetchTokenCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetBackgroundFetchTokenCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetBatteryInfo(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getBatteryInfo({ - ...config, - success(res) { - formatResponse('GetBatteryInfoSuccessCallbackResult', res); - moduleHelper.send('GetBatteryInfoCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetBatteryInfoCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetBatteryInfoCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetBeacons(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getBeacons({ - ...config, - success(res) { - formatResponse('GetBeaconsSuccessCallbackResult', res); - moduleHelper.send('GetBeaconsCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('BeaconError', res); - moduleHelper.send('GetBeaconsCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('BeaconError', res); - moduleHelper.send('GetBeaconsCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetBluetoothAdapterState(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getBluetoothAdapterState({ - ...config, - success(res) { - formatResponse('GetBluetoothAdapterStateSuccessCallbackResult', res); - moduleHelper.send('GetBluetoothAdapterStateCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('GetBluetoothAdapterStateCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('GetBluetoothAdapterStateCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetBluetoothDevices(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getBluetoothDevices({ - ...config, - success(res) { - formatResponse('GetBluetoothDevicesSuccessCallbackResult', res); - moduleHelper.send('GetBluetoothDevicesCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('GetBluetoothDevicesCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('GetBluetoothDevicesCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetChannelsLiveInfo(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getChannelsLiveInfo({ - ...config, - success(res) { - formatResponse('GetChannelsLiveInfoSuccessCallbackResult', res); - moduleHelper.send('GetChannelsLiveInfoCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetChannelsLiveInfoCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetChannelsLiveInfoCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetChannelsLiveNoticeInfo(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getChannelsLiveNoticeInfo({ - ...config, - success(res) { - formatResponse('GetChannelsLiveNoticeInfoSuccessCallbackResult', res); - moduleHelper.send('GetChannelsLiveNoticeInfoCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetChannelsLiveNoticeInfoCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetChannelsLiveNoticeInfoCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetClipboardData(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getClipboardData({ - ...config, - success(res) { - formatResponse('GetClipboardDataSuccessCallbackOption', res); - moduleHelper.send('GetClipboardDataCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetClipboardDataCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetClipboardDataCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetConnectedBluetoothDevices(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getConnectedBluetoothDevices({ - ...config, - success(res) { - formatResponse('GetConnectedBluetoothDevicesSuccessCallbackResult', res); - moduleHelper.send('GetConnectedBluetoothDevicesCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('GetConnectedBluetoothDevicesCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('GetConnectedBluetoothDevicesCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetDeviceBenchmarkInfo(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getDeviceBenchmarkInfo({ - ...config, - success(res) { - formatResponse('GetDeviceBenchmarkInfoSuccessCallbackResult', res); - moduleHelper.send('GetDeviceBenchmarkInfoCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetDeviceBenchmarkInfoCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetDeviceBenchmarkInfoCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetExtConfig(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getExtConfig({ - ...config, - success(res) { - formatResponse('GetExtConfigSuccessCallbackResult', res); - moduleHelper.send('GetExtConfigCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetExtConfigCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetExtConfigCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetFuzzyLocation(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getFuzzyLocation({ - ...config, - success(res) { - formatResponse('GetFuzzyLocationSuccessCallbackResult', res); - moduleHelper.send('GetFuzzyLocationCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetFuzzyLocationCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetFuzzyLocationCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetGameClubData(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getGameClubData({ - ...config, - success(res) { - formatResponse('GetGameClubDataSuccessCallbackResult', res); - moduleHelper.send('GetGameClubDataCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetGameClubDataCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetGameClubDataCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetGroupEnterInfo(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getGroupEnterInfo({ - ...config, - success(res) { - formatResponse('GetGroupEnterInfoSuccessCallbackResult', res); - moduleHelper.send('GetGroupEnterInfoCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GetGroupEnterInfoError', res); - moduleHelper.send('GetGroupEnterInfoCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GetGroupEnterInfoError', res); - moduleHelper.send('GetGroupEnterInfoCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetInferenceEnvInfo(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getInferenceEnvInfo({ - ...config, - success(res) { - formatResponse('GetInferenceEnvInfoSuccessCallbackResult', res); - moduleHelper.send('GetInferenceEnvInfoCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetInferenceEnvInfoCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetInferenceEnvInfoCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetLocalIPAddress(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getLocalIPAddress({ - ...config, - success(res) { - formatResponse('GetLocalIPAddressSuccessCallbackResult', res); - moduleHelper.send('GetLocalIPAddressCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetLocalIPAddressCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetLocalIPAddressCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetNetworkType(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getNetworkType({ - ...config, - success(res) { - formatResponse('GetNetworkTypeSuccessCallbackResult', res); - moduleHelper.send('GetNetworkTypeCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetNetworkTypeCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetNetworkTypeCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetPrivacySetting(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getPrivacySetting({ - ...config, - success(res) { - formatResponse('GetPrivacySettingSuccessCallbackResult', res); - moduleHelper.send('GetPrivacySettingCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetPrivacySettingCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetPrivacySettingCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetScreenBrightness(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getScreenBrightness({ - ...config, - success(res) { - formatResponse('GetScreenBrightnessSuccessCallbackOption', res); - moduleHelper.send('GetScreenBrightnessCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetScreenBrightnessCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetScreenBrightnessCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetScreenRecordingState(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getScreenRecordingState({ - ...config, - success(res) { - formatResponse('GetScreenRecordingStateSuccessCallbackResult', res); - moduleHelper.send('GetScreenRecordingStateCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetScreenRecordingStateCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetScreenRecordingStateCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetSetting(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getSetting({ - ...config, - success(res) { - formatResponse('GetSettingSuccessCallbackResult', res); - moduleHelper.send('GetSettingCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetSettingCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetSettingCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetShareInfo(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getShareInfo({ - ...config, - success(res) { - formatResponse('GetGroupEnterInfoSuccessCallbackResult', res); - moduleHelper.send('GetShareInfoCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetShareInfoCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetShareInfoCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetStorageInfo(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getStorageInfo({ - ...config, - success(res) { - formatResponse('GetStorageInfoSuccessCallbackOption', res); - moduleHelper.send('GetStorageInfoCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetStorageInfoCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetStorageInfoCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetSystemInfo(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getSystemInfo({ - ...config, - success(res) { - formatResponse('SystemInfo', res); - moduleHelper.send('GetSystemInfoCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetSystemInfoCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetSystemInfoCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetSystemInfoAsync(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getSystemInfoAsync({ - ...config, - success(res) { - formatResponse('SystemInfo', res); - moduleHelper.send('GetSystemInfoAsyncCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetSystemInfoAsyncCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetSystemInfoAsyncCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetUserInfo(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getUserInfo({ - ...config, - success(res) { - formatResponse('GetUserInfoSuccessCallbackResult', res); - moduleHelper.send('GetUserInfoCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetUserInfoCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetUserInfoCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetUserInteractiveStorage(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getUserInteractiveStorage({ - ...config, - success(res) { - formatResponse('GetUserInteractiveStorageSuccessCallbackResult', res); - moduleHelper.send('GetUserInteractiveStorageCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GetUserInteractiveStorageFailCallbackResult', res); - moduleHelper.send('GetUserInteractiveStorageCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetUserInteractiveStorageCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetWeRunData(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getWeRunData({ - ...config, - success(res) { - formatResponse('GetWeRunDataSuccessCallbackResult', res); - moduleHelper.send('GetWeRunDataCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetWeRunDataCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetWeRunDataCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_HideKeyboard(conf, callbackId) { - const config = formatJsonStr(conf); - wx.hideKeyboard({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('HideKeyboardCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('HideKeyboardCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('HideKeyboardCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_HideLoading(conf, callbackId) { - const config = formatJsonStr(conf); - wx.hideLoading({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('HideLoadingCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('HideLoadingCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('HideLoadingCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_HideShareMenu(conf, callbackId) { - const config = formatJsonStr(conf); - wx.hideShareMenu({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('HideShareMenuCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('HideShareMenuCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('HideShareMenuCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_HideToast(conf, callbackId) { - const config = formatJsonStr(conf); - wx.hideToast({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('HideToastCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('HideToastCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('HideToastCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_InitFaceDetect(conf, callbackId) { - const config = formatJsonStr(conf); - wx.initFaceDetect({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('InitFaceDetectCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('InitFaceDetectCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('InitFaceDetectCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_IsBluetoothDevicePaired(conf, callbackId) { - const config = formatJsonStr(conf); - wx.isBluetoothDevicePaired({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('IsBluetoothDevicePairedCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('IsBluetoothDevicePairedCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('IsBluetoothDevicePairedCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_JoinVoIPChat(conf, callbackId) { - const config = formatJsonStr(conf); - wx.joinVoIPChat({ - ...config, - success(res) { - formatResponse('JoinVoIPChatSuccessCallbackResult', res); - moduleHelper.send('JoinVoIPChatCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('JoinVoIPChatError', res); - moduleHelper.send('JoinVoIPChatCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('JoinVoIPChatError', res); - moduleHelper.send('JoinVoIPChatCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_Login(conf, callbackId) { - const config = formatJsonStr(conf); - if (!config.timeout) { - delete config.timeout; + + if (lowerFunctionName === 'login') { + if (!config.timeout) { + delete config.timeout; + } } - wx.login({ - ...config, - success(res) { - formatResponse('LoginSuccessCallbackResult', res); - moduleHelper.send('LoginCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('RequestFailCallbackErr', res); - moduleHelper.send('LoginCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('LoginCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_MakeBluetoothPair(conf, callbackId) { - const config = formatJsonStr(conf); - wx.makeBluetoothPair({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('MakeBluetoothPairCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('MakeBluetoothPairCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('MakeBluetoothPairCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_NavigateToMiniProgram(conf, callbackId) { - const config = formatJsonStr(conf); - wx.navigateToMiniProgram({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('NavigateToMiniProgramCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('NavigateToMiniProgramCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('NavigateToMiniProgramCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_NotifyBLECharacteristicValueChange(conf, callbackId) { - const config = formatJsonStr(conf); - wx.notifyBLECharacteristicValueChange({ - ...config, - success(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('NotifyBLECharacteristicValueChangeCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('NotifyBLECharacteristicValueChangeCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('NotifyBLECharacteristicValueChangeCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_OpenAppAuthorizeSetting(conf, callbackId) { - const config = formatJsonStr(conf); - wx.openAppAuthorizeSetting({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenAppAuthorizeSettingCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenAppAuthorizeSettingCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenAppAuthorizeSettingCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_OpenBluetoothAdapter(conf, callbackId) { - const config = formatJsonStr(conf); - wx.openBluetoothAdapter({ - ...config, - success(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('OpenBluetoothAdapterCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('OpenBluetoothAdapterCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('OpenBluetoothAdapterCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_OpenCard(conf, callbackId) { - const config = formatJsonStr(conf); - wx.openCard({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenCardCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenCardCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenCardCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_OpenChannelsActivity(conf, callbackId) { - const config = formatJsonStr(conf); - wx.openChannelsActivity({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenChannelsActivityCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenChannelsActivityCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenChannelsActivityCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_OpenChannelsEvent(conf, callbackId) { - const config = formatJsonStr(conf); - wx.openChannelsEvent({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenChannelsEventCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenChannelsEventCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenChannelsEventCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_OpenChannelsLive(conf, callbackId) { - const config = formatJsonStr(conf); - wx.openChannelsLive({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenChannelsLiveCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenChannelsLiveCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenChannelsLiveCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_OpenChannelsUserProfile(conf, callbackId) { - const config = formatJsonStr(conf); - wx.openChannelsUserProfile({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenChannelsUserProfileCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenChannelsUserProfileCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenChannelsUserProfileCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_OpenCustomerServiceChat(conf, callbackId) { - const config = formatJsonStr(conf); - wx.openCustomerServiceChat({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenCustomerServiceChatCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenCustomerServiceChatCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenCustomerServiceChatCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_OpenCustomerServiceConversation(conf, callbackId) { - const config = formatJsonStr(conf); - wx.openCustomerServiceConversation({ - ...config, - success(res) { - formatResponse('OpenCustomerServiceConversationSuccessCallbackResult', res); - moduleHelper.send('OpenCustomerServiceConversationCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenCustomerServiceConversationCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenCustomerServiceConversationCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_OpenPrivacyContract(conf, callbackId) { - const config = formatJsonStr(conf); - wx.openPrivacyContract({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenPrivacyContractCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenPrivacyContractCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenPrivacyContractCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_OpenSetting(conf, callbackId) { - const config = formatJsonStr(conf); - wx.openSetting({ - ...config, - success(res) { - formatResponse('OpenSettingSuccessCallbackResult', res); - moduleHelper.send('OpenSettingCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenSettingCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenSettingCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_OpenSystemBluetoothSetting(conf, callbackId) { - const config = formatJsonStr(conf); - wx.openSystemBluetoothSetting({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenSystemBluetoothSettingCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenSystemBluetoothSettingCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenSystemBluetoothSettingCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_PreviewImage(conf, callbackId) { - const config = formatJsonStr(conf); - wx.previewImage({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('PreviewImageCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('PreviewImageCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('PreviewImageCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_PreviewMedia(conf, callbackId) { - const config = formatJsonStr(conf); - wx.previewMedia({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('PreviewMediaCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('PreviewMediaCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('PreviewMediaCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_ReadBLECharacteristicValue(conf, callbackId) { - const config = formatJsonStr(conf); - wx.readBLECharacteristicValue({ - ...config, - success(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('ReadBLECharacteristicValueCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('ReadBLECharacteristicValueCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('ReadBLECharacteristicValueCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_RemoveStorage(conf, callbackId) { - const config = formatJsonStr(conf); - wx.removeStorage({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('RemoveStorageCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('RemoveStorageCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('RemoveStorageCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_RemoveUserCloudStorage(conf, callbackId) { - const config = formatJsonStr(conf); - wx.removeUserCloudStorage({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('RemoveUserCloudStorageCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('RemoveUserCloudStorageCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('RemoveUserCloudStorageCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_ReportScene(conf, callbackId) { - const config = formatJsonStr(conf); - if (GameGlobal.manager && GameGlobal.manager.setGameStage) { - GameGlobal.manager.setGameStage(config.sceneId); + else if (lowerFunctionName === 'reportScene') { + if (GameGlobal.manager && GameGlobal.manager.setGameStage) { + GameGlobal.manager.setGameStage(config.sceneId); + } } - wx.reportScene({ + wx[lowerFunctionName]({ ...config, success(res) { - formatResponse('ReportSceneSuccessCallbackResult', res); - moduleHelper.send('ReportSceneCallback', JSON.stringify({ + formatResponse(successType, res); + moduleHelper.send(`${functionName}Callback`, JSON.stringify({ callbackId, type: 'success', res: JSON.stringify(res), })); }, fail(res) { - formatResponse('ReportSceneFailCallbackErr', res); - moduleHelper.send('ReportSceneCallback', JSON.stringify({ + formatResponse(failType, res); + moduleHelper.send(`${functionName}Callback`, JSON.stringify({ callbackId, type: 'fail', res: JSON.stringify(res), })); }, complete(res) { - formatResponse('ReportSceneError', res); - moduleHelper.send('ReportSceneCallback', JSON.stringify({ + formatResponse(completeType, res); + moduleHelper.send(`${functionName}Callback`, JSON.stringify({ callbackId, type: 'complete', res: JSON.stringify(res), })); }, }); }, - WX_RequestMidasFriendPayment(conf, callbackId) { - const config = formatJsonStr(conf); - wx.requestMidasFriendPayment({ - ...config, - success(res) { - formatResponse('RequestMidasFriendPaymentSuccessCallbackResult', res); - moduleHelper.send('RequestMidasFriendPaymentCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('MidasFriendPaymentError', res); - moduleHelper.send('RequestMidasFriendPaymentCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('MidasFriendPaymentError', res); - moduleHelper.send('RequestMidasFriendPaymentCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); + WX_OneWayNoFunction_v(functionName) { + WX_OneWayNoFunction(functionName); }, - WX_RequestMidasPayment(conf, callbackId) { - const config = formatJsonStr(conf); - wx.requestMidasPayment({ - ...config, - success(res) { - formatResponse('RequestMidasPaymentSuccessCallbackResult', res); - moduleHelper.send('RequestMidasPaymentCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('RequestMidasPaymentFailCallbackErr', res); - moduleHelper.send('RequestMidasPaymentCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('MidasPaymentError', res); - moduleHelper.send('RequestMidasPaymentCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); + WX_OneWayNoFunction_vs(functionName, param1) { + WX_OneWayNoFunction(functionName, param1); }, - WX_RequestMidasPaymentGameItem(conf, callbackId) { - const config = formatJsonStr(conf); - wx.requestMidasPaymentGameItem({ - ...config, - success(res) { - formatResponse('MidasPaymentError', res); - moduleHelper.send('RequestMidasPaymentGameItemCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('MidasPaymentError', res); - moduleHelper.send('RequestMidasPaymentGameItemCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('MidasPaymentError', res); - moduleHelper.send('RequestMidasPaymentGameItemCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); + WX_OneWayNoFunction_vt(functionName, param1) { + const formatParam1 = formatJsonStr(param1); + WX_OneWayNoFunction(functionName, formatParam1); }, - WX_RequestSubscribeMessage(conf, callbackId) { - const config = formatJsonStr(conf); - wx.requestSubscribeMessage({ - ...config, - success(res) { - formatResponse('RequestSubscribeMessageSuccessCallbackResult', res); - moduleHelper.send('RequestSubscribeMessageCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('RequestSubscribeMessageFailCallbackResult', res); - moduleHelper.send('RequestSubscribeMessageCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('RequestSubscribeMessageCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); + WX_OneWayNoFunction_vst(functionName, param1, param2) { + const formatParam2 = formatJsonStr(param2); + WX_OneWayNoFunction(functionName, param1, formatParam2); }, - WX_RequestSubscribeSystemMessage(conf, callbackId) { - const config = formatJsonStr(conf); - wx.requestSubscribeSystemMessage({ - ...config, - success(res) { - formatResponse('RequestSubscribeSystemMessageSuccessCallbackResult', res); - moduleHelper.send('RequestSubscribeSystemMessageCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('RequestSubscribeMessageFailCallbackResult', res); - moduleHelper.send('RequestSubscribeSystemMessageCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('RequestSubscribeSystemMessageCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); + WX_OneWayNoFunction_vsn(functionName, param1, param2) { + WX_OneWayNoFunction(functionName, param1, param2); }, - WX_RequirePrivacyAuthorize(conf, callbackId) { - const config = formatJsonStr(conf); - wx.requirePrivacyAuthorize({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('RequirePrivacyAuthorizeCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('RequirePrivacyAuthorizeCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('RequirePrivacyAuthorizeCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); + WX_OneWayNoFunction_vnns(functionName, param1, param2, param3) { + WX_OneWayNoFunction(functionName, param1, param2, param3); }, - WX_RestartMiniProgram(conf, callbackId) { - const config = formatJsonStr(conf); - wx.restartMiniProgram({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('RestartMiniProgramCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('RestartMiniProgramCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('RestartMiniProgramCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_SaveFileToDisk(conf, callbackId) { - const config = formatJsonStr(conf); - wx.saveFileToDisk({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SaveFileToDiskCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SaveFileToDiskCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SaveFileToDiskCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_SaveImageToPhotosAlbum(conf, callbackId) { - const config = formatJsonStr(conf); - wx.saveImageToPhotosAlbum({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SaveImageToPhotosAlbumCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SaveImageToPhotosAlbumCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SaveImageToPhotosAlbumCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_ScanCode(conf, callbackId) { - const config = formatJsonStr(conf); - wx.scanCode({ - ...config, - success(res) { - formatResponse('ScanCodeSuccessCallbackResult', res); - moduleHelper.send('ScanCodeCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ScanCodeCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ScanCodeCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_SetBLEMTU(conf, callbackId) { - const config = formatJsonStr(conf); - wx.setBLEMTU({ - ...config, - success(res) { - formatResponse('SetBLEMTUSuccessCallbackResult', res); - moduleHelper.send('SetBLEMTUCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('SetBLEMTUFailCallbackResult', res); - moduleHelper.send('SetBLEMTUCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetBLEMTUCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_SetBackgroundFetchToken(conf, callbackId) { - const config = formatJsonStr(conf); - wx.setBackgroundFetchToken({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetBackgroundFetchTokenCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetBackgroundFetchTokenCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetBackgroundFetchTokenCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_SetClipboardData(conf, callbackId) { - const config = formatJsonStr(conf); - wx.setClipboardData({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetClipboardDataCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetClipboardDataCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetClipboardDataCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_SetDeviceOrientation(conf, callbackId) { - const config = formatJsonStr(conf); - wx.setDeviceOrientation({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetDeviceOrientationCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetDeviceOrientationCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetDeviceOrientationCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_SetEnableDebug(conf, callbackId) { - const config = formatJsonStr(conf); - wx.setEnableDebug({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetEnableDebugCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetEnableDebugCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetEnableDebugCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_SetInnerAudioOption(conf, callbackId) { - const config = formatJsonStr(conf); - wx.setInnerAudioOption({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetInnerAudioOptionCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetInnerAudioOptionCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetInnerAudioOptionCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_SetKeepScreenOn(conf, callbackId) { - const config = formatJsonStr(conf); - wx.setKeepScreenOn({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetKeepScreenOnCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetKeepScreenOnCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetKeepScreenOnCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_SetMenuStyle(conf, callbackId) { - const config = formatJsonStr(conf); - wx.setMenuStyle({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetMenuStyleCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetMenuStyleCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetMenuStyleCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_SetScreenBrightness(conf, callbackId) { - const config = formatJsonStr(conf); - wx.setScreenBrightness({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetScreenBrightnessCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetScreenBrightnessCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetScreenBrightnessCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_SetStatusBarStyle(conf, callbackId) { - const config = formatJsonStr(conf); - wx.setStatusBarStyle({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetStatusBarStyleCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetStatusBarStyleCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetStatusBarStyleCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_SetUserCloudStorage(conf, callbackId) { - const config = formatJsonStr(conf); - wx.setUserCloudStorage({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetUserCloudStorageCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetUserCloudStorageCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetUserCloudStorageCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_SetVisualEffectOnCapture(conf, callbackId) { - const config = formatJsonStr(conf); - wx.setVisualEffectOnCapture({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetVisualEffectOnCaptureCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetVisualEffectOnCaptureCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('SetVisualEffectOnCaptureCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_ShowActionSheet(conf, callbackId) { - const config = formatJsonStr(conf); - wx.showActionSheet({ - ...config, - success(res) { - formatResponse('ShowActionSheetSuccessCallbackResult', res); - moduleHelper.send('ShowActionSheetCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ShowActionSheetCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ShowActionSheetCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_ShowKeyboard(conf, callbackId) { - const config = formatJsonStr(conf); - wx.showKeyboard({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ShowKeyboardCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ShowKeyboardCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ShowKeyboardCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_ShowLoading(conf, callbackId) { - const config = formatJsonStr(conf); - wx.showLoading({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ShowLoadingCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ShowLoadingCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ShowLoadingCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_ShowModal(conf, callbackId) { - const config = formatJsonStr(conf); - wx.showModal({ - ...config, - success(res) { - formatResponse('ShowModalSuccessCallbackResult', res); - moduleHelper.send('ShowModalCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ShowModalCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ShowModalCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_ShowShareImageMenu(conf, callbackId) { - const config = formatJsonStr(conf); - wx.showShareImageMenu({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ShowShareImageMenuCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ShowShareImageMenuCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ShowShareImageMenuCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_ShowShareMenu(conf, callbackId) { - const config = formatJsonStr(conf); - wx.showShareMenu({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ShowShareMenuCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ShowShareMenuCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ShowShareMenuCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_ShowToast(conf, callbackId) { - const config = formatJsonStr(conf); - wx.showToast({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ShowToastCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ShowToastCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('ShowToastCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_StartAccelerometer(conf, callbackId) { - const config = formatJsonStr(conf); - wx.startAccelerometer({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('StartAccelerometerCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('StartAccelerometerCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('StartAccelerometerCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_StartBeaconDiscovery(conf, callbackId) { - const config = formatJsonStr(conf); - wx.startBeaconDiscovery({ - ...config, - success(res) { - formatResponse('BeaconError', res); - moduleHelper.send('StartBeaconDiscoveryCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('BeaconError', res); - moduleHelper.send('StartBeaconDiscoveryCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('BeaconError', res); - moduleHelper.send('StartBeaconDiscoveryCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_StartBluetoothDevicesDiscovery(conf, callbackId) { - const config = formatJsonStr(conf); - wx.startBluetoothDevicesDiscovery({ - ...config, - success(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('StartBluetoothDevicesDiscoveryCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('StartBluetoothDevicesDiscoveryCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('StartBluetoothDevicesDiscoveryCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_StartCompass(conf, callbackId) { - const config = formatJsonStr(conf); - wx.startCompass({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('StartCompassCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('StartCompassCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('StartCompassCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_StartDeviceMotionListening(conf, callbackId) { - const config = formatJsonStr(conf); - wx.startDeviceMotionListening({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('StartDeviceMotionListeningCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('StartDeviceMotionListeningCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('StartDeviceMotionListeningCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_StopAccelerometer(conf, callbackId) { - const config = formatJsonStr(conf); - wx.stopAccelerometer({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('StopAccelerometerCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('StopAccelerometerCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('StopAccelerometerCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_StopBeaconDiscovery(conf, callbackId) { - const config = formatJsonStr(conf); - wx.stopBeaconDiscovery({ - ...config, - success(res) { - formatResponse('BeaconError', res); - moduleHelper.send('StopBeaconDiscoveryCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('BeaconError', res); - moduleHelper.send('StopBeaconDiscoveryCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('BeaconError', res); - moduleHelper.send('StopBeaconDiscoveryCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_StopBluetoothDevicesDiscovery(conf, callbackId) { - const config = formatJsonStr(conf); - wx.stopBluetoothDevicesDiscovery({ - ...config, - success(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('StopBluetoothDevicesDiscoveryCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('StopBluetoothDevicesDiscoveryCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('StopBluetoothDevicesDiscoveryCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_StopCompass(conf, callbackId) { - const config = formatJsonStr(conf); - wx.stopCompass({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('StopCompassCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('StopCompassCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('StopCompassCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_StopDeviceMotionListening(conf, callbackId) { - const config = formatJsonStr(conf); - wx.stopDeviceMotionListening({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('StopDeviceMotionListeningCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('StopDeviceMotionListeningCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('StopDeviceMotionListeningCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_StopFaceDetect(conf, callbackId) { - const config = formatJsonStr(conf); - wx.stopFaceDetect({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('StopFaceDetectCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('StopFaceDetectCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('StopFaceDetectCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_UpdateKeyboard(conf, callbackId) { - const config = formatJsonStr(conf); - wx.updateKeyboard({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('UpdateKeyboardCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('UpdateKeyboardCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('UpdateKeyboardCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_UpdateShareMenu(conf, callbackId) { - const config = formatJsonStr(conf); - wx.updateShareMenu({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('UpdateShareMenuCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('UpdateShareMenuCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('UpdateShareMenuCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_UpdateVoIPChatMuteConfig(conf, callbackId) { - const config = formatJsonStr(conf); - wx.updateVoIPChatMuteConfig({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('UpdateVoIPChatMuteConfigCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('UpdateVoIPChatMuteConfigCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('UpdateVoIPChatMuteConfigCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_UpdateWeChatApp(conf, callbackId) { - const config = formatJsonStr(conf); - wx.updateWeChatApp({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('UpdateWeChatAppCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('UpdateWeChatAppCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('UpdateWeChatAppCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_VibrateLong(conf, callbackId) { - const config = formatJsonStr(conf); - wx.vibrateLong({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('VibrateLongCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('VibrateLongCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('VibrateLongCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_VibrateShort(conf, callbackId) { - const config = formatJsonStr(conf); - wx.vibrateShort({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('VibrateShortCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('VibrateShortFailCallbackResult', res); - moduleHelper.send('VibrateShortCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('VibrateShortCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_WriteBLECharacteristicValue(conf, callbackId) { - const config = formatJsonStr(conf); - wx.writeBLECharacteristicValue({ - ...config, - success(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('WriteBLECharacteristicValueCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('WriteBLECharacteristicValueCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('BluetoothError', res); - moduleHelper.send('WriteBLECharacteristicValueCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_StartGameLive(conf, callbackId) { - const config = formatJsonStr(conf); - wx.startGameLive({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('StartGameLiveCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('StartGameLiveCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('StartGameLiveCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_CheckGameLiveEnabled(conf, callbackId) { - const config = formatJsonStr(conf); - wx.checkGameLiveEnabled({ - ...config, - success(res) { - formatResponse('CheckGameLiveEnabledSuccessCallbackOption', res); - moduleHelper.send('CheckGameLiveEnabledCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('CheckGameLiveEnabledCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('CheckGameLiveEnabledCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetUserCurrentGameliveInfo(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getUserCurrentGameliveInfo({ - ...config, - success(res) { - formatResponse('GetUserCurrentGameliveInfoSuccessCallbackOption', res); - moduleHelper.send('GetUserCurrentGameliveInfoCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetUserCurrentGameliveInfoCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetUserCurrentGameliveInfoCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetUserRecentGameLiveInfo(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getUserRecentGameLiveInfo({ - ...config, - success(res) { - formatResponse('GetUserGameLiveDetailsSuccessCallbackOption', res); - moduleHelper.send('GetUserRecentGameLiveInfoCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetUserRecentGameLiveInfoCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetUserRecentGameLiveInfoCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_GetUserGameLiveDetails(conf, callbackId) { - const config = formatJsonStr(conf); - wx.getUserGameLiveDetails({ - ...config, - success(res) { - formatResponse('GetUserGameLiveDetailsSuccessCallbackOption', res); - moduleHelper.send('GetUserGameLiveDetailsCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetUserGameLiveDetailsCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('GetUserGameLiveDetailsCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_OpenChannelsLiveCollection(conf, callbackId) { - const config = formatJsonStr(conf); - wx.openChannelsLiveCollection({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenChannelsLiveCollectionCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenChannelsLiveCollectionCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenChannelsLiveCollectionCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_OpenPage(conf, callbackId) { - const config = formatJsonStr(conf); - wx.openPage({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenPageCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenPageCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenPageCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_RequestSubscribeLiveActivity(conf, callbackId) { - const config = formatJsonStr(conf); - wx.requestSubscribeLiveActivity({ - ...config, - success(res) { - formatResponse('RequestSubscribeLiveActivitySuccessCallbackResult', res); - moduleHelper.send('RequestSubscribeLiveActivityCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('RequestSubscribeLiveActivityCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('RequestSubscribeLiveActivityCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_OpenBusinessView(conf, callbackId) { - const config = formatJsonStr(conf); - wx.openBusinessView({ - ...config, - success(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenBusinessViewCallback', JSON.stringify({ - callbackId, type: 'success', res: JSON.stringify(res), - })); - }, - fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenBusinessViewCallback', JSON.stringify({ - callbackId, type: 'fail', res: JSON.stringify(res), - })); - }, - complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('OpenBusinessViewCallback', JSON.stringify({ - callbackId, type: 'complete', res: JSON.stringify(res), - })); - }, - }); - }, - WX_ExitPointerLock() { - wx.exitPointerLock(); - }, - WX_OperateGameRecorderVideo(option) { - wx.operateGameRecorderVideo(formatJsonStr(option)); - }, - WX_RemoveStorageSync(key) { - wx.removeStorageSync(key); - }, - WX_ReportEvent(eventId, data) { - wx.reportEvent(eventId, formatJsonStr(data)); - }, - WX_ReportPerformance(id, value, dimensions) { - wx.reportPerformance(id, value, dimensions); - }, - WX_ReportUserBehaviorBranchAnalytics(option) { - wx.reportUserBehaviorBranchAnalytics(formatJsonStr(option)); - }, - WX_RequestPointerLock() { - wx.requestPointerLock(); - }, - WX_ReserveChannelsLive(option) { - wx.reserveChannelsLive(formatJsonStr(option)); - }, - WX_RevokeBufferURL(url) { - wx.revokeBufferURL(url); - }, - WX_SetPreferredFramesPerSecond(fps) { - wx.setPreferredFramesPerSecond(fps); - }, - WX_SetStorageSync(key, data) { - wx.setStorageSync(key, formatJsonStr(data)); - }, - WX_ShareAppMessage(option) { - wx.shareAppMessage(formatJsonStr(option)); - }, - WX_TriggerGC() { - wx.triggerGC(); - }, - WX_OnAccelerometerChange() { - if (!OnAccelerometerChangeList) { - OnAccelerometerChangeList = []; + WX_OnEventRegister(functionName, resType) { + if (!onEventLists[functionName]) { + onEventLists[functionName] = []; } const callback = (res) => { - formatResponse('OnAccelerometerChangeListenerResult', res); + formatResponse(resType, res); const resStr = stringifyRes(res); - moduleHelper.send('_OnAccelerometerChangeCallback', resStr); + moduleHelper.send(`_${functionName}Callback`, resStr); }; - OnAccelerometerChangeList.push(callback); - wx.onAccelerometerChange(callback); + onEventLists[functionName].push(callback); + wx[functionName.replace(/^\w/, a => a.toLowerCase())](callback); }, - WX_OffAccelerometerChange() { - (OnAccelerometerChangeList || []).forEach((v) => { - wx.offAccelerometerChange(v); - }); - }, - WX_OnAudioInterruptionBegin() { - if (!OnAudioInterruptionBeginList) { - OnAudioInterruptionBeginList = []; - } - const callback = (res) => { - formatResponse('GeneralCallbackResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnAudioInterruptionBeginCallback', resStr); - }; - OnAudioInterruptionBeginList.push(callback); - wx.onAudioInterruptionBegin(callback); - }, - WX_OffAudioInterruptionBegin() { - (OnAudioInterruptionBeginList || []).forEach((v) => { - wx.offAudioInterruptionBegin(v); - }); - }, - WX_OnAudioInterruptionEnd() { - if (!OnAudioInterruptionEndList) { - OnAudioInterruptionEndList = []; - } - const callback = (res) => { - formatResponse('GeneralCallbackResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnAudioInterruptionEndCallback', resStr); - }; - OnAudioInterruptionEndList.push(callback); - wx.onAudioInterruptionEnd(callback); - }, - WX_OffAudioInterruptionEnd() { - (OnAudioInterruptionEndList || []).forEach((v) => { - wx.offAudioInterruptionEnd(v); - }); - }, - WX_OnBLEConnectionStateChange() { - if (!OnBLEConnectionStateChangeList) { - OnBLEConnectionStateChangeList = []; - } - const callback = (res) => { - formatResponse('OnBLEConnectionStateChangeListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnBLEConnectionStateChangeCallback', resStr); - }; - OnBLEConnectionStateChangeList.push(callback); - wx.onBLEConnectionStateChange(callback); - }, - WX_OffBLEConnectionStateChange() { - (OnBLEConnectionStateChangeList || []).forEach((v) => { - wx.offBLEConnectionStateChange(v); - }); - }, - WX_OnBLEMTUChange() { - if (!OnBLEMTUChangeList) { - OnBLEMTUChangeList = []; - } - const callback = (res) => { - formatResponse('OnBLEMTUChangeListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnBLEMTUChangeCallback', resStr); - }; - OnBLEMTUChangeList.push(callback); - wx.onBLEMTUChange(callback); - }, - WX_OffBLEMTUChange() { - (OnBLEMTUChangeList || []).forEach((v) => { - wx.offBLEMTUChange(v); - }); - }, - WX_OnBLEPeripheralConnectionStateChanged() { - if (!OnBLEPeripheralConnectionStateChangedList) { - OnBLEPeripheralConnectionStateChangedList = []; - } - const callback = (res) => { - formatResponse('OnBLEPeripheralConnectionStateChangedListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnBLEPeripheralConnectionStateChangedCallback', resStr); - }; - OnBLEPeripheralConnectionStateChangedList.push(callback); - wx.onBLEPeripheralConnectionStateChanged(callback); - }, - WX_OffBLEPeripheralConnectionStateChanged() { - (OnBLEPeripheralConnectionStateChangedList || []).forEach((v) => { - wx.offBLEPeripheralConnectionStateChanged(v); - }); - }, - WX_OnBackgroundFetchData() { - const callback = (res) => { - formatResponse('OnBackgroundFetchDataListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnBackgroundFetchDataCallback', resStr); - }; - wx.onBackgroundFetchData(callback); - }, - WX_OnBeaconServiceChange() { - if (!OnBeaconServiceChangeList) { - OnBeaconServiceChangeList = []; - } - const callback = (res) => { - formatResponse('OnBeaconServiceChangeListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnBeaconServiceChangeCallback', resStr); - }; - OnBeaconServiceChangeList.push(callback); - wx.onBeaconServiceChange(callback); - }, - WX_OffBeaconServiceChange() { - (OnBeaconServiceChangeList || []).forEach((v) => { - wx.offBeaconServiceChange(v); - }); - }, - WX_OnBeaconUpdate() { - if (!OnBeaconUpdateList) { - OnBeaconUpdateList = []; - } - const callback = (res) => { - formatResponse('OnBeaconUpdateListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnBeaconUpdateCallback', resStr); - }; - OnBeaconUpdateList.push(callback); - wx.onBeaconUpdate(callback); - }, - WX_OffBeaconUpdate() { - (OnBeaconUpdateList || []).forEach((v) => { - wx.offBeaconUpdate(v); - }); - }, - WX_OnBluetoothAdapterStateChange() { - if (!OnBluetoothAdapterStateChangeList) { - OnBluetoothAdapterStateChangeList = []; - } - const callback = (res) => { - formatResponse('OnBluetoothAdapterStateChangeListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnBluetoothAdapterStateChangeCallback', resStr); - }; - OnBluetoothAdapterStateChangeList.push(callback); - wx.onBluetoothAdapterStateChange(callback); - }, - WX_OffBluetoothAdapterStateChange() { - (OnBluetoothAdapterStateChangeList || []).forEach((v) => { - wx.offBluetoothAdapterStateChange(v); - }); - }, - WX_OnBluetoothDeviceFound() { - if (!OnBluetoothDeviceFoundList) { - OnBluetoothDeviceFoundList = []; - } - const callback = (res) => { - formatResponse('OnBluetoothDeviceFoundListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnBluetoothDeviceFoundCallback', resStr); - }; - OnBluetoothDeviceFoundList.push(callback); - wx.onBluetoothDeviceFound(callback); - }, - WX_OffBluetoothDeviceFound() { - (OnBluetoothDeviceFoundList || []).forEach((v) => { - wx.offBluetoothDeviceFound(v); - }); - }, - WX_OnCompassChange() { - if (!OnCompassChangeList) { - OnCompassChangeList = []; - } - const callback = (res) => { - formatResponse('OnCompassChangeListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnCompassChangeCallback', resStr); - }; - OnCompassChangeList.push(callback); - wx.onCompassChange(callback); - }, - WX_OffCompassChange() { - (OnCompassChangeList || []).forEach((v) => { - wx.offCompassChange(v); - }); - }, - WX_OnDeviceMotionChange() { - if (!OnDeviceMotionChangeList) { - OnDeviceMotionChangeList = []; - } - const callback = (res) => { - formatResponse('OnDeviceMotionChangeListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnDeviceMotionChangeCallback', resStr); - }; - OnDeviceMotionChangeList.push(callback); - wx.onDeviceMotionChange(callback); - }, - WX_OffDeviceMotionChange() { - (OnDeviceMotionChangeList || []).forEach((v) => { - wx.offDeviceMotionChange(v); - }); - }, - WX_OnDeviceOrientationChange() { - if (!OnDeviceOrientationChangeList) { - OnDeviceOrientationChangeList = []; - } - const callback = (res) => { - formatResponse('OnDeviceOrientationChangeListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnDeviceOrientationChangeCallback', resStr); - }; - OnDeviceOrientationChangeList.push(callback); - wx.onDeviceOrientationChange(callback); - }, - WX_OffDeviceOrientationChange() { - (OnDeviceOrientationChangeList || []).forEach((v) => { - wx.offDeviceOrientationChange(v); - }); - }, - WX_OnError() { - if (!OnErrorList) { - OnErrorList = []; - } - const callback = (res) => { - formatResponse('Error', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnErrorCallback', resStr); - }; - OnErrorList.push(callback); - wx.onError(callback); - }, - WX_OffError() { - (OnErrorList || []).forEach((v) => { - wx.offError(v); - }); - }, - WX_OnHide() { - if (!OnHideList) { - OnHideList = []; - } - const callback = (res) => { - formatResponse('GeneralCallbackResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnHideCallback', resStr); - }; - OnHideList.push(callback); - wx.onHide(callback); - }, - WX_OffHide() { - (OnHideList || []).forEach((v) => { - wx.offHide(v); - }); - }, - WX_OnInteractiveStorageModified() { - if (!OnInteractiveStorageModifiedList) { - OnInteractiveStorageModifiedList = []; - } - const callback = (res) => { - const resStr = res; - moduleHelper.send('_OnInteractiveStorageModifiedCallback', resStr); - }; - OnInteractiveStorageModifiedList.push(callback); - wx.onInteractiveStorageModified(callback); - }, - WX_OffInteractiveStorageModified() { - (OnInteractiveStorageModifiedList || []).forEach((v) => { - wx.offInteractiveStorageModified(v); - }); - }, - WX_OnKeyDown() { - if (!OnKeyDownList) { - OnKeyDownList = []; - } - const callback = (res) => { - formatResponse('OnKeyDownListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnKeyDownCallback', resStr); - }; - OnKeyDownList.push(callback); - wx.onKeyDown(callback); - }, - WX_OffKeyDown() { - (OnKeyDownList || []).forEach((v) => { - wx.offKeyDown(v); - }); - }, - WX_OnKeyUp() { - if (!OnKeyUpList) { - OnKeyUpList = []; - } - const callback = (res) => { - formatResponse('OnKeyDownListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnKeyUpCallback', resStr); - }; - OnKeyUpList.push(callback); - wx.onKeyUp(callback); - }, - WX_OffKeyUp() { - (OnKeyUpList || []).forEach((v) => { - wx.offKeyUp(v); - }); - }, - WX_OnKeyboardComplete() { - if (!OnKeyboardCompleteList) { - OnKeyboardCompleteList = []; - } - const callback = (res) => { - formatResponse('OnKeyboardInputListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnKeyboardCompleteCallback', resStr); - }; - OnKeyboardCompleteList.push(callback); - wx.onKeyboardComplete(callback); - }, - WX_OffKeyboardComplete() { - (OnKeyboardCompleteList || []).forEach((v) => { - wx.offKeyboardComplete(v); - }); - }, - WX_OnKeyboardConfirm() { - if (!OnKeyboardConfirmList) { - OnKeyboardConfirmList = []; - } - const callback = (res) => { - formatResponse('OnKeyboardInputListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnKeyboardConfirmCallback', resStr); - }; - OnKeyboardConfirmList.push(callback); - wx.onKeyboardConfirm(callback); - }, - WX_OffKeyboardConfirm() { - (OnKeyboardConfirmList || []).forEach((v) => { - wx.offKeyboardConfirm(v); - }); - }, - WX_OnKeyboardHeightChange() { - if (!OnKeyboardHeightChangeList) { - OnKeyboardHeightChangeList = []; - } - const callback = (res) => { - formatResponse('OnKeyboardHeightChangeListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnKeyboardHeightChangeCallback', resStr); - }; - OnKeyboardHeightChangeList.push(callback); - wx.onKeyboardHeightChange(callback); - }, - WX_OffKeyboardHeightChange() { - (OnKeyboardHeightChangeList || []).forEach((v) => { - wx.offKeyboardHeightChange(v); - }); - }, - WX_OnKeyboardInput() { - if (!OnKeyboardInputList) { - OnKeyboardInputList = []; - } - const callback = (res) => { - formatResponse('OnKeyboardInputListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnKeyboardInputCallback', resStr); - }; - OnKeyboardInputList.push(callback); - wx.onKeyboardInput(callback); - }, - WX_OffKeyboardInput() { - (OnKeyboardInputList || []).forEach((v) => { - wx.offKeyboardInput(v); - }); - }, - WX_OnMemoryWarning() { - if (!OnMemoryWarningList) { - OnMemoryWarningList = []; - } - const callback = (res) => { - formatResponse('OnMemoryWarningListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnMemoryWarningCallback', resStr); - }; - OnMemoryWarningList.push(callback); - wx.onMemoryWarning(callback); - }, - WX_OffMemoryWarning() { - (OnMemoryWarningList || []).forEach((v) => { - wx.offMemoryWarning(v); - }); - }, - WX_OnMenuButtonBoundingClientRectWeightChange() { - if (!OnMenuButtonBoundingClientRectWeightChangeList) { - OnMenuButtonBoundingClientRectWeightChangeList = []; - } - const callback = (res) => { - formatResponse('OnMenuButtonBoundingClientRectWeightChangeListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnMenuButtonBoundingClientRectWeightChangeCallback', resStr); - }; - OnMenuButtonBoundingClientRectWeightChangeList.push(callback); - wx.onMenuButtonBoundingClientRectWeightChange(callback); - }, - WX_OffMenuButtonBoundingClientRectWeightChange() { - (OnMenuButtonBoundingClientRectWeightChangeList || []).forEach((v) => { - wx.offMenuButtonBoundingClientRectWeightChange(v); - }); - }, - WX_OnMessage() { - const callback = (res) => { - const resStr = res; - moduleHelper.send('_OnMessageCallback', resStr); - }; - wx.onMessage(callback); - }, - WX_OnMouseDown() { - if (!OnMouseDownList) { - OnMouseDownList = []; - } - const callback = (res) => { - formatResponse('OnMouseDownListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnMouseDownCallback', resStr); - }; - OnMouseDownList.push(callback); - wx.onMouseDown(callback); - }, - WX_OffMouseDown() { - (OnMouseDownList || []).forEach((v) => { - wx.offMouseDown(v); - }); - }, - WX_OnMouseMove() { - if (!OnMouseMoveList) { - OnMouseMoveList = []; - } - const callback = (res) => { - formatResponse('OnMouseMoveListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnMouseMoveCallback', resStr); - }; - OnMouseMoveList.push(callback); - wx.onMouseMove(callback); - }, - WX_OffMouseMove() { - (OnMouseMoveList || []).forEach((v) => { - wx.offMouseMove(v); - }); - }, - WX_OnMouseUp() { - if (!OnMouseUpList) { - OnMouseUpList = []; - } - const callback = (res) => { - formatResponse('OnMouseDownListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnMouseUpCallback', resStr); - }; - OnMouseUpList.push(callback); - wx.onMouseUp(callback); - }, - WX_OffMouseUp() { - (OnMouseUpList || []).forEach((v) => { - wx.offMouseUp(v); - }); - }, - WX_OnNetworkStatusChange() { - if (!OnNetworkStatusChangeList) { - OnNetworkStatusChangeList = []; - } - const callback = (res) => { - formatResponse('OnNetworkStatusChangeListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnNetworkStatusChangeCallback', resStr); - }; - OnNetworkStatusChangeList.push(callback); - wx.onNetworkStatusChange(callback); - }, - WX_OffNetworkStatusChange() { - (OnNetworkStatusChangeList || []).forEach((v) => { - wx.offNetworkStatusChange(v); - }); - }, - WX_OnNetworkWeakChange() { - if (!OnNetworkWeakChangeList) { - OnNetworkWeakChangeList = []; - } - const callback = (res) => { - formatResponse('OnNetworkWeakChangeListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnNetworkWeakChangeCallback', resStr); - }; - OnNetworkWeakChangeList.push(callback); - wx.onNetworkWeakChange(callback); - }, - WX_OffNetworkWeakChange() { - (OnNetworkWeakChangeList || []).forEach((v) => { - wx.offNetworkWeakChange(v); - }); - }, - WX_OnScreenRecordingStateChanged() { - if (!OnScreenRecordingStateChangedList) { - OnScreenRecordingStateChangedList = []; - } - const callback = (res) => { - formatResponse('OnScreenRecordingStateChangedListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnScreenRecordingStateChangedCallback', resStr); - }; - OnScreenRecordingStateChangedList.push(callback); - wx.onScreenRecordingStateChanged(callback); - }, - WX_OffScreenRecordingStateChanged() { - (OnScreenRecordingStateChangedList || []).forEach((v) => { - wx.offScreenRecordingStateChanged(v); - }); - }, - WX_OnShareMessageToFriend() { - const callback = (res) => { - formatResponse('OnShareMessageToFriendListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnShareMessageToFriendCallback', resStr); - }; - wx.onShareMessageToFriend(callback); - }, - WX_OnShow() { - if (!OnShowList) { - OnShowList = []; - } - const callback = (res) => { - formatResponse('OnShowListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnShowCallback', resStr); - }; - OnShowList.push(callback); - wx.onShow(callback); - }, - WX_OffShow() { - (OnShowList || []).forEach((v) => { - wx.offShow(v); - }); - }, - WX_OnUnhandledRejection() { - if (!OnUnhandledRejectionList) { - OnUnhandledRejectionList = []; - } - const callback = (res) => { - formatResponse('OnUnhandledRejectionListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnUnhandledRejectionCallback', resStr); - }; - OnUnhandledRejectionList.push(callback); - wx.onUnhandledRejection(callback); - }, - WX_OffUnhandledRejection() { - (OnUnhandledRejectionList || []).forEach((v) => { - wx.offUnhandledRejection(v); - }); - }, - WX_OnUserCaptureScreen() { - if (!OnUserCaptureScreenList) { - OnUserCaptureScreenList = []; - } - const callback = (res) => { - formatResponse('OnUserCaptureScreenListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnUserCaptureScreenCallback', resStr); - }; - OnUserCaptureScreenList.push(callback); - wx.onUserCaptureScreen(callback); - }, - WX_OffUserCaptureScreen() { - (OnUserCaptureScreenList || []).forEach((v) => { - wx.offUserCaptureScreen(v); - }); - }, - WX_OnVoIPChatInterrupted() { - if (!OnVoIPChatInterruptedList) { - OnVoIPChatInterruptedList = []; - } - const callback = (res) => { - formatResponse('OnVoIPChatInterruptedListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnVoIPChatInterruptedCallback', resStr); - }; - OnVoIPChatInterruptedList.push(callback); - wx.onVoIPChatInterrupted(callback); - }, - WX_OffVoIPChatInterrupted() { - (OnVoIPChatInterruptedList || []).forEach((v) => { - wx.offVoIPChatInterrupted(v); - }); - }, - WX_OnVoIPChatMembersChanged() { - if (!OnVoIPChatMembersChangedList) { - OnVoIPChatMembersChangedList = []; - } - const callback = (res) => { - formatResponse('OnVoIPChatMembersChangedListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnVoIPChatMembersChangedCallback', resStr); - }; - OnVoIPChatMembersChangedList.push(callback); - wx.onVoIPChatMembersChanged(callback); - }, - WX_OffVoIPChatMembersChanged() { - (OnVoIPChatMembersChangedList || []).forEach((v) => { - wx.offVoIPChatMembersChanged(v); - }); - }, - WX_OnVoIPChatSpeakersChanged() { - if (!OnVoIPChatSpeakersChangedList) { - OnVoIPChatSpeakersChangedList = []; - } - const callback = (res) => { - formatResponse('OnVoIPChatSpeakersChangedListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnVoIPChatSpeakersChangedCallback', resStr); - }; - OnVoIPChatSpeakersChangedList.push(callback); - wx.onVoIPChatSpeakersChanged(callback); - }, - WX_OffVoIPChatSpeakersChanged() { - (OnVoIPChatSpeakersChangedList || []).forEach((v) => { - wx.offVoIPChatSpeakersChanged(v); - }); - }, - WX_OnVoIPChatStateChanged() { - if (!OnVoIPChatStateChangedList) { - OnVoIPChatStateChangedList = []; - } - const callback = (res) => { - formatResponse('OnVoIPChatStateChangedListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnVoIPChatStateChangedCallback', resStr); - }; - OnVoIPChatStateChangedList.push(callback); - wx.onVoIPChatStateChanged(callback); - }, - WX_OffVoIPChatStateChanged() { - (OnVoIPChatStateChangedList || []).forEach((v) => { - wx.offVoIPChatStateChanged(v); - }); - }, - WX_OnWheel() { - if (!OnWheelList) { - OnWheelList = []; - } - const callback = (res) => { - formatResponse('OnWheelListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnWheelCallback', resStr); - }; - OnWheelList.push(callback); - wx.onWheel(callback); - }, - WX_OffWheel() { - (OnWheelList || []).forEach((v) => { - wx.offWheel(v); - }); - }, - WX_OnWindowResize() { - if (!OnWindowResizeList) { - OnWindowResizeList = []; - } - const callback = (res) => { - formatResponse('OnWindowResizeListenerResult', res); - const resStr = stringifyRes(res); - moduleHelper.send('_OnWindowResizeCallback', resStr); - }; - OnWindowResizeList.push(callback); - wx.onWindowResize(callback); - }, - WX_OffWindowResize() { - (OnWindowResizeList || []).forEach((v) => { - wx.offWindowResize(v); + WX_OffEventRegister(functionName) { + (onEventLists[functionName] || []).forEach((v) => { + wx[functionName.replace(/^On/, 'off')](v); }); }, WX_OnAddToFavorites() { @@ -4133,219 +219,90 @@ export default { WX_OffGameLiveStateChange() { wx.offGameLiveStateChange(); }, - WX_SetHandoffQuery(query) { - const res = wx.setHandoffQuery(formatJsonStr(query)); + WX_SyncFunction_bs(functionName, param1) { + const res = WX_SyncFunction(functionName, param1); return res; }, - WX_GetAccountInfoSync() { - const res = wx.getAccountInfoSync(); - formatResponse('AccountInfo', res); + WX_SyncFunction_t(functionName, returnType) { + const res = WX_SyncFunction(functionName); + if (onlyReadyResponse.includes(functionName.replace(/^\w/, a => a.toLowerCase()))) { + formatResponse(returnType, JSON.parse(JSON.stringify(res))); + return JSON.stringify(res); + } + formatResponse(returnType, res); return JSON.stringify(res); }, - WX_GetAppAuthorizeSetting() { - const res = wx.getAppAuthorizeSetting(); - formatResponse('AppAuthorizeSetting', JSON.parse(JSON.stringify(res))); + WX_SyncFunction_tt(functionName, returnType, param1) { + const res = WX_SyncFunction(functionName, formatJsonStr(param1)); + formatResponse(returnType, res); return JSON.stringify(res); }, - WX_GetAppBaseInfo() { - const res = wx.getAppBaseInfo(); - formatResponse('AppBaseInfo', res); - return JSON.stringify(res); - }, - WX_GetBatteryInfoSync() { - const res = wx.getBatteryInfoSync(); - formatResponse('GetBatteryInfoSyncResult', res); - return JSON.stringify(res); - }, - WX_GetDeviceInfo() { - const res = wx.getDeviceInfo(); - formatResponse('DeviceInfo', res); - return JSON.stringify(res); - }, - WX_GetEnterOptionsSync() { - const res = wx.getEnterOptionsSync(); - formatResponse('EnterOptionsGame', res); - return JSON.stringify(res); - }, - WX_GetExptInfoSync(keys) { - const res = wx.getExptInfoSync(formatJsonStr(keys)); - formatResponse('IAnyObject', res); - return JSON.stringify(res); - }, - WX_GetExtConfigSync() { - const res = wx.getExtConfigSync(); - formatResponse('IAnyObject', res); - return JSON.stringify(res); - }, - WX_GetLaunchOptionsSync() { - const res = wx.getLaunchOptionsSync(); - formatResponse('LaunchOptionsGame', res); - return JSON.stringify(res); - }, - WX_GetMenuButtonBoundingClientRect() { - const res = wx.getMenuButtonBoundingClientRect(); - formatResponse('ClientRect', res); - return JSON.stringify(res); - }, - WX_GetStorageInfoSync() { - const res = wx.getStorageInfoSync(); - formatResponse('GetStorageInfoSyncOption', res); - return JSON.stringify(res); - }, - WX_GetSystemInfoSync() { - const res = wx.getSystemInfoSync(); - formatResponse('SystemInfo', res); - return JSON.stringify(res); - }, - WX_GetSystemSetting() { - const res = wx.getSystemSetting(); - formatResponse('SystemSetting', JSON.parse(JSON.stringify(res))); - return JSON.stringify(res); - }, - WX_GetWindowInfo() { - const res = wx.getWindowInfo(); - formatResponse('WindowInfo', res); - return JSON.stringify(res); - }, - WX_CreateImageData(width, height) { - const res = wx.createImageData(width, height); - formatResponse('ImageData', res); - return JSON.stringify(res); - }, - WX_CreatePath2D() { - const res = wx.createPath2D(); - formatResponse('Path2D', res); - return JSON.stringify(res); - }, - WX_IsPointerLocked() { - const res = wx.isPointerLocked(); + WX_SyncFunction_b(functionName) { + const res = WX_SyncFunction(functionName); return res; }, - WX_IsVKSupport(version) { - const res = wx.isVKSupport(formatJsonStr(version)); + WX_SyncFunction_bsnn(functionName, param1, param2, param3) { + const res = WX_SyncFunction(functionName, param1, param2, param3); return res; }, - WX_SetCursor(path, x, y) { - const res = wx.setCursor(formatJsonStr(path), x, y); + WX_SyncFunction_bt(functionName, param1) { + const res = WX_SyncFunction(functionName, formatJsonStr(param1)); return res; }, - WX_SetMessageToFriendQuery(option) { - const res = wx.setMessageToFriendQuery(formatJsonStr(option)); + WX_SyncFunction_nt(functionName, param1) { + const res = WX_SyncFunction(functionName, formatJsonStr(param1)); return res; }, - WX_GetTextLineHeight(option) { - const res = wx.getTextLineHeight(formatJsonStr(option)); + WX_SyncFunction_ss(functionName, param1) { + const res = WX_SyncFunction(functionName, param1); return res; }, - WX_LoadFont(path) { - const res = wx.loadFont(formatJsonStr(path)); - return res; - }, - WX_GetGameLiveState() { - const res = wx.getGameLiveState(); - formatResponse('GameLiveState', res); + WX_SyncFunction_tnn(functionName, returnType, param1, param2) { + const res = WX_SyncFunction(functionName, param1, param2); + formatResponse(returnType, res); return JSON.stringify(res); }, - WX_DownloadFile(conf) { + WX_ClassOneWayFunction(functionName, returnType, successType, failType, completeType, conf) { const config = formatJsonStr(conf); const callbackId = uid(); - const obj = wx.downloadFile({ + const obj = wx[functionName.replace(/^\w/, a => a.toLowerCase())]({ ...config, success(res) { - formatResponse('DownloadFileSuccessCallbackResult', res); - moduleHelper.send('DownloadFileCallback', JSON.stringify({ + formatResponse(successType, res); + moduleHelper.send(`${functionName}Callback`, JSON.stringify({ callbackId, type: 'success', res: JSON.stringify(res), })); }, fail(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('DownloadFileCallback', JSON.stringify({ + formatResponse(failType, res); + moduleHelper.send(`${functionName}Callback`, JSON.stringify({ callbackId, type: 'fail', res: JSON.stringify(res), })); }, complete(res) { - formatResponse('GeneralCallbackResult', res); - moduleHelper.send('DownloadFileCallback', JSON.stringify({ + formatResponse(completeType, res); + moduleHelper.send(`${functionName}Callback`, JSON.stringify({ callbackId, type: 'complete', res: JSON.stringify(res), })); }, }); - DownloadTaskList[callbackId] = obj; + if (!ClassLists[returnType]) { + ClassLists[returnType] = {}; + } + ClassLists[returnType][callbackId] = obj; return callbackId; }, - WX_CreateFeedbackButton(option) { - const obj = wx.createFeedbackButton(formatJsonStr(option)); + WX_ClassFunction(functionName, returnType, option) { + const obj = wx[functionName.replace(/^\w/, a => a.toLowerCase())](formatJsonStr(option)); const key = uid(); - FeedbackButtonList[key] = obj; + if (!ClassLists[returnType]) { + ClassLists[returnType] = {}; + } + ClassLists[returnType][key] = obj; return key; }, - WX_GetLogManager(option) { - const obj = wx.getLogManager(formatJsonStr(option)); - const key = uid(); - LogManagerList[key] = obj; - return key; - }, - WX_GetRealtimeLogManager() { - const obj = wx.getRealtimeLogManager(); - const key = uid(); - RealtimeLogManagerList[key] = obj; - return key; - }, - WX_GetUpdateManager() { - const obj = wx.getUpdateManager(); - const key = uid(); - UpdateManagerList[key] = obj; - return key; - }, - WX_CreateVideoDecoder() { - const obj = wx.createVideoDecoder(); - const key = uid(); - VideoDecoderList[key] = obj; - return key; - }, - WX_DownloadTaskAbort(id) { - const obj = getDownloadTaskObject(id); - if (!obj) { - return; - } - obj.abort(); - }, - WX_DownloadTaskOffHeadersReceived(id) { - const obj = getDownloadTaskObject(id); - if (!obj) { - return; - } - offEventCallback(wxDownloadTaskHeadersReceivedList, (v) => { - obj.offHeadersReceived(v); - }, id); - }, - WX_DownloadTaskOffProgressUpdate(id) { - const obj = getDownloadTaskObject(id); - if (!obj) { - return; - } - offEventCallback(wxDownloadTaskProgressUpdateList, (v) => { - obj.offProgressUpdate(v); - }, id); - }, - WX_DownloadTaskOnHeadersReceived(id) { - const obj = getDownloadTaskObject(id); - if (!obj) { - return; - } - const callback = onEventCallback(wxDownloadTaskHeadersReceivedList, '_DownloadTaskOnHeadersReceivedCallback', id, id); - obj.onHeadersReceived(callback); - }, - WX_DownloadTaskOnProgressUpdate(id) { - const obj = getDownloadTaskObject(id); - if (!obj) { - return; - } - const callback = onEventCallback(wxDownloadTaskProgressUpdateList, '_DownloadTaskOnProgressUpdateCallback', id, id); - obj.onProgressUpdate(callback); - }, - WXFeedbackButtonSetProperty(id, key, value) { - const obj = getFeedbackButtonObject(id); + WX_ClassSetProperty(className, id, key, value) { + const obj = getClassObject(className, id); if (!obj) { return; } @@ -4362,209 +319,80 @@ export default { obj[key] = value; } }, - WX_FeedbackButtonDestroy(id) { - const obj = getFeedbackButtonObject(id); + WX_ClassOnEventFunction(className, functionName, returnType, id, eventName) { + const obj = getClassObject(className, id); if (!obj) { return; } - obj.destroy(); - }, - WX_FeedbackButtonHide(id) { - const obj = getFeedbackButtonObject(id); - if (!obj) { - return; - } - obj.hide(); - }, - WX_FeedbackButtonOffTap(id) { - const obj = getFeedbackButtonObject(id); - if (!obj) { - return; - } - offEventCallback(wxFeedbackButtonTapList, (v) => { - obj.offTap(v); - }, id); - }, - WX_FeedbackButtonOnTap(id) { - const obj = getFeedbackButtonObject(id); - if (!obj) { - return; - } - const callback = onEventCallback(wxFeedbackButtonTapList, '_FeedbackButtonOnTapCallback', id, id); - obj.onTap(callback); - }, - WX_FeedbackButtonShow(id) { - const obj = getFeedbackButtonObject(id); - if (!obj) { - return; - } - obj.show(); - }, - WX_LogManagerDebug(id, args) { - const obj = getLogManagerObject(id); - if (!obj) { - return; - } - obj.debug(args); - }, - WX_LogManagerInfo(id, args) { - const obj = getLogManagerObject(id); - if (!obj) { - return; - } - obj.info(args); - }, - WX_LogManagerLog(id, args) { - const obj = getLogManagerObject(id); - if (!obj) { - return; - } - obj.log(args); - }, - WX_LogManagerWarn(id, args) { - const obj = getLogManagerObject(id); - if (!obj) { - return; - } - obj.warn(args); - }, - WX_RealtimeLogManagerAddFilterMsg(id, msg) { - const obj = getRealtimeLogManagerObject(id); - if (!obj) { - return; - } - obj.addFilterMsg(msg); - }, - WX_RealtimeLogManagerError(id, args) { - const obj = getRealtimeLogManagerObject(id); - if (!obj) { - return; - } - obj.error(args); - }, - WX_RealtimeLogManagerInfo(id, args) { - const obj = getRealtimeLogManagerObject(id); - if (!obj) { - return; - } - obj.info(args); - }, - WX_RealtimeLogManagerSetFilterMsg(id, msg) { - const obj = getRealtimeLogManagerObject(id); - if (!obj) { - return; - } - obj.setFilterMsg(msg); - }, - WX_RealtimeLogManagerWarn(id, args) { - const obj = getRealtimeLogManagerObject(id); - if (!obj) { - return; - } - obj.warn(args); - }, - WX_UpdateManagerApplyUpdate(id) { - const obj = getUpdateManagerObject(id); - if (!obj) { - return; - } - obj.applyUpdate(); - }, - WX_UpdateManagerOnCheckForUpdate(id) { - const obj = getUpdateManagerObject(id); - if (!obj) { - return; + if (!ClassOnEventLists[className + functionName]) { + ClassOnEventLists[className + functionName] = {}; } const callback = (res) => { - formatResponse('OnCheckForUpdateListenerResult', res); + if (returnType !== 'string') { + formatResponse(returnType, res); + } + if (functionName === 'On' && eventName) { + // eslint-disable-next-line no-param-reassign + id = id + eventName; + } const resStr = JSON.stringify({ callbackId: id, res: JSON.stringify(res), }); - moduleHelper.send('_UpdateManagerOnCheckForUpdateCallback', resStr); + moduleHelper.send(`_${className}${functionName}Callback`, resStr); }; - obj.onCheckForUpdate(callback); + if (!ClassOnEventLists[className + functionName][id]) { + ClassOnEventLists[className + functionName][id] = []; + } + ClassOnEventLists[className + functionName][id].push(callback); + if (functionName === 'On' && eventName) { + obj[functionName.replace(/^\w/, a => a.toLowerCase())](eventName, callback); + } + else { + obj[functionName.replace(/^\w/, a => a.toLowerCase())](callback); + } }, - WX_UpdateManagerOnUpdateFailed(id) { - const obj = getUpdateManagerObject(id); + WX_ClassOffEventFunction(className, functionName, id, eventName) { + const obj = getClassObject(className, id); if (!obj) { return; } - const callback = (res) => { - formatResponse('GeneralCallbackResult', res); - const resStr = JSON.stringify({ - callbackId: id, - res: JSON.stringify(res), - }); - moduleHelper.send('_UpdateManagerOnUpdateFailedCallback', resStr); - }; - obj.onUpdateFailed(callback); - }, - WX_UpdateManagerOnUpdateReady(id) { - const obj = getUpdateManagerObject(id); - if (!obj) { + if (functionName === 'Off' && eventName) { + // eslint-disable-next-line no-param-reassign + id = id + eventName; + } + if (!ClassOnEventLists[className + functionName][id]) { return; } - const callback = (res) => { - formatResponse('GeneralCallbackResult', res); - const resStr = JSON.stringify({ - callbackId: id, - res: JSON.stringify(res), - }); - moduleHelper.send('_UpdateManagerOnUpdateReadyCallback', resStr); - }; - obj.onUpdateReady(callback); + ClassOnEventLists[className + functionName][id].forEach((v) => { + if (functionName === 'Off' && eventName) { + obj[functionName.replace(/^\w/, (a) => a.toLowerCase())](eventName, v); + } + else { + obj[functionName.replace(/^\w/, (a) => a.toLowerCase())](v); + } + }); + delete ClassOnEventLists[className + functionName][id]; }, - WX_VideoDecoderGetFrameData(id) { - const obj = getVideoDecoderObject(id); - if (!obj) { - return JSON.stringify(formatResponse('FrameDataOptions')); - } - return JSON.stringify(formatResponse('FrameDataOptions', obj.getFrameData(), id)); + WX_ClassOneWayNoFunction_v(className, functionName, id) { + WX_ClassOneWayNoFunction(className, functionName, id); }, - WX_VideoDecoderRemove(id) { - const obj = getVideoDecoderObject(id); - if (!obj) { - return; - } - obj.remove(); + WX_ClassOneWayNoFunction_vs(className, functionName, id, param1) { + WX_ClassOneWayNoFunction(className, functionName, id, param1); }, - WX_VideoDecoderSeek(id, position) { - const obj = getVideoDecoderObject(id); + WX_ClassOneWayNoFunction_t(className, functionName, returnType, id) { + const obj = getClassObject(className, id); if (!obj) { - return; + return JSON.stringify(formatResponse(returnType)); } - obj.seek(position); + const res = obj[functionName.replace(/^\w/, a => a.toLowerCase())](...params); + return JSON.stringify(formatResponse(returnType, res, id)); }, - WX_VideoDecoderStart(id, option) { - const obj = getVideoDecoderObject(id); - if (!obj) { - return; - } - obj.start(formatJsonStr(option)); + WX_ClassOneWayNoFunction_vt(className, functionName, id, param1) { + const formatParam1 = formatJsonStr(param1); + WX_ClassOneWayNoFunction(className, functionName, id, formatParam1); }, - WX_VideoDecoderStop(id) { - const obj = getVideoDecoderObject(id); - if (!obj) { - return; - } - obj.stop(); - }, - WX_VideoDecoderOff(id, eventName) { - const obj = getVideoDecoderObject(id); - if (!obj) { - return; - } - offEventCallback(wxVideoDecoderList, (v) => { - obj.off(eventName, v); - }, id); - }, - WX_VideoDecoderOn(id, eventName) { - const obj = getVideoDecoderObject(id); - if (!obj) { - return; - } - const callback = onEventCallback(wxVideoDecoderList, '_VideoDecoderOnCallback', id, id + eventName); - obj.on(eventName, callback); + WX_ClassOneWayNoFunction_vn(className, functionName, id, param1) { + WX_ClassOneWayNoFunction(className, functionName, id, param1); }, }; diff --git a/Runtime/wechat-default/unity-sdk/sdk.js.meta b/Runtime/wechat-default/unity-sdk/sdk.js.meta index 6bc53673..751b6020 100644 --- a/Runtime/wechat-default/unity-sdk/sdk.js.meta +++ b/Runtime/wechat-default/unity-sdk/sdk.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: e06a79f293a8f58e3228b4ec2ddbb5af +guid: 0410662fdc4c6ee11d86240005576848 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/share.js.meta b/Runtime/wechat-default/unity-sdk/share.js.meta index cc9d8f46..55315c46 100644 --- a/Runtime/wechat-default/unity-sdk/share.js.meta +++ b/Runtime/wechat-default/unity-sdk/share.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: a88af1358683fe85690c6bd304cd7843 +guid: 53611c8afeaab49ec4c8440e331013d8 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/storage.js.meta b/Runtime/wechat-default/unity-sdk/storage.js.meta index bc4032dd..f796f2b1 100644 --- a/Runtime/wechat-default/unity-sdk/storage.js.meta +++ b/Runtime/wechat-default/unity-sdk/storage.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: de3662a6c4fd35633c5e37040a089890 +guid: ad7a7fe375c17fa4c0dd4f7748f1738e DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/texture.js.meta b/Runtime/wechat-default/unity-sdk/texture.js.meta index 368a32a5..b2c8b25b 100644 --- a/Runtime/wechat-default/unity-sdk/texture.js.meta +++ b/Runtime/wechat-default/unity-sdk/texture.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 16c480cc6a63441ac47cdac5cc91bcd5 +guid: 047f2f9034cc7702476a88f9e5915c48 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/touch/index.js.meta b/Runtime/wechat-default/unity-sdk/touch/index.js.meta index 1c9a6f81..4b8904d0 100644 --- a/Runtime/wechat-default/unity-sdk/touch/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/touch/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 52b92d5807b4a50b99a7046c1e8b4bda +guid: b0557c42a6396efd620dd4638f1243de DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/upload-file.js.meta b/Runtime/wechat-default/unity-sdk/upload-file.js.meta index 6a9c8ae1..2947be64 100644 --- a/Runtime/wechat-default/unity-sdk/upload-file.js.meta +++ b/Runtime/wechat-default/unity-sdk/upload-file.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 063a6a1c38fc5aa1d36acb35acf0cbfe +guid: ed321eba9f475bb9b5990e15a49beaa1 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/userinfo.js.meta b/Runtime/wechat-default/unity-sdk/userinfo.js.meta index 5f36e475..bed1cec9 100644 --- a/Runtime/wechat-default/unity-sdk/userinfo.js.meta +++ b/Runtime/wechat-default/unity-sdk/userinfo.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: ea0826bf2305d228df839d7a2753bda7 +guid: 1b1c2bb266527859a48d697a834db1d4 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/util.js.meta b/Runtime/wechat-default/unity-sdk/util.js.meta index f62b6e16..11d3b133 100644 --- a/Runtime/wechat-default/unity-sdk/util.js.meta +++ b/Runtime/wechat-default/unity-sdk/util.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 27baa18ec71b9cfac94537e753ba56ab +guid: 363d01e0dd61c3a58608a45ff1957e4a DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/utils.js.meta b/Runtime/wechat-default/unity-sdk/utils.js.meta index 502ca29a..dbc55d25 100644 --- a/Runtime/wechat-default/unity-sdk/utils.js.meta +++ b/Runtime/wechat-default/unity-sdk/utils.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: cdbba239da61d81e53f5666fbeb20f70 +guid: 14d6e5ebfe68766100a5881e7c74da26 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/video.js.meta b/Runtime/wechat-default/unity-sdk/video.js.meta index e733247c..e1ac6c23 100644 --- a/Runtime/wechat-default/unity-sdk/video.js.meta +++ b/Runtime/wechat-default/unity-sdk/video.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 7fb7b84f95018b2a5ea8098afa401dae +guid: ee230949b9851f5242d62db4881fccbd DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/unity-sdk/video/index.js.meta b/Runtime/wechat-default/unity-sdk/video/index.js.meta index 455d6115..4ff6141e 100644 --- a/Runtime/wechat-default/unity-sdk/video/index.js.meta +++ b/Runtime/wechat-default/unity-sdk/video/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 0b2126252843410905b8bfd7724b1456 +guid: 6f9c6b1cbe7356064d7b4ce9db858cd3 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/wasmcode/game.js.meta b/Runtime/wechat-default/wasmcode/game.js.meta index be7b200e..9fd77cc9 100644 --- a/Runtime/wechat-default/wasmcode/game.js.meta +++ b/Runtime/wechat-default/wasmcode/game.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 6bff71bedc4dd0b0b8fc947d4391748f +guid: 7bdebcc257bfedcc1a43d25f7acc247f DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/weapp-adapter.js.meta b/Runtime/wechat-default/weapp-adapter.js.meta index da697893..6dba0b6d 100644 --- a/Runtime/wechat-default/weapp-adapter.js.meta +++ b/Runtime/wechat-default/weapp-adapter.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 4c5806390e82c34f40676d944297bc9e +guid: 17730dd45a4fa494ae189ddb6c7ff850 DefaultImporter: externalObjects: {} userData: diff --git a/Runtime/wechat-default/workers/response/index.js.meta b/Runtime/wechat-default/workers/response/index.js.meta index 6a8d7548..bb5c4f49 100644 --- a/Runtime/wechat-default/workers/response/index.js.meta +++ b/Runtime/wechat-default/workers/response/index.js.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: 8275934a02ddcf5809da5f2361f28448 +guid: 81106110de7787f0a2dcabef1b57e0a7 DefaultImporter: externalObjects: {} userData: diff --git a/WebGLTemplates/WXTemplate/index.html b/WebGLTemplates/WXTemplate/index.html index d450eecc..4d42dd0a 100644 --- a/WebGLTemplates/WXTemplate/index.html +++ b/WebGLTemplates/WXTemplate/index.html @@ -377,238 +377,15 @@ WX_CloudDeleteFile() {}, WX_CloudCDN() {}, WXLaunchOperaBridge() {}, - WX_AddCard(conf, callbackId){}, - WX_AuthPrivateMessage(conf, callbackId){}, - WX_Authorize(conf, callbackId){}, - WX_CheckIsAddedToMyMiniProgram(conf, callbackId){}, - WX_CheckSession(conf, callbackId){}, - WX_ChooseImage(conf, callbackId){}, - WX_ChooseMedia(conf, callbackId){}, - WX_ChooseMessageFile(conf, callbackId){}, - WX_CloseBLEConnection(conf, callbackId){}, - WX_CloseBluetoothAdapter(conf, callbackId){}, - WX_CompressImage(conf, callbackId){}, - WX_CreateBLEConnection(conf, callbackId){}, - WX_CreateBLEPeripheralServer(conf, callbackId){}, - WX_ExitMiniProgram(conf, callbackId){}, - WX_ExitVoIPChat(conf, callbackId){}, - WX_FaceDetect(conf, callbackId){}, - WX_GetAvailableAudioSources(conf, callbackId){}, - WX_GetBLEDeviceCharacteristics(conf, callbackId){}, - WX_GetBLEDeviceRSSI(conf, callbackId){}, - WX_GetBLEDeviceServices(conf, callbackId){}, - WX_GetBLEMTU(conf, callbackId){}, - WX_GetBackgroundFetchData(conf, callbackId){}, - WX_GetBackgroundFetchToken(conf, callbackId){}, - WX_GetBatteryInfo(conf, callbackId){}, - WX_GetBeacons(conf, callbackId){}, - WX_GetBluetoothAdapterState(conf, callbackId){}, - WX_GetBluetoothDevices(conf, callbackId){}, - WX_GetChannelsLiveInfo(conf, callbackId){}, - WX_GetChannelsLiveNoticeInfo(conf, callbackId){}, - WX_GetClipboardData(conf, callbackId){}, - WX_GetConnectedBluetoothDevices(conf, callbackId){}, - WX_GetDeviceBenchmarkInfo(conf, callbackId){}, - WX_GetExtConfig(conf, callbackId){}, - WX_GetFuzzyLocation(conf, callbackId){}, - WX_GetGameClubData(conf, callbackId){}, - WX_GetGroupEnterInfo(conf, callbackId){}, - WX_GetInferenceEnvInfo(conf, callbackId){}, - WX_GetLocalIPAddress(conf, callbackId){}, - WX_GetNetworkType(conf, callbackId){}, - WX_GetPrivacySetting(conf, callbackId){}, - WX_GetScreenBrightness(conf, callbackId){}, - WX_GetScreenRecordingState(conf, callbackId){}, - WX_GetSetting(conf, callbackId){}, - WX_GetShareInfo(conf, callbackId){}, - WX_GetStorageInfo(conf, callbackId){}, - WX_GetSystemInfo(conf, callbackId){}, - WX_GetSystemInfoAsync(conf, callbackId){}, - WX_GetUserInfo(conf, callbackId){}, - WX_GetUserInteractiveStorage(conf, callbackId){}, - WX_GetWeRunData(conf, callbackId){}, - WX_HideKeyboard(conf, callbackId){}, - WX_HideLoading(conf, callbackId){}, - WX_HideShareMenu(conf, callbackId){}, - WX_HideToast(conf, callbackId){}, - WX_InitFaceDetect(conf, callbackId){}, - WX_IsBluetoothDevicePaired(conf, callbackId){}, - WX_JoinVoIPChat(conf, callbackId){}, - WX_Login(conf, callbackId){}, - WX_MakeBluetoothPair(conf, callbackId){}, - WX_NavigateToMiniProgram(conf, callbackId){}, - WX_NotifyBLECharacteristicValueChange(conf, callbackId){}, - WX_OpenAppAuthorizeSetting(conf, callbackId){}, - WX_OpenBluetoothAdapter(conf, callbackId){}, - WX_OpenCard(conf, callbackId){}, - WX_OpenChannelsActivity(conf, callbackId){}, - WX_OpenChannelsEvent(conf, callbackId){}, - WX_OpenChannelsLive(conf, callbackId){}, - WX_OpenChannelsUserProfile(conf, callbackId){}, - WX_OpenCustomerServiceChat(conf, callbackId){}, - WX_OpenCustomerServiceConversation(conf, callbackId){}, - WX_OpenPrivacyContract(conf, callbackId){}, - WX_OpenSetting(conf, callbackId){}, - WX_OpenSystemBluetoothSetting(conf, callbackId){}, - WX_PreviewImage(conf, callbackId){}, - WX_PreviewMedia(conf, callbackId){}, - WX_ReadBLECharacteristicValue(conf, callbackId){}, - WX_RemoveStorage(conf, callbackId){}, - WX_RemoveUserCloudStorage(conf, callbackId){}, - WX_ReportScene(conf, callbackId){}, - WX_RequestMidasFriendPayment(conf, callbackId){}, - WX_RequestMidasPayment(conf, callbackId){}, - WX_RequestMidasPaymentGameItem(conf, callbackId){}, - WX_RequestSubscribeMessage(conf, callbackId){}, - WX_RequestSubscribeSystemMessage(conf, callbackId){}, - WX_RequirePrivacyAuthorize(conf, callbackId){}, - WX_RestartMiniProgram(conf, callbackId){}, - WX_SaveFileToDisk(conf, callbackId){}, - WX_SaveImageToPhotosAlbum(conf, callbackId){}, - WX_ScanCode(conf, callbackId){}, - WX_SetBLEMTU(conf, callbackId){}, - WX_SetBackgroundFetchToken(conf, callbackId){}, - WX_SetClipboardData(conf, callbackId){}, - WX_SetDeviceOrientation(conf, callbackId){}, - WX_SetEnableDebug(conf, callbackId){}, - WX_SetInnerAudioOption(conf, callbackId){}, - WX_SetKeepScreenOn(conf, callbackId){}, - WX_SetMenuStyle(conf, callbackId){}, - WX_SetScreenBrightness(conf, callbackId){}, - WX_SetStatusBarStyle(conf, callbackId){}, - WX_SetUserCloudStorage(conf, callbackId){}, - WX_SetVisualEffectOnCapture(conf, callbackId){}, - WX_ShowActionSheet(conf, callbackId){}, - WX_ShowKeyboard(conf, callbackId){}, - WX_ShowLoading(conf, callbackId){}, - WX_ShowModal(conf, callbackId){}, - WX_ShowShareImageMenu(conf, callbackId){}, - WX_ShowShareMenu(conf, callbackId){}, - WX_ShowToast(conf, callbackId){}, - WX_StartAccelerometer(conf, callbackId){}, - WX_StartBeaconDiscovery(conf, callbackId){}, - WX_StartBluetoothDevicesDiscovery(conf, callbackId){}, - WX_StartCompass(conf, callbackId){}, - WX_StartDeviceMotionListening(conf, callbackId){}, - WX_StopAccelerometer(conf, callbackId){}, - WX_StopBeaconDiscovery(conf, callbackId){}, - WX_StopBluetoothDevicesDiscovery(conf, callbackId){}, - WX_StopCompass(conf, callbackId){}, - WX_StopDeviceMotionListening(conf, callbackId){}, - WX_StopFaceDetect(conf, callbackId){}, - WX_UpdateKeyboard(conf, callbackId){}, - WX_UpdateShareMenu(conf, callbackId){}, - WX_UpdateVoIPChatMuteConfig(conf, callbackId){}, - WX_UpdateWeChatApp(conf, callbackId){}, - WX_VibrateLong(conf, callbackId){}, - WX_VibrateShort(conf, callbackId){}, - WX_WriteBLECharacteristicValue(conf, callbackId){}, - WX_StartGameLive(conf, callbackId){}, - WX_CheckGameLiveEnabled(conf, callbackId){}, - WX_GetUserCurrentGameliveInfo(conf, callbackId){}, - WX_GetUserRecentGameLiveInfo(conf, callbackId){}, - WX_GetUserGameLiveDetails(conf, callbackId){}, - WX_OpenChannelsLiveCollection(conf, callbackId){}, - WX_OpenPage(conf, callbackId){}, - WX_RequestSubscribeLiveActivity(conf, callbackId){}, - WX_OpenBusinessView(conf, callbackId){}, - - WX_ExitPointerLock() {}, - WX_OperateGameRecorderVideo() {}, - WX_RemoveStorageSync() {}, - WX_ReportEvent() {}, - WX_ReportPerformance() {}, - WX_ReportUserBehaviorBranchAnalytics() {}, - WX_RequestPointerLock() {}, - WX_ReserveChannelsLive() {}, - WX_RevokeBufferURL() {}, - WX_SetPreferredFramesPerSecond() {}, - WX_SetStorageSync() {}, - WX_ShareAppMessage() {}, - WX_TriggerGC() {}, - - WX_OnAccelerometerChange() {}, - WX_OffAccelerometerChange() {}, - WX_OnAudioInterruptionBegin() {}, - WX_OffAudioInterruptionBegin() {}, - WX_OnAudioInterruptionEnd() {}, - WX_OffAudioInterruptionEnd() {}, - WX_OnBLEConnectionStateChange() {}, - WX_OffBLEConnectionStateChange() {}, - WX_OnBLEMTUChange() {}, - WX_OffBLEMTUChange() {}, - WX_OnBLEPeripheralConnectionStateChanged() {}, - WX_OffBLEPeripheralConnectionStateChanged() {}, - WX_OnBackgroundFetchData() {}, - WX_OnBeaconServiceChange() {}, - WX_OffBeaconServiceChange() {}, - WX_OnBeaconUpdate() {}, - WX_OffBeaconUpdate() {}, - WX_OnBluetoothAdapterStateChange() {}, - WX_OffBluetoothAdapterStateChange() {}, - WX_OnBluetoothDeviceFound() {}, - WX_OffBluetoothDeviceFound() {}, - WX_OnCompassChange() {}, - WX_OffCompassChange() {}, - WX_OnDeviceMotionChange() {}, - WX_OffDeviceMotionChange() {}, - WX_OnDeviceOrientationChange() {}, - WX_OffDeviceOrientationChange() {}, - WX_OnError() {}, - WX_OffError() {}, - WX_OnHide() {}, - WX_OffHide() {}, - WX_OnInteractiveStorageModified() {}, - WX_OffInteractiveStorageModified() {}, - WX_OnKeyDown() {}, - WX_OffKeyDown() {}, - WX_OnKeyUp() {}, - WX_OffKeyUp() {}, - WX_OnKeyboardComplete() {}, - WX_OffKeyboardComplete() {}, - WX_OnKeyboardConfirm() {}, - WX_OffKeyboardConfirm() {}, - WX_OnKeyboardHeightChange() {}, - WX_OffKeyboardHeightChange() {}, - WX_OnKeyboardInput() {}, - WX_OffKeyboardInput() {}, - WX_OnMemoryWarning() {}, - WX_OffMemoryWarning() {}, - WX_OnMenuButtonBoundingClientRectWeightChange() {}, - WX_OffMenuButtonBoundingClientRectWeightChange() {}, - WX_OnMessage() {}, - WX_OnMouseDown() {}, - WX_OffMouseDown() {}, - WX_OnMouseMove() {}, - WX_OffMouseMove() {}, - WX_OnMouseUp() {}, - WX_OffMouseUp() {}, - WX_OnNetworkStatusChange() {}, - WX_OffNetworkStatusChange() {}, - WX_OnNetworkWeakChange() {}, - WX_OffNetworkWeakChange() {}, - WX_OnScreenRecordingStateChanged() {}, - WX_OffScreenRecordingStateChanged() {}, - WX_OnShareMessageToFriend() {}, - WX_OnShow() {}, - WX_OffShow() {}, - WX_OnUnhandledRejection() {}, - WX_OffUnhandledRejection() {}, - WX_OnUserCaptureScreen() {}, - WX_OffUserCaptureScreen() {}, - WX_OnVoIPChatInterrupted() {}, - WX_OffVoIPChatInterrupted() {}, - WX_OnVoIPChatMembersChanged() {}, - WX_OffVoIPChatMembersChanged() {}, - WX_OnVoIPChatSpeakersChanged() {}, - WX_OffVoIPChatSpeakersChanged() {}, - WX_OnVoIPChatStateChanged() {}, - WX_OffVoIPChatStateChanged() {}, - WX_OnWheel() {}, - WX_OffWheel() {}, - WX_OnWindowResize() {}, - WX_OffWindowResize() {}, - + WX_OneWayFunction(functionName, successType, failType, completeType, conf, callbackId){}, + WX_OneWayNoFunction_v() {}, + WX_OneWayNoFunction_vs() {}, + WX_OneWayNoFunction_vt() {}, + WX_OneWayNoFunction_vst() {}, + WX_OneWayNoFunction_vsn() {}, + WX_OneWayNoFunction_vnns() {}, + WX_OnEventRegister() {}, + WX_OffEventRegister() {}, WX_OnAddToFavorites() {}, WX_OnAddToFavorites_Resolve(conf){}, WX_OffAddToFavorites() {}, @@ -625,118 +402,44 @@ WX_OnGameLiveStateChange_Resolve(conf){}, WX_OffGameLiveStateChange() {}, - WX_SetHandoffQuery(query){ + WX_SyncFunction_t() { return ""; }, - WX_GetAccountInfoSync(){ - return JSON.stringify({}); - }, - WX_GetAppAuthorizeSetting(){ - return JSON.stringify({}); - }, - WX_GetAppBaseInfo(){ - return JSON.stringify({}); - }, - WX_GetBatteryInfoSync(){ - return JSON.stringify({}); - }, - WX_GetDeviceInfo(){ - return JSON.stringify({}); - }, - WX_GetEnterOptionsSync(){ - return JSON.stringify({}); - }, - WX_GetExptInfoSync(keys){ - return JSON.stringify({}); - }, - WX_GetExtConfigSync(){ - return JSON.stringify({}); - }, - WX_GetLaunchOptionsSync(){ - return JSON.stringify({}); - }, - WX_GetMenuButtonBoundingClientRect(){ - return JSON.stringify({}); - }, - WX_GetStorageInfoSync(){ - return JSON.stringify({}); - }, - WX_GetSystemInfoSync(){ - return JSON.stringify({}); - }, - WX_GetSystemSetting(){ - return JSON.stringify({}); - }, - WX_GetWindowInfo(){ - return JSON.stringify({}); - }, - WX_CreateImageData(width, height){ - return JSON.stringify({}); - }, - WX_CreatePath2D(){ - return JSON.stringify({}); - }, - WX_IsPointerLocked(){ + WX_SyncFunction_tt() { return ""; }, - WX_IsVKSupport(version){ + WX_SyncFunction_bt() { + return false; + }, + WX_SyncFunction_nt() { + return 0; + }, + WX_SyncFunction_bs() { + return false; + }, + WX_SyncFunction_b() { + return false; + }, + WX_SyncFunction_bsnn() { + return false; + }, + WX_SyncFunction_ss() { return ""; }, - WX_SetCursor(path, x, y){ + WX_SyncFunction_tnn() { return ""; }, - WX_SetMessageToFriendQuery(option){ + WX_ClassFunction() {return ""}, + WX_ClassOneWayFunction() {return ""}, + WX_ClassSetProperty() {}, + WX_ClassOneWayNoFunction_v() {}, + WX_ClassOneWayNoFunction_vs() {}, + WX_ClassOneWayNoFunction_t() { return ""; }, - WX_GetTextLineHeight(option){ - return ""; - }, - WX_LoadFont(path){ - return ""; - }, - WX_GetGameLiveState(){ - return JSON.stringify({}); - }, - - WX_DownloadFile() {return ""}, - WX_CreateFeedbackButton() {return ""}, - WX_GetLogManager() {return ""}, - WX_GetRealtimeLogManager() {return ""}, - WX_GetUpdateManager() {return ""}, - WX_CreateVideoDecoder() {return ""}, - - WX_DownloadTaskAbort() {}, - WX_DownloadTaskOffHeadersReceived() {}, - WX_DownloadTaskOffProgressUpdate() {}, - WX_DownloadTaskOnHeadersReceived() {}, - WX_DownloadTaskOnProgressUpdate() {}, - WXFeedbackButtonSetProperty() {}, - WX_FeedbackButtonDestroy() {}, - WX_FeedbackButtonHide() {}, - WX_FeedbackButtonOffTap() {}, - WX_FeedbackButtonOnTap() {}, - WX_FeedbackButtonShow() {}, - WX_LogManagerDebug() {}, - WX_LogManagerInfo() {}, - WX_LogManagerLog() {}, - WX_LogManagerWarn() {}, - WX_RealtimeLogManagerAddFilterMsg() {}, - WX_RealtimeLogManagerError() {}, - WX_RealtimeLogManagerInfo() {}, - WX_RealtimeLogManagerSetFilterMsg() {}, - WX_RealtimeLogManagerWarn() {}, - WX_UpdateManagerApplyUpdate() {}, - WX_UpdateManagerOnCheckForUpdate() {}, - WX_UpdateManagerOnUpdateFailed() {}, - WX_UpdateManagerOnUpdateReady() {}, - WX_VideoDecoderGetFrameData() {}, - WX_VideoDecoderRemove() {}, - WX_VideoDecoderSeek() {}, - WX_VideoDecoderStart() {}, - WX_VideoDecoderStop() {}, - WX_VideoDecoderOff() {}, - WX_VideoDecoderOn() {}, - }; + WX_ClassOneWayNoFunction_vt() {}, + WX_ClassOnEventFunction() {}, + WX_ClassOffEventFunction() {}, }; var downloadedTextures = {}; var downloadingTextures = {}; var textureHandler = { diff --git a/WebGLTemplates/WXTemplate2020/index.html b/WebGLTemplates/WXTemplate2020/index.html index a114e0db..303c6b61 100644 --- a/WebGLTemplates/WXTemplate2020/index.html +++ b/WebGLTemplates/WXTemplate2020/index.html @@ -449,238 +449,15 @@ WX_CloudDeleteFile() {}, WX_CloudCDN() {}, WXLaunchOperaBridge() {}, - WX_AddCard(conf, callbackId){}, - WX_AuthPrivateMessage(conf, callbackId){}, - WX_Authorize(conf, callbackId){}, - WX_CheckIsAddedToMyMiniProgram(conf, callbackId){}, - WX_CheckSession(conf, callbackId){}, - WX_ChooseImage(conf, callbackId){}, - WX_ChooseMedia(conf, callbackId){}, - WX_ChooseMessageFile(conf, callbackId){}, - WX_CloseBLEConnection(conf, callbackId){}, - WX_CloseBluetoothAdapter(conf, callbackId){}, - WX_CompressImage(conf, callbackId){}, - WX_CreateBLEConnection(conf, callbackId){}, - WX_CreateBLEPeripheralServer(conf, callbackId){}, - WX_ExitMiniProgram(conf, callbackId){}, - WX_ExitVoIPChat(conf, callbackId){}, - WX_FaceDetect(conf, callbackId){}, - WX_GetAvailableAudioSources(conf, callbackId){}, - WX_GetBLEDeviceCharacteristics(conf, callbackId){}, - WX_GetBLEDeviceRSSI(conf, callbackId){}, - WX_GetBLEDeviceServices(conf, callbackId){}, - WX_GetBLEMTU(conf, callbackId){}, - WX_GetBackgroundFetchData(conf, callbackId){}, - WX_GetBackgroundFetchToken(conf, callbackId){}, - WX_GetBatteryInfo(conf, callbackId){}, - WX_GetBeacons(conf, callbackId){}, - WX_GetBluetoothAdapterState(conf, callbackId){}, - WX_GetBluetoothDevices(conf, callbackId){}, - WX_GetChannelsLiveInfo(conf, callbackId){}, - WX_GetChannelsLiveNoticeInfo(conf, callbackId){}, - WX_GetClipboardData(conf, callbackId){}, - WX_GetConnectedBluetoothDevices(conf, callbackId){}, - WX_GetDeviceBenchmarkInfo(conf, callbackId){}, - WX_GetExtConfig(conf, callbackId){}, - WX_GetFuzzyLocation(conf, callbackId){}, - WX_GetGameClubData(conf, callbackId){}, - WX_GetGroupEnterInfo(conf, callbackId){}, - WX_GetInferenceEnvInfo(conf, callbackId){}, - WX_GetLocalIPAddress(conf, callbackId){}, - WX_GetNetworkType(conf, callbackId){}, - WX_GetPrivacySetting(conf, callbackId){}, - WX_GetScreenBrightness(conf, callbackId){}, - WX_GetScreenRecordingState(conf, callbackId){}, - WX_GetSetting(conf, callbackId){}, - WX_GetShareInfo(conf, callbackId){}, - WX_GetStorageInfo(conf, callbackId){}, - WX_GetSystemInfo(conf, callbackId){}, - WX_GetSystemInfoAsync(conf, callbackId){}, - WX_GetUserInfo(conf, callbackId){}, - WX_GetUserInteractiveStorage(conf, callbackId){}, - WX_GetWeRunData(conf, callbackId){}, - WX_HideKeyboard(conf, callbackId){}, - WX_HideLoading(conf, callbackId){}, - WX_HideShareMenu(conf, callbackId){}, - WX_HideToast(conf, callbackId){}, - WX_InitFaceDetect(conf, callbackId){}, - WX_IsBluetoothDevicePaired(conf, callbackId){}, - WX_JoinVoIPChat(conf, callbackId){}, - WX_Login(conf, callbackId){}, - WX_MakeBluetoothPair(conf, callbackId){}, - WX_NavigateToMiniProgram(conf, callbackId){}, - WX_NotifyBLECharacteristicValueChange(conf, callbackId){}, - WX_OpenAppAuthorizeSetting(conf, callbackId){}, - WX_OpenBluetoothAdapter(conf, callbackId){}, - WX_OpenCard(conf, callbackId){}, - WX_OpenChannelsActivity(conf, callbackId){}, - WX_OpenChannelsEvent(conf, callbackId){}, - WX_OpenChannelsLive(conf, callbackId){}, - WX_OpenChannelsUserProfile(conf, callbackId){}, - WX_OpenCustomerServiceChat(conf, callbackId){}, - WX_OpenCustomerServiceConversation(conf, callbackId){}, - WX_OpenPrivacyContract(conf, callbackId){}, - WX_OpenSetting(conf, callbackId){}, - WX_OpenSystemBluetoothSetting(conf, callbackId){}, - WX_PreviewImage(conf, callbackId){}, - WX_PreviewMedia(conf, callbackId){}, - WX_ReadBLECharacteristicValue(conf, callbackId){}, - WX_RemoveStorage(conf, callbackId){}, - WX_RemoveUserCloudStorage(conf, callbackId){}, - WX_ReportScene(conf, callbackId){}, - WX_RequestMidasFriendPayment(conf, callbackId){}, - WX_RequestMidasPayment(conf, callbackId){}, - WX_RequestMidasPaymentGameItem(conf, callbackId){}, - WX_RequestSubscribeMessage(conf, callbackId){}, - WX_RequestSubscribeSystemMessage(conf, callbackId){}, - WX_RequirePrivacyAuthorize(conf, callbackId){}, - WX_RestartMiniProgram(conf, callbackId){}, - WX_SaveFileToDisk(conf, callbackId){}, - WX_SaveImageToPhotosAlbum(conf, callbackId){}, - WX_ScanCode(conf, callbackId){}, - WX_SetBLEMTU(conf, callbackId){}, - WX_SetBackgroundFetchToken(conf, callbackId){}, - WX_SetClipboardData(conf, callbackId){}, - WX_SetDeviceOrientation(conf, callbackId){}, - WX_SetEnableDebug(conf, callbackId){}, - WX_SetInnerAudioOption(conf, callbackId){}, - WX_SetKeepScreenOn(conf, callbackId){}, - WX_SetMenuStyle(conf, callbackId){}, - WX_SetScreenBrightness(conf, callbackId){}, - WX_SetStatusBarStyle(conf, callbackId){}, - WX_SetUserCloudStorage(conf, callbackId){}, - WX_SetVisualEffectOnCapture(conf, callbackId){}, - WX_ShowActionSheet(conf, callbackId){}, - WX_ShowKeyboard(conf, callbackId){}, - WX_ShowLoading(conf, callbackId){}, - WX_ShowModal(conf, callbackId){}, - WX_ShowShareImageMenu(conf, callbackId){}, - WX_ShowShareMenu(conf, callbackId){}, - WX_ShowToast(conf, callbackId){}, - WX_StartAccelerometer(conf, callbackId){}, - WX_StartBeaconDiscovery(conf, callbackId){}, - WX_StartBluetoothDevicesDiscovery(conf, callbackId){}, - WX_StartCompass(conf, callbackId){}, - WX_StartDeviceMotionListening(conf, callbackId){}, - WX_StopAccelerometer(conf, callbackId){}, - WX_StopBeaconDiscovery(conf, callbackId){}, - WX_StopBluetoothDevicesDiscovery(conf, callbackId){}, - WX_StopCompass(conf, callbackId){}, - WX_StopDeviceMotionListening(conf, callbackId){}, - WX_StopFaceDetect(conf, callbackId){}, - WX_UpdateKeyboard(conf, callbackId){}, - WX_UpdateShareMenu(conf, callbackId){}, - WX_UpdateVoIPChatMuteConfig(conf, callbackId){}, - WX_UpdateWeChatApp(conf, callbackId){}, - WX_VibrateLong(conf, callbackId){}, - WX_VibrateShort(conf, callbackId){}, - WX_WriteBLECharacteristicValue(conf, callbackId){}, - WX_StartGameLive(conf, callbackId){}, - WX_CheckGameLiveEnabled(conf, callbackId){}, - WX_GetUserCurrentGameliveInfo(conf, callbackId){}, - WX_GetUserRecentGameLiveInfo(conf, callbackId){}, - WX_GetUserGameLiveDetails(conf, callbackId){}, - WX_OpenChannelsLiveCollection(conf, callbackId){}, - WX_OpenPage(conf, callbackId){}, - WX_RequestSubscribeLiveActivity(conf, callbackId){}, - WX_OpenBusinessView(conf, callbackId){}, - - WX_ExitPointerLock() {}, - WX_OperateGameRecorderVideo() {}, - WX_RemoveStorageSync() {}, - WX_ReportEvent() {}, - WX_ReportPerformance() {}, - WX_ReportUserBehaviorBranchAnalytics() {}, - WX_RequestPointerLock() {}, - WX_ReserveChannelsLive() {}, - WX_RevokeBufferURL() {}, - WX_SetPreferredFramesPerSecond() {}, - WX_SetStorageSync() {}, - WX_ShareAppMessage() {}, - WX_TriggerGC() {}, - - WX_OnAccelerometerChange() {}, - WX_OffAccelerometerChange() {}, - WX_OnAudioInterruptionBegin() {}, - WX_OffAudioInterruptionBegin() {}, - WX_OnAudioInterruptionEnd() {}, - WX_OffAudioInterruptionEnd() {}, - WX_OnBLEConnectionStateChange() {}, - WX_OffBLEConnectionStateChange() {}, - WX_OnBLEMTUChange() {}, - WX_OffBLEMTUChange() {}, - WX_OnBLEPeripheralConnectionStateChanged() {}, - WX_OffBLEPeripheralConnectionStateChanged() {}, - WX_OnBackgroundFetchData() {}, - WX_OnBeaconServiceChange() {}, - WX_OffBeaconServiceChange() {}, - WX_OnBeaconUpdate() {}, - WX_OffBeaconUpdate() {}, - WX_OnBluetoothAdapterStateChange() {}, - WX_OffBluetoothAdapterStateChange() {}, - WX_OnBluetoothDeviceFound() {}, - WX_OffBluetoothDeviceFound() {}, - WX_OnCompassChange() {}, - WX_OffCompassChange() {}, - WX_OnDeviceMotionChange() {}, - WX_OffDeviceMotionChange() {}, - WX_OnDeviceOrientationChange() {}, - WX_OffDeviceOrientationChange() {}, - WX_OnError() {}, - WX_OffError() {}, - WX_OnHide() {}, - WX_OffHide() {}, - WX_OnInteractiveStorageModified() {}, - WX_OffInteractiveStorageModified() {}, - WX_OnKeyDown() {}, - WX_OffKeyDown() {}, - WX_OnKeyUp() {}, - WX_OffKeyUp() {}, - WX_OnKeyboardComplete() {}, - WX_OffKeyboardComplete() {}, - WX_OnKeyboardConfirm() {}, - WX_OffKeyboardConfirm() {}, - WX_OnKeyboardHeightChange() {}, - WX_OffKeyboardHeightChange() {}, - WX_OnKeyboardInput() {}, - WX_OffKeyboardInput() {}, - WX_OnMemoryWarning() {}, - WX_OffMemoryWarning() {}, - WX_OnMenuButtonBoundingClientRectWeightChange() {}, - WX_OffMenuButtonBoundingClientRectWeightChange() {}, - WX_OnMessage() {}, - WX_OnMouseDown() {}, - WX_OffMouseDown() {}, - WX_OnMouseMove() {}, - WX_OffMouseMove() {}, - WX_OnMouseUp() {}, - WX_OffMouseUp() {}, - WX_OnNetworkStatusChange() {}, - WX_OffNetworkStatusChange() {}, - WX_OnNetworkWeakChange() {}, - WX_OffNetworkWeakChange() {}, - WX_OnScreenRecordingStateChanged() {}, - WX_OffScreenRecordingStateChanged() {}, - WX_OnShareMessageToFriend() {}, - WX_OnShow() {}, - WX_OffShow() {}, - WX_OnUnhandledRejection() {}, - WX_OffUnhandledRejection() {}, - WX_OnUserCaptureScreen() {}, - WX_OffUserCaptureScreen() {}, - WX_OnVoIPChatInterrupted() {}, - WX_OffVoIPChatInterrupted() {}, - WX_OnVoIPChatMembersChanged() {}, - WX_OffVoIPChatMembersChanged() {}, - WX_OnVoIPChatSpeakersChanged() {}, - WX_OffVoIPChatSpeakersChanged() {}, - WX_OnVoIPChatStateChanged() {}, - WX_OffVoIPChatStateChanged() {}, - WX_OnWheel() {}, - WX_OffWheel() {}, - WX_OnWindowResize() {}, - WX_OffWindowResize() {}, - + WX_OneWayFunction(functionName, successType, failType, completeType, conf, callbackId){}, + WX_OneWayNoFunction_v() {}, + WX_OneWayNoFunction_vs() {}, + WX_OneWayNoFunction_vt() {}, + WX_OneWayNoFunction_vst() {}, + WX_OneWayNoFunction_vsn() {}, + WX_OneWayNoFunction_vnns() {}, + WX_OnEventRegister() {}, + WX_OffEventRegister() {}, WX_OnAddToFavorites() {}, WX_OnAddToFavorites_Resolve(conf){}, WX_OffAddToFavorites() {}, @@ -697,118 +474,44 @@ WX_OnGameLiveStateChange_Resolve(conf){}, WX_OffGameLiveStateChange() {}, - WX_SetHandoffQuery(query){ + WX_SyncFunction_t() { return ""; }, - WX_GetAccountInfoSync(){ - return JSON.stringify({}); - }, - WX_GetAppAuthorizeSetting(){ - return JSON.stringify({}); - }, - WX_GetAppBaseInfo(){ - return JSON.stringify({}); - }, - WX_GetBatteryInfoSync(){ - return JSON.stringify({}); - }, - WX_GetDeviceInfo(){ - return JSON.stringify({}); - }, - WX_GetEnterOptionsSync(){ - return JSON.stringify({}); - }, - WX_GetExptInfoSync(keys){ - return JSON.stringify({}); - }, - WX_GetExtConfigSync(){ - return JSON.stringify({}); - }, - WX_GetLaunchOptionsSync(){ - return JSON.stringify({}); - }, - WX_GetMenuButtonBoundingClientRect(){ - return JSON.stringify({}); - }, - WX_GetStorageInfoSync(){ - return JSON.stringify({}); - }, - WX_GetSystemInfoSync(){ - return JSON.stringify({}); - }, - WX_GetSystemSetting(){ - return JSON.stringify({}); - }, - WX_GetWindowInfo(){ - return JSON.stringify({}); - }, - WX_CreateImageData(width, height){ - return JSON.stringify({}); - }, - WX_CreatePath2D(){ - return JSON.stringify({}); - }, - WX_IsPointerLocked(){ + WX_SyncFunction_tt() { return ""; }, - WX_IsVKSupport(version){ + WX_SyncFunction_bt() { + return false; + }, + WX_SyncFunction_nt() { + return 0; + }, + WX_SyncFunction_bs() { + return false; + }, + WX_SyncFunction_b() { + return false; + }, + WX_SyncFunction_bsnn() { + return false; + }, + WX_SyncFunction_ss() { return ""; }, - WX_SetCursor(path, x, y){ + WX_SyncFunction_tnn() { return ""; }, - WX_SetMessageToFriendQuery(option){ + WX_ClassFunction() {return ""}, + WX_ClassOneWayFunction() {return ""}, + WX_ClassSetProperty() {}, + WX_ClassOneWayNoFunction_v() {}, + WX_ClassOneWayNoFunction_vs() {}, + WX_ClassOneWayNoFunction_t() { return ""; }, - WX_GetTextLineHeight(option){ - return ""; - }, - WX_LoadFont(path){ - return ""; - }, - WX_GetGameLiveState(){ - return JSON.stringify({}); - }, - - WX_DownloadFile() {return ""}, - WX_CreateFeedbackButton() {return ""}, - WX_GetLogManager() {return ""}, - WX_GetRealtimeLogManager() {return ""}, - WX_GetUpdateManager() {return ""}, - WX_CreateVideoDecoder() {return ""}, - - WX_DownloadTaskAbort() {}, - WX_DownloadTaskOffHeadersReceived() {}, - WX_DownloadTaskOffProgressUpdate() {}, - WX_DownloadTaskOnHeadersReceived() {}, - WX_DownloadTaskOnProgressUpdate() {}, - WXFeedbackButtonSetProperty() {}, - WX_FeedbackButtonDestroy() {}, - WX_FeedbackButtonHide() {}, - WX_FeedbackButtonOffTap() {}, - WX_FeedbackButtonOnTap() {}, - WX_FeedbackButtonShow() {}, - WX_LogManagerDebug() {}, - WX_LogManagerInfo() {}, - WX_LogManagerLog() {}, - WX_LogManagerWarn() {}, - WX_RealtimeLogManagerAddFilterMsg() {}, - WX_RealtimeLogManagerError() {}, - WX_RealtimeLogManagerInfo() {}, - WX_RealtimeLogManagerSetFilterMsg() {}, - WX_RealtimeLogManagerWarn() {}, - WX_UpdateManagerApplyUpdate() {}, - WX_UpdateManagerOnCheckForUpdate() {}, - WX_UpdateManagerOnUpdateFailed() {}, - WX_UpdateManagerOnUpdateReady() {}, - WX_VideoDecoderGetFrameData() {}, - WX_VideoDecoderRemove() {}, - WX_VideoDecoderSeek() {}, - WX_VideoDecoderStart() {}, - WX_VideoDecoderStop() {}, - WX_VideoDecoderOff() {}, - WX_VideoDecoderOn() {}, - }; + WX_ClassOneWayNoFunction_vt() {}, + WX_ClassOnEventFunction() {}, + WX_ClassOffEventFunction() {}, }; var downloadedTextures = {}; var downloadingTextures = {}; var textureHandler = { diff --git a/WebGLTemplates/WXTemplate2022/index.html b/WebGLTemplates/WXTemplate2022/index.html index 72adfa2a..2b4f9534 100755 --- a/WebGLTemplates/WXTemplate2022/index.html +++ b/WebGLTemplates/WXTemplate2022/index.html @@ -526,238 +526,15 @@ WX_CloudDeleteFile() {}, WX_CloudCDN() {}, WXLaunchOperaBridge() {}, - WX_AddCard(conf, callbackId){}, - WX_AuthPrivateMessage(conf, callbackId){}, - WX_Authorize(conf, callbackId){}, - WX_CheckIsAddedToMyMiniProgram(conf, callbackId){}, - WX_CheckSession(conf, callbackId){}, - WX_ChooseImage(conf, callbackId){}, - WX_ChooseMedia(conf, callbackId){}, - WX_ChooseMessageFile(conf, callbackId){}, - WX_CloseBLEConnection(conf, callbackId){}, - WX_CloseBluetoothAdapter(conf, callbackId){}, - WX_CompressImage(conf, callbackId){}, - WX_CreateBLEConnection(conf, callbackId){}, - WX_CreateBLEPeripheralServer(conf, callbackId){}, - WX_ExitMiniProgram(conf, callbackId){}, - WX_ExitVoIPChat(conf, callbackId){}, - WX_FaceDetect(conf, callbackId){}, - WX_GetAvailableAudioSources(conf, callbackId){}, - WX_GetBLEDeviceCharacteristics(conf, callbackId){}, - WX_GetBLEDeviceRSSI(conf, callbackId){}, - WX_GetBLEDeviceServices(conf, callbackId){}, - WX_GetBLEMTU(conf, callbackId){}, - WX_GetBackgroundFetchData(conf, callbackId){}, - WX_GetBackgroundFetchToken(conf, callbackId){}, - WX_GetBatteryInfo(conf, callbackId){}, - WX_GetBeacons(conf, callbackId){}, - WX_GetBluetoothAdapterState(conf, callbackId){}, - WX_GetBluetoothDevices(conf, callbackId){}, - WX_GetChannelsLiveInfo(conf, callbackId){}, - WX_GetChannelsLiveNoticeInfo(conf, callbackId){}, - WX_GetClipboardData(conf, callbackId){}, - WX_GetConnectedBluetoothDevices(conf, callbackId){}, - WX_GetDeviceBenchmarkInfo(conf, callbackId){}, - WX_GetExtConfig(conf, callbackId){}, - WX_GetFuzzyLocation(conf, callbackId){}, - WX_GetGameClubData(conf, callbackId){}, - WX_GetGroupEnterInfo(conf, callbackId){}, - WX_GetInferenceEnvInfo(conf, callbackId){}, - WX_GetLocalIPAddress(conf, callbackId){}, - WX_GetNetworkType(conf, callbackId){}, - WX_GetPrivacySetting(conf, callbackId){}, - WX_GetScreenBrightness(conf, callbackId){}, - WX_GetScreenRecordingState(conf, callbackId){}, - WX_GetSetting(conf, callbackId){}, - WX_GetShareInfo(conf, callbackId){}, - WX_GetStorageInfo(conf, callbackId){}, - WX_GetSystemInfo(conf, callbackId){}, - WX_GetSystemInfoAsync(conf, callbackId){}, - WX_GetUserInfo(conf, callbackId){}, - WX_GetUserInteractiveStorage(conf, callbackId){}, - WX_GetWeRunData(conf, callbackId){}, - WX_HideKeyboard(conf, callbackId){}, - WX_HideLoading(conf, callbackId){}, - WX_HideShareMenu(conf, callbackId){}, - WX_HideToast(conf, callbackId){}, - WX_InitFaceDetect(conf, callbackId){}, - WX_IsBluetoothDevicePaired(conf, callbackId){}, - WX_JoinVoIPChat(conf, callbackId){}, - WX_Login(conf, callbackId){}, - WX_MakeBluetoothPair(conf, callbackId){}, - WX_NavigateToMiniProgram(conf, callbackId){}, - WX_NotifyBLECharacteristicValueChange(conf, callbackId){}, - WX_OpenAppAuthorizeSetting(conf, callbackId){}, - WX_OpenBluetoothAdapter(conf, callbackId){}, - WX_OpenCard(conf, callbackId){}, - WX_OpenChannelsActivity(conf, callbackId){}, - WX_OpenChannelsEvent(conf, callbackId){}, - WX_OpenChannelsLive(conf, callbackId){}, - WX_OpenChannelsUserProfile(conf, callbackId){}, - WX_OpenCustomerServiceChat(conf, callbackId){}, - WX_OpenCustomerServiceConversation(conf, callbackId){}, - WX_OpenPrivacyContract(conf, callbackId){}, - WX_OpenSetting(conf, callbackId){}, - WX_OpenSystemBluetoothSetting(conf, callbackId){}, - WX_PreviewImage(conf, callbackId){}, - WX_PreviewMedia(conf, callbackId){}, - WX_ReadBLECharacteristicValue(conf, callbackId){}, - WX_RemoveStorage(conf, callbackId){}, - WX_RemoveUserCloudStorage(conf, callbackId){}, - WX_ReportScene(conf, callbackId){}, - WX_RequestMidasFriendPayment(conf, callbackId){}, - WX_RequestMidasPayment(conf, callbackId){}, - WX_RequestMidasPaymentGameItem(conf, callbackId){}, - WX_RequestSubscribeMessage(conf, callbackId){}, - WX_RequestSubscribeSystemMessage(conf, callbackId){}, - WX_RequirePrivacyAuthorize(conf, callbackId){}, - WX_RestartMiniProgram(conf, callbackId){}, - WX_SaveFileToDisk(conf, callbackId){}, - WX_SaveImageToPhotosAlbum(conf, callbackId){}, - WX_ScanCode(conf, callbackId){}, - WX_SetBLEMTU(conf, callbackId){}, - WX_SetBackgroundFetchToken(conf, callbackId){}, - WX_SetClipboardData(conf, callbackId){}, - WX_SetDeviceOrientation(conf, callbackId){}, - WX_SetEnableDebug(conf, callbackId){}, - WX_SetInnerAudioOption(conf, callbackId){}, - WX_SetKeepScreenOn(conf, callbackId){}, - WX_SetMenuStyle(conf, callbackId){}, - WX_SetScreenBrightness(conf, callbackId){}, - WX_SetStatusBarStyle(conf, callbackId){}, - WX_SetUserCloudStorage(conf, callbackId){}, - WX_SetVisualEffectOnCapture(conf, callbackId){}, - WX_ShowActionSheet(conf, callbackId){}, - WX_ShowKeyboard(conf, callbackId){}, - WX_ShowLoading(conf, callbackId){}, - WX_ShowModal(conf, callbackId){}, - WX_ShowShareImageMenu(conf, callbackId){}, - WX_ShowShareMenu(conf, callbackId){}, - WX_ShowToast(conf, callbackId){}, - WX_StartAccelerometer(conf, callbackId){}, - WX_StartBeaconDiscovery(conf, callbackId){}, - WX_StartBluetoothDevicesDiscovery(conf, callbackId){}, - WX_StartCompass(conf, callbackId){}, - WX_StartDeviceMotionListening(conf, callbackId){}, - WX_StopAccelerometer(conf, callbackId){}, - WX_StopBeaconDiscovery(conf, callbackId){}, - WX_StopBluetoothDevicesDiscovery(conf, callbackId){}, - WX_StopCompass(conf, callbackId){}, - WX_StopDeviceMotionListening(conf, callbackId){}, - WX_StopFaceDetect(conf, callbackId){}, - WX_UpdateKeyboard(conf, callbackId){}, - WX_UpdateShareMenu(conf, callbackId){}, - WX_UpdateVoIPChatMuteConfig(conf, callbackId){}, - WX_UpdateWeChatApp(conf, callbackId){}, - WX_VibrateLong(conf, callbackId){}, - WX_VibrateShort(conf, callbackId){}, - WX_WriteBLECharacteristicValue(conf, callbackId){}, - WX_StartGameLive(conf, callbackId){}, - WX_CheckGameLiveEnabled(conf, callbackId){}, - WX_GetUserCurrentGameliveInfo(conf, callbackId){}, - WX_GetUserRecentGameLiveInfo(conf, callbackId){}, - WX_GetUserGameLiveDetails(conf, callbackId){}, - WX_OpenChannelsLiveCollection(conf, callbackId){}, - WX_OpenPage(conf, callbackId){}, - WX_RequestSubscribeLiveActivity(conf, callbackId){}, - WX_OpenBusinessView(conf, callbackId){}, - - WX_ExitPointerLock() {}, - WX_OperateGameRecorderVideo() {}, - WX_RemoveStorageSync() {}, - WX_ReportEvent() {}, - WX_ReportPerformance() {}, - WX_ReportUserBehaviorBranchAnalytics() {}, - WX_RequestPointerLock() {}, - WX_ReserveChannelsLive() {}, - WX_RevokeBufferURL() {}, - WX_SetPreferredFramesPerSecond() {}, - WX_SetStorageSync() {}, - WX_ShareAppMessage() {}, - WX_TriggerGC() {}, - - WX_OnAccelerometerChange() {}, - WX_OffAccelerometerChange() {}, - WX_OnAudioInterruptionBegin() {}, - WX_OffAudioInterruptionBegin() {}, - WX_OnAudioInterruptionEnd() {}, - WX_OffAudioInterruptionEnd() {}, - WX_OnBLEConnectionStateChange() {}, - WX_OffBLEConnectionStateChange() {}, - WX_OnBLEMTUChange() {}, - WX_OffBLEMTUChange() {}, - WX_OnBLEPeripheralConnectionStateChanged() {}, - WX_OffBLEPeripheralConnectionStateChanged() {}, - WX_OnBackgroundFetchData() {}, - WX_OnBeaconServiceChange() {}, - WX_OffBeaconServiceChange() {}, - WX_OnBeaconUpdate() {}, - WX_OffBeaconUpdate() {}, - WX_OnBluetoothAdapterStateChange() {}, - WX_OffBluetoothAdapterStateChange() {}, - WX_OnBluetoothDeviceFound() {}, - WX_OffBluetoothDeviceFound() {}, - WX_OnCompassChange() {}, - WX_OffCompassChange() {}, - WX_OnDeviceMotionChange() {}, - WX_OffDeviceMotionChange() {}, - WX_OnDeviceOrientationChange() {}, - WX_OffDeviceOrientationChange() {}, - WX_OnError() {}, - WX_OffError() {}, - WX_OnHide() {}, - WX_OffHide() {}, - WX_OnInteractiveStorageModified() {}, - WX_OffInteractiveStorageModified() {}, - WX_OnKeyDown() {}, - WX_OffKeyDown() {}, - WX_OnKeyUp() {}, - WX_OffKeyUp() {}, - WX_OnKeyboardComplete() {}, - WX_OffKeyboardComplete() {}, - WX_OnKeyboardConfirm() {}, - WX_OffKeyboardConfirm() {}, - WX_OnKeyboardHeightChange() {}, - WX_OffKeyboardHeightChange() {}, - WX_OnKeyboardInput() {}, - WX_OffKeyboardInput() {}, - WX_OnMemoryWarning() {}, - WX_OffMemoryWarning() {}, - WX_OnMenuButtonBoundingClientRectWeightChange() {}, - WX_OffMenuButtonBoundingClientRectWeightChange() {}, - WX_OnMessage() {}, - WX_OnMouseDown() {}, - WX_OffMouseDown() {}, - WX_OnMouseMove() {}, - WX_OffMouseMove() {}, - WX_OnMouseUp() {}, - WX_OffMouseUp() {}, - WX_OnNetworkStatusChange() {}, - WX_OffNetworkStatusChange() {}, - WX_OnNetworkWeakChange() {}, - WX_OffNetworkWeakChange() {}, - WX_OnScreenRecordingStateChanged() {}, - WX_OffScreenRecordingStateChanged() {}, - WX_OnShareMessageToFriend() {}, - WX_OnShow() {}, - WX_OffShow() {}, - WX_OnUnhandledRejection() {}, - WX_OffUnhandledRejection() {}, - WX_OnUserCaptureScreen() {}, - WX_OffUserCaptureScreen() {}, - WX_OnVoIPChatInterrupted() {}, - WX_OffVoIPChatInterrupted() {}, - WX_OnVoIPChatMembersChanged() {}, - WX_OffVoIPChatMembersChanged() {}, - WX_OnVoIPChatSpeakersChanged() {}, - WX_OffVoIPChatSpeakersChanged() {}, - WX_OnVoIPChatStateChanged() {}, - WX_OffVoIPChatStateChanged() {}, - WX_OnWheel() {}, - WX_OffWheel() {}, - WX_OnWindowResize() {}, - WX_OffWindowResize() {}, - + WX_OneWayFunction(functionName, successType, failType, completeType, conf, callbackId){}, + WX_OneWayNoFunction_v() {}, + WX_OneWayNoFunction_vs() {}, + WX_OneWayNoFunction_vt() {}, + WX_OneWayNoFunction_vst() {}, + WX_OneWayNoFunction_vsn() {}, + WX_OneWayNoFunction_vnns() {}, + WX_OnEventRegister() {}, + WX_OffEventRegister() {}, WX_OnAddToFavorites() {}, WX_OnAddToFavorites_Resolve(conf){}, WX_OffAddToFavorites() {}, @@ -774,118 +551,44 @@ WX_OnGameLiveStateChange_Resolve(conf){}, WX_OffGameLiveStateChange() {}, - WX_SetHandoffQuery(query){ + WX_SyncFunction_t() { return ""; }, - WX_GetAccountInfoSync(){ - return JSON.stringify({}); - }, - WX_GetAppAuthorizeSetting(){ - return JSON.stringify({}); - }, - WX_GetAppBaseInfo(){ - return JSON.stringify({}); - }, - WX_GetBatteryInfoSync(){ - return JSON.stringify({}); - }, - WX_GetDeviceInfo(){ - return JSON.stringify({}); - }, - WX_GetEnterOptionsSync(){ - return JSON.stringify({}); - }, - WX_GetExptInfoSync(keys){ - return JSON.stringify({}); - }, - WX_GetExtConfigSync(){ - return JSON.stringify({}); - }, - WX_GetLaunchOptionsSync(){ - return JSON.stringify({}); - }, - WX_GetMenuButtonBoundingClientRect(){ - return JSON.stringify({}); - }, - WX_GetStorageInfoSync(){ - return JSON.stringify({}); - }, - WX_GetSystemInfoSync(){ - return JSON.stringify({}); - }, - WX_GetSystemSetting(){ - return JSON.stringify({}); - }, - WX_GetWindowInfo(){ - return JSON.stringify({}); - }, - WX_CreateImageData(width, height){ - return JSON.stringify({}); - }, - WX_CreatePath2D(){ - return JSON.stringify({}); - }, - WX_IsPointerLocked(){ + WX_SyncFunction_tt() { return ""; }, - WX_IsVKSupport(version){ + WX_SyncFunction_bt() { + return false; + }, + WX_SyncFunction_nt() { + return 0; + }, + WX_SyncFunction_bs() { + return false; + }, + WX_SyncFunction_b() { + return false; + }, + WX_SyncFunction_bsnn() { + return false; + }, + WX_SyncFunction_ss() { return ""; }, - WX_SetCursor(path, x, y){ + WX_SyncFunction_tnn() { return ""; }, - WX_SetMessageToFriendQuery(option){ + WX_ClassFunction() {return ""}, + WX_ClassOneWayFunction() {return ""}, + WX_ClassSetProperty() {}, + WX_ClassOneWayNoFunction_v() {}, + WX_ClassOneWayNoFunction_vs() {}, + WX_ClassOneWayNoFunction_t() { return ""; }, - WX_GetTextLineHeight(option){ - return ""; - }, - WX_LoadFont(path){ - return ""; - }, - WX_GetGameLiveState(){ - return JSON.stringify({}); - }, - - WX_DownloadFile() {return ""}, - WX_CreateFeedbackButton() {return ""}, - WX_GetLogManager() {return ""}, - WX_GetRealtimeLogManager() {return ""}, - WX_GetUpdateManager() {return ""}, - WX_CreateVideoDecoder() {return ""}, - - WX_DownloadTaskAbort() {}, - WX_DownloadTaskOffHeadersReceived() {}, - WX_DownloadTaskOffProgressUpdate() {}, - WX_DownloadTaskOnHeadersReceived() {}, - WX_DownloadTaskOnProgressUpdate() {}, - WXFeedbackButtonSetProperty() {}, - WX_FeedbackButtonDestroy() {}, - WX_FeedbackButtonHide() {}, - WX_FeedbackButtonOffTap() {}, - WX_FeedbackButtonOnTap() {}, - WX_FeedbackButtonShow() {}, - WX_LogManagerDebug() {}, - WX_LogManagerInfo() {}, - WX_LogManagerLog() {}, - WX_LogManagerWarn() {}, - WX_RealtimeLogManagerAddFilterMsg() {}, - WX_RealtimeLogManagerError() {}, - WX_RealtimeLogManagerInfo() {}, - WX_RealtimeLogManagerSetFilterMsg() {}, - WX_RealtimeLogManagerWarn() {}, - WX_UpdateManagerApplyUpdate() {}, - WX_UpdateManagerOnCheckForUpdate() {}, - WX_UpdateManagerOnUpdateFailed() {}, - WX_UpdateManagerOnUpdateReady() {}, - WX_VideoDecoderGetFrameData() {}, - WX_VideoDecoderRemove() {}, - WX_VideoDecoderSeek() {}, - WX_VideoDecoderStart() {}, - WX_VideoDecoderStop() {}, - WX_VideoDecoderOff() {}, - WX_VideoDecoderOn() {}, - }; + WX_ClassOneWayNoFunction_vt() {}, + WX_ClassOnEventFunction() {}, + WX_ClassOffEventFunction() {}, }; var downloadedTextures = {}; var downloadingTextures = {}; var textureHandler = {