pixuireactcomponents 1.5.35 → 1.5.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/loadlib/lib_mgr.d.ts
CHANGED
package/lib/loadlib/lib_mgr.js
CHANGED
|
@@ -34,6 +34,9 @@ var MainLibImpl = /** @class */ (function () {
|
|
|
34
34
|
console.log('function table end');
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
+
MainLibImpl.prototype.isLoadSuccess = function () {
|
|
38
|
+
return this.lib != undefined;
|
|
39
|
+
};
|
|
37
40
|
MainLibImpl.prototype.unload = function () {
|
|
38
41
|
loadlib.unloadLib('openplatform');
|
|
39
42
|
this.lib = undefined;
|
package/package.json
CHANGED
|
@@ -34,12 +34,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
34
34
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
|
-
import { GameletAPI } from 'gamelet-pixui-frame';
|
|
38
37
|
import path from 'path';
|
|
39
38
|
import { tools } from './tools';
|
|
40
39
|
import { LibMgr } from '../../../lib/loadlib/lib_mgr';
|
|
41
40
|
var assetPrefix = 'cacheAsset';
|
|
42
|
-
var isJssdkEnv = GameletAPI.getRuntimeEnv() == 'jssdk-appwindow' || GameletAPI.getRuntimeEnv() == 'jssdk-preprocessor';
|
|
43
41
|
var OPLib = LibMgr.getInstance().getMainLib();
|
|
44
42
|
console.log('new lib test');
|
|
45
43
|
/**
|
|
@@ -64,7 +62,7 @@ export var assetCache;
|
|
|
64
62
|
var urlWithoutParams, localPath, xhr;
|
|
65
63
|
var _this = this;
|
|
66
64
|
return __generator(this, function (_a) {
|
|
67
|
-
if (!
|
|
65
|
+
if (!OPLib.isLoadSuccess()) {
|
|
68
66
|
console.log('非jssdk环境');
|
|
69
67
|
reject(url);
|
|
70
68
|
return [2 /*return*/];
|
|
@@ -143,7 +141,7 @@ export var assetCache;
|
|
|
143
141
|
};
|
|
144
142
|
assetCache.getFileCachePath = function (url) {
|
|
145
143
|
console.log('getCachePath', url);
|
|
146
|
-
if (!
|
|
144
|
+
if (!OPLib.isLoadSuccess()) {
|
|
147
145
|
console.log('非jssdk环境');
|
|
148
146
|
return '';
|
|
149
147
|
}
|