todo
This commit is contained in:
86
src/App.vue
86
src/App.vue
@@ -13,9 +13,9 @@ export default {
|
|||||||
name: "App",
|
name: "App",
|
||||||
created() {
|
created() {
|
||||||
localStronge.setServiceip({
|
localStronge.setServiceip({
|
||||||
// ip: "127.0.0.1",
|
ip: "127.0.0.1",
|
||||||
// ip: "192.168.1.115",
|
// ip: "192.168.1.115",
|
||||||
ip: "192.168.101.121",
|
// ip: "192.168.101.121",
|
||||||
host: "9081",
|
host: "9081",
|
||||||
});
|
});
|
||||||
// 127.0.0.1 8082
|
// 127.0.0.1 8082
|
||||||
@@ -24,37 +24,37 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadScript(url) {
|
loadScript(url) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const script = document.createElement('script');
|
const script = document.createElement('script');
|
||||||
script.src = url;
|
script.src = url;
|
||||||
script.onload = resolve;
|
script.onload = resolve;
|
||||||
script.onerror = reject;
|
script.onerror = reject;
|
||||||
document.head.appendChild(script);
|
document.head.appendChild(script);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
initWaterAPI(){
|
initWaterAPI() {
|
||||||
this.loadScript('http://47.112.247.192:8001/caserver/wm-ys-2024.js?v='+new Date().getTime())
|
this.loadScript('http://47.112.247.192:8001/caserver/wm-ys-2024.js?v=' + new Date().getTime())
|
||||||
.then(() => {
|
.then(() => {
|
||||||
// 文件加载成功后执行的逻辑
|
// 文件加载成功后执行的逻辑
|
||||||
console.log('JavaScript 文件加载成功');
|
console.log('JavaScript 文件加载成功');
|
||||||
}).then(()=>{
|
}).then(() => {
|
||||||
let params={
|
let params = {
|
||||||
URL:"http://47.112.247.192:8001/caserver/",
|
URL: "http://47.112.247.192:8001/caserver/",
|
||||||
opened:1, //水印开关:0关闭 1开启
|
opened: 1, //水印开关:0关闭 1开启
|
||||||
companyId:"TS002", //企业编号
|
companyId: "TS002", //企业编号
|
||||||
userId:"001", //员工工号
|
userId: "001", //员工工号
|
||||||
alpha:0.6, //水印强度
|
alpha: 0.6, //水印强度
|
||||||
anchorAlpha:0.3 //定位点强度
|
anchorAlpha: 0.3 //定位点强度
|
||||||
};
|
};
|
||||||
setTimeout(function(){
|
setTimeout(function () {
|
||||||
watermarkY(params)
|
watermarkY(params)
|
||||||
}
|
}
|
||||||
,1000)
|
, 1000)
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
// 文件加载失败的处理逻辑
|
// 文件加载失败的处理逻辑
|
||||||
//console.error('JavaScript 文件加载失败');
|
//console.error('JavaScript 文件加载失败');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -64,17 +64,17 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
#mask_bgw{
|
#mask_bgw {
|
||||||
position:fixed;
|
position: fixed;
|
||||||
_position:absolute;
|
_position: absolute;
|
||||||
top:2px;
|
top: 2px;
|
||||||
left:2px;
|
left: 2px;
|
||||||
z-index:99999997;
|
z-index: 99999997;
|
||||||
background:url("~@/assets/img/U01_1.png");
|
background: url("~@/assets/img/U01_1.png");
|
||||||
background-size:150px 150px;
|
background-size: 150px 150px;
|
||||||
opacity:1;
|
opacity: 1;
|
||||||
pointer-events : none;
|
pointer-events: none;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height:100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user