Commit 8b876913 by LJM

css

parent 8812edfd
{
"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
<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>
......@@ -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) => {})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment