Showing
7 changed files
with
15 additions
and
5 deletions
@@ -5,4 +5,6 @@ module.exports=function(app) { | @@ -5,4 +5,6 @@ module.exports=function(app) { | ||
5 | app.post("/ajax/upload","common_multipart"); | 5 | app.post("/ajax/upload","common_multipart"); |
6 | app.post("/ajax/ueditor","common_baiduUeditor"); | 6 | app.post("/ajax/ueditor","common_baiduUeditor"); |
7 | app.post("/ajax/proxy","common_proxy"); | 7 | app.post("/ajax/proxy","common_proxy"); |
8 | + | ||
9 | + app.get("/ajax/download","common_download") | ||
8 | } | 10 | } |
@@ -188,7 +188,10 @@ module.exports={ | @@ -188,7 +188,10 @@ module.exports={ | ||
188 | body:JSON.stringify(req.body) | 188 | body:JSON.stringify(req.body) |
189 | }); | 189 | }); |
190 | return callback(null, result) | 190 | return callback(null, result) |
191 | + }, | ||
192 | + download:function(req, callback){ | ||
193 | + var result = request.get(config.domain + "/batch/download?path=" + req.query.path); | ||
194 | + return callback(null, result); | ||
191 | } | 195 | } |
192 | - | ||
193 | } | 196 | } |
194 | } | 197 | } |
@@ -124,7 +124,7 @@ | @@ -124,7 +124,7 @@ | ||
124 | <input id="upload-input" name="file" class="btn btn-default excel-upload" type="file"> | 124 | <input id="upload-input" name="file" class="btn btn-default excel-upload" type="file"> |
125 | </span> | 125 | </span> |
126 | 126 | ||
127 | - <a class="excel-model" href="/ajax/link/{{download}}">表头下载</a> | 127 | + <a class="excel-model" href="/ajax/link/batchUpdatePrice">表头下载</a> |
128 | <input id="sure-change" class="btn btn-primary" type="button" value="确定变价"> | 128 | <input id="sure-change" class="btn btn-primary" type="button" value="确定变价"> |
129 | </div> | 129 | </div> |
130 | 130 |
@@ -461,5 +461,5 @@ $('#sure-change').on('click', function() { | @@ -461,5 +461,5 @@ $('#sure-change').on('click', function() { | ||
461 | }); | 461 | }); |
462 | 462 | ||
463 | $('#download-btn').on('click', function() { | 463 | $('#download-btn').on('click', function() { |
464 | - location.href = $(this).data('domain') + '/batch/download?path=' + path; | 464 | + location.href = '/ajax/download?path=' + path; |
465 | }); | 465 | }); |
@@ -5,4 +5,6 @@ module.exports=function(app) { | @@ -5,4 +5,6 @@ module.exports=function(app) { | ||
5 | app.post("/ajax/upload","common_multipart"); | 5 | app.post("/ajax/upload","common_multipart"); |
6 | app.post("/ajax/ueditor","common_baiduUeditor"); | 6 | app.post("/ajax/ueditor","common_baiduUeditor"); |
7 | app.post("/ajax/proxy","common_proxy"); | 7 | app.post("/ajax/proxy","common_proxy"); |
8 | + | ||
9 | + app.get("/ajax/download","common_download") | ||
8 | } | 10 | } |
@@ -188,7 +188,10 @@ module.exports={ | @@ -188,7 +188,10 @@ module.exports={ | ||
188 | body:JSON.stringify(req.body) | 188 | body:JSON.stringify(req.body) |
189 | }); | 189 | }); |
190 | return callback(null, result) | 190 | return callback(null, result) |
191 | + }, | ||
192 | + download:function(req, callback){ | ||
193 | + var result = request.get(config.domain + "/batch/download?path=" + req.query.path); | ||
194 | + return callback(null, result); | ||
191 | } | 195 | } |
192 | - | ||
193 | } | 196 | } |
194 | } | 197 | } |
@@ -124,7 +124,7 @@ | @@ -124,7 +124,7 @@ | ||
124 | <input id="upload-input" name="file" class="btn btn-default excel-upload" type="file"> | 124 | <input id="upload-input" name="file" class="btn btn-default excel-upload" type="file"> |
125 | </span> | 125 | </span> |
126 | 126 | ||
127 | - <a class="excel-model" href="/ajax/link/{{download}}">表头下载</a> | 127 | + <a class="excel-model" href="/ajax/link/batchUpdatePrice">表头下载</a> |
128 | <input id="sure-change" class="btn btn-primary" type="button" value="确定变价"> | 128 | <input id="sure-change" class="btn btn-primary" type="button" value="确定变价"> |
129 | </div> | 129 | </div> |
130 | 130 |
-
Please register or login to post a comment