mirror of
https://github.com/wechat-miniprogram/minigame-tuanjie-transform-sdk.git
synced 2025-11-12 19:25:55 +08:00
Auto-publish.
This commit is contained in:
parent
981890fdaa
commit
d7305e63d0
7
.DS_Store.meta
Normal file
7
.DS_Store.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5e0c24fa575f4498a37298e963ed4a1f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
33
CHANGELOG.md
33
CHANGELOG.md
@ -6,6 +6,39 @@ Removed - 删除功能/接口
|
||||
Fixed - 修复问题
|
||||
Others - 其他
|
||||
-->
|
||||
## 2024-8-28 【预发布】
|
||||
PackageManager(git URL): https://github.com/wechat-miniprogram/minigame-tuanjie-transform-sdk.git#pre-v0.1.19
|
||||
### Feature
|
||||
* 普通: UDPSocket.write适配
|
||||
* 普通: 部分JS API接口更新
|
||||
* 普通: 云开发/云托管支持
|
||||
### Fixed
|
||||
* 普通: 修复.net8 OnApplicationFocus/Pause适配
|
||||
* 普通: 修复插件自动调节dpr后,获取不到实际dpr
|
||||
|
||||
## 2024-8-13 【重要更新】
|
||||
### Feature
|
||||
* 普通: 横竖屏切换,PC窗口大小自动适配
|
||||
* 普通: PC分辨率模糊,自动调节dpr属性
|
||||
### Fixed
|
||||
* 严重:修复多点触控产生的异常
|
||||
* 普通:适配2021,去_JS_Focus_Window
|
||||
* 普通:修复多线程压缩的扩展名判定
|
||||
|
||||
## 2024-7-09 【普通更新】
|
||||
### Feature
|
||||
* 普通:兼容2022新增的音频API
|
||||
* 普通:更快的转换打包速度
|
||||
* 普通:Unity侧添加设置分辨率接口
|
||||
### Fixed
|
||||
* 普通:临时兼容wk 17.5暂停音频无法恢复的bug
|
||||
* 普通:Touch id在特定情况丢失
|
||||
* 普通:使用微信压缩纹理工具sprite atlas版本被修改
|
||||
|
||||
## 2024-5-17 【普通更新】
|
||||
Fixed
|
||||
* 普通:修复WXAssetBundle与预下载冲突问题
|
||||
|
||||
## 2024-5-15 【普通更新】
|
||||
### Feature
|
||||
* 普通:支持JS构建模板,请查阅[模板文档](https://wechat-miniprogram.github.io/minigame-unity-webgl-transform/Design/BuildTemplate.html)
|
||||
|
||||
@ -13,13 +13,13 @@ MonoBehaviour:
|
||||
m_Name: MiniGameConfig
|
||||
m_EditorClassIdentifier:
|
||||
ProjectConf:
|
||||
projectName:
|
||||
Appid:
|
||||
projectName: sdkadminup
|
||||
Appid: wx7a727ff7d940bb3f
|
||||
CDN:
|
||||
assetLoadType: 0
|
||||
assetLoadType: 1
|
||||
compressDataPackage: 0
|
||||
VideoUrl:
|
||||
DST:
|
||||
DST: /Users/hongtianyun/Documents/GitProjects/unity-wasm/SDKAdminUP/wxbuild
|
||||
StreamCDN:
|
||||
bundleHashLength: 32
|
||||
bundlePathIdentifier: StreamingAssets;
|
||||
@ -46,7 +46,7 @@ MonoBehaviour:
|
||||
UseMiniGameChat: 0
|
||||
PreloadWXFont: 0
|
||||
CompileOptions:
|
||||
DevelopBuild: 0
|
||||
DevelopBuild: 1
|
||||
AutoProfile: 0
|
||||
ScriptOnly: 0
|
||||
Il2CppOptimizeSize: 1
|
||||
@ -57,7 +57,8 @@ MonoBehaviour:
|
||||
ProfilingMemory: 0
|
||||
CleanBuild: 0
|
||||
CustomNodePath:
|
||||
showMonitorSuggestModal: 1
|
||||
autoAdaptScreen: 0
|
||||
showMonitorSuggestModal: 0
|
||||
enableProfileStats: 0
|
||||
enableRenderAnalysis: 0
|
||||
iOSAutoGCInterval: 10000
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fe134d53b5bcc45a2a2cde4341229134
|
||||
guid: 4db329984aff24f9aa2a98b2b0080d58
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
|
||||
@ -1310,6 +1310,8 @@ namespace WeChatWASM
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
// 添加player-connection-ip信息
|
||||
try
|
||||
{
|
||||
var host = Dns.GetHostEntry("");
|
||||
foreach (var ip in host.AddressList)
|
||||
{
|
||||
@ -1319,6 +1321,12 @@ namespace WeChatWASM
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogWarning("[可选]生成Boot info 失败!错误:" + e.Message);
|
||||
}
|
||||
|
||||
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ namespace WeChatWASM
|
||||
{
|
||||
if (!formInputData[targetDst].Trim().Equals(string.Empty))
|
||||
{
|
||||
EditorUtility.RevealInFinder(formInputData[targetDst]);
|
||||
EditorUtility.RevealInFinder(GetAbsolutePath(formInputData[targetDst]));
|
||||
}
|
||||
GUIUtility.ExitGUI();
|
||||
}
|
||||
@ -488,7 +488,7 @@ namespace WeChatWASM
|
||||
config.ProjectConf.compressDataPackage = this.getDataCheckbox("compressDataPackage");
|
||||
config.ProjectConf.VideoUrl = this.getDataInput("videoUrl");
|
||||
config.ProjectConf.Orientation = (WXScreenOritation)this.getDataPop("orientation");
|
||||
config.ProjectConf.DST = this.getDataInput("dst");
|
||||
config.ProjectConf.DST = GetAbsolutePath(this.getDataInput("dst"));
|
||||
config.ProjectConf.bundleHashLength = int.Parse(this.getDataInput("bundleHashLength"));
|
||||
config.ProjectConf.bundlePathIdentifier = this.getDataInput("bundlePathIdentifier");
|
||||
config.ProjectConf.bundleExcludeExtensions = this.getDataInput("bundleExcludeExtensions");
|
||||
@ -670,7 +670,37 @@ namespace WeChatWASM
|
||||
GUILayout.EndHorizontal();
|
||||
}
|
||||
|
||||
public static bool IsAbsolutePath(string path)
|
||||
{
|
||||
// 检查是否为空或空白
|
||||
if (string.IsNullOrWhiteSpace(path))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// 在 Windows 上,检查驱动器字母或网络路径
|
||||
if (Path.IsPathRooted(path))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// 在 Unix/Linux 和 macOS 上,检查是否以 '/' 开头
|
||||
if (path.StartsWith("/"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false; // 否则为相对路径
|
||||
}
|
||||
|
||||
public static string GetAbsolutePath(string path)
|
||||
{
|
||||
if (IsAbsolutePath(path))
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
||||
return Path.Combine(Application.dataPath, path);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
{
|
||||
public class WXPluginVersion
|
||||
{
|
||||
public static string pluginVersion = "202408200401"; // 这一行不要改他,导出的时候会自动替换
|
||||
public static string pluginVersion = "202409020328"; // 这一行不要改他,导出的时候会自动替换
|
||||
}
|
||||
|
||||
public class WXPluginConf
|
||||
|
||||
Binary file not shown.
2
Editor/wx-editor.xml.meta
Normal file → Executable file
2
Editor/wx-editor.xml.meta
Normal file → Executable file
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1719462b86bf92b2183f2a29654d14bc
|
||||
guid: ee1ea461b8c7903a1cf2142aff3e6bfe
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
7
Runtime/.DS_Store.meta
Normal file
7
Runtime/.DS_Store.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c3dd1616370eb2aa6b9db9f990c9c33e
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 286898b0c16c642bd8c6d58655b56db7
|
||||
guid: 7f9a0d6ca72d248589c57ea4377d485c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
|
||||
@ -310,19 +310,6 @@ mergeInto(LibraryManager.library, {
|
||||
WXReportUserBehaviorBranchAnalytics: function (branchId, branchDim, eventType) {
|
||||
window.WXWASMSDK.WXReportUserBehaviorBranchAnalytics(_WXPointer_stringify_adaptor(branchId), _WXPointer_stringify_adaptor(branchDim), eventType);
|
||||
},
|
||||
WXCallFunction: function (name, data, conf, s, f, c) {
|
||||
window.WXWASMSDK.WXCallFunction(_WXPointer_stringify_adaptor(name), _WXPointer_stringify_adaptor(data), _WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(s), _WXPointer_stringify_adaptor(f), _WXPointer_stringify_adaptor(c));
|
||||
},
|
||||
WXCallFunctionInit: function (conf) {
|
||||
window.WXWASMSDK.WXCallFunctionInit(_WXPointer_stringify_adaptor(conf));
|
||||
},
|
||||
WXCloudID: function (cloudID) {
|
||||
var returnStr = window.WXWASMSDK.WXCloudID(_WXPointer_stringify_adaptor(cloudID));
|
||||
var bufferSize = lengthBytesUTF8(returnStr || '') + 1;
|
||||
var buffer = _malloc(bufferSize);
|
||||
stringToUTF8(returnStr, buffer, bufferSize);
|
||||
return buffer;
|
||||
},
|
||||
WXCreateInnerAudioContext: function (src, loop, startTime, autoplay, volume, playbackRate, needDownload) {
|
||||
var returnStr = window.WXWASMSDK.WXCreateInnerAudioContext(_WXPointer_stringify_adaptor(src), loop, startTime, autoplay, volume, playbackRate, needDownload);
|
||||
var bufferSize = lengthBytesUTF8(returnStr || '') + 1;
|
||||
@ -999,5 +986,72 @@ mergeInto(LibraryManager.library, {
|
||||
},
|
||||
WX_SetDevicePixelRatio: function(ratio) {
|
||||
window.devicePixelRatio = ratio;
|
||||
},
|
||||
WX_CallJSFunction: function (sdkName, functionName, args) {
|
||||
var sdk = _WXPointer_stringify_adaptor(sdkName);
|
||||
var func = _WXPointer_stringify_adaptor(functionName);
|
||||
var formattedArgs = JSON.parse(_WXPointer_stringify_adaptor(args));
|
||||
GameGlobal[sdk][func](...formattedArgs);
|
||||
},
|
||||
WX_CallJSFunctionWithReturn: function (sdkName, functionName, args) {
|
||||
var sdk = _WXPointer_stringify_adaptor(sdkName);
|
||||
var func = _WXPointer_stringify_adaptor(functionName);
|
||||
var formattedArgs = JSON.parse(_WXPointer_stringify_adaptor(args));
|
||||
var res = GameGlobal[sdk][func](...formattedArgs);
|
||||
var resStr = JSON.stringify(res);
|
||||
var bufferSize = lengthBytesUTF8(resStr || '') + 1;
|
||||
var buffer = _malloc(bufferSize);
|
||||
stringToUTF8((resStr || ''), buffer, bufferSize);
|
||||
return buffer;
|
||||
},
|
||||
WX_CloudCloud: function (option) {
|
||||
window.WXWASMSDK.WX_CloudCloud(_WXPointer_stringify_adaptor(option));
|
||||
},
|
||||
WX_CloudInit: function (option) {
|
||||
window.WXWASMSDK.WX_CloudInit(_WXPointer_stringify_adaptor(option));
|
||||
},
|
||||
WX_CloudCallFunction: function(env, option, callbackId) {
|
||||
window.WXWASMSDK.WX_CloudCallFunction(_WXPointer_stringify_adaptor(env), _WXPointer_stringify_adaptor(option), _WXPointer_stringify_adaptor(callbackId));
|
||||
},
|
||||
WX_CloudCloudID: function (env, cloudID) {
|
||||
var returnStr = window.WXWASMSDK.WX_CloudCloudID(_WXPointer_stringify_adaptor(env), _WXPointer_stringify_adaptor(cloudID));
|
||||
var bufferSize = lengthBytesUTF8(returnStr || '') + 1;
|
||||
var buffer = _malloc(bufferSize);
|
||||
stringToUTF8(returnStr, buffer, bufferSize);
|
||||
return buffer;
|
||||
},
|
||||
WX_CloudCallContainer: function(env, option, callbackId) {
|
||||
window.WXWASMSDK.WX_CloudCallContainer(_WXPointer_stringify_adaptor(env), _WXPointer_stringify_adaptor(option), _WXPointer_stringify_adaptor(callbackId));
|
||||
},
|
||||
WX_CloudUploadFile: function(env, option, callbackId) {
|
||||
window.WXWASMSDK.WX_CloudUploadFile(_WXPointer_stringify_adaptor(env), _WXPointer_stringify_adaptor(option), _WXPointer_stringify_adaptor(callbackId));
|
||||
},
|
||||
WX_CloudDownloadFile: function(env, option, callbackId) {
|
||||
window.WXWASMSDK.WX_CloudDownloadFile(_WXPointer_stringify_adaptor(env), _WXPointer_stringify_adaptor(option), _WXPointer_stringify_adaptor(callbackId));
|
||||
},
|
||||
WX_CloudGetTempFileURL: function(env, option, callbackId) {
|
||||
window.WXWASMSDK.WX_CloudGetTempFileURL(_WXPointer_stringify_adaptor(env), _WXPointer_stringify_adaptor(option), _WXPointer_stringify_adaptor(callbackId));
|
||||
},
|
||||
WX_CloudDeleteFile: function(env, option, callbackId) {
|
||||
window.WXWASMSDK.WX_CloudDeleteFile(_WXPointer_stringify_adaptor(env), _WXPointer_stringify_adaptor(option), _WXPointer_stringify_adaptor(callbackId));
|
||||
},
|
||||
WX_CloudCDNString: function(env, target, isJSON) {
|
||||
if (isJSON) {
|
||||
target = JSON.parse(_WXPointer_stringify_adaptor(target));
|
||||
} else {
|
||||
target = _WXPointer_stringify_adaptor(target);
|
||||
}
|
||||
var returnStr = window.WXWASMSDK.WX_CloudCDN(_WXPointer_stringify_adaptor(env), target);
|
||||
var bufferSize = lengthBytesUTF8(returnStr || '') + 1;
|
||||
var buffer = _malloc(bufferSize);
|
||||
stringToUTF8(returnStr, buffer, bufferSize);
|
||||
return buffer;
|
||||
},
|
||||
WX_CloudCDNBuffer: function(env, targetPtr, targetLength) {
|
||||
var returnStr = window.WXWASMSDK.WX_CloudCDN(_WXPointer_stringify_adaptor(env), HEAPU8.buffer.slice(targetPtr, targetPtr + targetLength));
|
||||
var bufferSize = lengthBytesUTF8(returnStr || '') + 1;
|
||||
var buffer = _malloc(bufferSize);
|
||||
stringToUTF8(returnStr, buffer, bufferSize);
|
||||
return buffer;
|
||||
},
|
||||
});
|
||||
|
||||
@ -92,6 +92,9 @@ WX_GetClipboardData:function(conf, 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));
|
||||
},
|
||||
@ -239,6 +242,9 @@ WX_RequestMidasFriendPayment:function(conf, 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));
|
||||
},
|
||||
@ -392,9 +398,6 @@ WX_OpenChannelsLiveCollection:function(conf, callbackId) {
|
||||
WX_OpenPage:function(conf, callbackId) {
|
||||
window.WXWASMSDK.WX_OpenPage(_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_RequestSubscribeLiveActivity:function(conf, callbackId) {
|
||||
window.WXWASMSDK.WX_RequestSubscribeLiveActivity(_WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId));
|
||||
},
|
||||
@ -414,9 +417,6 @@ WX_RemoveStorageSync:function(key){
|
||||
WX_ReportEvent:function(eventId, data){
|
||||
window.WXWASMSDK.WX_ReportEvent(_WXPointer_stringify_adaptor(eventId), _WXPointer_stringify_adaptor(data));
|
||||
},
|
||||
WX_ReportMonitor:function(name, value){
|
||||
window.WXWASMSDK.WX_ReportMonitor(_WXPointer_stringify_adaptor(name), value);
|
||||
},
|
||||
WX_ReportPerformance:function(id, value, dimensions){
|
||||
window.WXWASMSDK.WX_ReportPerformance(id, value, _WXPointer_stringify_adaptor(dimensions));
|
||||
},
|
||||
@ -586,6 +586,12 @@ WX_OnMemoryWarning:function() {
|
||||
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();
|
||||
},
|
||||
@ -849,8 +855,9 @@ WX_GetWindowInfo:function(
|
||||
return buffer;
|
||||
},
|
||||
WX_CreateImageData:function(
|
||||
width,height
|
||||
){
|
||||
var res = window.WXWASMSDK.WX_CreateImageData();
|
||||
var res = window.WXWASMSDK.WX_CreateImageData(width,height);
|
||||
var bufferSize = lengthBytesUTF8(res || '') + 1;
|
||||
var buffer = _malloc(bufferSize);
|
||||
stringToUTF8(res, buffer, bufferSize);
|
||||
|
||||
@ -46,8 +46,11 @@ var WXUDPSocketLibrary =
|
||||
WX_UDPSocketSetTTL:function(id, ttl) {
|
||||
window.WXWASMSDK.WX_UDPSocketSetTTL(_WXPointer_stringify_adaptor(id), ttl);
|
||||
},
|
||||
WX_UDPSocketWrite:function(id) {
|
||||
window.WXWASMSDK.WX_UDPSocketWrite(_WXPointer_stringify_adaptor(id));
|
||||
WX_UDPSocketWriteString:function(id, data, param) {
|
||||
window.WXWASMSDK.WX_UDPSocketWriteString(_WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(data), _WXPointer_stringify_adaptor(param));
|
||||
},
|
||||
WX_UDPSocketWriteBuffer:function(id, dataPtr, dataLength, param) {
|
||||
window.WXWASMSDK.WX_UDPSocketWriteBuffer(_WXPointer_stringify_adaptor(id), dataPtr, dataLength, _WXPointer_stringify_adaptor(param));
|
||||
},
|
||||
WX_UDPSocketBind:function(id, port) {
|
||||
var res = window.WXWASMSDK.WX_UDPSocketBind(_WXPointer_stringify_adaptor(id), port);
|
||||
|
||||
Binary file not shown.
@ -4,25 +4,6 @@
|
||||
<name>wx-runtime-editor</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:WeChatWASM.Cloud">
|
||||
<summary>
|
||||
云函数,调用前必须先Init初始化
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:WeChatWASM.Cloud.Init(WeChatWASM.CallFunctionInitParam)">
|
||||
<summary>
|
||||
初始化,详见 https://developers.weixin.qq.com/minigame/dev/wxcloud/reference-sdk-api/init/client.init.html
|
||||
</summary>
|
||||
<param name="param"></param>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "M:WeChatWASM.Cloud.CallFunction(WeChatWASM.CallFunctionParam)" -->
|
||||
<member name="M:WeChatWASM.Cloud.CloudID(System.String)">
|
||||
<summary>
|
||||
声明字符串为 CloudID(开放数据 ID),该接口传入一个字符串,返回一个 CloudID 特殊字符串,将该对象传至云函数可以获取其对应的开放数据。详见 https://developers.weixin.qq.com/minigame/dev/wxcloud/reference-sdk-api/open/Cloud.CloudID.html
|
||||
</summary>
|
||||
<param name="cloudID">通过开放能力在小程序端 / web 端获取得到的 CloudID</param>
|
||||
<returns>返回字符串,原样传回云函数调用就好</returns>
|
||||
</member>
|
||||
<member name="T:WeChatWASM.WXBannerAd">
|
||||
<summary>
|
||||
Banner 广告,详见 https://developers.weixin.qq.com/minigame/dev/guide/open-ability/ad/banner-ad.html
|
||||
@ -293,6 +274,25 @@
|
||||
面板缩放比例,默认大小 40x40,低于 375 宽度的屏幕会等比缩小
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WeChatWASM.WXCloud">
|
||||
<summary>
|
||||
云函数,调用前必须先Init初始化
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:WeChatWASM.WXCloud.Init(WeChatWASM.ICloudConfig)">
|
||||
<summary>
|
||||
初始化,详见 https://developers.weixin.qq.com/minigame/dev/wxcloud/reference-sdk-api/init/client.init.html
|
||||
</summary>
|
||||
<param name="param"></param>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "M:WeChatWASM.WXCloud.CallFunction(WeChatWASM.CallFunctionParam)" -->
|
||||
<member name="M:WeChatWASM.WXCloud.CloudID(System.String)">
|
||||
<summary>
|
||||
声明字符串为 CloudID(开放数据 ID),该接口传入一个字符串,返回一个 CloudID 特殊字符串,将该对象传至云函数可以获取其对应的开放数据。详见 https://developers.weixin.qq.com/minigame/dev/wxcloud/reference-sdk-api/open/Cloud.CloudID.html
|
||||
</summary>
|
||||
<param name="cloudID">通过开放能力在小程序端 / web 端获取得到的 CloudID</param>
|
||||
<returns>返回字符串,原样传回云函数调用就好</returns>
|
||||
</member>
|
||||
<member name="T:WeChatWASM.WXCustomAd">
|
||||
<summary>
|
||||
插屏广告组件广告,详见 https://developers.weixin.qq.com/minigame/dev/api/ad/CustomAd.html
|
||||
@ -1422,16 +1422,6 @@
|
||||
视频是否是在用户完整观看的情况下被关闭的,详见 https://developers.weixin.qq.com/minigame/dev/api/ad/RewardedVideoAd.onClose.html
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WeChatWASM.WXCloudCallFunctionResponse">
|
||||
<summary>
|
||||
云函数回调 https://developers.weixin.qq.com/minigame/dev/wxcloud/reference-sdk-api/functions/Cloud.callFunction.html
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.WXCloudCallFunctionResponse.result">
|
||||
<summary>
|
||||
后端返回的经过json序列化后的数据
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ReferrerInfo.extraDataRaw">
|
||||
<summary>
|
||||
对应JS版里的 extraData,这里序列化成JSON字符串
|
||||
@ -1572,31 +1562,6 @@
|
||||
事件触发时的时间戳
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WeChatWASM.CallFunctionParam">
|
||||
<summary>
|
||||
调用云函数 https://developers.weixin.qq.com/minigame/dev/wxcloud/reference-sdk-api/functions/Cloud.callFunction.html
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CallFunctionParam.data">
|
||||
<summary>
|
||||
这里请将数据json序列化为字符串再赋值到data
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WeChatWASM.CallFunctionInitParam">
|
||||
<summary>
|
||||
云函数初始化 https://developers.weixin.qq.com/minigame/dev/wxcloud/reference-sdk-api/init/client.init.html
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CallFunctionInitParam.env">
|
||||
<summary>
|
||||
必填,环境ID,指定接下来调用 API 时访问哪个环境的云资源
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CallFunctionInitParam.traceUser">
|
||||
<summary>
|
||||
是否在将用户访问记录到用户管理中,在控制台中可见
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.InnerAudioContextParam.src">
|
||||
<summary>
|
||||
音频资源的地址,用于直接播放。可以设置为网络地址,或者unity中的本地路径如 Assets/xx.wav,运行时会自动和配置的音频地址前缀做拼接得到最终线上地址
|
||||
@ -3081,6 +3046,36 @@
|
||||
接口调用成功的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ICloudConfig.env">
|
||||
<summary>
|
||||
必填,环境ID,指定接下来调用 API 时访问哪个环境的云资源
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ICloudConfig.traceUser">
|
||||
<summary>
|
||||
是否在将用户访问记录到用户管理中,在控制台中可见
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WeChatWASM.CallFunctionResult">
|
||||
<summary>
|
||||
云函数回调 https://developers.weixin.qq.com/minigame/dev/wxcloud/reference-sdk-api/functions/Cloud.callFunction.html
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CallFunctionResult.result">
|
||||
<summary>
|
||||
后端返回的经过json序列化后的数据
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WeChatWASM.CallFunctionParam">
|
||||
<summary>
|
||||
调用云函数 https://developers.weixin.qq.com/minigame/dev/wxcloud/reference-sdk-api/functions/Cloud.callFunction.html
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CallContainerResult.data">
|
||||
<summary>
|
||||
后端返回的经过json序列化后的数据
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.AccountInfo.miniProgram">
|
||||
<summary>
|
||||
小程序账号信息
|
||||
@ -3187,6 +3182,17 @@
|
||||
是否已打开调试。可通过右上角菜单或 [wx.setEnableDebug](https://developers.weixin.qq.com/minigame/dev/api/base/debug/wx.setEnableDebug.html) 打开调试。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.AppBaseInfo.fontSizeScaleFactor">
|
||||
<summary>
|
||||
微信字体大小缩放比例
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.AppBaseInfo.fontSizeSetting">
|
||||
<summary>
|
||||
需要基础库: `2.23.4`
|
||||
微信字体大小,单位px
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.AppBaseInfo.host">
|
||||
<summary>
|
||||
当前小程序运行的宿主环境
|
||||
@ -3220,6 +3226,12 @@
|
||||
是否正在充电中
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetBatteryInfoSyncResult.isLowPowerModeEnabled">
|
||||
<summary>
|
||||
需要基础库: `3.4.3`
|
||||
是否处于省电模式,目前仅 iOS 端支持
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetBatteryInfoSyncResult.level">
|
||||
<summary>
|
||||
设备电量,范围 1 - 100
|
||||
@ -3230,11 +3242,7 @@
|
||||
应用(微信APP)二进制接口类型(仅 Android 支持)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.DeviceInfo.benchmarkLevel">
|
||||
<summary>
|
||||
设备性能等级(仅 Android 支持)。取值为:-2 或 0(该设备无法运行小游戏),-1(性能未知),>=1(设备性能值,该值越高,设备性能越好,目前最高不到50)
|
||||
</summary>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "F:WeChatWASM.DeviceInfo.benchmarkLevel" -->
|
||||
<member name="F:WeChatWASM.DeviceInfo.brand">
|
||||
<summary>
|
||||
设备品牌
|
||||
@ -3447,7 +3455,7 @@
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SystemInfo.deviceOrientation">
|
||||
<summary>
|
||||
设备方向
|
||||
设备方向(注意:IOS客户端横屏游戏获取deviceOrientation可能不准,建议以屏幕宽高为准)
|
||||
可选值:
|
||||
- 'portrait': 竖屏;
|
||||
- 'landscape': 横屏;
|
||||
@ -3651,7 +3659,7 @@
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SystemSetting.deviceOrientation">
|
||||
<summary>
|
||||
设备方向
|
||||
设备方向(注意:IOS客户端横屏游戏获取deviceOrientation可能不准,建议以屏幕宽高为准)
|
||||
可选值:
|
||||
- 'portrait': 竖屏;
|
||||
- 'landscape': 横屏;
|
||||
@ -3717,6 +3725,23 @@
|
||||
接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.DownloadFileOption.enableHttp2">
|
||||
<summary>
|
||||
需要基础库: `2.10.4`
|
||||
是否开启 http2
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.DownloadFileOption.enableProfile">
|
||||
<summary>
|
||||
是否开启 profile,默认开启。开启后可在接口回调的 res.profile 中查看性能调试信息。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.DownloadFileOption.enableQuic">
|
||||
<summary>
|
||||
需要基础库: `2.10.4`
|
||||
是否开启 Quic 协议(gQUIC Q43)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.DownloadFileOption.fail">
|
||||
<summary>
|
||||
接口调用失败的回调函数
|
||||
@ -3744,6 +3769,12 @@
|
||||
超时时间,单位为毫秒,默认值为 60000 即一分钟。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.DownloadFileOption.useHighPerformanceMode">
|
||||
<summary>
|
||||
需要基础库: `3.4.1`
|
||||
使用高性能模式,暂仅支持 Android,默认关闭。该模式下有更优的网络性能表现。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GeneralCallbackResult.errMsg">
|
||||
<summary>
|
||||
错误信息
|
||||
@ -3895,6 +3926,11 @@
|
||||
传输层根据多个请求评估的当前网络的 rtt(仅供参考)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestProfile.usingHighPerformanceMode">
|
||||
<summary>
|
||||
是否走到了高性能模式。基础库 v3.3.4 起支持。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.DownloadTaskOnHeadersReceivedListenerResult.header">
|
||||
<summary>
|
||||
开发者服务器返回的 HTTP Response Header
|
||||
@ -3943,6 +3979,26 @@
|
||||
背景颜色
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OptionStyle.height">
|
||||
<summary>
|
||||
高度
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OptionStyle.left">
|
||||
<summary>
|
||||
左上角横坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OptionStyle.top">
|
||||
<summary>
|
||||
左上角纵坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OptionStyle.width">
|
||||
<summary>
|
||||
宽度
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OptionStyle.borderColor">
|
||||
<summary>
|
||||
边框颜色
|
||||
@ -3968,16 +4024,6 @@
|
||||
字号
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OptionStyle.height">
|
||||
<summary>
|
||||
高度
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OptionStyle.left">
|
||||
<summary>
|
||||
左上角横坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OptionStyle.lineHeight">
|
||||
<summary>
|
||||
文本的行高
|
||||
@ -3992,16 +4038,6 @@
|
||||
- 'right': 居右;
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OptionStyle.top">
|
||||
<summary>
|
||||
左上角纵坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OptionStyle.width">
|
||||
<summary>
|
||||
宽度
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ImageData.data">
|
||||
<summary>
|
||||
一维数组,包含以 RGBA 顺序的数据,数据使用 0 至 255(包含)的整数表示
|
||||
@ -4159,7 +4195,7 @@
|
||||
</member>
|
||||
<member name="F:WeChatWASM.AuthPrivateMessageOption.shareTicket">
|
||||
<summary>
|
||||
shareTicket。可以从 wx.onShow 中获取。详情 [shareTicket](#)
|
||||
shareTicket。可以从 wx.getEnterOptionsSync 中获取。详情 [shareTicket](#)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.AuthPrivateMessageOption.complete">
|
||||
@ -4748,7 +4784,7 @@
|
||||
开始广播本地创建的外围设备。
|
||||
**注意**
|
||||
- Android 8.0.9 开始,支持直接使用 16/32/128 位 UUID;
|
||||
- Android 8.0.9 以下版本只支持 128 位 UUID,使用 16/32 位的 UUID 时需要进行补位(系统会自动识别是否属于预分配区间),可以参考[蓝牙指南](#);
|
||||
- Android 8.0.9 以下版本只支持 128 位 UUID,使用 16/32 位的 UUID 时需要进行补位(系统会自动识别是否属于预分配区间),可以参考[蓝牙指南](https://developers.weixin.qq.com/minigame/dev/guide/device/ble.html);
|
||||
- iOS 必须直接使用 16 位的 UUID,不能补位到 128 位,否则系统组包时仍会按照 128 位传输。iOS 暂不支持 32 位 UUID。
|
||||
- iOS 同时只能发起一个广播,安卓支持同时发起多个广播。
|
||||
- 传 beacon 参数时,不能同时传入 deviceName,serviceUuids,manufacturerData 参数。
|
||||
@ -5534,6 +5570,12 @@
|
||||
是否正在充电中
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetBatteryInfoSuccessCallbackResult.isLowPowerModeEnabled">
|
||||
<summary>
|
||||
需要基础库: `3.4.3`
|
||||
是否处于省电模式,目前仅 iOS 端支持
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetBatteryInfoSuccessCallbackResult.level">
|
||||
<summary>
|
||||
设备电量,范围 1 - 100
|
||||
@ -5902,6 +5944,23 @@
|
||||
蓝牙设备名称,某些设备可能没有
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetDeviceBenchmarkInfoOption.complete">
|
||||
<summary>
|
||||
接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetDeviceBenchmarkInfoOption.fail">
|
||||
<summary>
|
||||
接口调用失败的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetDeviceBenchmarkInfoOption.success">
|
||||
<summary>
|
||||
接口调用成功的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "F:WeChatWASM.GetDeviceBenchmarkInfoSuccessCallbackResult.benchmarkLevel" -->
|
||||
<!-- Badly formed XML comment ignored for member "F:WeChatWASM.GetDeviceBenchmarkInfoSuccessCallbackResult.modelLevel" -->
|
||||
<member name="F:WeChatWASM.GetExtConfigOption.complete">
|
||||
<summary>
|
||||
接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
@ -6020,6 +6079,24 @@
|
||||
接口调用成功的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetGroupEnterInfoError.errMsg">
|
||||
<summary>
|
||||
错误信息
|
||||
| 错误码 | 错误信息 | 说明 |
|
||||
| - | - | - |
|
||||
| 40097 | | 场景错误 |
|
||||
| 65206 | | 用户已不在该群内 |
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetGroupEnterInfoError.errCode">
|
||||
<summary>
|
||||
错误码
|
||||
| 错误码 | 错误信息 | 说明 |
|
||||
| - | - | - |
|
||||
| 40097 | | 场景错误 |
|
||||
| 65206 | | 用户已不在该群内 |
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetGroupEnterInfoSuccessCallbackResult.cloudID">
|
||||
<summary>
|
||||
需要基础库: `2.7.0`
|
||||
@ -6252,7 +6329,7 @@
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetShareInfoOption.shareTicket">
|
||||
<summary>
|
||||
shareTicket
|
||||
shareTicket,详见[获取更多转发信息](#)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetShareInfoOption.complete">
|
||||
@ -7105,6 +7182,36 @@
|
||||
- 15: TRIM_MEMORY_RUNNING_CRITICAL;
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnMenuButtonBoundingClientRectWeightChangeListenerResult.bottom">
|
||||
<summary>
|
||||
下边界坐标,单位:px
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnMenuButtonBoundingClientRectWeightChangeListenerResult.height">
|
||||
<summary>
|
||||
高度,单位:px
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnMenuButtonBoundingClientRectWeightChangeListenerResult.left">
|
||||
<summary>
|
||||
左边界坐标,单位:px
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnMenuButtonBoundingClientRectWeightChangeListenerResult.right">
|
||||
<summary>
|
||||
右边界坐标,单位:px
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnMenuButtonBoundingClientRectWeightChangeListenerResult.top">
|
||||
<summary>
|
||||
上边界坐标,单位:px
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnMenuButtonBoundingClientRectWeightChangeListenerResult.width">
|
||||
<summary>
|
||||
宽度,单位:px
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnMouseDownListenerResult.button">
|
||||
<summary>
|
||||
按键类型,0左键,1中键,2右键
|
||||
@ -7275,6 +7382,12 @@
|
||||
拒绝原因,一般是一个 Error 对象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnUserCaptureScreenListenerResult.query">
|
||||
<summary>
|
||||
需要基础库: `3.3.0`
|
||||
支持开发者自定义一键打开小程序时的 query
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnVoIPChatInterruptedListenerResult.errCode">
|
||||
<summary>
|
||||
错误码
|
||||
@ -8200,11 +8313,6 @@
|
||||
分区 ID
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentOption.extraInfo">
|
||||
<summary>
|
||||
其他参数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.MidasPaymentError.errMsg">
|
||||
<summary>
|
||||
错误信息
|
||||
@ -8212,6 +8320,7 @@
|
||||
| - | - | - |
|
||||
| -1 | | 系统失败 |
|
||||
| -2 | | 支付取消 |
|
||||
| -6 | | 下单参数类型不对 |
|
||||
| -15001 | | 虚拟支付接口错误码,缺少参数 |
|
||||
| -15002 | | 虚拟支付接口错误码,参数不合法 |
|
||||
| -15003 | | 虚拟支付接口错误码,订单重复 |
|
||||
@ -8221,6 +8330,9 @@
|
||||
| -15007 | | 虚拟支付接口错误码,订单已支付 |
|
||||
| -15009 | | 虚拟支付接口错误码,由于健康系统限制,本次支付已超过限额(这种错误情况会有默认弹窗提示) |
|
||||
| -15010 | | 虚拟支付接口错误码,正式版小游戏不允许在沙箱环境支付 |
|
||||
| -15011 | | 请求的数据类型错误 |
|
||||
| -15013 | | 代币未发布 |
|
||||
| -15017 | | 订单已关闭 |
|
||||
| 1 | | 虚拟支付接口错误码,用户取消支付 |
|
||||
| 2 | | 虚拟支付接口错误码,客户端错误,判断到小程序在用户处于支付中时,又发起了一笔支付请求 |
|
||||
| 3 | | 虚拟支付接口错误码,Android独有错误:用户使用GooglePlay支付,而手机未安装GooglePlay |
|
||||
@ -8230,7 +8342,9 @@
|
||||
| 7 | | 虚拟支付接口错误码,支付取消 |
|
||||
| 1000 | | 参数错误 |
|
||||
| 1001 | | 分区未发布 |
|
||||
| 1003 | | 米大师Portal错误 |
|
||||
| 1003 | | 代币/分区未发布或者对应商户号被封禁或者米大师Portal错误,请先确保虚拟支付2.0代币和分区已发布,然后自查商户号封禁情况https://kf.qq.com/faq/190523Mb6VRJ190523RV363E.html,对应的商户号可以在mp-虚拟支付2.0-基础配置-微信支付账号信息中查询 |
|
||||
| 3017/-15012 | | 道具id非法 |
|
||||
| 701001 | | ios禁止支付 |
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.MidasPaymentError.errCode">
|
||||
@ -8240,6 +8354,7 @@
|
||||
| - | - | - |
|
||||
| -1 | | 系统失败 |
|
||||
| -2 | | 支付取消 |
|
||||
| -6 | | 下单参数类型不对 |
|
||||
| -15001 | | 虚拟支付接口错误码,缺少参数 |
|
||||
| -15002 | | 虚拟支付接口错误码,参数不合法 |
|
||||
| -15003 | | 虚拟支付接口错误码,订单重复 |
|
||||
@ -8249,6 +8364,9 @@
|
||||
| -15007 | | 虚拟支付接口错误码,订单已支付 |
|
||||
| -15009 | | 虚拟支付接口错误码,由于健康系统限制,本次支付已超过限额(这种错误情况会有默认弹窗提示) |
|
||||
| -15010 | | 虚拟支付接口错误码,正式版小游戏不允许在沙箱环境支付 |
|
||||
| -15011 | | 请求的数据类型错误 |
|
||||
| -15013 | | 代币未发布 |
|
||||
| -15017 | | 订单已关闭 |
|
||||
| 1 | | 虚拟支付接口错误码,用户取消支付 |
|
||||
| 2 | | 虚拟支付接口错误码,客户端错误,判断到小程序在用户处于支付中时,又发起了一笔支付请求 |
|
||||
| 3 | | 虚拟支付接口错误码,Android独有错误:用户使用GooglePlay支付,而手机未安装GooglePlay |
|
||||
@ -8258,7 +8376,9 @@
|
||||
| 7 | | 虚拟支付接口错误码,支付取消 |
|
||||
| 1000 | | 参数错误 |
|
||||
| 1001 | | 分区未发布 |
|
||||
| 1003 | | 米大师Portal错误 |
|
||||
| 1003 | | 代币/分区未发布或者对应商户号被封禁或者米大师Portal错误,请先确保虚拟支付2.0代币和分区已发布,然后自查商户号封禁情况https://kf.qq.com/faq/190523Mb6VRJ190523RV363E.html,对应的商户号可以在mp-虚拟支付2.0-基础配置-微信支付账号信息中查询 |
|
||||
| 3017/-15012 | | 道具id非法 |
|
||||
| 701001 | | ios禁止支付 |
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentFailCallbackErr.errCode">
|
||||
@ -8271,11 +8391,116 @@
|
||||
错误信息
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentFailCallbackErr.errno">
|
||||
<summary>
|
||||
错误码
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentSuccessCallbackResult.errMsg">
|
||||
<summary>
|
||||
调用成功信息
|
||||
</summary>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "F:WeChatWASM.RequestMidasPaymentGameItemOption.paySig" -->
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentGameItemOption.signData">
|
||||
<summary>
|
||||
<b>支付原串</b>
|
||||
具体支付参数见下面的signData,需要将数据以json格式传递
|
||||
signData例子:
|
||||
'{"mode":"goods","offerId":"123","buyQuantity":1,"env":0,"currencyType":"CNY","platform":"android","zoneId":"1","productId":"testproductId","goodsPrice":10,"outTradeNo":"xxxxxx","attach":"testdata"}'
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentGameItemOption.signature">
|
||||
<summary>
|
||||
<b>用户态签名</b>
|
||||
signature参数签名算法参考[用户态签名](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html#%E7%94%A8%E6%88%B7%E7%99%BB%E5%BD%95%E6%80%81%E7%AD%BE%E5%90%8D)
|
||||
可参考[calc_signature](https://docs.qq.com/doc/DVUN0QWJja0J5c2x4)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentGameItemOption.complete">
|
||||
<summary>
|
||||
接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentGameItemOption.fail">
|
||||
<summary>
|
||||
接口调用失败的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentGameItemOption.success">
|
||||
<summary>
|
||||
接口调用成功的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SignData1.buyQuantity">
|
||||
<summary>
|
||||
<b>购买数量</b>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SignData1.currencyType">
|
||||
<summary>
|
||||
<b>币种</b>
|
||||
可选值:
|
||||
- 'CNY': 人民币;
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SignData1.goodsPrice">
|
||||
<summary>
|
||||
<b>道具单价(分)</b>
|
||||
用来校验价格与后台道具价格是否一致,避免用户在业务商城页看到的价格与实际价格不一致导致投诉
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SignData1.mode">
|
||||
<summary>
|
||||
<b>支付的类型</b>
|
||||
不同的支付类型有各自额外要传的附加参数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SignData1.offerId">
|
||||
<summary>
|
||||
<b>在米大师侧申请的应用id</b>
|
||||
mp-支付基础配置中的offerid
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SignData1.outTradeNo">
|
||||
<summary>
|
||||
<b>业务订单号</b>
|
||||
每个订单号只能使用一次,重复使用会失败(极端情况不保证唯一,不建议业务强依赖唯一性)。
|
||||
要求32个字符内,只能是数字、大小写字母、符号 _-|*@组成,不能以下划线(_)开头。
|
||||
若没有传入,则平台会自动填充一个,并以下划线开头。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SignData1.productId">
|
||||
<summary>
|
||||
<b>道具ID</b>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SignData1.attach">
|
||||
<summary>
|
||||
<b>透传数据</b>
|
||||
发货通知时会透传给开发者
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SignData1.env">
|
||||
<summary>
|
||||
<b>环境配置</b>
|
||||
可选值:
|
||||
- 0: 米大师正式环境;
|
||||
- 1: 米大师沙箱环境;
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SignData1.platform">
|
||||
<summary>
|
||||
<b>平台</b>
|
||||
可选值:
|
||||
- 'android': 安卓;
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SignData1.zoneId">
|
||||
<summary>
|
||||
<b>分区ID</b>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestSubscribeMessageOption.tmplIds">
|
||||
<summary>
|
||||
需要订阅的消息模板的id的集合,一次调用最多可订阅3条消息(注意:iOS客户端7.0.6版本、Android客户端7.0.7版本之后的一次性订阅/长期订阅才支持多个模板消息,iOS客户端7.0.5版本、Android客户端7.0.6版本之前的一次订阅只支持一个模板消息)消息模板id在[微信公众平台(mp.weixin.qq.com)-功能-订阅消息]中配置。每个tmplId对应的模板标题需要不相同,否则会被过滤。
|
||||
@ -9021,7 +9246,7 @@
|
||||
<member name="F:WeChatWASM.ShowShareImageMenuOption.needShowEntrance">
|
||||
<summary>
|
||||
需要基础库: `3.2.0`
|
||||
分享的图片消息是否要带小程序入口
|
||||
分享的图片消息是否要带小程序入口 (仅部分小程序类目可用)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ShowShareImageMenuOption.style">
|
||||
@ -9400,6 +9625,11 @@
|
||||
参数列表
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.UpdatableMessageFrontEndTemplateInfo.templateId">
|
||||
<summary>
|
||||
模板ID
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.UpdatableMessageFrontEndParameter.name">
|
||||
<summary>
|
||||
参数名
|
||||
@ -9716,101 +9946,6 @@
|
||||
接口调用成功的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentGameItemOption.signData">
|
||||
<summary>
|
||||
支付原串
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentGameItemOption.paySig">
|
||||
<summary>
|
||||
支付签名
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentGameItemOption.signature">
|
||||
<summary>
|
||||
用户态签名
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentGameItemOption.extraInfo">
|
||||
<summary>
|
||||
其他参数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentGameItemOption.complete">
|
||||
<summary>
|
||||
接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentGameItemOption.fail">
|
||||
<summary>
|
||||
接口调用失败的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentGameItemOption.success">
|
||||
<summary>
|
||||
接口调用成功的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.MidasPaymentGameItemError.errMsg">
|
||||
<summary>
|
||||
错误信息
|
||||
| 错误码 | 错误信息 | 说明 |
|
||||
| - | - | - |
|
||||
| -1 | | 系统失败 |
|
||||
| -2 | | 支付取消 |
|
||||
| -15001 | | 虚拟支付接口错误码,缺少参数 |
|
||||
| -15002 | | 虚拟支付接口错误码,参数不合法 |
|
||||
| -15003 | | 虚拟支付接口错误码,订单重复 |
|
||||
| -15004 | | 虚拟支付接口错误码,后台错误 |
|
||||
| -15005 | | 虚拟支付接口错误码,appId权限被封禁 |
|
||||
| -15006 | | 虚拟支付接口错误码,货币类型不支持 |
|
||||
| -15007 | | 虚拟支付接口错误码,订单已支付 |
|
||||
| -15009 | | 虚拟支付接口错误码,由于健康系统限制,本次支付已超过限额(这种错误情况会有默认弹窗提示) |
|
||||
| -15010 | | 虚拟支付接口错误码,正式版小游戏不允许在沙箱环境支付 |
|
||||
| 1 | | 虚拟支付接口错误码,用户取消支付 |
|
||||
| 2 | | 虚拟支付接口错误码,客户端错误,判断到小程序在用户处于支付中时,又发起了一笔支付请求 |
|
||||
| 3 | | 虚拟支付接口错误码,Android独有错误:用户使用GooglePlay支付,而手机未安装GooglePlay |
|
||||
| 4 | | 虚拟支付接口错误码,用户操作系统支付状态异常 |
|
||||
| 5 | | 虚拟支付接口错误码,操作系统错误 |
|
||||
| 6 | | 虚拟支付接口错误码,其他错误 |
|
||||
| 7 | | 虚拟支付接口错误码,支付取消 |
|
||||
| 1000 | | 参数错误 |
|
||||
| 1001 | | 分区未发布 |
|
||||
| 1003 | | 米大师Portal错误 |
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.MidasPaymentGameItemError.errCode">
|
||||
<summary>
|
||||
错误码
|
||||
| 错误码 | 错误信息 | 说明 |
|
||||
| - | - | - |
|
||||
| -1 | | 系统失败 |
|
||||
| -2 | | 支付取消 |
|
||||
| -15001 | | 虚拟支付接口错误码,缺少参数 |
|
||||
| -15002 | | 虚拟支付接口错误码,参数不合法 |
|
||||
| -15003 | | 虚拟支付接口错误码,订单重复 |
|
||||
| -15004 | | 虚拟支付接口错误码,后台错误 |
|
||||
| -15005 | | 虚拟支付接口错误码,appId权限被封禁 |
|
||||
| -15006 | | 虚拟支付接口错误码,货币类型不支持 |
|
||||
| -15007 | | 虚拟支付接口错误码,订单已支付 |
|
||||
| -15009 | | 虚拟支付接口错误码,由于健康系统限制,本次支付已超过限额(这种错误情况会有默认弹窗提示) |
|
||||
| -15010 | | 虚拟支付接口错误码,正式版小游戏不允许在沙箱环境支付 |
|
||||
| -15012 | | 虚拟支付接口错误码,小游戏用户态签名错误 |
|
||||
| -15014 | | 虚拟支付接口错误码,小游戏支付签名错误 |
|
||||
| -15015 | | sessionkey过期 |
|
||||
| -15016 | | goodsprice道具价格错误 |
|
||||
| 1 | | 虚拟支付接口错误码,用户取消支付 |
|
||||
| 2 | | 虚拟支付接口错误码,客户端错误,判断到小程序在用户处于支付中时,又发起了一笔支付请求 |
|
||||
| 3 | | 虚拟支付接口错误码,Android独有错误:用户使用GooglePlay支付,而手机未安装GooglePlay |
|
||||
| 4 | | 虚拟支付接口错误码,用户操作系统支付状态异常 |
|
||||
| 5 | | 虚拟支付接口错误码,操作系统错误 |
|
||||
| 6 | | 虚拟支付接口错误码,其他错误 |
|
||||
| 7 | | 虚拟支付接口错误码,支付取消 |
|
||||
| 1000 | | 参数错误 |
|
||||
| 1001 | | 分区未发布 |
|
||||
| 1003 | | 米大师Portal错误 |
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestSubscribeLiveActivityOption.complete">
|
||||
<summary>
|
||||
接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
@ -10273,7 +10408,7 @@
|
||||
设置 IP_TTL 套接字选项,用于设置一个 IP 数据包传输时允许的最大跳步数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:WeChatWASM.WXUDPSocket.Write">
|
||||
<member name="M:WeChatWASM.WXUDPSocket.Write(WeChatWASM.UDPSocketSendOption)">
|
||||
<summary>
|
||||
[UDPSocket.write()](https://developers.weixin.qq.com/minigame/dev/api/network/udp/UDPSocket.write.html)
|
||||
需要基础库: `2.15.0`
|
||||
|
||||
2
Runtime/Plugins/wx-runtime-editor.xml.meta
Normal file → Executable file
2
Runtime/Plugins/wx-runtime-editor.xml.meta
Normal file → Executable file
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ff1c8cafe7253ab3b25ac0da12acf740
|
||||
guid: c301e9f29dbf55c57af66df4238d29a7
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
Binary file not shown.
@ -4,25 +4,12 @@
|
||||
<name>wx-runtime</name>
|
||||
</assembly>
|
||||
<members>
|
||||
<member name="T:WeChatWASM.Cloud">
|
||||
<member name="T:PlayerPrefs">
|
||||
<summary>
|
||||
云函数,调用前必须先Init初始化
|
||||
覆盖unity的PlayerPrefs
|
||||
注意:调用均为同步调用, 容易阻塞游戏主线程造成卡顿,不建议频繁调用
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:WeChatWASM.Cloud.Init(WeChatWASM.CallFunctionInitParam)">
|
||||
<summary>
|
||||
初始化,详见 https://developers.weixin.qq.com/minigame/dev/wxcloud/reference-sdk-api/init/client.init.html
|
||||
</summary>
|
||||
<param name="param"></param>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "M:WeChatWASM.Cloud.CallFunction(WeChatWASM.CallFunctionParam)" -->
|
||||
<member name="M:WeChatWASM.Cloud.CloudID(System.String)">
|
||||
<summary>
|
||||
声明字符串为 CloudID(开放数据 ID),该接口传入一个字符串,返回一个 CloudID 特殊字符串,将该对象传至云函数可以获取其对应的开放数据。详见 https://developers.weixin.qq.com/minigame/dev/wxcloud/reference-sdk-api/open/Cloud.CloudID.html
|
||||
</summary>
|
||||
<param name="cloudID">通过开放能力在小程序端 / web 端获取得到的 CloudID</param>
|
||||
<returns>返回字符串,原样传回云函数调用就好</returns>
|
||||
</member>
|
||||
<member name="T:WeChatWASM.WXBannerAd">
|
||||
<summary>
|
||||
Banner 广告,详见 https://developers.weixin.qq.com/minigame/dev/guide/open-ability/ad/banner-ad.html
|
||||
@ -293,6 +280,25 @@
|
||||
面板缩放比例,默认大小 40x40,低于 375 宽度的屏幕会等比缩小
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WeChatWASM.WXCloud">
|
||||
<summary>
|
||||
云函数,调用前必须先Init初始化
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:WeChatWASM.WXCloud.Init(WeChatWASM.ICloudConfig)">
|
||||
<summary>
|
||||
初始化,详见 https://developers.weixin.qq.com/minigame/dev/wxcloud/reference-sdk-api/init/client.init.html
|
||||
</summary>
|
||||
<param name="param"></param>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "M:WeChatWASM.WXCloud.CallFunction(WeChatWASM.CallFunctionParam)" -->
|
||||
<member name="M:WeChatWASM.WXCloud.CloudID(System.String)">
|
||||
<summary>
|
||||
声明字符串为 CloudID(开放数据 ID),该接口传入一个字符串,返回一个 CloudID 特殊字符串,将该对象传至云函数可以获取其对应的开放数据。详见 https://developers.weixin.qq.com/minigame/dev/wxcloud/reference-sdk-api/open/Cloud.CloudID.html
|
||||
</summary>
|
||||
<param name="cloudID">通过开放能力在小程序端 / web 端获取得到的 CloudID</param>
|
||||
<returns>返回字符串,原样传回云函数调用就好</returns>
|
||||
</member>
|
||||
<member name="T:WeChatWASM.WXCustomAd">
|
||||
<summary>
|
||||
插屏广告组件广告,详见 https://developers.weixin.qq.com/minigame/dev/api/ad/CustomAd.html
|
||||
@ -1422,16 +1428,6 @@
|
||||
视频是否是在用户完整观看的情况下被关闭的,详见 https://developers.weixin.qq.com/minigame/dev/api/ad/RewardedVideoAd.onClose.html
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WeChatWASM.WXCloudCallFunctionResponse">
|
||||
<summary>
|
||||
云函数回调 https://developers.weixin.qq.com/minigame/dev/wxcloud/reference-sdk-api/functions/Cloud.callFunction.html
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.WXCloudCallFunctionResponse.result">
|
||||
<summary>
|
||||
后端返回的经过json序列化后的数据
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ReferrerInfo.extraDataRaw">
|
||||
<summary>
|
||||
对应JS版里的 extraData,这里序列化成JSON字符串
|
||||
@ -1572,31 +1568,6 @@
|
||||
事件触发时的时间戳
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WeChatWASM.CallFunctionParam">
|
||||
<summary>
|
||||
调用云函数 https://developers.weixin.qq.com/minigame/dev/wxcloud/reference-sdk-api/functions/Cloud.callFunction.html
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CallFunctionParam.data">
|
||||
<summary>
|
||||
这里请将数据json序列化为字符串再赋值到data
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WeChatWASM.CallFunctionInitParam">
|
||||
<summary>
|
||||
云函数初始化 https://developers.weixin.qq.com/minigame/dev/wxcloud/reference-sdk-api/init/client.init.html
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CallFunctionInitParam.env">
|
||||
<summary>
|
||||
必填,环境ID,指定接下来调用 API 时访问哪个环境的云资源
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CallFunctionInitParam.traceUser">
|
||||
<summary>
|
||||
是否在将用户访问记录到用户管理中,在控制台中可见
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.InnerAudioContextParam.src">
|
||||
<summary>
|
||||
音频资源的地址,用于直接播放。可以设置为网络地址,或者unity中的本地路径如 Assets/xx.wav,运行时会自动和配置的音频地址前缀做拼接得到最终线上地址
|
||||
@ -3081,6 +3052,36 @@
|
||||
接口调用成功的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ICloudConfig.env">
|
||||
<summary>
|
||||
必填,环境ID,指定接下来调用 API 时访问哪个环境的云资源
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ICloudConfig.traceUser">
|
||||
<summary>
|
||||
是否在将用户访问记录到用户管理中,在控制台中可见
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WeChatWASM.CallFunctionResult">
|
||||
<summary>
|
||||
云函数回调 https://developers.weixin.qq.com/minigame/dev/wxcloud/reference-sdk-api/functions/Cloud.callFunction.html
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CallFunctionResult.result">
|
||||
<summary>
|
||||
后端返回的经过json序列化后的数据
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:WeChatWASM.CallFunctionParam">
|
||||
<summary>
|
||||
调用云函数 https://developers.weixin.qq.com/minigame/dev/wxcloud/reference-sdk-api/functions/Cloud.callFunction.html
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CallContainerResult.data">
|
||||
<summary>
|
||||
后端返回的经过json序列化后的数据
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.AccountInfo.miniProgram">
|
||||
<summary>
|
||||
小程序账号信息
|
||||
@ -3187,6 +3188,17 @@
|
||||
是否已打开调试。可通过右上角菜单或 [wx.setEnableDebug](https://developers.weixin.qq.com/minigame/dev/api/base/debug/wx.setEnableDebug.html) 打开调试。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.AppBaseInfo.fontSizeScaleFactor">
|
||||
<summary>
|
||||
微信字体大小缩放比例
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.AppBaseInfo.fontSizeSetting">
|
||||
<summary>
|
||||
需要基础库: `2.23.4`
|
||||
微信字体大小,单位px
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.AppBaseInfo.host">
|
||||
<summary>
|
||||
当前小程序运行的宿主环境
|
||||
@ -3220,6 +3232,12 @@
|
||||
是否正在充电中
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetBatteryInfoSyncResult.isLowPowerModeEnabled">
|
||||
<summary>
|
||||
需要基础库: `3.4.3`
|
||||
是否处于省电模式,目前仅 iOS 端支持
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetBatteryInfoSyncResult.level">
|
||||
<summary>
|
||||
设备电量,范围 1 - 100
|
||||
@ -3230,11 +3248,7 @@
|
||||
应用(微信APP)二进制接口类型(仅 Android 支持)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.DeviceInfo.benchmarkLevel">
|
||||
<summary>
|
||||
设备性能等级(仅 Android 支持)。取值为:-2 或 0(该设备无法运行小游戏),-1(性能未知),>=1(设备性能值,该值越高,设备性能越好,目前最高不到50)
|
||||
</summary>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "F:WeChatWASM.DeviceInfo.benchmarkLevel" -->
|
||||
<member name="F:WeChatWASM.DeviceInfo.brand">
|
||||
<summary>
|
||||
设备品牌
|
||||
@ -3447,7 +3461,7 @@
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SystemInfo.deviceOrientation">
|
||||
<summary>
|
||||
设备方向
|
||||
设备方向(注意:IOS客户端横屏游戏获取deviceOrientation可能不准,建议以屏幕宽高为准)
|
||||
可选值:
|
||||
- 'portrait': 竖屏;
|
||||
- 'landscape': 横屏;
|
||||
@ -3651,7 +3665,7 @@
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SystemSetting.deviceOrientation">
|
||||
<summary>
|
||||
设备方向
|
||||
设备方向(注意:IOS客户端横屏游戏获取deviceOrientation可能不准,建议以屏幕宽高为准)
|
||||
可选值:
|
||||
- 'portrait': 竖屏;
|
||||
- 'landscape': 横屏;
|
||||
@ -3717,6 +3731,23 @@
|
||||
接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.DownloadFileOption.enableHttp2">
|
||||
<summary>
|
||||
需要基础库: `2.10.4`
|
||||
是否开启 http2
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.DownloadFileOption.enableProfile">
|
||||
<summary>
|
||||
是否开启 profile,默认开启。开启后可在接口回调的 res.profile 中查看性能调试信息。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.DownloadFileOption.enableQuic">
|
||||
<summary>
|
||||
需要基础库: `2.10.4`
|
||||
是否开启 Quic 协议(gQUIC Q43)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.DownloadFileOption.fail">
|
||||
<summary>
|
||||
接口调用失败的回调函数
|
||||
@ -3744,6 +3775,12 @@
|
||||
超时时间,单位为毫秒,默认值为 60000 即一分钟。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.DownloadFileOption.useHighPerformanceMode">
|
||||
<summary>
|
||||
需要基础库: `3.4.1`
|
||||
使用高性能模式,暂仅支持 Android,默认关闭。该模式下有更优的网络性能表现。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GeneralCallbackResult.errMsg">
|
||||
<summary>
|
||||
错误信息
|
||||
@ -3895,6 +3932,11 @@
|
||||
传输层根据多个请求评估的当前网络的 rtt(仅供参考)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestProfile.usingHighPerformanceMode">
|
||||
<summary>
|
||||
是否走到了高性能模式。基础库 v3.3.4 起支持。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.DownloadTaskOnHeadersReceivedListenerResult.header">
|
||||
<summary>
|
||||
开发者服务器返回的 HTTP Response Header
|
||||
@ -3943,6 +3985,26 @@
|
||||
背景颜色
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OptionStyle.height">
|
||||
<summary>
|
||||
高度
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OptionStyle.left">
|
||||
<summary>
|
||||
左上角横坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OptionStyle.top">
|
||||
<summary>
|
||||
左上角纵坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OptionStyle.width">
|
||||
<summary>
|
||||
宽度
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OptionStyle.borderColor">
|
||||
<summary>
|
||||
边框颜色
|
||||
@ -3968,16 +4030,6 @@
|
||||
字号
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OptionStyle.height">
|
||||
<summary>
|
||||
高度
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OptionStyle.left">
|
||||
<summary>
|
||||
左上角横坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OptionStyle.lineHeight">
|
||||
<summary>
|
||||
文本的行高
|
||||
@ -3992,16 +4044,6 @@
|
||||
- 'right': 居右;
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OptionStyle.top">
|
||||
<summary>
|
||||
左上角纵坐标
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OptionStyle.width">
|
||||
<summary>
|
||||
宽度
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ImageData.data">
|
||||
<summary>
|
||||
一维数组,包含以 RGBA 顺序的数据,数据使用 0 至 255(包含)的整数表示
|
||||
@ -4159,7 +4201,7 @@
|
||||
</member>
|
||||
<member name="F:WeChatWASM.AuthPrivateMessageOption.shareTicket">
|
||||
<summary>
|
||||
shareTicket。可以从 wx.onShow 中获取。详情 [shareTicket](#)
|
||||
shareTicket。可以从 wx.getEnterOptionsSync 中获取。详情 [shareTicket](#)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.AuthPrivateMessageOption.complete">
|
||||
@ -4748,7 +4790,7 @@
|
||||
开始广播本地创建的外围设备。
|
||||
**注意**
|
||||
- Android 8.0.9 开始,支持直接使用 16/32/128 位 UUID;
|
||||
- Android 8.0.9 以下版本只支持 128 位 UUID,使用 16/32 位的 UUID 时需要进行补位(系统会自动识别是否属于预分配区间),可以参考[蓝牙指南](#);
|
||||
- Android 8.0.9 以下版本只支持 128 位 UUID,使用 16/32 位的 UUID 时需要进行补位(系统会自动识别是否属于预分配区间),可以参考[蓝牙指南](https://developers.weixin.qq.com/minigame/dev/guide/device/ble.html);
|
||||
- iOS 必须直接使用 16 位的 UUID,不能补位到 128 位,否则系统组包时仍会按照 128 位传输。iOS 暂不支持 32 位 UUID。
|
||||
- iOS 同时只能发起一个广播,安卓支持同时发起多个广播。
|
||||
- 传 beacon 参数时,不能同时传入 deviceName,serviceUuids,manufacturerData 参数。
|
||||
@ -5534,6 +5576,12 @@
|
||||
是否正在充电中
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetBatteryInfoSuccessCallbackResult.isLowPowerModeEnabled">
|
||||
<summary>
|
||||
需要基础库: `3.4.3`
|
||||
是否处于省电模式,目前仅 iOS 端支持
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetBatteryInfoSuccessCallbackResult.level">
|
||||
<summary>
|
||||
设备电量,范围 1 - 100
|
||||
@ -5902,6 +5950,23 @@
|
||||
蓝牙设备名称,某些设备可能没有
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetDeviceBenchmarkInfoOption.complete">
|
||||
<summary>
|
||||
接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetDeviceBenchmarkInfoOption.fail">
|
||||
<summary>
|
||||
接口调用失败的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetDeviceBenchmarkInfoOption.success">
|
||||
<summary>
|
||||
接口调用成功的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "F:WeChatWASM.GetDeviceBenchmarkInfoSuccessCallbackResult.benchmarkLevel" -->
|
||||
<!-- Badly formed XML comment ignored for member "F:WeChatWASM.GetDeviceBenchmarkInfoSuccessCallbackResult.modelLevel" -->
|
||||
<member name="F:WeChatWASM.GetExtConfigOption.complete">
|
||||
<summary>
|
||||
接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
@ -6020,6 +6085,24 @@
|
||||
接口调用成功的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetGroupEnterInfoError.errMsg">
|
||||
<summary>
|
||||
错误信息
|
||||
| 错误码 | 错误信息 | 说明 |
|
||||
| - | - | - |
|
||||
| 40097 | | 场景错误 |
|
||||
| 65206 | | 用户已不在该群内 |
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetGroupEnterInfoError.errCode">
|
||||
<summary>
|
||||
错误码
|
||||
| 错误码 | 错误信息 | 说明 |
|
||||
| - | - | - |
|
||||
| 40097 | | 场景错误 |
|
||||
| 65206 | | 用户已不在该群内 |
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetGroupEnterInfoSuccessCallbackResult.cloudID">
|
||||
<summary>
|
||||
需要基础库: `2.7.0`
|
||||
@ -6252,7 +6335,7 @@
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetShareInfoOption.shareTicket">
|
||||
<summary>
|
||||
shareTicket
|
||||
shareTicket,详见[获取更多转发信息](#)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.GetShareInfoOption.complete">
|
||||
@ -7105,6 +7188,36 @@
|
||||
- 15: TRIM_MEMORY_RUNNING_CRITICAL;
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnMenuButtonBoundingClientRectWeightChangeListenerResult.bottom">
|
||||
<summary>
|
||||
下边界坐标,单位:px
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnMenuButtonBoundingClientRectWeightChangeListenerResult.height">
|
||||
<summary>
|
||||
高度,单位:px
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnMenuButtonBoundingClientRectWeightChangeListenerResult.left">
|
||||
<summary>
|
||||
左边界坐标,单位:px
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnMenuButtonBoundingClientRectWeightChangeListenerResult.right">
|
||||
<summary>
|
||||
右边界坐标,单位:px
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnMenuButtonBoundingClientRectWeightChangeListenerResult.top">
|
||||
<summary>
|
||||
上边界坐标,单位:px
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnMenuButtonBoundingClientRectWeightChangeListenerResult.width">
|
||||
<summary>
|
||||
宽度,单位:px
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnMouseDownListenerResult.button">
|
||||
<summary>
|
||||
按键类型,0左键,1中键,2右键
|
||||
@ -7275,6 +7388,12 @@
|
||||
拒绝原因,一般是一个 Error 对象
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnUserCaptureScreenListenerResult.query">
|
||||
<summary>
|
||||
需要基础库: `3.3.0`
|
||||
支持开发者自定义一键打开小程序时的 query
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnVoIPChatInterruptedListenerResult.errCode">
|
||||
<summary>
|
||||
错误码
|
||||
@ -8200,11 +8319,6 @@
|
||||
分区 ID
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentOption.extraInfo">
|
||||
<summary>
|
||||
其他参数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.MidasPaymentError.errMsg">
|
||||
<summary>
|
||||
错误信息
|
||||
@ -8212,6 +8326,7 @@
|
||||
| - | - | - |
|
||||
| -1 | | 系统失败 |
|
||||
| -2 | | 支付取消 |
|
||||
| -6 | | 下单参数类型不对 |
|
||||
| -15001 | | 虚拟支付接口错误码,缺少参数 |
|
||||
| -15002 | | 虚拟支付接口错误码,参数不合法 |
|
||||
| -15003 | | 虚拟支付接口错误码,订单重复 |
|
||||
@ -8221,6 +8336,9 @@
|
||||
| -15007 | | 虚拟支付接口错误码,订单已支付 |
|
||||
| -15009 | | 虚拟支付接口错误码,由于健康系统限制,本次支付已超过限额(这种错误情况会有默认弹窗提示) |
|
||||
| -15010 | | 虚拟支付接口错误码,正式版小游戏不允许在沙箱环境支付 |
|
||||
| -15011 | | 请求的数据类型错误 |
|
||||
| -15013 | | 代币未发布 |
|
||||
| -15017 | | 订单已关闭 |
|
||||
| 1 | | 虚拟支付接口错误码,用户取消支付 |
|
||||
| 2 | | 虚拟支付接口错误码,客户端错误,判断到小程序在用户处于支付中时,又发起了一笔支付请求 |
|
||||
| 3 | | 虚拟支付接口错误码,Android独有错误:用户使用GooglePlay支付,而手机未安装GooglePlay |
|
||||
@ -8230,7 +8348,9 @@
|
||||
| 7 | | 虚拟支付接口错误码,支付取消 |
|
||||
| 1000 | | 参数错误 |
|
||||
| 1001 | | 分区未发布 |
|
||||
| 1003 | | 米大师Portal错误 |
|
||||
| 1003 | | 代币/分区未发布或者对应商户号被封禁或者米大师Portal错误,请先确保虚拟支付2.0代币和分区已发布,然后自查商户号封禁情况https://kf.qq.com/faq/190523Mb6VRJ190523RV363E.html,对应的商户号可以在mp-虚拟支付2.0-基础配置-微信支付账号信息中查询 |
|
||||
| 3017/-15012 | | 道具id非法 |
|
||||
| 701001 | | ios禁止支付 |
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.MidasPaymentError.errCode">
|
||||
@ -8240,6 +8360,7 @@
|
||||
| - | - | - |
|
||||
| -1 | | 系统失败 |
|
||||
| -2 | | 支付取消 |
|
||||
| -6 | | 下单参数类型不对 |
|
||||
| -15001 | | 虚拟支付接口错误码,缺少参数 |
|
||||
| -15002 | | 虚拟支付接口错误码,参数不合法 |
|
||||
| -15003 | | 虚拟支付接口错误码,订单重复 |
|
||||
@ -8249,6 +8370,9 @@
|
||||
| -15007 | | 虚拟支付接口错误码,订单已支付 |
|
||||
| -15009 | | 虚拟支付接口错误码,由于健康系统限制,本次支付已超过限额(这种错误情况会有默认弹窗提示) |
|
||||
| -15010 | | 虚拟支付接口错误码,正式版小游戏不允许在沙箱环境支付 |
|
||||
| -15011 | | 请求的数据类型错误 |
|
||||
| -15013 | | 代币未发布 |
|
||||
| -15017 | | 订单已关闭 |
|
||||
| 1 | | 虚拟支付接口错误码,用户取消支付 |
|
||||
| 2 | | 虚拟支付接口错误码,客户端错误,判断到小程序在用户处于支付中时,又发起了一笔支付请求 |
|
||||
| 3 | | 虚拟支付接口错误码,Android独有错误:用户使用GooglePlay支付,而手机未安装GooglePlay |
|
||||
@ -8258,7 +8382,9 @@
|
||||
| 7 | | 虚拟支付接口错误码,支付取消 |
|
||||
| 1000 | | 参数错误 |
|
||||
| 1001 | | 分区未发布 |
|
||||
| 1003 | | 米大师Portal错误 |
|
||||
| 1003 | | 代币/分区未发布或者对应商户号被封禁或者米大师Portal错误,请先确保虚拟支付2.0代币和分区已发布,然后自查商户号封禁情况https://kf.qq.com/faq/190523Mb6VRJ190523RV363E.html,对应的商户号可以在mp-虚拟支付2.0-基础配置-微信支付账号信息中查询 |
|
||||
| 3017/-15012 | | 道具id非法 |
|
||||
| 701001 | | ios禁止支付 |
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentFailCallbackErr.errCode">
|
||||
@ -8271,11 +8397,116 @@
|
||||
错误信息
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentFailCallbackErr.errno">
|
||||
<summary>
|
||||
错误码
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentSuccessCallbackResult.errMsg">
|
||||
<summary>
|
||||
调用成功信息
|
||||
</summary>
|
||||
</member>
|
||||
<!-- Badly formed XML comment ignored for member "F:WeChatWASM.RequestMidasPaymentGameItemOption.paySig" -->
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentGameItemOption.signData">
|
||||
<summary>
|
||||
<b>支付原串</b>
|
||||
具体支付参数见下面的signData,需要将数据以json格式传递
|
||||
signData例子:
|
||||
'{"mode":"goods","offerId":"123","buyQuantity":1,"env":0,"currencyType":"CNY","platform":"android","zoneId":"1","productId":"testproductId","goodsPrice":10,"outTradeNo":"xxxxxx","attach":"testdata"}'
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentGameItemOption.signature">
|
||||
<summary>
|
||||
<b>用户态签名</b>
|
||||
signature参数签名算法参考[用户态签名](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/signature.html#%E7%94%A8%E6%88%B7%E7%99%BB%E5%BD%95%E6%80%81%E7%AD%BE%E5%90%8D)
|
||||
可参考[calc_signature](https://docs.qq.com/doc/DVUN0QWJja0J5c2x4)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentGameItemOption.complete">
|
||||
<summary>
|
||||
接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentGameItemOption.fail">
|
||||
<summary>
|
||||
接口调用失败的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentGameItemOption.success">
|
||||
<summary>
|
||||
接口调用成功的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SignData1.buyQuantity">
|
||||
<summary>
|
||||
<b>购买数量</b>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SignData1.currencyType">
|
||||
<summary>
|
||||
<b>币种</b>
|
||||
可选值:
|
||||
- 'CNY': 人民币;
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SignData1.goodsPrice">
|
||||
<summary>
|
||||
<b>道具单价(分)</b>
|
||||
用来校验价格与后台道具价格是否一致,避免用户在业务商城页看到的价格与实际价格不一致导致投诉
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SignData1.mode">
|
||||
<summary>
|
||||
<b>支付的类型</b>
|
||||
不同的支付类型有各自额外要传的附加参数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SignData1.offerId">
|
||||
<summary>
|
||||
<b>在米大师侧申请的应用id</b>
|
||||
mp-支付基础配置中的offerid
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SignData1.outTradeNo">
|
||||
<summary>
|
||||
<b>业务订单号</b>
|
||||
每个订单号只能使用一次,重复使用会失败(极端情况不保证唯一,不建议业务强依赖唯一性)。
|
||||
要求32个字符内,只能是数字、大小写字母、符号 _-|*@组成,不能以下划线(_)开头。
|
||||
若没有传入,则平台会自动填充一个,并以下划线开头。
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SignData1.productId">
|
||||
<summary>
|
||||
<b>道具ID</b>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SignData1.attach">
|
||||
<summary>
|
||||
<b>透传数据</b>
|
||||
发货通知时会透传给开发者
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SignData1.env">
|
||||
<summary>
|
||||
<b>环境配置</b>
|
||||
可选值:
|
||||
- 0: 米大师正式环境;
|
||||
- 1: 米大师沙箱环境;
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SignData1.platform">
|
||||
<summary>
|
||||
<b>平台</b>
|
||||
可选值:
|
||||
- 'android': 安卓;
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.SignData1.zoneId">
|
||||
<summary>
|
||||
<b>分区ID</b>
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestSubscribeMessageOption.tmplIds">
|
||||
<summary>
|
||||
需要订阅的消息模板的id的集合,一次调用最多可订阅3条消息(注意:iOS客户端7.0.6版本、Android客户端7.0.7版本之后的一次性订阅/长期订阅才支持多个模板消息,iOS客户端7.0.5版本、Android客户端7.0.6版本之前的一次订阅只支持一个模板消息)消息模板id在[微信公众平台(mp.weixin.qq.com)-功能-订阅消息]中配置。每个tmplId对应的模板标题需要不相同,否则会被过滤。
|
||||
@ -9021,7 +9252,7 @@
|
||||
<member name="F:WeChatWASM.ShowShareImageMenuOption.needShowEntrance">
|
||||
<summary>
|
||||
需要基础库: `3.2.0`
|
||||
分享的图片消息是否要带小程序入口
|
||||
分享的图片消息是否要带小程序入口 (仅部分小程序类目可用)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ShowShareImageMenuOption.style">
|
||||
@ -9400,6 +9631,11 @@
|
||||
参数列表
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.UpdatableMessageFrontEndTemplateInfo.templateId">
|
||||
<summary>
|
||||
模板ID
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.UpdatableMessageFrontEndParameter.name">
|
||||
<summary>
|
||||
参数名
|
||||
@ -9716,101 +9952,6 @@
|
||||
接口调用成功的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentGameItemOption.signData">
|
||||
<summary>
|
||||
支付原串
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentGameItemOption.paySig">
|
||||
<summary>
|
||||
支付签名
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentGameItemOption.signature">
|
||||
<summary>
|
||||
用户态签名
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentGameItemOption.extraInfo">
|
||||
<summary>
|
||||
其他参数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentGameItemOption.complete">
|
||||
<summary>
|
||||
接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentGameItemOption.fail">
|
||||
<summary>
|
||||
接口调用失败的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestMidasPaymentGameItemOption.success">
|
||||
<summary>
|
||||
接口调用成功的回调函数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.MidasPaymentGameItemError.errMsg">
|
||||
<summary>
|
||||
错误信息
|
||||
| 错误码 | 错误信息 | 说明 |
|
||||
| - | - | - |
|
||||
| -1 | | 系统失败 |
|
||||
| -2 | | 支付取消 |
|
||||
| -15001 | | 虚拟支付接口错误码,缺少参数 |
|
||||
| -15002 | | 虚拟支付接口错误码,参数不合法 |
|
||||
| -15003 | | 虚拟支付接口错误码,订单重复 |
|
||||
| -15004 | | 虚拟支付接口错误码,后台错误 |
|
||||
| -15005 | | 虚拟支付接口错误码,appId权限被封禁 |
|
||||
| -15006 | | 虚拟支付接口错误码,货币类型不支持 |
|
||||
| -15007 | | 虚拟支付接口错误码,订单已支付 |
|
||||
| -15009 | | 虚拟支付接口错误码,由于健康系统限制,本次支付已超过限额(这种错误情况会有默认弹窗提示) |
|
||||
| -15010 | | 虚拟支付接口错误码,正式版小游戏不允许在沙箱环境支付 |
|
||||
| 1 | | 虚拟支付接口错误码,用户取消支付 |
|
||||
| 2 | | 虚拟支付接口错误码,客户端错误,判断到小程序在用户处于支付中时,又发起了一笔支付请求 |
|
||||
| 3 | | 虚拟支付接口错误码,Android独有错误:用户使用GooglePlay支付,而手机未安装GooglePlay |
|
||||
| 4 | | 虚拟支付接口错误码,用户操作系统支付状态异常 |
|
||||
| 5 | | 虚拟支付接口错误码,操作系统错误 |
|
||||
| 6 | | 虚拟支付接口错误码,其他错误 |
|
||||
| 7 | | 虚拟支付接口错误码,支付取消 |
|
||||
| 1000 | | 参数错误 |
|
||||
| 1001 | | 分区未发布 |
|
||||
| 1003 | | 米大师Portal错误 |
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.MidasPaymentGameItemError.errCode">
|
||||
<summary>
|
||||
错误码
|
||||
| 错误码 | 错误信息 | 说明 |
|
||||
| - | - | - |
|
||||
| -1 | | 系统失败 |
|
||||
| -2 | | 支付取消 |
|
||||
| -15001 | | 虚拟支付接口错误码,缺少参数 |
|
||||
| -15002 | | 虚拟支付接口错误码,参数不合法 |
|
||||
| -15003 | | 虚拟支付接口错误码,订单重复 |
|
||||
| -15004 | | 虚拟支付接口错误码,后台错误 |
|
||||
| -15005 | | 虚拟支付接口错误码,appId权限被封禁 |
|
||||
| -15006 | | 虚拟支付接口错误码,货币类型不支持 |
|
||||
| -15007 | | 虚拟支付接口错误码,订单已支付 |
|
||||
| -15009 | | 虚拟支付接口错误码,由于健康系统限制,本次支付已超过限额(这种错误情况会有默认弹窗提示) |
|
||||
| -15010 | | 虚拟支付接口错误码,正式版小游戏不允许在沙箱环境支付 |
|
||||
| -15012 | | 虚拟支付接口错误码,小游戏用户态签名错误 |
|
||||
| -15014 | | 虚拟支付接口错误码,小游戏支付签名错误 |
|
||||
| -15015 | | sessionkey过期 |
|
||||
| -15016 | | goodsprice道具价格错误 |
|
||||
| 1 | | 虚拟支付接口错误码,用户取消支付 |
|
||||
| 2 | | 虚拟支付接口错误码,客户端错误,判断到小程序在用户处于支付中时,又发起了一笔支付请求 |
|
||||
| 3 | | 虚拟支付接口错误码,Android独有错误:用户使用GooglePlay支付,而手机未安装GooglePlay |
|
||||
| 4 | | 虚拟支付接口错误码,用户操作系统支付状态异常 |
|
||||
| 5 | | 虚拟支付接口错误码,操作系统错误 |
|
||||
| 6 | | 虚拟支付接口错误码,其他错误 |
|
||||
| 7 | | 虚拟支付接口错误码,支付取消 |
|
||||
| 1000 | | 参数错误 |
|
||||
| 1001 | | 分区未发布 |
|
||||
| 1003 | | 米大师Portal错误 |
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.RequestSubscribeLiveActivityOption.complete">
|
||||
<summary>
|
||||
接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
@ -10273,7 +10414,7 @@
|
||||
设置 IP_TTL 套接字选项,用于设置一个 IP 数据包传输时允许的最大跳步数
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:WeChatWASM.WXUDPSocket.Write">
|
||||
<member name="M:WeChatWASM.WXUDPSocket.Write(WeChatWASM.UDPSocketSendOption)">
|
||||
<summary>
|
||||
[UDPSocket.write()](https://developers.weixin.qq.com/minigame/dev/api/network/udp/UDPSocket.write.html)
|
||||
需要基础库: `2.15.0`
|
||||
@ -10619,11 +10760,5 @@
|
||||
注册监听录制事件的回调函数。当对应事件触发时,回调函数会被执行
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:PlayerPrefs">
|
||||
<summary>
|
||||
覆盖unity的PlayerPrefs
|
||||
注意:调用均为同步调用, 容易阻塞游戏主线程造成卡顿,不建议频繁调用
|
||||
</summary>
|
||||
</member>
|
||||
</members>
|
||||
</doc>
|
||||
|
||||
2
Runtime/Plugins/wx-runtime.xml.meta
Normal file → Executable file
2
Runtime/Plugins/wx-runtime.xml.meta
Normal file → Executable file
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a059cf8813f306b3aab52c161b8307af
|
||||
guid: de423af855aafb3345848a7a99fd7719
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
282
Runtime/WX.cs
282
Runtime/WX.cs
@ -108,9 +108,11 @@ namespace WeChatWASM
|
||||
|
||||
/// <summary>
|
||||
/// [wx.checkSession(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/login/wx.checkSession.html)
|
||||
/// 检查登录态是否过期。
|
||||
/// 通过 wx.login 接口获得的用户登录态拥有一定的时效性。用户越久未使用小程序,用户登录态越有可能失效。反之如果用户一直在使用小程序,则用户登录态一直保持有效。具体时效逻辑由微信维护,对开发者透明。开发者只需要调用 wx.checkSession 接口检测当前用户登录态是否有效。
|
||||
/// 登录态过期后开发者可以再调用 wx.login 获取新的用户登录态。调用成功说明当前 session_key 未过期,调用失败说明 session_key 已过期。
|
||||
/// 检查登录态 session_key 是否过期。
|
||||
/// session_key 具有唯一性,在使用小程序时,同一用户在同一时刻仅有一个有效的 session_key。
|
||||
/// 通过 wx.login 接口获得的用户登录态拥有一定的时效性。用户越久未使用小程序,用户登录态越有可能过期。反之如果用户一直在使用小程序,则用户登录态一直保持有效。具体时效逻辑由微信维护,对开发者透明。除了过期失效外,触发获取临时登录凭证 code 的操作([小程序登录](https://developers.weixin.qq.com/minigame/dev/guide/open-ability/login.html) 和 [数据预拉取](https://developers.weixin.qq.com/minigame/dev/guide/base-ability/pre-fetch.html))可能会生成新的登录态session_key,从而使旧的 session_key 被顶替而失效。
|
||||
/// 开发者可以调用 wx.checkSession 接口检测用户登录态是否过期。**注意,wx.checkSession 的校验对象是最后一次获取 code 操作对应的登录态 session_key**,调用成功说明该 session_key 未过期,调用失败说明 session_key 已过期。如果要校验指定的 session_key 是否有效,可以在开发者服务器后台调用 [checkSessionKey](#)。
|
||||
/// 登录态失效后开发者可以再调用 wx.login 获取新的用户登录态。
|
||||
/// **示例代码**
|
||||
/// ```js
|
||||
/// wx.checkSession({
|
||||
@ -150,8 +152,8 @@ namespace WeChatWASM
|
||||
/// maxDuration: 30,
|
||||
/// camera: 'back',
|
||||
/// success(res) {
|
||||
/// console.log(res.tempFiles.tempFilePath)
|
||||
/// console.log(res.tempFiles.size)
|
||||
/// console.log(res.tempFiles[0].tempFilePath)
|
||||
/// console.log(res.tempFiles[0].size)
|
||||
/// }
|
||||
/// })
|
||||
/// ```
|
||||
@ -224,7 +226,7 @@ namespace WeChatWASM
|
||||
/// <summary>
|
||||
/// [wx.compressImage(Object object)](https://developers.weixin.qq.com/minigame/dev/api/media/image/wx.compressImage.html)
|
||||
/// 需要基础库: `3.0.1`
|
||||
/// 压缩图片接口,可选压缩质量
|
||||
/// 压缩图片接口,可选压缩质量。iOS 仅支持压缩 JPG 格式图片。
|
||||
/// **示例代码**
|
||||
/// ```js
|
||||
/// wx.compressImage({
|
||||
@ -394,7 +396,7 @@ namespace WeChatWASM
|
||||
/// [wx.getBackgroundFetchData(object object)](https://developers.weixin.qq.com/minigame/dev/api/storage/background-fetch/wx.getBackgroundFetchData.html)
|
||||
/// 需要基础库: `3.0.1`
|
||||
/// 拉取 backgroundFetch 客户端缓存数据。
|
||||
/// 当调用接口时,若当次请求未结束,会先返回本地的旧数据(之前打开小程序时请求的),如果本地没有旧数据,安卓上会返回fail,不会等待请求完成,iOS上会返回success但fetchedData为空,也不会等待请求完成。
|
||||
/// 当调用接口时,若当次请求未结束,会先返回本地的旧数据(之前打开小程序时请求的),如果本地没有旧数据,安卓上会返回fail,不会等待请求完成,iOS上会返回success但fetchedData为空,也不会等待请求完成。建议和 [wx.onBackgroundFetchData](https://developers.weixin.qq.com/minigame/dev/api/storage/background-fetch/wx.onBackgroundFetchData.html) 配合使用
|
||||
/// </summary>
|
||||
public static void GetBackgroundFetchData(GetBackgroundFetchDataOption callback)
|
||||
{
|
||||
@ -413,7 +415,7 @@ namespace WeChatWASM
|
||||
|
||||
/// <summary>
|
||||
/// [wx.getBatteryInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/device/battery/wx.getBatteryInfo.html)
|
||||
/// 获取设备电量。同步 API [wx.getBatteryInfoSync](https://developers.weixin.qq.com/minigame/dev/api/device/battery/wx.getBatteryInfoSync.html) 在 iOS 上不可用。
|
||||
/// 获取设备电池信息。同步 API [wx.getBatteryInfoSync](https://developers.weixin.qq.com/minigame/dev/api/device/battery/wx.getBatteryInfoSync.html) 在 iOS 上不可用。
|
||||
/// </summary>
|
||||
public static void GetBatteryInfo(GetBatteryInfoOption callback)
|
||||
{
|
||||
@ -541,6 +543,25 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.GetConnectedBluetoothDevices(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.getDeviceBenchmarkInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/base/system/wx.getDeviceBenchmarkInfo.html)
|
||||
/// 需要基础库: `3.4.5`
|
||||
/// 获取设备性能得分和机型档位数据
|
||||
/// **示例代码**
|
||||
/// ```js
|
||||
/// wx.getDeviceBenchmarkInfo({
|
||||
/// success (res) {
|
||||
/// console.log(res.benchmarkLevel)
|
||||
/// console.log(res.modelLevel)
|
||||
/// }
|
||||
/// })
|
||||
/// ```
|
||||
/// </summary>
|
||||
public static void GetDeviceBenchmarkInfo(GetDeviceBenchmarkInfoOption callback)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.GetDeviceBenchmarkInfo(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.getExtConfig(Object object)](https://developers.weixin.qq.com/minigame/dev/api/ext/wx.getExtConfig.html)
|
||||
/// 需要基础库: `2.8.3`
|
||||
@ -857,36 +878,6 @@ namespace WeChatWASM
|
||||
|
||||
/// <summary>
|
||||
/// [wx.getSystemInfo(Object object)](https://developers.weixin.qq.com/minigame/dev/api/base/system/wx.getSystemInfo.html)
|
||||
/// 获取系统信息。**由于历史原因,wx.getSystemInfo 是异步的调用格式,但是是同步返回,需要异步获取系统信息请使用 [wx.getSystemInfoAsync](https://developers.weixin.qq.com/minigame/dev/api/base/system/wx.getSystemInfoAsync.html)。**
|
||||
/// **示例代码**
|
||||
/// [在微信开发者工具中查看示例](https://developers.weixin.qq.com/s/WkUCgXmS7mqO)
|
||||
/// ```js
|
||||
/// wx.getSystemInfo({
|
||||
/// success (res) {
|
||||
/// console.log(res.model)
|
||||
/// console.log(res.pixelRatio)
|
||||
/// console.log(res.windowWidth)
|
||||
/// console.log(res.windowHeight)
|
||||
/// console.log(res.language)
|
||||
/// console.log(res.version)
|
||||
/// console.log(res.platform)
|
||||
/// }
|
||||
/// })
|
||||
/// ```
|
||||
/// ```js
|
||||
/// try {
|
||||
/// const res = wx.getSystemInfoSync()
|
||||
/// console.log(res.model)
|
||||
/// console.log(res.pixelRatio)
|
||||
/// console.log(res.windowWidth)
|
||||
/// console.log(res.windowHeight)
|
||||
/// console.log(res.language)
|
||||
/// console.log(res.version)
|
||||
/// console.log(res.platform)
|
||||
/// } catch (e) {
|
||||
/// // Do something when catch error
|
||||
/// }
|
||||
/// ```
|
||||
/// </summary>
|
||||
public static void GetSystemInfo(GetSystemInfoOption callback)
|
||||
{
|
||||
@ -896,22 +887,6 @@ namespace WeChatWASM
|
||||
/// <summary>
|
||||
/// [wx.getSystemInfoAsync(Object object)](https://developers.weixin.qq.com/minigame/dev/api/base/system/wx.getSystemInfoAsync.html)
|
||||
/// 需要基础库: `2.25.3`
|
||||
/// 异步获取系统信息。需要一定的微信客户端版本支持,在不支持的客户端上,会使用同步实现来返回。
|
||||
/// **示例代码**
|
||||
/// [在微信开发者工具中查看示例](https://developers.weixin.qq.com/s/WkUCgXmS7mqO)
|
||||
/// ```js
|
||||
/// wx.getSystemInfoAsync({
|
||||
/// success (res) {
|
||||
/// console.log(res.model)
|
||||
/// console.log(res.pixelRatio)
|
||||
/// console.log(res.windowWidth)
|
||||
/// console.log(res.windowHeight)
|
||||
/// console.log(res.language)
|
||||
/// console.log(res.version)
|
||||
/// console.log(res.platform)
|
||||
/// }
|
||||
/// })
|
||||
/// ```
|
||||
/// </summary>
|
||||
public static void GetSystemInfoAsync(GetSystemInfoAsyncOption callback)
|
||||
{
|
||||
@ -1339,7 +1314,7 @@ namespace WeChatWASM
|
||||
/// <summary>
|
||||
/// [wx.openChannelsUserProfile(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/channels/wx.openChannelsUserProfile.html)
|
||||
/// 需要基础库: `2.21.2`
|
||||
/// 打开视频号主页
|
||||
/// 打开视频号主页。若为插件环境,只允许在插件页面中调用。
|
||||
/// </summary>
|
||||
public static void OpenChannelsUserProfile(OpenChannelsUserProfileOption callback)
|
||||
{
|
||||
@ -1593,7 +1568,9 @@ namespace WeChatWASM
|
||||
|
||||
/// <summary>
|
||||
/// [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)
|
||||
/// **buyQuantity 限制说明**
|
||||
/// 购买游戏币的时候,buyQuantity 不可任意填写。需满足 buyQuantity * 游戏币单价 = 限定的价格等级。如:游戏币单价为 0.1 元,一次购买最少数量是 10。
|
||||
/// 有效价格等级如下:
|
||||
@ -1634,6 +1611,46 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.RequestMidasPayment(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [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)
|
||||
/// **示例代码**
|
||||
/// ```js
|
||||
/// wx.requestMidasPaymentGameItem({
|
||||
/// signData: '{"mode":"goods","offerId":"123","buyQuantity":1,"env":0,"currencyType":"CNY","platform":"android","zoneId":"1","productId":"testproductId","goodsPrice":10,"outTradeNo":"xxxxxx","attach":"testdata"}',
|
||||
/// paySig: 'd0b8bbccbe34ed11549bcfd6602b08711f4acc0965253a949cd6a2b895152f9d',
|
||||
/// signature: 'd0b8bbccbe34ed11549bcfd6602b08711f4acc0965253a949cd6a2b895152f9d',
|
||||
/// success(res, errCode) {
|
||||
/// console.log('pay', res, errCode);
|
||||
/// },
|
||||
/// fail({
|
||||
/// errMsg,
|
||||
/// errCode
|
||||
/// }) {
|
||||
/// console.error(errMsg, errCode)
|
||||
/// }
|
||||
/// ```
|
||||
/// 支付签名代码实现
|
||||
/// ```python
|
||||
/// import hmac
|
||||
/// import hashlib
|
||||
/// import urllib.parse
|
||||
/// # sign_data 支付原串 注意这里sign_data需要和前端一致,原格式传递(包括空格和回车),建议后台下发,
|
||||
/// # appkey 米大师密钥
|
||||
/// # method 需要签名方法 requestMidasPaymentGameItem
|
||||
/// def gen_pay_sig(sign_data, appkey, method):
|
||||
/// need_encode_body = method + '&' + sign_data
|
||||
/// print(need_encode_body)
|
||||
/// return hmac.new(key=appkey.encode('utf-8'), msg=need_encode_body.encode('utf-8'),
|
||||
/// digestmod=hashlib.sha256).hexdigest()
|
||||
/// ```
|
||||
/// </summary>
|
||||
public static void RequestMidasPaymentGameItem(RequestMidasPaymentGameItemOption callback)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.RequestMidasPaymentGameItem(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.requestSubscribeMessage(Object object)](https://developers.weixin.qq.com/minigame/dev/api/open-api/subscribe-message/wx.requestSubscribeMessage.html)
|
||||
/// 需要基础库: `2.4.4`
|
||||
@ -1901,7 +1918,7 @@ namespace WeChatWASM
|
||||
/// 设置 [InnerAudioContext](https://developers.weixin.qq.com/minigame/dev/api/media/audio/InnerAudioContext.html) 的播放选项。设置之后对当前小程序全局生效。
|
||||
/// ****
|
||||
/// ## 注意事项
|
||||
/// - 为保证微信整体体验,speakerOn 为 true 时,客户端会忽略 mixWithOthers 参数的内容,强制与其它音频互斥
|
||||
/// - 为保证微信整体体验,speakerOn 为 true 时,客户端会忽略 mixWithOther 参数的内容,强制与其它音频互斥
|
||||
/// - 不支持在播放音频的过程中切换为扬声器播放,开发者如需切换可以先暂停当前播放的音频并记录下当前暂停的时间点,然后切换后重新从原来暂停的时间点开始播放音频
|
||||
/// - 目前 wx.setInnerAudioOption 接口不兼容 wx.createWebAudioContext 接口,也不兼容 wx.createInnerAudioContext 开启 useWebAudioImplement 的情况,将在后续版本中支持
|
||||
/// </summary>
|
||||
@ -1947,7 +1964,7 @@ namespace WeChatWASM
|
||||
|
||||
/// <summary>
|
||||
/// [wx.setStatusBarStyle(Object object)](https://developers.weixin.qq.com/minigame/dev/api/ui/statusbar/wx.setStatusBarStyle.html)
|
||||
/// 当在配置中设置 showStatusBarStyle 时,屏幕顶部会显示状态栏。此接口可以修改状态栏的样式。
|
||||
/// 当在配置中设置 showStatusBar 时,屏幕顶部会显示状态栏。此接口可以修改状态栏的样式。
|
||||
/// </summary>
|
||||
public static void SetStatusBarStyle(SetStatusBarStyleOption callback)
|
||||
{
|
||||
@ -1971,7 +1988,10 @@ namespace WeChatWASM
|
||||
/// <summary>
|
||||
/// [wx.setVisualEffectOnCapture(Object object)](https://developers.weixin.qq.com/minigame/dev/api/device/screen/wx.setVisualEffectOnCapture.html)
|
||||
/// 需要基础库: `3.1.4`
|
||||
/// 设置截屏/录屏时屏幕表现,仅支持在 Android 端调用
|
||||
/// 设置截屏/录屏时屏幕表现
|
||||
/// **Bug & Tip**
|
||||
/// 1. `tip`:iOS 要求基础库版本为 3.3.0 以上,且系统版本为 iOS 16 以上
|
||||
/// 2. `tip`:iOS 目前只支持处理录屏时的表现
|
||||
/// </summary>
|
||||
public static void SetVisualEffectOnCapture(SetVisualEffectOnCaptureOption callback)
|
||||
{
|
||||
@ -2064,6 +2084,9 @@ namespace WeChatWASM
|
||||
/// [wx.showShareImageMenu(Object object)](https://developers.weixin.qq.com/minigame/dev/api/share/wx.showShareImageMenu.html)
|
||||
/// 需要基础库: `2.14.3`
|
||||
/// 打开分享图片弹窗,可以将图片发送给朋友、收藏或下载
|
||||
/// **Bug & Tip**
|
||||
/// 1. `tip`: `needShowEntrance`分享的图片消息是否要带小程序入口,支持申明类目:商家自营、电商平台、餐饮服务(餐饮服务场所/餐饮服务管理企业、点餐平台、外卖平台)、旅游服务(住宿服务、景区服务、OTA、旅游管理单位)、生活服务(家政服务、丽人服务、宠物(非医院类)、婚庆服务、洗浴保健、休闲娱乐、百货/超市/便利店、开锁服务、营业性演出票务、其他宠物健康服务、洗浴保健平台、共享服务、跑腿、寄存、求职/招聘)
|
||||
/// 2. `tip`: `needShowEntrance`小游戏所有类目都支持
|
||||
/// </summary>
|
||||
public static void ShowShareImageMenu(ShowShareImageMenuOption callback)
|
||||
{
|
||||
@ -2464,15 +2487,6 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.OpenPage(callback);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.requestMidasPaymentGameItem(Object object)]
|
||||
/// 发起米大师支付
|
||||
/// </summary>
|
||||
public static void RequestMidasPaymentGameItem(RequestMidasPaymentGameItemOption callback)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.RequestMidasPaymentGameItem(callback);
|
||||
}
|
||||
|
||||
public static void RequestSubscribeLiveActivity(RequestSubscribeLiveActivityOption callback)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.RequestSubscribeLiveActivity(callback);
|
||||
@ -2542,22 +2556,6 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.ReportEvent(eventId, data);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.reportMonitor(string name, number value)](https://developers.weixin.qq.com/minigame/dev/api/data-analysis/wx.reportMonitor.html)
|
||||
/// 需要基础库: `2.1.2`
|
||||
/// 自定义业务数据监控上报接口。
|
||||
/// **使用说明**
|
||||
/// 使用前,需要在「小程序管理后台-运维中心-性能监控-业务数据监控」中新建监控事件,配置监控描述与告警类型。每一个监控事件对应唯一的监控ID,开发者最多可以创建128个监控事件。
|
||||
/// **示例代码**
|
||||
/// ```js
|
||||
/// wx.reportMonitor('1', 1)
|
||||
/// ```
|
||||
/// </summary>
|
||||
public static void ReportMonitor(string name, double value)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.ReportMonitor(name, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.reportPerformance(Number id, Number value, String|Array dimensions)](https://developers.weixin.qq.com/minigame/dev/api/base/performance/wx.reportPerformance.html)
|
||||
/// 需要基础库: `2.10.0`
|
||||
@ -2651,6 +2649,9 @@ namespace WeChatWASM
|
||||
/// <summary>
|
||||
/// [wx.shareAppMessage(Object object)](https://developers.weixin.qq.com/minigame/dev/api/share/wx.shareAppMessage.html)
|
||||
/// 主动拉起转发,进入选择通讯录界面。
|
||||
/// ****
|
||||
/// ## 注意事项
|
||||
/// - 转发图片说明:仅当自定义分享图片权限被封禁时用 imageUrlId,其他情况都会用 imageUrl。 imageUrl 不填时使用游戏画面截图。
|
||||
/// </summary>
|
||||
public static void ShareAppMessage(ShareAppMessageOption option)
|
||||
{
|
||||
@ -3107,6 +3108,28 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.OffMemoryWarning(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.onMenuButtonBoundingClientRectWeightChange(function listener)](https://developers.weixin.qq.com/minigame/dev/api/ui/menu/wx.onMenuButtonBoundingClientRectWeightChange.html)
|
||||
/// 需要基础库: `3.4.3`
|
||||
/// 监听菜单按钮(右上角胶囊按钮)的布局位置信息变化事件
|
||||
/// **示例代码**
|
||||
/// ```js
|
||||
/// const callback = res => console.log('menuButtonBoundingClientRectWeightChange', res)
|
||||
/// wx.onMenuButtonBoundingClientRectWeightChange(callback)
|
||||
/// // 取消监听
|
||||
/// wx.offMenuButtonBoundingClientRectWeightChange(callback)
|
||||
/// ```
|
||||
/// </summary>
|
||||
public static void OnMenuButtonBoundingClientRectWeightChange(Action<OnMenuButtonBoundingClientRectWeightChangeListenerResult> result)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.OnMenuButtonBoundingClientRectWeightChange(result);
|
||||
}
|
||||
|
||||
public static void OffMenuButtonBoundingClientRectWeightChange(Action<OnMenuButtonBoundingClientRectWeightChangeListenerResult> result)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.OffMenuButtonBoundingClientRectWeightChange(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [wx.onMessage(function callback)](https://developers.weixin.qq.com/minigame/dev/api/open-api/context/wx.onMessage.html)
|
||||
/// 监听主域发送的消息
|
||||
@ -3270,17 +3293,28 @@ namespace WeChatWASM
|
||||
/// ```js
|
||||
/// wx.onUserCaptureScreen(function (res) {
|
||||
/// console.log('用户截屏了')
|
||||
/// return {
|
||||
/// query: "parameter=test", // 通过截屏图片打开小程序的query参数
|
||||
/// promise: new Promise((resolve) => { // 通过promise延时传递小程序的query参数
|
||||
/// setTimeout(() => {
|
||||
/// resolve({
|
||||
/// query: "parameter=test2",
|
||||
/// })
|
||||
/// }, 1000) // 在1秒内对query进行解析
|
||||
/// })
|
||||
/// }
|
||||
/// }
|
||||
/// )
|
||||
/// ```
|
||||
/// </summary>
|
||||
public static void OnUserCaptureScreen(Action<GeneralCallbackResult> res)
|
||||
public static void OnUserCaptureScreen(Action<OnUserCaptureScreenListenerResult> result)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.OnUserCaptureScreen(res);
|
||||
WXSDKManagerHandler.Instance.OnUserCaptureScreen(result);
|
||||
}
|
||||
|
||||
public static void OffUserCaptureScreen(Action<GeneralCallbackResult> res)
|
||||
public static void OffUserCaptureScreen(Action<OnUserCaptureScreenListenerResult> result)
|
||||
{
|
||||
WXSDKManagerHandler.Instance.OffUserCaptureScreen(res);
|
||||
WXSDKManagerHandler.Instance.OffUserCaptureScreen(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -3420,6 +3454,9 @@ namespace WeChatWASM
|
||||
/// [wx.onShareTimeline(function listener)](https://developers.weixin.qq.com/minigame/dev/api/share/wx.onShareTimeline.html)
|
||||
/// 需要基础库: `2.11.3`
|
||||
/// 监听用户点击右上角菜单的「分享到朋友圈」按钮时触发的事件。本接口为 Beta 版本,暂只在 Android 平台支持。
|
||||
/// ****
|
||||
/// ## 注意事项
|
||||
/// - 转发图片说明:仅当自定义分享图片权限被封禁时用 imageUrlId,其他情况都会用 imageUrl。 imageUrl 不填时使用当前游戏的icon。
|
||||
/// </summary>
|
||||
public static void OnShareTimeline(Action<Action<OnShareTimelineListenerResult>> callback)
|
||||
{
|
||||
@ -3696,36 +3733,6 @@ namespace WeChatWASM
|
||||
|
||||
/// <summary>
|
||||
/// [Object wx.getSystemInfoSync()](https://developers.weixin.qq.com/minigame/dev/api/base/system/wx.getSystemInfoSync.html)
|
||||
/// [wx.getSystemInfo](https://developers.weixin.qq.com/minigame/dev/api/base/system/wx.getSystemInfo.html) 的同步版本
|
||||
/// **示例代码**
|
||||
/// [在微信开发者工具中查看示例](https://developers.weixin.qq.com/s/WkUCgXmS7mqO)
|
||||
/// ```js
|
||||
/// wx.getSystemInfo({
|
||||
/// success (res) {
|
||||
/// console.log(res.model)
|
||||
/// console.log(res.pixelRatio)
|
||||
/// console.log(res.windowWidth)
|
||||
/// console.log(res.windowHeight)
|
||||
/// console.log(res.language)
|
||||
/// console.log(res.version)
|
||||
/// console.log(res.platform)
|
||||
/// }
|
||||
/// })
|
||||
/// ```
|
||||
/// ```js
|
||||
/// try {
|
||||
/// const res = wx.getSystemInfoSync()
|
||||
/// console.log(res.model)
|
||||
/// console.log(res.pixelRatio)
|
||||
/// console.log(res.windowWidth)
|
||||
/// console.log(res.windowHeight)
|
||||
/// console.log(res.language)
|
||||
/// console.log(res.version)
|
||||
/// console.log(res.platform)
|
||||
/// } catch (e) {
|
||||
/// // Do something when catch error
|
||||
/// }
|
||||
/// ```
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static SystemInfo GetSystemInfoSync()
|
||||
@ -3776,14 +3783,19 @@ namespace WeChatWASM
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [[ImageData](https://developers.weixin.qq.com/minigame/dev/api/render/image/ImageData.html) wx.createImageData()](https://developers.weixin.qq.com/minigame/dev/api/render/image/wx.createImageData.html)
|
||||
/// 需要基础库: `2.24.6`
|
||||
/// 创建一个 ImageData 图片数据对象
|
||||
/// [[ImageData](https://developers.weixin.qq.com/minigame/dev/api/render/image/ImageData.html) wx.createImageData(number width, number height)](https://developers.weixin.qq.com/minigame/dev/api/render/image/wx.createImageData.html)
|
||||
/// 需要基础库: `3.4.10`
|
||||
/// 这里有两种使用方法, 一种是指定ImageData的宽和高, 另外一种是使用ImageData, 通过它本身的宽高尺寸来构建新的对象。
|
||||
/// **示例代码**
|
||||
/// ```js
|
||||
/// const imageData1 = wx.createImageData(100, 100)
|
||||
/// const imageData2 = wx.createImageData(imageData1)
|
||||
/// ```
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ImageData CreateImageData()
|
||||
public static ImageData CreateImageData(double width, double height)
|
||||
{
|
||||
return WXSDKManagerHandler.Instance.CreateImageData();
|
||||
return WXSDKManagerHandler.Instance.CreateImageData(width, height);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -3840,6 +3852,30 @@ namespace WeChatWASM
|
||||
/// <summary>
|
||||
/// [boolean wx.setMessageToFriendQuery(Object object)](https://developers.weixin.qq.com/minigame/dev/api/share/wx.setMessageToFriendQuery.html)
|
||||
/// 设置 wx.shareMessageToFriend 接口 query 字段的值
|
||||
/// **提示</title>
|
||||
/// 1. 此处的 query 参数与 wx.onShow 取到的启动查询参数 query 不是同一个概念,仅仅是启动查询参数会增加一个字段为 query。
|
||||
/// 2. query 参数如涉及 "?"和"&" 等特殊符号,需自行进行 encodeURIComponent 和 decodeURIComponent 等操作。
|
||||
/// <title>示例代码</title>
|
||||
/// ```js
|
||||
/// // 发送方
|
||||
/// wx.setMessageToFriendQuery({
|
||||
/// shareMessageToFriendScene: 1,
|
||||
/// query: 'testquery'
|
||||
/// })
|
||||
/// // 预期接收方可以通过以下方式拿到设置
|
||||
/// wx.getEnterOptionsSync().query.shareMessageToFriendScene // 1
|
||||
/// wx.getEnterOptionsSync().query.query // 'testquery'
|
||||
/// <title>示例代码-特殊字符query**
|
||||
/// ```js
|
||||
/// // 发送方
|
||||
/// wx.setMessageToFriendQuery({
|
||||
/// query: encodeURIComponent('foo=1&bar=2') // 如果 query 涉及特殊符号,需要自行 encodeURIComponent
|
||||
/// })
|
||||
/// // 接收方
|
||||
/// // 预期可以通过以下方式拿到设置
|
||||
/// wx.getEnterOptionsSync().query.query // 此处拿到的是 'foo%3D1%26bar%3D2',需要 decodeURIComponent
|
||||
/// decodeURIComponent(wx.getEnterOptionsSync().query.query) // 'foo=1&bar=2'
|
||||
/// ```
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static bool SetMessageToFriendQuery(SetMessageToFriendQueryOption option)
|
||||
|
||||
@ -37,7 +37,7 @@ namespace WeChatWASM
|
||||
/// <summary>
|
||||
/// Gets 云函数
|
||||
/// </summary>
|
||||
public static Cloud cloud
|
||||
public static WXCloud cloud
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -265,7 +265,7 @@ namespace WeChatWASM
|
||||
/// <returns>对banner广告做操作的对象,详见 https://developers.weixin.qq.com/minigame/dev/api/ad/BannerAd.html </returns>
|
||||
/// <example>
|
||||
/// // 底部banner广告示例
|
||||
/// var sysInfo = WX.GetSystemInfoSync();
|
||||
/// var windowInfo = WX.GetWindowInfo();
|
||||
/// var banner = WX.CreateBannerAd(new WXCreateBannerAdParam()
|
||||
/// {
|
||||
/// adUnitId = "adunit-2e20328227ca771b",
|
||||
@ -273,8 +273,8 @@ namespace WeChatWASM
|
||||
/// style = new Style()
|
||||
/// {
|
||||
/// left = 0,
|
||||
/// top = sysInfo.windowHeight - 100,
|
||||
/// width = sysInfo.windowWidth,
|
||||
/// top = windowInfo.windowHeight - 100,
|
||||
/// width = windowInfo.windowWidth,
|
||||
/// height = 100
|
||||
/// }
|
||||
/// });
|
||||
@ -288,7 +288,7 @@ namespace WeChatWASM
|
||||
/// banner.OnResize((WXADResizeResponse res) =>
|
||||
/// {
|
||||
/// // 拉取的广告可能跟设置的不一样,需要动态调整位置
|
||||
/// banner.style.top = sysInfo.windowHeight - res.height;
|
||||
/// banner.style.top = windowInfo.windowHeight - res.height;
|
||||
/// });
|
||||
/// </example>
|
||||
public static WXBannerAd CreateBannerAd(WXCreateBannerAdParam param)
|
||||
@ -1088,6 +1088,16 @@ namespace WeChatWASM
|
||||
{
|
||||
WXSDKManagerHandler.Instance.SetDevicePixelRatio(ratio);
|
||||
}
|
||||
|
||||
public static void CallJSFunction(string sdkName, string functionName, params object[] args)
|
||||
{
|
||||
WXSDKManagerHandler.CallJSFunction(sdkName, functionName, args);
|
||||
}
|
||||
|
||||
public static string CallJSFunctionWithReturn(string sdkName, string functionName, params object[] args)
|
||||
{
|
||||
return WXSDKManagerHandler.CallJSFunctionWithReturn(sdkName, functionName, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -37,7 +37,11 @@ public class WXTouchInputOverride : BaseInput
|
||||
protected override void OnEnable()
|
||||
{
|
||||
base.OnEnable();
|
||||
if (string.IsNullOrEmpty(WeChatWASM.WX.GetSystemInfoSync().platform)) return;
|
||||
#if UNITY_WEBGL && !UNITY_EDITOR
|
||||
if (string.IsNullOrEmpty(WeChatWASM.WX.GetDeviceInfo().platform)) return;
|
||||
#else
|
||||
return;
|
||||
#endif
|
||||
InitWechatTouchEvents();
|
||||
if (_standaloneInputModule)
|
||||
{
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
/* eslint-disable no-multi-assign */
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
const { version, SDKVersion, platform, system } = wx.getSystemInfoSync();
|
||||
const { version, SDKVersion } = wx.getAppBaseInfo();
|
||||
const { platform, system } = wx.getDeviceInfo();
|
||||
const accountInfo = wx.getAccountInfoSync();
|
||||
const envVersion = accountInfo?.miniProgram?.envVersion;
|
||||
function compareVersion(v1, v2) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 72d6dce4f8fc2897d45ce801d61a4dc2
|
||||
guid: dfff26b194fcccc4836285fa0d9c0d98
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a2d4f5bdedb1bc3b95c91a779ba77ec6
|
||||
guid: 0049d0f6061b1e8a1d11e3c8a6f51c58
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 59cfd066f14f854efa857ecb2fadcf4f
|
||||
guid: 78b4f9b66b4ef54343f8210d1d7dcf37
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -27,7 +27,7 @@ const managerConfig = {
|
||||
'$PRELOAD_LIST',
|
||||
],
|
||||
contextConfig: {
|
||||
contextType: $WEBGL_VERSION, // 1=>webgl1 2=>webgl2 3=>auto
|
||||
contextType: $WEBGL_VERSION, // 1: webgl1 2: webgl2
|
||||
},
|
||||
};
|
||||
GameGlobal.managerConfig = managerConfig;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7ec0c02137f9d2e4044b68f37374cd7d
|
||||
guid: 346bd4ce2b7e4fcdaaf65746ccfe18b8
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4a9ed3cdd5ee4249a9a0e9d362af10f1
|
||||
guid: 024ca1065c8725c7da91d414adeaebcc
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e1e18f34ba2da9dc774aaa9f71b6c65d
|
||||
guid: e153810f3d908c09402b1de52a2c23b7
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 018bde0dd2339559e0356d0d2b9de69e
|
||||
guid: 11dd176fc1f5763a66b9cf6e96766e1a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a68c82a0213815cacd975d33bf6afd9b
|
||||
guid: 275b9053c1217c6fb339ddf01a70fe97
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0fa0f0271021426b2080ded743c8b0bf
|
||||
guid: 4abc0a85963dbc9c44ab415846d2d819
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8d11e31e7caca540fdc766f871122c80
|
||||
guid: 8defb801cbc327f969bb74ab754b1499
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7cb5c1387d3b2acb3ce5356ce57380e6
|
||||
guid: 0554c15248641a77422e4321e87ec5a9
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 02a12edbd7b0f6ee4ba77232630ca383
|
||||
guid: 2173c453da6f220bbe3f67b0cc688d24
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 59779c16150d1f382b45ba4866e7dd1c
|
||||
guid: 9c84e5670db8ba2d6316748b335fa4f3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2532269bcf252fcee88ecba03de5d72d
|
||||
guid: 205163e0430708e6e4e98d238a23bd12
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: edf0798181946fe765cffbfa275107b8
|
||||
guid: d027adf4a47b067b93d92b90e97df14c
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4f35c0f99890aa7167a8b793ef796f7b
|
||||
guid: c9a520b8c082c7c66ab3c9ed7e2592e8
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e7f5cdaff48140433dfab80dcc60ff50
|
||||
guid: f286400bf5a5dd464e32679edbfdf870
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e20c703a4afeffbc151a8529e610628f
|
||||
guid: be48d8d78bf5fe4f9b2bb61326ceb68f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f2d4bf3f9e7cca52022c9916a0bc805a
|
||||
guid: 2619a7f06552fc01b5a8514b099e7d95
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9fb683a8d8682a682df92d7d4b57bccd
|
||||
guid: ecb963dac01198dcbd821061e80d2644
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d13bcdff7663b0186343ad1cd5f01351
|
||||
guid: 83c829342257482611520c070088a416
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aa6c5025c4f439deebc67f3c201ce3fe
|
||||
guid: 330c15ba312b59cacf402404167dafd2
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 473696906e6decf639a7b151b55b06d0
|
||||
guid: 936ded143a689e661e4ac8ea9a1cdec5
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a7633767ecff0c165078c8a39a65f57d
|
||||
guid: 11fac6e9e0484229c4658ba15ef7fccf
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3e974b94f0607e60e2ed654660c28197
|
||||
guid: b080a050fe6ddf4f0b4196e8307dab15
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7fd5bda63363df9354b79c947a54c9dc
|
||||
guid: f3384687b60f40f3286651d6c5cb27f9
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b2f277527f24b913e7191f7a03bfda7d
|
||||
guid: 5872a7ef8cecb95ddf48fbcdc8dd6a92
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6ec5bc93a18bd82ab155bb0f188c2330
|
||||
guid: 59696b55e9ee3fa501d2201508f1f1df
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 62e052f5b55673e931795d2d026560aa
|
||||
guid: 78690af98535c4021782890b8928bcb3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 455e8dee47c748b7f399c53bac8a19f5
|
||||
guid: 339bab12edc7add74458b1d74d10fd19
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -131,62 +131,50 @@ function bindGloblException() {
|
||||
console.error('unhandledRejection:', result.reason);
|
||||
});
|
||||
// 上报初始信息
|
||||
function printSystemInfo(systemInfo) {
|
||||
GameGlobal.systemInfoCached = systemInfo;
|
||||
const { version, SDKVersion, platform, renderer, system } = systemInfo;
|
||||
function printSystemInfo(appBaseInfo, deviceInfo) {
|
||||
const { version, SDKVersion } = appBaseInfo;
|
||||
const { platform, system } = deviceInfo;
|
||||
unityNamespace.version = version;
|
||||
unityNamespace.SDKVersion = SDKVersion;
|
||||
unityNamespace.platform = platform;
|
||||
unityNamespace.renderer = renderer;
|
||||
unityNamespace.system = system;
|
||||
unityNamespace.isPc = platform === 'windows' || platform === 'mac';
|
||||
unityNamespace.isDevtools = platform === 'devtools';
|
||||
unityNamespace.isMobile = !unityNamespace.isPc && !unityNamespace.isDevtools;
|
||||
unityNamespace.isH5Renderer = unityNamespace.isMobile && unityNamespace.renderer === 'h5';
|
||||
unityNamespace.isH5Renderer = GameGlobal.isIOSHighPerformanceMode;
|
||||
unityNamespace.isIOS = platform === 'ios';
|
||||
unityNamespace.isAndroid = platform === 'android';
|
||||
const bootinfo = {
|
||||
renderer: systemInfo.renderer || '',
|
||||
renderer: GameGlobal.isIOSHighPerformanceMode ? 'h5' : '',
|
||||
isH5Plus: GameGlobal.isIOSHighPerformanceModePlus || false,
|
||||
abi: systemInfo.abi || '',
|
||||
brand: systemInfo.brand,
|
||||
model: systemInfo.model,
|
||||
platform: systemInfo.platform,
|
||||
system: systemInfo.system,
|
||||
version: systemInfo.version,
|
||||
SDKVersion: systemInfo.SDKVersion,
|
||||
benchmarkLevel: systemInfo.benchmarkLevel,
|
||||
abi: deviceInfo.abi || '',
|
||||
brand: deviceInfo.brand,
|
||||
model: deviceInfo.model,
|
||||
platform: deviceInfo.platform,
|
||||
system: deviceInfo.system,
|
||||
version: appBaseInfo.version,
|
||||
SDKVersion: appBaseInfo.SDKVersion,
|
||||
benchmarkLevel: deviceInfo.benchmarkLevel,
|
||||
};
|
||||
GameGlobal.realtimeLogManager.info('game starting', bootinfo);
|
||||
GameGlobal.logmanager.info('game starting', bootinfo);
|
||||
console.info('game starting', bootinfo);
|
||||
}
|
||||
const systemInfoSync = wx.getSystemInfoSync();
|
||||
const isEmptySystemInfo = systemInfoSync && Object.keys(systemInfoSync).length === 0;
|
||||
// iOS会出现getSystemInfoSync返回空对象的情况,使用异步方法替代
|
||||
if (isEmptySystemInfo) {
|
||||
wx.getSystemInfo({
|
||||
success(systemInfo) {
|
||||
printSystemInfo(systemInfo);
|
||||
},
|
||||
});
|
||||
}
|
||||
else {
|
||||
printSystemInfo(systemInfoSync);
|
||||
}
|
||||
const appBaseInfo = wx.getAppBaseInfo();
|
||||
const deviceInfo = wx.getDeviceInfo();
|
||||
printSystemInfo(appBaseInfo, deviceInfo);
|
||||
}
|
||||
bindGloblException();
|
||||
// eslint-disable-next-line no-multi-assign
|
||||
GameGlobal.onCrash = GameGlobal.unityNamespace.onCrash = function () {
|
||||
GameGlobal.manager.showAbort();
|
||||
// 避免已经修改屏幕尺寸,故不使用缓存的systeminfo
|
||||
const sysInfo = wx.getSystemInfoSync();
|
||||
const windowInfo = wx.getWindowInfo();
|
||||
wx.createFeedbackButton({
|
||||
type: 'text',
|
||||
text: '提交反馈',
|
||||
style: {
|
||||
left: (sysInfo.screenWidth - 184) / 2,
|
||||
top: sysInfo.screenHeight / 3 + 140,
|
||||
left: (windowInfo.screenWidth - 184) / 2,
|
||||
top: windowInfo.screenHeight / 3 + 140,
|
||||
width: 184,
|
||||
height: 40,
|
||||
lineHeight: 40,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 16e3f2377b457ce84bab2c0dc79372ad
|
||||
guid: 279fffcbffaf497fd5f57b40c10216ce
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7915839ff66cc08534f380f28d421a23
|
||||
guid: fcc0095aea70befe56bd21c25383a8ea
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -150,12 +150,33 @@ function WX_UDPSocketSetTTL(id, ttl) {
|
||||
}
|
||||
obj.setTTL(ttl);
|
||||
}
|
||||
function WX_UDPSocketWrite(id) {
|
||||
function WX_UDPSocketWriteString(id, data, param) {
|
||||
const obj = getUDPSocketObject(id);
|
||||
if (!obj) {
|
||||
return;
|
||||
}
|
||||
obj.write();
|
||||
const config = formatJsonStr(param);
|
||||
obj.write({
|
||||
address: config.address,
|
||||
message: data,
|
||||
port: config.port,
|
||||
setBroadcast: config.setBroadcast,
|
||||
});
|
||||
}
|
||||
function WX_UDPSocketWriteBuffer(id, dataPtr, dataLength, param) {
|
||||
const obj = getUDPSocketObject(id);
|
||||
if (!obj) {
|
||||
return;
|
||||
}
|
||||
const config = formatJsonStr(param);
|
||||
obj.write({
|
||||
address: config.address,
|
||||
message: GameGlobal.Module.HEAPU8.buffer.slice(dataPtr, dataPtr + dataLength),
|
||||
port: config.port,
|
||||
length: config.length,
|
||||
offset: config.offset,
|
||||
setBroadcast: config.setBroadcast,
|
||||
});
|
||||
}
|
||||
function WX_UDPSocketBind(id, param) {
|
||||
const obj = getUDPSocketObject(id);
|
||||
@ -184,6 +205,7 @@ export default {
|
||||
WX_UDPSocketSendString,
|
||||
WX_UDPSocketSendBuffer,
|
||||
WX_UDPSocketSetTTL,
|
||||
WX_UDPSocketWrite,
|
||||
WX_UDPSocketWriteString,
|
||||
WX_UDPSocketWriteBuffer,
|
||||
WX_RegisterUDPSocketOnMessageCallback,
|
||||
};
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ad0c2af65d2aaa61039b1a91f60c965e
|
||||
guid: 5994681562af0b3d9ba702001f65a00a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -34,7 +34,7 @@ export default {
|
||||
return key;
|
||||
},
|
||||
WXCreateFixedBottomMiddleBannerAd(adUnitId, adIntervals, height) {
|
||||
const info = wx.getSystemInfoSync();
|
||||
const info = wx.getWindowInfo();
|
||||
const ad = wx.createBannerAd({
|
||||
adUnitId,
|
||||
adIntervals,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4ca24a076f21f26128fcda26c99ff736
|
||||
guid: 94dd20feb7ffba1bcb5c02b813700aa3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b9a20da3800ed88e020b6a62126c4702
|
||||
guid: aedcacd4afcfea4164d7355d187bbc96
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ac82fe9291b4bfbf76796bc4d7098c9e
|
||||
guid: 032114c13bfb8f6613f984d9aa25a900
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0020cf35611516ccea666c36102ebf84
|
||||
guid: 6080dba0dbe45662337ab5a5d3f29c01
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6ac05f55130b3aa93cd6ef326374a2e8
|
||||
guid: 3bf2aca4b5c8b57bf921b0b8ec8c6ca0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 52cfb592dc9faceedd5a4aaa660d1f3e
|
||||
guid: 24a9b606b3d3def8f1eca8a584fc8017
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1033,12 +1033,12 @@ export default {
|
||||
WEBAudio.lOrientation.yUp = yUp;
|
||||
WEBAudio.lOrientation.zUp = zUp;
|
||||
if (WEBAudio.audioContext.listener.forwardX) {
|
||||
WEBAudio.audioContext.listener.forwardX.setValueAtTime(-x, WEBAudio.audioContext.currentTime);
|
||||
WEBAudio.audioContext.listener.forwardY.setValueAtTime(-y, WEBAudio.audioContext.currentTime);
|
||||
WEBAudio.audioContext.listener.forwardZ.setValueAtTime(-z, WEBAudio.audioContext.currentTime);
|
||||
WEBAudio.audioContext.listener.upX.setValueAtTime(xUp, WEBAudio.audioContext.currentTime);
|
||||
WEBAudio.audioContext.listener.upY.setValueAtTime(yUp, WEBAudio.audioContext.currentTime);
|
||||
WEBAudio.audioContext.listener.upZ.setValueAtTime(zUp, WEBAudio.audioContext.currentTime);
|
||||
WEBAudio.audioContext.listener.forwardX = -x;
|
||||
WEBAudio.audioContext.listener.forwardY = -y;
|
||||
WEBAudio.audioContext.listener.forwardZ = -z;
|
||||
WEBAudio.audioContext.listener.upX = xUp;
|
||||
WEBAudio.audioContext.listener.upY = yUp;
|
||||
WEBAudio.audioContext.listener.upZ = zUp;
|
||||
}
|
||||
else {
|
||||
WEBAudio.audioContext.listener.setOrientation(-x, -y, -z, xUp, yUp, zUp);
|
||||
@ -1061,9 +1061,9 @@ export default {
|
||||
WEBAudio.lPosition.y = y;
|
||||
WEBAudio.lPosition.z = z;
|
||||
if (WEBAudio.audioContext.listener.positionX) {
|
||||
WEBAudio.audioContext.listener.positionX.setValueAtTime(x, WEBAudio.audioContext.currentTime);
|
||||
WEBAudio.audioContext.listener.positionY.setValueAtTime(y, WEBAudio.audioContext.currentTime);
|
||||
WEBAudio.audioContext.listener.positionZ.setValueAtTime(z, WEBAudio.audioContext.currentTime);
|
||||
WEBAudio.audioContext.listener.positionX = x;
|
||||
WEBAudio.audioContext.listener.positionY = y;
|
||||
WEBAudio.audioContext.listener.positionZ = z;
|
||||
}
|
||||
else {
|
||||
WEBAudio.audioContext.listener.setPosition(x, y, z);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e3304f73e6fd57ceed8d59be6fefc04a
|
||||
guid: d62706452a9b364af672a89f565e6189
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 99543aed462d8c06b7ed83009a04cf79
|
||||
guid: 2d8dd05752a3ed24b64e7a3226d8fae4
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 37d6c89cb9a832b610c5c23cb3f808c0
|
||||
guid: 586bcbf250349c2742923940a95827f4
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1c6f77f8b5f01b8c19a73d84cf0b780c
|
||||
guid: 903da1af9a2f041bc456493bf2bb8a80
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f817a176c576ff473ef5d3444e8c2643
|
||||
guid: 5a22d9ae11fe1d03e8fc02ce1b219499
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 68f8f465fdafa7882b0af50892a53c33
|
||||
guid: b669305590280dd077c797b5986c8d0a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b8b705a1320c936bd0ea596851bba410
|
||||
guid: 41cefd8e4c8eaa5d2f5c52b8aaf291ea
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e3380dcf693977eacbdb98eb9bd1df40
|
||||
guid: 633fe153e1c65ad8d0c75415d1848594
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,37 +1,252 @@
|
||||
import response from './response';
|
||||
import { formatJsonStr } from './utils';
|
||||
import moduleHelper from './module-helper';
|
||||
import { uid, formatJsonStr, formatResponse } from './utils';
|
||||
const CloudIDObject = {};
|
||||
function fixWXCallFunctionData(data) {
|
||||
|
||||
for (const key in data) {
|
||||
const CDNObject = {};
|
||||
function fixCallFunctionData(data) {
|
||||
Object.keys(data).forEach((key) => {
|
||||
if (typeof data[key] === 'object') {
|
||||
fixWXCallFunctionData(data[key]);
|
||||
fixCallFunctionData(data[key]);
|
||||
}
|
||||
else if (typeof data[key] === 'string' && CloudIDObject[data[key]]) {
|
||||
else if (typeof data[key] === 'string') {
|
||||
if (CloudIDObject[data[key]]) {
|
||||
data[key] = CloudIDObject[data[key]];
|
||||
}
|
||||
if (CDNObject[data[key]]) {
|
||||
data[key] = CDNObject[data[key]];
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
const CloudList = {};
|
||||
export default {
|
||||
WXCallFunctionInit(conf) {
|
||||
const config = formatJsonStr(conf);
|
||||
wx.cloud.init(config);
|
||||
WX_CloudCloud(option) {
|
||||
const config = formatJsonStr(option);
|
||||
|
||||
const cloud = new wx.cloud.Cloud(config);
|
||||
CloudList[config.resourceEnv] = cloud;
|
||||
},
|
||||
WX_CloudInit(option) {
|
||||
const config = formatJsonStr(option);
|
||||
if (config.env === '_default_') {
|
||||
wx.cloud.init();
|
||||
}
|
||||
else {
|
||||
CloudList[config.env].init(config);
|
||||
}
|
||||
},
|
||||
WX_CloudCallFunction(env, conf, callbackId) {
|
||||
const config = formatJsonStr(conf);
|
||||
if (config.data) {
|
||||
fixCallFunctionData(config.data);
|
||||
}
|
||||
let targetCloud;
|
||||
if (env === '_default_') {
|
||||
targetCloud = wx.cloud;
|
||||
}
|
||||
else {
|
||||
targetCloud = CloudList[env];
|
||||
}
|
||||
targetCloud.callFunction({
|
||||
...config,
|
||||
success(res) {
|
||||
formatResponse('CallFunctionResult', res);
|
||||
moduleHelper.send('_CloudCallFunctionCallback', JSON.stringify({
|
||||
callbackId, type: 'success', res: JSON.stringify(res),
|
||||
}));
|
||||
},
|
||||
fail(res) {
|
||||
formatResponse('GeneralCallbackResult', res);
|
||||
moduleHelper.send('_CloudCallFunctionCallback', JSON.stringify({
|
||||
callbackId, type: 'fail', res: JSON.stringify(res),
|
||||
}));
|
||||
},
|
||||
complete(res) {
|
||||
formatResponse('GeneralCallbackResult', res);
|
||||
moduleHelper.send('_CloudCallFunctionCallback', JSON.stringify({
|
||||
callbackId, type: 'complete', res: JSON.stringify(res),
|
||||
}));
|
||||
},
|
||||
WXCallFunction(name, data, conf, s, f, c) {
|
||||
const d = JSON.parse(data);
|
||||
fixWXCallFunctionData(d);
|
||||
wx.cloud.callFunction({
|
||||
name,
|
||||
data: d,
|
||||
config: conf === '' ? null : JSON.parse(conf),
|
||||
...response.handlecloudCallFunction(s, f, c),
|
||||
});
|
||||
},
|
||||
WXCloudID(cloudId) {
|
||||
|
||||
const res = wx.cloud.CloudID(cloudId);
|
||||
const r = JSON.stringify(res);
|
||||
CloudIDObject[r] = res;
|
||||
return r;
|
||||
WX_CloudCloudID(env, cloudID) {
|
||||
let targetCloud;
|
||||
if (env === '_default_') {
|
||||
targetCloud = wx.cloud;
|
||||
}
|
||||
else {
|
||||
targetCloud = CloudList[env];
|
||||
}
|
||||
const res = targetCloud.CloudID(cloudID);
|
||||
const id = `CloudID-${uid()}`;
|
||||
CloudIDObject[id] = res;
|
||||
return id;
|
||||
},
|
||||
WX_CloudCDN(env, target) {
|
||||
let targetCloud;
|
||||
if (env === '_default_') {
|
||||
targetCloud = wx.cloud;
|
||||
}
|
||||
else {
|
||||
targetCloud = CloudList[env];
|
||||
}
|
||||
const res = targetCloud.CDN(target);
|
||||
const id = `CDN-${uid()}`;
|
||||
CDNObject[id] = res;
|
||||
return id;
|
||||
},
|
||||
WX_CloudCallContainer(env, conf, callbackId) {
|
||||
const config = formatJsonStr(conf);
|
||||
let targetCloud;
|
||||
if (env === '_default_') {
|
||||
targetCloud = wx.cloud;
|
||||
}
|
||||
else {
|
||||
targetCloud = CloudList[env];
|
||||
}
|
||||
targetCloud.callContainer({
|
||||
...config,
|
||||
success(res) {
|
||||
formatResponse('CallContainerResult', res);
|
||||
moduleHelper.send('_CloudCallContainerCallback', JSON.stringify({
|
||||
callbackId, type: 'success', res: JSON.stringify(res),
|
||||
}));
|
||||
},
|
||||
fail(res) {
|
||||
formatResponse('GeneralCallbackResult', res);
|
||||
moduleHelper.send('_CloudCallContainerCallback', JSON.stringify({
|
||||
callbackId, type: 'fail', res: JSON.stringify(res),
|
||||
}));
|
||||
},
|
||||
complete(res) {
|
||||
formatResponse('GeneralCallbackResult', res);
|
||||
moduleHelper.send('_CloudCallContainerCallback', JSON.stringify({
|
||||
callbackId, type: 'complete', res: JSON.stringify(res),
|
||||
}));
|
||||
},
|
||||
});
|
||||
},
|
||||
WX_CloudUploadFile(env, conf, callbackId) {
|
||||
const config = formatJsonStr(conf);
|
||||
let targetCloud;
|
||||
if (env === '_default_') {
|
||||
targetCloud = wx.cloud;
|
||||
}
|
||||
else {
|
||||
targetCloud = CloudList[env];
|
||||
}
|
||||
targetCloud.uploadFile({
|
||||
...config,
|
||||
success(res) {
|
||||
formatResponse('UploadFileResult', res);
|
||||
moduleHelper.send('_CloudUploadFileCallback', JSON.stringify({
|
||||
callbackId, type: 'success', res: JSON.stringify(res),
|
||||
}));
|
||||
},
|
||||
fail(res) {
|
||||
formatResponse('GeneralCallbackResult', res);
|
||||
moduleHelper.send('_CloudUploadFileCallback', JSON.stringify({
|
||||
callbackId, type: 'fail', res: JSON.stringify(res),
|
||||
}));
|
||||
},
|
||||
complete(res) {
|
||||
formatResponse('GeneralCallbackResult', res);
|
||||
moduleHelper.send('_CloudUploadFileCallback', JSON.stringify({
|
||||
callbackId, type: 'complete', res: JSON.stringify(res),
|
||||
}));
|
||||
},
|
||||
});
|
||||
},
|
||||
WX_CloudDownloadFile(env, conf, callbackId) {
|
||||
const config = formatJsonStr(conf);
|
||||
let targetCloud;
|
||||
if (env === '_default_') {
|
||||
targetCloud = wx.cloud;
|
||||
}
|
||||
else {
|
||||
targetCloud = CloudList[env];
|
||||
}
|
||||
targetCloud.downloadFile({
|
||||
...config,
|
||||
success(res) {
|
||||
formatResponse('DownloadFileResult', res);
|
||||
moduleHelper.send('_CloudDownloadFileCallback', JSON.stringify({
|
||||
callbackId, type: 'success', res: JSON.stringify(res),
|
||||
}));
|
||||
},
|
||||
fail(res) {
|
||||
formatResponse('GeneralCallbackResult', res);
|
||||
moduleHelper.send('_CloudDownloadFileCallback', JSON.stringify({
|
||||
callbackId, type: 'fail', res: JSON.stringify(res),
|
||||
}));
|
||||
},
|
||||
complete(res) {
|
||||
formatResponse('GeneralCallbackResult', res);
|
||||
moduleHelper.send('_CloudDownloadFileCallback', JSON.stringify({
|
||||
callbackId, type: 'complete', res: JSON.stringify(res),
|
||||
}));
|
||||
},
|
||||
});
|
||||
},
|
||||
WX_CloudGetTempFileURL(env, conf, callbackId) {
|
||||
const config = formatJsonStr(conf);
|
||||
let targetCloud;
|
||||
if (env === '_default_') {
|
||||
targetCloud = wx.cloud;
|
||||
}
|
||||
else {
|
||||
targetCloud = CloudList[env];
|
||||
}
|
||||
targetCloud.getTempFileURL({
|
||||
...config,
|
||||
success(res) {
|
||||
formatResponse('GetTempFileURLResult', res);
|
||||
moduleHelper.send('_CloudGetTempFileURLCallback', JSON.stringify({
|
||||
callbackId, type: 'success', res: JSON.stringify(res),
|
||||
}));
|
||||
},
|
||||
fail(res) {
|
||||
formatResponse('GeneralCallbackResult', res);
|
||||
moduleHelper.send('_CloudGetTempFileURLCallback', JSON.stringify({
|
||||
callbackId, type: 'fail', res: JSON.stringify(res),
|
||||
}));
|
||||
},
|
||||
complete(res) {
|
||||
formatResponse('GeneralCallbackResult', res);
|
||||
moduleHelper.send('_CloudGetTempFileURLCallback', JSON.stringify({
|
||||
callbackId, type: 'complete', res: JSON.stringify(res),
|
||||
}));
|
||||
},
|
||||
});
|
||||
},
|
||||
WX_CloudDeleteFile(env, conf, callbackId) {
|
||||
const config = formatJsonStr(conf);
|
||||
let targetCloud;
|
||||
if (env === '_default_') {
|
||||
targetCloud = wx.cloud;
|
||||
}
|
||||
else {
|
||||
targetCloud = CloudList[env];
|
||||
}
|
||||
targetCloud.deleteFile({
|
||||
...config,
|
||||
success(res) {
|
||||
formatResponse('DeleteFileResult', res);
|
||||
moduleHelper.send('_CloudDeleteFileCallback', JSON.stringify({
|
||||
callbackId, type: 'success', res: JSON.stringify(res),
|
||||
}));
|
||||
},
|
||||
fail(res) {
|
||||
formatResponse('GeneralCallbackResult', res);
|
||||
moduleHelper.send('_CloudDeleteFileCallback', JSON.stringify({
|
||||
callbackId, type: 'fail', res: JSON.stringify(res),
|
||||
}));
|
||||
},
|
||||
complete(res) {
|
||||
formatResponse('GeneralCallbackResult', res);
|
||||
moduleHelper.send('_CloudDeleteFileCallback', JSON.stringify({
|
||||
callbackId, type: 'complete', res: JSON.stringify(res),
|
||||
}));
|
||||
},
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5fa4b26864e64bd3c5c7c1c830e75fb5
|
||||
guid: bc8a42b76b381bb423b206cc95301761
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0ed5cfbc1cb1dca5dfd9f4d41870b25e
|
||||
guid: b4cc9296a05b74874d773488f23ece5a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1c11ec3d27960784cf9d6ad75dfeaeb1
|
||||
guid: 8387f0fcd20a51d177ea6f1da97bfa70
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 181613de8694f03f69975420d9883673
|
||||
guid: 92e9820405a8303355da16006cf91450
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1b8b0d6e0bfc3c0bd2dff08c6831167c
|
||||
guid: 87f6e81a4e617b443689f7cc1d611b84
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -5,7 +5,7 @@ import fixCmapTable from './fix-cmap';
|
||||
import readMetrics from './read-metrics';
|
||||
import splitTTCToBufferOnlySC from './split-sc';
|
||||
|
||||
const { platform } = wx.getSystemInfoSync();
|
||||
const { platform } = wx.getDeviceInfo();
|
||||
|
||||
const tempCacheObj = {};
|
||||
let fontDataCache;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 82cd05553adbf694a7aa41d15dfc513d
|
||||
guid: 039aba3e4ee90180bf1126e4bc34abb0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f880f376a130f0bcb740b0607ef4e9c2
|
||||
guid: 6cf0b4ff0cfb9d4662dab3290ffc2221
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 52282aba774f8ca0eb45671280e17e55
|
||||
guid: ae6c4c3248d96ca83dfe72e0ac2a91b0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 877cf45afb634b8db9d49507494e2a7e
|
||||
guid: 516a9c608a6b0cdeff14dd9a207ebab3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 76ce4625fec95a9195dc1cf7920d1614
|
||||
guid: 1a991e31383756599751889fb9c404f7
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cfff2eb80fb5091fc25f37502518c47d
|
||||
guid: 20357736c763503aa6f1d3a48227d1be
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 122eb78360a34f4b62123b4f8fdb37aa
|
||||
guid: ba5fccd991f10e42aebf38afd82eb4e8
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 79341585e29028a8971f7b605b72b556
|
||||
guid: 83aad5234578f52ed2d2da3d34f177d2
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 482d406ceb182221a298dd3880d4e941
|
||||
guid: e433c9369e52fdaca3d1526ced6ed808
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b74bb48a82089f1cf9d6b0013340a9b3
|
||||
guid: 952337abf708e6b9f1df102d6dcc9846
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0ba9a2529e567edb67dd295f6e2828e0
|
||||
guid: d92a6a7a341dedfad56626109e33935f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5155261f77084bf5ae78c491e36a94e5
|
||||
guid: 0760eca82c7171ec53c660aef33797df
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fe5c372c88c446bf5c9f9b2c05b122bf
|
||||
guid: a75ccb83bb7fb25e8cc00384f7d711a3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 22123e9efab710435dadd47cfe7157c7
|
||||
guid: 579a83880705aab1f0127e15f90ae1dc
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -28,6 +28,8 @@ export const ResType = {
|
||||
AppBaseInfo: {
|
||||
SDKVersion: 'string',
|
||||
enableDebug: 'bool',
|
||||
fontSizeScaleFactor: 'number',
|
||||
fontSizeSetting: 'number',
|
||||
host: 'AppBaseInfoHost',
|
||||
language: 'string',
|
||||
version: 'string',
|
||||
@ -38,6 +40,7 @@ export const ResType = {
|
||||
},
|
||||
GetBatteryInfoSyncResult: {
|
||||
isCharging: 'bool',
|
||||
isLowPowerModeEnabled: 'bool',
|
||||
level: 'number',
|
||||
},
|
||||
DeviceInfo: {
|
||||
@ -186,6 +189,7 @@ export const ResType = {
|
||||
socketReused: 'bool',
|
||||
throughputKbps: 'number',
|
||||
transportRttEstimate: 'number',
|
||||
usingHighPerformanceMode: 'bool',
|
||||
},
|
||||
DownloadTaskOnHeadersReceivedListenerResult: {
|
||||
header: 'object',
|
||||
@ -203,17 +207,17 @@ export const ResType = {
|
||||
},
|
||||
OptionStyle: {
|
||||
backgroundColor: 'string',
|
||||
height: 'number',
|
||||
left: 'number',
|
||||
top: 'number',
|
||||
width: 'number',
|
||||
borderColor: 'string',
|
||||
borderRadius: 'number',
|
||||
borderWidth: 'number',
|
||||
color: 'string',
|
||||
fontSize: 'number',
|
||||
height: 'number',
|
||||
left: 'number',
|
||||
lineHeight: 'number',
|
||||
textAlign: 'string',
|
||||
top: 'number',
|
||||
width: 'number',
|
||||
},
|
||||
ImageData: {
|
||||
height: 'number',
|
||||
@ -446,6 +450,7 @@ export const ResType = {
|
||||
},
|
||||
GetBatteryInfoSuccessCallbackResult: {
|
||||
isCharging: 'bool',
|
||||
isLowPowerModeEnabled: 'bool',
|
||||
level: 'number',
|
||||
errMsg: 'string',
|
||||
},
|
||||
@ -518,6 +523,11 @@ export const ResType = {
|
||||
deviceId: 'string',
|
||||
name: 'string',
|
||||
},
|
||||
GetDeviceBenchmarkInfoSuccessCallbackResult: {
|
||||
benchmarkLevel: 'number',
|
||||
modelLevel: 'number',
|
||||
errMsg: 'string',
|
||||
},
|
||||
GetExtConfigSuccessCallbackResult: {
|
||||
extConfig: 'object',
|
||||
errMsg: 'string',
|
||||
@ -538,6 +548,10 @@ export const ResType = {
|
||||
signature: 'string',
|
||||
errMsg: 'string',
|
||||
},
|
||||
GetGroupEnterInfoError: {
|
||||
errMsg: 'string',
|
||||
errCode: 'number',
|
||||
},
|
||||
GetGroupEnterInfoSuccessCallbackResult: {
|
||||
cloudID: 'string',
|
||||
encryptedData: 'string',
|
||||
@ -726,6 +740,14 @@ export const ResType = {
|
||||
OnMemoryWarningListenerResult: {
|
||||
level: 'number',
|
||||
},
|
||||
OnMenuButtonBoundingClientRectWeightChangeListenerResult: {
|
||||
bottom: 'number',
|
||||
height: 'number',
|
||||
left: 'number',
|
||||
right: 'number',
|
||||
top: 'number',
|
||||
width: 'number',
|
||||
},
|
||||
OnMouseDownListenerResult: {
|
||||
button: 'number',
|
||||
timeStamp: 'long',
|
||||
@ -774,6 +796,9 @@ export const ResType = {
|
||||
promise: 'string',
|
||||
reason: 'string',
|
||||
},
|
||||
OnUserCaptureScreenListenerResult: {
|
||||
query: 'string',
|
||||
},
|
||||
OnVoIPChatInterruptedListenerResult: {
|
||||
errCode: 'number',
|
||||
errMsg: 'string',
|
||||
@ -873,10 +898,24 @@ export const ResType = {
|
||||
RequestMidasPaymentFailCallbackErr: {
|
||||
errCode: 'number',
|
||||
errMsg: 'string',
|
||||
errno: 'number',
|
||||
},
|
||||
RequestMidasPaymentSuccessCallbackResult: {
|
||||
errMsg: 'string',
|
||||
},
|
||||
SignData1: {
|
||||
buyQuantity: 'number',
|
||||
currencyType: 'string',
|
||||
goodsPrice: 'number',
|
||||
mode: 'string',
|
||||
offerId: 'string',
|
||||
outTradeNo: 'string',
|
||||
productId: 'string',
|
||||
attach: 'string',
|
||||
env: 'number',
|
||||
platform: 'string',
|
||||
zoneId: 'string',
|
||||
},
|
||||
RequestSubscribeMessageFailCallbackResult: {
|
||||
errCode: 'number',
|
||||
errMsg: 'string',
|
||||
@ -931,6 +970,7 @@ export const ResType = {
|
||||
},
|
||||
UpdatableMessageFrontEndTemplateInfo: {
|
||||
parameterList: 'UpdatableMessageFrontEndParameter[]',
|
||||
templateId: 'string',
|
||||
},
|
||||
UpdatableMessageFrontEndParameter: {
|
||||
name: 'string',
|
||||
@ -963,10 +1003,6 @@ export const ResType = {
|
||||
feedIdList: 'string[]',
|
||||
errMsg: 'string',
|
||||
},
|
||||
MidasPaymentGameItemError: {
|
||||
errMsg: 'string',
|
||||
errCode: 'number',
|
||||
},
|
||||
RequestSubscribeLiveActivitySuccessCallbackResult: {
|
||||
code: 'string',
|
||||
errMsg: 'string',
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cfcdd546b700155e56cc2afcaa07350c
|
||||
guid: 7b0e1156a986ceab8ecb72304878fc4c
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -44,4 +44,46 @@ export const ResTypeOther = {
|
||||
offset: 'number',
|
||||
setBroadcast: 'bool',
|
||||
},
|
||||
CallFunctionResult: {
|
||||
result: 'string',
|
||||
requestID: 'string',
|
||||
errMsg: 'string',
|
||||
},
|
||||
CallContainerResult: {
|
||||
data: 'string',
|
||||
statusCode: 'number',
|
||||
header: 'object',
|
||||
callID: 'string',
|
||||
errMsg: 'string',
|
||||
},
|
||||
UploadFileResult: {
|
||||
fileID: 'string',
|
||||
statusCode: 'number',
|
||||
errMsg: 'string',
|
||||
},
|
||||
DownloadFileResult: {
|
||||
tempFilePath: 'string',
|
||||
statusCode: 'number',
|
||||
errMsg: 'string',
|
||||
},
|
||||
GetTempFileURLResult: {
|
||||
fileList: 'GetTempFileURLResultItem[]',
|
||||
errMsg: 'string',
|
||||
},
|
||||
GetTempFileURLResultItem: {
|
||||
fileID: 'string',
|
||||
tempFileURL: 'string',
|
||||
maxAge: 'number',
|
||||
status: 'number',
|
||||
errMsg: 'string',
|
||||
},
|
||||
DeleteFileResult: {
|
||||
fileList: 'DeleteFileResultItem[]',
|
||||
errMsg: 'string',
|
||||
},
|
||||
DeleteFileResultItem: {
|
||||
fileID: 'string',
|
||||
status: 'number',
|
||||
errMsg: 'string',
|
||||
},
|
||||
};
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user