Commit 8b876913 by LJM

css

parent 8812edfd
{ {
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationBarTitleText": "首页" "navigationBarTitleText": "首页"
} }
}, },
{ {
"path": "pages/search/search", "path": "pages/search/search",
"style": { "style": {
"navigationBarTitleText": "搜索首页" "navigationBarTitleText": "搜索首页"
} }
}, },
{ {
"path": "pages/search/searchlist", "path": "pages/search/searchlist",
"style": { "style": {
"navigationBarTitleText": "搜索列表" "navigationBarTitleText": "搜索列表"
} }
}, },
{ {
"path": "pages/car/car", "path": "pages/car/car",
"style": { "style": {
"navigationBarTitleText": "购物车" "navigationBarTitleText": "购物车"
} }
} },
], {
"globalStyle": { "path": "pages/mine/login",
// "navigationBarTextStyle": "black", "style": {
// "navigationBarTitleText": "uni-app", "navigationBarTitleText": "登录"
// "navigationBarBackgroundColor": "#F8F8F8", }
// "backgroundColor": "#F8F8F8" }
}, ],
"uniIdRouter": {} "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' ...@@ -6,48 +6,54 @@ import Router from 'uni-simple-router'
Vue.use(Router) Vue.use(Router)
//初始化 //初始化
const router = new Router({ const router = new Router({
APP: { APP: {
animation: { animation: {
animationType: 'pop-in', animationType: 'pop-in',
animationDuration: 300 animationDuration: 300
} }
}, },
encodeURI: false, //页面刷新后地址栏参数丢失问题 false不丢失 true刷新后地址栏参数清空 encodeURI: false,
routes: [{ routes: [{
//注意:path必须跟pages.json中的地址对应,最前面别忘了加'/'哦 path: '/pages/index/index',
path: '/pages/index/index', aliasPath: '/',
aliasPath: '/', //对于h5端你必须在首页加上aliasPath并设置为/ meta: {
meta: { title: '首页',
title: '首页', }
}, },
}, {
{ path: '/pages/search/search',
path: '/pages/search/search', aliasPath: '/search',
aliasPath: '/search', meta: {
meta: { title: '搜索首页',
title: '搜索首页', }
}, },
}, {
{ path: '/pages/search/searchlist',
path: '/pages/search/searchlist', aliasPath: '/s',
aliasPath: '/s', meta: {
meta: { title: '搜索列表',
title: '搜索列表', }
}, },
}, {
{ path: '/pages/car/car',
path: '/pages/car/car', aliasPath: '/joincart',
aliasPath: '/joincart', meta: {
meta: { title: '购物车',
title: '购物车', }
}, },
}, {
] path: '/pages/mine/login',
aliasPath: '/login',
meta: {
title: '登录',
}
},
]
}); });
//全局路由前置守卫 //全局路由前置守卫
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
next() next()
}) })
// 全局路由后置守卫 // 全局路由后置守卫
router.afterEach((to, from) => {}) 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