当前位置:网站首页>新开窗口 展示协议

新开窗口 展示协议

2022-08-09 22:46:00 tiankongxiao

handleUpdateAgreement() {
                var temp = {
                    bidderSetmealId: this.multipleSelection[0].id,
                        }

                const data = {
                    url: "@ViewBag.agreementUrl",
                    postData: JSON.stringify(temp)
                }
                axios.post("/base/postgetway", data)
                    .then(res => {
                        console.log("heong", res.data.code)
                        if (res.data.code == 1000) {
                            let html = ''                            
                            let CardBack = res.data.data.idCardBack;
                            let CardFront = res.data.data.idCardFront;

                            html = '<div style="display:flex; justify-content:space-between;">'+
                                '<img style = "width:47%" src="' + CardBack+'" />' +
                                '<img style = "width:47%" src="' + CardFront + '" />' +
                                '</div >';
                            var result = res.data.data.content + html;
                                     
                            let myWindow = window.open('', '', 'width:100%,height:100%');
                            myWindow.document.write(result) //info为html的字符串
                            myWindow.document.close()//必须关闭流,否则表单不生效
                            myWindow.focus();

                           
                        } else {
                            this.$message.error('操作失败');
                        }

                        //
                    });

            },

原网站

版权声明
本文为[tiankongxiao]所创,转载请带上原文链接,感谢
https://blog.csdn.net/tiankongxiao/article/details/126243114