jufubao-base 1.0.169-beta16 → 1.0.169-beta17

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-base",
3
- "version": "1.0.169-beta16",
3
+ "version": "1.0.169-beta17",
4
4
  "private": false,
5
5
  "description": "聚福宝业务组件基础插件包",
6
6
  "main": "index.js",
@@ -4,70 +4,69 @@
4
4
  class="image"
5
5
  :style="{marginRight: outSpacing + 'rpx',borderRadius:borderRadius+'rpx'}"
6
6
  >
7
- <image :src="imageUrl" :alt="item['show_name']"></image>
7
+ <image v-if="errorStatus" :src="errorImage" :alt="item['show_name']" ></image>
8
+ <image v-if="!errorStatus" :src="item['poster']" :alt="item['show_name']" @error="handleError()" ></image>
8
9
  </view>
9
10
  <view class="middle">
10
- <view class="name" v-html="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>
11
+ <view class="top">
12
+ <view class="name">{{item['show_name']}}</view>
13
+ <view class="score">
14
+ <template v-if="item['remark']">
15
+ <text>评分:</text><text :style="{color:color}">{{item['remark']}}</text>
16
+ </template>
17
+ </view>
20
18
  </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>
19
+ <view class="bottom">
20
+ <view>
21
+ <view class="other">类型:{{item['type']}}</view>
22
+ <view class="other">导演:{{item['director']}}</view>
23
+ <view class="other">主演:{{item['leading_role']}}</view>
24
+ </view>
25
+ <view class="btn">
26
+ <template v-if="type === 'hot'">
27
+ <xd-button
28
+ v-if="item['show_button'] === '1'"
29
+ type="primary"
30
+ style="display:block;"
31
+ size="small"
32
+ @click.stop="handleBuy(item)">购票</xd-button>
33
+ <xd-button
34
+ v-else-if="item['show_button'] === '2'"
35
+ type="subPrimary"
36
+ style="display:block;"
37
+ size="small"
38
+ @click="handleBuy(item)">预售</xd-button>
39
+ </template>
40
+ <template v-if="type === 'rightnow'">
41
+ <xd-button
42
+ v-if="item['show_button'] === '3'"
43
+ type="success"
44
+ style="display:block;"
45
+ size="small"
46
+ @click.stop="handleDetail(item)"
47
+ >想看</xd-button>
48
+ <xd-button
49
+ v-else-if="item['show_button'] === '2'"
50
+ type="subPrimary"
51
+ style="display:block;"
52
+ size="small"
53
+ @click.stop="handleBuy(item)">预售</xd-button>
54
+ </template>
55
+ </view>
51
56
  </view>
57
+
52
58
  </view>
53
59
  </view>
54
60
  </template>
55
61
 
56
62
  <script>
57
63
  import XdButton from "@/components/XdButton/XdButton.vue";
