jufubao-movie 1.0.36-beta2 → 1.0.36-beta3

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,145 @@
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
+ <view
14
+ v-for="(name,index) in item['cinema_type_name']"
15
+ :key="index"
16
+ @click.stop="handleBtn(item['cinema_type'][index])"
17
+ :style="{
18
+ backgroundColor:color[item['cinema_type'][index]],
19
+ color:'#fff'
20
+ }">{{name}}</view>
21
+ </view>
22
+ </view>
23
+ </view>
24
+ </template>
25
+
26
+ <script>
27
+ import XdButton from "@/components/XdButton/XdButton.vue";
28
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon.vue";
29
+
30
+ export default {
31
+ name:'ContentCinema',
32
+ components:{
33
+ XdButton,
34
+ XdFontIcon
35
+ },
36
+ props:{
37
+ item:Object,
38
+ color: {
39
+ type: Object,
40
+ default: {}
41
+ },
42
+
43
+ },
44
+ data(){
45
+ return {
46
+
47
+ }
48
+ },
49
+ created() {
50
+
51
+ },
52
+ methods:{
53
+ handleCinemaDetail(){
54
+ //优先在线选座
55
+ if(this.item['cinema_type'].includes('SEAT')) {
56
+ this.handleSchedule();
57
+ return
58
+ }
59
+ if(this.item['cinema_type'].includes('CODE')) {
60
+ this.handleCodeDetail();
61
+ return
62
+ }
63
+ if(this.item['cinema_type'].includes('SELL')) {
64
+ this.handleCashierDetail();
65
+ return
66
+ }
67
+ console.error(`${JSON.stringify(this.item['cinema_type'])}`)
68
+ },
69
+
70
+ handleBtn(code){
71
+ if(code === 'SEAT') this.handleSchedule();
72
+ else if(code === 'CODE') this.handleCodeDetail();
73
+ else if(code === 'SELL') this.handleCashierDetail();
74
+ else console.error(`${JSON.stringify(this.item['cinema_type'])}`)
75
+ },
76
+
77
+ //电子码
78
+ handleCodeDetail(){
79
+ console.warn(`handleCodeDetail`)
80
+ this.$emit('on-code-detail', this.item);
81
+ },
82
+ //核销
83
+ handleCashierDetail(){
84
+ console.warn(`handleCashierDetail`)
85
+ this.$emit('on-cashier-detail', this.item);
86
+ },
87
+
88
+ //选座排期
89
+ handleSchedule(){
90
+ console.warn(`handleSchedule`)
91
+ this.$emit('on-schedule', this.item);
92
+ },
93
+ }
94
+ }
95
+ </script>
96
+
97
+ <style scoped lang="less">
98
+ .content {
99
+ .title {
100
+ font-size: 32rpx;
101
+ line-height: 40rpx;
102
+ margin-bottom: 20rpx;
103
+ color: #333;
104
+ font-weight: 500;
105
+ }
106
+ .address {
107
+ font-size: 24rpx;
108
+ line-height: 30rpx;
109
+ color: #999;
110
+ margin-bottom: 15rpx;
111
+ }
112
+
113
+ .bottom {
114
+ display: flex;
115
+ justify-content: space-between;
116
+ align-items: center;
117
+ margin-top: 30rpx;
118
+
119
+ & > .distance {
120
+ display: flex;
121
+ justify-content: flex-start;
122
+ align-items: center;
123
+
124
+ & > text {
125
+ margin-left: 10rpx;
126
+ font-size: 24rpx;
127
+ }
128
+ }
129
+
130
+ & > .btn {
131
+ display: flex;
132
+ justify-content: flex-end;
133
+ align-items: center;
134
+
135
+ & > view {
136
+ margin-left: 10rpx;
137
+ padding: 0 30rpx;
138
+ line-height: 60rpx;
139
+ border-radius: 30rpx;
140
+ font-size: 26rpx;
141
+ }
142
+ }
143
+ }
144
+ }
145
+ </style>
@@ -0,0 +1,164 @@
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']"></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
+ handleDetail(item){
88
+ console.log('handleDetail.item',item,item.id);
89
+ this.$emit('on-film-detail',item.id);
90
+ },
91
+ handleBuy(item){
92
+ console.log('handleDetail.item',item,item.id);
93
+ this.$emit('on-buy',item.id);
94
+ }
95
+ }
96
+ }
97
+ </script>
98
+
99
+ <style scoped lang="less">
100
+ .content {
101
+ display: flex;
102
+ justify-content: space-between;
103
+ align-items: center;
104
+
105
+ .image {
106
+ width: 160rpx;
107
+ height: 240rpx;
108
+ flex-shrink: 0;
109
+ overflow: hidden;
110
+
111
+ & > image {
112
+ width: 100%;
113
+ height: 100%;
114
+ }
115
+ }
116
+ .middle {
117
+ flex: 1;
118
+ & .name {
119
+ font-size: 36rpx;
120
+ font-weight: 600;
121
+ margin-bottom: 20rpx;
122
+ .uni-max-cut(2, 90);
123
+ line-height: 45rpx;
124
+ }
125
+
126
+ & .other {
127
+ font-size: 25rpx;
128
+ color: #999;
129
+ .uni-max-cut(1,36);
130
+ line-height: 36rpx;
131
+ margin-bottom: 10rpx;
132
+ &:last-child {
133
+ margin-bottom: 0!important;
134
+ }
135
+ }
136
+ }
137
+
138
+ .right {
139
+ flex-shrink: 0;
140
+ display: flex;
141
+ align-content: space-between;
142
+ align-items: flex-end;
143
+ justify-content: flex-end;
144
+ flex-flow: wrap;
145
+ height: 100%;
146
+ box-sizing: border-box;
147
+ width: 160rpx;
148
+
149
+ & .score {
150
+ height: 40rpx;
151
+ width:100%;
152
+ text-align: right;
153
+ & > text:nth-child(1) {
154
+ font-size: 20rpx;
155
+ }
156
+ & > text:nth-child(2) {
157
+ font-size: 28rpx;
158
+ }
159
+
160
+ }
161
+
162
+ }
163
+ }
164
+ </style>