@uxda/appkit 1.2.65 → 1.2.68

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
@@ -1,3 +1,92 @@
1
+ .user-entry {
2
+ position: absolute;
3
+ left: 0;
4
+ top: 130px;
5
+ transform: translateY(-50%);
6
+ display: flex;
7
+ padding: 0 22px;
8
+ align-items: center;
9
+ width: 100%;
10
+ }
11
+ .user-entry-head {
12
+ width: 65px;
13
+ height: 65px;
14
+ border-radius: 50%;
15
+ overflow: hidden;
16
+ margin-right: 5px;
17
+ }
18
+ .user-entry-head-img {
19
+ width: 100%;
20
+ height: 100%;
21
+ }
22
+ .user-entry-bd {
23
+ color: #fff;
24
+ }
25
+ .user-entry-bd-bigtxt {
26
+ display: flex;
27
+ align-items: center;
28
+ font-size: 20px;
29
+ font-weight: 500;
30
+ line-height: 28px;
31
+ margin-left: 15px;
32
+ }
33
+ .user-entry-bd-bigtxt-icon {
34
+ width: 20px;
35
+ }
36
+ .user-entry-bd-txt {
37
+ font-size: 20px;
38
+ font-weight: 500;
39
+ line-height: 25px;
40
+ }
41
+ .user-entry-bd-smalltxt {
42
+ margin-top: 0;
43
+ font-size: 15px;
44
+ line-height: 21px;
45
+ }
46
+
47
+
48
+ .user-feedback {
49
+ margin: 10px 12px;
50
+ border-radius: 5px;
51
+ background: #fff;
52
+ padding: 10px;
53
+ }
54
+ .user-feedback-head {
55
+ color: #f2f9ff;
56
+ padding: 15px;
57
+ border-radius: 2px;
58
+ font-size: 12px;
59
+ margin-bottom: 8px;
60
+ }
61
+ .user-feedback-tit {
62
+ height: 44px;
63
+ display: flex;
64
+ align-items: center;
65
+ color: #1a1a1a;
66
+ font-weight: 500;
67
+ font-size: 17px;
68
+ }
69
+ .user-feedback-body {
70
+ background: #f5f5f5;
71
+ border-radius: 4px 4px 0px 0px;
72
+ }
73
+ .user-feedback-handle {
74
+ border: 1px solid rgba(138, 138, 138, 0.1019607843);
75
+ background: #ffffff;
76
+ height: 60px;
77
+ display: flex;
78
+ align-items: center;
79
+ padding: 3px 10px;
80
+ }
81
+ .user-feedback-handle-item {
82
+ border-radius: 4px;
83
+ background: #d9d9d9;
84
+ color: #838383;
85
+ padding: 0 5px;
86
+ display: flex;
87
+ align-items: center;
88
+ }
89
+
1
90
  .amount-picker {
2
91
  padding: 14px 0 14px 14px;
3
92
  }
@@ -1307,8 +1396,8 @@ page {
1307
1396
  }
