From cecda81a2c3e4f4b4f17d1deaf12a2f242931b77 Mon Sep 17 00:00:00 2001 From: 3136352472 <3136352472> Date: Fri, 15 May 2020 21:30:31 +0800 Subject: [PATCH] init --- govue/axios.js | 2 -- govue/promise.js | 32 +++++++++++++++++--------------- jsruntime/runtime.go | 6 +++--- main.go | 8 ++++---- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/govue/axios.js b/govue/axios.js index 75a7f03..1765603 100644 --- a/govue/axios.js +++ b/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); diff --git a/govue/promise.js b/govue/promise.js index eb174d8..232c5f4 100644 --- a/govue/promise.js +++ b/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 diff --git a/jsruntime/runtime.go b/jsruntime/runtime.go index 34298e5..53c0154 100644 --- a/jsruntime/runtime.go +++ b/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", diff --git a/main.go b/main.go index 8706943..d91f0d9 100644 --- a/main.go +++ b/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"),