Authored by 陈峰

product

... ... @@ -7,13 +7,13 @@ let purviews = {
name: '发布新商品',
path: '/product/create'
},
sales: {
onsale: {
name: '在售商品',
path: '/product/sale'
path: '/product/onsale'
},
unstock: {
offsale: {
name: '未上架商品',
path: '/product/unstock'
path: '/product/offsale'
},
vips: {
name: 'VIP价格商品',
... ...
import login from './login';
export default [login];
let routers = [login];
routers.forEach(router => {
router.path = `/auth${router.path}`;
router.name = `auth.${router.name}`;
});
export default routers;
... ...
const home = r => require.ensure([], () => r(require('./dashboard')), 'home.dashboard');
export default {
path: '/dashboard',
name: 'home.dashboard',
component: home
};
import overview from './overview';
import dashboard from './dashboard';
export default [overview, dashboard];
const home = r => require.ensure([], () => r(require('./overview')), 'home.overview');
export default {
path: '/',
name: 'home.overview',
component: home
};
import layout from './layout';
import home from './home';
import product from './product';
let routers = [home, product];
let routers = [product];
let childrenRoutes = [].concat(...routers);
let routes = [{
... ...
/**
* Created by TaoHuang on 2017/4/18.
*/
import create from './create';
import onsale from './onsale';
import offsale from './offsale';
import vips from './vips';
let routers = [create];
let routers = [create, onsale, offsale, vips];
routers.forEach(router => {
router.path = `/product${router.path}`;
... ...
/**
* Created by TaoHuang on 2017/4/18.
*/
const page = r => require.ensure([], () => r(require('./offsale')), 'product.offsale');
export default {
path: '/offsale',
name: 'offsale',
component: page
};
... ...
<template>
<div class="content">
home
<router-link to="dashboard">to dashboard</router-link>
<div>
offsale
</div>
</template>
<script>
export default {
name: 'overview',
methods: {
},
export default {
data() {
return {
};
}
};
}
}
</script>
<style lang="scss">
.title-time {
margin-bottom: 10px;
<style lang="scss" scoped>
.ivu-date-picker {
float: right;
}
}
</style>
... ...
/**
* Created by TaoHuang on 2017/4/18.
*/
const page = r => require.ensure([], () => r(require('./onsale')), 'product.onsale');
export default {
path: '/onsale',
name: 'onsale',
component: page
};
... ...
<template>
<div class="content">
dashboard
<router-link to="/">to home</router-link>
<router-link to="/login">to login</router-link>
<button @click="link">home</button>
<div>
onsale
</div>
</template>
<script>
export default {
name: 'dashboard',
methods: {
link() {
this.$router.push('/');
}
},
export default {
data() {
return {
};
}
};
}
}
</script>
<style lang="scss">
<style lang="scss" scoped>
</style>
... ...
const page = r => require.ensure([], () => r(require('./vips')), 'product.vips');
export default {
path: '/vips',
name: 'vips',
component: page
};
... ...
<template>
<div>
vips
</div>
</template>
<script>
export default {
data() {
return {
}
}
}
</script>
<style lang="scss" scoped>
</style>
... ...