jufubao-base 1.0.116-beta12 → 1.0.116-beta13
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/JfbBaseConFlashHome/JfbBaseConFlashHome.vue +1 -0
- package/src/components/JfbBaseConFlashList/Attr.js +94 -83
- package/src/components/JfbBaseConFlashList/JfbBaseConFlashList.vue +619 -73
- package/src/components/JfbBaseMySetting/JfbBaseMySetting.vue +24 -3
- package/src/components/JfbBaseMySetting/XdListItem.vue +0 -1
package/package.json
CHANGED
|
@@ -8,99 +8,110 @@ export default {
|
|
|
8
8
|
content: (data) => {
|
|
9
9
|
return [
|
|
10
10
|
{
|
|
11
|
-
label: '
|
|
12
|
-
ele: 'xd-
|
|
13
|
-
valueKey: '
|
|
14
|
-
value: data.
|
|
15
|
-
placeholder: '请输入占位框背景颜色',
|
|
16
|
-
classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
|
|
11
|
+
label: '是否展示原价:',
|
|
12
|
+
ele: 'xd-radio',
|
|
13
|
+
valueKey: 'isShowDiscount',
|
|
14
|
+
value: data.isShowDiscount || "Y",
|
|
17
15
|
rules: [
|
|
18
|
-
{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
16
|
+
{required: true, message: '请选择', trigger: ['blur', 'change']}
|
|
17
|
+
],
|
|
18
|
+
list: [
|
|
19
|
+
{"label": "显示", "value": "Y"},
|
|
20
|
+
{"label": "隐藏", "value": "N"},
|
|
23
21
|
]
|
|
24
22
|
},
|
|
23
|
+
data.isShowDiscount==='Y'&&{
|
|
24
|
+
label: '价差大于多少展示原价:',
|
|
25
|
+
ele: 'el-input',
|
|
26
|
+
type: 'number',
|
|
27
|
+
valueKey: 'differ',
|
|
28
|
+
value: data['differ'] || '',
|
|
29
|
+
placeholder: '价差',
|
|
30
|
+
className: 'input80',
|
|
31
|
+
},
|
|
25
32
|
{
|
|
26
|
-
label: '
|
|
27
|
-
ele: 'xd-
|
|
28
|
-
valueKey: '
|
|
29
|
-
value: data
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
33
|
+
label: '场次背景图:', //label
|
|
34
|
+
ele: 'xd-upload', //package 名称
|
|
35
|
+
valueKey: 'sessionBackground', //form[valueKey]
|
|
36
|
+
value: data.sessionBackground || null, //v-model
|
|
37
|
+
defaultValue: data.sessionBackground || null, //默认图片对象
|
|
38
|
+
slot: true, //按钮是否使用slot
|
|
39
|
+
tipsformet: '上传文件格式:@imageType@,不超过@size@MB.,建议尺寸:800*800像素',
|
|
40
|
+
type: ['jpg', 'png', 'jpeg'],
|
|
41
|
+
styleType: 'one', //其值:one=>单文件上传 auth=>证件正反面上传 list=>多文件上传
|
|
42
|
+
uploadType: 'aliyun', //''=>API服务上传 qiniu=>七牛云OSS上传 aliyun=> 阿里云OSS上传
|
|
43
|
+
size: 5, //5M
|
|
44
|
+
action: 'aliyun',
|
|
34
45
|
},
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
{
|
|
47
|
+
ele: 'title',
|
|
48
|
+
label: '多场次选中效果',
|
|
49
|
+
size: 'small', //default/mini/small
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
label: '第一场背景图:', //label
|
|
53
|
+
ele: 'xd-upload', //package 名称
|
|
54
|
+
valueKey: 'firstBackground', //form[valueKey]
|
|
55
|
+
value: data.firstBackground || null, //v-model
|
|
56
|
+
defaultValue: data.firstBackground || null, //默认图片对象
|
|
57
|
+
slot: true, //按钮是否使用slot
|
|
58
|
+
tipsformet: '上传文件格式:@imageType@,不超过@size@MB.,建议尺寸:800*800像素',
|
|
59
|
+
type: ['jpg', 'png', 'jpeg'],
|
|
60
|
+
styleType: 'one', //其值:one=>单文件上传 auth=>证件正反面上传 list=>多文件上传
|
|
61
|
+
uploadType: 'aliyun', //''=>API服务上传 qiniu=>七牛云OSS上传 aliyun=> 阿里云OSS上传
|
|
62
|
+
size: 5, //5M
|
|
63
|
+
action: 'aliyun',
|
|
50
64
|
},
|
|
51
65
|
{
|
|
52
|
-
label: '', //label
|
|
53
|
-
ele: '
|
|
54
|
-
|
|
66
|
+
label: '中间场背景图:', //label
|
|
67
|
+
ele: 'xd-upload', //package 名称
|
|
68
|
+
valueKey: 'middleBackground', //form[valueKey]
|
|
69
|
+
value: data.middleBackground || null, //v-model
|
|
70
|
+
defaultValue: data.middleBackground || null, //默认图片对象
|
|
71
|
+
slot: true, //按钮是否使用slot
|
|
72
|
+
tipsformet: '上传文件格式:@imageType@,不超过@size@MB.,建议尺寸:800*800像素',
|
|
73
|
+
type: ['jpg', 'png', 'jpeg'],
|
|
74
|
+
styleType: 'one', //其值:one=>单文件上传 auth=>证件正反面上传 list=>多文件上传
|
|
75
|
+
uploadType: 'aliyun', //''=>API服务上传 qiniu=>七牛云OSS上传 aliyun=> 阿里云OSS上传
|
|
76
|
+
size: 5, //5M
|
|
77
|
+
action: 'aliyun',
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
label: '最后场背景图:', //label
|
|
81
|
+
ele: 'xd-upload', //package 名称
|
|
82
|
+
valueKey: 'finalBackground', //form[valueKey]
|
|
83
|
+
value: data.finalBackground || null, //v-model
|
|
84
|
+
defaultValue: data.finalBackground || null, //默认图片对象
|
|
85
|
+
slot: true, //按钮是否使用slot
|
|
86
|
+
tipsformet: '上传文件格式:@imageType@,不超过@size@MB.,建议尺寸:800*800像素',
|
|
87
|
+
type: ['jpg', 'png', 'jpeg'],
|
|
88
|
+
styleType: 'one', //其值:one=>单文件上传 auth=>证件正反面上传 list=>多文件上传
|
|
89
|
+
uploadType: 'aliyun', //''=>API服务上传 qiniu=>七牛云OSS上传 aliyun=> 阿里云OSS上传
|
|
90
|
+
size: 5, //5M
|
|
91
|
+
action: 'aliyun',
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
ele: 'title',
|
|
95
|
+
label: '单场次选中效果',
|
|
96
|
+
size: 'small', //default/mini/small
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
label: '单场次背景图:', //label
|
|
100
|
+
ele: 'xd-upload', //package 名称
|
|
101
|
+
valueKey: 'singleBackground', //form[valueKey]
|
|
102
|
+
value: data.singleBackground || null, //v-model
|
|
103
|
+
defaultValue: data.singleBackground || null, //默认图片对象
|
|
104
|
+
slot: true, //按钮是否使用slot
|
|
105
|
+
tipsformet: '上传文件格式:@imageType@,不超过@size@MB.,建议尺寸:800*800像素',
|
|
106
|
+
type: ['jpg', 'png', 'jpeg'],
|
|
107
|
+
styleType: 'one', //其值:one=>单文件上传 auth=>证件正反面上传 list=>多文件上传
|
|
108
|
+
uploadType: 'aliyun', //''=>API服务上传 qiniu=>七牛云OSS上传 aliyun=> 阿里云OSS上传
|
|
109
|
+
size: 5, //5M
|
|
110
|
+
action: 'aliyun',
|
|
55
111
|
},
|
|
56
112
|
].filter(i=>i)
|
|
57
113
|
},
|
|
58
114
|
advanced: [
|
|
59
|
-
|
|
60
|
-
label: '背景颜色:', //label
|
|
61
|
-
ele: 'xd-color', //package 名称
|
|
62
|
-
valueKey: 'bgcolor', //form[valueKey]
|
|
63
|
-
value: '', //v-model
|
|
64
|
-
placeholder: '请输入占位框背景颜色',
|
|
65
|
-
classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
|
|
66
|
-
rules: [
|
|
67
|
-
{
|
|
68
|
-
required: true,
|
|
69
|
-
message: '请输入占位框背景颜色',
|
|
70
|
-
trigger: 'blur'
|
|
71
|
-
},
|
|
72
|
-
]
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
label: '选中路径:', //label
|
|
76
|
-
ele: 'xd-select-pages-path', //package 名称
|
|
77
|
-
valueKey: 'select-pages-path', //form[valueKey]
|
|
78
|
-
value: null,
|
|
79
|
-
setting: {
|
|
80
|
-
router: XdBus.getParentApi('getPagesTree')
|
|
81
|
-
},
|
|
82
|
-
inline: false,
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
label: '高度:', //label
|
|
86
|
-
ele: 'el-input', //package 名称
|
|
87
|
-
type: 'number',
|
|
88
|
-
valueKey: 'height', //form[valueKey]
|
|
89
|
-
value: null, //v-model
|
|
90
|
-
placeholder: '请输入占位框高度,单位像素,默认:10px',
|
|
91
|
-
classNmae: 'input80', //样式名称 //input100,input80,input70,input60,input50,input40,input30,input20,
|
|
92
|
-
rules: [
|
|
93
|
-
{
|
|
94
|
-
required: true,
|
|
95
|
-
message: '请输入占位框高度',
|
|
96
|
-
trigger: 'blur'
|
|
97
|
-
},
|
|
98
|
-
]
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
label: '', //label
|
|
102
|
-
ele: 'slot', //package 名称
|
|
103
|
-
slot: 'is_reference',
|
|
104
|
-
},
|
|
115
|
+
|
|
105
116
|
],
|
|
106
117
|
};
|
|
@@ -2,109 +2,655 @@
|
|
|
2
2
|
<view
|
|
3
3
|
class="jfb-base-con-flash-list"
|
|
4
4
|
@click="handleEditxSelect"
|
|
5
|
-
:class="{ editx
|
|
5
|
+
:class="{ editx: isEditx && active }"
|
|
6
6
|
>
|
|
7
7
|
<!--#ifdef H5-->
|
|
8
8
|
<view
|
|
9
9
|
class="jfb-base-con-flash-list__edit"
|
|
10
|
-
:class="{ editx
|
|
10
|
+
:class="{ editx: isEditx && active }"
|
|
11
11
|
v-if="isEditx && active"
|
|
12
12
|
>
|
|
13
|
-
<view class="jfb-base-con-flash-list__edit-icon" @click="delEdit"
|
|
13
|
+
<view class="jfb-base-con-flash-list__edit-icon" @click="delEdit"
|
|
14
|
+
>删除</view
|
|
15
|
+
>
|
|
14
16
|
</view>
|
|
15
17
|
<!-- #endif -->
|
|
16
18
|
<view class="jfb-base-con-flash-list__body">
|
|
17
|
-
<
|
|
19
|
+
<image
|
|
20
|
+
:style="{
|
|
21
|
+
backgroundImage: `url(${background})`,
|
|
22
|
+
backgroundSize: '100% 100%',
|
|
23
|
+
display: 'block',
|
|
24
|
+
}"
|
|
25
|
+
class="jfb-base-con-flash-list__body-banner"
|
|
26
|
+
></image>
|
|
27
|
+
<!-- 多场次tab start -->
|
|
28
|
+
<scroll-view
|
|
29
|
+
v-if="sessionList.length > 1"
|
|
30
|
+
:style="{
|
|
31
|
+
backgroundImage: `url(${sessionBackground})`,
|
|
32
|
+
backgroundSize: '100% 100%',
|
|
33
|
+
position: positionType,
|
|
34
|
+
top: top,
|
|
35
|
+
zIndex: 2000,
|
|
36
|
+
}"
|
|
37
|
+
scroll-x="true"
|
|
38
|
+
>
|
|
39
|
+
<!-- 这里放置你需要横向滑动的内容 -->
|
|
40
|
+
<view class="jfb-base-con-flash-list__body-scroll">
|
|
41
|
+
<view
|
|
42
|
+
:style="{
|
|
43
|
+
backgroundImage:
|
|
44
|
+
activeIndex === index && index === 0
|
|
45
|
+
? `url(${firstBackground})`
|
|
46
|
+
: activeIndex === index && index === sessionList.length - 1
|
|
47
|
+
? `url(${finalBackground})`
|
|
48
|
+
: activeIndex === index
|
|
49
|
+
? `url(${middleBackground})`
|
|
50
|
+
: 'none',
|
|
51
|
+
backgroundSize: '100% 100%',
|
|
52
|
+
width: index === 0 ? '28%' : '25%',
|
|
53
|
+
textAlign: index === 0 ? 'left' : 'center',
|
|
54
|
+
}"
|
|
55
|
+
class="jfb-base-con-flash-list__body-scroll-item"
|
|
56
|
+
v-for="(item, index) in sessionList"
|
|
57
|
+
:key="index"
|
|
58
|
+
@click="handleSelectSession(index, item)"
|
|
59
|
+
>
|
|
60
|
+
<view
|
|
61
|
+
class="jfb-base-con-flash-list__body-scroll-item-ready"
|
|
62
|
+
v-if="!item.isStart"
|
|
63
|
+
>
|
|
64
|
+
<view
|
|
65
|
+
:style="{ color: activeIndex === index ? '#333' : '#fff' }"
|
|
66
|
+
>{{ item.start_name }}</view
|
|
67
|
+
>
|
|
68
|
+
<view
|
|
69
|
+
:style="{
|
|
70
|
+
color: activeIndex === index ? mainColor : '#fff',
|
|
71
|
+
fontWeight: activeIndex === index ? 700 : 400,
|
|
72
|
+
}"
|
|
73
|
+
>即将开抢</view
|
|
74
|
+
>
|
|
75
|
+
</view>
|
|
76
|
+
<view
|
|
77
|
+
class="jfb-base-con-flash-list__body-scroll-item-ready"
|
|
78
|
+
v-else
|
|
79
|
+
>
|
|
80
|
+
<view style="text-align: left; padding-left: 10rpx">
|
|
81
|
+
<text
|
|
82
|
+
:style="{
|
|
83
|
+
background: activeIndex === index ? '#1a1a1a' : '#fff',
|
|
84
|
+
color: activeIndex === index ? '#fff' : mainColor,
|
|
85
|
+
}"
|
|
86
|
+
>{{ hours }}</text
|
|
87
|
+
><text
|
|
88
|
+
:style="{
|
|
89
|
+
color: activeIndex === index ? '#1a1a1a' : '#fff',
|
|
90
|
+
}"
|
|
91
|
+
>:</text
|
|
92
|
+
>
|
|
93
|
+
<text
|
|
94
|
+
:style="{
|
|
95
|
+
background: activeIndex === index ? '#1a1a1a' : '#fff',
|
|
96
|
+
color: activeIndex === index ? '#fff' : mainColor,
|
|
97
|
+
}"
|
|
98
|
+
>{{ minutes }}</text
|
|
99
|
+
>
|
|
100
|
+
<text
|
|
101
|
+
:style="{
|
|
102
|
+
color: activeIndex === index ? '#1a1a1a' : '#fff',
|
|
103
|
+
}"
|
|
104
|
+
>:</text
|
|
105
|
+
>
|
|
106
|
+
<text
|
|
107
|
+
:style="{
|
|
108
|
+
background: activeIndex === index ? '#1a1a1a' : '#fff',
|
|
109
|
+
color: activeIndex === index ? '#fff' : mainColor,
|
|
110
|
+
}"
|
|
111
|
+
>{{ seconds }}</text
|
|
112
|
+
>
|
|
113
|
+
</view>
|
|
114
|
+
<view
|
|
115
|
+
:style="{
|
|
116
|
+
color: activeIndex === index ? mainColor : '#fff',
|
|
117
|
+
fontWeight: activeIndex === index ? 700 : 400,
|
|
118
|
+
textAlign: 'left',
|
|
119
|
+
paddingLeft: '10rpx',
|
|
120
|
+
}"
|
|
121
|
+
>{{ item.start_name }}点场</view
|
|
122
|
+
>
|
|
123
|
+
</view>
|
|
124
|
+
</view>
|
|
125
|
+
</view>
|
|
126
|
+
</scroll-view>
|
|
127
|
+
<!-- 多场次tab end -->
|
|
128
|
+
<!-- 单场次 start -->
|
|
129
|
+
<view
|
|
130
|
+
class="jfb-base-con-flash-list__body-single"
|
|
131
|
+
:style="{
|
|
132
|
+
backgroundImage: `url(${singleBackground})`,
|
|
133
|
+
backgroundSize: '100% 100%',
|
|
134
|
+
position: positionType,
|
|
135
|
+
top: top,
|
|
136
|
+
zIndex: 2000,
|
|
137
|
+
}"
|
|
138
|
+
v-else
|
|
139
|
+
>
|
|
140
|
+
<view
|
|
141
|
+
v-if="!sessionList[0].isStart"
|
|
142
|
+
class="jfb-base-con-flash-list__body-single-date"
|
|
143
|
+
>
|
|
144
|
+
<view> 3月8日 14:00 </view>
|
|
145
|
+
<view> 即将开抢 </view>
|
|
146
|
+
</view>
|
|
147
|
+
<view class="jfb-base-con-flash-list__body-single-date" v-else>
|
|
148
|
+
<view> 00:00:00 </view>
|
|
149
|
+
<view> 疯抢中... </view>
|
|
150
|
+
</view>
|
|
151
|
+
<view class="jfb-base-con-flash-list__body-single-cutdown">
|
|
152
|
+
距结束
|
|
153
|
+
<text :style="{ color: mainColor }">3</text>天
|
|
154
|
+
<text :style="{ color: mainColor }">12</text>:
|
|
155
|
+
<text :style="{ color: mainColor }">48</text>:
|
|
156
|
+
<text :style="{ color: mainColor }">56</text>
|
|
157
|
+
</view>
|
|
158
|
+
</view>
|
|
159
|
+
<!-- 单场次 end -->
|
|
160
|
+
|
|
161
|
+
<view
|
|
162
|
+
:style="{ height: fixedHeightTop }"
|
|
163
|
+
v-if="positionType === 'fixed'"
|
|
164
|
+
></view>
|
|
165
|
+
<view class="jfb-base-con-flash-list__body-product">
|
|
166
|
+
<view
|
|
167
|
+
v-for="(item, index) in productList"
|
|
168
|
+
:key="index"
|
|
169
|
+
class="jfb-base-con-flash-list__body-product-item"
|
|
170
|
+
>
|
|
171
|
+
<view
|
|
172
|
+
v-if="!item.num"
|
|
173
|
+
class="jfb-base-con-flash-list__body-product-item-mask"
|
|
174
|
+
></view>
|
|
175
|
+
<image :src="item.img"></image>
|
|
176
|
+
<view class="jfb-base-con-flash-list__body-product-item-info">
|
|
177
|
+
<view class="jfb-base-con-flash-list__body-product-item-info-name">
|
|
178
|
+
{{ item.name }}
|
|
179
|
+
</view>
|
|
180
|
+
<view class="prod_price">
|
|
181
|
+
<xd-unit
|
|
182
|
+
:price="item.sale_price"
|
|
183
|
+
:isOld="false"
|
|
184
|
+
color="#000000"
|
|
185
|
+
:iconSize="0.28"
|
|
186
|
+
:fontSize="48"
|
|
187
|
+
/>
|
|
188
|
+
<!-- todo -->
|
|
189
|
+
<view
|
|
190
|
+
v-if="isShowDiscount === 'Y' && checkDiscountPrice(item)"
|
|
191
|
+
class="prod_oldPrice"
|
|
192
|
+
>原价:{{ dividePrice(item.market_price) }}</view
|
|
193
|
+
>
|
|
194
|
+
</view>
|
|
195
|
+
<view class="jfb-base-con-flash-list__body-product-item-info-tag">
|
|
196
|
+
<view :style="{ background: mainColor }">限时秒杀</view>
|
|
197
|
+
<XdFontIcon
|
|
198
|
+
v-if="showFlash"
|
|
199
|
+
:color="mainColor"
|
|
200
|
+
icon="icontop"
|
|
201
|
+
size="50"
|
|
202
|
+
></XdFontIcon>
|
|
203
|
+
</view>
|
|
204
|
+
</view>
|
|
205
|
+
</view>
|
|
206
|
+
</view>
|
|
18
207
|
</view>
|
|
19
208
|
</view>
|
|
20
209
|
</template>
|
|
21
210
|
|
|
22
211
|
<script>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
212
|
+
import XdFontIcon from "@/components/XdFontIcon/XdFontIcon";
|
|
213
|
+
import { jfbRootExec } from "@/utils/xd.event";
|
|
214
|
+
import JfbBaseConFlashListMixin from "./JfbBaseConFlashListMixin";
|
|
215
|
+
import { getContainerPropsValue } from "@/utils/xd.base";
|
|
216
|
+
import componentsMixins from "@/mixins/componentsMixins";
|
|
217
|
+
import extsMixins from "@/mixins/extsMixins";
|
|
218
|
+
import getServiceUrl from "@/common/getServiceUrl";
|
|
219
|
+
import XdUnit from "@/components/XdUnit/XdUnit";
|
|
220
|
+
|
|
221
|
+
export default {
|
|
222
|
+
name: "JfbBaseConFlashList",
|
|
223
|
+
components: {
|
|
224
|
+
XdFontIcon,
|
|
225
|
+
XdUnit,
|
|
226
|
+
},
|
|
227
|
+
mixins: [componentsMixins, extsMixins, JfbBaseConFlashListMixin],
|
|
228
|
+
data() {
|
|
229
|
+
return {
|
|
230
|
+
background:
|
|
231
|
+
"https://img.js.design/assets/img/65eaab794acd2620e01cc8e8.png#24f148138043dd336055d304f1486411",
|
|
232
|
+
sessionBackground: "",
|
|
233
|
+
firstBackground: "",
|
|
234
|
+
middleBackground: "",
|
|
235
|
+
finalBackground: "",
|
|
236
|
+
singleBackground: "",
|
|
237
|
+
activeIndex: 0,
|
|
238
|
+
sessionList: [
|
|
239
|
+
{
|
|
240
|
+
start: 1710153161,
|
|
241
|
+
end: 1710160361,
|
|
242
|
+
isStart: true,
|
|
243
|
+
start_name: "12:00",
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
start: 1710153161,
|
|
247
|
+
end: 1710160361,
|
|
248
|
+
isStart: false,
|
|
249
|
+
start_name: "14:00",
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
start: 1710153161,
|
|
253
|
+
end: 1710160361,
|
|
254
|
+
isStart: false,
|
|
255
|
+
start_name: "16:00",
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
start: 1710153161,
|
|
259
|
+
end: 1710160361,
|
|
260
|
+
isStart: false,
|
|
261
|
+
start_name: "18:00",
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
start: 1710153161,
|
|
265
|
+
end: 1710160361,
|
|
266
|
+
isStart: false,
|
|
267
|
+
start_name: "18:00",
|
|
268
|
+
},
|
|
269
|
+
],
|
|
270
|
+
days: "00",
|
|
271
|
+
hours: "00",
|
|
272
|
+
minutes: "00",
|
|
273
|
+
seconds: "00",
|
|
274
|
+
isShowDiscount: "",
|
|
275
|
+
differ: 1,
|
|
276
|
+
showFlash: true,
|
|
277
|
+
productList: [
|
|
278
|
+
{
|
|
279
|
+
img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
|
|
280
|
+
name: "方家铺子中宁四星红枸杞250g烦都烦死大喊大叫开始",
|
|
281
|
+
market_price: 1200,
|
|
282
|
+
sale_price: 1000,
|
|
283
|
+
num: 1,
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
|
|
287
|
+
name: "方家铺子中宁四星红枸杞250g",
|
|
288
|
+
market_price: 1200,
|
|
289
|
+
sale_price: 1000,
|
|
290
|
+
num: 0,
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
|
|
294
|
+
name: "方家铺子中宁四星红枸杞250g",
|
|
295
|
+
market_price: 1200,
|
|
296
|
+
sale_price: 1000,
|
|
297
|
+
num: 1,
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
|
|
301
|
+
name: "方家铺子中宁四星红枸杞250g",
|
|
302
|
+
market_price: 1200,
|
|
303
|
+
sale_price: 1000,
|
|
304
|
+
num: 1,
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
|
|
308
|
+
name: "方家铺子中宁四星红枸杞250g",
|
|
309
|
+
market_price: 1200,
|
|
310
|
+
sale_price: 1000,
|
|
311
|
+
num: 1,
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
|
|
315
|
+
name: "方家铺子中宁四星红枸杞250g",
|
|
316
|
+
market_price: 1200,
|
|
317
|
+
sale_price: 1000,
|
|
318
|
+
num: 1,
|
|
319
|
+
},
|
|
320
|
+
{
|
|
321
|
+
img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
|
|
322
|
+
name: "方家铺子中宁四星红枸杞250g",
|
|
323
|
+
market_price: 1200,
|
|
324
|
+
sale_price: 1000,
|
|
325
|
+
num: 1,
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
|
|
329
|
+
name: "方家铺子中宁四星红枸杞250g",
|
|
330
|
+
market_price: 1200,
|
|
331
|
+
sale_price: 1000,
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
|
|
335
|
+
name: "方家铺子中宁四星红枸杞250g",
|
|
336
|
+
market_price: 1200,
|
|
337
|
+
sale_price: 1000,
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
|
|
341
|
+
name: "方家铺子中宁四星红枸杞250g",
|
|
342
|
+
market_price: 1200,
|
|
343
|
+
sale_price: 1000,
|
|
344
|
+
num: 1,
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
img: "https://img.js.design/assets/img/6487c11d31971ab22c07c220.png#dfe2fe09e053ed42de4af607382569ac",
|
|
348
|
+
name: "方家铺子中宁四星红枸杞250g",
|
|
349
|
+
market_price: 1200,
|
|
350
|
+
sale_price: 1000,
|
|
351
|
+
num: 1,
|
|
352
|
+
},
|
|
353
|
+
],
|
|
354
|
+
hasNext: true,
|
|
355
|
+
next_page_token: "",
|
|
356
|
+
page_size: 10,
|
|
357
|
+
page_token: 1,
|
|
358
|
+
positionType: "relative",
|
|
359
|
+
top: "-20rpx",
|
|
360
|
+
fixedHeightTop: "0rpx",
|
|
361
|
+
};
|
|
362
|
+
},
|
|
363
|
+
watch: {
|
|
364
|
+
container(value) {
|
|
365
|
+
this.init(value);
|
|
33
366
|
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
data() {
|
|
38
|
-
return {
|
|
367
|
+
},
|
|
368
|
+
created() {
|
|
369
|
+
this.init(this.container);
|
|
39
370
|
|
|
40
|
-
|
|
41
|
-
|
|
371
|
+
//todo
|
|
372
|
+
},
|
|
373
|
+
destroyed() {
|
|
374
|
+
if (this.timeer) {
|
|
375
|
+
clearTimeout(this.timeer);
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
methods: {
|
|
379
|
+
onJfbLoad(options) {
|
|
380
|
+
this.fixedHeightTop = "100rpx";
|
|
381
|
+
|
|
382
|
+
this.sessionList.map((item) => {
|
|
383
|
+
if (item.isStart) {
|
|
384
|
+
this.cutTime(item.end);
|
|
385
|
+
this.timmer = setInterval(() => {
|
|
386
|
+
this.cutTime(item.end);
|
|
387
|
+
}, 1000);
|
|
388
|
+
}
|
|
389
|
+
});
|
|
42
390
|
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
391
|
+
/**
|
|
392
|
+
* @description 监听事件变化
|
|
393
|
+
* @param container {object} 业务组件对象自己
|
|
394
|
+
*/
|
|
395
|
+
init(container) {
|
|
396
|
+
this.sessionBackground = getServiceUrl(
|
|
397
|
+
getContainerPropsValue(container, "content.sessionBackground", "none")
|
|
398
|
+
.url
|
|
399
|
+
);
|
|
400
|
+
this.firstBackground = getServiceUrl(
|
|
401
|
+
getContainerPropsValue(container, "content.firstBackground", "none").url
|
|
402
|
+
);
|
|
403
|
+
this.middleBackground = getServiceUrl(
|
|
404
|
+
getContainerPropsValue(container, "content.middleBackground", "none")
|
|
405
|
+
.url
|
|
406
|
+
);
|
|
407
|
+
this.finalBackground = getServiceUrl(
|
|
408
|
+
getContainerPropsValue(container, "content.finalBackground", "none").url
|
|
409
|
+
);
|
|
410
|
+
this.singleBackground = getServiceUrl(
|
|
411
|
+
getContainerPropsValue(container, "content.singleBackground", "none")
|
|
412
|
+
.url
|
|
413
|
+
);
|
|
414
|
+
this.differ = getContainerPropsValue(container, "content.differ", 1);
|
|
415
|
+
this.isShowDiscount = getContainerPropsValue(
|
|
416
|
+
container,
|
|
417
|
+
"content.isShowDiscount",
|
|
418
|
+
"Y"
|
|
419
|
+
);
|
|
420
|
+
},
|
|
421
|
+
checkDiscountPrice(item) {
|
|
422
|
+
if (this.isShowDiscount === "Y") {
|
|
423
|
+
let price = item.market_price - item.sale_price;
|
|
424
|
+
console.log(
|
|
425
|
+
item.market_price,
|
|
426
|
+
item.sale_price,
|
|
427
|
+
this.$xdUniHelper.divisionFloatNumber(price, 100),
|
|
428
|
+
this.differ,
|
|
429
|
+
this.$xdUniHelper.divisionFloatNumber(price, 100) > this.differ,
|
|
430
|
+
"hhhhhh"
|
|
431
|
+
);
|
|
432
|
+
return this.$xdUniHelper.divisionFloatNumber(price, 100) > this.differ;
|
|
46
433
|
}
|
|
47
434
|
},
|
|
48
|
-
|
|
49
|
-
this.
|
|
50
|
-
|
|
51
|
-
//todo
|
|
435
|
+
dividePrice(num) {
|
|
436
|
+
return this.$xdUniHelper.divisionFloatNumber(num, 100);
|
|
52
437
|
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
// account: 'gaoshiyong',// password: '123456789',// type: 3,// ...options
|
|
438
|
+
handleSelectSession(index, item) {
|
|
439
|
+
this.showFlash = item.isStart;
|
|
440
|
+
this.activeIndex = index;
|
|
441
|
+
},
|
|
442
|
+
cutTime(end) {
|
|
443
|
+
const now = Math.floor(Date.now() / 1000); // 获取当前时间戳
|
|
444
|
+
const diff = end - now;
|
|
61
445
|
|
|
62
|
-
|
|
446
|
+
if (diff <= 0) {
|
|
447
|
+
//开启下一场
|
|
448
|
+
this.timer = null;
|
|
449
|
+
// this.onJfbLoad();
|
|
450
|
+
return;
|
|
451
|
+
}
|
|
63
452
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* @description 监听事件变化
|
|
68
|
-
* @param container {object} 业务组件对象自己
|
|
69
|
-
*/
|
|
70
|
-
init(container) {
|
|
453
|
+
const days = Math.floor(diff / (3600 * 24));
|
|
454
|
+
const remainingHours = diff % (3600 * 24);
|
|
71
455
|
|
|
72
|
-
|
|
456
|
+
this.hours = String(Math.floor(remainingHours / 3600)).padStart(2, "0");
|
|
457
|
+
this.minutes = String(Math.floor((remainingHours % 3600) / 60)).padStart(
|
|
458
|
+
2,
|
|
459
|
+
"0"
|
|
460
|
+
);
|
|
461
|
+
this.seconds = String(Math.floor(remainingHours % 60)).padStart(2, "0");
|
|
462
|
+
this.days = String(days).padStart(2, "0");
|
|
73
463
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
},
|
|
97
|
-
}
|
|
98
|
-
}
|
|
464
|
+
console.log(this.days, this.hours, this.minutes, this.seconds, "倒计时");
|
|
465
|
+
},
|
|
466
|
+
getList() {
|
|
467
|
+
let list = [];
|
|
468
|
+
if (this.page_token === 1) {
|
|
469
|
+
this.productList = list;
|
|
470
|
+
} else {
|
|
471
|
+
this.productList = this.productList.concat(list);
|
|
472
|
+
}
|
|
473
|
+
this.hasNext = res.next_page_token !== "";
|
|
474
|
+
this.next_page_token = res.next_page_token;
|
|
475
|
+
},
|
|
476
|
+
onJfbScroll(options) {
|
|
477
|
+
//滑动展示背景
|
|
478
|
+
// console.log(this.isPreview, "this.isPreview");
|
|
479
|
+
// if (this.isPreview) return;
|
|
480
|
+
console.log(options.e.scrollTop, "options.e.scrollTop");
|
|
481
|
+
if (options.e.scrollTop >= "160") {
|
|
482
|
+
this.positionType = "fixed";
|
|
483
|
+
this.top = this.layoutInfo.top + "rpx";
|
|
484
|
+
return;
|
|
485
|
+
}
|
|
99
486
|
|
|
487
|
+
// if (options.e.scrollTop === 0) {
|
|
488
|
+
this.positionType = "relative";
|
|
489
|
+
this.top = "-20rpx";
|
|
490
|
+
// return;
|
|
491
|
+
// }
|
|
492
|
+
},
|
|
493
|
+
onJfbReachBottom(options) {
|
|
494
|
+
console.log("1111");
|
|
495
|
+
if (this.hasNext) {
|
|
496
|
+
this.page_token = this.next_page_token;
|
|
497
|
+
this.getList();
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
onJfbUnload() {
|
|
501
|
+
if (this.timeer) {
|
|
502
|
+
clearTimeout(this.timeer);
|
|
503
|
+
}
|
|
504
|
+
},
|
|
505
|
+
onJfbBack(options) {
|
|
506
|
+
if (this.timeer) {
|
|
507
|
+
clearTimeout(this.timeer);
|
|
508
|
+
}
|
|
509
|
+
if (this.$configProject.isPreview) return;
|
|
510
|
+
this.$xdUniHelper.navigateBack();
|
|
511
|
+
},
|
|
512
|
+
},
|
|
513
|
+
};
|
|
100
514
|
</script>
|
|
101
515
|
|
|
102
516
|
<style scoped lang="less">
|
|
103
|
-
|
|
517
|
+
@import "./JfbBaseConFlashListLess.less";
|
|
104
518
|
|
|
105
|
-
|
|
106
|
-
|
|
519
|
+
.jfb-base-con-flash-list {
|
|
520
|
+
&__body {
|
|
521
|
+
position: relative;
|
|
522
|
+
&-banner {
|
|
523
|
+
width: 100%;
|
|
524
|
+
height: 360rpx;
|
|
525
|
+
}
|
|
526
|
+
&-scroll {
|
|
527
|
+
white-space: nowrap;
|
|
528
|
+
width: 100%;
|
|
529
|
+
height: 100rpx;
|
|
530
|
+
&-item {
|
|
531
|
+
display: inline-block;
|
|
532
|
+
text-align: center;
|
|
533
|
+
width: 25%;
|
|
534
|
+
height: 100%;
|
|
107
535
|
|
|
536
|
+
&-ready {
|
|
537
|
+
color: #fff;
|
|
538
|
+
& > view:first-child {
|
|
539
|
+
font-size: 40rpx;
|
|
540
|
+
font-weight: 500;
|
|
541
|
+
text-align: center;
|
|
542
|
+
& > text {
|
|
543
|
+
width: 28rpx;
|
|
544
|
+
height: 28rpx;
|
|
545
|
+
border-radius: 4rpx;
|
|
546
|
+
font-size: 28rpx;
|
|
547
|
+
padding: 0rpx 2rpx;
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
& > view:nth-child(2) {
|
|
551
|
+
font-size: 24rpx;
|
|
552
|
+
text-align: center;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
&-product {
|
|
558
|
+
margin: 34rpx 20rpx;
|
|
559
|
+
&-item {
|
|
560
|
+
margin-bottom: 24rpx;
|
|
561
|
+
display: flex;
|
|
562
|
+
align-items: center;
|
|
563
|
+
background: #fff;
|
|
564
|
+
border-radius: 16rpx;
|
|
565
|
+
padding: 20rpx 20rpx 20rpx 10rpx;
|
|
566
|
+
position: relative;
|
|
567
|
+
&-mask {
|
|
568
|
+
position: absolute;
|
|
569
|
+
top: 0;
|
|
570
|
+
bottom: 0;
|
|
571
|
+
left: 0;
|
|
572
|
+
right: 0;
|
|
573
|
+
background: rgba(255, 255, 255, 0.5);
|
|
574
|
+
border-radius: 16rpx;
|
|
575
|
+
z-index: 2;
|
|
576
|
+
}
|
|
577
|
+
image {
|
|
578
|
+
width: 220rpx;
|
|
579
|
+
height: 220rpx;
|
|
580
|
+
border-radius: 16rpx;
|
|
581
|
+
}
|
|
582
|
+
&-info {
|
|
583
|
+
flex: 1;
|
|
584
|
+
display: flex;
|
|
585
|
+
flex-direction: column;
|
|
586
|
+
justify-content: space-between;
|
|
587
|
+
margin-left: 20rpx;
|
|
588
|
+
&-name {
|
|
589
|
+
font-weight: 500;
|
|
590
|
+
font-size: 32rpx;
|
|
591
|
+
}
|
|
592
|
+
&-tag {
|
|
593
|
+
display: flex;
|
|
594
|
+
justify-content: space-between;
|
|
595
|
+
align-items: center;
|
|
596
|
+
& > view:first-child {
|
|
597
|
+
font-size: 24rpx;
|
|
598
|
+
text-align: center;
|
|
599
|
+
border-radius: 8rpx;
|
|
600
|
+
padding: 8rpx 16rpx 8rpx 16rpx;
|
|
601
|
+
color: #fff;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
&-single {
|
|
608
|
+
height: 160rpx;
|
|
609
|
+
display: flex;
|
|
610
|
+
justify-content: space-around;
|
|
611
|
+
align-items: center;
|
|
612
|
+
color: #fff;
|
|
613
|
+
width: 100%;
|
|
614
|
+
&-date {
|
|
615
|
+
text-align: center;
|
|
616
|
+
& > view:first-child {
|
|
617
|
+
font-size: 48rpx;
|
|
618
|
+
font-weight: 700;
|
|
619
|
+
}
|
|
620
|
+
& > view:nth-child(2) {
|
|
621
|
+
font-size: 28rpx;
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
&-cutdown {
|
|
625
|
+
position: relative;
|
|
626
|
+
top: 20%;
|
|
627
|
+
font-size: 24rpx;
|
|
628
|
+
& > text {
|
|
629
|
+
display: inline-block;
|
|
630
|
+
width: 40rpx;
|
|
631
|
+
height: 40rpx;
|
|
632
|
+
border-radius: 4rpx;
|
|
633
|
+
background: rgba(255, 255, 255, 1);
|
|
634
|
+
text-align: center;
|
|
635
|
+
vertical-align: middle;
|
|
636
|
+
margin: 0 10rpx;
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
.prod_price {
|
|
641
|
+
display: flex;
|
|
642
|
+
align-items: center;
|
|
643
|
+
margin-top: 18rpx;
|
|
644
|
+
width: 100%;
|
|
645
|
+
justify-content: flex-start;
|
|
646
|
+
|
|
647
|
+
.prod_oldPrice {
|
|
648
|
+
font-size: 22rpx;
|
|
649
|
+
text-decoration: line-through;
|
|
650
|
+
color: #888888;
|
|
651
|
+
margin-left: 10rpx;
|
|
652
|
+
}
|
|
108
653
|
}
|
|
109
654
|
}
|
|
655
|
+
}
|
|
110
656
|
</style>
|
|
@@ -17,14 +17,24 @@
|
|
|
17
17
|
minHeight: layoutInfo.bodyMinHeightRpx + 'rpx'
|
|
18
18
|
}">
|
|
19
19
|
<view class="setting_list">
|
|
20
|
-
<xd-list-item label="已绑实体卡是否失效" :showRight="!showSwitch"
|
|
20
|
+
<xd-list-item label="已绑实体卡是否失效" :showRight="!showSwitch"
|
|
21
21
|
paddingLR="50rpx" paddingTB="32rpx"
|
|
22
|
+
style="margin-bottom: 8rpx;"
|
|
22
23
|
@click="handleToShowSwitch"
|
|
23
24
|
>
|
|
24
25
|
<view v-if="!showSwitch">去配置</view>
|
|
25
|
-
<
|
|
26
|
+
<view v-else class="switch_wrap">
|
|
27
|
+
<view :style="{
|
|
28
|
+
color: cardChecked ? mainColor : '#666666'
|
|
29
|
+
}">{{ cardChecked ? "开启" : "关闭" }}</view>
|
|
30
|
+
<xd-switch :checked="cardChecked" size="small" @change="handleCardChecked"></xd-switch>
|
|
31
|
+
</view>
|
|
26
32
|
</xd-list-item>
|
|
27
|
-
<
|
|
33
|
+
<view class="switch_tip">
|
|
34
|
+
<xd-font-icon size="24" icon="iconmingchengtubiao" style="margin-right: 8rpx;"></xd-font-icon>
|
|
35
|
+
<view>当卡被绑定后,实体卡的卡密与二维码都失效</view>
|
|
36
|
+
</view>
|
|
37
|
+
<xd-list-item :showRight="!phone_number" label="绑定手机号"
|
|
28
38
|
paddingLR="50rpx" paddingTB="32rpx"
|
|
29
39
|
@click="handleToBind"
|
|
30
40
|
>
|
|
@@ -201,6 +211,17 @@
|
|
|
201
211
|
border-radius: 20rpx;
|
|
202
212
|
}
|
|
203
213
|
}
|
|
214
|
+
.switch_wrap{
|
|
215
|
+
display: flex;
|
|
216
|
+
align-items: center;
|
|
217
|
+
}
|
|
218
|
+
.switch_tip{
|
|
219
|
+
display: flex;
|
|
220
|
+
font-size: 24rpx;
|
|
221
|
+
color: #BBBBBB;
|
|
222
|
+
align-items: center;
|
|
223
|
+
padding-left: 80rpx;
|
|
224
|
+
}
|
|
204
225
|
.fixed_bottom{
|
|
205
226
|
position: absolute;
|
|
206
227
|
width: 600rpx;
|