jufubao-base 1.0.169-beta6 → 1.0.169-beta7

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.
@@ -4,10 +4,10 @@
4
4
  class="image"
5
5
  :style="{marginRight: outSpacing + 'rpx',borderRadius:borderRadius+'rpx'}"
6
6
  >
7
- <image :src="item['poster']" :alt="item['show_name']"></image>
7
+ <image :src="imageUrl" :alt="item['show_name']"></image>
8
8
  </view>
9
9
  <view class="middle">
10
- <view class="name">{{item['show_name']}}</view>
10
+ <view class="name" v-html="name"></view>
11
11
  <view class="other">类型:{{item['type']}}</view>
12
12
  <view class="other">导演:{{item['director']}}</view>
13
13
  <view class="other">主演:{{item['leading_role']}}</view>
@@ -55,6 +55,8 @@
55
55
 
56
56
  <script>
57
57
  import XdButton from "@/components/XdButton/XdButton.vue";
58
+ import getServiceUrl from "@/common/getServiceUrl";
59
+ import handleKeyword from "./handleKeyword";
58
60
 
59
61
  export default {
60
62
  name:'ContentItem',
@@ -62,6 +64,10 @@
62
64
  XdButton
63
65
  },
64
66
  props:{
67
+ keyword:{
68
+ type:String,
69
+ default:''
70
+ },
65
71
  item:Object,
66
72
  outSpacing: {
67
73
  type: Number|String,
@@ -81,6 +87,14 @@
81
87
  }
82
88
 
83
89
  },
90
+ computed:{
91
+ imageUrl(){
92
+ return getServiceUrl(this.item['poster'])
93
+ },
94
+ name(){
95
+ return handleKeyword(this, this.item.show_name, this.keyword);
96
+ }
97
+ },
84
98
  created() {
85
99
 
86
100
  },
