Skip to content

Commit

Permalink
jing
Browse files Browse the repository at this point in the history
  • Loading branch information
Jingke7 committed Oct 17, 2019
1 parent a9dc9f2 commit d6dd4fb
Show file tree
Hide file tree
Showing 8 changed files with 1,039 additions and 78 deletions.
8 changes: 5 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div id="app">
<router-view />
<div class="nav">
<tabbar></tabbar>
<tabbar v-if="$route.meta.isShow"></tabbar>
</div>

</div>
Expand All @@ -18,7 +18,8 @@ export default {
},
components: {
tabbar:tabbar
}
},
};
</script>
Expand All @@ -27,10 +28,11 @@ html,
body {
background: #23262d;
width: 100%;
height: auto;
height: 100%;
}
#app {
width: 100%;
height: 100%;
overflow: hidden;
}
a {
Expand Down
36 changes: 36 additions & 0 deletions src/components/orderInfo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<template>
<div class="order">
<span> {{ text }}</span>
<span> {{ text1 }}</span>
</div>
</template>

<script>
export default {
name: "order",
props: ["text", "text1"],
data() {
return {};
}
};
</script>

<style lang='scss' scoped>
.order {
width: 100%;
height: 20px;
line-height: 20px;
display: flex;
margin-top: 20px;
justify-content: space-between;
span:first-child {
font-size: 16px;
font-family: PingFangSC-Regular, PingFangSC;
color: rgba(255, 255, 255, 1);
}
span:nth-child(2) {
font-size: 12px;
color: rgba(249, 195, 74, 1);
}
}
</style>
123 changes: 86 additions & 37 deletions src/router/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,93 @@ import Router from 'vue-router'
Vue.use(Router)

export default new Router({
mode: 'history',
base: process.env.BASE_URL,
routes: [
{
path: '/home',
name: 'home',
component: () => import(/* webpackChunkName: "about" */ '../views/home/index.vue'),
},
{
path: '/movie',
name: 'movie',
component: () => import(/* webpackChunkName: "about" */ '../views/movie/index.vue'),
redirect: 'movie/hots',
children:[
mode: 'history',
base: process.env.BASE_URL,
routes: [{
path: '/home',
name: 'home',
component: () =>
import ( /* webpackChunkName: "about" */ '../views/home/index.vue'),
meta: {
isShow: true
}
},
{
path: '/movie',
name: 'movie',
component: () =>
import ( /* webpackChunkName: "about" */ '../views/movie/index.vue'),
meta: {
isShow: true
},
redirect: 'movie/hots',
children: [{
path: 'future',
component: () =>
import ('../views/movie/movie-future/index.vue'),
meta: {
isShow: true
}
},
{
path: 'hots',
component: () =>
import ('../views/movie/movie-hots/index.vue'),
meta: {
isShow: true
}
}
]
},
{
path: '/cinema',
name: 'cinema',
component: () =>
import ( /* webpackChunkName: "about" */ '../views/cinema/index.vue'),
meta: {
isShow: true
}
},
{
path: '/my',
name: 'my',
component: () =>
import ( /* webpackChunkName: "about" */ '../views/my/index.vue'),
meta: {
isShow: true
}
},
{
path: '/order',
name: 'order',
component: () =>
import ( /* webpackChunkName: "about" */ '../views/order/index.vue'),
meta: {
isShow: false
}
},
{
path:'future',
component:()=> import ('../views/movie/movie-future/index.vue')
path: '/tickets',
name: 'tickets',
component: () =>
import ( /* webpackChunkName: "about" */ '../views/tickets/index.vue'),
meta: {
isShow: false
}
},
{
path:'hots',
component:()=> import ('../views/movie/movie-hots/index.vue')
path: '/seat',
name: 'seat',
component: () =>
import ( /* webpackChunkName: "about" */ '../views/seat/index.vue'),
meta: {
isShow: false
}
},
{
path: '*',
redirect: '/home'
}
]
},
{
path: '/cinema',
name: 'cinema',
component: () => import(/* webpackChunkName: "about" */ '../views/cinema/index.vue')
},
{
path: '/my',
name: 'my',
component: () => import(/* webpackChunkName: "about" */ '../views/my/index.vue')
},
{
path:'*',
redirect: '/home'
}

]
})

]
})
9 changes: 4 additions & 5 deletions src/store/modules/cinema.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
export default ({
namespaced: true,
namespaced: true,
state: {

},
mutations: {

},
actions: {

}
})

})
80 changes: 47 additions & 33 deletions src/store/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,56 +5,70 @@ import cinema from './modules/cinema.js'
Vue.use(Vuex)
var HotList = []
for (var i = 0; i < 10; i++) {
HotList.push(Mock.mock({
'id':Mock.Random.guid(),
HotList.push(Mock.mock({
'id': Mock.Random.guid(),
'name': Mock.Random.ctitle(4),
'img':Mock.Random.dataImage('90x122'),
'img': Mock.Random.dataImage('90x122'),
}))
}
var futureList = []
for (var i = 0; i < 10; i++) {
futureList.push(Mock.mock({
'id':Mock.Random.guid(),
futureList.push(Mock.mock({
'id': Mock.Random.guid(),
'name': Mock.Random.ctitle(4),
'img':Mock.Random.dataImage('120x162'),
'date': `12月${i + 2}日`,
'img': Mock.Random.dataImage('120x162'),
'date': `12月${i + 2}日`,

}))
}
var heraldList = []
var heraldList = []
for (var i = 0; i < 5; i++) {
heraldList.push(Mock.mock({
'id':Mock.Random.guid(),
'img':Mock.Random.dataImage('295x160'),
'text': Mock.Random.ctitle(30),
heraldList.push(Mock.mock({
'id': Mock.Random.guid(),
'img': Mock.Random.dataImage('295x160'),
'text': Mock.Random.ctitle(30),
}))
}

var cinemaList = []
for (var i = 0; i < 6; i++) {
cinemaList.push(Mock.mock({
'id':Mock.Random.guid(),
'name': Mock.Random.ctitle(5),
'position': Mock.Random.ctitle(10),
'price': '19.9',
cinemaList.push(Mock.mock({
'id': Mock.Random.guid(),
'name': Mock.Random.ctitle(5),
'position': Mock.Random.ctitle(10),
'price': '19.9',
}))
}


export default new Vuex.Store({
state: {
hotList:HotList,
futureList:futureList,
heraldList:heraldList,
cinemaList:cinemaList
},
mutations: {

},
actions: {
state: {
hotList: HotList,
futureList: futureList,
heraldList: heraldList,
cinemaList: cinemaList,
bought: [{
id: 11,
row: 1,
li: 1
},
{
id: 55,
row: 5,
li: 5
}
],
},
mutations: {
boughtList(state, val) {
state.bought = state.bought.concat(val)
console.log(state.bought)
}
},
actions: {

},
modules:{
cinema,
}
})
},
modules: {
cinema,
}
})
Loading

0 comments on commit d6dd4fb

Please sign in to comment.