qrcode
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
"escape-html": "^1.0.3",
|
||||
"file-saver": "^2.0.5",
|
||||
"pako": "^2.1.0",
|
||||
"qrcode": "^1.5.1",
|
||||
"qrcodejs2": "^0.0.2",
|
||||
"view-design": "^4.7.0",
|
||||
"vue": "^2.7.14",
|
||||
"vue-axios": "^3.5.2",
|
||||
@@ -24,7 +24,6 @@
|
||||
"vue-router": "^3.5.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"core-js": "^3.26.1",
|
||||
"@babel/core": "^7.12.16",
|
||||
"@babel/eslint-parser": "^7.12.16",
|
||||
"@vue/cli-plugin-babel": "~5.0.8",
|
||||
@@ -32,11 +31,12 @@
|
||||
"@vue/cli-plugin-router": "~5.0.8",
|
||||
"@vue/cli-service": "~5.0.8",
|
||||
"compression-webpack-plugin": "^10.0.0",
|
||||
"core-js": "^3.26.1",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-plugin-vue": "^8.0.3",
|
||||
"javascript-obfuscator": "^4.0.0",
|
||||
"webpack-obfuscator": "^3.5.1",
|
||||
"webpack": "^5.1.0"
|
||||
"webpack": "^5.1.0",
|
||||
"webpack-obfuscator": "^3.5.1"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"root": true,
|
||||
|
||||
@@ -1 +1,59 @@
|
||||
<!DOCTYPE html><html><head><meta charset="utf-8"/><meta name="renderer"content="webkit"/><meta name="force-rendering"content="webkit"/><meta http-equiv="X-UA-Compatible"content="IE=edge,chrome=1"/><meta name="viewport"content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=2.0, user-scalable=yes"/><meta name="keywords"content="flagnote"/><meta name="description"content="flag note"/><meta name="theme-color"content="#ed4014"/><meta name="format-detection"content="telephone=no,email=no,adress=no"/><meta name="google"content="notranslate"><meta http-equiv="Expires"content="0"/><meta http-equiv="Pragma"content="no-cache"/><meta http-equiv="Cache-control"content="no-cache"/><meta http-equiv="Cache"content="no-cache"/><link rel="icon"href="/static/favicon.png"/><title>flagnote.com</title><style>body{background-color:#dddddd}</style><script type="text/javascript">(function(){var ua=navigator.userAgent.toLocaleLowerCase();var browserType="",browserVersion="";if(ua.match(/msie/)!=null||ua.match(/trident/)!=null){browserType="IE";alert("IE is not supported.");window.location="/IeIsNotSupported.html"}})();</script><script src="https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/vue.min.js"rel="stylesheet"type="text/javascript"></script><script src="https://cdn.jsdelivr.net/npm/vue-router@3.5.4/dist/vue-router.min.js"rel="stylesheet"type="text/javascript"></script><script src="https://cdn.jsdelivr.net/npm/axios@0.27.2/dist/axios.min.js"rel="stylesheet"type="text/javascript"></script><script src="https://cdn.jsdelivr.net/npm/view-design@4.7.0/dist/iview.min.js"rel="stylesheet"type="text/javascript"></script><script src="https://cdn.jsdelivr.net/npm/pako@2.1.0/dist/pako.min.js"rel="stylesheet"type="text/javascript"></script><script src="https://cdn.jsdelivr.net/npm/crypto-js@4.1.1/crypto-js.min.js"rel="stylesheet"type="text/javascript"></script><script src="https://cdn.jsdelivr.net/npm/vue-i18n@8.21.1/dist/vue-i18n.min.js"rel="stylesheet"type="text/javascript"></script><script src="https://cdn.jsdelivr.net/npm/file-saver@2.0.5/dist/FileSaver.min.js"rel="stylesheet"type="text/javascript"></script><script src="https://cdn.jsdelivr.net/npm/qrcode@1.5.1/build/qrcode.js"rel="stylesheet"type="text/javascript"></script><script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.11/dist/clipboard.min.js"rel="stylesheet"type="text/javascript"></script><link rel="stylesheet"href="https://cdn.jsdelivr.net/npm/view-design@4.7.0/dist/styles/iview.css"><!--Global site tag(gtag.js)-Google Analytics--><script async src="https://www.googletagmanager.com/gtag/js?id=G-FPS9PD2DFF"></script><script>window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}gtag("js",new Date());gtag("config","G-FPS9PD2DFF");</script></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id="app"></div></body></html>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="renderer" content="webkit" />
|
||||
<meta name="force-rendering" content="webkit" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta name="viewport"
|
||||
content="width=device-width,initial-scale=1.0, minimum-scale=1.0, maximum-scale=2.0, user-scalable=yes" />
|
||||
<meta name="keywords" content="flagnote" />
|
||||
<meta name="description" content="flag note" />
|
||||
<meta name="theme-color" content="#ed4014" />
|
||||
<meta name="format-detection" content="telephone=no,email=no,adress=no" />
|
||||
<meta name="google" content="notranslate">
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Cache-control" content="no-cache" />
|
||||
<meta http-equiv="Cache" content="no-cache" />
|
||||
<link rel="icon" href="/static/favicon.png" />
|
||||
<title>flagnote.com</title>
|
||||
<style>
|
||||
body {
|
||||
background-color: #dddddd
|
||||
}
|
||||
</style>
|
||||
<script
|
||||
type="text/javascript">(function () { var ua = navigator.userAgent.toLocaleLowerCase(); var browserType = "", browserVersion = ""; if (ua.match(/msie/) != null || ua.match(/trident/) != null) { browserType = "IE"; alert("IE is not supported."); window.location = "/IeIsNotSupported.html" } })();</script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue@2.7.14/dist/vue.min.js" rel="stylesheet"
|
||||
type="text/javascript"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue-router@3.5.4/dist/vue-router.min.js" rel="stylesheet"
|
||||
type="text/javascript"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/axios@0.27.2/dist/axios.min.js" rel="stylesheet"
|
||||
type="text/javascript"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/view-design@4.7.0/dist/iview.min.js" rel="stylesheet"
|
||||
type="text/javascript"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/pako@2.1.0/dist/pako.min.js" rel="stylesheet"
|
||||
type="text/javascript"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/crypto-js@4.1.1/crypto-js.min.js" rel="stylesheet"
|
||||
type="text/javascript"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/vue-i18n@8.21.1/dist/vue-i18n.min.js" rel="stylesheet"
|
||||
type="text/javascript"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/file-saver@2.0.5/dist/FileSaver.min.js" rel="stylesheet"
|
||||
type="text/javascript"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/qrcodejs2@0.0.2/qrcode.min.js" rel="stylesheet"
|
||||
type="text/javascript"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.11/dist/clipboard.min.js" rel="stylesheet"
|
||||
type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/view-design@4.7.0/dist/styles/iview.css">
|
||||
<!--Global site tag(gtag.js)-Google Analytics-->
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=G-FPS9PD2DFF"></script>
|
||||
<script>window.dataLayer = window.dataLayer || []; function gtag() { dataLayer.push(arguments) } gtag("js", new Date()); gtag("config", "G-FPS9PD2DFF");</script>
|
||||
</head>
|
||||
|
||||
<body><noscript><strong>Please enable JavaScript to continue.</strong></noscript>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="error">
|
||||
route error
|
||||
{{ $t("error.100001") }}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -12,7 +12,7 @@ export default {
|
||||
return {}
|
||||
},
|
||||
created() {
|
||||
alert("route error")
|
||||
alert(this.$t("error.100001"))
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -68,6 +68,12 @@
|
||||
</style>
|
||||
|
||||
<style>
|
||||
#qrImg img {
|
||||
margin: auto;
|
||||
width: 203px;
|
||||
height: 203px;
|
||||
}
|
||||
|
||||
#qrUrl {
|
||||
color: #ed4014;
|
||||
font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei";
|
||||
@@ -267,9 +273,9 @@
|
||||
</span><span id="qrUrl">{{ noteForm.noteUrl }}</span>
|
||||
</p>
|
||||
|
||||
<p style="text-align: center;margin-top:5px;">
|
||||
<canvas id="qrImg" class=""></canvas>
|
||||
</p>
|
||||
<div style="text-align: center;margin-top:10px;">
|
||||
<div id="qrImg"></div>
|
||||
</div>
|
||||
<p style="text-align: center;margin-top:10px;">
|
||||
<Button type="error" style="border-radius: 0px;font-size:19px;" @click="closeShareModel()">{{ $t("button.close")
|
||||
}}</Button>
|
||||
@@ -311,7 +317,7 @@ import { getStoreKey, getSecretKey } from "@/api/lock";
|
||||
import { deleteNote, getNoteBlob } from "@/api/note";
|
||||
import storage from "@/libs/storage";
|
||||
import { getEscapeText } from "@/libs/noteStorage";
|
||||
import QRCode from "qrcode";
|
||||
import QRCode from "qrcodejs2";
|
||||
import Clipboard from "clipboard";
|
||||
import { saveAs } from 'file-saver';
|
||||
import { isWeixin, getNoteUrl } from "@/libs/utils";
|
||||
@@ -423,6 +429,18 @@ export default {
|
||||
const someOtherEl = document.querySelector('#wrapper');
|
||||
myObserver.observe(someOtherEl);
|
||||
|
||||
let qrimg = document.getElementById("qrImg");
|
||||
let qrurl = "https://flagnote.com/" + this.noteForm.key;
|
||||
var opts = {
|
||||
text: qrurl,
|
||||
height: 203,
|
||||
width: 203,
|
||||
colorDark: "#ed4014",
|
||||
colorLight: "#FFFFFF",
|
||||
correctLevel: QRCode.CorrectLevel.M
|
||||
}
|
||||
new QRCode(qrimg, opts);
|
||||
|
||||
},
|
||||
updated() {
|
||||
},
|
||||
@@ -488,28 +506,10 @@ export default {
|
||||
},
|
||||
showShareModel() {
|
||||
this.model.showShare = true;
|
||||
let qrimg = document.getElementById("qrImg");
|
||||
let qrurl = "https://flagnote.com/" + this.noteForm.key;
|
||||
var opts = {
|
||||
errorCorrectionLevel: 'Q',
|
||||
type: 'image/jpeg',
|
||||
quality: 0.9,
|
||||
height: 192,
|
||||
width: 192,
|
||||
margin: 1,
|
||||
color: {
|
||||
dark: "#ed4014",
|
||||
light: "#FFFFFF"
|
||||
}
|
||||
}
|
||||
QRCode.toCanvas(qrimg, qrurl, opts)
|
||||
|
||||
storage.session.setText(this.secret.storeKey + "_share", '1');
|
||||
},
|
||||
closeShareModel() {
|
||||
if (this.model.showShare) {
|
||||
this.model.showShare = false;
|
||||
}
|
||||
storage.session.setText(this.secret.storeKey + "_share", '0');
|
||||
},
|
||||
showDeleteModel() {
|
||||
|
||||
@@ -14,7 +14,7 @@ module.exports = defineConfig({
|
||||
'axios': 'axios',
|
||||
//'vue-axios':'VueAxios',
|
||||
"crypto-js": "CryptoJS",
|
||||
'qrcode': 'QRCode',
|
||||
'qrcodejs2': 'QRCode',
|
||||
'pako': 'pako',
|
||||
"view-design": 'iview',
|
||||
"iview": 'ViewUI',
|
||||
|
||||
@@ -5241,6 +5241,11 @@ qrcode@^1.5.1:
|
||||
pngjs "^5.0.0"
|
||||
yargs "^15.3.1"
|
||||
|
||||
qrcodejs2@^0.0.2:
|
||||
version "0.0.2"
|
||||
resolved "https://registry.yarnpkg.com/qrcodejs2/-/qrcodejs2-0.0.2.tgz#465afe5e39f19facecb932c11f7a186109146ae1"
|
||||
integrity sha512-+Y4HA+cb6qUzdgvI3KML8GYpMFwB24dFwzMkS/yXq6hwtUGNUnZQdUnksrV1XGMc2mid5ROw5SAuY9XhI3ValA==
|
||||
|
||||
qs@6.11.0:
|
||||
version "6.11.0"
|
||||
resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a"
|
||||
|
||||
Reference in New Issue
Block a user