zhouwenxuan
2023-06-20 79ea9dfd43f0e000abcba7ac2168cee76b8cd765
pages/tabBar/notice/detail.vue
@@ -148,20 +148,18 @@
         openFile(item) {
            let fileUrl = '';
            console.log("iiii",item)
            if(item.role == 'leader'){
        if(this.detailData.role == 'leader'){
               fileUrl = VUE_APP_BASE_URL + item.attachment;
               console.log("url",fileUrl)
            }else {
               fileUrl = VUE_APP_BASE_URL + item.attachement;
               console.log("url",VUE_APP_BASE_URL + item.attachement)
            }
        console.log("urlllllllllllll",fileUrl)
            uni.downloadFile({
               url: encodeURI('http://192.168.0.38:8086/uploadtest/2023/naturalDisaster/Warninginfo/0620/abc051b6ee66402d98e7b27216662d17.pdf'),
          url: fileUrl,
               header: {  
                  'Content-type': 'application/json',
                  'tk':uni.getStorageSync('tk'),
                  'uid': uni.getStorageSync('uid')
            // 'tk':uni.getStorageSync('tk'),
            // 'uid': uni.getStorageSync('uid'),
               },  
               success:function(res){
                  console.log("下载res",res);
@@ -175,7 +173,7 @@
                  }
                  // plus.runtime.openFile(filePath)
                  uni.openDocument({
                     filePath: escape(filePath),
              filePath: filePath,
                     success:function(){
                        console.log('成功')
                     },