This commit is contained in:
hezhengao 2024-05-23 17:34:28 +08:00
parent 78e2df5522
commit 7b4b977efe
3 changed files with 20 additions and 4 deletions

View File

@ -1,5 +1,5 @@
{ {
"name": "Survey", "name": "zh-qrcod",
"version": "2.0.0", "version": "2.0.0",
"private": true, "private": true,
"scripts": { "scripts": {

View File

@ -12,7 +12,7 @@
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css"> --> <!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css"> -->
<title> <title>
<!-- <%= htmlWebpackPlugin.options.title %> --> 问卷调查
</title> </title>
</head> </head>
@ -26,3 +26,15 @@
</body> </body>
</html> </html>
<script>
window.onload = function () {
// 替换标题为新的内容
var newTitle = localStorage.getItem('description')
document.title = newTitle;
console.log('新标题:', document.title);
};
</script>

View File

@ -58,11 +58,15 @@ export default {
methods: { methods: {
TimuUrl() { TimuUrl() {
var url = window.location.href; var url = window.location.href;
console.log(url,'dadad');
var urlnew = new URL(url) var urlnew = new URL(url)
this.urlid = urlnew.searchParams.get('id') this.urlid = urlnew.searchParams.get('id')
this.urldeptid=urlnew.searchParams.get('deptId') this.urldeptid=urlnew.searchParams.get('deptId')
this.urldeptname=urlnew.searchParams.get('deptName') this.urldeptname=urlnew.searchParams.get('deptName')
this.urldescription=urlnew.searchParams.get('description')
localStorage.setItem('description',this.urldescription)
console.log(this.urlid, 'yyuu'); console.log(this.urlid, 'yyuu');
console.log(this.urldeptid, 'adaa'); console.log(this.urldeptid, 'adaa');
}, },