-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
longjinwen
committed
Jan 4, 2020
1 parent
35128f1
commit 4186397
Showing
21 changed files
with
1,306 additions
and
1,275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
root = true | ||
[*] | ||
charset = utf-8 | ||
indent_size = 4 | ||
indent_size = 2 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
node_modules/ | ||
.idea | ||
!dist/php/upload/.* | ||
|
||
/server/upload | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* Created by WebStorm | ||
* Description: next.. | ||
* User: JinwenLong | ||
* Author: longjinwen | ||
* Email: [email protected] | ||
* Date: 2020/1/4 | ||
* Time: 3:40 下午 | ||
*/ | ||
|
||
|
||
class Http { | ||
constructor() { | ||
} | ||
|
||
|
||
|
||
|
||
} | ||
|
||
export default Http; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* Created by WebStorm | ||
* Description: next.. | ||
* User: JinwenLong | ||
* Author: longjinwen | ||
* Email: [email protected] | ||
* Date: 2020/1/4 | ||
* Time: 3:32 下午 | ||
*/ | ||
|
||
|
||
|
||
import UploadFile from './upload'; | ||
|
||
module.exports = UploadFile; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/** | ||
* Created by WebStorm | ||
* Description: next.. | ||
* User: JinwenLong | ||
* Author: longjinwen | ||
* Email: [email protected] | ||
* Date: 2020/1/4 | ||
* Time: 3:36 下午 | ||
*/ | ||
|
||
|
||
|
||
|
||
function Queue() { | ||
var queue = [], | ||
isIng = false, | ||
setIng = function (bo) { | ||
isIng = bo; | ||
}, | ||
index = 0, | ||
next = function () { | ||
setIng(false); | ||
exec(); | ||
return this; | ||
}, | ||
again = function () { | ||
index -= 1; | ||
next(); | ||
return this; | ||
}, | ||
exec = function () { | ||
if (queue.length > index && isIng === false) { | ||
setIng(true); | ||
queue[index++](next, again); | ||
} | ||
}, | ||
arrayProperties = Object.getOwnPropertyNames(Array.prototype); | ||
|
||
for (var key in arrayProperties) { | ||
(function (key, _this) { | ||
key = arrayProperties[key]; | ||
if (['length', 'constructor'].indexOf(key) > -1) { | ||
return; | ||
} | ||
_this[key] = function () { | ||
return Array.prototype[key].apply(queue, arguments); | ||
}; | ||
}(key, this)); | ||
} | ||
|
||
this.push2queue = function (handle) { | ||
queue.push(handle); | ||
setTimeout(function () { | ||
exec(); | ||
}, 0); | ||
return this; | ||
}; | ||
|
||
this.prev = function () { | ||
index -= 2; | ||
this.next(); | ||
return this; | ||
}; | ||
|
||
this.next = next; | ||
|
||
this.again = again; | ||
|
||
this.getIndex = function () { | ||
return index; | ||
}; | ||
|
||
this.getQueue = function () { | ||
return queue; | ||
}; | ||
|
||
this.empty = function () { | ||
queue = []; | ||
}; | ||
} | ||
|
||
module.exports = Queue; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* Created by WebStorm | ||
* Description: next.. | ||
* User: JinwenLong | ||
* Author: longjinwen | ||
* Email: [email protected] | ||
* Date: 2020/1/4 | ||
* Time: 3:41 下午 | ||
*/ | ||
class Upload { | ||
|
||
} | ||
|
||
export default Upload; | ||
|
||
|
||
|
This file was deleted.
Oops, something went wrong.
Empty file.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,33 @@ | ||
{ | ||
"name": "simple-upload-slice-file", | ||
"version": "1.0.3", | ||
"description": "一款前端简单的分片上传文件小项目,支持进度计算,队列提交,MD5校验", | ||
"author": "long<[email protected]>", | ||
"main": "./dist/simple-upload-slice-file.min.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"dev": "webpack -w", | ||
"build": "webpack -p" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/8696/simple-upload-slice-file.git" | ||
}, | ||
"license": "ISC", | ||
"devDependencies": { | ||
"babel-core": "^6.26.3", | ||
"babel-loader": "^7.1.4", | ||
"babel-polyfill": "^6.26.0", | ||
"babel-preset-env": "^1.7.0", | ||
"webpack": "^4.19.0", | ||
"webpack-cli": "^3.1.2" | ||
}, | ||
"keywords": [ | ||
"web-upload", | ||
"slice-file", | ||
"upload-slice-file" | ||
] | ||
"name": "simple-upload-slice-file", | ||
"version": "1.0.3", | ||
"description": "一款前端简单的分片上传文件小项目,支持进度计算,队列提交,MD5校验", | ||
"author": "long<[email protected]>", | ||
"main": "./dist/simple-upload-slice-file.min.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1", | ||
"dev": "webpack -w", | ||
"build": "webpack -p" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/8696/simple-upload-slice-file.git" | ||
}, | ||
"license": "ISC", | ||
"devDependencies": { | ||
"babel-core": "^6.26.3", | ||
"babel-loader": "^7.1.4", | ||
"babel-polyfill": "^6.26.0", | ||
"babel-preset-env": "^1.7.0", | ||
"koa": "^2.11.0", | ||
"koa-bodyparser": "^4.2.1", | ||
"koa-router": "^7.4.0", | ||
"webpack": "^4.19.0", | ||
"webpack-cli": "^3.1.2" | ||
}, | ||
"keywords": [ | ||
"web-upload", | ||
"slice-file", | ||
"upload-slice-file" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* Created by WebStorm | ||
* Description: next.. | ||
* User: JinwenLong | ||
* Author: longjinwen | ||
* Email: [email protected] | ||
* Date: 2020/1/4 | ||
* Time: 3:32 下午 | ||
*/ | ||
const Koa = require('koa'); | ||
const app = new Koa(); | ||
const router = require('koa-router')(); | ||
|
||
router.post('/upload', async (ctx) => { | ||
ctx.body = '首页'; | ||
}); | ||
app.use(router.routes()); | ||
app.listen(3000); | ||
|
||
|
||
|
||
|
||
|
Oops, something went wrong.