@uxda/appkit 1.2.69 → 1.2.71

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/dist/appkit.css CHANGED
@@ -9,15 +9,25 @@
9
9
  width: 100%;
10
10
  }
11
11
  .user-entry-head {
12
+ position: relative;
12
13
  width: 65px;
13
14
  height: 65px;
14
- border-radius: 50%;
15
- overflow: hidden;
16
- margin-right: 5px;
15
+ margin-right: 8px;
17
16
  }
18
17
  .user-entry-head-img {
19
18
  width: 100%;
20
19
  height: 100%;
20
+ overflow: hidden;
21
+ border-radius: 50%;
22
+ }
23
+ .user-entry-head-icon {
24
+ position: absolute;
25
+ width: 15px;
26
+ height: 15px;
27
+ bottom: 2px;
28
+ left: 48px;
29
+ background: url("https://cdn.ddjf.com/static/images/wx-yunservice/edit-icon.png") center;
30
+ background-size: cover;
21
31
  }
22
32
  .user-entry-bd {
23
33
  color: #fff;
@@ -28,7 +38,7 @@
28
38
  font-size: 20px;
29
39
  font-weight: 500;
30
40
  line-height: 28px;
31
- margin-left: 15px;
41
+ margin-left: 10px;
32
42
  }
33
43
  .user-entry-bd-bigtxt-icon {
34
44
  width: 20px;
@@ -37,6 +47,7 @@
37
47
  font-size: 20px;
38
48
  font-weight: 500;
39
49
  line-height: 25px;
50
+ margin-bottom: 5px;
40
51
  }
41
52
  .user-entry-bd-smalltxt {
42
53
  margin-top: 0;
@@ -44,20 +55,178 @@
44
55
  line-height: 21px;
45
56
  }
46
57
 
