Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
occloud-server
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
yangjiarong
occloud-server
Commits
d2c99d52
Commit
d2c99d52
authored
Jul 20, 2022
by
liuliufashi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
8a865fd2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
143 additions
and
99 deletions
+143
-99
.env.dev
web-vue-admin/.env.dev
+2
-1
dist.zip
web-vue-admin/dist.zip
+0
-0
index.ts
web-vue-admin/src/router/index.ts
+10
-11
index.vue
web-vue-admin/src/views/pay-bind/index.vue
+130
-87
webpack.config.js
web-vue-admin/webpack.config.js
+1
-0
No files found.
web-vue-admin/.env.dev
View file @
d2c99d52
VUE_APP_MODE = 'dev'
VUE_APP_MODE = 'dev'
NODE_ENV
= 'development'
NODE_ENV
=production browserify -g envify -e main.js | uglifyjs -c -m > build.js
VUE_APP_BASE_URL = '/iships/'
VUE_APP_BASE_URL = '/iships/'
VUE_APP_MODE = 'http://47.102.211.197:8092'
VUE_APP_MODE = 'http://47.102.211.197:8092'
VUE_APP_TEXT = '测试环境'
VUE_APP_TEXT = '测试环境'
\ No newline at end of file
web-vue-admin/dist.zip
View file @
d2c99d52
No preview for this file type
web-vue-admin/src/router/index.ts
View file @
d2c99d52
import
{
createRouter
,
createWebHistory
,
RouteRecordRaw
}
from
'vue-router'
import
{
createRouter
,
createWebH
ashH
istory
,
RouteRecordRaw
}
from
'vue-router'
import
{
getToken
}
from
"@/utils/token"
import
{
getToken
}
from
"@/utils/token"
import
Login
from
'@/views/login/index.vue'
import
Login
from
'@/views/login/index.vue'
import
Home
from
'@/views/home/index.vue'
import
Home
from
'@/views/home/index.vue'
import
Error
from
'@/views/404/index.vue'
import
Error
from
'@/views/404/index.vue'
import
{
onGetRouter
}
from
'@/utils/userInfo'
import
{
onGetRouter
}
from
'@/utils/userInfo'
console
.
log
(
onGetRouter
(),
'getRouter'
);
const
routes
:
Array
<
RouteRecordRaw
>
=
[
const
routes
:
Array
<
RouteRecordRaw
>
=
[
{
{
...
@@ -63,15 +62,15 @@ const routes: Array<RouteRecordRaw> = [
...
@@ -63,15 +62,15 @@ const routes: Array<RouteRecordRaw> = [
}
}
]
]
const
router
=
createRouter
({
const
router
=
createRouter
({
history
:
createWebHistory
(),
history
:
createWebH
ashH
istory
(),
routes
routes
})
})
//
router.beforeEach((to,from,next)=>{
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
//
const token:any = getToken
const
token
:
any
=
getToken
//
if(token){
if
(
token
){
//
next()
next
()
//
}else{
}
else
{
//
router.push('/login')
router
.
push
(
'/login'
)
//
}
}
//
})
})
export
default
router
export
default
router
web-vue-admin/src/views/pay-bind/index.vue
View file @
d2c99d52
This diff is collapsed.
Click to expand it.
web-vue-admin/webpack.config.js
View file @
d2c99d52
module
.
exports
=
{
module
.
exports
=
{
mode
:
'production'
,
rules
:
[{
rules
:
[{
test
:
/
\.
less$/
,
test
:
/
\.
less$/
,
use
:
[{
use
:
[{
...
...
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