1308
1397
  .notice-entry {
1309
1398
  position: fixed;
1310
- right: 43px;
1311
- top: 21px;
1399
+ right: 0;
1400
+ top: 120px;
1312
1401
  min-width: 66px;
1313
1402
  padding: 0 12px 0 15px;
1314
1403
  text-align: center;
@@ -1481,6 +1570,12 @@ page {
1481
1570
  font-size: 15px;
1482
1571
  margin-bottom: 4px;
1483
1572
  }
1573
+ .notice-list .wrapper .content .card.active .notice-list-label {
1574
+ opacity: 1;
1575
+ }
1576
+ .notice-list .wrapper .content .card.active .notice-list-file {
1577
+ opacity: 1;
1578
+ }
1484
1579
  .notice-list .no-data {
1485
1580
  background-color: #fff;
1486
1581
  display: flex;
@@ -1501,12 +1596,26 @@ page {
1501
1596
  margin-bottom: 19px;
1502
1597
  }
1503
1598
  .notice-list-file {
1504
- font-size: 12px;
1599
+ font-size: 10px;
1505
1600
  color: #017fff;
1601
+ opacity: 0.5;
1506
1602
  }
1507
1603
  .notice-list .cue-text {
1508
1604
  font-size: 13px;
1509
1605
  color: rgba(60, 60, 60, 0.5);
1510
1606
  padding: 30px 0 calc(30px + env(safe-area-inset-bottom, 0px));
1511
1607
  text-align: center;
1608
+ }
1609
+ .notice-list-label {
1610
+ border: 1px solid #caa264;
1611
+ color: #caa264;
1612
+ border-radius: 1px;
1613
+ font-size: 8px;
1614
+ display: inline-flex;
1615
+ justify-content: center;
1616
+ align-items: center;
1617
+ height: 14px;
1618
+ padding: 0 5px;
1619
+ margin-left: 4px;
1620
+ opacity: 0.5;
1512
1621
  }
package/dist/index.js CHANGED
@@ -1144,7 +1144,7 @@ const _hoisted_11$3 = {
1144
1144
  class: "agreement"
1145
1145
  };
1146
1146
  const _hoisted_12$3 = { class: "buy-amount" };
1147
- const _hoisted_13$2 = { class: "left" };
1147
+ const _hoisted_13$3 = { class: "left" };
1148
1148
  const _hoisted_14$2 = { class: "amount" };
1149
1149
  const _hoisted_15$1 = /* @__PURE__ */ createElementVNode(
1150
1150
  "i",
@@ -1304,7 +1304,7 @@ var script$j = /* @__PURE__ */ defineComponent({
1304
1304
  }, 8, ["modelValue"])
1305
1305
  ])) : createCommentVNode("v-if", true),