47
-
58
+ .user-info {
59
+ padding: 0 12px;
60
+ padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
61
+ }
62
+ .user-info-tit {
63
+ height: 38px;
64
+ display: flex;
65
+ align-items: center;
66
+ color: #666666;
67
+ font-size: 12px;
68
+ padding-left: 10px;
69
+ }
70
+ .user-info-head {
71
+ border-radius: 5px;
72
+ background: #fff;
73
+ padding: 60px 11px 0;
74
+ }
75
+ .user-info-head-avatar {
76
+ position: relative;
77
+ width: 80px;
78
+ height: 80px;
79
+ margin: 0 auto 60px;
80
+ }
81
+ .user-info-head-img {
82
+ width: 100%;
83
+ height: 100%;
84
+ overflow: hidden;
85
+ border-radius: 50%;
86
+ }
87
+ .user-info-head-upload {
88
+ position: absolute;
89
+ bottom: -2px;
90
+ left: 52px;
91
+ width: 29px;
92
+ height: 29px;
93
+ background: #333333;
94
+ overflow: hidden;
95
+ border-radius: 50%;
96
+ display: flex;
97
+ align-items: center;
98
+ justify-content: center;
99
+ }
100
+ .user-info-head-upload-icon {
101
+ width: 17px;
102
+ height: 17px;
103
+ }
104
+ .user-info-team-item {
105
+ border-radius: 5px;
106
+ background: #fff;
107
+ display: flex;
108
+ padding: 15px;
109
+ margin-bottom: 10px;
110
+ }
111
+ .user-info-team-item-avatar {
112
+ width: 38px;
113
+ height: 38px;
114
+ margin-right: 15px;
115
+ border-radius: 5px;
116
+ }
117
+ .user-info-team-item-avatar-img {
118
+ width: 100%;
119
+ height: 100%;
120
+ }
121
+ .user-info-team-item-title {
122
+ font-size: 16px;
123
+ font-weight: 500;
124
+ margin-bottom: 5px;
125
+ }
126
+ .user-info-team-item-app {
127
+ margin-bottom: 8px;
128
+ display: flex;
129
+ align-items: center;
130
+ }
131
+ .user-info-team-item-app-tag {
132
+ border: 1px solid rgba(53, 53, 53, 0.2);
133
+ font-size: 10px;
134
+ height: 18px;
135
+ display: inline-flex;
136
+ align-items: center;
137
+ justify-content: center;
138
+ padding: 0 6px;
139
+ border-radius: 2px;
140
+ margin-right: 20px;
141
+ }
142
+ .user-info-team-item-bd {
143
+ flex: 1;
144
+ }
145
+ .user-info-team-item-role-btn {
146
+ color: var(--app-primary-color, #017fff);
147
+ font-size: 10px;
148
+ display: inline-flex;
149
+ align-items: center;
150
+ }
151
+ .user-info-team-item-role-btn-icon {
152
+ width: 12px;
153
+ height: 12px;
154
+ position: relative;
155
+ top: 1px;
156
+ }
157
+ .user-info-team-item-role-btn-icon.showRole {
158
+ transform: rotate(180deg);
159
+ }
160
+ .user-info-team-item-role-item {
161
+ display: flex;
162
+ font-size: 10px;
163
+ padding: 10px;
164
+ background: rgba(245, 245, 245, 0.5);
165
+ border-radius: 5px;
166
+ margin-bottom: 10px;
167
+ }
168
+ .user-info-team-item-role-item-name {
169
+ opacity: 0.5;
170
+ white-space: nowrap;
171
+ margin-right: 10px;
172
+ }
173
+ .user-info-team-item-role-item-info {
174
+ flex: 1;
175
+ color: #1a1a1a;
176
+ }
177
+ .user-info-team-item-user {
178
+ margin-bottom: 4px;
179
+ font-size: 12px;
180
+ display: flex;
181
+ align-items: center;
182
+ }
183
+ .user-info-team-item-user-icon {
184
+ width: 10px;
185
+ height: 10px;
186
+ margin-left: 4px;
187
+ }
188
+ .user-info-team-item-dept {
189
+ font-size: 10px;
190
+ color: rgba(26, 26, 26, 0.8);
191
+ }
192
+ .user-info-ft-btn {
193
+ width: 100%;
194
+ border-color: transparent !important;
195
+ color: rgba(27, 63, 107, 0.8) !important;
196
+ }
197
+ .user-info .nut-cell {
198
+ padding-top: 11px;
199
+ padding-bottom: 11px;
200
+ box-shadow: none;
201
+ border-bottom: 1px solid #f0f0f0;
202
+ }
48
203
  .user-feedback {
49
204
  margin: 10px 12px;
50
- border-radius: 5px;
205
+ padding-bottom: calc(75px + env(safe-area-inset-bottom, 0px));
206
+ height: 100vh;
207
+ box-sizing: border-box;
208
+ overflow: hidden;
209
+ }
210
+ .user-feedback-wrap {
211
+ height: 100%;
51
212
  background: #fff;
213
+ display: flex;
214
+ flex-direction: column;
215
+ box-sizing: border-box;
52
216
  padding: 10px;
217
+ border-radius: 5px;
53
218
  }
54
219
  .user-feedback-head {
55
- color: #f2f9ff;
220
+ background: #f2f9ff;
56
221
  padding: 15px;
57
222
  border-radius: 2px;
58
223
  font-size: 12px;
59
224
  margin-bottom: 8px;
60
225
  }
226
+ .user-feedback-head-info {
227
+ padding-left: 9px;
228
+ text-indent: -9px;
229
+ }
61
230
  .user-feedback-tit {
62
231
  height: 44px;
63
232
  display: flex;
@@ -67,26 +236,218 @@
67
236
  font-size: 17px;
68
237
  }
69
238
  .user-feedback-body {
239
+ flex: 1;
70
240
  background: #f5f5f5;
71
241
  border-radius: 4px 4px 0px 0px;
242
+ display: flex;
243
+ flex-direction: column;
244
+ overflow: hidden;
72
245
  }
73
246
  .user-feedback-handle {
74
247
  border: 1px solid rgba(138, 138, 138, 0.1019607843);
75
248
  background: #ffffff;
76
- height: 60px;
249
+ height: 30px;
77
250
  display: flex;
78
251
  align-items: center;
79
252
  padding: 3px 10px;
253
+ border-radius: 4px 4px 0 0;
80
254
  }
81
255
  .user-feedback-handle-item {
82
256
  border-radius: 4px;
83
- background: #d9d9d9;
84
257
  color: #838383;
258
+ font-size: 12px;
85
259
  padding: 0 5px;
260
+ height: 24px;
86
261
  display: flex;
87
262
  align-items: center;
88
263
  }
89
-
264
+ .user-feedback-handle-item-icon {
265
+ width: 18px;
266
+ height: 18px;
267
+ margin-right: 6px;
268
+ }
269
+ .user-feedback-handle-item:active {
270
+ background: rgba(217, 217, 217, 0.2);
271
+ }
272
+ .user-feedback-editor {
273
+ padding: 10px;
274
+ font-size: 14px;
275
+ flex: 1;
276
+ overflow-y: auto;
277
+ }
278
+ .user-feedback .ql-editor.ql-blank:before {
279
+ color: rgba(0, 0, 0, 0.3);
280
+ font-style: normal;
281
+ }
282
+ .user-feedback-footer {
283
+ position: fixed;
284
+ z-index: 10;
285
+ bottom: 0;
286
+ left: 0;
287
+ width: 100%;
288
+ min-height: 63px;
289
+ background: #ffffff;
290
+ box-shadow: 0 -3px 11px 0 rgba(224, 224, 224, 0.5);
291
+ padding: 10px 12px calc(8px + env(safe-area-inset-bottom, 0px));
292
+ display: flex;
293
+ justify-content: space-between;
294
+ box-sizing: border-box;
295
+ }
296
+ .user-feedback-footer-btn {
297
+ flex: 1;
298
+ }
299
+ .user-feedback-footer-btn:first-child {
300
+ margin-right: 10px;
301
+ }
302
+ .user-head-crop {
303
+ height: 100vh;
304
+ }
305
+ .user-head-crop-btns {
306
+ position: absolute;
307
+ bottom: 0;
308
+ left: 0;
309
+ width: 100%;
310
+ height: 50px;
311
+ padding: 0 20px;
312
+ box-sizing: border-box;
313
+ line-height: 50px;
314
+ }
315
+ .user-head-crop .cbtn {
316
+ color: #fff;
317
+ }
318
+ .user-head-crop .comfirmBtn {
319
+ color: var(--app-primary-color, #017fff);
320
+ }
321
+ .bt-container {
322
+ display: flex;
323
+ flex-direction: column;
324
+ justify-content: space-between;
325
+ height: 100%;
326
+ box-sizing: border-box;
327
+ background-color: #0e1319;
328
+ position: relative;
329
+ overflow: hidden;
330
+ }
331
+ .bt-container .iconfont {
332
+ position: absolute;
333
+ z-index: 999;
334
+ top: 20px;
335
+ font-size: 15px;
336
+ padding: 5px;
337
+ background-color: rgba(255, 255, 255, 0.2);
338
+ border-radius: 50%;
339
+ color: #ffffff;
340
+ }
341
+ .bt-container .iconfont.active {
342
+ color: #007aff;
343
+ }
344
+ .bt-container .icon-replay {
345
+ right: 20px;
346
+ }
347
+ .bt-container .bt-canvas {
348
+ position: absolute;
349
+ left: 100%;
350
+ top: 0;
351
+ width: 300px;
352
+ height: 300px;
353
+ }
354
+ .bt-container .mainContent {
355
+ flex: 1;
356
+ margin: 30px;
357
+ position: relative;
358
+ }
359
+ .bt-container .mainContent .image {
360
+ position: absolute;
361
+ transform-origin: center center;
362
+ }
363
+ .bt-container .mainContent .controller {
364
+ position: absolute;
365
+ z-index: 99;
366
+ padding: 10px;
367
+ }
368
+ .bt-container .mainContent .controller::after {
369
+ display: block;
370
+ content: "";
371
+ box-shadow: 0 0 5px #333;
372
+ background-color: #e4e7ed;
373
+ }
374
+ .bt-container .mainContent .controller.controller_dot::after {
375
+ width: 20px;
376
+ height: 20px;
377
+ border-radius: 99px;
378
+ }
379
+ .bt-container .mainContent .controller.vertical::after {
380
+ width: 5px;
381
+ height: 20px;
382
+ }
383
+ .bt-container .mainContent .controller.horizon::after {
384
+ width: 20px;
385
+ height: 5px;
386
+ }
387
+ .bt-container .mainContent .cropper {
388
+ position: absolute;
389
+ border: 1px solid #eee;
390
+ box-sizing: content-box;
391
+ transform-origin: center center;
392
+ outline: 999px solid rgba(0, 0, 0, 0.5);
393
+ will-change: transform;
394
+ display: contain;
395
+ pointer-events: none;
396
+ }
397
+ .bt-container .mainContent .cropper .line {
398
+ position: absolute;
399
+ }
400
+ .bt-container .mainContent .cropper .row {
401
+ width: 100%;
402
+ height: 0px;
403
+ left: 0;
404
+ border-top: 1px dashed #007aff;
405
+ }
406
+ .bt-container .mainContent .cropper .col {
407
+ height: 100%;
408
+ width: 0px;
409
+ border-left: 1px dashed #007aff;
410
+ }
411
+ .bt-container .mainContent .cropper .row1 {
412
+ top: 33%;
413
+ }
414
+ .bt-container .mainContent .cropper .row2 {
415
+ top: 66%;
416
+ }
417
+ .bt-container .mainContent .cropper .col1 {
418
+ left: 33%;
419
+ }
420
+ .bt-container .mainContent .cropper .col2 {
421
+ left: 66%;
422
+ }
423
+ .bt-container .slot {
424
+ position: relative;
425
+ padding-top: 10px;
426
+ }
427
+ .user-feedback-entry {
428
+ position: fixed;
429
+ right: 12px;
430
+ bottom: calc(120px + env(safe-area-inset-bottom, 0px));
431
+ display: flex;
432
+ flex-direction: column;
433
+ align-items: center;
434
+ justify-content: center;
435
+ background: #fff;
436
+ box-shadow: 0px 2px 5px 0px rgba(0, 110, 229, 0.1019607843);
437
+ width: 40px;
438
+ height: 40px;
439
+ border-radius: 50%;
440
+ color: rgba(0, 0, 0, 0.5);
441
+ font-size: 10px;
442
+ }
443
+ .user-feedback-entry-icon {
444
+ width: 13px;
445
+ height: 13px;
446
+ margin-bottom: 1px;
447
+ }
448
+ .user-feedback-entry:active {
449
+ background: rgba(255, 255, 255, 0.7);
450
+ }
90
451
  .amount-picker {
91
452
  padding: 14px 0 14px 14px;
92
453
  }
package/dist/index.js CHANGED
@@ -4130,7 +4130,7 @@ function useCommonList(api, query, showLoading = true, method = "GET") {
4130
4130
  isLast.value = res.pageNum >= pages;
4131
4131
  total.value = res.total;
4132
4132
  }
4133
- return res?.list || [];
4133
+ return (res || {}).list || [];
4134
4134
  }
4135
4135
  async function runNext() {
4136
4136
  if (isLast.value)
@@ -4227,7 +4227,9 @@ var script = /* @__PURE__ */ defineComponent({
4227
4227
  props: {
4228
4228
  app: { type: String, required: true, default: "" },
4229
4229
  userId: { type: String, required: true, default: "" },
4230
- showAppLabel: { type: Boolean, required: false, default: false }
4230
+ showApp: { type: Boolean, required: false, default: false },
4231
+ showTitle: { type: Boolean, required: false, default: true },
4232
+ checkBeforeRead: { type: Function, required: false }
4231
4233
  },
4232
4234
  emits: ["view"],
4233
4235
  setup(__props, { emit: __emit }) {
@@ -4259,12 +4261,16 @@ var script = /* @__PURE__ */ defineComponent({
4259
4261
  const start = dayjs(time);
4260
4262
  const end = dayjs();
4261
4263
  const diffInMinutes = end.diff(start, "minute");
4262
- if (diffInMinutes < 60 && 0 > diffInMinutes) {
4264
+ if (diffInMinutes < 60 && diffInMinutes > 0) {
4263
4265
  return `${diffInMinutes}\u5206\u949F\u524D`;
4264
4266
  }
4265
4267
  return dayjs(time).format("YYYY-MM-DD HH:mm:ss");
4266
4268
  }
4267
4269
  async function notifyRead(notice, index) {
4270
+ if (props.checkBeforeRead) {
4271
+ if (!props.checkBeforeRead(notice, index))
4272
+ return;
4273
+ }
4268
4274
  if (notice.isRead == "0") {
4269
4275
  const res = await toReadFun([notice.id]);
4270
4276
  if (res) {
@@ -4330,9 +4336,10 @@ var script = /* @__PURE__ */ defineComponent({
4330
4336
  1
4331
4337
  /* TEXT */
4332
4338
  ),
4333
- createElementVNode(
4339
+ _ctx.showTitle ? (openBlock(), createElementBlock(
4334
4340
  "div",
4335
4341
  {
4342
+ key: 0,
4336
4343
  class: normalizeClass(["text tit", { gray: item.isRead == "1" }]),
4337
4344
  style: { "display": "flex", "align-items": "center" }
4338
4345
  },
@@ -4342,7 +4349,7 @@ var script = /* @__PURE__ */ defineComponent({
4342
4349
  1
4343
4350
  /* TEXT */
4344
4351
  ),
4345
- _ctx.showAppLabel && appMap[item.appCode] ? (openBlock(), createElementBlock(
4352
+ _ctx.showApp && appMap[item.appCode] ? (openBlock(), createElementBlock(
4346
4353
  "div",
4347
4354
  _hoisted_7,
4348
4355
  toDisplayString(appMap[item.appCode]),
@@ -4352,7 +4359,7 @@ var script = /* @__PURE__ */ defineComponent({
4352
4359
  ],
4353
4360
  2
4354
4361
  /* CLASS */
4355
- ),
4362
+ )) : createCommentVNode("v-if", true),
4356
4363
  createElementVNode(
4357
4364
  "div",
4358
4365
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxda/appkit",
3
- "version": "1.2.69",
3
+ "version": "1.2.71",
4
4
  "description": "小程序应用开发包",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.ts",
@@ -29,16 +29,15 @@
29
29
  >
30
30
  <div class="point"></div>
31
31
  <div>
32
- <div class="time">
33
- {{ formatMinutes(item.receiveTime) }}
34
- </div>
32
+ <div class="time">{{ formatMinutes(item.receiveTime) }}</div>
35
33
  <div
34
+ v-if="showTitle"
36
35
  class="text tit"
37
36
  style="display: flex; align-items: center"
38
37
  :class="{ gray: item.isRead == '1' }"
39
38
  >
40
39
  {{ item.title }}
41
- <div class="notice-list-label" v-if="showAppLabel && appMap[item.appCode]">
40
+ <div class="notice-list-label" v-if="showApp && appMap[item.appCode]">
42
41
  {{ appMap[item.appCode] }}
43
42
  </div>
44
43
  </div>
@@ -85,12 +84,15 @@ const props = withDefaults(
85
84
  defineProps<{
86
85
  app: string
87
86
  userId: string
88
- showAppLabel?: boolean
87
+ showApp?: boolean
88
+ showTitle?: boolean
89
+ checkBeforeRead?: Function
89
90
  }>(),
90
91
  {
91
92
  app: '',
92
93
  userId: '',
93
- showAppLabel: false,
94
+ showApp: false,
95
+ showTitle: true,
94
96
  }
95
97
  )
96
98
 
@@ -130,7 +132,7 @@ function formatMinutes(time: number) {
130
132
 
131
133
  // 使用diff方法计算差异,单位为分钟
132
134
  const diffInMinutes = end.diff(start, 'minute')
133
- if (diffInMinutes < 60 && 0 > diffInMinutes) {
135
+ if (diffInMinutes < 60 && diffInMinutes > 0) {
134
136
  return `${diffInMinutes}分钟前`
135
137
  }
136
138
 
@@ -139,6 +141,10 @@ function formatMinutes(time: number) {
139
141
 
140
142
  // 消息读取
141
143
  async function notifyRead(notice: any, index) {
144
+ if (props.checkBeforeRead) {
145
+ if (!props.checkBeforeRead(notice, index)) return
146
+ }
147
+
142
148
  if (notice.isRead == '0') {
143
149
  const res = await toReadFun([notice.id])
144
150
 
@@ -46,7 +46,7 @@ export function useCommonList<R, Q extends QueryLimit>(
46
46
  total.value = res.total
47
47
  }
48
48
 
49
- return res?.list || []
49
+ return (res || {}).list || []
50
50
  }
51
51
  async function runNext() {
52
52
  if (isLast.value) return