jufubao-base 1.0.169-beta2 → 1.0.169-beta20
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 +1 -1
- package/src/components/JfbBaseHeader/JfbBaseHeader.vue +2 -2
- package/src/components/JfbBaseLogin/Attr.js +54 -16
- package/src/components/JfbBaseLogin/JfbBaseLogin.vue +3 -1
- package/src/components/JfbBaseMapSearch/MapSearchMp.vue +1 -1
- package/src/components/JfbBaseNotice/JfbBaseNotice.vue +2 -2
- package/src/components/JfbBaseOrderDetail/Api.js +12 -7
- package/src/components/JfbBaseOrderDetail/Attr.js +28 -14
- package/src/components/JfbBaseOrderDetail/JfbBaseOrderDetail.vue +68 -18
- package/src/components/JfbBaseOrderDetail/Mock.js +3 -1
- package/src/components/JfbBaseTfkCardBind/Api.js +49 -30
- package/src/components/JfbBaseTfkCardBind/Attr.js +139 -15
- package/src/components/JfbBaseTfkCardBind/JfbBaseTfkCardBind.vue +217 -19
- package/src/components/JfbBaseTfkCardBind/Mock.js +19 -9
- package/src/components/JfbBaseTfkCardDetail/Api.js +11 -0
- package/src/components/JfbBaseTfkCardDetail/Attr.js +158 -7
- package/src/components/JfbBaseTfkCardDetail/JfbBaseTfkCardDetail.vue +159 -17
- package/src/components/JfbBaseTfkCardLogin/Attr.js +490 -4
- package/src/components/JfbBaseTfkCardLogin/JfbBaseTfkCardLogin.vue +393 -106
- package/src/components/JfbBaseTfkCardLogin/Mock.js +6 -536
- package/src/components/JfbBaseTfkCardLogin/XdCouponItem.vue +75 -19
- package/src/components/JfbBaseTfkCardLogin/XdNotice.vue +550 -0
- package/src/components/JfbBaseTfkSearch/AllList.vue +350 -0
- package/src/components/JfbBaseTfkSearch/Api.js +11 -42
- package/src/components/JfbBaseTfkSearch/Attr.js +344 -32
- package/src/components/JfbBaseTfkSearch/ContentCinema.vue +157 -0
- package/src/components/JfbBaseTfkSearch/ContentFilm.vue +218 -0
- package/src/components/JfbBaseTfkSearch/ContentProduct.vue +317 -0
- package/src/components/JfbBaseTfkSearch/ContentShop.vue +186 -0
- package/src/components/JfbBaseTfkSearch/CusAttr.js +213 -0
- package/src/components/JfbBaseTfkSearch/CustomList.vue +453 -0
- package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +286 -35
- package/src/components/JfbBaseTfkSearch/Mock.js +242 -11
- package/src/components/JfbBaseTfkSearch/SkeletonCinema.vue +45 -0
- package/src/components/JfbBaseTfkSearch/SkeletonFilm.vue +109 -0
- package/src/components/JfbBaseTfkSearch/SkeletonProduct.vue +246 -0
- package/src/components/JfbBaseTfkSearch/SkeletonShop.vue +81 -0
- package/src/components/JfbBaseTfkSearch/handleKeyword.js +24 -0
- package/src/components/JfbBaseTfkSearch/listMixins.js +187 -0
- package/src/mixins/colorCardMixins.js +71 -9
- package/src/mixins/componentsMixins.js +376 -23
- package/src/mixins/posterMixins.js +122 -0
|
@@ -0,0 +1,218 @@
|
|
|
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 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>
|
|
9
|
+
</view>
|
|
10
|
+
<view class="middle">
|
|
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>
|
|
18
|
+
</view>
|
|
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>
|
|
56
|
+
</view>
|
|
57
|
+
|
|
58
|
+
</view>
|
|
59
|
+
</view>
|
|
60
|
+
</template>
|
|
61
|
+
|
|
62
|
+
<script>
|
|
63
|
+
import XdButton from "@/components/XdButton/XdButton.vue";
|
|
64
|
+
export default {
|
|
65
|
+
name:'ContentItem',
|
|
66
|
+
components:{
|
|
67
|
+
XdButton
|
|
68
|
+
},
|
|
69
|
+
props:{
|
|
70
|
+
item:Object,
|
|
71
|
+
outSpacing: {
|
|
72
|
+
type: Number|String,
|
|
73
|
+
default: 20
|
|
74
|
+
},
|
|
75
|
+
color: {
|
|
76
|
+
type: String,
|
|
77
|
+
default: ''
|
|
78
|
+
},
|
|
79
|
+
type:{
|
|
80
|
+
type: String,
|
|
81
|
+
default: 'hot'
|
|
82
|
+
},
|
|
83
|
+
borderRadius:{
|
|
84
|
+
type: String,
|
|
85
|
+
default: '10'
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
},
|
|
89
|
+
data(){
|
|
90
|
+
return {
|
|
91
|
+
errorImage: 'https://img.jufubao.cn/common/error_movie.png?v20',
|
|
92
|
+
errorStatus: false,
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
created() {
|
|
96
|
+
|
|
97
|
+
},
|
|
98
|
+
methods:{
|
|
99
|
+
handleError(){
|
|
100
|
+
this.errorStatus = true;
|
|
101
|
+
},
|
|
102
|
+
handleDetail(item){
|
|
103
|
+
console.log('handleDetail.item',item,item.id);
|
|
104
|
+
this.$emit('on-film-detail',item.id);
|
|
105
|
+
},
|
|
106
|
+
handleBuy(item){
|
|
107
|
+
console.log('handleDetail.item',item,item.id);
|
|
108
|
+
this.$emit('on-buy',item.id);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
</script>
|
|
113
|
+
|
|
114
|
+
<style scoped lang="less">
|
|
115
|
+
.content {
|
|
116
|
+
display: flex;
|
|
117
|
+
justify-content: space-between;
|
|
118
|
+
align-items: center;
|
|
119
|
+
|
|
120
|
+
.image {
|
|
121
|
+
width: 160rpx;
|
|
122
|
+
height: 240rpx;
|
|
123
|
+
flex-shrink: 0;
|
|
124
|
+
overflow: hidden;
|
|
125
|
+
|
|
126
|
+
& > image {
|
|
127
|
+
width: 100%;
|
|
128
|
+
height: 100%;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
.middle {
|
|
132
|
+
flex: 1;
|
|
133
|
+
|
|
134
|
+
& .top {
|
|
135
|
+
display: flex;
|
|
136
|
+
justify-content: space-between;
|
|
137
|
+
align-items: flex-end;
|
|
138
|
+
margin-bottom: 20rpx;
|
|
139
|
+
|
|
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
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
& .bottom {
|
|
163
|
+
display: flex;
|
|
164
|
+
justify-content: space-between;
|
|
165
|
+
align-items: center;
|
|
166
|
+
|
|
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
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
& .btn {
|
|
182
|
+
width: 140rpx;
|
|
183
|
+
flex-shrink: 0;
|
|
184
|
+
margin-left: 20rpx;
|
|
185
|
+
}
|
|
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 {
|
|
196
|
+
|
|
197
|
+
//}
|
|
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
|
+
//}
|
|
217
|
+
}
|
|
218
|
+
</style>
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view class="prodcut" :class="{tow: cell === 2, one: cell === 1}" @click="handleDetail()">
|
|
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']"></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
|
+
if(this.item.status === 'ok') {
|
|
166
|
+
this.$emit('on-product-detail', this.item);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
</script>
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
<style scoped lang="less">
|
|
176
|
+
.prodcut {
|
|
177
|
+
&.one {
|
|
178
|
+
display: flex;
|
|
179
|
+
justify-content: space-between;
|
|
180
|
+
align-items: flex-start;
|
|
181
|
+
min-height: 200rpx;
|
|
182
|
+
|
|
183
|
+
.prodcut-image {
|
|
184
|
+
flex-shrink: 0;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.prodcut-content {
|
|
188
|
+
flex: 1;
|
|
189
|
+
min-height: 200rpx;
|
|
190
|
+
display: flex;
|
|
191
|
+
justify-content: flex-start;
|
|
192
|
+
flex-flow: wrap;
|
|
193
|
+
align-content: space-between;
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
&.tow {
|
|
198
|
+
.prodcut-image {
|
|
199
|
+
width: 100%;
|
|
200
|
+
display: flex;
|
|
201
|
+
justify-content: center;
|
|
202
|
+
align-items: center;
|
|
203
|
+
& > image {
|
|
204
|
+
height: 100%;
|
|
205
|
+
width: 100%;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
&-image {
|
|
212
|
+
overflow: hidden;
|
|
213
|
+
& > image {
|
|
214
|
+
height: 100%;
|
|
215
|
+
width: 100%;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
&-content {
|
|
220
|
+
&-info {
|
|
221
|
+
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
&-btn {
|
|
225
|
+
width: 100%;
|
|
226
|
+
display: flex;
|
|
227
|
+
justify-content: space-between;
|
|
228
|
+
align-items: center;
|
|
229
|
+
|
|
230
|
+
.onePrice {
|
|
231
|
+
display: flex;
|
|
232
|
+
justify-content: flex-start;
|
|
233
|
+
align-items: center;
|
|
234
|
+
|
|
235
|
+
& > view:nth-child(2) {
|
|
236
|
+
margin-left: 20rpx;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
& > view:first-child {
|
|
241
|
+
flex: 1;
|
|
242
|
+
& > view:first-child {
|
|
243
|
+
height: 40rpx;
|
|
244
|
+
display: flex;
|
|
245
|
+
justify-content: flex-start;
|
|
246
|
+
align-items: center;
|
|
247
|
+
overflow: hidden;
|
|
248
|
+
}
|
|
249
|
+
& > view:nth-child(2) {
|
|
250
|
+
line-height: 30rpx;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
& > view:nth-child(2) {
|
|
257
|
+
flex-shrink: 0;
|
|
258
|
+
width: 40rpx;
|
|
259
|
+
height: 40rpx;
|
|
260
|
+
display: flex;
|
|
261
|
+
justify-content: center;
|
|
262
|
+
align-items: center;
|
|
263
|
+
cursor: pointer;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.oldPrice {
|
|
267
|
+
margin-left: 6rpx;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
& .name {
|
|
272
|
+
font-size: 30rpx;
|
|
273
|
+
font-weight: 400;
|
|
274
|
+
margin-bottom: 10rpx;
|
|
275
|
+
line-height: 40rpx;
|
|
276
|
+
.uni-max-cut(2,80);
|
|
277
|
+
|
|
278
|
+
&.showOne {
|
|
279
|
+
.uni-max-cut(1,40);
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
& .brand {
|
|
284
|
+
font-size: 22rpx;
|
|
285
|
+
line-height: 30rpx;
|
|
286
|
+
margin-bottom: 10rpx;
|
|
287
|
+
.uni-max-cut(1,30);
|
|
288
|
+
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.tags {
|
|
292
|
+
display: flex;
|
|
293
|
+
justify-content: flex-start;
|
|
294
|
+
align-content: flex-start;
|
|
295
|
+
margin-bottom: 10rpx;
|
|
296
|
+
flex-flow: wrap;
|
|
297
|
+
|
|
298
|
+
& > view {
|
|
299
|
+
padding: 0 14rpx;
|
|
300
|
+
height: 32rpx;
|
|
301
|
+
line-height: 31rpx;
|
|
302
|
+
font-size: 20rpx;
|
|
303
|
+
color:#fff;
|
|
304
|
+
border-radius: 16rpx;
|
|
305
|
+
margin-right: 10rpx;
|
|
306
|
+
|
|
307
|
+
&:last-child {
|
|
308
|
+
margin-right: 0;
|
|
309
|
+
}
|
|
310
|
+
&:nth-child(4),&:nth-child(5),&:nth-child(6){
|
|
311
|
+
margin-top: 8rpx;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
</style>
|
|
@@ -0,0 +1,186 @@
|
|
|
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
|
+
line-height: 40rpx;
|
|
151
|
+
color: #999;
|
|
152
|
+
|
|
153
|
+
& > view:first-child {
|
|
154
|
+
width: 40rpx;
|
|
155
|
+
height: 40rpx;
|
|
156
|
+
line-height: 40rpx;
|
|
157
|
+
margin-right: 10rpx;
|
|
158
|
+
display: flex;
|
|
159
|
+
justify-content: center;
|
|
160
|
+
align-items: center;
|
|
161
|
+
flex-shrink: 0;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.address {
|
|
167
|
+
margin-bottom: 6rpx;
|
|
168
|
+
& > view:last-child {
|
|
169
|
+
.uni-max-cut(2,60);
|
|
170
|
+
line-height: 30rpx;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.eChange {
|
|
176
|
+
display: flex;
|
|
177
|
+
justify-content: flex-end;
|
|
178
|
+
align-items: center;
|
|
179
|
+
& > view {
|
|
180
|
+
width: 140rpx;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
</style>
|