jufubao-movie 1.0.38 → 1.0.39-beta2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,147 @@
1
+ <template>
2
+ <view class="content" @click="handleCinemaDetail">
3
+ <view class="title">{{item['cinema_name']}}</view>
4
+ <view class="address">{{item['address']}}</view>
5
+ <view class="bottom">
6
+ <view class="distance">
7
+ <template v-if="item['distance']">
8
+ <xd-font-icon size="26" icon="icondizhi" :color="color.SEAT"></xd-font-icon>
9
+ <text :style="{color: color.SEAT}">{{item['distance']}}</text>
10
+ </template>
11
+ </view>
12
+ <view class="btn">
13
+ <!--不展示核销类型【SELL】-->
14
+ <view
15
+ v-for="(name,index) in item['cinema_type_name']"
16
+ v-if="item['cinema_type'][index] !== 'SELL'"
17
+ :key="index"
18
+ @click.stop="handleBtn(item['cinema_type'][index])"
19
+ :style="{
20
+ backgroundColor:color[item['cinema_type'][index]],
21
+ color:'#fff'
22
+ }">{{name}}</view>
23
+ </view>
24
+ </view>
25
+ </view>
26
+ </template>
27
+
28
+ <script>
29
+ import XdButton from "@/components/XdButton/XdButton.vue";
30
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon.vue";
31
+
32
+ export default {
33
+ name:'ContentCinema',
34
+ components:{
35
+ XdButton,
36
+ XdFontIcon
37
+ },
38
+ props:{
39
+ item:Object,
40
+ color: {
41
+ type: Object,
42
+ default: {}
43
+ },
44
+
45
+ },
46
+ data(){
47
+ return {
48
+
49
+ }
50
+ },
51
+ created() {
52
+
53
+ },
54
+ methods:{
55
+ handleCinemaDetail(){
56
+ //优先在线选座
57
+ if(this.item['cinema_type'].includes('SEAT')) {
58
+ this.handleSchedule();
59
+ return
60
+ }
61
+ if(this.item['cinema_type'].includes('CODE')) {
62
+ this.handleCodeDetail();
63
+ return
64
+ }
65
+ if(this.item['cinema_type'].includes('SELL')) {
66
+ this.handleCashierDetail();
67
+ return
68
+ }
69
+ console.error(`${JSON.stringify(this.item['cinema_type'])}`)
70
+ },
71
+
72
+ handleBtn(code){
73
+ if(code === 'SEAT') this.handleSchedule();
74
+ else if(code === 'CODE') this.handleCodeDetail();
75
+ else if(code === 'SELL') this.handleCashierDetail();
76
+ else console.error(`${JSON.stringify(this.item['cinema_type'])}`)
77
+ },
78
+
79
+ //电子码
80
+ handleCodeDetail(){
81
+ console.warn(`handleCodeDetail`)
82
+ this.$emit('on-code-detail', this.item);
83
+ },
84
+ //核销
85
+ handleCashierDetail(){
86
+ console.warn(`handleCashierDetail`)
87
+ this.$emit('on-cashier-detail', this.item);
88
+ },
89
+
90
+ //选座排期
91
+ handleSchedule(){
92
+ console.warn(`handleSchedule`)
93
+ this.$emit('on-schedule', this.item);
94
+ },
95
+ }
96
+ }
97
+ </script>
98
+
99
+ <style scoped lang="less">
100
+ .content {
101
+ .title {
102
+ font-size: 32rpx;
103
+ line-height: 40rpx;
104
+ margin-bottom: 20rpx;
105
+ color: #333;
106
+ font-weight: 500;
107
+ }
108
+ .address {
109
+ font-size: 24rpx;
110
+ line-height: 30rpx;
111
+ color: #999;
112
+ margin-bottom: 15rpx;
113
+ }
114
+
115
+ .bottom {
116
+ display: flex;
117
+ justify-content: space-between;
118
+ align-items: center;
119
+ margin-top: 30rpx;
120
+
121
+ & > .distance {
122
+ display: flex;
123
+ justify-content: flex-start;
124
+ align-items: center;
125
+
126
+ & > text {
127
+ margin-left: 10rpx;
128
+ font-size: 24rpx;
129
+ }
130
+ }
131
+
132
+ & > .btn {
133
+ display: flex;
134
+ justify-content: flex-end;
135
+ align-items: center;
136
+
137
+ & > view {
138
+ margin-left: 10rpx;
139
+ padding: 0 30rpx;
140
+ line-height: 60rpx;
141
+ border-radius: 30rpx;
142
+ font-size: 26rpx;
143
+ }
144
+ }
145
+ }
146
+ }
147
+ </style>
@@ -0,0 +1,167 @@
1
+ <template>
2
+ <view class="content" @click="handleDetail(item)">
3
+ <view
4
+ class="image"
5
+ :style="{marginRight: outSpacing + 'rpx',borderRadius:borderRadius+'rpx'}"
6
+ >
7
+ <image :src="item['poster']" :alt="item['show_name']" @error="handleError(item)"></image>
8
+ </view>
9
+ <view class="middle">
10
+ <view class="name">{{item['show_name']}}</view>
11
+ <view class="other">类型:{{item['type']}}</view>
12
+ <view class="other">导演:{{item['director']}}</view>
13
+ <view class="other">主演:{{item['leading_role']}}</view>
14
+ </view>
15
+ <view class="right">
16
+ <view class="score">
17
+ <template v-if="item['remark']">
18
+ <text>评分:</text><text :style="{color:color}">{{item['remark']}}</text>
19
+ </template>
20
+ </view>
21
+ <view class="btn">
22
+ <template v-if="type === 'hot'">
23
+ <xd-button
24
+ v-if="item['show_button'] === '1'"
25
+ type="primary"
26
+ style="display:block;"
27
+ size="small"
28
+ @click.stop="handleBuy(item)">购票</xd-button>
29
+ <xd-button
30
+ v-else-if="item['show_button'] === '2'"
31
+ type="subPrimary"
32
+ style="display:block;"
33
+ size="small"
34
+ @click="handleBuy(item)">预售</xd-button>
35
+ </template>
36
+ <template v-if="type === 'rightnow'">
37
+ <xd-button
38
+ v-if="item['show_button'] === '3'"
39
+ type="success"
40
+ style="display:block;"
41
+ size="small"
42
+ @click.stop="handleDetail(item)"
43
+ >想看</xd-button>
44
+ <xd-button
45
+ v-else-if="item['show_button'] === '2'"
46
+ type="subPrimary"
47
+ style="display:block;"
48
+ size="small"
49
+ @click.stop="handleBuy(item)">预售</xd-button>
50
+ </template>
51
+ </view>
52
+ </view>
53
+ </view>
54
+ </template>
55
+
56
+ <script>
57
+ import XdButton from "@/components/XdButton/XdButton.vue";
58
+ export default {
59
+ name:'ContentItem',
60
+ components:{
61
+ XdButton
62
+ },
63
+ props:{
64
+ item:Object,
65
+ outSpacing: {
66
+ type: Number|String,
67
+ default: 20
68
+ },
69
+ color: {
70
+ type: String,
71
+ default: ''
72
+ },
73
+ type:{
74
+ type: String,
75
+ default: 'hot'
76
+ },
77
+ borderRadius:{
78
+ type: String,
79
+ default: '10'
80
+ }
81
+
82
+ },
83
+ created() {
84
+
85
+ },
86
+ methods:{
87
+ handleError(item){
88
+ item['poster'] = 'https://img.jufubao.cn/common/error_movie.png?v20'
89
+ },
90
+ handleDetail(item){
91
+ console.log('handleDetail.item',item,item.id);
92
+ this.$emit('on-film-detail',item.id);
93
+ },
94
+ handleBuy(item){
95
+ console.log('handleDetail.item',item,item.id);
96
+ this.$emit('on-buy',item.id);
97
+ }
98
+ }
99
+ }
100
+ </script>
101
+
102
+ <style scoped lang="less">
103
+ .content {
104
+ display: flex;
105
+ justify-content: space-between;
106
+ align-items: center;
107
+
108
+ .image {
109
+ width: 160rpx;
110
+ height: 240rpx;
111
+ flex-shrink: 0;
112
+ overflow: hidden;
113
+
114
+ & > image {
115
+ width: 100%;
116
+ height: 100%;
117
+ }
118
+ }
119
+ .middle {
120
+ flex: 1;
121
+ & .name {
122
+ font-size: 36rpx;
123
+ font-weight: 600;
124
+ margin-bottom: 20rpx;
125
+ .uni-max-cut(2, 90);
126
+ line-height: 45rpx;
127
+ }
128
+
129
+ & .other {
130
+ font-size: 25rpx;
131
+ color: #999;
132
+ .uni-max-cut(1,36);
133
+ line-height: 36rpx;
134
+ margin-bottom: 10rpx;
135
+ &:last-child {
136
+ margin-bottom: 0!important;
137
+ }
138
+ }
139
+ }
140
+
141
+ .right {
142
+ flex-shrink: 0;
143
+ display: flex;
144
+ align-content: space-between;
145
+ align-items: flex-end;
146
+ justify-content: flex-end;
147
+ flex-flow: wrap;
148
+ box-sizing: border-box;
149
+ width: 160rpx;
150
+ height: 200rpx;
151
+
152
+ & .score {
153
+ height: 40rpx;
154
+ width:100%;
155
+ text-align: right;
156
+ & > text:nth-child(1) {
157
+ font-size: 20rpx;
158
+ }
159
+ & > text:nth-child(2) {
160
+ font-size: 28rpx;
161
+ }
162
+
163
+ }
164
+
165
+ }
166
+ }
167
+ </style>