Skip to content

Commit

Permalink
扩展api推送下载支持自动刷新下载链接
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyWie committed Sep 29, 2018
1 parent 903bf8e commit 7059e84
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main/src/main/resources/pdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
var API_PORT = '${apiPort}'
var FRONT_PORT = '${frontPort}'
var REST_PORT = '26339'
;(function(pdown){
;(function (pdown) {
${content}
})({
resolve: function (request) {
Expand All @@ -20,8 +20,8 @@
window.open('http://127.0.0.1:' + FRONT_PORT + '/#/tasks?request=' + requestStr + '&response=' + responseStr)
}
},
pushTask: function (taskForm, onSuccess, onError) {
ajax.postAsync('http://127.0.0.1:' + REST_PORT + '/tasks', taskForm, onSuccess, onError)
pushTask: function (taskForm, onSuccess, onError, refresh) {
ajax.postAsync('http://127.0.0.1:' + REST_PORT + '/tasks?refresh=' + refresh, taskForm, onSuccess, onError)
},
getDownConfig: function () {
var config = ajax.get('http://127.0.0.1:' + REST_PORT + '/config')
Expand Down Expand Up @@ -52,7 +52,7 @@
})
})((function () {
return {
version:'${version}',
version: '${version}',
buildXHR: function () {
var xhr = null
if (window.XMLHttpRequest) {
Expand Down

0 comments on commit 7059e84

Please sign in to comment.