马宇豪
2023-06-20 933031912634fa6dcd4ba9acf833d78b071e980e
Merge remote-tracking branch 'origin/master'
已修改1个文件
16 ■■■■■ 文件已修改
pages/tabBar/notice/detail.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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('成功')
                            },