1306
1306
  createElementVNode("div", _hoisted_12$3, [
1307
- createElementVNode("div", _hoisted_13$2, [
1307
+ createElementVNode("div", _hoisted_13$3, [
1308
1308
  createTextVNode(" \u5F85\u652F\u4ED8\uFF1A "),
1309
1309
  createElementVNode("span", _hoisted_14$2, [
1310
1310
  _hoisted_15$1,
@@ -1462,7 +1462,7 @@ const _hoisted_12$2 = /* @__PURE__ */ createElementVNode(
1462
1462
  -1
1463
1463
  /* HOISTED */
1464
1464
  );
1465
- const _hoisted_13$1 = /* @__PURE__ */ createElementVNode(
1465
+ const _hoisted_13$2 = /* @__PURE__ */ createElementVNode(
1466
1466
  "img",
1467
1467
  {
1468
1468
  class: "pay-icon",
@@ -1474,7 +1474,7 @@ const _hoisted_13$1 = /* @__PURE__ */ createElementVNode(
1474
1474
  );
1475
1475
  const _hoisted_14$1 = [
1476
1476
  _hoisted_12$2,
1477
- _hoisted_13$1
1477
+ _hoisted_13$2
1478
1478
  ];
1479
1479
  var script$i = /* @__PURE__ */ defineComponent({
1480
1480
  __name: "BalanceCard",
@@ -2015,7 +2015,7 @@ const _hoisted_11$1 = /* @__PURE__ */ createElementVNode(
2015
2015
  /* HOISTED */
2016
2016
  );
2017
2017
  const _hoisted_12$1 = { class: "list" };
2018
- const _hoisted_13 = { class: "item-count" };
2018
+ const _hoisted_13$1 = { class: "item-count" };
2019
2019
  const _hoisted_14 = { class: "item-title" };
2020
2020
  const _hoisted_15 = {
2021
2021
  key: 0,
@@ -2330,7 +2330,7 @@ var script$c = /* @__PURE__ */ defineComponent({
2330
2330
  class: "item star-item",
2331
2331
  key: index
2332
2332
  }, [
2333
- createElementVNode("div", _hoisted_13, [
2333
+ createElementVNode("div", _hoisted_13$1, [
2334
2334
  createElementVNode(
2335
2335
  "span",
2336
2336
  null,
@@ -3726,7 +3726,7 @@ var script$4 = /* @__PURE__ */ defineComponent({
3726
3726
  }).catch(() => {
3727
3727
  startMessageCarousel();
3728
3728
  });
3729
- }, 400);
3729
+ }, 350);
3730
3730
  async function onDetail(item) {
3731
3731
  await noticeClick(item);
3732
3732
  emits("detail", item);
@@ -3937,7 +3937,7 @@ var script$2 = /* @__PURE__ */ defineComponent({
3937
3937
  },
3938
3938
  setup(__props) {
3939
3939
  const props = __props;
3940
- onMounted(() => {
3940
+ const init = debounce(() => {
3941
3941
  if (!props.app) {
3942
3942
  return Taro.showToast({
3943
3943
  title: "NoticeEntry\u7EC4\u4EF6\u7F3A\u5C11appcode",
@@ -3945,6 +3945,10 @@ var script$2 = /* @__PURE__ */ defineComponent({
3945
3945
  });
3946
3946
  }
3947
3947
  getNotice();
3948
+ }, 300);
3949
+ init();
3950
+ useDidShow(() => {
3951
+ init();
3948
3952
  });
3949
3953
  const noticeShow = ref(false);
3950
3954
  async function getNotice() {
@@ -3956,9 +3960,9 @@ var script$2 = /* @__PURE__ */ defineComponent({
3956
3960
  tenantId: appkitOptions.tenant(),
3957
3961
  userId: props.userId
3958
3962
  }).then((result) => {
3959
- if (result.status === 200) {
3960
- noticeShow.value = result.data > 0;
3961
- }
3963
+ if (!Number(result))
3964
+ return;
3965
+ noticeShow.value = result > 0;
3962
3966
  });
3963
3967
  }
3964
3968
  return (_ctx, _cache) => {
@@ -4180,17 +4184,21 @@ const _hoisted_5 = /* @__PURE__ */ createElementVNode(
4180
4184
  /* HOISTED */
4181
4185
  );
4182
4186
  const _hoisted_6 = { class: "time" };
4183
- const _hoisted_7 = ["onClick"];
4184
- const _hoisted_8 = {
4187
+ const _hoisted_7 = {
4188
+ key: 0,
4189
+ class: "notice-list-label"
4190
+ };
4191
+ const _hoisted_8 = ["onClick"];
4192
+ const _hoisted_9 = {
4185
4193
  key: 0,
4186
4194
  class: "cue-text",
4187
4195
  style: { "padding-bottom": "40px" }
4188
4196
  };
4189
- const _hoisted_9 = {
4197
+ const _hoisted_10 = {
4190
4198
  key: 1,
4191
4199
  class: "no-data"
4192
4200
  };
4193
- const _hoisted_10 = /* @__PURE__ */ createElementVNode(
4201
+ const _hoisted_11 = /* @__PURE__ */ createElementVNode(
4194
4202
  "div",
4195
4203
  { class: "no-data-img" },
4196
4204
  [
@@ -4203,22 +4211,23 @@ const _hoisted_10 = /* @__PURE__ */ createElementVNode(
4203
4211
  -1
4204
4212
  /* HOISTED */
4205
4213
  );
4206
- const _hoisted_11 = /* @__PURE__ */ createElementVNode(
4214
+ const _hoisted_12 = /* @__PURE__ */ createElementVNode(
4207
4215
  "div",
4208
4216
  { class: "text" },
4209
4217
  "\u6682\u65E0\u8BB0\u5F55",
4210
4218
  -1
4211
4219
  /* HOISTED */
4212
4220
  );
4213
- const _hoisted_12 = [
4214
- _hoisted_10,
4215
- _hoisted_11
4221
+ const _hoisted_13 = [
4222
+ _hoisted_11,
4223
+ _hoisted_12
4216
4224
  ];
4217
4225
  var script = /* @__PURE__ */ defineComponent({
4218
4226
  __name: "NoticeList",
4219
4227
  props: {
4220
4228
  app: { type: String, required: true, default: "" },
4221
- userId: { type: String, required: true, default: "" }
4229
+ userId: { type: String, required: true, default: "" },
4230
+ showAppLabel: { type: Boolean, required: false, default: false }
4222
4231
  },
4223
4232
  emits: ["view"],
4224
4233
  setup(__props, { emit: __emit }) {
@@ -4277,6 +4286,7 @@ var script = /* @__PURE__ */ defineComponent({
4277
4286
  function onNoticeView(link) {
4278
4287
  emits("view", link);
4279
4288
  }
4289
+ const appMap = { aiapprove: "AI\u5BA1\u6279", corporateStar: "\u4F01\u660E\u661F" };
4280
4290
  const emits = __emit;
4281
4291
  return (_ctx, _cache) => {
4282
4292
  const _component_rich_text = resolveComponent("rich-text");
@@ -4323,11 +4333,25 @@ var script = /* @__PURE__ */ defineComponent({
4323
4333
  createElementVNode(
4324
4334
  "div",
4325
4335
  {
4326
- class: normalizeClass(["text tit", { gray: item.isRead == "1" }])
4336
+ class: normalizeClass(["text tit", { gray: item.isRead == "1" }]),
4337
+ style: { "display": "flex", "align-items": "center" }
4327
4338
  },
4328
- toDisplayString(item.title),
4329
- 3
4330
- /* TEXT, CLASS */
4339
+ [
4340
+ createTextVNode(
4341
+ toDisplayString(item.title) + " ",
4342
+ 1
4343
+ /* TEXT */
4344
+ ),
4345
+ _ctx.showAppLabel && appMap[item.appCode] ? (openBlock(), createElementBlock(
4346
+ "div",
4347
+ _hoisted_7,
4348
+ toDisplayString(appMap[item.appCode]),
4349
+ 1
4350
+ /* TEXT */
4351
+ )) : createCommentVNode("v-if", true)
4352
+ ],
4353
+ 2
4354
+ /* CLASS */
4331
4355
  ),
4332
4356
  createElementVNode(
4333
4357
  "div",
@@ -4341,9 +4365,9 @@ var script = /* @__PURE__ */ defineComponent({
4341
4365
  }, null, 8, ["nodes"]),
4342
4366
  item.link && item.msgType == 3 ? (openBlock(), createElementBlock("span", {
4343
4367
  key: 0,
4344
- class: "account-news-file",
4368
+ class: "notice-list-file",
4345
4369
  onClick: ($event) => onNoticeView(item.link)
4346
- }, " \u67E5\u770B\u9644\u4EF6 ", 8, _hoisted_7)) : createCommentVNode("v-if", true)
4370
+ }, " \u67E5\u770B\u9644\u4EF6 ", 8, _hoisted_8)) : createCommentVNode("v-if", true)
4347
4371
  ],
4348
4372
  2
4349
4373
  /* CLASS */
@@ -4354,12 +4378,12 @@ var script = /* @__PURE__ */ defineComponent({
4354
4378
  128
4355
4379
  /* KEYED_FRAGMENT */
4356
4380
  )),
4357
- unref(isLast) ? (openBlock(), createElementBlock("div", _hoisted_8, "\u6CA1\u6709\u66F4\u591A\u4E86")) : createCommentVNode("v-if", true)
4381
+ unref(isLast) ? (openBlock(), createElementBlock("div", _hoisted_9, "\u6CA1\u6709\u66F4\u591A\u4E86")) : createCommentVNode("v-if", true)
4358
4382
  ]),
4359
4383
  _: 1
4360
4384
  /* STABLE */
4361
4385
  }, 8, ["refresherTriggered", "onScrolltolower"])
4362
- ])) : (openBlock(), createElementBlock("div", _hoisted_9, [..._hoisted_12]))
4386
+ ])) : (openBlock(), createElementBlock("div", _hoisted_10, [..._hoisted_13]))
4363
4387
  ])
4364
4388
  ]);
4365
4389
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxda/appkit",
3
- "version": "1.2.65",
3
+ "version": "1.2.68",
4
4
  "description": "小程序应用开发包",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.ts",
@@ -159,7 +159,7 @@ const onClose = debounce((item: any, index: number) => {
159
159
  .catch(() => {
160
160
  startMessageCarousel()
161
161
  })
162
- }, 400)
162
+ }, 350)
163
163
 
164
164
  // 跳转详情
165
165
  async function onDetail(item) {
@@ -11,10 +11,11 @@
11
11
  </template>
12
12
 
13
13
  <script lang="ts" setup>
14
- import { onMounted, ref } from 'vue'
14
+ import { ref } from 'vue'
15
15
  import { useHttp } from '../api'
16
16
  import { useAppKitOptions } from '../../Appkit'
17
- import Taro from '@tarojs/taro'
17
+ import Taro, { useDidShow } from '@tarojs/taro'
18
+ import debounce from 'lodash/debounce'
18
19
 
19
20
  const props = withDefaults(
20
21
  defineProps<{
@@ -27,7 +28,7 @@ const props = withDefaults(
27
28
  }
28
29
  )
29
30
 
30
- onMounted(() => {
31
+ const init = debounce(() => {
31
32
  if (!props.app) {
32
33
  return Taro.showToast({
33
34
  title: 'NoticeEntry组件缺少appcode',
@@ -35,6 +36,11 @@ onMounted(() => {
35
36
  })
36
37
  }
37
38
  getNotice()
39
+ }, 300)
40
+
41
+ init()
42
+ useDidShow(() => {
43
+ init()
38
44
  })
39
45
 
40
46
  // 通知红点
@@ -51,9 +57,9 @@ async function getNotice() {
51
57
  userId: props.userId,
52
58
  })
53
59
  .then((result: any) => {
54
- if (result.status === 200) {
55
- noticeShow.value = result.data > 0
56
- }
60
+ if (!Number(result)) return
61
+
62
+ noticeShow.value = result > 0
57
63
  })
58
64
  }
59
65
  </script>
@@ -61,8 +67,8 @@ async function getNotice() {
61
67
  <style lang="scss">
62
68
  .notice-entry {
63
69
  position: fixed;
64
- right: 43px;
65
- top: 21px;
70
+ right: 0;
71
+ top: 120px;
66
72
  min-width: 66px;
67
73
  padding: 0 12px 0 15px;
68
74
  text-align: center;
@@ -32,14 +32,21 @@
32
32
  <div class="time">
33
33
  {{ formatMinutes(item.receiveTime) }}
34
34
  </div>
35
- <div class="text tit" :class="{ gray: item.isRead == '1' }">
35
+ <div
36
+ class="text tit"
37
+ style="display: flex; align-items: center"
38
+ :class="{ gray: item.isRead == '1' }"
39
+ >
36
40
  {{ item.title }}
41
+ <div class="notice-list-label" v-if="showAppLabel && appMap[item.appCode]">
42
+ {{ appMap[item.appCode] }}
43
+ </div>
37
44
  </div>
38
45
  <div class="text" :class="{ gray: item.isRead == '1' }">
39
46
  <rich-text style="white-space: pre-wrap" :nodes="item.context"></rich-text>
40
47
  <span
41
48
  v-if="item.link && item.msgType == 3"
42
- class="account-news-file"
49
+ class="notice-list-file"
43
50
  @click="onNoticeView(item.link)"
44
51
  >
45
52
  查看附件
@@ -78,10 +85,12 @@ const props = withDefaults(
78
85
  defineProps<{
79
86
  app: string
80
87
  userId: string
88
+ showAppLabel?: boolean
81
89
  }>(),
82
90
  {
83
91
  app: '',
84
92
  userId: '',
93
+ showAppLabel: false,
85
94
  }
86
95
  )
87
96
 
@@ -159,6 +168,8 @@ function onNoticeView(link) {
159
168
  emits('view', link)
160
169
  }
161
170
 
171
+ const appMap = { aiapprove: 'AI审批', corporateStar: '企明星' }
172
+
162
173
  // 父组件事件
163
174
  const emits = defineEmits(['view'])
164
175
  </script>
@@ -241,6 +252,12 @@ const emits = defineEmits(['view'])
241
252
  margin-bottom: 4px;
242
253
  }
243
254
  }
255
+ .notice-list-label {
256
+ opacity: 1;
257
+ }
258
+ .notice-list-file {
259
+ opacity: 1;
260
+ }
244
261
  }
245
262
  }
246
263
  }
@@ -265,8 +282,9 @@ const emits = defineEmits(['view'])
265
282
  }
266
283
  }
267
284
  &-file {
268
- font-size: 12px;
285
+ font-size: 10px;
269
286
  color: #017fff;
287
+ opacity: 0.5;
270
288
  }
271
289
  .cue-text {
272
290
  font-size: 13px;
@@ -274,5 +292,18 @@ const emits = defineEmits(['view'])
274
292
  padding: 30px 0 calc(30px + env(safe-area-inset-bottom, 0px));
275
293
  text-align: center;
276
294
  }
295
+ &-label {
296
+ border: 1px solid #caa264;
297
+ color: #caa264;
298
+ border-radius: 1px;
299
+ font-size: 8px;
300
+ display: inline-flex;
301
+ justify-content: center;
302
+ align-items: center;
303
+ height: 14px;
304
+ padding: 0 5px;
305
+ margin-left: 4px;
306
+ opacity: 0.5;
307
+ }
277
308
  }
278
309
  </style>