jufubao-base 1.0.174-beta7 → 1.0.174-beta9
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
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
borderRadius: borderRadius + 'rpx',
|
|
11
11
|
}"
|
|
12
12
|
>
|
|
13
|
-
<image :src="
|
|
13
|
+
<image v-if="errorStatus" :src="errorImage" :alt="item['product_name']" ></image>
|
|
14
|
+
<image v-if="!errorStatus" :src="imageUrl" :alt="item['product_name']" @error="handleError()"></image>
|
|
15
|
+
<xd-product-status :status="item.status"></xd-product-status>
|
|
14
16
|
</view>
|
|
15
17
|
<view class="prodcut-content" :style="{marginTop:cell === 1? 0: (outSpacing + 'rpx') }">
|
|
16
18
|
<view class="prodcut-content-info">
|
|
@@ -64,13 +66,15 @@
|
|
|
64
66
|
import handleKeyword from "./handleKeyword";
|
|
65
67
|
import getServiceUrl from "@/common/getServiceUrl";
|
|
66
68
|
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon.vue";
|
|
69
|
+
import XdProductStatus from "@/components/XdProductStatus/XdProductStatus";
|
|
67
70
|
import XdUnit from "@/components/XdUnit/XdUnit.vue";
|
|
68
71
|
|
|
69
72
|
export default {
|
|
70
73
|
name: "ContentProduct",
|
|
71
74
|
components:{
|
|
72
75
|
XdFontIcon,
|
|
73
|
-
XdUnit
|
|
76
|
+
XdUnit,
|
|
77
|
+
XdProductStatus
|
|
74
78
|
},
|
|
75
79
|
props:{
|
|
76
80
|
keyword:{
|
|
@@ -153,7 +157,9 @@ export default {
|
|
|
153
157
|
data(){
|
|
154
158
|
return {
|
|
155
159
|
tagObj: null,
|
|
156
|
-
tagObjColor: null
|
|
160
|
+
tagObjColor: null,
|
|
161
|
+
errorStatus: false,
|
|
162
|
+
errorImage:'https://img0.jufubao.cn/common/empty/product.png?v1=1',
|
|
157
163
|
}
|
|
158
164
|
},
|
|
159
165
|
created() {
|
|
@@ -161,10 +167,11 @@ export default {
|
|
|
161
167
|
this.tagObjColor = this.$colorConfig.productTagsColor;
|
|
162
168
|
},
|
|
163
169
|
methods:{
|
|
170
|
+
handleError(){
|
|
171
|
+
this.errorStatus = true;
|
|
172
|
+
},
|
|
164
173
|
handleDetail(){
|
|
165
|
-
|
|
166
|
-
this.$emit('on-product-detail', this.item);
|
|
167
|
-
}
|
|
174
|
+
this.$emit('on-product-detail', this.item);
|
|
168
175
|
}
|
|
169
176
|
}
|
|
170
177
|
}
|
|
@@ -182,6 +189,7 @@ export default {
|
|
|
182
189
|
|
|
183
190
|
.prodcut-image {
|
|
184
191
|
flex-shrink: 0;
|
|
192
|
+
position: relative;
|
|
185
193
|
}
|
|
186
194
|
|
|
187
195
|
.prodcut-content {
|
|
@@ -304,9 +312,11 @@ export default {
|
|
|
304
312
|
flex-flow: wrap;
|
|
305
313
|
|
|
306
314
|
&.showTwo {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
315
|
+
& > view{
|
|
316
|
+
&:nth-child(4),&:nth-child(5),&:nth-child(6){
|
|
317
|
+
margin-top: 8rpx;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
310
320
|
}
|
|
311
321
|
& > view {
|
|
312
322
|
padding: 0 14rpx;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="content-item" @click="handleDetail(item)">
|
|
3
3
|
<view class="content-item-image" :style="{marginRight:outSpacing+'rpx',borderRadius:borderRadius+'rpx'}">
|
|
4
|
-
<image :src="
|
|
4
|
+
<image v-if="errorStatus" :src="errorImage" :alt="item['resource_shop_name']" ></image>
|
|
5
|
+
<image v-if="!errorStatus" :src="imageUrl+1" :alt="item['resource_shop_name']" @error="handleError()"></image>
|
|
5
6
|
</view>
|
|
6
7
|
<view class="content-item-cont">
|
|
7
8
|
<view class="title">
|
|
@@ -77,11 +78,20 @@ export default {
|
|
|
77
78
|
return `${sy}${this.item.address}`;
|
|
78
79
|
},
|
|
79
80
|
},
|
|
81
|
+
data(){
|
|
82
|
+
return {
|
|
83
|
+
errorStatus: false,
|
|
84
|
+
errorImage:'https://img0.jufubao.cn/common/empty/shop.png?v1=1',
|
|
85
|
+
}
|
|
86
|
+
},
|
|
80
87
|
created() {
|
|
81
88
|
// console.log(this.item)
|
|
82
89
|
// debugger
|
|
83
90
|
},
|
|
84
91
|
methods:{
|
|
92
|
+
handleError(){
|
|
93
|
+
this.errorStatus = true;
|
|
94
|
+
},
|
|
85
95
|
handleJhd(item){
|
|
86
96
|
this.$emit('on-shop-jhd',item);
|
|
87
97
|
},
|
|
@@ -92,9 +92,11 @@
|
|
|
92
92
|
componentsMixins, extsMixins, JfbBaseTfkSearchMixin,listMixins
|
|
93
93
|
],
|
|
94
94
|
data() {
|
|
95
|
+
let keyword = ''
|
|
96
|
+
if(this.$configProject['isPreview']) keyword = '商品'
|
|
95
97
|
return {
|
|
96
98
|
tabId: 'all', //cinema/film/shop/product
|
|
97
|
-
keyword:
|
|
99
|
+
keyword: keyword,
|
|
98
100
|
options:{},
|
|
99
101
|
menuList: [],
|
|
100
102
|
//公共样式
|
|
@@ -223,7 +225,7 @@
|
|
|
223
225
|
},
|
|
224
226
|
},
|
|
225
227
|
created() {
|
|
226
|
-
|
|
228
|
+
|
|
227
229
|
this.emitParent = new EmitParent({
|
|
228
230
|
getParent: ()=>{
|
|
229
231
|
return this;
|
|
@@ -303,7 +305,6 @@
|
|
|
303
305
|
|
|
304
306
|
if(this.$configProject['isPreview']){
|
|
305
307
|
this.menuList = this.searchScope;
|
|
306
|
-
this.keyword = "搜索关键字";
|
|
307
308
|
this.isPreview = true;
|
|
308
309
|
}
|
|
309
310
|
},
|