jufubao-base 1.0.169-beta11 → 1.0.169-beta12
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
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
:style="moduleItemStyle"
|
|
5
5
|
>
|
|
6
6
|
<view class="module_title" :style="moduleItemTitleStyle">{{ parent.name }}</view>
|
|
7
|
-
<view class="module_cont">
|
|
7
|
+
<view v-if="parent.type !== 'product'" class="module_cont">
|
|
8
8
|
<view v-for="(item, i) in parent.items" :key="i">
|
|
9
9
|
<content-cinema v-if="parent.type === 'cinema'"
|
|
10
10
|
style="width: 100%; height: 100%"
|
|
@@ -45,16 +45,26 @@
|
|
|
45
45
|
@on-shop-detail="(shop)=>{$parentVm.handleShopDetail(shop,parent)}"
|
|
46
46
|
></content-shop>
|
|
47
47
|
|
|
48
|
+
</view>
|
|
49
|
+
</view>
|
|
50
|
+
<view v-else class="module_cont product_wrap">
|
|
51
|
+
<view v-for="(item, i) in parent.items" :key="i"
|
|
52
|
+
:style="{
|
|
53
|
+
width: getProductCell(parent.tab) == 2 ? (outItemProduct + 'rpx'): '100%',
|
|
54
|
+
marginBottom: $parentVm.outSpacing + 'rpx',
|
|
55
|
+
}"
|
|
56
|
+
>
|
|
48
57
|
<content-product v-if="parent.type === 'product'"
|
|
49
58
|
style="width: 100%; height: 100%"
|
|
50
59
|
:keyword="keyword"
|
|
51
60
|
:item="item"
|
|
61
|
+
:height="outItemProduct"
|
|
52
62
|
:product-config="$parentVm.productConfig"
|
|
53
63
|
:out-spacing="$parentVm.outSpacing"
|
|
54
64
|
:color="$parentVm.mainColor"
|
|
55
65
|
:brand-color="$parentVm.brandColor"
|
|
56
66
|
:border-radius="$parentVm.imgRradius"
|
|
57
|
-
:cell="
|
|
67
|
+
:cell="getProductCell(parent.tab)"
|
|
58
68
|
@on-product-detail="(product)=>{$parentVm.handleProductDetail(product,parent)}"
|
|
59
69
|
></content-product>
|
|
60
70
|
</view>
|
|
@@ -138,6 +148,12 @@
|
|
|
138
148
|
}
|
|
139
149
|
return this.styleObjectToString(style);
|
|
140
150
|
},
|
|
151
|
+
outItemProduct(){
|
|
152
|
+
//获取每列元素最大宽度
|
|
153
|
+
let num = (750 - 3 * Number(this.$parentVm.outSpacing))/2;
|
|
154
|
+
num = num - this.$parentVm.checkValue(this.$parentVm.contMargin.right, 20) - this.$parentVm.checkValue(this.$parentVm.contMargin.left, 20);
|
|
155
|
+
return num - this.$parentVm.contBorderWidth * 2
|
|
156
|
+
},
|
|
141
157
|
},
|
|
142
158
|
watch: {
|
|
143
159
|
keyword(){
|
|
@@ -162,6 +178,10 @@
|
|
|
162
178
|
this.getList();
|
|
163
179
|
},
|
|
164
180
|
methods: {
|
|
181
|
+
getProductCell(str){
|
|
182
|
+
let cellNum = str.split("@")[3] || 1;
|
|
183
|
+
return Number(cellNum);
|
|
184
|
+
},
|
|
165
185
|
getParentMV(){
|
|
166
186
|
this.$emit('on-parent-vm', ($vm)=>{
|
|
167
187
|
this.$parentVm = $vm;
|
|
@@ -187,7 +207,7 @@
|
|
|
187
207
|
this.$emit('on-list', {
|
|
188
208
|
params: params,
|
|
189
209
|
cb:(list)=>{
|
|
190
|
-
this.list = list;
|
|
210
|
+
this.list = list || [];
|
|
191
211
|
this.$xdHideLoading();
|
|
192
212
|
}
|
|
193
213
|
})
|
|
@@ -211,6 +231,12 @@
|
|
|
211
231
|
}
|
|
212
232
|
.module_cont{
|
|
213
233
|
padding: 20rpx 0;
|
|
234
|
+
|
|
235
|
+
&.product_wrap{
|
|
236
|
+
display: flex;
|
|
237
|
+
justify-content: space-between;
|
|
238
|
+
flex-wrap: wrap;
|
|
239
|
+
}
|
|
214
240
|
}
|
|
215
241
|
.module_more{
|
|
216
242
|
display: flex;
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
<view v-if="!isPreview" style="height: 100rpx;"></view>
|
|
44
44
|
|
|
45
45
|
<view class="tfk-search" :style="{padding: outSpacing + 'rpx'}">
|
|
46
|
-
<all-list v-if="
|
|
46
|
+
<all-list v-if="tabId === 'all'"
|
|
47
47
|
:keyword="keyword"
|
|
48
48
|
@on-parent-vm="handleParentVm"
|
|
49
49
|
@on-list="handleList"
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
data() {
|
|
92
92
|
return {
|
|
93
93
|
hideMask: true,
|
|
94
|
-
tabId: '', //cinema/film/shop/product
|
|
94
|
+
tabId: 'all', //cinema/film/shop/product
|
|
95
95
|
keyword: '',
|
|
96
96
|
options:{},
|
|
97
97
|
menuList: [],
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
*/
|
|
199
199
|
handleList({params, cb}){
|
|
200
200
|
let data = {...params};
|
|
201
|
-
if(this.tabId === ''){
|
|
201
|
+
if(this.tabId === 'all'){
|
|
202
202
|
data['search_range'] = this.searchScope.map(item => item.value.split("@")[0]).join(',');
|
|
203
203
|
}
|
|
204
204
|
|
|
@@ -206,7 +206,7 @@
|
|
|
206
206
|
vm: this,
|
|
207
207
|
data: data
|
|
208
208
|
}).then(res => {
|
|
209
|
-
if(this.tabId === ''){
|
|
209
|
+
if(this.tabId === 'all'){
|
|
210
210
|
if(!this.$configProject['isPreview']){
|
|
211
211
|
this.menuList = res.tabs;
|
|
212
212
|
}
|
|
@@ -216,10 +216,7 @@
|
|
|
216
216
|
else cb(null)
|
|
217
217
|
}
|
|
218
218
|
}).catch((e)=>{
|
|
219
|
-
|
|
220
|
-
//todo
|
|
221
|
-
}
|
|
222
|
-
else cb(null)
|
|
219
|
+
cb(null);
|
|
223
220
|
})
|
|
224
221
|
},
|
|
225
222
|
|
|
@@ -283,7 +280,7 @@
|
|
|
283
280
|
duration: 0
|
|
284
281
|
});
|
|
285
282
|
this.keyword = data;
|
|
286
|
-
this.tabId = '';
|
|
283
|
+
this.tabId = 'all';
|
|
287
284
|
this.$refs.searchHistory.addHistory(data);
|
|
288
285
|
}
|
|
289
286
|
},
|