Skip to content

Commit

Permalink
更新ajax发送表单demo
Browse files Browse the repository at this point in the history
  • Loading branch information
karosLi committed Sep 29, 2019
1 parent c63c0ab commit e57630e
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 42 deletions.
Binary file modified Demo4.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
14 changes: 1 addition & 13 deletions KKJSBridge/KKJSBridge/JS/KKJSBridge.js
Original file line number Diff line number Diff line change
Expand Up @@ -667,19 +667,7 @@ var __values = (this && this.__values) || function (o) {
}());
window._COOKIE = _COOKIE;
window._COOKIE.hookCookie();
/**
* 兼容旧版本的 LeFitWebViewJavascriptBridge(基于 iframe 通信)
*/
var LeFitWebViewJavascriptBridge = {
init: function (func) {
},
registerHandler: function (handlerName, handler) {
KKJSBridgeInstance.on(handlerName, handler);
},
callHandler: function (handlerName, data, responseCallback) {
KKJSBridgeInstance.call(null, handlerName, data, responseCallback);
}
};

/**
* KKJSBridge 配置
*/
Expand Down
13 changes: 0 additions & 13 deletions KKJSBridge/TS/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -667,19 +667,6 @@ var __values = (this && this.__values) || function (o) {
}());
window._COOKIE = _COOKIE;
window._COOKIE.hookCookie();
/**
* 兼容旧版本的 LeFitWebViewJavascriptBridge(基于 iframe 通信)
*/
var LeFitWebViewJavascriptBridge = {
init: function (func) {
},
registerHandler: function (handlerName, handler) {
KKJSBridgeInstance.on(handlerName, handler);
},
callHandler: function (handlerName, data, responseCallback) {
KKJSBridgeInstance.call(null, handlerName, data, responseCallback);
}
};
/**
* KKJSBridge 配置
*/
Expand Down
15 changes: 0 additions & 15 deletions KKJSBridge/TS/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -715,21 +715,6 @@ declare interface FormDataFile {
window._COOKIE = _COOKIE;
window._COOKIE.hookCookie();

/**
* 兼容旧版本的 LeFitWebViewJavascriptBridge(基于 iframe 通信)
*/
let LeFitWebViewJavascriptBridge: any = {
init: (func: Function) => {

},
registerHandler: (handlerName: string, handler: OldEventCallback) => {
KKJSBridgeInstance.on(handlerName, handler);
},
callHandler: (handlerName: string, data: {}, responseCallback: Callback) => {
KKJSBridgeInstance.call(null, handlerName, data, responseCallback);
}
};

/**
* KKJSBridge 配置
*/
Expand Down
Binary file not shown.
3 changes: 2 additions & 1 deletion KKJSBridgeDemo/KKJSBridgeDemo/Software/Server/formData.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@
var file = document.getElementById('file').files[0];

var formData = new FormData();
formData.append('key', 'bbbb');
formData.append('token', 'RSxpQIxNIS2vo0vuQR3HX701ddS9fdlUnQ5jV8u1:rKwNt9zzmjn1FodGG03k-McLF28=:eyJzY29wZSI6Imthcm9zcGljcyIsImRlYWRsaW5lIjoxNTY5Nzg4OTQwfQ==');
formData.append('file', file, 'bbbb');
formData.append('file', file);

var xhr = new XMLHttpRequest();
xhr.open('POST', 'http://upload.qiniup.com/', true);
Expand Down

0 comments on commit e57630e

Please sign in to comment.