@@ -117,8 +131,8 @@
117
131
  .middle {
118
132
  flex: 1;
119
133
  & .name {
120
- font-size: 36rpx;
121
- font-weight: 600;
134
+ font-size: 30rpx;
135
+ font-weight: 500;
122
136
  margin-bottom: 20rpx;
123
137
  .uni-max-cut(2, 90);
124
138
  line-height: 45rpx;
@@ -0,0 +1,308 @@
1
+ <template>
2
+ <view class="prodcut" :class="{tow: cell === 2, one: cell === 1}">
3
+ <view
4
+ class="prodcut-image"
5
+ :style="{
6
+ marginRight: (cell === 1 ? (outSpacing + 'rpx'):0),
7
+ width: (cell === 1 ? '200rpx': '100%'),
8
+ height: (cell === 1 ? '200rpx': (height + 'rpx')),
9
+ backgroundColor: '#f8f8f8',
10
+ borderRadius: borderRadius + 'rpx',
11
+ }"
12
+ >
13
+ <image :src="imageUrl" :alt="item['product_name']" mode="aspectFit"></image>
14
+ </view>
15
+ <view class="prodcut-content" :style="{marginTop:cell === 1? 0: (outSpacing + 'rpx') }">
16
+ <view class="prodcut-content-info">
17
+ <view class="name" v-html="cusName" :class="{showOne: isOne}"></view>
18
+ <view class="brand" v-if="productConfig.is_show_brand==='Y'" :style="{color:brandColor}">{{item['brand_name']}}</view>
19
+ <view class="tags" v-if="productConfig.isShowTag === 'Y'">
20
+ <view
21
+ v-for="tag in tagsList"
22
+ :key="tag"
23
+ :style="{background:tagObjColor[tag]}"
24
+ >{{tagObj[tag]}}</view>
25
+ </view>
26
+ </view>
27
+ <view class="prodcut-content-btn" v-if="isBtn">
28
+ <view :class="{onePrice: cell === 1}">
29
+ <view v-if="productConfig.isPrice === 'Y'">
30
+ <xd-unit
31
+ :price="(item['promo_price'] || item['sale_price'])"
32
+ :isOld="false"
33
+ :iconSize="0.3"
34
+ :fontSize="36"
35
+ />
36
+ </view>
37
+ <view
38
+ v-if="productConfig.isShowDiscount==='Y' && checkDiscountPrice"
39
+ :style="{color:oldPriceColor}" class="oldPrice">
40
+ <xd-unit
41
+ :price="dividePrice"
42
+ :iconSize="0.21"
43
+ :fontSize="24"
44
+ delete-line
45
+ is-gray
46
+ />
47
+ </view>
48
+ </view>
49
+ <view>
50
+ <view @click.stop="handleDetail()" v-if="productConfig.isAddCart === 'Y'">
51
+ <xd-font-icon
52
+ icon="icongouwuche-01"
53
+ :color="color"
54
+ size="40"
55
+ ></xd-font-icon>
56
+ </view>
57
+ </view>
58
+ </view>
59
+ </view>
60
+ </view>
61
+ </template>
62
+
63
+ <script>
64
+ import handleKeyword from "./handleKeyword";
65
+ import getServiceUrl from "@/common/getServiceUrl";
66
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon.vue";
67
+ import XdUnit from "@/components/XdUnit/XdUnit.vue";
68
+
69
+ export default {
70
+ name: "ContentProduct",
71
+ components:{
72
+ XdFontIcon,
73
+ XdUnit
74
+ },
75
+ props:{
76
+ keyword:{
77
+ type:String,
78
+ default:'北京'
79
+ },
80
+
81
+ height:{
82
+ type:Number|String,
83
+ default:"auto",
84
+ },
85
+
86
+ item:Object,
87
+ outSpacing: {
88
+ type: Number|String,
89
+ default: 20
90
+ },
91
+ color:{
92
+ type:String,
93
+ default:'red',
94
+ },
95
+ brandColor:{
96
+ type: String,
97
+ default: '#999'
98
+ },
99
+ oldPriceColor: {
100
+ type: String,
101
+ default: '#999'
102
+ },
103
+ borderRadius:{
104
+ type: String,
105
+ default: '10'
106
+ },
107
+ cell:{
108
+ type: Number|String,
109
+ required: true
110
+ },
111
+ productConfig:{
112
+ type:Object|null,
113
+ default: null
114
+ },
115
+ },
116
+ computed:{
117
+ cusName(){
118
+ return handleKeyword(this, this.item['product_name'] || this.item['list_title'], this.keyword)
119
+ },
120
+ imageUrl(){
121
+ return getServiceUrl(this.item['thumb'])
122
+ },
123
+ isOne(){
124
+ let status = false;
125
+ if(this.cell === 1) status = false
126
+ return status
127
+ },
128
+ isBtn(){
129
+ return this.productConfig.isPrice === 'Y' || this.productConfig.isAddCart === 'Y'
130
+ },
131
+ dividePrice() {
132
+ return this.$xdUniHelper.divisionFloatNumber(this.item.market_price, 100);
133
+ },
134
+
135
+ checkDiscountPrice() {
136
+ if(this.productConfig.isPrice === 'N') return false
137
+ if (this.productConfig.isShowDiscount === 'Y') {
138
+ let price = Number(this.item.market_price) - Number(this.item.sale_price);
139
+ return this.$xdUniHelper.divisionFloatNumber(price,100) > Number(this.productConfig.differ);
140
+ }
141
+ return false
142
+ },
143
+
144
+ tagsList(){
145
+ if(this.productConfig.showActivityPrice === 'N') {
146
+ return this.item['market_tags'].filter(tag=>{
147
+ return tag !== 'flashsale';
148
+ })
149
+ }
150
+ else return this.item['market_tags'];
151
+ },
152
+ },
153
+ data(){
154
+ return {
155
+ tagObj: null,
156
+ tagObjColor: null
157
+ }
158
+ },
159
+ created() {
160
+ this.tagObj = this.$colorConfig.productTags;
161
+ this.tagObjColor = this.$colorConfig.productTagsColor;
162
+ },
163
+ methods:{
164
+ handleDetail(){
165
+ this.$emit('on-product-detail', this.item);
166
+ }
167
+ }
168
+ }
169
+ </script>
170
+
171
+
172
+
173
+ <style scoped lang="less">
174
+ .prodcut {
175
+ &.one {
176
+ display: flex;
177
+ justify-content: space-between;
178
+ align-items: flex-start;
179
+ min-height: 200rpx;
180
+
181
+ .prodcut-image {
182
+ flex-shrink: 0;
183
+ }
184
+
185
+ .prodcut-content {
186
+ flex: 1;
187
+ min-height: 200rpx;
188
+ display: flex;
189
+ justify-content: flex-start;
190
+ flex-flow: wrap;
191
+ align-content: space-between;
192
+ }
193
+ }
194
+
195
+ &.tow {
196
+ .prodcut-image {
197
+ width: 100%;
198
+ }
199
+
200
+ }
201
+
202
+ &-image {
203
+ overflow: hidden;
204
+ & > image {
205
+ max-height: 100%;
206
+ max-width: 100%;
207
+ }
208
+ }
209
+
210
+ &-content {
211
+ &-info {
212
+
213
+ }
214
+
215
+ &-btn {
216
+ width: 100%;
217
+ display: flex;
218
+ justify-content: space-between;
219
+ align-items: center;
220
+
221
+ .onePrice {
222
+ display: flex;
223
+ justify-content: flex-start;
224
+ align-items: center;
225
+
226
+ & > view:nth-child(2) {
227
+ margin-left: 20rpx;
228
+ }
229
+ }
230
+
231
+ & > view:first-child {
232
+ flex: 1;
233
+ & > view:first-child {
234
+ height: 40rpx;
235
+ display: flex;
236
+ justify-content: flex-start;
237
+ align-items: center;
238
+ overflow: hidden;
239
+ }
240
+ & > view:nth-child(2) {
241
+ line-height: 30rpx;
242
+ }
243
+ }
244
+
245
+
246
+
247
+ & > view:nth-child(2) {
248
+ flex-shrink: 0;
249
+ width: 40rpx;
250
+ height: 40rpx;
251
+ display: flex;
252
+ justify-content: center;
253
+ align-items: center;
254
+ cursor: pointer;
255
+ }
256
+
257
+ .oldPrice {
258
+ margin-left: 6rpx;
259
+ }
260
+ }
261
+
262
+ & .name {
263
+ font-size: 30rpx;
264
+ font-weight: 400;
265
+ margin-bottom: 10rpx;
266
+ line-height: 40rpx;
267
+ .uni-max-cut(2,80);
268
+
269
+ &.showOne {
270
+ .uni-max-cut(1,40);
271
+ }
272
+ }
273
+
274
+ & .brand {
275
+ font-size: 22rpx;
276
+ line-height: 30rpx;
277
+ margin-bottom: 10rpx;
278
+ .uni-max-cut(1,30);
279
+
280
+ }
281
+
282
+ .tags {
283
+ display: flex;
284
+ justify-content: flex-start;
285
+ align-content: flex-start;
286
+ margin-bottom: 10rpx;
287
+ flex-flow: wrap;
288
+
289
+ & > view {
290
+ padding: 0 14rpx;
291
+ height: 32rpx;
292
+ line-height: 31rpx;
293
+ font-size: 20rpx;
294
+ color:#fff;
295
+ border-radius: 16rpx;
296
+ margin-right: 10rpx;
297
+
298
+ &:last-child {
299
+ margin-right: 0;
300
+ }
301
+ &:nth-child(4),&:nth-child(5),&:nth-child(6){
302
+ margin-top: 8rpx;
303
+ }
304
+ }
305
+ }
306
+ }
307
+ }
308
+ </style>
@@ -0,0 +1,184 @@
1
+ <template>
2
+ <view class="content-item" @click="handleDetail(item)">
3
+ <view class="content-item-image" :style="{marginRight:outSpacing+'rpx',borderRadius:borderRadius+'rpx'}">
4
+ <image :src="imageUrl" :alt="item['resource_shop_name']"></image>
5
+ </view>
6
+ <view class="content-item-cont">
7
+ <view class="title">
8
+ <view :class="{one:isSupportJhd}" v-html="name"></view>
9
+ <view :style="{marginLeft: item['distance'] ? '10rpx': 0,color: color}">{{item['distance']}}</view>
10
+ </view>
11
+ <view class="bottom">
12
+ <view class="address">
13
+ <view><xd-font-icon icon="icondizhitubiao" size="30"></xd-font-icon></view>
14
+ <view>{{getAddress}}</view>
15
+ </view>
16
+ <view class="phone">
17
+ <view><xd-font-icon icon="icondianhuatubiao" size="26"></xd-font-icon></view>
18
+ <view>{{item['phone']}}</view>
19
+ </view>
20
+ <view class="eChange" v-if="isSupportJhd">
21
+ <view><xd-button @click.stop="handleJhd(item)" type="primary" size="mini">去兑换</xd-button></view>
22
+ </view>
23
+ </view>
24
+ </view>
25
+ </view>
26
+ </template>
27
+
28
+
29
+ <script>
30
+
31
+ import getServiceUrl from "@/common/getServiceUrl";
32
+ import handleKeyword from "./handleKeyword";
33
+ import XdFontIcon from "@/components/XdFontIcon/XdFontIcon.vue";
34
+ import XdButton from "@/components/XdButton/XdButton.vue";
35
+
36
+ export default {
37
+ name: "ContentShop",
38
+ props:{
39
+ keyword:{
40
+ type:String,
41
+ default:'',
42
+ },
43
+ isEchange:{
44
+ type:String,
45
+ default:'N'
46
+ },
47
+ item:Object,
48
+ outSpacing: {
49
+ type: Number|String,
50
+ default: 20
51
+ },
52
+ borderRadius:{
53
+ type: String,
54
+ default: '10'
55
+ },
56
+ color: {
57
+ type: String,
58
+ default: ''
59
+ },
60
+ },
61
+ components:{
62
+ XdFontIcon,
63
+ XdButton
64
+ },
65
+ computed:{
66
+ imageUrl(){
67
+ return getServiceUrl(this.item.shop_icon)
68
+ },
69
+ name(){
70
+ return handleKeyword(this, this.item.resource_shop_name,this.keyword)
71
+ },
72
+ isSupportJhd(){
73
+ return this.isEchange === 'Y' && this.item.is_support_jhd
74
+ },
75
+ getAddress() {
76
+ let sy = `${this.item.province_name}${this.item.city_name}${this.item.area_name}${this.item.street_name}`;
77
+ return `${sy}${this.item.address}`;
78
+ },
79
+ },
80
+ created() {
81
+ // console.log(this.item)
82
+ // debugger
83
+ },
84
+ methods:{
85
+ handleJhd(item){
86
+ this.$emit('on-shop-jhd',item);
87
+ },
88
+ handleDetail(item){
89
+ this.$emit('on-shop-detail',item);
90
+ }
91
+ },
92
+ }
93
+ </script>
94
+
95
+
96
+ <style scoped lang="less">
97
+ .content-item {
98
+ display: flex;
99
+ justify-content: space-between;
100
+ align-items: center;
101
+ height: 200rpx;
102
+
103
+ &-image {
104
+ width: 200rpx;
105
+ height: 200rpx;
106
+ flex-shrink: 0;
107
+ overflow: hidden;
108
+
109
+ & > image {
110
+ width: 100%;
111
+ height: 100%;
112
+ }
113
+ }
114
+
115
+ &-cont {
116
+ flex: 1;
117
+ height: 100%;
118
+
119
+ & .title {
120
+ margin-bottom: 10rpx;
121
+ display: flex;
122
+ justify-content: space-between;
123
+ align-items: flex-start;
124
+
125
+ & > view:first-child {
126
+ font-size: 30rpx;
127
+ font-weight: 500;
128
+ .uni-max-cut(2,80);
129
+ line-height: 40rpx;
130
+
131
+ &.one {
132
+ .uni-max-cut(1,40);
133
+ }
134
+ }
135
+
136
+ & > view:last-child {
137
+ flex-shrink: 0;
138
+ font-size: 22rpx;
139
+ line-height: 40rpx;
140
+ }
141
+
142
+
143
+ }
144
+
145
+ .address,.phone {
146
+ display: flex;
147
+ justify-content: flex-start;
148
+ align-items: flex-start;
149
+ font-size: 22rpx;
150
+ color: #999;
151
+
152
+ & > view:first-child {
153
+ width: 40rpx;
154
+ height: 40rpx;
155
+ margin-right: 10rpx;
156
+ display: flex;
157
+ justify-content: center;
158
+ align-items: center;
159
+ flex-shrink: 0;
160
+ }
161
+
162
+ }
163
+
164
+ .address {
165
+ margin-bottom: 6rpx;
166
+ & > view:last-child {
167
+ .uni-max-cut(2,60);
168
+ line-height: 30rpx;
169
+ }
170
+
171
+ }
172
+
173
+ .eChange {
174
+ display: flex;
175
+ justify-content: flex-end;
176
+ align-items: center;
177
+ & > view {
178
+ width: 140rpx;
179
+ }
180
+ }
181
+
182
+ }
183
+ }
184
+ </style>
@@ -122,6 +122,8 @@ export default (data)=>{
122
122
  placeholder: '请选择背景颜色',
123
123
  classNmae: 'input80',
124
124
  groupKey:'style',
125
+ inline: false,
126
+ notice:'背景颜色值建议使用相对浅色系色值',
125
127
  },
126
128
  {
127
129
  label: '当前投影设置:',