mm_os 2.7.7 → 2.7.8

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.
@@ -57,7 +57,9 @@ class Drive extends Item {
57
57
  // 结果
58
58
  "result": "result",
59
59
  // 回复方法
60
- "method_receive": "${method}-Ack"
60
+ "method_receive": "${method}-Ack",
61
+ // 服务器地址
62
+ "host": ""
61
63
  };
62
64
 
63
65
  // 开放给前端调用的函数
@@ -207,10 +209,14 @@ Drive.prototype.fullUrl = function(src) {
207
209
  return ""
208
210
  }
209
211
  if (src.indexOf("http") !== 0) {
212
+ var host = this.config.host || $.host;
213
+ if (host.indexOf("http") !== 0) {
214
+ host = "http://" + host;
215
+ }
210
216
  if (src.indexOf("~/") === 0) {
211
- src = src.replace('~/', $.host);
217
+ src = src.replace('~/', host);
212
218
  } else if (src.indexOf("/") === 0) {
213
- src = src.replace('/', $.host);
219
+ src = src.replace('/', host);
214
220
  }
215
221
  }
216
222
  return src;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_os",
3
- "version": "2.7.7",
3
+ "version": "2.7.8",
4
4
  "description": "这是超级美眉服务端框架,用于快速构建应用程序。",
5
5
  "main": "index.js",
6
6
  "scripts": {