mirror of
https://github.com/wechat-miniprogram/minigame-tuanjie-transform-sdk.git
synced 2025-11-13 03:35:55 +08:00
Auto-publish.
This commit is contained in:
parent
debe320956
commit
af5cf63d03
8
Editor/BuildProfile.meta
Normal file
8
Editor/BuildProfile.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: DytLvSj8UC9CKob0XUy9Y3usKDmX8US1YgxYmBxa1iAZ/I8JbM5wZwE=
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Editor/BuildProfile/lib.meta
Normal file
8
Editor/BuildProfile/lib.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: XSwesi78AS28ymfR2HEhHpEBAC2DHupI1hIKP7HApjHRaZgGw+DTwWI=
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Editor/BuildProfile/lib/libwx-metal-cpp.bc
Normal file
BIN
Editor/BuildProfile/lib/libwx-metal-cpp.bc
Normal file
Binary file not shown.
7
Editor/BuildProfile/lib/libwx-metal-cpp.bc.meta
Normal file
7
Editor/BuildProfile/lib/libwx-metal-cpp.bc.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c113acfee35db6b5c61fd4a76596cfd3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
43
Editor/BuildProfile/lib/mtl_library.jslib
Normal file
43
Editor/BuildProfile/lib/mtl_library.jslib
Normal file
@ -0,0 +1,43 @@
|
||||
mergeInto(LibraryManager.library, {
|
||||
// 定义供 C/C++ 调用的 JS 函数
|
||||
js_batchRender_malloc: function(data, size, isSync) {
|
||||
// 直接从 WASM 内存创建视图(零拷贝)
|
||||
const binaryData = new Uint8Array(Module.HEAPU8.buffer, data, size);
|
||||
// 转换为标准 ArrayBuffer(如果需要复制)
|
||||
const targetBuffer =
|
||||
binaryData.buffer.slice(binaryData.byteOffset, binaryData.byteOffset + binaryData.byteLength);
|
||||
//console.log("processBinaryData invoke");
|
||||
const extBuffer = new ArrayBuffer(1);
|
||||
const headerBuffer = new ArrayBuffer(8);
|
||||
const headerBufferView = new DataView(headerBuffer);
|
||||
headerBufferView.setUint32(0, 0xDEC0DE, true);
|
||||
headerBufferView.setUint32(4, mtl.ctx.__uid(), true);
|
||||
const merged = new Uint8Array(headerBuffer.byteLength + targetBuffer.byteLength);
|
||||
merged.set(new Uint8Array(headerBuffer), 0);
|
||||
merged.set(new Uint8Array(targetBuffer), headerBuffer.byteLength);
|
||||
if(!isSync){
|
||||
mtl.batchRenderAsync(merged.buffer, extBuffer);
|
||||
return null;
|
||||
}
|
||||
const result = mtl.batchRender(merged.buffer, extBuffer).buffer;
|
||||
if(result.byteLength == 0){
|
||||
return null;;
|
||||
}
|
||||
// 申请内存空间,后续在cpp wasm部分使用,记得释放
|
||||
const ptr = Module._malloc(result.byteLength);
|
||||
// 将数据拷贝到WASM内存
|
||||
Module.HEAPU8.set(new Uint8Array(result), ptr);
|
||||
// 返回结构化的数据信息(指针和长度)
|
||||
const ret = new DataView(new ArrayBuffer(8));
|
||||
ret.setUint32(0, ptr, true); // 指针地址(4字节)
|
||||
ret.setUint32(4, result.byteLength, true); // 数据长度(4字节)
|
||||
// 返回合并后的8字节缓冲区指针,记得也要在cpp部分释放
|
||||
const retPtr = Module._malloc(8);
|
||||
Module.HEAPU8.set(new Uint8Array(ret.buffer), retPtr);
|
||||
return retPtr;
|
||||
|
||||
},
|
||||
js_swapWindow: function(){
|
||||
mtl.swapWindow();
|
||||
}
|
||||
});
|
||||
7
Editor/BuildProfile/lib/mtl_library.jslib.meta
Normal file
7
Editor/BuildProfile/lib/mtl_library.jslib.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dda1926f3454e003333e8085a4f2c0fd
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -17,8 +17,6 @@ namespace WeChatWASM
|
||||
public static string projectRootPath;
|
||||
private static WXPlayableEditorScriptObject config;
|
||||
private static bool m_EnablePerfTool = false;
|
||||
|
||||
private static string _dstCache;
|
||||
public static bool UseIL2CPP
|
||||
{
|
||||
get
|
||||
@ -34,7 +32,6 @@ namespace WeChatWASM
|
||||
public WXPlayableSettingsHelper()
|
||||
{
|
||||
projectRootPath = System.IO.Path.GetFullPath(Application.dataPath + "/../");
|
||||
_dstCache = "";
|
||||
}
|
||||
|
||||
public void OnFocus()
|
||||
@ -156,12 +153,11 @@ namespace WeChatWASM
|
||||
{
|
||||
SDKFilePath = Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", "wechat-playable-default", "unity-sdk", "index.js");
|
||||
config = UnityUtil.GetPlayableEditorConf();
|
||||
_dstCache = config.ProjectConf.DST;
|
||||
|
||||
this.setData("projectName", config.ProjectConf.projectName);
|
||||
this.setData("appid", config.ProjectConf.Appid);
|
||||
this.setData("orientation", (int)config.ProjectConf.Orientation);
|
||||
this.setData("dst", _dstCache);
|
||||
this.setData("dst", config.ProjectConf.relativeDST);
|
||||
|
||||
this.setData("developBuild", config.CompileOptions.DevelopBuild);
|
||||
this.setData("il2CppOptimizeSize", config.CompileOptions.Il2CppOptimizeSize);
|
||||
@ -177,8 +173,8 @@ namespace WeChatWASM
|
||||
config.ProjectConf.projectName = this.getDataInput("projectName");
|
||||
config.ProjectConf.Appid = this.getDataInput("appid");
|
||||
config.ProjectConf.Orientation = (WXScreenOritation)this.getDataPop("orientation");
|
||||
_dstCache = this.getDataInput("dst");
|
||||
config.ProjectConf.DST = GetAbsolutePath(_dstCache);
|
||||
config.ProjectConf.relativeDST = this.getDataInput("dst");
|
||||
config.ProjectConf.DST = GetAbsolutePath(config.ProjectConf.relativeDST);
|
||||
|
||||
config.CompileOptions.DevelopBuild = this.getDataCheckbox("developBuild");
|
||||
config.CompileOptions.Il2CppOptimizeSize = this.getDataCheckbox("il2CppOptimizeSize");
|
||||
|
||||
@ -99,6 +99,14 @@ namespace WeChatWASM
|
||||
#endif
|
||||
}
|
||||
}
|
||||
// 是否使用 iOS Metal 渲染
|
||||
public static bool UseiOSMetal
|
||||
{
|
||||
get
|
||||
{
|
||||
return config.CompileOptions.enableiOSMetal;
|
||||
}
|
||||
}
|
||||
// public static void SetPlayableEnabled(bool enabled)
|
||||
// {
|
||||
// isPlayableBuild = enabled;
|
||||
@ -112,9 +120,12 @@ namespace WeChatWASM
|
||||
CheckBuildTarget();
|
||||
Init();
|
||||
// 可能有顺序要求?如果没要求,可挪到此函数外
|
||||
if (!isPlayableBuild) {
|
||||
if (!isPlayableBuild)
|
||||
{
|
||||
ProcessWxPerfBinaries();
|
||||
}
|
||||
// iOS metal 的相关特性
|
||||
ProcessWxiOSMetalBinaries();
|
||||
MakeEnvForLuaAdaptor();
|
||||
// JSLib
|
||||
SettingWXTextureMinJSLib();
|
||||
@ -140,7 +151,7 @@ namespace WeChatWASM
|
||||
return WXExportError.BUILD_WEBGL_FAILED;
|
||||
}
|
||||
dynamic config = isPlayableBuild ? UnityUtil.GetPlayableEditorConf() : UnityUtil.GetEditorConf();
|
||||
if (config.ProjectConf.DST == string.Empty)
|
||||
if (config.ProjectConf.relativeDST == string.Empty)
|
||||
{
|
||||
Debug.LogError("请先配置游戏导出路径");
|
||||
return WXExportError.BUILD_WEBGL_FAILED;
|
||||
@ -400,6 +411,41 @@ namespace WeChatWASM
|
||||
return true;
|
||||
}
|
||||
|
||||
private static void ProcessWxiOSMetalBinaries()
|
||||
{
|
||||
string[] glLibs;
|
||||
string DS = WXAssetsTextTools.DS;
|
||||
if (UnityUtil.GetSDKMode() == UnityUtil.SDKMode.Package)
|
||||
{
|
||||
glLibs = new string[]
|
||||
{
|
||||
$"Packages{DS}com.qq.weixin.minigame{DS}Editor{DS}BuildProfile{DS}lib{DS}libwx-metal-cpp.bc",
|
||||
$"Packages{DS}com.qq.weixin.minigame{DS}Editor{DS}BuildProfile{DS}lib{DS}mtl_library.jslib",
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
string glLibRootDir = $"Assets{DS}WX-WASM-SDK-V2{DS}Editor{DS}BuildProfile{DS}lib{DS}";
|
||||
glLibs = new string[]
|
||||
{
|
||||
$"{glLibRootDir}libwx-metal-cpp.bc",
|
||||
$"{glLibRootDir}mtl_library.jslib",
|
||||
};
|
||||
}
|
||||
for (int i = 0; i < glLibs.Length; i++)
|
||||
{
|
||||
var importer = AssetImporter.GetAtPath(glLibs[i]) as PluginImporter;
|
||||
#if PLATFORM_WEIXINMINIGAME
|
||||
importer.SetCompatibleWithPlatform(BuildTarget.WeixinMiniGame, config.CompileOptions.enableiOSMetal);
|
||||
#else
|
||||
importer.SetCompatibleWithPlatform(BuildTarget.WebGL, config.CompileOptions.enableiOSMetal);
|
||||
#endif
|
||||
// importer.SaveAndReimport();
|
||||
SetPluginCompatibilityByModifyingMetadataFile(glLibs[i], config.CompileOptions.enableiOSMetal);
|
||||
}
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
|
||||
private static string GetLuaAdaptorPath(string filename)
|
||||
{
|
||||
string DS = WXAssetsTextTools.DS;
|
||||
@ -523,6 +569,20 @@ namespace WeChatWASM
|
||||
GraphicsDeviceType[] targets = new GraphicsDeviceType[] { };
|
||||
#if PLATFORM_WEIXINMINIGAME
|
||||
PlayerSettings.SetUseDefaultGraphicsAPIs(BuildTarget.WeixinMiniGame, false);
|
||||
// 启用 iOS Metal 渲染
|
||||
if (UseiOSMetal)
|
||||
{
|
||||
if (config.CompileOptions.Webgl2)
|
||||
{
|
||||
PlayerSettings.SetGraphicsAPIs(BuildTarget.WeixinMiniGame, new GraphicsDeviceType[] { GraphicsDeviceType.Metal, GraphicsDeviceType.OpenGLES3 });
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayerSettings.SetGraphicsAPIs(BuildTarget.WeixinMiniGame, new GraphicsDeviceType[] { GraphicsDeviceType.Metal, GraphicsDeviceType.OpenGLES2 });
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (config.CompileOptions.Webgl2)
|
||||
{
|
||||
PlayerSettings.SetGraphicsAPIs(BuildTarget.WeixinMiniGame, new GraphicsDeviceType[] { GraphicsDeviceType.OpenGLES3 });
|
||||
@ -531,6 +591,7 @@ namespace WeChatWASM
|
||||
{
|
||||
PlayerSettings.SetGraphicsAPIs(BuildTarget.WeixinMiniGame, new GraphicsDeviceType[] { GraphicsDeviceType.OpenGLES2 });
|
||||
}
|
||||
}
|
||||
#else
|
||||
PlayerSettings.SetUseDefaultGraphicsAPIs(BuildTarget.WebGL, false);
|
||||
if (config.CompileOptions.Webgl2)
|
||||
@ -1194,7 +1255,8 @@ namespace WeChatWASM
|
||||
|
||||
public static void convertDataPackageJS()
|
||||
{
|
||||
if (!isPlayableBuild) {
|
||||
if (!isPlayableBuild)
|
||||
{
|
||||
checkNeedRmovePackageParallelPreload();
|
||||
}
|
||||
|
||||
@ -1650,7 +1712,8 @@ namespace WeChatWASM
|
||||
content = content.Replace("$unityVersion$", Application.unityVersion);
|
||||
File.WriteAllText(Path.Combine(dst, "unity-sdk", "index.js"), content, Encoding.UTF8);
|
||||
// content = File.ReadAllText(Path.Combine(Application.dataPath, "WX-WASM-SDK-V2", "Runtime", "wechat-default", "unity-sdk", "storage.js"), Encoding.UTF8);
|
||||
if (!isPlayableBuild) {
|
||||
if (!isPlayableBuild)
|
||||
{
|
||||
content = File.ReadAllText(Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", defaultTemplateDir, "unity-sdk", "storage.js"), Encoding.UTF8);
|
||||
var PreLoadKeys = config.PlayerPrefsKeys.Count > 0 ? JsonMapper.ToJson(config.PlayerPrefsKeys) : "[]";
|
||||
content = content.Replace("'$PreLoadKeys'", PreLoadKeys);
|
||||
@ -1904,7 +1967,7 @@ namespace WeChatWASM
|
||||
config.ProjectConf.bundleHashLength.ToString(),
|
||||
bundlePathIdentifierStr,
|
||||
excludeFileExtensionsStr,
|
||||
config.CompileOptions.Webgl2 ? "2" : "1",
|
||||
config.CompileOptions.enableiOSMetal ? "5" : (config.CompileOptions.Webgl2 ? "2" : "1"),
|
||||
Application.unityVersion,
|
||||
WXExtEnvDef.pluginVersion,
|
||||
config.ProjectConf.dataFileSubPrefix,
|
||||
@ -1956,7 +2019,8 @@ namespace WeChatWASM
|
||||
|
||||
List<Rule> replaceList = new List<Rule>(replaceArrayList);
|
||||
List<string> files = new List<string> { "game.js", "game.json", "project.config.json", "unity-namespace.js", "check-version.js", "unity-sdk/font/index.js" };
|
||||
if (isPlayableBuild) {
|
||||
if (isPlayableBuild)
|
||||
{
|
||||
files = new List<string> { "game.js", "game.json", "project.config.json", "unity-namespace.js", "check-version.js" };
|
||||
}
|
||||
|
||||
|
||||
@ -54,15 +54,11 @@ namespace WeChatWASM
|
||||
foldInstantGame = WXConvertCore.IsInstantGameAutoStreaming();
|
||||
|
||||
projectRootPath = System.IO.Path.GetFullPath(Application.dataPath + "/../");
|
||||
|
||||
_dstCache = "";
|
||||
}
|
||||
|
||||
private static WXEditorScriptObject config;
|
||||
private static bool m_EnablePerfTool = false;
|
||||
|
||||
private static string _dstCache;
|
||||
|
||||
public void OnFocus()
|
||||
{
|
||||
loadData();
|
||||
@ -187,8 +183,9 @@ namespace WeChatWASM
|
||||
this.formCheckbox("il2CppOptimizeSize", "Il2Cpp Optimize Size(?)", "对应于Il2CppCodeGeneration选项,勾选时使用OptimizeSize(默认推荐),生成代码小15%左右,取消勾选则使用OptimizeSpeed。游戏中大量泛型集合的高频访问建议OptimizeSpeed,在使用HybridCLR等第三方组件时只能用OptimizeSpeed。(Dotnet Runtime模式下该选项无效)", !UseIL2CPP);
|
||||
this.formCheckbox("profilingFuncs", "Profiling Funcs");
|
||||
this.formCheckbox("profilingMemory", "Profiling Memory");
|
||||
this.formCheckbox("webgl2", "WebGL2.0");
|
||||
this.formCheckbox("webgl2", "WebGL2.0(beta)");
|
||||
this.formCheckbox("iOSPerformancePlus", "iOSPerformancePlus(?)", "是否使用iOS高性能+渲染方案,有助于提升渲染兼容性、降低WebContent进程内存");
|
||||
// this.formCheckbox("iOSMetal", "iOSMetal(?)", "是否使用iOSMetal渲染方案,需要开启iOS高性能+模式,有助于提升运行性能,降低iOS功耗");
|
||||
this.formCheckbox("deleteStreamingAssets", "Clear Streaming Assets");
|
||||
this.formCheckbox("cleanBuild", "Clean WebGL Build");
|
||||
// this.formCheckbox("cleanCloudDev", "Clean Cloud Dev");
|
||||
@ -394,7 +391,6 @@ namespace WeChatWASM
|
||||
// SDKFilePath = Path.Combine(Application.dataPath, "WX-WASM-SDK-V2", "Runtime", "wechat-default", "unity-sdk", "index.js");
|
||||
SDKFilePath = Path.Combine(UnityUtil.GetWxSDKRootPath(), "Runtime", "wechat-default", "unity-sdk", "index.js");
|
||||
config = UnityUtil.GetEditorConf();
|
||||
_dstCache = config.ProjectConf.DST;
|
||||
|
||||
// Instant Game
|
||||
if (WXConvertCore.IsInstantGameAutoStreaming())
|
||||
@ -436,7 +432,7 @@ namespace WeChatWASM
|
||||
this.setData("compressDataPackage", config.ProjectConf.compressDataPackage);
|
||||
this.setData("videoUrl", config.ProjectConf.VideoUrl);
|
||||
this.setData("orientation", (int)config.ProjectConf.Orientation);
|
||||
this.setData("dst", _dstCache);
|
||||
this.setData("dst", config.ProjectConf.relativeDST);
|
||||
this.setData("bundleHashLength", config.ProjectConf.bundleHashLength.ToString());
|
||||
this.setData("bundlePathIdentifier", config.ProjectConf.bundlePathIdentifier);
|
||||
this.setData("bundleExcludeExtensions", config.ProjectConf.bundleExcludeExtensions);
|
||||
@ -452,6 +448,7 @@ namespace WeChatWASM
|
||||
this.setData("customNodePath", config.CompileOptions.CustomNodePath);
|
||||
this.setData("webgl2", config.CompileOptions.Webgl2);
|
||||
this.setData("iOSPerformancePlus", config.CompileOptions.enableIOSPerformancePlus);
|
||||
this.setData("iOSMetal", config.CompileOptions.enableiOSMetal);
|
||||
this.setData("fbslim", config.CompileOptions.fbslim);
|
||||
this.setData("useFriendRelation", config.SDKOptions.UseFriendRelation);
|
||||
this.setData("useMiniGameChat", config.SDKOptions.UseMiniGameChat);
|
||||
@ -513,8 +510,8 @@ namespace WeChatWASM
|
||||
config.ProjectConf.compressDataPackage = this.getDataCheckbox("compressDataPackage");
|
||||
config.ProjectConf.VideoUrl = this.getDataInput("videoUrl");
|
||||
config.ProjectConf.Orientation = (WXScreenOritation)this.getDataPop("orientation");
|
||||
_dstCache = this.getDataInput("dst");
|
||||
config.ProjectConf.DST = GetAbsolutePath(_dstCache);
|
||||
config.ProjectConf.relativeDST = this.getDataInput("dst");
|
||||
config.ProjectConf.DST = GetAbsolutePath(config.ProjectConf.relativeDST);
|
||||
config.ProjectConf.bundleHashLength = int.Parse(this.getDataInput("bundleHashLength"));
|
||||
config.ProjectConf.bundlePathIdentifier = this.getDataInput("bundlePathIdentifier");
|
||||
config.ProjectConf.bundleExcludeExtensions = this.getDataInput("bundleExcludeExtensions");
|
||||
@ -530,6 +527,7 @@ namespace WeChatWASM
|
||||
config.CompileOptions.CustomNodePath = this.getDataInput("customNodePath");
|
||||
config.CompileOptions.Webgl2 = this.getDataCheckbox("webgl2");
|
||||
config.CompileOptions.enableIOSPerformancePlus = this.getDataCheckbox("iOSPerformancePlus");
|
||||
config.CompileOptions.enableiOSMetal = this.getDataCheckbox("iOSMetal");
|
||||
config.CompileOptions.fbslim = this.getDataCheckbox("fbslim");
|
||||
config.SDKOptions.UseFriendRelation = this.getDataCheckbox("useFriendRelation");
|
||||
config.SDKOptions.UseMiniGameChat = this.getDataCheckbox("useMiniGameChat");
|
||||
|
||||
@ -125,6 +125,10 @@ namespace WeChatWASM
|
||||
{
|
||||
return WXConvertCore.UseIL2CPP;
|
||||
});
|
||||
WXExtEnvDef.RegisterAction("WXConvertCore.UseiOSMetal", (args) =>
|
||||
{
|
||||
return WXConvertCore.UseiOSMetal;
|
||||
});
|
||||
WXExtEnvDef.RegisterAction("UnityUtil.GetWxSDKRootPath", (args) =>
|
||||
{
|
||||
#if UNITY_2018
|
||||
|
||||
@ -2,7 +2,7 @@ namespace WeChatWASM
|
||||
{
|
||||
public class WXPluginVersion
|
||||
{
|
||||
public static string pluginVersion = "202507090715"; // 这一行不要改他,导出的时候会自动替换
|
||||
public static string pluginVersion = "202507101103"; // 这一行不要改他,导出的时候会自动替换
|
||||
}
|
||||
|
||||
public class WXPluginConf
|
||||
|
||||
Binary file not shown.
@ -381,6 +381,11 @@
|
||||
视频url
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.WXProjectConf.relativeDST">
|
||||
<summary>
|
||||
导出路径(相对路径)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.WXProjectConf.DST">
|
||||
<summary>
|
||||
导出路径(绝对路径)
|
||||
@ -643,6 +648,11 @@
|
||||
是否使用iOS高性能Plus
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CompileOptions.enableiOSMetal">
|
||||
<summary>
|
||||
是否使用iOS metal指令流
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.CompileOptions.brotliMT">
|
||||
<summary>
|
||||
是否使用brotli多线程压缩
|
||||
@ -773,6 +783,11 @@
|
||||
试玩 appid
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.WXPlayableProjectConf.relativeDST">
|
||||
<summary>
|
||||
导出路径(相对路径)
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.WXPlayableProjectConf.DST">
|
||||
<summary>
|
||||
导出路径(绝对路径)
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6beb6d8e857e38f8b6bebe7de23ff41d
|
||||
guid: d05761f316f7eab715c19190699cc137
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -115,8 +115,8 @@ WX_SyncFunction_tnn: function(functionName, returnType, param1, param2){
|
||||
stringToUTF8((res || ''), buffer, bufferSize);
|
||||
return buffer;
|
||||
},
|
||||
WX_ClassOneWayFunction:function(functionName, returnType, successType, failType, completeType, conf) {
|
||||
var res = window.WXWASMSDK.WX_ClassOneWayFunction(_WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(returnType), _WXPointer_stringify_adaptor(successType), _WXPointer_stringify_adaptor(failType), _WXPointer_stringify_adaptor(completeType), _WXPointer_stringify_adaptor(conf));
|
||||
WX_ClassConstructor:function(functionName, returnType, successType, failType, completeType, conf) {
|
||||
var res = window.WXWASMSDK.WX_ClassConstructor(_WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(returnType), _WXPointer_stringify_adaptor(successType), _WXPointer_stringify_adaptor(failType), _WXPointer_stringify_adaptor(completeType), _WXPointer_stringify_adaptor(conf));
|
||||
var bufferSize = lengthBytesUTF8(res || '') + 1;
|
||||
var buffer = _malloc(bufferSize);
|
||||
stringToUTF8((res || ''), buffer, bufferSize);
|
||||
@ -156,5 +156,7 @@ WX_ClassOneWayNoFunction_vt: function(className, functionName, id, param1) {
|
||||
},
|
||||
WX_ClassOneWayNoFunction_vn: function(className, functionName, id, param1) {
|
||||
window.WXWASMSDK.WX_ClassOneWayNoFunction_vs(_WXPointer_stringify_adaptor(className), _WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(id), param1);
|
||||
},WX_ClassOneWayFunction: function(className, id, functionName, successType, failType, completeType, conf, callbackId, usePromise) {
|
||||
window.WXWASMSDK.WX_ClassOneWayFunction(_WXPointer_stringify_adaptor(className), _WXPointer_stringify_adaptor(id), _WXPointer_stringify_adaptor(functionName), _WXPointer_stringify_adaptor(successType), _WXPointer_stringify_adaptor(failType), _WXPointer_stringify_adaptor(completeType), _WXPointer_stringify_adaptor(conf), _WXPointer_stringify_adaptor(callbackId), usePromise);
|
||||
},
|
||||
})
|
||||
Binary file not shown.
Binary file not shown.
@ -1699,26 +1699,6 @@
|
||||
如果返回的是字符串,则数据在这个字段
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.WXStatInfo.mode">
|
||||
<summary>
|
||||
文件的类型和存取的权限,对应 POSIX stat.st_mode
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.WXStatInfo.size">
|
||||
<summary>
|
||||
文件大小,单位:B,对应 POSIX stat.st_size
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.WXStatInfo.lastAccessedTime">
|
||||
<summary>
|
||||
文件最近一次被存取或被执行的时间,UNIX 时间戳,对应 POSIX stat.st_atime
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.WXStatInfo.lastModifiedTime">
|
||||
<summary>
|
||||
文件最后一次被修改的时间,UNIX 时间戳,对应 POSIX stat.st_mtime
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.WXStat.path">
|
||||
<summary>
|
||||
文件的路径
|
||||
@ -3129,19 +3109,24 @@
|
||||
是否结束
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WeChatWASM.NotifyMiniProgramPlayableStatusOption.complete">
|
||||
<member name="F:WeChatWASM.LoadOption.openlink">
|
||||
<summary>
|
||||
接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
从不同渠道获得的OPENLINK字符串
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WeChatWASM.NotifyMiniProgramPlayableStatusOption.fail">
|
||||
<member name="F:WeChatWASM.LoadOption.query">
|
||||
<summary>
|
||||
接口调用失败的回调函数
|
||||
选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WeChatWASM.NotifyMiniProgramPlayableStatusOption.success">
|
||||
<member name="F:WeChatWASM.ShowOption.openlink">
|
||||
<summary>
|
||||
接口调用成功的回调函数
|
||||
从不同渠道获得的OPENLINK字符串
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ShowOption.query">
|
||||
<summary>
|
||||
选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.Gamepad.axes">
|
||||
@ -4138,26 +4123,6 @@
|
||||
取值为0/1,取值为0表示会把 `App`、`Page` 的生命周期函数和 `wx` 命名空间下的函数调用写入日志,取值为1则不会。默认值是 0
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.LoadOption.openlink">
|
||||
<summary>
|
||||
从不同渠道获得的OPENLINK字符串
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.LoadOption.query">
|
||||
<summary>
|
||||
选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ShowOption.openlink">
|
||||
<summary>
|
||||
从不同渠道获得的OPENLINK字符串
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ShowOption.query">
|
||||
<summary>
|
||||
选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnCheckForUpdateListenerResult.hasUpdate">
|
||||
<summary>
|
||||
是否有新版本
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e59aba6a2f1488c6f45969265dada192
|
||||
guid: 7a86865669cf8962db73b80475f73340
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
Binary file not shown.
@ -1705,26 +1705,6 @@
|
||||
如果返回的是字符串,则数据在这个字段
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.WXStatInfo.mode">
|
||||
<summary>
|
||||
文件的类型和存取的权限,对应 POSIX stat.st_mode
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.WXStatInfo.size">
|
||||
<summary>
|
||||
文件大小,单位:B,对应 POSIX stat.st_size
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.WXStatInfo.lastAccessedTime">
|
||||
<summary>
|
||||
文件最近一次被存取或被执行的时间,UNIX 时间戳,对应 POSIX stat.st_atime
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.WXStatInfo.lastModifiedTime">
|
||||
<summary>
|
||||
文件最后一次被修改的时间,UNIX 时间戳,对应 POSIX stat.st_mtime
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.WXStat.path">
|
||||
<summary>
|
||||
文件的路径
|
||||
@ -3135,19 +3115,24 @@
|
||||
是否结束
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WeChatWASM.NotifyMiniProgramPlayableStatusOption.complete">
|
||||
<member name="F:WeChatWASM.LoadOption.openlink">
|
||||
<summary>
|
||||
接口调用结束的回调函数(调用成功、失败都会执行)
|
||||
从不同渠道获得的OPENLINK字符串
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WeChatWASM.NotifyMiniProgramPlayableStatusOption.fail">
|
||||
<member name="F:WeChatWASM.LoadOption.query">
|
||||
<summary>
|
||||
接口调用失败的回调函数
|
||||
选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:WeChatWASM.NotifyMiniProgramPlayableStatusOption.success">
|
||||
<member name="F:WeChatWASM.ShowOption.openlink">
|
||||
<summary>
|
||||
接口调用成功的回调函数
|
||||
从不同渠道获得的OPENLINK字符串
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ShowOption.query">
|
||||
<summary>
|
||||
选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.Gamepad.axes">
|
||||
@ -4144,26 +4129,6 @@
|
||||
取值为0/1,取值为0表示会把 `App`、`Page` 的生命周期函数和 `wx` 命名空间下的函数调用写入日志,取值为1则不会。默认值是 0
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.LoadOption.openlink">
|
||||
<summary>
|
||||
从不同渠道获得的OPENLINK字符串
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.LoadOption.query">
|
||||
<summary>
|
||||
选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ShowOption.openlink">
|
||||
<summary>
|
||||
从不同渠道获得的OPENLINK字符串
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.ShowOption.query">
|
||||
<summary>
|
||||
选填,部分活动、功能允许接收自定义query参数,请参阅渠道说明,默认可不填
|
||||
</summary>
|
||||
</member>
|
||||
<member name="F:WeChatWASM.OnCheckForUpdateListenerResult.hasUpdate">
|
||||
<summary>
|
||||
是否有新版本
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a4f84d1484728bdc7f8b22c245c12954
|
||||
guid: 73f0f5fde7193ea9d6786ceb70926356
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
||||
@ -4036,32 +4036,6 @@ namespace WeChatWASM
|
||||
return WXSDKManagerHandler.Instance.GetLogManager(option);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [[PageManager](https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/PageManager.html) wx.createPageManager()](https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/wx.createPageManager.html)
|
||||
/// 需要基础库: `3.6.7`
|
||||
/// 小游戏开放页面管理器,用于启动微信内置的各种小游戏活动、功能页面。具体OPENLINK值由不同的能力渠道获得。
|
||||
/// **示例代码**
|
||||
/// ```js
|
||||
/// const pageManager = wx.createPageManager();
|
||||
/// pageManager.load({
|
||||
/// openlink: 'xxxxxxx-xxxxxx', // 由不同渠道获得的OPENLINK值
|
||||
/// }).then((res) => {
|
||||
/// // 加载成功,res 可能携带不同活动、功能返回的特殊回包信息(具体请参阅渠道说明)
|
||||
/// console.log(res);
|
||||
/// // 加载成功后按需显示
|
||||
/// pageManager.show();
|
||||
/// }).catch((err) => {
|
||||
/// // 加载失败,请查阅 err 给出的错误信息
|
||||
/// console.error(err);
|
||||
/// })
|
||||
/// ```
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static WXPageManager CreatePageManager()
|
||||
{
|
||||
return WXSDKManagerHandler.Instance.CreatePageManager();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// [[RealtimeLogManager](https://developers.weixin.qq.com/minigame/dev/api/base/debug/RealtimeLogManager.html) wx.getRealtimeLogManager()](https://developers.weixin.qq.com/minigame/dev/api/base/debug/wx.getRealtimeLogManager.html)
|
||||
/// 需要基础库: `2.14.4`
|
||||
|
||||
@ -1127,6 +1127,32 @@ namespace WeChatWASM
|
||||
WXSDKManagerHandler.Instance.NotifyMiniProgramPlayableStatus(option);
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// [[PageManager](https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/PageManager.html) wx.createPageManager()](https://developers.weixin.qq.com/minigame/dev/api/open-api/openlink/wx.createPageManager.html)
|
||||
/// 需要基础库: `3.6.7`
|
||||
/// 小游戏开放页面管理器,用于启动微信内置的各种小游戏活动、功能页面。具体OPENLINK值由不同的能力渠道获得。
|
||||
/// **示例代码**
|
||||
/// ```js
|
||||
/// const pageManager = wx.createPageManager();
|
||||
/// pageManager.load({
|
||||
/// openlink: 'xxxxxxx-xxxxxx', // 由不同渠道获得的OPENLINK值
|
||||
/// }).then((res) => {
|
||||
/// // 加载成功,res 可能携带不同活动、功能返回的特殊回包信息(具体请参阅渠道说明)
|
||||
/// console.log(res);
|
||||
/// // 加载成功后按需显示
|
||||
/// pageManager.show();
|
||||
/// }).catch((err) => {
|
||||
/// // 加载失败,请查阅 err 给出的错误信息
|
||||
/// console.error(err);
|
||||
/// })
|
||||
/// ```
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static WXPageManager CreatePageManager()
|
||||
{
|
||||
return WXSDKManagerHandler.Instance.CreatePageManager();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: efd466b65c54b332a045eb2a2b7bcd45
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 98c226d2c0b95cd9c41e66f659b77518
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1a26deb368681059a6efbc7198b97271
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 8f900df282483fe0b44d51216d7632a1
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1cd422863090f735317f0b026acb8650
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 9481450cbf5e182fd85f759f54cf092a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1c6b2b079e099cc7614f8b7ea6921d0d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: ff127cc9f7da4f6dc75b08567ae8af3b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b9620d2e870f2070152ba599cc3b98b1
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 39daf193cb0994c3f598430449748c8e
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d1c06bdafb5551891701f5ccfa01bb2f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 491ea96b1da764b7f4f75fd37964de13
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a5e6271e94af38d72cfd86514ed9c094
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 9083c27e58e5c1e932c596eb1c4e1246
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1335edb1334e7d2ca51aa361ab4e5e28
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 39fbdc73d5bdd681f77ce72ae3881eb0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: eae3a59c26c4bc2f1dae258e96a14f15
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: f9ed9a2d885b067b2382d9e462a88c10
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8ef13099c4e88b3b8bdf4d4625834310
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 7d4748243437a6f2dbc5d029c21f746f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ee24c2c66cfb460132189dcab7fb59b6
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: c4071f9233a801a23c7efcfec69f0063
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c8373ba87dde5eca503906e19f350138
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: c8536c0212cf024effa14c55b6d18a09
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 87a15cda2827c13ab79be33896188e15
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 4dedf0af8e492b4e8b0f18c15d73777b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3c9889acfb476e516ecc71fc86d015a6
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 58361aeed030e41725f681a68be8c48a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ee76ea2541df6d253d8001fc932cb33e
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 3f4b7b4b50b37543843a4aeedf8441d6
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d1c8ad657fb8ab40dc9f680f3c58fd18
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 99551a7ac72af0149200d011366faba6
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8676811d588186c0506f7c8ab09f889b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 8c9de2934dbdcf55bc4d8b6e519f6ac4
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3d7877cde8035e267188fab320abc765
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: d000803b9ce06f9fe2365551e38a077b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b53e8b9de9614a1907c688106aa57cb0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 9e825672595438e5fe763f248071ced8
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 72599062956481857fb69ff094c92bb4
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 3a071e263d20711fc94aa701d8884eb3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2749e4754bd07d3c3d9313bb861fc4c7
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 33deebb5a2c004b54f1b2ca241c9e97d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ab12d6c8d1fef80dfd3c4c06bbbd5c16
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 3a53eabab88c0b28bc749166a0ed3688
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b9724820ee64815079e21e2e83467658
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: e726f2ef321fe2e151bb26fcb80cfc72
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e4cd6a130970b32124d85a344f7424f3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 9547564f629a70fa59d6f401e33f03e1
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f801a49b201412419b4a6132306f2c7d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 69bc18022b01565244e60f5e87b6d1b8
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ba367426993493dafa9d41c3259e1419
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 5bfcc720de080cabd0434a32bac2ab2a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9ee9ffd9a4d5587fea1a1ab2fc93cc2e
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: e4e8207e3c567e0e8040d9ebafebc18e
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e2b2a994f97a0a2107d38cead26d43af
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: f38405d16c702a9bc0f2e6eacb8cc753
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 46c4f829083322d564dd6598007fb648
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 8cb67e670fe2d6dcc4829f87d8f5a380
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 750d54649f1074c9697fe084442269ef
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: ca23ed08b838e56dc206dc2d33464e3a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 379609f17fe23436b2ef41a98fe54ba3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 67b9cbab08d03a63dc64fbc6fd60bf18
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,4 +1,11 @@
|
||||
export const ResType = {
|
||||
Gamepad: {
|
||||
axes: 'IAnyObject[]',
|
||||
buttons: 'IAnyObject[]',
|
||||
connected: 'bool',
|
||||
id: 'string',
|
||||
index: 'string',
|
||||
},
|
||||
AccountInfo: {
|
||||
miniProgram: 'MiniProgram',
|
||||
plugin: 'Plugin',
|
||||
@ -496,7 +503,7 @@ export const ResType = {
|
||||
headUrl: 'string',
|
||||
nickname: 'string',
|
||||
nonceId: 'string',
|
||||
otherInfos: 'AnyKeyword[]',
|
||||
otherInfos: 'any[]',
|
||||
replayStatus: 'number',
|
||||
status: 'number',
|
||||
errMsg: 'string',
|
||||
@ -505,7 +512,7 @@ export const ResType = {
|
||||
headUrl: 'string',
|
||||
nickname: 'string',
|
||||
noticeId: 'string',
|
||||
otherInfos: 'AnyKeyword[]',
|
||||
otherInfos: 'any[]',
|
||||
reservable: 'bool',
|
||||
startTime: 'string',
|
||||
status: 'number',
|
||||
@ -574,6 +581,11 @@ export const ResType = {
|
||||
weakNet: 'bool',
|
||||
errMsg: 'string',
|
||||
},
|
||||
GetPhoneNumberSuccessCallbackResult: {
|
||||
code: 'string',
|
||||
errMsg: 'string',
|
||||
errno: 'number',
|
||||
},
|
||||
GetPrivacySettingSuccessCallbackResult: {
|
||||
needAuthorization: 'bool',
|
||||
privacyContractName: 'string',
|
||||
@ -598,6 +610,10 @@ export const ResType = {
|
||||
mainSwitch: 'bool',
|
||||
itemSettings: 'object',
|
||||
},
|
||||
GetShowSplashAdStatusSuccessCallbackResult: {
|
||||
status: 'string',
|
||||
errMsg: 'string',
|
||||
},
|
||||
GetStorageInfoSuccessCallbackOption: {
|
||||
currentSize: 'number',
|
||||
keys: 'string[]',
|
||||
@ -724,6 +740,12 @@ export const ResType = {
|
||||
message: 'string',
|
||||
stack: 'string',
|
||||
},
|
||||
OnGamepadConnectedListenerResult: {
|
||||
gamepad: 'string',
|
||||
},
|
||||
OnGamepadDisconnectedListenerResult: {
|
||||
gamepad: 'string',
|
||||
},
|
||||
OnHandoffListenerResult: {
|
||||
query: 'string',
|
||||
},
|
||||
@ -741,14 +763,6 @@ export const ResType = {
|
||||
OnMemoryWarningListenerResult: {
|
||||
level: 'number',
|
||||
},
|
||||
OnMenuButtonBoundingClientRectWeightChangeListenerResult: {
|
||||
bottom: 'number',
|
||||
height: 'number',
|
||||
left: 'number',
|
||||
right: 'number',
|
||||
top: 'number',
|
||||
width: 'number',
|
||||
},
|
||||
OnMouseDownListenerResult: {
|
||||
button: 'number',
|
||||
timeStamp: 'long',
|
||||
@ -849,17 +863,6 @@ export const ResType = {
|
||||
subscriptionsSetting: 'SubscriptionsSetting',
|
||||
errMsg: 'string',
|
||||
},
|
||||
OperateGameRecorderVideoOption: {
|
||||
atempo: 'number',
|
||||
audioMix: 'bool',
|
||||
bgm: 'string',
|
||||
desc: 'string',
|
||||
path: 'string',
|
||||
query: 'string',
|
||||
timeRange: 'number[]',
|
||||
title: 'string',
|
||||
volume: 'number',
|
||||
},
|
||||
MediaSource: {
|
||||
url: 'string',
|
||||
poster: 'string',
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 03f109f37535b82a53464b38b5821e9d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: ba347c330afbf0056959a4fe0df57db2
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 30ab62c6ccbb05532fce2a282cdf1808
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 8982d318073de632e9f7e893418763ff
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b79461c69f6bf9f0d7b42c557137bc38
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 8336cd82f89ed780ff02ce1045a8eea3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -262,7 +262,7 @@ export default {
|
||||
formatResponse(returnType, res);
|
||||
return JSON.stringify(res);
|
||||
},
|
||||
WX_ClassOneWayFunction(functionName, returnType, successType, failType, completeType, conf) {
|
||||
WX_ClassConstructor(functionName, returnType, successType, failType, completeType, conf) {
|
||||
const config = formatJsonStr(conf);
|
||||
const callbackId = uid();
|
||||
const obj = wx[functionName.replace(/^\w/, a => a.toLowerCase())]({
|
||||
@ -399,4 +399,59 @@ export default {
|
||||
WX_ClassOneWayNoFunction_vn(className, functionName, id, param1) {
|
||||
WX_ClassOneWayNoFunction(className, functionName, id, param1);
|
||||
},
|
||||
WX_ClassOneWayFunction(className, functionName, id, successType, failType, completeType, conf, callbackId, usePromise = false) {
|
||||
console.log('!!! WX_ClassOneWayFunction', className, functionName, id, successType, failType, completeType, conf, callbackId);
|
||||
const obj = getClassObject(className, id);
|
||||
if (!obj) {
|
||||
return;
|
||||
}
|
||||
const lowerFunctionName = functionName.replace(/^\w/, a => a.toLowerCase());
|
||||
const config = formatJsonStr(conf);
|
||||
console.log('!!! WX_ClassOneWayFunction 1', `${className}${functionName}Callback`);
|
||||
if (usePromise) {
|
||||
obj[lowerFunctionName]({
|
||||
...config,
|
||||
}).then((res) => {
|
||||
formatResponse(successType, res);
|
||||
moduleHelper.send(`${className}${functionName}Callback`, JSON.stringify({
|
||||
callbackId, type: 'success', res: JSON.stringify(res),
|
||||
}));
|
||||
})
|
||||
.catch((res) => {
|
||||
formatResponse(failType, res);
|
||||
moduleHelper.send(`${className}${functionName}Callback`, JSON.stringify({
|
||||
callbackId, type: 'fail', res: JSON.stringify(res),
|
||||
}));
|
||||
})
|
||||
.finally((res) => {
|
||||
formatResponse(completeType, res);
|
||||
moduleHelper.send(`${className}${functionName}Callback`, JSON.stringify({
|
||||
callbackId, type: 'complete', res: JSON.stringify(res),
|
||||
}));
|
||||
});
|
||||
}
|
||||
else {
|
||||
obj[lowerFunctionName]({
|
||||
...config,
|
||||
success(res) {
|
||||
formatResponse(successType, res);
|
||||
moduleHelper.send(`${className}${functionName}Callback`, JSON.stringify({
|
||||
callbackId, type: 'success', res: JSON.stringify(res),
|
||||
}));
|
||||
},
|
||||
fail(res) {
|
||||
formatResponse(failType, res);
|
||||
moduleHelper.send(`${className}${functionName}Callback`, JSON.stringify({
|
||||
callbackId, type: 'fail', res: JSON.stringify(res),
|
||||
}));
|
||||
},
|
||||
complete(res) {
|
||||
formatResponse(completeType, res);
|
||||
moduleHelper.send(`${className}${functionName}Callback`, JSON.stringify({
|
||||
callbackId, type: 'complete', res: JSON.stringify(res),
|
||||
}));
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f0488ad515f244cbe10d149307718965
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 67b0189c9d2382837eb7c718f50ef6fd
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 687636a1968b801dc01a16adc71a6abd
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 209fe3d7a79f5fa90c60cc96d4cfc386
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cb2095eb1ac214011344d2b65f24fa5f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: ae428349615264d88784a555830ae6b7
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ad669a0514de61d1af7a1361accc7988
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 456218360c685822e52a927d23fd4287
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cb2f745d1f61a96ff7e72cfaca95bf71
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 44f4a9f52b1d03ad2469b50c48841ffc
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e416ca24ac782bfd0019c50f69483eb
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 9b301f1ae9e8ad1b2fdee1831be4b367
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0c091f3fce0e37c6aeae2bc42b330748
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 625561cbe7ab84ada9553f4acd23fb88
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7eb16d02f2f317e985af5b47c7ab6500
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 9b0e8c833b9802a9533ba697e7c2069b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 158006b8c80f282c5931f1ec1bd256b0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 5446f8a9992da648361eb64e7e8be5d0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8607b6c6083947c3c6af3134854014e1
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 8f700b285b264ebc83a8a91eff78c8a7
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5d3241646e28fa63affe9008883711ac
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: e357d1ff7a5f22a783d36864d7885da2
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4a14cc01081e03d8eeb57ff4d3b7d450
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: d34f63db6ba0ce87279d8960cd1e2aac
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8247d2ba453b82521c60371561249528
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 8f6e4baa621ad88688c36550a27a9dba
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 326d880942254b95db8f85fb5298083d
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 62980c95411f10851b6f534a2ae26a6c
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -32,7 +32,7 @@
|
||||
]
|
||||
},
|
||||
"Layout": {
|
||||
"version": "1.0.7",
|
||||
"version": "1.0.15",
|
||||
"provider": "wx7a727ff7d940bb3f",
|
||||
"contexts": [
|
||||
{
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 07b6da9d7f35b611a5b329316306545f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: c369ab37751bbee3ccf95da6d6b73614
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 583cdb84a872347ee3010ec555edf6ff
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: f2270cd6fe51d29ed3f958c6067974e3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: aca9b9ab4eddd346967a8f2a3fa40238
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 1f412ffe629080d63be72a96db8044fc
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f89e95c598d2f058f3bc2ff4842318ae
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: f9db97457d3d6ce2697693ad80835ce0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2adc58beafc6b77b4dbc45b1419f868a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 123a8c49e641d39bfbdd5d33eeaa96d1
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -56,7 +56,6 @@ function LayoutWithTplAndStyle(xml, style) {
|
||||
Layout.clear();
|
||||
Layout.init(xml, style);
|
||||
Layout.layout(sharedContext);
|
||||
console.log(Layout);
|
||||
}
|
||||
// 仅仅渲染一些提示,比如数据加载中、当前无授权等
|
||||
function renderTips(tips = '') {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5918b79306c520e843d9d74d1e6ff13e
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: cad808f90b9929073f1867cc491394fe
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2ae8cc56bc80468a88f390b008970521
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: db3cfa2b6ae3797cc39a77aa203824f7
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e114b8d6b286d8e0e1678c7656604afc
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 89659bf7c478bd26a8fc9c457e194c0e
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e3d5db5f7b35488952b5161b3129b270
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 16413aeb7372dce483936dbb1c1e44b7
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f7ec852b6d2ff5951ee41654f90b75d0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 7a73440a689c80681bb17e672d71912c
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8199af91b610986a50d11b430e3be5d0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 49866ca22b5165ebd631e8448414aae9
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 52c6e07f19f11ec4e46f825560727e5f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: a961bbe98618ebc1c33991997cce3685
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0e1fea601a57b56a597406fdba295c6a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 6d6382f1772d7e5c204e4a737130e2a1
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ad35ebc20b99e6941eabb6da4c0673c8
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 31c9c923c760217a2853f0ef678042d4
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d7385c758bb2f68a97f79920c40f1c29
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 4921d2044404603ea067491df65c2666
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9f553ca21dc3bc3c8d79d1c7a1aef1bc
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 320319d78b25d4b3c7d532442491f0ee
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3aeef152ac8a3da58d47098ff371d729
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: ebfb9e8ed7e26b64e4d4c221f0ec94e3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -63,9 +63,10 @@ export default function getStyle(data) {
|
||||
width: data.width * 0.35,
|
||||
height: (data.height / 2 / 3) * 0.4,
|
||||
textAlign: 'center',
|
||||
lineHeight: (data.height / 2 / 3) * 0.4,
|
||||
verticalAlign: 'center',
|
||||
fontSize: data.width * 0.043,
|
||||
textOverflow: 'ellipsis',
|
||||
whiteSpace: 'nowrap',
|
||||
color: '#fff',
|
||||
},
|
||||
rankScoreTip: {
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 62381ca2561d520bf69466acdf65bee8
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: fc9aee3c0ead90f7c24d1adc8367654e
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6bdb84e6a60e0638bb092f8248c84d80
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 52e2ffd9a70c72c661b8ab21e573df3e
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,11 +1,10 @@
|
||||
/**
|
||||
* 下面的内容分成两部分,第一部分是一个模板,模板的好处是能够有一定的语法
|
||||
* 坏处是模板引擎一般都依赖 new Function 或者 eval 能力,小游戏下面是没有的
|
||||
* 所以模板的编译需要在外部完成,可以将注释内的模板贴到下面的页面内,点击 "run"就能够得到编译后的模板函数
|
||||
* https://wechat-miniprogram.github.io/minigame-canvas-engine/playground.html
|
||||
* 如果觉得模板引擎使用过于麻烦,也可以手动拼接字符串,本文件对应函数的目标仅仅是为了创建出 xml 节点数
|
||||
*/
|
||||
/*
|
||||
* 模板引擎使用教程可见:https://wechat-miniprogram.github.io/minigame-canvas-engine/tutorial/templateengine.html
|
||||
* xml经过doT.js编译出的模板函数
|
||||
* 因为小游戏不支持new Function,模板函数只能外部编译
|
||||
* 可直接拷贝本函数到小游戏中使用
|
||||
* 原始的模板如下:
|
||||
*
|
||||
<view class="container" id="main">
|
||||
<view class="rankList">
|
||||
<scrollview class="list" scrollY="true">
|
||||
@ -29,22 +28,17 @@
|
||||
</scrollview>
|
||||
</view>
|
||||
</view>
|
||||
*/
|
||||
/**
|
||||
* xml经过doT.js编译出的模板函数
|
||||
* 因为小游戏不支持new Function,模板函数只能外部编译
|
||||
* 可直接拷贝本函数到小游戏中使用
|
||||
|
||||
*
|
||||
*/
|
||||
export default function anonymous(it) {
|
||||
let out = '<view class="container" id="main"> <view class="rankList"> <scrollview class="list" scrollY="true"> ';
|
||||
const arr1 = it.data;
|
||||
export default function tplFunc(it) {
|
||||
var out = '<view class="container" id="main"> <view class="rankList"> <scrollview class="list" scrollY="true"> ';
|
||||
var arr1 = it.data;
|
||||
if (arr1) {
|
||||
let item;
|
||||
let index = -1;
|
||||
const l1 = arr1.length - 1;
|
||||
var item, index = -1, l1 = arr1.length - 1;
|
||||
while (index < l1) {
|
||||
item = arr1[(index += 1)];
|
||||
out += ` <view class="listItem"> <image src="open-data/render/image/rankBg.png" class="rankBg"></image> <image class="rankAvatarBg" src="open-data/render/image/rankAvatar.png"></image> <image class="rankAvatar" src="${item.avatarUrl}"></image> <view class="rankNameView"> <image class="rankNameBg" src="open-data/render/image/nameBg.png"></image> <text class="rankName" value="${item.nickname}"></text> <text class="rankScoreTip" value="战力值:"></text> <text class="rankScoreVal" value="${item.score || 0}"></text> </view> <view class="shareToBtn" data-isSelf="${!!item.isSelf}" data-id="${item.openid || ''}"> <image src="open-data/render/image/${item.isSelf ? 'button3' : 'button2'}.png" class="shareBtnBg"></image> <text class="shareText" value="${item.isSelf ? '你自己' : '分享'}"></text> </view> </view> `;
|
||||
item = arr1[index += 1];
|
||||
out += ' <view class="listItem"> <image src="open-data/render/image/rankBg.png" class="rankBg"></image> <image class="rankAvatarBg" src="open-data/render/image/rankAvatar.png"></image> <image class="rankAvatar" src="' + (item.avatarUrl) + '"></image> <view class="rankNameView"> <image class="rankNameBg" src="open-data/render/image/nameBg.png"></image> <text class="rankName" value="' + (item.nickname) + '"></text> <text class="rankScoreTip" value="战力值:"></text> <text class="rankScoreVal" value="' + (item.score || 0) + '"></text> </view> <view class="shareToBtn" data-isSelf="' + (item.isSelf ? true : false) + '" data-id="' + (item.openid || '') + '"> <image src="open-data/render/image/' + (item.isSelf ? 'button3' : 'button2') + '.png" class="shareBtnBg"></image> <text class="shareText" value="' + (item.isSelf ? '你自己' : '分享') + '"></text> </view> </view> ';
|
||||
}
|
||||
}
|
||||
out += ' </scrollview> </view></view>';
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 246c809615f7912b828c4dad194c84f5
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 10bc3c1f6a0fc7b2fcaa6a75be743477
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fda717625d729aef6e560a8b171f96f3
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 86c7c4a5979ad3e588896133bff2d5dc
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 842f4cc2b5bfc876304eee38efb784bd
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
guid: 54eb6858aa2c46c631f313a0c23f8ca0
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user