Browse Source

init

tags/v0.9.1
3136352472 5 years ago
parent
commit
cecda81a2c
  1. 2
      govue/axios.js
  2. 32
      govue/promise.js
  3. 6
      jsruntime/runtime.go
  4. 8
      main.go

2
govue/axios.js

@ -571,7 +571,6 @@ return /******/ (function(modules) { // webpackBootstrap
// For node use HTTP adapter
adapter = __webpack_require__(8);
}
console.log("adapter",adapter);
return adapter;
}
@ -668,7 +667,6 @@ return /******/ (function(modules) { // webpackBootstrap
/* 8 */
/***/ (function(module, exports, __webpack_require__) {
console.log("Axios")
'use strict';
var utils = __webpack_require__(2);

32
govue/promise.js

@ -529,7 +529,7 @@ var Enumerator = function () {
} else if (typeof _then !== 'function') {
this._remaining--;
this._result[i] = entry;
} else if (c === Promise$1) {
} else if (c === Promise$2) {
var promise = new c(noop);
handleMaybeThenable(promise, entry, _then);
this._willSettleAt(promise, i);
@ -863,7 +863,7 @@ function needsNew() {
@constructor
*/
var Promise$1 = function () {
var Promise$2 = function () {
function Promise(resolver) {
this[PROMISE_ID] = nextId();
this._result = this._state = undefined;
@ -1127,14 +1127,14 @@ var Promise$1 = function () {
return Promise;
}();
Promise$1.prototype.then = then;
Promise$1.all = all;
Promise$1.race = race;
Promise$1.resolve = resolve$1;
Promise$1.reject = reject$1;
Promise$1._setScheduler = setScheduler;
Promise$1._setAsap = setAsap;
Promise$1._asap = asap;
Promise$2.prototype.then = then;
Promise$2.all = all;
Promise$2.race = race;
Promise$2.resolve = resolve$1;
Promise$2.reject = reject$1;
Promise$2._setScheduler = setScheduler;
Promise$2._setAsap = setAsap;
Promise$2._asap = asap;
/*global self*/
function polyfill() {
@ -1167,17 +1167,19 @@ function polyfill() {
}
}
local.Promise = Promise$1;
local.Promise = Promise$2;
}
// Strange compat..
Promise$1.polyfill = polyfill;
Promise$1.Promise = Promise$1;
Promise$2.polyfill = polyfill;
Promise$2.Promise = Promise$2;
return Promise$1;
Promise$2.polyfill();
return Promise$2;
})));
//# sourceMappingURL=es6-promise.map
//# sourceMappingURL=es6-promise.auto.map

6
jsruntime/runtime.go

@ -78,9 +78,9 @@ func (jr *JsRuntime) setAjax() {
url := call.Argument(1)
data := call.Argument(3)
res, err := hskhttpdo.HttpDo{
Url: url.ToString().String(),
Raw: []byte(data.ToString().String()),
}.Request(m.ToString().String())
Url: url.String(),
Raw: []byte(data.String()),
}.Request(m.String())
r := map[string]string{
"code": "200",

8
main.go

@ -28,10 +28,10 @@ func main() {
Variable: "init",
FileName: filepath.Join("..", "govue", "init.js"),
},
jsruntime.Rely{
Variable: "Promise",
FileName: filepath.Join("..", "govue", "promise.js"),
},
//jsruntime.Rely{
// Variable: "Promise",
// FileName: filepath.Join("..", "govue", "promise.js"),
//},
jsruntime.Rely{
Variable: "axios",
FileName: filepath.Join("..", "govue", "axios.js"),

Loading…
Cancel
Save