@uxda/appkit 1.0.10 → 1.0.14

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
@@ -426,45 +426,6 @@
426
426
  margin: 0 auto;
427
427
  text-align: center;
428
428
  }
429
- .balance-reminder-popup {
430
- width: 90%;
431
- }
432
-
433
- .balance-reminder {
434
- --primary-button-background: linear-gradient(135deg, #098C9D 0%, #66BF97 100%);
435
- }
436
- .balance-reminder h2 {
437
- font-size: 16px;
438
- font-weight: bold;
439
- margin-bottom: 14px;
440
- }
441
- .balance-reminder .body {
442
- height: 120px;
443
- box-sizing: border-box;
444
- display: flex;
445
- flex-direction: column;
446
- align-items: center;
447
- justify-content: center;
448
- padding: 20px 10px 10px 10px;
449
- font-size: 14px;
450
- text-align: center;
451
- color: #666;
452
- }
453
- .balance-reminder .footer {
454
- display: flex;
455
- flex-direction: row;
456
- justify-content: stretch;
457
- align-items: center;
458
- padding: 10px 20px 20px 20px;
459
- }
460
- .balance-reminder .footer .col {
461
- flex-grow: 1;
462
- padding: 6px;
463
- }
464
- .balance-reminder .footer .recharge-button {
465
- color: #fff;
466
- background: var(--primary-button-background);
467
- }
468
429
  .consumption-view .spa-between {
469
430
  padding: 0 0 0 10px;
470
431
  display: flex;
@@ -669,20 +630,20 @@
669
630
  margin: 0 auto 40px;
670
631
  text-align: center;
671
632
  }
672
- .consumption-view .operation-list-not {
633
+ .consumption-view .operation-list .operations-empty {
673
634
  display: flex;
674
635
  flex-direction: column;
675
636
  justify-content: center;
676
637
  align-items: center;
677
638
  margin-top: 80px;
678
639
  }
679
- .consumption-view .operation-list-not-img {
640
+ .consumption-view .operation-list .operations-empty-img {
680
641
  display: block;
681
642
  font-size: 0;
682
643
  width: 144px;
683
644
  height: 80px;
684
645
  }
685
- .consumption-view .operation-list-not-text {
646
+ .consumption-view .operation-list .operations-empty-text {
686
647
  opacity: 0.4;
687
648
  color: #353535;
688
649
  font-size: 12px;
@@ -694,4 +655,43 @@
694
655
  width: 70%;
695
656
  height: 70%;
696
657
  padding: 24px;
658
+ }
659
+ .balance-reminder-popup {
660
+ width: 90%;
661
+ }
662
+
663
+ .balance-reminder {
664
+ --primary-button-background: linear-gradient(135deg, #098C9D 0%, #66BF97 100%);
665
+ }
666
+ .balance-reminder h2 {
667
+ font-size: 16px;
668
+ font-weight: bold;
669
+ margin-bottom: 14px;
670
+ }
671
+ .balance-reminder .body {
672
+ height: 120px;
673
+ box-sizing: border-box;
674
+ display: flex;
675
+ flex-direction: column;
676
+ align-items: center;
677
+ justify-content: center;
678
+ padding: 20px 10px 10px 10px;
679
+ font-size: 14px;
680
+ text-align: center;
681
+ color: #666;
682
+ }
683
+ .balance-reminder .footer {
684
+ display: flex;
685
+ flex-direction: row;
686
+ justify-content: stretch;
687
+ align-items: center;
688
+ padding: 10px 20px 20px 20px;
689
+ }
690
+ .balance-reminder .footer .col {
691
+ flex-grow: 1;
692
+ padding: 6px;
693
+ }
694
+ .balance-reminder .footer .recharge-button {
695
+ color: #fff;
696
+ background: var(--primary-button-background);
697
697
  }
package/dist/index.js CHANGED
@@ -289,10 +289,10 @@ const endpointsList$1 = {
289
289
  getPackages: {
290
290
  path: "/payment/outer/payment/getRechargeList",
291
291
  translate: (data) => ({
292
- appCode: data.app,
293
- caseCode: "recharge",
292
+ // appCode: data.app,
293
+ caseCode: "recharge"
294
294
  // 这个参数可以不要
295
- tenantId: data.tenant
295
+ // tenantId: data.tenant
296
296
  }),
297
297
  transform: (data) => data.amountList.map((d) => ({
298
298
  token: d.desc,
@@ -985,9 +985,9 @@ var script$3 = /* @__PURE__ */ defineComponent({
985
985
  const minDate = ref();
986
986
  const maxDate = ref(/* @__PURE__ */ new Date());
987
987
  const datePickerOpen = ref(false);
988
- function resetTime() {
988
+ function reset() {
989
989
  result.from = props.from;
990
- result.from = props.to;
990
+ result.to = props.to;
991
991
  }
992
992
  function onOkClick() {
993
993
  emit("complete", result);
@@ -997,7 +997,6 @@ var script$3 = /* @__PURE__ */ defineComponent({
997
997
  return year + "\u5E74" + month + "\u6708" + day + "\u65E5";
998
998
  }
999
999
  function onDatePickerComplete({ selectedValue, selectedOptions }) {
1000
- console.log("onDatePickerComfirm_______________________", selectedValue, selectedOptions);
1001
1000
  let time = selectedOptions.map((val) => val.text).join("-");
1002
1001
  if (focused.value === "from") {
1003
1002
  result.from = new Date(time) > new Date(result.to) ? result.to : time;
@@ -1054,7 +1053,7 @@ var script$3 = /* @__PURE__ */ defineComponent({
1054
1053
  createElementVNode("div", { class: "buttons spa-between" }, [
1055
1054
  createElementVNode("div", {
1056
1055
  class: "btn",
1057
- onClick: resetTime
1056
+ onClick: reset
1058
1057
  }, "\u91CD\u7F6E"),
1059
1058
  createElementVNode("div", {
1060
1059
  class: "btn confirm",
@@ -1127,85 +1126,11 @@ var script$2 = /* @__PURE__ */ defineComponent({
1127
1126
 
1128
1127
  script$2.__file = "src/balance/components/ConsumptionRules.vue";
1129
1128
 
1130
- const _hoisted_1$1 = { class: "balance-reminder" };
1131
- const _hoisted_2$1 = /* @__PURE__ */ createElementVNode(
1132
- "div",
1133
- { class: "body" },
1134
- [
1135
- /* @__PURE__ */ createElementVNode("h2", null, "\u64CD\u4F5C\u5931\u8D25"),
1136
- /* @__PURE__ */ createElementVNode("p", null, "\u60A8\u7684\u8D26\u6237\u4F59\u989D\u53EF\u80FD\u4E0D\u8DB3\uFF0C\u8BF7\u5145\u503C\u540E\u518D\u8FDB\u884C\u67E5\u8BE2")
1137
- ],
1138
- -1
1139
- /* HOISTED */
1140
- );
1141
- const _hoisted_3$1 = { class: "footer" };
1142
- const _hoisted_4$1 = { class: "col" };
1143
- const _hoisted_5$1 = { class: "col" };
1144
- var script$1 = /* @__PURE__ */ defineComponent({
1145
- __name: "BalanceReminder",
1146
- props: {
1147
- modelValue: { type: Boolean, required: true, default: () => false }
1148
- },
1149
- emits: ["recharge", "update:modelValue"],
1150
- setup(__props, { emit: __emit }) {
1151
- const emit = __emit;
1152
- return (_ctx, _cache) => {
1153
- const _component_nut_button = resolveComponent("nut-button");
1154
- const _component_nut_popup = resolveComponent("nut-popup");
1155
- return openBlock(), createBlock(_component_nut_popup, {
1156
- "pop-class": "balance-reminder-popup",
1157
- round: "",
1158
- teleport: "#app",
1159
- visible: _ctx.modelValue,
1160
- "close-on-click-overlay": false
1161
- }, {
1162
- default: withCtx(() => [
1163
- createElementVNode("div", _hoisted_1$1, [
1164
- _hoisted_2$1,
1165
- createElementVNode("div", _hoisted_3$1, [
1166
- createElementVNode("div", _hoisted_4$1, [
1167
- createVNode(_component_nut_button, {
1168
- class: "cancel-button",
1169
- onClick: _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", false)),
1170
- block: ""
1171
- }, {
1172
- default: withCtx(() => [
1173
- createTextVNode("\u53D6\u6D88")
1174
- ]),
1175
- _: 1
1176
- /* STABLE */
1177
- })
1178
- ]),
1179
- createElementVNode("div", _hoisted_5$1, [
1180
- createVNode(_component_nut_button, {
1181
- block: "",
1182
- class: "recharge-button",
1183
- onClick: _cache[1] || (_cache[1] = ($event) => emit("recharge"))
1184
- }, {
1185
- default: withCtx(() => [
1186
- createTextVNode("\u53BB\u5145\u503C")
1187
- ]),
1188
- _: 1
1189
- /* STABLE */
1190
- })
1191
- ])
1192
- ])
1193
- ])
1194
- ]),
1195
- _: 1
1196
- /* STABLE */
1197
- }, 8, ["visible"]);
1198
- };
1199
- }
1200
- });
1201
-
1202
- script$1.__file = "src/balance/components/BalanceReminder.vue";
1203
-
1204
- const _hoisted_1 = { class: "consumption-view" };
1205
- const _hoisted_2 = { class: "header" };
1206
- const _hoisted_3 = { class: "header_card" };
1207
- const _hoisted_4 = { class: "clound-bean" };
1208
- const _hoisted_5 = { class: "bean-box spa-between" };
1129
+ const _hoisted_1$1 = { class: "consumption-view" };
1130
+ const _hoisted_2$1 = { class: "header" };
1131
+ const _hoisted_3$1 = { class: "header_card" };
1132
+ const _hoisted_4$1 = { class: "clound-bean" };
1133
+ const _hoisted_5$1 = { class: "bean-box spa-between" };
1209
1134
  const _hoisted_6 = /* @__PURE__ */ createElementVNode(
1210
1135
  "div",
1211
1136
  { class: "bean-img" },
@@ -1309,12 +1234,12 @@ const _hoisted_33 = /* @__PURE__ */ createElementVNode(
1309
1234
  );
1310
1235
  const _hoisted_34 = {
1311
1236
  key: 1,
1312
- class: "info-not"
1237
+ class: "operations-empty"
1313
1238
  };
1314
1239
  const _hoisted_35 = /* @__PURE__ */ createElementVNode(
1315
1240
  "img",
1316
1241
  {
1317
- class: "info-not-img",
1242
+ class: "operations-empty-img",
1318
1243
  src: "https://cdn.ddjf.com/static/images/fnfundkit/bean-no-thing.png"
1319
1244
  },
1320
1245
  null,
@@ -1323,7 +1248,7 @@ const _hoisted_35 = /* @__PURE__ */ createElementVNode(
1323
1248
  );
1324
1249
  const _hoisted_36 = /* @__PURE__ */ createElementVNode(
1325
1250
  "div",
1326
- { class: "info-not-text" },
1251
+ { class: "operations-empty-text" },
1327
1252
  "\u6682\u65E0\u6570\u636E",
1328
1253
  -1
1329
1254
  /* HOISTED */
@@ -1332,7 +1257,7 @@ const _hoisted_37 = [
1332
1257
  _hoisted_35,
1333
1258
  _hoisted_36
1334
1259
  ];
1335
- var script = /* @__PURE__ */ defineComponent({
1260
+ var script$1 = /* @__PURE__ */ defineComponent({
1336
1261
  __name: "AccountView",
1337
1262
  emits: ["recharge"],
1338
1263
  setup(__props, { emit: __emit }) {
@@ -1406,10 +1331,8 @@ var script = /* @__PURE__ */ defineComponent({
1406
1331
  loadConsumptions();
1407
1332
  };
1408
1333
  function gotoRecharge() {
1409
- balanceReminderOpen.value = true;
1410
1334
  emit("recharge");
1411
1335
  }
1412
- const balanceReminderOpen = ref(false);
1413
1336
  const scrollY = ref(0);
1414
1337
  usePageScroll((e) => {
1415
1338
  const { scrollTop } = e;
@@ -1421,11 +1344,11 @@ var script = /* @__PURE__ */ defineComponent({
1421
1344
  Fragment,
1422
1345
  null,
1423
1346
  [
1424
- createElementVNode("div", _hoisted_1, [
1425
- createElementVNode("div", _hoisted_2, [
1426
- createElementVNode("div", _hoisted_3, [
1427
- createElementVNode("div", _hoisted_4, [
1428
- createElementVNode("div", _hoisted_5, [
1347
+ createElementVNode("div", _hoisted_1$1, [
1348
+ createElementVNode("div", _hoisted_2$1, [
1349
+ createElementVNode("div", _hoisted_3$1, [
1350
+ createElementVNode("div", _hoisted_4$1, [
1351
+ createElementVNode("div", _hoisted_5$1, [
1429
1352
  _hoisted_6,
1430
1353
  createElementVNode("div", {
1431
1354
  class: "rule",
@@ -1644,11 +1567,7 @@ var script = /* @__PURE__ */ defineComponent({
1644
1567
  ]),
1645
1568
  _: 1
1646
1569
  /* STABLE */
1647
- }, 8, ["visible"]),
1648
- createVNode(script$1, {
1649
- modelValue: balanceReminderOpen.value,
1650
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => balanceReminderOpen.value = $event)
1651
- }, null, 8, ["modelValue"])
1570
+ }, 8, ["visible"])
1652
1571
  ],
1653
1572
  64
1654
1573
  /* STABLE_FRAGMENT */
@@ -1657,7 +1576,81 @@ var script = /* @__PURE__ */ defineComponent({
1657
1576
  }
1658
1577
  });
1659
1578
 
1660
- script.__file = "src/balance/components/AccountView.vue";
1579
+ script$1.__file = "src/balance/components/AccountView.vue";
1580
+
1581
+ const _hoisted_1 = { class: "balance-reminder" };
1582
+ const _hoisted_2 = /* @__PURE__ */ createElementVNode(
1583
+ "div",
1584
+ { class: "body" },
1585
+ [
1586
+ /* @__PURE__ */ createElementVNode("h2", null, "\u64CD\u4F5C\u5931\u8D25"),
1587
+ /* @__PURE__ */ createElementVNode("p", null, "\u60A8\u7684\u8D26\u6237\u4F59\u989D\u53EF\u80FD\u4E0D\u8DB3\uFF0C\u8BF7\u5145\u503C\u540E\u518D\u8FDB\u884C\u67E5\u8BE2")
1588
+ ],
1589
+ -1
1590
+ /* HOISTED */
1591
+ );
1592
+ const _hoisted_3 = { class: "footer" };
1593
+ const _hoisted_4 = { class: "col" };
1594
+ const _hoisted_5 = { class: "col" };
1595
+ var script = /* @__PURE__ */ defineComponent({
1596
+ __name: "BalanceReminder",
1597
+ props: {
1598
+ modelValue: { type: Boolean, required: true, default: () => false }
1599
+ },
1600
+ emits: ["recharge", "update:modelValue"],
1601
+ setup(__props, { emit: __emit }) {
1602
+ const emit = __emit;
1603
+ return (_ctx, _cache) => {
1604
+ const _component_nut_button = resolveComponent("nut-button");
1605
+ const _component_nut_popup = resolveComponent("nut-popup");
1606
+ return openBlock(), createBlock(_component_nut_popup, {
1607
+ "pop-class": "balance-reminder-popup",
1608
+ round: "",
1609
+ teleport: "#app",
1610
+ visible: _ctx.modelValue,
1611
+ "close-on-click-overlay": false
1612
+ }, {
1613
+ default: withCtx(() => [
1614
+ createElementVNode("div", _hoisted_1, [
1615
+ _hoisted_2,
1616
+ createElementVNode("div", _hoisted_3, [
1617
+ createElementVNode("div", _hoisted_4, [
1618
+ createVNode(_component_nut_button, {
1619
+ class: "cancel-button",
1620
+ onClick: _cache[0] || (_cache[0] = ($event) => emit("update:modelValue", false)),
1621
+ block: ""
1622
+ }, {
1623
+ default: withCtx(() => [
1624
+ createTextVNode("\u53D6\u6D88")
1625
+ ]),
1626
+ _: 1
1627
+ /* STABLE */
1628
+ })
1629
+ ]),
1630
+ createElementVNode("div", _hoisted_5, [
1631
+ createVNode(_component_nut_button, {
1632
+ block: "",
1633
+ class: "recharge-button",
1634
+ onClick: _cache[1] || (_cache[1] = ($event) => emit("recharge"))
1635
+ }, {
1636
+ default: withCtx(() => [
1637
+ createTextVNode("\u53BB\u5145\u503C")
1638
+ ]),
1639
+ _: 1
1640
+ /* STABLE */
1641
+ })
1642
+ ])
1643
+ ])
1644
+ ])
1645
+ ]),
1646
+ _: 1
1647
+ /* STABLE */
1648
+ }, 8, ["visible"]);
1649
+ };
1650
+ }
1651
+ });
1652
+
1653
+ script.__file = "src/balance/components/BalanceReminder.vue";
1661
1654
 
1662
1655
  const nutComponents = [
1663
1656
  Grid,
@@ -1701,4 +1694,4 @@ const AppKit = {
1701
1694
  }
1702
1695
  };
1703
1696
 
1704
- export { script as AccountView, script$a as AmountPicker, script$7 as AppDrawer, script$5 as BalanceCard, script$1 as BalanceReminder, script$8 as PageHeader, script$6 as RechargeView, script$9 as UserAgreement, components, AppKit as default, requestPayment$2 as requestPayment, services$1 as services, useAppKit, useHttp };
1697
+ export { script$1 as AccountView, script$a as AmountPicker, script$7 as AppDrawer, script$5 as BalanceCard, script as BalanceReminder, script$8 as PageHeader, script$6 as RechargeView, script$9 as UserAgreement, components, AppKit as default, requestPayment$2 as requestPayment, services$1 as services, useAppKit, useHttp };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxda/appkit",
3
- "version": "1.0.10",
3
+ "version": "1.0.14",
4
4
  "description": "小程序应用开发包",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.ts",
@@ -87,11 +87,11 @@
87
87
  </div>
88
88
  <div class="box-not-text">没有更多了</div>
89
89
  </div>
90
- <div v-else class="info-not">
90
+ <div v-else class="operations-empty">
91
91
  <img
92
- class="info-not-img"
92
+ class="operations-empty-img"
93
93
  src="https://cdn.ddjf.com/static/images/fnfundkit/bean-no-thing.png" />
94
- <div class="info-not-text">暂无数据</div>
94
+ <div class="operations-empty-text">暂无数据</div>
95
95
  </div>
96
96
  </div>
97
97
  </div>
@@ -125,7 +125,6 @@
125
125
  filtering.type,
126
126
  ]" @complete="onFilterComplete" />
127
127
  </nut-popup>
128
- <balance-reminder v-model="balanceReminderOpen" />
129
128
  </template>
130
129
 
131
130
  <script lang="ts" setup>
@@ -136,7 +135,6 @@ import { ConsumptionFiltering, ConsumptionGroups, Balance } from '../types'
136
135
  import ConsumptionFilter from './ConsumptionFilter.vue'
137
136
  import DateFilter from './DateFilter.vue'
138
137
  import ConsumptionRules from './ConsumptionRules.vue'
139
- import BalanceReminder from './BalanceReminder.vue'
140
138
 
141
139
  const emit = defineEmits(['recharge'])
142
140
 
@@ -225,11 +223,9 @@ const onDateFilterComplete = (value) => {
225
223
  }
226
224
 
227
225
  function gotoRecharge () {
228
- balanceReminderOpen.value = true
229
226
  emit('recharge')
230
227
  }
231
228
 
232
- const balanceReminderOpen = ref(false)
233
229
 
234
230
  const scrollY = ref<number>(0)
235
231
  usePageScroll((e) => {
@@ -457,7 +453,7 @@ usePageScroll((e) => {
457
453
  text-align: center;
458
454
  }
459
455
  }
460
- &-not {
456
+ .operations-empty {
461
457
  display: flex;
462
458
  flex-direction: column;
463
459
  justify-content: center;
@@ -20,7 +20,7 @@
20
20
  </div>
21
21
  </div>
22
22
  <div class="buttons spa-between">
23
- <div class="btn" @click="resetTime">重置</div>
23
+ <div class="btn" @click="reset">重置</div>
24
24
  <div class="btn confirm" @click="onOkClick">确定</div>
25
25
  </div>
26
26
  <div class="bottom"></div>
@@ -46,6 +46,10 @@ type DateFilterProps = {
46
46
  const props = defineProps<DateFilterProps>()
47
47
 
48
48
  const emit = defineEmits(['complete'])
49
+
50
+ /**
51
+ * 日期范围结果
52
+ */
49
53
  const result = reactive<DateFilterProps>({...props})
50
54
 
51
55
  /**
@@ -58,11 +62,17 @@ const minDate = ref<any>()
58
62
  const maxDate = ref<Date>(new Date())
59
63
  const datePickerOpen = ref<boolean>(false)
60
64
 
61
- function resetTime() {
65
+ /**
66
+ * 日期重置
67
+ */
68
+ function reset() {
62
69
  result.from = props.from
63
- result.from = props.to
70
+ result.to = props.to
64
71
  }
65
72
 
73
+ /**
74
+ * 确认,提交新时间
75
+ */
66
76
  function onOkClick() {
67
77
  emit('complete', result)
68
78
  }
@@ -73,7 +83,6 @@ function formatDate (date: string) {
73
83
  }
74
84
 
75
85
  function onDatePickerComplete ({ selectedValue, selectedOptions }) {
76
- console.log('onDatePickerComfirm_______________________', selectedValue, selectedOptions)
77
86
  let time = selectedOptions.map((val: any) => val.text).join('-')
78
87
  if (focused.value === 'from') {
79
88
  // 如果选择的时间比结束时间大,结束时间改为开始时间
@@ -107,6 +116,7 @@ function onDatePickerComplete ({ selectedValue, selectedOptions }) {
107
116
  focused.value = shift
108
117
  datePickerOpen.value = true
109
118
  }
119
+
110
120
  </script>
111
121
  <style lang="scss">
112
122
  .consumption-date-filter {
@@ -10,9 +10,9 @@ const endpointsList: HttpEndpoints = {
10
10
  getPackages: {
11
11
  path: '/payment/outer/payment/getRechargeList',
12
12
  translate: (data: any) => ({
13
- appCode: data.app,
13
+ // appCode: data.app,
14
14
  caseCode: 'recharge', // 这个参数可以不要
15
- tenantId: data.tenant
15
+ // tenantId: data.tenant
16
16
  }),
17
17
  transform: (data: any) => data.amountList.map((d: any) => ({
18
18
  token: d.desc,