问题如下
<iframe
:src="srcUrl"
frameborder="0"
width="100%"
height="100%"
allowfullscreen="true"
></iframe>
async beforeOpen(){
await officeToOfd(this.value.fileId).then(res=>{
if("0"==res){
this.$Message.warning('XXXXXXXXXX');
this.$refs['ModalOperator'].close()
}else{
this.srcUrl=https://1.1.1.1:33563/aaa/web/reader?file=res;
}
})
},
通过nginx反向代理跳转到http页面
location ^~ /aaa/{ proxy_pass http://2.2.2.2/; proxy_cookie_path /center-ui /; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }
https://3.3.3.3:33563/center-ui/api/file/
#前端 location ^~ /center-ui/{ proxy_pass http://4.4.4.4:9093/center-ui/;
proxy_cookie_path /center-ui /;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
配置好后跳转完美解决