Commit c943811b by 钟乾明

u: 水印调淡

parent e0bc5a5c
import common from './common';
const testToken = 'yzj_7f8dcbbe6ac747367a4c2ace97e5f92c'
// const config = {
// product: false,
// ssoToken: 'token',
......@@ -62,7 +62,7 @@ const config = {
loginuserid: '46000011',
appkey: 'd504275e',
uid: 'hqhuang@cndrealty.com',
token:'yzj_c4502b75af9870b2db5a87ac4b05c3e9',
token:'yzj_7f8dcbbe6ac747367a4c2ace97e5f92c',
baseUrl: 'https://staging.jffctest.com/',
};
......
......@@ -75,7 +75,8 @@ app.ready(() => {
$mas.token = token;
mount();
//todo 开发环境调试添加水印
setWaterMark(`黄华强hqhuang@cndrealty.com`, '');
// setWaterMark(`黄华强hqhuang@cndrealty.com`, '');
createWatermark({ content: `黄华强hqhuang@cndrealty.com` });
// createWatermark({ content: '黄华强hqhuang@cndrealty.com' });
});
// 取消延迟响应
......
......@@ -35,7 +35,7 @@ const app = {
doReady(fn)
}, false)
*/
qing.ready(function () {
window.qing&&qing.ready(function () {
doReady(fn)
})
} else {
......
......@@ -4,12 +4,13 @@ const createWatermark = ({
container = document.body,
width = "240px",
height = "150px",
fontSize = "14px",
fontSize = "13px",
opacity = "0.4",
rotate = -14,
color = "#999",
color = "#d8d6d6",
zIndex = 9999,
}) => {
console.log('话水印>>');
// 创建水印svg
const svgStr = `<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}">
<text x="50%" y="50%" dy="12px"
......@@ -19,9 +20,8 @@ const createWatermark = ({
stroke-opacity="${opacity}"
fill="none"
transform="rotate(${rotate}, ${parseFloat(width) / 2}, ${
parseFloat(height) / 2
})"
style="font-size: ${fontSize};">
parseFloat(height) / 2})"
style="font-size: ${fontSize};letter-spacing: 1px;">
${content}
</text>
</svg>`;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment