Skip to content

Commit

Permalink
yin
Browse files Browse the repository at this point in the history
  • Loading branch information
yinwuyang committed Oct 18, 2019
2 parents 4b6747b + 95d94d2 commit 53c133d
Show file tree
Hide file tree
Showing 40 changed files with 5,388 additions and 455 deletions.
7 changes: 7 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ module.exports = {
presets: [
'@vue/app'
],
// plugins: [
// ['import', {
// libraryName: 'vant',
// libraryDirectory: 'es',
// style: true
// }, 'vant']
// ]
// css: {
// loaderOptions: {
// css: {},
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"devDependencies": {
"@vue/cli-plugin-babel": "^3.12.0",
"@vue/cli-service": "^3.12.0",
"babel-plugin-import": "^1.12.2",
"mockjs": "^1.0.1-beta3",
"node-sass": "^4.12.0",
"sass-loader": "^8.0.0",
Expand Down
18 changes: 8 additions & 10 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,21 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<title>movie</title>

<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=Oa4zhzcT3fcsRS2bTsNcYnV9dX3jiTfn"></script>

<script
type="text/javascript"
src="http://api.map.baidu.com/api?v=2.0&ak=Oa4zhzcT3fcsRS2bTsNcYnV9dX3jiTfn"
></script>
<style>
.swiper-pagination .swiper-pagination-bullet {
width: 4px;
height: 4px;
background: rgba(178, 178, 178, 1);
margin: 0 5px;
}

.swiper-pagination .swiper-pagination-bullet-active {
width: 14px;
height: 4px;
Expand All @@ -27,14 +26,13 @@
}
</style>
</head>

<body>
<noscript>
<strong
>We're sorry but movie doesn't work properly without JavaScript enabled.
Please enable it to continue.</strong
>We're sorry but movie doesn't work properly without JavaScript enabled. Please enable it to continue.</strong
>
</noscript>
<div id="app"></div>

</body>
</html>
41 changes: 20 additions & 21 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
<template>
<div id="app">

<transition enter-active-class="animated slideInRight faster" mode="out-in">
<router-view />
<transition enter-active-class="animated slideInRight faster" mode="out-in">
<router-view />
</transition>

<div class="nav" >
<tabbar v-show="$route.meta.isShow" ></tabbar>
</div>
<div class="nav" v-show="$route.meta.isShow">
<tabbar></tabbar>
</div>
</div>
</template>
<script>
Expand All @@ -17,36 +15,37 @@ export default {
data() {
return {};
},
methods: {
get() {
// console.log(this.)
methods: {},
created() {},
mounted() {
console.log(1231231)
if (!window.localStorage.getItem("usermsg")) {
this.$router.push("/login").catch(err => {});
}
},
created(){
},
mounted:function(){
},
created() {},
mounted() {},
components: {
tabbar: tabbar
},
watch: {
"$route.path"() {
if (!window.localStorage.getItem("usermsg")) {
this.$router.push("login").catch(err => {});
}
}
}
};
</script>
<style lang="scss">
<style lang="scss" >
html,
body {
background: #23262d;
width: 100%;
height: 100%;
overflow: hidden;
}
#app {
width: 100%;
height: 100%;
overflow: hidden;
}
a {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
Expand Down
164 changes: 164 additions & 0 deletions src/components/movielist.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
<template>
<div class="movielist">
<div class="movie-item" v-for="item in movie" :key="item.id">
<router-link
class="router-link"
:to="{ name: 'detail', params: { info: item } }"
>
<img :src="item.img" alt="" />
<div class="content">
<div class="name">{{ item.name }}</div>
<div class="score">{{ item.score }}</div>
<p class="director">{{ item.director }}</p>
<p class="actor">{{ item.actor }}</p>
<div class="labels">
<div
v-for="lab in item.labels"
class="label-item"
:class="lab.act"
:key="lab.id"
>
{{ lab.text }}
</div>
</div>
<div class="ticket" :class="item.ticketcolor">
{{ item.ticket }}
</div>
</div>
</router-link>
</div>
</div>
</template>

<script>
export default {
name: "movielist",
data() {
return {};
},
props: {
movie: Array
},
mounted() {},
created() {}
};
</script>

<style lang='scss' scoped>
.movielist {
margin-top: 10px;
padding-left: 20px;
padding-bottom: 30px;
.movie-item {
display: flex;
height: 170px;
width: 335px;
.router-link {
display: flex;
height: 170px;
width: 335px;
}
img {
float: left;
height: 170px;
width: 119px;
}
.content {
position: relative;
box-sizing: border-box;
float: left;
padding: 10px;
margin-left: -7px;
margin-top: 15px;
height: 144px;
width: 223px;
background: rgba(51, 54, 61, 1);
box-shadow: 0px 0px 4px 2px rgba(0, 0, 0, 0.04);
border-top-right-radius: 6px;
border-bottom-right-radius: 6px;
.name {
margin-top: 10px;
font-size: 16px;
font-family: PingFangSC-Medium, PingFangSC;
font-weight: 500;
color: rgba(255, 255, 255, 1);
line-height: 16px;
}
.score {
margin-top: 10px;
width: 94px;
height: 14px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFangSC;
font-weight: 400;
color: #d4d4d6;
line-height: 14px;
}
p {
font-size: 12px;
font-family: PingFangSC-Regular, PingFangSC;
font-weight: 400;
color: #6c6e73;
line-height: 12px;
&.director {
margin-top: 10px;
}
&.actor {
margin-top: 5px;
}
}
.labels {
display: flex;
margin-top: 20px;
}
.label-item {
width: 48px;
height: 17px;
line-height: 17px;
text-align: center;
border-radius: 3px;
font-size: 10px;
margin-right: 5px;
&.yellow {
border: 1px solid rgba(251, 195, 74, 1);
color: rgba(251, 195, 74, 1);
}
&.red {
border: 1px solid rgba(242, 108, 126, 1);
color: rgba(242, 108, 126, 1);
}
&.blue {
border: 1px solid rgba(60, 76, 172, 1);
color: rgba(60, 76, 172, 1);
}
}
.ticket {
position: absolute;
left: 160px;
top: 70px;
width: 54px;
height: 25px;
line-height: 25px;
text-align: center;
box-shadow: 0px 0px 4px 1px rgba(242, 109, 125, 0.18);
border-radius: 6px;
&.pink {
background: linear-gradient(
150deg,
rgba(242, 91, 134, 1) 0%,
rgba(241, 172, 94, 1) 100%
);
}
&.purple {
background: linear-gradient(
150deg,
rgba(98, 75, 163, 1) 0%,
rgba(203, 68, 152, 1) 100%
);
}
}
}
}
}
</style>
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>
38 changes: 38 additions & 0 deletions src/components/selection.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<template>
<div class="selection" @click="jumpSeat">特惠选座</div>
</template>

<script>
export default {
name: "Selection",
data() {
return {};
},
methods: {
jumpSeat() {
this.$router.push("/seat");
}
}
};
</script>

<style lang='scss' scoped>
.selection {
position: fixed;
bottom: 0;
left: 0;
z-index: 999;
width: 375px;
height: 44px;
line-height: 44px;
text-align: center;
background: linear-gradient(
150deg,
rgba(242, 91, 134, 1) 0%,
rgba(241, 172, 94, 1) 100%
);
box-shadow: 0px 0px 4px 1px rgba(242, 109, 125, 0.18);
color: rgba(255, 255, 255, 1);
font-size: 18px;
}
</style>
Loading

0 comments on commit 53c133d

Please sign in to comment.