@cloudbase/weda-ui 0.2.16 → 1.0.24
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/README.md +41 -169
- package/package.json +23 -11
- package/src/configs/components/calendar.json +4 -1
- package/src/configs/components/chart/bar.json +724 -0
- package/src/configs/components/chart/line.json +679 -0
- package/src/configs/components/chart/pie.json +497 -0
- package/src/configs/components/chart/statisticsCard.json +61 -13
- package/src/configs/components/container.json +7 -2
- package/src/configs/components/dataView.json +21 -6
- package/src/configs/components/form/checkbox.json +97 -5
- package/src/configs/components/form/radio.json +96 -4
- package/src/configs/components/form/select.json +245 -11
- package/src/configs/components/graphicCard.json +84 -73
- package/src/configs/components/image.json +7 -2
- package/src/configs/components/link.json +19 -3
- package/src/configs/components/listView.json +65 -18
- package/src/configs/components/lottery.json +151 -0
- package/src/configs/components/modal.json +37 -5
- package/src/configs/components/navLayout.json +87 -75
- package/src/configs/components/navigationBar.json +59 -0
- package/src/configs/components/richtextview.json +4 -1
- package/src/configs/components/scrollVeiw.json +74 -22
- package/src/configs/components/swiper.json +4 -1
- package/src/configs/components/tabs.json +51 -8
- package/src/configs/components/text.json +33 -25
- package/src/configs/components/wxOpenApi/phone.json +141 -0
- package/src/configs/components/wxOpenApi/phoneCode.json +121 -0
- package/src/configs/components/wxOpenApi/share.json +167 -0
- package/src/configs/components/wxOpenApi/userInfo.json +174 -0
- package/src/configs/index.js +20 -0
- package/src/index.js +2 -0
- package/src/mp/components/button/index.wxml +1 -2
- package/src/mp/components/chart/bar/index.js +258 -0
- package/src/mp/components/chart/bar/index.json +6 -0
- package/src/mp/components/chart/bar/index.wxml +3 -0
- package/src/mp/components/chart/bar/index.wxss +9 -0
- package/src/mp/components/chart/common/config/bar.js +50 -0
- package/src/mp/components/chart/common/config/global.js +16 -0
- package/src/mp/components/chart/common/config/line.js +48 -0
- package/src/mp/components/chart/common/config/pie.js +36 -0
- package/src/mp/components/chart/common/core/eChartBar.js +263 -0
- package/src/mp/components/chart/common/core/eChartBase.js +375 -0
- package/src/mp/components/chart/common/core/eChartLine.js +229 -0
- package/src/mp/components/chart/common/core/eChartPie.js +166 -0
- package/src/mp/components/chart/common/lib/echarts.min.js +18 -0
- package/src/mp/components/chart/ec-canvas/ec-canvas.js +277 -0
- package/src/mp/components/chart/ec-canvas/ec-canvas.json +4 -0
- package/src/mp/components/chart/ec-canvas/ec-canvas.wxml +4 -0
- package/src/mp/components/chart/ec-canvas/ec-canvas.wxss +4 -0
- package/src/mp/components/chart/ec-canvas/wx-canvas.js +107 -0
- package/src/mp/components/chart/line/index.js +247 -0
- package/src/mp/components/chart/line/index.json +6 -0
- package/src/mp/components/chart/line/index.wxml +3 -0
- package/src/mp/components/chart/line/index.wxss +9 -0
- package/src/mp/components/chart/pie/index.js +182 -0
- package/src/mp/components/chart/pie/index.json +6 -0
- package/src/mp/components/chart/pie/index.wxml +4 -0
- package/src/mp/components/chart/pie/index.wxss +9 -0
- package/src/mp/components/chart/statisticsCard/index.js +33 -6
- package/src/mp/components/form/checkbox/index.js +41 -2
- package/src/mp/components/form/checkbox/index.wxml +1 -1
- package/src/mp/components/form/form/index.wxml +1 -2
- package/src/mp/components/form/input/index.js +1 -1
- package/src/mp/components/form/location/index.js +43 -2
- package/src/mp/components/form/radio/index.js +38 -0
- package/src/mp/components/form/select/index.js +348 -40
- package/src/mp/components/form/select/index.wxml +21 -6
- package/src/mp/components/form/select/region/index.js +101 -0
- package/src/mp/components/form/textarea/index.wxml +6 -5
- package/src/mp/components/form/uploader/index.js +76 -44
- package/src/mp/components/form/uploader/index.wxml +15 -3
- package/src/mp/components/form/uploaderFile/index.js +61 -29
- package/src/mp/components/graphicCard/index.js +26 -28
- package/src/mp/components/listView/index.js +52 -64
- package/src/mp/components/listView/index.wxml +2 -2
- package/src/mp/components/listView/index.wxss +5 -0
- package/src/mp/components/lottery/index.js +270 -0
- package/src/mp/components/lottery/index.json +4 -0
- package/src/mp/components/lottery/index.wxml +43 -0
- package/src/mp/components/lottery/index.wxss +317 -0
- package/src/mp/components/navLayout/index.js +3 -3
- package/src/mp/components/navigationBar/index.js +193 -0
- package/src/mp/components/navigationBar/index.json +6 -0
- package/src/mp/components/navigationBar/index.wxml +88 -0
- package/src/mp/components/navigationBar/index.wxss +1257 -0
- package/src/mp/components/tabs/index.js +7 -2
- package/src/mp/components/tabs/index.wxml +2 -1
- package/src/mp/components/text/index.js +0 -25
- package/src/mp/components/text/index.wxml +3 -3
- package/src/mp/components/wxOpenApi/phone/index.js +117 -0
- package/src/mp/components/wxOpenApi/phone/index.json +4 -0
- package/src/mp/components/wxOpenApi/phone/index.wxml +15 -0
- package/src/mp/components/wxOpenApi/phone/index.wxss +22 -0
- package/src/mp/components/wxOpenApi/phoneCode/index.js +89 -0
- package/src/mp/components/wxOpenApi/phoneCode/index.json +4 -0
- package/src/mp/components/wxOpenApi/phoneCode/index.wxml +15 -0
- package/src/mp/components/wxOpenApi/phoneCode/index.wxss +22 -0
- package/src/mp/components/wxOpenApi/share/index.js +117 -0
- package/src/mp/components/wxOpenApi/share/index.json +4 -0
- package/src/mp/components/wxOpenApi/share/index.wxml +15 -0
- package/src/mp/components/wxOpenApi/share/index.wxss +22 -0
- package/src/mp/components/wxOpenApi/userInfo/index.js +88 -0
- package/src/mp/components/wxOpenApi/userInfo/index.json +4 -0
- package/src/mp/components/wxOpenApi/userInfo/index.wxml +14 -0
- package/src/mp/components/wxOpenApi/userInfo/index.wxss +22 -0
- package/src/mp/index.json +10 -1
- package/src/mp/style/weda-ui.wxss +2 -0
- package/src/mp/utils/constant.js +15 -0
- package/src/mp/utils/destr.js +48 -0
- package/src/mp/utils/lodash.js +2 -0
- package/src/mp/utils/platform.js +25 -0
- package/src/mp/utils/tcb.js +44 -0
- package/src/setupTests.js +2 -1
- package/src/web/components/button/index.css +8 -1
- package/src/web/components/button/index.tsx +3 -2
- package/src/web/components/chart/bar/index.tsx +140 -0
- package/src/web/components/chart/common/config/bar.js +49 -0
- package/src/web/components/chart/common/config/global.js +16 -0
- package/src/web/components/chart/common/config/line.js +50 -0
- package/src/web/components/chart/common/config/pie.js +37 -0
- package/src/web/components/chart/common/core/eChartBar.js +265 -0
- package/src/web/components/chart/common/core/eChartBase.ts +383 -0
- package/src/web/components/chart/common/core/eChartLine.js +231 -0
- package/src/web/components/chart/common/core/eChartPie.js +170 -0
- package/src/web/components/chart/common/core/type.ts +34 -0
- package/src/web/components/chart/common/echart.css +106 -0
- package/src/web/components/chart/common/echarts.ts +33 -0
- package/src/web/components/chart/common/useChart.tsx +69 -0
- package/src/web/components/chart/line/index.tsx +136 -0
- package/src/web/components/chart/pie/index.tsx +99 -0
- package/src/web/components/chart/statisticsCard/index.tsx +29 -8
- package/src/web/components/form/checkbox/index.tsx +61 -23
- package/src/web/components/form/formcell/index.tsx +10 -5
- package/src/web/components/form/location/components/LocationH5/location.h5.jsx +3 -3
- package/src/web/components/form/location/components/LocationPC/location.PC.jsx +2 -2
- package/src/web/components/form/radio/index.tsx +90 -53
- package/src/web/components/form/select/h5.tsx +371 -72
- package/src/web/components/form/select/index.css +10 -0
- package/src/web/components/form/select/index.tsx +392 -145
- package/src/web/components/form/select/region/index.ts +122 -31
- package/src/web/components/form/select/time.jsx +90 -0
- package/src/web/components/form/select/year.tsx +170 -0
- package/src/web/components/form/tips/index.css +4 -0
- package/src/web/components/form/tips/index.tsx +4 -3
- package/src/web/components/form/uploader/uploader.h5.tsx +28 -19
- package/src/web/components/form/uploader/uploader.pc.tsx +17 -20
- package/src/web/components/form/uploaderFile/uploadFile.h5.tsx +48 -44
- package/src/web/components/form/uploaderFile/uploadFile.pc.tsx +28 -26
- package/src/web/components/graphicCard/index.css +1 -5
- package/src/web/components/graphicCard/index.tsx +4 -3
- package/src/web/components/image/image.tsx +1 -1
- package/src/web/components/image/index.tsx +1 -1
- package/src/web/components/index.js +13 -2
- package/src/web/components/link/index.tsx +6 -3
- package/src/web/components/listView/index.css +4 -0
- package/src/web/components/listView/index.tsx +10 -18
- package/src/web/components/lottery/index.css +327 -0
- package/src/web/components/lottery/index.tsx +567 -0
- package/src/web/components/lottery/lotteryUtil.ts +130 -0
- package/src/web/components/modal/index.tsx +3 -1
- package/src/web/components/navigationBar/chevron-right--double.svg +3 -0
- package/src/web/components/navigationBar/common.tsx +198 -0
- package/src/web/components/navigationBar/h5Menu.tsx +179 -0
- package/src/web/components/navigationBar/horizontalMenu.tsx +200 -0
- package/src/web/components/navigationBar/index.css +762 -0
- package/src/web/components/navigationBar/index.tsx +231 -0
- package/src/web/components/navigationBar/type.d.ts +111 -0
- package/src/web/components/navigationBar/verticalMenu.tsx +81 -0
- package/src/web/components/phone/index.css +0 -0
- package/src/web/components/phone/index.tsx +22 -0
- package/src/web/components/phoneCode/index.css +0 -0
- package/src/web/components/phoneCode/index.tsx +22 -0
- package/src/web/components/richTextView/index.tsx +3 -5
- package/src/web/components/share/index.css +0 -0
- package/src/web/components/share/index.tsx +38 -0
- package/src/web/components/tabs/index.tsx +2 -0
- package/src/web/components/tabs/tabs.h5.tsx +43 -33
- package/src/web/components/tabs/tabs.pc.tsx +23 -10
- package/src/web/components/text/index.tsx +6 -14
- package/src/web/components/userInfo/index.css +0 -0
- package/src/web/components/userInfo/index.tsx +30 -0
- package/src/web/utils/{constant.js → constant.ts} +17 -2
- package/src/web/utils/lodash.ts +2 -0
- package/src/web/utils/platform.js +10 -1
- package/src/web/utils/tcb.js +20 -6
- package/src/web/weda-ui.css +2 -0
- package/CHANGELOG.md +0 -240
- package/src/.DS_Store +0 -0
- package/src/configs/.DS_Store +0 -0
- package/src/mp/.gitignore +0 -10
- package/src/web/.DS_Store +0 -0
- package/src/web/components/form/select/region/cities.ts +0 -2410
- package/src/web/components/form/select/region/provinces.ts +0 -240
- package/src/web/components/form/select/region/regions.ts +0 -20645
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
Component({
|
|
2
|
+
/** 页面的初始数据 */
|
|
3
|
+
data: {
|
|
4
|
+
lotteryList: [
|
|
5
|
+
{
|
|
6
|
+
src: '',
|
|
7
|
+
desc: '',
|
|
8
|
+
actived: true,
|
|
9
|
+
selected: false,
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
src: '',
|
|
13
|
+
desc: '',
|
|
14
|
+
actived: false,
|
|
15
|
+
selected: false,
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
src: '',
|
|
19
|
+
desc: '',
|
|
20
|
+
actived: false,
|
|
21
|
+
selected: true,
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
src: '',
|
|
25
|
+
desc: '',
|
|
26
|
+
actived: false,
|
|
27
|
+
selected: false,
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
src: '',
|
|
31
|
+
desc: '',
|
|
32
|
+
actived: false,
|
|
33
|
+
selected: false,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
src: '',
|
|
37
|
+
desc: '',
|
|
38
|
+
actived: false,
|
|
39
|
+
selected: false,
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
src: '',
|
|
43
|
+
desc: '',
|
|
44
|
+
actived: false,
|
|
45
|
+
selected: false,
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
src: '',
|
|
49
|
+
desc: '',
|
|
50
|
+
actived: false,
|
|
51
|
+
selected: false,
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
dotList: [
|
|
55
|
+
{
|
|
56
|
+
single: true,
|
|
57
|
+
position: 'left-top',
|
|
58
|
+
direction: '',
|
|
59
|
+
list: [],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
single: true,
|
|
63
|
+
position: 'left-bottom',
|
|
64
|
+
direction: '',
|
|
65
|
+
list: [],
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
single: true,
|
|
69
|
+
position: 'right-top',
|
|
70
|
+
direction: '',
|
|
71
|
+
list: [],
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
single: true,
|
|
75
|
+
position: 'right-bottom',
|
|
76
|
+
direction: '',
|
|
77
|
+
list: [],
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
single: false,
|
|
81
|
+
position: 'top',
|
|
82
|
+
direction: 'horizontal',
|
|
83
|
+
list: ['1', '2', '3', '4', '5'],
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
single: false,
|
|
87
|
+
position: 'bottom',
|
|
88
|
+
direction: 'horizontal',
|
|
89
|
+
list: ['1', '2', '3', '4', '5'],
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
single: false,
|
|
93
|
+
position: 'left',
|
|
94
|
+
direction: 'vertical',
|
|
95
|
+
list: ['1', '2', '3', '4', '5'],
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
single: false,
|
|
99
|
+
position: 'right',
|
|
100
|
+
direction: 'vertical',
|
|
101
|
+
list: ['1', '2', '3', '4', '5'],
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
btnActived: false,
|
|
105
|
+
clickLotteryEnable: true,
|
|
106
|
+
checkedIndex: -1,
|
|
107
|
+
},
|
|
108
|
+
options: {
|
|
109
|
+
virtualHost: true,
|
|
110
|
+
},
|
|
111
|
+
properties: {
|
|
112
|
+
id: {
|
|
113
|
+
type: String,
|
|
114
|
+
value: '',
|
|
115
|
+
},
|
|
116
|
+
className: {
|
|
117
|
+
type: String,
|
|
118
|
+
value: '',
|
|
119
|
+
},
|
|
120
|
+
style: {
|
|
121
|
+
type: String,
|
|
122
|
+
value: '',
|
|
123
|
+
},
|
|
124
|
+
prizeResult: {
|
|
125
|
+
type: String,
|
|
126
|
+
value: '',
|
|
127
|
+
},
|
|
128
|
+
enablePrize: {
|
|
129
|
+
value: true,
|
|
130
|
+
type: Boolean,
|
|
131
|
+
},
|
|
132
|
+
prizeList: {
|
|
133
|
+
type: Array,
|
|
134
|
+
value: [],
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
methods: {
|
|
138
|
+
clickLotteryButton: function () {
|
|
139
|
+
const { lotteryList } = this.data;
|
|
140
|
+
const { prizeResult, enablePrize, clickLotteryEnable } = this.properties;
|
|
141
|
+
//是否正在抽奖
|
|
142
|
+
if (clickLotteryEnable) {
|
|
143
|
+
this.setData({
|
|
144
|
+
clickLotteryEnable: false,
|
|
145
|
+
});
|
|
146
|
+
} else {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
//支持抽奖
|
|
150
|
+
if (!enablePrize) {
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
//触发外部事件
|
|
154
|
+
this.triggerEvent('clickLotteryButton');
|
|
155
|
+
//动画旋转次数
|
|
156
|
+
let count = 0;
|
|
157
|
+
//是否超时
|
|
158
|
+
let isTimeout = false;
|
|
159
|
+
//开启循环抽奖
|
|
160
|
+
let intervalId = setInterval(() => {
|
|
161
|
+
//再次获取抽奖结果
|
|
162
|
+
let prizeResultNew = this.properties.prizeResult;
|
|
163
|
+
if (prizeResultNew == null || !this.properties.enablePrize) {
|
|
164
|
+
//如果是禁止,立马停止
|
|
165
|
+
clearInterval();
|
|
166
|
+
this.setData({
|
|
167
|
+
clickLotteryEnable: true,
|
|
168
|
+
});
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
//触发抽奖动画
|
|
172
|
+
let index = count % lotteryList.length;
|
|
173
|
+
let tempList = [];
|
|
174
|
+
lotteryList.forEach((item, i) => {
|
|
175
|
+
if (index === i) {
|
|
176
|
+
item.actived = true;
|
|
177
|
+
} else {
|
|
178
|
+
item.actived = false;
|
|
179
|
+
}
|
|
180
|
+
item.selected = false;
|
|
181
|
+
tempList.push(item);
|
|
182
|
+
//如果超时,则终止
|
|
183
|
+
if (isTimeout) {
|
|
184
|
+
let reg = /^\+?[1-9]\d*$/;
|
|
185
|
+
if (!reg.test(prizeResult)) {
|
|
186
|
+
isTimeout = false;
|
|
187
|
+
clearInterval(intervalId);
|
|
188
|
+
wx.showToast({
|
|
189
|
+
title: '网络异常',
|
|
190
|
+
icon: 'none',
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
if (index === parseInt(prizeResultNew) - 1) {
|
|
194
|
+
isTimeout = false;
|
|
195
|
+
this.setData({
|
|
196
|
+
checkedIndex: index,
|
|
197
|
+
});
|
|
198
|
+
clearInterval(intervalId);
|
|
199
|
+
setTimeout(() => {
|
|
200
|
+
this.triggerEvent('finishLottery', {
|
|
201
|
+
prize: prizeResultNew,
|
|
202
|
+
result: lotteryList[i],
|
|
203
|
+
});
|
|
204
|
+
}, 600);
|
|
205
|
+
}
|
|
206
|
+
setTimeout(() => {
|
|
207
|
+
//防止暴力点击误触,影响抽奖可用次数结果,延迟1.5s,才可点击
|
|
208
|
+
this.setData({
|
|
209
|
+
clickLotteryEnable: true,
|
|
210
|
+
});
|
|
211
|
+
}, 1500);
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
let checkedIndex = this.data.checkedIndex;
|
|
215
|
+
this.setData({
|
|
216
|
+
btnActived: checkedIndex < 0,
|
|
217
|
+
lotteryList:
|
|
218
|
+
checkedIndex < 0
|
|
219
|
+
? tempList
|
|
220
|
+
: tempList.map((item, index) => {
|
|
221
|
+
if (index === checkedIndex) {
|
|
222
|
+
item.selected = true;
|
|
223
|
+
} else {
|
|
224
|
+
item.selected = false;
|
|
225
|
+
}
|
|
226
|
+
item.actived = false;
|
|
227
|
+
return item;
|
|
228
|
+
}),
|
|
229
|
+
});
|
|
230
|
+
//设置默认数据
|
|
231
|
+
this.setData({
|
|
232
|
+
checkedIndex: -1,
|
|
233
|
+
});
|
|
234
|
+
count++;
|
|
235
|
+
}, 150);
|
|
236
|
+
setTimeout(() => {
|
|
237
|
+
isTimeout = true;
|
|
238
|
+
}, 3000);
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
observers: {
|
|
242
|
+
prizeList: function (prizeList) {
|
|
243
|
+
//获取初始化默认数据,数据不足8条设置默认,超过8条获取前8条
|
|
244
|
+
let list = [];
|
|
245
|
+
for (let i = 0; i < 8; i++) {
|
|
246
|
+
if (i < prizeList.length) {
|
|
247
|
+
let prize = prizeList[i];
|
|
248
|
+
list.push({
|
|
249
|
+
idx: i + 1,
|
|
250
|
+
selected: false,
|
|
251
|
+
actived: false,
|
|
252
|
+
desc: prize.title,
|
|
253
|
+
src: prize.image,
|
|
254
|
+
});
|
|
255
|
+
} else {
|
|
256
|
+
list.push({
|
|
257
|
+
idx: i + 1,
|
|
258
|
+
selected: false,
|
|
259
|
+
actived: false,
|
|
260
|
+
desc: '',
|
|
261
|
+
src: '',
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
this.setData({
|
|
266
|
+
lotteryList: list,
|
|
267
|
+
});
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<view class="weda-lottery">
|
|
2
|
+
<view class="weda-lottery__wrap">
|
|
3
|
+
<block wx:for="{{dotList}}" wx:key="dotIndex" wx:for-item="dot">
|
|
4
|
+
<view wx-if="{{dot.single}}" class="weda-lottery__dot-single weda-lottery__dot-{{dot.position}}"></view>
|
|
5
|
+
<block wx-if="{{!dot.single}}">
|
|
6
|
+
<view class="weda-lottery__dot-{{dot.position}}">
|
|
7
|
+
<view class="weda-lottery__dot weda-lottery__dot-{{dot.direction}}">
|
|
8
|
+
<block wx:for="{{dot.list}}" wx:key="index" wx:for-item="item">
|
|
9
|
+
<view class="weda-lottery__dot-item"></view>
|
|
10
|
+
</block>
|
|
11
|
+
</view>
|
|
12
|
+
</view>
|
|
13
|
+
</block>
|
|
14
|
+
</block>
|
|
15
|
+
<view class="weda-lottery__inner">
|
|
16
|
+
<view class="weda-lottery__inner-wrap">
|
|
17
|
+
<view class="weda-lottery__list">
|
|
18
|
+
<block wx:for="{{lotteryList}}" wx:key="index" wx:for-item="item">
|
|
19
|
+
<view key="{{index}}" class="weda-lottery__turntable-item {{item.actived ? 'is-actived' : ''}}, {{item.selected ? 'is-selected' : ''}}">
|
|
20
|
+
<view class="weda-lottery__turntable-cell">
|
|
21
|
+
<view class="weda-lottery__turntable-cell-image" wx-if="{{item.src}}">
|
|
22
|
+
<image mode="aspectFit" src="{{item.src}}" alt="{{item.desc}}" class="weda-lottery__turntable-cell-icon"></image>
|
|
23
|
+
</view>
|
|
24
|
+
<view class="weda-lottery__turntable-cell-desc" wx-if="{{item.desc}}">
|
|
25
|
+
{{item.desc}}
|
|
26
|
+
</view>
|
|
27
|
+
</view>
|
|
28
|
+
</view>
|
|
29
|
+
</block>
|
|
30
|
+
</view>
|
|
31
|
+
<view class="weda-lottery__turntable-btn {{btnActived ? 'is-actived' : ''}}">
|
|
32
|
+
<view class="weda-lottery__btn-inner" bindtap="{{clickLotteryEnable ? 'clickLotteryButton' : ''}}">
|
|
33
|
+
<view class="weda-lottery__btn">
|
|
34
|
+
<view class="weda-lottery__btn-image">
|
|
35
|
+
<text class="weda-lottery__btn-text">开始抽奖</text>
|
|
36
|
+
</view>
|
|
37
|
+
</view>
|
|
38
|
+
</view>
|
|
39
|
+
</view>
|
|
40
|
+
</view>
|
|
41
|
+
</view>
|
|
42
|
+
</view>
|
|
43
|
+
</view>
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
.weda-lottery {
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 652rpx;
|
|
4
|
+
position: relative;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.weda-lottery .weda-lottery__wrap {
|
|
8
|
+
position: relative;
|
|
9
|
+
width: 100%;
|
|
10
|
+
height: 652rpx;
|
|
11
|
+
background: #FF465C;
|
|
12
|
+
border: 2rpx solid rgba(255, 255, 255, 0.6);
|
|
13
|
+
box-shadow: inset 0px 0px 8rpx rgba(255, 255, 255, 0.5);
|
|
14
|
+
border-radius: 20rpx;
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.weda-lottery .weda-lottery__dot-top {
|
|
19
|
+
position: absolute;
|
|
20
|
+
top: 8rpx;
|
|
21
|
+
left: calc((100% - 434rpx) / 2);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.weda-lottery .weda-lottery__dot-bottom {
|
|
25
|
+
position: absolute;
|
|
26
|
+
bottom: 8rpx;
|
|
27
|
+
left: calc((100% - 434rpx) / 2);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.weda-lottery .weda-lottery__dot-left {
|
|
31
|
+
position: absolute;
|
|
32
|
+
left: 8rpx;
|
|
33
|
+
top: calc((100% - 434rpx) / 2);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.weda-lottery .weda-lottery__dot-right {
|
|
37
|
+
position: absolute;
|
|
38
|
+
right: 8rpx;
|
|
39
|
+
top: calc((100% - 434rpx) / 2);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.weda-lottery .weda-lottery__dot {
|
|
43
|
+
display: flex;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.weda-lottery .weda-lottery__dot-horizontal {
|
|
47
|
+
flex-direction: row;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.weda-lottery .weda-lottery__dot-vertical {
|
|
51
|
+
flex-direction: column;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.weda-lottery .weda-lottery__dot .weda-lottery__dot-item,
|
|
55
|
+
.weda-lottery .weda-lottery__dot-single {
|
|
56
|
+
width: 18rpx;
|
|
57
|
+
height: 18rpx;
|
|
58
|
+
box-shadow: 0px 0px 8rpx rgba(255, 255, 255, 0.3);
|
|
59
|
+
border-radius: 50%;
|
|
60
|
+
background: #FFFFFF;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.weda-lottery .weda-lottery__dot .weda-lottery__dot-item:nth-child(odd) {
|
|
64
|
+
background: #FFEE52;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.weda-lottery .weda-lottery__dot .weda-lottery__dot-item:nth-child(even) {
|
|
68
|
+
background: #FFFFFF
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.weda-lottery .weda-lottery__dot-horizontal .weda-lottery__dot-item {
|
|
72
|
+
margin-right: 86rpx;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.weda-lottery .weda-lottery__dot-horizontal .weda-lottery__dot-item:last-child {
|
|
76
|
+
margin-right: 0;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.weda-lottery .weda-lottery__dot-vertical .weda-lottery__dot-item {
|
|
80
|
+
margin-bottom: 86rpx;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.weda-lottery .weda-lottery__dot-vertical .weda-lottery__dot-item:last-child {
|
|
84
|
+
margin-bottom: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.weda-lottery .weda-lottery__dot-left-top {
|
|
88
|
+
position: absolute;
|
|
89
|
+
top: 18rpx;
|
|
90
|
+
left: 12rpx;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.weda-lottery .weda-lottery__dot-right-top {
|
|
94
|
+
position: absolute;
|
|
95
|
+
top: 18rpx;
|
|
96
|
+
right: 12rpx;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.weda-lottery .weda-lottery__dot-left-bottom {
|
|
100
|
+
position: absolute;
|
|
101
|
+
left: 12rpx;
|
|
102
|
+
bottom: 18rpx;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.weda-lottery .weda-lottery__dot-right-bottom {
|
|
106
|
+
position: absolute;
|
|
107
|
+
right: 12rpx;
|
|
108
|
+
bottom: 18rpx;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.weda-lottery .weda-lottery__inner {
|
|
112
|
+
padding: 36rpx;
|
|
113
|
+
width: 100%;
|
|
114
|
+
height: 100%;
|
|
115
|
+
box-sizing: border-box;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__inner-wrap {
|
|
119
|
+
position: relative;
|
|
120
|
+
width: 100%;
|
|
121
|
+
box-sizing: border-box;
|
|
122
|
+
background: linear-gradient(180deg, #DD0D00 0%, #D80027 100%);
|
|
123
|
+
border: 2rpx solid rgba(255, 255, 255, 0.25);
|
|
124
|
+
box-shadow: inset 0px 0px 8rpx rgba(255, 255, 255, 0.5);
|
|
125
|
+
border-radius: 20rpx;
|
|
126
|
+
height: 100%;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__list {
|
|
130
|
+
position: absolute;
|
|
131
|
+
top: 0;
|
|
132
|
+
left: 0;
|
|
133
|
+
right: 0;
|
|
134
|
+
bottom: 0;
|
|
135
|
+
z-index: 1;
|
|
136
|
+
box-sizing: border-box;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item {
|
|
140
|
+
position: absolute;
|
|
141
|
+
width: calc((100% - 64rpx) / 3);
|
|
142
|
+
height: calc((100% - 64rpx) / 3);
|
|
143
|
+
font-size: 0;
|
|
144
|
+
text-align: center;
|
|
145
|
+
background: #FFF8EE;
|
|
146
|
+
box-shadow: inset 0px -4rpx 0px #FFDDBD;
|
|
147
|
+
border-radius: 16rpx;
|
|
148
|
+
box-sizing: border-box;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item.is-actived {
|
|
152
|
+
background: #FFF8EE;
|
|
153
|
+
box-shadow: 0px 0px 12rpx #FFFFFF;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item.is-selected {
|
|
157
|
+
background: #FF6666;
|
|
158
|
+
box-shadow: inset 0px -4rpx 0px #FFA4A4;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:first-child {
|
|
162
|
+
top: 16rpx;
|
|
163
|
+
left: 16rpx;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(2) {
|
|
167
|
+
top: 16rpx;
|
|
168
|
+
left: calc((100% - 64rpx) / 3 + 32rpx);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(3) {
|
|
172
|
+
top: 16rpx;
|
|
173
|
+
right: 16rpx;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(4) {
|
|
177
|
+
top: calc((100% - 64rpx) / 3 + 32rpx);
|
|
178
|
+
right: 16rpx;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(5) {
|
|
182
|
+
bottom: 16rpx;
|
|
183
|
+
right: 16rpx;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(6) {
|
|
187
|
+
bottom: 16rpx;
|
|
188
|
+
left: calc((100% - 64rpx) / 3 + 32rpx);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(7) {
|
|
192
|
+
bottom: 16rpx;
|
|
193
|
+
left: 16rpx;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item:nth-child(8) {
|
|
197
|
+
bottom: calc((100% - 64rpx) / 3 + 32rpx);
|
|
198
|
+
left: 16rpx;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-cell {
|
|
202
|
+
width: 100%;
|
|
203
|
+
height: 100%;
|
|
204
|
+
max-width: 100%;
|
|
205
|
+
max-height: 100%;
|
|
206
|
+
box-sizing: border-box;
|
|
207
|
+
border-width: 8rpx;
|
|
208
|
+
border-style: solid;
|
|
209
|
+
border-color: transparent;
|
|
210
|
+
border-radius: 16rpx;
|
|
211
|
+
display: flex;
|
|
212
|
+
flex-direction: column;
|
|
213
|
+
align-items: center;
|
|
214
|
+
justify-content: center;
|
|
215
|
+
padding: 16rpx 5rpx 16rpx 5rpx;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item.is-actived .weda-lottery__turntable-cell {
|
|
219
|
+
border-color: #FFE05F;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-cell-image {
|
|
223
|
+
height: 80rpx;
|
|
224
|
+
display: flex;
|
|
225
|
+
align-items: center;
|
|
226
|
+
justify-content: center;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-cell-icon {
|
|
230
|
+
display: block;
|
|
231
|
+
width: 80rpx;
|
|
232
|
+
height: 80rpx;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-cell-desc {
|
|
236
|
+
margin-top: 12rpx;
|
|
237
|
+
font-weight: 400;
|
|
238
|
+
font-size: 24rpx;
|
|
239
|
+
line-height: 34rpx;
|
|
240
|
+
text-align: center;
|
|
241
|
+
color: #BA0000;
|
|
242
|
+
white-space: nowrap;
|
|
243
|
+
text-overflow: ellipsis;
|
|
244
|
+
overflow: hidden;
|
|
245
|
+
width: 100%;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.weda-lottery .weda-lottery__inner .weda-lottery__turntable-item.is-selected .weda-lottery__turntable-cell-desc {
|
|
249
|
+
color: #FFFFFF;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.weda-lottery .weda-lottery__turntable-btn {
|
|
253
|
+
z-index: 2;
|
|
254
|
+
position: absolute;
|
|
255
|
+
width: calc((100% - 64rpx) / 3);
|
|
256
|
+
height: calc((100% - 64rpx) / 3);
|
|
257
|
+
top: calc((100% - 64rpx) / 3 + 32rpx);
|
|
258
|
+
left: calc((100% - 64rpx) / 3 + 32rpx);
|
|
259
|
+
background: linear-gradient(180deg, #FFEE81 0%, #FFD646 100%);
|
|
260
|
+
box-shadow: inset 0px -4rpx 0px #FF7A00;
|
|
261
|
+
border-radius: 50%;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.weda-lottery .weda-lottery__turntable-btn.is-actived {
|
|
265
|
+
background: linear-gradient(180deg, #FFEE81 0%, #FFD646 100%);
|
|
266
|
+
box-shadow: inset 0px 4rpx 0px #FFFFFF;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.weda-lottery .weda-lottery__btn-inner {
|
|
270
|
+
padding: 18rpx;
|
|
271
|
+
width: 100%;
|
|
272
|
+
height: 100%;
|
|
273
|
+
box-sizing: border-box;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.weda-lottery .weda-lottery__btn {
|
|
277
|
+
width: 100%;
|
|
278
|
+
height: 100%;
|
|
279
|
+
background: linear-gradient(180deg, #FF922D 0%, #FF3C76 100%);
|
|
280
|
+
box-shadow: inset 0px 0px 16rpx rgba(234, 27, 53, 0.5);
|
|
281
|
+
border-radius: 50%;
|
|
282
|
+
display: flex;
|
|
283
|
+
align-items: center;
|
|
284
|
+
justify-content: center;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.weda-lottery .weda-lottery__turntable-btn.is-actived .weda-lottery__btn {
|
|
288
|
+
background: linear-gradient(180deg, #FF922D 0%, #FF3C76 100%);
|
|
289
|
+
box-shadow: inset 0px 0px 16rpx rgba(234, 27, 53, 0.5);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.weda-lottery .weda-lottery__btn-image {
|
|
293
|
+
padding: 22rpx 30rpx;
|
|
294
|
+
width: 100%;
|
|
295
|
+
box-sizing: border-box;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.weda-lottery .weda-lottery__btn-image .weda-lottery__btn-text {
|
|
299
|
+
font-weight: 600;
|
|
300
|
+
font-size: 18px;
|
|
301
|
+
line-height: 22px;
|
|
302
|
+
text-align: center;
|
|
303
|
+
color: #FFFFFF;
|
|
304
|
+
text-shadow: 0px 0.5px 0px #E42B27;
|
|
305
|
+
max-height: 100%;
|
|
306
|
+
display: -webkit-box;
|
|
307
|
+
overflow: hidden;
|
|
308
|
+
text-overflow: ellipsis;
|
|
309
|
+
-webkit-box-orient: vertical;
|
|
310
|
+
-webkit-line-clamp: 2;
|
|
311
|
+
width: 100%;
|
|
312
|
+
height: 100%;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.weda-lottery .weda-lottery__turntable-btn.is-actived .weda-lottery__btn-image {
|
|
316
|
+
opacity: 0.6;
|
|
317
|
+
}
|
|
@@ -64,12 +64,12 @@ Component({
|
|
|
64
64
|
}
|
|
65
65
|
item.paramObj = paramObj;
|
|
66
66
|
if (item.withParams && item.params.length > 0) {
|
|
67
|
-
wx.
|
|
67
|
+
wx.redirectTo({
|
|
68
68
|
url:
|
|
69
69
|
'/pages/' + item?.insideUrl + '/index?' + item.paramObj.join('&'),
|
|
70
70
|
});
|
|
71
71
|
} else {
|
|
72
|
-
wx.
|
|
72
|
+
wx.redirectTo({
|
|
73
73
|
url: '/pages/' + item?.insideUrl + '/index',
|
|
74
74
|
});
|
|
75
75
|
}
|
|
@@ -113,7 +113,7 @@ Component({
|
|
|
113
113
|
|
|
114
114
|
// 添加对齐属性
|
|
115
115
|
if (fontWeight !== '') {
|
|
116
|
-
titleStyle = `${titleStyle};font-weight: ${fontWeight};font-size:${fontSize};line-height:${
|
|
116
|
+
titleStyle = `${titleStyle};font-weight: ${fontWeight};font-size:${fontSize}px;line-height:${
|
|
117
117
|
lineHeight == 'auto' ? 'normal' : lineHeight
|
|
118
118
|
}`;
|
|
119
119
|
}
|