58
- import getServiceUrl from "@/common/getServiceUrl";
59
- import handleKeyword from "./handleKeyword";
60
-
61
64
  export default {
62
65
  name:'ContentItem',
63
66
  components:{
64
67
  XdButton
65
68
  },
66
69
  props:{
67
- keyword:{
68
- type:String,
69
- default:''
70
- },
71
70
  item:Object,
72
71
  outSpacing: {
73
72
  type: Number|String,
@@ -87,23 +86,26 @@
87
86
  }
88
87
 
89
88
  },
90
- computed:{
91
- imageUrl(){
92
- return getServiceUrl(this.item['poster'])
93
- },
94
- name(){
95
- return handleKeyword(this, this.item.show_name, this.keyword);
89
+ data(){
90
+ return {
91
+ errorImage: 'https://img.jufubao.cn/common/error_movie.png?v20',
92
+ errorStatus: false,
96
93
  }
97
94
  },
98
95
  created() {
99
96
 
100
97
  },
101
98
  methods:{
99
+ handleError(){
100
+ this.errorStatus = true;
101
+ },
102
102
  handleDetail(item){
103
- this.$emit('on-film-detail',item);
103
+ console.log('handleDetail.item',item,item.id);
104
+ this.$emit('on-film-detail',item.id);
104
105
  },
105
106
  handleBuy(item){
106
- this.$emit('on-buy',item);
107
+ console.log('handleDetail.item',item,item.id);
108
+ this.$emit('on-buy',item.id);
107
109
  }
108
110
  }
109
111
  }
@@ -128,50 +130,89 @@
128
130
  }
129
131
  .middle {
130
132
  flex: 1;
131
- & .name {
132
- font-size: 30rpx;
133
- font-weight: 500;
133
+
134
+ & .top {
135
+ display: flex;
136
+ justify-content: space-between;
137
+ align-items: flex-end;
134
138
  margin-bottom: 20rpx;
135
- .uni-max-cut(2, 90);
136
- line-height: 45rpx;
137
- }
138
139
 
139
- & .other {
140
- font-size: 25rpx;
141
- color: #999;
142
- .uni-max-cut(1,36);
143
- line-height: 36rpx;
144
- margin-bottom: 10rpx;
145
- &:last-child {
146
- margin-bottom: 0!important;
140
+ & > view:first-child{
141
+ flex: 1;
142
+ font-size: 36rpx;
143
+ font-weight: 600;
144
+ .uni-max-cut(2, 90);
145
+ line-height: 45rpx;
146
+ }
147
+ & >view:nth-child(2) {
148
+ flex-shrink: 0;
149
+ height: 45rpx;
150
+ line-height: 45rpx;
151
+ margin-left: 20rpx;
152
+ text-align: right;
153
+ & > text:nth-child(1) {
154
+ font-size: 20rpx;
155
+ }
156
+ & > text:nth-child(2) {
157
+ font-size: 28rpx;
158
+ }
147
159
  }
148
160
  }
149
- }
150
161
 
151
- .right {
152
- flex-shrink: 0;
153
- display: flex;
154
- align-content: space-between;
155
- align-items: flex-end;
156
- justify-content: flex-end;
157
- flex-flow: wrap;
158
- box-sizing: border-box;
159
- width: 160rpx;
160
- height: 190rpx;
162
+ & .bottom {
163
+ display: flex;
164
+ justify-content: space-between;
165
+ align-items: center;
161
166
 
162
- & .score {
163
- height: 40rpx;
164
- width:100%;
165
- text-align: right;
166
- & > text:nth-child(1) {
167
- font-size: 20rpx;
168
- }
169
- & > text:nth-child(2) {
170
- font-size: 28rpx;
167
+ & > view:first-child {
168
+ flex: 1;
169
+ & > view {
170
+ font-size: 25rpx;
171
+ color: #999;
172
+ .uni-max-cut(1,36);
173
+ line-height: 36rpx;
174
+ margin-bottom: 10rpx;
175
+ &:last-child {
176
+ margin-bottom: 0!important;
177
+ }
178
+ }
171
179
  }
172
180
 
181
+ & .btn {
182
+ width: 140rpx;
183
+ flex-shrink: 0;
184
+ margin-left: 20rpx;
185
+ }
173
186
  }
187
+ //& .name {
188
+ // font-size: 36rpx;
189
+ // font-weight: 600;
190
+ // margin-bottom: 20rpx;
191
+ // .uni-max-cut(2, 90);
192
+ // line-height: 45rpx;
193
+ //}
194
+ //
195
+ //& .other {
174
196
 
197
+ //}
175
198
  }
199
+
200
+ //.right {
201
+ // flex-shrink: 0;
202
+ // display: flex;
203
+ // align-content: space-between;
204
+ // align-items: flex-end;
205
+ // justify-content: flex-end;
206
+ // flex-flow: wrap;
207
+ // box-sizing: border-box;
208
+ // width: 160rpx;
209
+ // height: 200rpx;
210
+ //
211
+ // & .score {
212
+
213
+ //
214
+ // }
215
+ //
216
+ //}
176
217
  }
177
218
  </style>
@@ -96,7 +96,7 @@
96
96
  return {
97
97
  hideMask: true,
98
98
  tabId: 'all', //cinema/film/shop/product
99
- keyword: '测试',
99
+ keyword: '',
100
100
  options:{},
101
101
  menuList: [],
102
102
  //公共样式