Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
ty_patentSys
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hanxiao
ty_patentSys
Commits
9f142a55
Commit
9f142a55
authored
Jul 20, 2023
by
liudx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
时间可单选
parent
4f28031f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
src/router/index.js
+19
-2
src/views/patent/index.vue
+2
-0
No files found.
src/router/index.js
View file @
9f142a55
import
{
createRouter
,
createWebHistory
}
from
'vue-router'
import
{
createRouter
,
createWebHashHistory
}
from
'vue-router'
import
{
message
}
from
"ant-design-vue"
;
// import HomeView from '../views/HomeView.vue'
import
login
from
"../views/login/index.vue"
import
home
from
"../views/home/home.vue"
...
...
@@ -148,8 +149,24 @@ const routes = [
]
const
router
=
createRouter
({
history
:
createWebHistory
(
process
.
env
.
BASE_URL
),
history
:
createWebHashHistory
(
process
.
env
.
BASE_URL
),
mode
:
'hash'
,
routes
})
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
if
(
to
.
path
===
'/login'
||
to
.
path
===
'/adminLogin'
||
to
.
path
===
'/forget'
)
{
next
();
}
else
{
let
token
=
localStorage
.
getItem
(
'token'
);
if
(
!
token
)
{
message
.
error
(
'请先登录'
)
next
(
'/login'
);
}
else
{
next
();
}
}
})
export
default
router
src/views/patent/index.vue
View file @
9f142a55
...
...
@@ -39,6 +39,7 @@
<a-range-picker
v-model:value=
"formState['rangetime1']"
value-format=
"YYYY-MM-DD"
:allowEmpty=
"[true,true]"
/>
</a-config-provider>
</a-form-item>
...
...
@@ -47,6 +48,7 @@
<a-range-picker
v-model:value=
"formState['rangetime2']"
value-format=
"YYYY-MM-DD"
:allowEmpty=
"[true,true]"
/>
</a-config-provider>
</a-form-item>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment