@xtdev/xt-miniprogram-ui 1.2.80 → 1.2.82
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.
|
@@ -73,12 +73,16 @@ Component({
|
|
|
73
73
|
* 启动时钟
|
|
74
74
|
*/
|
|
75
75
|
startClock() {
|
|
76
|
-
const {watermarkData} = this.properties;
|
|
77
|
-
const {currentTime = Date.now()} = watermarkData;
|
|
76
|
+
const { watermarkData } = this.properties;
|
|
77
|
+
const { currentTime = Date.now() } = watermarkData;
|
|
78
|
+
// 计算currentTime 与当前时间的时差
|
|
79
|
+
const timeDifference = Date.now() - new Date(currentTime).getTime();
|
|
78
80
|
const updateTime = () => {
|
|
79
|
-
const now = new Date(
|
|
81
|
+
const now = new Date(Date.now() - timeDifference);
|
|
80
82
|
const hours = String(now.getHours()).padStart(2, '0');
|
|
81
83
|
const minutes = String(now.getMinutes()).padStart(2, '0');
|
|
84
|
+
// 秒
|
|
85
|
+
// const seconds = String(now.getSeconds()).padStart(2, '0');
|
|
82
86
|
const year = now.getFullYear();
|
|
83
87
|
const month = String(now.getMonth() + 1).padStart(2, '0');
|
|
84
88
|
const day = String(now.getDate()).padStart(2, '0');
|
|
@@ -93,7 +97,6 @@ Component({
|
|
|
93
97
|
this.clockInterval = setInterval(updateTime, 1000);
|
|
94
98
|
},
|
|
95
99
|
|
|
96
|
-
|
|
97
100
|
/**
|
|
98
101
|
* 拍照
|
|
99
102
|
*/
|
|
@@ -10,19 +10,17 @@
|
|
|
10
10
|
background-color: #000;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
// 相机区域
|
|
14
13
|
.camera-section {
|
|
15
14
|
width: 100%;
|
|
16
15
|
height: 100%;
|
|
17
16
|
position: relative;
|
|
17
|
+
}
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
19
|
+
.camera-section .camera {
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: 100%;
|
|
23
22
|
}
|
|
24
23
|
|
|
25
|
-
// 水印预览层
|
|
26
24
|
.watermark-preview-layer {
|
|
27
25
|
position: absolute;
|
|
28
26
|
top: 0;
|
|
@@ -35,33 +33,31 @@
|
|
|
35
33
|
justify-content: flex-end;
|
|
36
34
|
}
|
|
37
35
|
|
|
38
|
-
// 标签容器(在info-container上方)
|
|
39
36
|
.tag-container {
|
|
40
37
|
display: flex;
|
|
41
38
|
align-items: center;
|
|
42
39
|
margin-left: 16rpx;
|
|
43
40
|
margin-bottom: 16rpx;
|
|
41
|
+
}
|
|
44
42
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
43
|
+
.tag-container .tag-label {
|
|
44
|
+
padding: 12rpx 24rpx;
|
|
45
|
+
background-color: #7b2d8e;
|
|
46
|
+
color: #fff;
|
|
47
|
+
font-size: 40rpx;
|
|
48
|
+
font-weight: bold;
|
|
49
|
+
border-radius: 8rpx 0 0 8rpx;
|
|
50
|
+
}
|
|
53
51
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
52
|
+
.tag-container .tag-time {
|
|
53
|
+
padding: 12rpx 24rpx;
|
|
54
|
+
background-color: #fff;
|
|
55
|
+
color: #333;
|
|
56
|
+
font-size: 40rpx;
|
|
57
|
+
font-weight: bold;
|
|
58
|
+
border-radius: 0 8rpx 8rpx 0;
|
|
62
59
|
}
|
|
63
60
|
|
|
64
|
-
// 底部信息区
|
|
65
61
|
.info-container {
|
|
66
62
|
background: linear-gradient(90deg, #000000 0%, rgba(0, 0, 0, 0) 100%);
|
|
67
63
|
opacity: 0.5;
|
|
@@ -79,18 +75,18 @@
|
|
|
79
75
|
flex-wrap: wrap;
|
|
80
76
|
line-height: 34rpx;
|
|
81
77
|
margin-bottom: 2rpx;
|
|
78
|
+
}
|
|
82
79
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
80
|
+
.info-row.name-row {
|
|
81
|
+
line-height: 56rpx;
|
|
82
|
+
}
|
|
86
83
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
84
|
+
.info-row.business-row {
|
|
85
|
+
line-height: 42rpx;
|
|
90
86
|
}
|
|
91
87
|
|
|
92
88
|
.name-text {
|
|
93
|
-
color: #
|
|
89
|
+
color: #ffffff;
|
|
94
90
|
font-size: 40rpx;
|
|
95
91
|
font-weight: bold;
|
|
96
92
|
}
|
|
@@ -121,7 +117,6 @@
|
|
|
121
117
|
margin-right: 8rpx;
|
|
122
118
|
}
|
|
123
119
|
|
|
124
|
-
// 拍照按钮
|
|
125
120
|
.shutter-area {
|
|
126
121
|
position: absolute;
|
|
127
122
|
bottom: 40rpx;
|
|
@@ -142,66 +137,64 @@
|
|
|
142
137
|
justify-content: center;
|
|
143
138
|
align-items: center;
|
|
144
139
|
border: 6rpx solid #fff;
|
|
140
|
+
}
|
|
145
141
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
142
|
+
.shutter-btn .shutter-inner {
|
|
143
|
+
width: 100rpx;
|
|
144
|
+
height: 100rpx;
|
|
145
|
+
border-radius: 50%;
|
|
146
|
+
background-color: #fff;
|
|
147
|
+
}
|
|
152
148
|
|
|
153
|
-
|
|
154
|
-
|
|
149
|
+
.shutter-btn:active {
|
|
150
|
+
transform: scale(0.95);
|
|
151
|
+
}
|
|
155
152
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
}
|
|
159
|
-
}
|
|
153
|
+
.shutter-btn:active .shutter-inner {
|
|
154
|
+
background-color: #ddd;
|
|
160
155
|
}
|
|
161
156
|
|
|
162
|
-
// 预览区域
|
|
163
157
|
.preview-section {
|
|
164
158
|
width: 100%;
|
|
165
159
|
height: 100%;
|
|
166
160
|
display: flex;
|
|
167
161
|
flex-direction: column;
|
|
168
162
|
background-color: #000;
|
|
163
|
+
}
|
|
169
164
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
165
|
+
.preview-section .preview-image {
|
|
166
|
+
flex: 1;
|
|
167
|
+
width: 100%;
|
|
168
|
+
}
|
|
174
169
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
170
|
+
.preview-section .preview-buttons {
|
|
171
|
+
display: flex;
|
|
172
|
+
padding: 30rpx 40rpx;
|
|
173
|
+
padding-bottom: calc(30rpx + env(safe-area-inset-bottom));
|
|
174
|
+
background-color: #000;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.preview-section .preview-buttons .btn-retake,
|
|
178
|
+
.preview-section .preview-buttons .btn-confirm {
|
|
179
|
+
flex: 1;
|
|
180
|
+
height: 88rpx;
|
|
181
|
+
line-height: 88rpx;
|
|
182
|
+
text-align: center;
|
|
183
|
+
font-size: 32rpx;
|
|
184
|
+
border-radius: 44rpx;
|
|
185
|
+
margin: 0 20rpx;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.preview-section .preview-buttons .btn-retake {
|
|
189
|
+
background-color: #333;
|
|
190
|
+
color: #fff;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.preview-section .preview-buttons .btn-confirm {
|
|
194
|
+
background-color: #7b2d8e;
|
|
195
|
+
color: #fff;
|
|
202
196
|
}
|
|
203
197
|
|
|
204
|
-
// 离屏Canvas
|
|
205
198
|
.offscreen-canvas {
|
|
206
199
|
position: fixed;
|
|
207
200
|
left: -9999rpx;
|
|
@@ -210,7 +203,6 @@
|
|
|
210
203
|
height: 1px;
|
|
211
204
|
}
|
|
212
205
|
|
|
213
|
-
// 加载提示
|
|
214
206
|
.loading-overlay {
|
|
215
207
|
position: absolute;
|
|
216
208
|
top: 0;
|