Commit 245d24b2 authored by 刘雅文's avatar 刘雅文

添加水印

parent 6826c807
......@@ -32,7 +32,7 @@
"vuedraggable": "^2.21.0",
"vuex": "^3.0.1",
"vuex-persistedstate": "^2.5.4",
"watermark-dom": "^2.3.0"
"watermark-dom": "^2.2.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.4.0",
......@@ -12725,9 +12725,9 @@
}
},
"node_modules/watermark-dom": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/watermark-dom/-/watermark-dom-2.3.0.tgz",
"integrity": "sha512-2++fJESs8ULlrOPHEJGi72UxcDmVTsJDZ3kMa5umU6IWc78A4g1kOAqh1k6FEQhrq9QpkV7wzuoUeMhvFlWGWg=="
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/watermark-dom/-/watermark-dom-2.2.1.tgz",
"integrity": "sha512-mHmp+g4sBjvQ6Ew/WCfNfJoxwIAA7FGbUKfd34eJIzOG9Gmlpg+v7A3hykt2JbiU4/ve+K+OCPvQlKiA2wJqew=="
},
"node_modules/wbuf": {
"version": "1.7.3",
......@@ -24171,9 +24171,9 @@
}
},
"watermark-dom": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/watermark-dom/-/watermark-dom-2.3.0.tgz",
"integrity": "sha512-2++fJESs8ULlrOPHEJGi72UxcDmVTsJDZ3kMa5umU6IWc78A4g1kOAqh1k6FEQhrq9QpkV7wzuoUeMhvFlWGWg=="
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/watermark-dom/-/watermark-dom-2.2.1.tgz",
"integrity": "sha512-mHmp+g4sBjvQ6Ew/WCfNfJoxwIAA7FGbUKfd34eJIzOG9Gmlpg+v7A3hykt2JbiU4/ve+K+OCPvQlKiA2wJqew=="
},
"wbuf": {
"version": "1.7.3",
......
......@@ -36,7 +36,7 @@
"vuedraggable": "^2.21.0",
"vuex": "^3.0.1",
"vuex-persistedstate": "^2.5.4",
"watermark-dom": "^2.3.0"
"watermark-dom": "^2.2.1"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.4.0",
......
......@@ -9,17 +9,18 @@ import vueCanvasNest from "vue-canvas-nest";
// npm install watermark-dom --save 安装水印插件
//引入水印插件
import watermark from "watermark-dom";
// import watermark from "watermark-dom";
import watermark from './watermark-dom/watermark'
export default {
name: "app",
components: { vueCanvasNest },
created() {
const userName = localStorage.getItem("userName");
const userCell = localStorage.getItem("userCell");
const userCells = userCell.substr(-4);
const userCell = localStorage.getItem("userCellFour");
// const userCells = userCell.substr(-4);
setTimeout(() => {
if (userName) {
watermark.load({ watermark_txt: userName + userCells ,watermark_color:'#aaa',watermark_angle:30,});
watermark.load({ watermark_txt: userName + userCell ,watermark_color:'#aaa',watermark_angle:30});
}
}, 100);
},
......
......@@ -66,7 +66,8 @@
</template>
<script type="text/ecmascript-6">
import watermark from "watermark-dom";
// import watermark from "watermark-dom";
import watermark from '../../watermark-dom/watermark'
export default {
name: "SisLogin",
......@@ -124,12 +125,13 @@ export default {
this.$cacheUtils.cleanCache();
this.$$post("/login", this.user).then((res) => {
if (res.data.code === "200") {
watermark.load({ watermark_txt: res.data.result.userName + res.data.result.userCell.substr(-4) ,watermark_color:'#aaa',watermark_angle:30,});
// console.log(res.data.result,'登录成功返回的结果');
localStorage.setItem("userName", res.data.result.userName);
localStorage.setItem("agentNo", res.data.result.extensionNumber);
localStorage.setItem("loginName", res.data.result.loginName);
localStorage.setItem("userCell", res.data.result.userCell);
localStorage.setItem("userCellFour", res.data.result.userCellFour);
// console.log(res.data.result.userCell,'返回的手机号');
let userRolePermission = this.userRolelistToStringUtils(
......@@ -166,6 +168,9 @@ export default {
localStorage.setItem("bg", context.canvas.toDataURL());
this.$router.push("/index");
setTimeout(()=>{
watermark.load({ watermark_txt: res.data.result.userName + res.data.result.userCellFour ,watermark_color:'#aaa',watermark_angle:30,});
},100)
} else {
this.ui.loginLoading = false;
this.$message({
......
......@@ -7972,10 +7972,10 @@
"chokidar" "^3.4.1"
"watchpack-chokidar2" "^2.0.1"
"watermark-dom@^2.3.0":
"integrity" "sha512-2++fJESs8ULlrOPHEJGi72UxcDmVTsJDZ3kMa5umU6IWc78A4g1kOAqh1k6FEQhrq9QpkV7wzuoUeMhvFlWGWg=="
"resolved" "https://registry.npmjs.org/watermark-dom/-/watermark-dom-2.3.0.tgz"
"version" "2.3.0"
"watermark-dom@^2.2.1":
"integrity" "sha512-mHmp+g4sBjvQ6Ew/WCfNfJoxwIAA7FGbUKfd34eJIzOG9Gmlpg+v7A3hykt2JbiU4/ve+K+OCPvQlKiA2wJqew=="
"resolved" "https://registry.npmjs.org/watermark-dom/-/watermark-dom-2.2.1.tgz"
"version" "2.2.1"
"wbuf@^1.1.0", "wbuf@^1.7.3":
"integrity" "sha1-wdjRSTFtPqhShIiVy2oL/oh7h98="
......
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 to comment