@ives_xxz/framework 2.3.2 → 2.3.4

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/entry/FWEntry.ts CHANGED
@@ -131,11 +131,15 @@ export class FWEntry implements FW.Entry {
131
131
  * @param sceneName 场景名字
132
132
  */
133
133
  @FWSocketAutoProcessPause()
134
- launchScene(name: string): void {
134
+ launchScene(name: string, forceRelease?: boolean): void {
135
135
  FW.Entry.layerMgr.clear();
136
136
 
137
- if (this.bundleAutoRelease(this.bundleName)) {
137
+ if (forceRelease) {
138
138
  this.releaseBundle(this.bundleName);
139
+ } else {
140
+ if (this.bundleAutoRelease(this.bundleName)) {
141
+ this.releaseBundle(this.bundleName);
142
+ }
139
143
  }
140
144
 
141
145
  if (!this.hasSceneName(name)) {
package/package.json CHANGED
@@ -1,11 +1,9 @@
1
1
  {
2
2
  "name": "@ives_xxz/framework",
3
- "version": "2.3.2",
3
+ "version": "2.3.4",
4
4
  "description": "cocoscreator 2.x mvc framework",
5
5
  "main": "index.js",
6
- "keywords": [
7
- "123456"
8
- ],
6
+ "keywords": ["123456"],
9
7
  "author": "ives",
10
8
  "license": "ISC"
11
9
  }
@@ -81,6 +81,8 @@ export default class FWSocket extends FW.Service implements FW.Socket {
81
81
  this.socket = new WebSocket(address);
82
82
  } else {
83
83
  if (config.certificate) {
84
+ this.certificate = config.certificate;
85
+
84
86
  let url = config.certificate.nativeUrl;
85
87
  if (cc.assetManager.cacheManager) {
86
88
  url =
@@ -89,7 +91,6 @@ export default class FWSocket extends FW.Service implements FW.Socket {
89
91
  url;
90
92
  }
91
93
 
92
- FW.Log.debug("创建socket链接", address, url, JSON.stringify(config));
93
94
  //@ts-ignore
94
95
  this.socket = new WebSocket(address, [], url);
95
96
  } else {
@@ -98,10 +99,7 @@ export default class FWSocket extends FW.Service implements FW.Socket {
98
99
  }
99
100
  this.socket.onopen = this.onSocketOpen.bind(this);
100
101
  this.socket.onclose = this.onSocketClose.bind(this);
101
- this.socket.onerror = (msg) => {
102
- FW.Log.error("触发error消息");
103
- this.onSocketError(msg);
104
- };
102
+ this.socket.onerror = this.onSocketError.bind(this);
105
103
  this.socket.onmessage = this.onSocketMessage.bind(this);
106
104
 
107
105
  this.socketSender = socketSender;