浏览代码

新增门户管理-新闻管理-添加下载按钮

Sanmu8 1 年之前
父节点
当前提交
40904f5b71
共有 2 个文件被更改,包括 5 次插入8 次删除
  1. 1 1
      src/api/portal/OPSERVICE/OPSERVICE.js
  2. 4 7
      src/views/CONTACTUS/index.vue

+ 1 - 1
src/api/portal/OPSERVICE/OPSERVICE.js

@@ -65,7 +65,7 @@ export function upload(data) {
 // 下载文件
 export function download(data) {
   return request({
-    url: '/common/download',
+    url: '/OPSERVICE/download',
     method: 'get',
     data:data
   })

+ 4 - 7
src/views/CONTACTUS/index.vue

@@ -311,13 +311,10 @@ export default {
       });
     },
     handleDownload(row){
-      // let data = {
-      //   cbOpServiceVo:row,
-      //   fileName:row.serviceName
-      // }
-      let formData = new FormData();
-      formData.append("fileName", row.serviceName);
-      download(formData).then(res=>{
+      let data = new FormData()
+      data.append('resource',row.serviceName)
+      data.append('delete',false)
+      download(data).then(res=>{
       })
     },
     httprequest() {},