提交 015af6d4 编写于 作者: Q qiang

build app v3

上级 ef9470d1
......@@ -6204,7 +6204,7 @@ var serviceContext = (function () {
hasContentType = true;
headers['Content-Type'] = header[name];
// TODO 需要重构
if (method === 'POST' && header[name].indexOf('application/x-www-form-urlencoded') === 0) {
if (method !== 'GET' && header[name].indexOf('application/x-www-form-urlencoded') === 0 && typeof data !== 'string' && !(data instanceof ArrayBuffer)) {
let bodyArray = [];
for (let key in data) {
if (data.hasOwnProperty(key)) {
......@@ -10154,36 +10154,38 @@ var serviceContext = (function () {
invokeMethod('operateMapPlayer', mapId, pageVm, type, data);
}
UniServiceJSBridge.subscribe('onMapMethodCallback', ({
callbackId,
data
}) => {
callback.invoke(callbackId, data);
});
const methods = ['getCenterLocation', 'translateMarker', 'getScale', 'getRegion'];
class MapContext {
constructor (id, pageVm) {
this.id = id;
this.pageVm = pageVm;
}
getCenterLocation (args) {
operateMapPlayer$3(this.id, this.pageVm, 'getCenterLocation', args);
}
moveToLocation () {
operateMapPlayer$3(this.id, this.pageVm, 'moveToLocation');
}
translateMarker (args) {
operateMapPlayer$3(this.id, this.pageVm, 'translateMarker', args);
}
includePoints (args) {
operateMapPlayer$3(this.id, this.pageVm, 'includePoints', args);
}
}
getRegion (args) {
operateMapPlayer$3(this.id, this.pageVm, 'getRegion', args);
}
getScale (args) {
operateMapPlayer$3(this.id, this.pageVm, 'getScale', args);
}
}
methods.forEach(function (method) {
MapContext.prototype[method] = callback.warp(function (options, callbackId) {
operateMapPlayer$3(this.id, this.pageVm, method, {
options,
callbackId
});
});
});
function createMapContext$1 (id, context) {
if (context) {
......@@ -10277,7 +10279,7 @@ var serviceContext = (function () {
callback.invoke(callbackId, data);
});
const methods = ['insertDivider', 'insertImage', 'insertText', 'setContents', 'getContents', 'clear', 'removeFormat', 'undo', 'redo'];
const methods$1 = ['insertDivider', 'insertImage', 'insertText', 'setContents', 'getContents', 'clear', 'removeFormat', 'undo', 'redo'];
class EditorContext {
constructor (id, pageId) {
......@@ -10294,7 +10296,7 @@ var serviceContext = (function () {
}
}
methods.forEach(function (method) {
methods$1.forEach(function (method) {
EditorContext.prototype[method] = callback.warp(function (options, callbackId) {
operateEditor(this.id, this.pageId, method, {
options,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册