Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
H5_2.0
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8b876913
authored
May 17, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
css
parent
8812edfd
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
100 additions
and
71 deletions
assets/css/mine/login.scss
pages.json
pages/mine/login.vue
router/index.js
static/logo.png
assets/css/mine/login.scss
0 → 100644
View file @
8b876913
.page-login
{
}
pages.json
View file @
8b876913
{
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
{
"path"
:
"pages/index/index"
,
"style"
:
{
"navigationBarTitleText"
:
"首页"
}
},
{
"path"
:
"pages/search/search"
,
"style"
:
{
"navigationBarTitleText"
:
"搜索首页"
}
},
{
"path"
:
"pages/search/searchlist"
,
"style"
:
{
"navigationBarTitleText"
:
"搜索列表"
}
},
{
"path"
:
"pages/car/car"
,
"style"
:
{
"navigationBarTitleText"
:
"购物车"
}
}
],
"globalStyle"
:
{
//
"navigationBarTextStyle"
:
"black"
,
//
"navigationBarTitleText"
:
"uni-app"
,
//
"navigationBarBackgroundColor"
:
"#F8F8F8"
,
//
"backgroundColor"
:
"#F8F8F8"
},
"uniIdRouter"
:
{}
"pages"
:
[
//pages数组中第一项表示应用启动页,参考:https
:
//uniapp.dcloud.io/collocation/pages
{
"path"
:
"pages/index/index"
,
"style"
:
{
"navigationBarTitleText"
:
"首页"
}
},
{
"path"
:
"pages/search/search"
,
"style"
:
{
"navigationBarTitleText"
:
"搜索首页"
}
},
{
"path"
:
"pages/search/searchlist"
,
"style"
:
{
"navigationBarTitleText"
:
"搜索列表"
}
},
{
"path"
:
"pages/car/car"
,
"style"
:
{
"navigationBarTitleText"
:
"购物车"
}
},
{
"path"
:
"pages/mine/login"
,
"style"
:
{
"navigationBarTitleText"
:
"登录"
}
}
],
"globalStyle"
:
{
},
"uniIdRouter"
:
{}
}
\ No newline at end of file
pages/mine/login.vue
0 → 100644
View file @
8b876913
<
template
>
<view
class=
"page-login column rowCenter verCenter"
><image
src=
"../../static/logo.png"
mode=
""
></image></view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{};
},
onLoad
()
{},
methods
:
{}
};
</
script
>
<
style
lang=
"scss"
>
@import
'@/assets/css/mine/login.scss'
;
</
style
>
router/index.js
View file @
8b876913
...
...
@@ -6,48 +6,54 @@ import Router from 'uni-simple-router'
Vue
.
use
(
Router
)
//初始化
const
router
=
new
Router
({
APP
:
{
animation
:
{
animationType
:
'pop-in'
,
animationDuration
:
300
}
},
encodeURI
:
false
,
//页面刷新后地址栏参数丢失问题 false不丢失 true刷新后地址栏参数清空
routes
:
[{
//注意:path必须跟pages.json中的地址对应,最前面别忘了加'/'哦
path
:
'/pages/index/index'
,
aliasPath
:
'/'
,
//对于h5端你必须在首页加上aliasPath并设置为/
meta
:
{
title
:
'首页'
,
},
},
{
path
:
'/pages/search/search'
,
aliasPath
:
'/search'
,
meta
:
{
title
:
'搜索首页'
,
},
},
{
path
:
'/pages/search/searchlist'
,
aliasPath
:
'/s'
,
meta
:
{
title
:
'搜索列表'
,
},
},
{
path
:
'/pages/car/car'
,
aliasPath
:
'/joincart'
,
meta
:
{
title
:
'购物车'
,
},
},
]
APP
:
{
animation
:
{
animationType
:
'pop-in'
,
animationDuration
:
300
}
},
encodeURI
:
false
,
routes
:
[{
path
:
'/pages/index/index'
,
aliasPath
:
'/'
,
meta
:
{
title
:
'首页'
,
}
},
{
path
:
'/pages/search/search'
,
aliasPath
:
'/search'
,
meta
:
{
title
:
'搜索首页'
,
}
},
{
path
:
'/pages/search/searchlist'
,
aliasPath
:
'/s'
,
meta
:
{
title
:
'搜索列表'
,
}
},
{
path
:
'/pages/car/car'
,
aliasPath
:
'/joincart'
,
meta
:
{
title
:
'购物车'
,
}
},
{
path
:
'/pages/mine/login'
,
aliasPath
:
'/login'
,
meta
:
{
title
:
'登录'
,
}
},
]
});
//全局路由前置守卫
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
next
()
next
()
})
// 全局路由后置守卫
router
.
afterEach
((
to
,
from
)
=>
{})
...
...
static/logo.png
0 → 100644
View file @
8b876913
19 KB
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