jufubao-base 1.0.289-beta2 → 1.0.290-beta1
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/JfbBaseFooter/Attr.js +155 -10
- package/src/components/JfbBaseFooter/JfbBaseFooter.vue +43 -96
- package/src/components/JfbBaseSavingDetail/JfbBaseSavingDetail.vue +14 -2
- package/src/components/JfbBaseTfkSearch/Api.js +0 -15
- package/src/components/JfbBaseTfkSearch/CustomList.vue +0 -10
- package/src/components/JfbBaseTfkSearch/JfbBaseTfkSearch.vue +7 -247
- package/src/components/JfbBaseUserInfo/Attr.js +0 -12
- package/src/components/JfbBaseUserInfo/JfbBaseUserInfo.vue +2 -8
- package/src/mixins/componentsMixins.js +55 -363
- package/src/mixins/posterMixins.js +199 -27
- package/src/components/CusCouponChose/CusCouponChose.vue +0 -1027
- package/src/components/CusCouponItem/CusCouponItem.vue +0 -298
- package/src/components/CusEnter/CusEnter.vue +0 -360
- package/src/components/CusPoster/CusPoster.vue +0 -212
- package/src/components/CusPoster/CusSwiperDot.vue +0 -234
- package/src/components/CusProduct/CusProduct.vue +0 -372
- package/src/components/CusShops/CusShops.vue +0 -518
- package/src/components/CusSwiperDot/CusSwiperDot.vue +0 -234
- package/src/components/CusTab/CusTab.vue +0 -411
- package/src/components/CusVideo/CusVideo.vue +0 -170
- package/src/components/JfbBaseFooter/cusAttr/advanced.js +0 -12
- package/src/components/JfbBaseFooter/cusAttr/content.js +0 -447
- package/src/components/JfbBaseFooter/cusAttr/style.js +0 -7
- package/src/components/JfbBaseFooter/cusAttr/tools.js +0 -17
- package/src/components/JfbBaseTfkSearch/XdQueryFilter.vue +0 -354
- package/src/components/JfbBaseTfkSearch/XdQuerySort.vue +0 -192
- package/src/mixins/productCompMixins.js +0 -252
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
import { jfbRootExec } from "@/utils/xd.event";
|
|
3
|
-
import getServiceUrl from "@/common/getServiceUrl"
|
|
4
|
-
|
|
5
|
-
export default {
|
|
6
|
-
data(){
|
|
7
|
-
return {
|
|
8
|
-
|
|
9
|
-
//品牌样式
|
|
10
|
-
brandColor:'#999',
|
|
11
|
-
brandBgColor:'',
|
|
12
|
-
brandBorColor:'',
|
|
13
|
-
|
|
14
|
-
//广告
|
|
15
|
-
poster:{}, //广告位置信息
|
|
16
|
-
posterList:null,
|
|
17
|
-
posterNum:1, //使用张数
|
|
18
|
-
mode:'round',//直接写死
|
|
19
|
-
carouselTime: 0,//轮播图轮播周期
|
|
20
|
-
posterKey:'posterKey',
|
|
21
|
-
posterIndex:'',
|
|
22
|
-
isPoster:'N',
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
computed:{
|
|
28
|
-
isOpenPoster(){
|
|
29
|
-
//三列与一列垂直不显示广告
|
|
30
|
-
return !(this.column_num === 3 || this.columnOneLayout === 'V');
|
|
31
|
-
},
|
|
32
|
-
//广告位置样式设置
|
|
33
|
-
posterSizeComp(){
|
|
34
|
-
return {
|
|
35
|
-
width: this.posterSize.width + 'rpx',
|
|
36
|
-
height: this.posterSize.height + 'rpx',
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
//广告位置尺寸设置
|
|
41
|
-
posterSize(){
|
|
42
|
-
let pw = 0 , ph= 0;
|
|
43
|
-
if(this.column_num ===1) {
|
|
44
|
-
if(this.columnOneLayout === 'H') ph = 300
|
|
45
|
-
else ph = 900
|
|
46
|
-
}
|
|
47
|
-
if(this.column_num === 2) ph = 540
|
|
48
|
-
if(this.column_num === 3) ph = 200;
|
|
49
|
-
|
|
50
|
-
if(this.poster && this.poster.size) {
|
|
51
|
-
let {width, height} = this.poster.size;
|
|
52
|
-
if(width !== undefined) pw = Number(width);
|
|
53
|
-
if(height !== undefined) ph = Number(height);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
let itemWidth = parseInt(this.posterProductStyles.width);
|
|
57
|
-
let itemHeight = ph * itemWidth / pw;
|
|
58
|
-
return {
|
|
59
|
-
width: itemWidth,
|
|
60
|
-
height: itemHeight,
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
//骨架宽度设置
|
|
65
|
-
skeletonImageHeight(){
|
|
66
|
-
return parseInt(this.skeletonStyle.width);
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
//骨架样式设置
|
|
70
|
-
skeletonStyle(){
|
|
71
|
-
return this.getContentStyle('ske')
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
//商品宽度设置
|
|
75
|
-
contProductImageHeight(){
|
|
76
|
-
return parseInt(this.contProductStyles.width);
|
|
77
|
-
},
|
|
78
|
-
|
|
79
|
-
//商品样式设置
|
|
80
|
-
contProductStyles(){
|
|
81
|
-
// let boxShadow = this.getShadowCompatibleOldStyle(this.contShadow,{
|
|
82
|
-
// type: this.is_shadow,
|
|
83
|
-
// width: this.is_shadow_w,
|
|
84
|
-
// color: this.is_shadow_bg
|
|
85
|
-
// }, ['none',this.gStyleValue.shadow]);
|
|
86
|
-
// debugger
|
|
87
|
-
return {
|
|
88
|
-
...this.getContentStyle(),
|
|
89
|
-
boxShadow: this.contShadow,
|
|
90
|
-
border: this.contBorder,
|
|
91
|
-
backgroundColor: this.itemBgcColor,
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
//商品样式设置
|
|
97
|
-
posterProductStyles(){
|
|
98
|
-
// let boxShadow = this.getShadowCompatibleOldStyle(this.contShadow,{
|
|
99
|
-
// type: this.is_shadow,
|
|
100
|
-
// width: this.is_shadow_w,
|
|
101
|
-
// color: this.is_shadow_bg
|
|
102
|
-
// }, ['none',this.gStyleValue.shadow]);
|
|
103
|
-
return {
|
|
104
|
-
...this.getContentStyle('poster'),
|
|
105
|
-
boxShadow: this.contShadow,
|
|
106
|
-
border: this.contBorder,
|
|
107
|
-
backgroundColor: this.itemBgcColor,
|
|
108
|
-
overflow:'hidden'
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
|
|
112
|
-
//品牌样式
|
|
113
|
-
brandStyleComp(){
|
|
114
|
-
return {
|
|
115
|
-
color: this.brandColor,
|
|
116
|
-
bgColor: this.brandBgColor,
|
|
117
|
-
borderColor: this.brandBorColor,
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
watch:{
|
|
123
|
-
isPoster(n, o){
|
|
124
|
-
if(this.$configProject.isPreview) {
|
|
125
|
-
if(this.isOnloaded === false) return;
|
|
126
|
-
this.prodList = null;
|
|
127
|
-
this.page_token = '1';
|
|
128
|
-
this.getList();
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
posterIndex(){
|
|
132
|
-
if(this.$configProject.isPreview) {
|
|
133
|
-
if(this.isOnloaded === false) return;
|
|
134
|
-
this.prodList = null;
|
|
135
|
-
this.page_token = '1';
|
|
136
|
-
this.getList();
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
carouselTime(){
|
|
140
|
-
if(this.isPreview) {
|
|
141
|
-
this.posterKey = Date.now()
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
},
|
|
145
|
-
mode(){
|
|
146
|
-
if(this.isPreview) {
|
|
147
|
-
this.posterKey = Date.now()
|
|
148
|
-
}
|
|
149
|
-
},
|
|
150
|
-
posterNum(){
|
|
151
|
-
this.onJfbUpdate()
|
|
152
|
-
},
|
|
153
|
-
},
|
|
154
|
-
methods:{
|
|
155
|
-
//重新加载广告位置
|
|
156
|
-
reHandlePoster(){
|
|
157
|
-
if(this.$configProject.isPreview) {
|
|
158
|
-
if(this.isOnloaded === false) return;
|
|
159
|
-
if(this.isOpenPoster){
|
|
160
|
-
uni.showModal({
|
|
161
|
-
title: '温馨提示',
|
|
162
|
-
content: '已设置显示广告内容并切换商品显示列数时,别忘记切换对应的广告位置哦!',
|
|
163
|
-
showCancel:false,
|
|
164
|
-
confirmText:'我知道了',
|
|
165
|
-
success: function (res) {
|
|
166
|
-
|
|
167
|
-
}
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
this.prodList = null;
|
|
171
|
-
this.page_token = '1';
|
|
172
|
-
this.posterList = null;
|
|
173
|
-
this.getList();
|
|
174
|
-
this.getPosterList()
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
|
|
178
|
-
//获取广告位置设置
|
|
179
|
-
getPosterList(){
|
|
180
|
-
jfbRootExec('getMallHomeProductPoster', {
|
|
181
|
-
vm: this,
|
|
182
|
-
data: {
|
|
183
|
-
page_id: this.pageAttr['page_id'], //页面ID
|
|
184
|
-
container_id: this.containerId, //组件ID
|
|
185
|
-
page_size: this.posterNum //可以不传
|
|
186
|
-
},
|
|
187
|
-
})
|
|
188
|
-
.then(res => {
|
|
189
|
-
let posterList = res.list.map((item,index) => {
|
|
190
|
-
return {
|
|
191
|
-
...item,
|
|
192
|
-
image_background_url: item.image_background_url?getServiceUrl(item.image_background_url):'',
|
|
193
|
-
image_url: item.image_url?getServiceUrl(item.image_url):''
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
this.posterList = this.posterFilterNoUseData(posterList);
|
|
197
|
-
})
|
|
198
|
-
.catch(err=>{
|
|
199
|
-
console.error(err);
|
|
200
|
-
})
|
|
201
|
-
},
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* @description 获取内容区域样式
|
|
205
|
-
* @param type {string} ske=>骨架样式 cont=>内容框样式 poster => 广告位置样式
|
|
206
|
-
* @return {Object}
|
|
207
|
-
*/
|
|
208
|
-
getContentStyle(type='cont'){
|
|
209
|
-
//总宽度
|
|
210
|
-
let outWidth = uni.getSystemInfoSync().safeArea.width * this.$pxNum;
|
|
211
|
-
|
|
212
|
-
//外边距
|
|
213
|
-
let outMarginRL = this.getPMValue(this.bodyPadding, 'RL',0)
|
|
214
|
-
|
|
215
|
-
//列表填充
|
|
216
|
-
let outPaddingRL = this.getPMValue(this.listPadding,'RL', 20);
|
|
217
|
-
|
|
218
|
-
//间距设置
|
|
219
|
-
if(this.$xdUniHelper.checkVarType(this.columnSpacing) === 'string') this.columnSpacing = Number(this.columnSpacing);
|
|
220
|
-
let columnSpacing = this.columnSpacing * (this.column_num-1); //公式:列数量 * 边距 + 边距
|
|
221
|
-
|
|
222
|
-
//item内容填充
|
|
223
|
-
let paddingRL = this.getPMValue(this.itemPadding,'RL', 20)* this.column_num;
|
|
224
|
-
if(type === 'poster') paddingRL = 0; //广告模式
|
|
225
|
-
|
|
226
|
-
//预览模式有两个像素边距
|
|
227
|
-
let isPreview = 0;
|
|
228
|
-
|
|
229
|
-
//边框
|
|
230
|
-
let borderRL = this.contStyleBorder * 2;
|
|
231
|
-
|
|
232
|
-
if(type === 'ske') borderRL = 0;
|
|
233
|
-
borderRL = borderRL * this.column_num;
|
|
234
|
-
|
|
235
|
-
//商品内边距设置
|
|
236
|
-
let str = this.getMarginAndPadding(this.itemPadding,20);
|
|
237
|
-
if(type === 'poster') str = 0;//广告模式
|
|
238
|
-
|
|
239
|
-
let otherWidth = (outMarginRL + outPaddingRL + columnSpacing + isPreview + borderRL + paddingRL);
|
|
240
|
-
|
|
241
|
-
return {
|
|
242
|
-
marginBottom: this.rowSpacing + 'rpx',
|
|
243
|
-
width: (outWidth - otherWidth)/this.column_num + 'rpx',
|
|
244
|
-
borderRadius: this.radius + 'rpx',
|
|
245
|
-
boxShadow: '0 0 10rpx rgba(0,0,0,.08)',
|
|
246
|
-
padding: str,
|
|
247
|
-
backgroundColor: 'rgba(255,255,255,.8)'
|
|
248
|
-
};
|
|
249
|
-
},
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
}
|