@uxda/appkit 1.0.74 → 1.1.0
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
|
@@ -536,6 +536,9 @@ page {
|
|
|
536
536
|
font-weight: 700;
|
|
537
537
|
}
|
|
538
538
|
.account-view {
|
|
539
|
+
height: 100vh;
|
|
540
|
+
}
|
|
541
|
+
.account-view .scroll-content {
|
|
539
542
|
background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzUwIiBoZWlnaHQ9IjQwNiIgdmlld0JveD0iMCAwIDc1MCA0MDYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0zODIuNSA0MDcuNUM1NzcuMzU3IDQwNy41IDc1My43ODggMzgxLjI0OCA4ODEuNTIxIDMzOC43OTFDOTQ1LjM4NiAzMTcuNTYzIDk5Ny4xMDQgMjkyLjI3NiAxMDMyLjg3IDI2NC4xNzFDMTA2OC42MiAyMzYuMDcxIDEwODguNSAyMDUuMDk3IDEwODguNSAxNzIuNUMxMDg4LjUgMTM5LjkwMyAxMDY4LjYyIDEwOC45MjkgMTAzMi44NyA4MC44Mjg5Qzk5Ny4xMDQgNTIuNzI0NSA5NDUuMzg2IDI3LjQzNjcgODgxLjUyMSA2LjIwODk4Qzc1My43ODggLTM2LjI0ODIgNTc3LjM1NyAtNjIuNSAzODIuNSAtNjIuNUMxODcuNjQzIC02Mi41IDExLjIxMjIgLTM2LjI0ODIgLTExNi41MjIgNi4yMDg5OEMtMTgwLjM4NiAyNy40MzY3IC0yMzIuMTA0IDUyLjcyNDUgLTI2Ny44NjcgODAuODI4OUMtMzAzLjYyNCAxMDguOTI5IC0zMjMuNSAxMzkuOTAzIC0zMjMuNSAxNzIuNUMtMzIzLjUgMjA1LjA5NyAtMzAzLjYyNCAyMzYuMDcxIC0yNjcuODY3IDI2NC4xNzFDLTIzMi4xMDQgMjkyLjI3NiAtMTgwLjM4NiAzMTcuNTYzIC0xMTYuNTIyIDMzOC43OTFDMTEuMjEyMiAzODEuMjQ4IDE4Ny42NDMgNDA3LjUgMzgyLjUgNDA3LjVaIiBmaWxsPSIjM0IzOTNDIiBzdHJva2U9ImJsYWNrIi8+Cjwvc3ZnPgo=");
|
|
540
543
|
background-position: center -200px;
|
|
541
544
|
background-repeat: no-repeat;
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, reactive, resolveComponent, openBlock, createBlock, withCtx, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, toDisplayString, createTextVNode, createStaticVNode, createCommentVNode, renderSlot, createVNode, ref, onMounted, unref, watch, computed, normalizeStyle, withDirectives, vShow } from 'vue';
|
|
2
|
-
import Taro, { useDidShow
|
|
2
|
+
import Taro, { useDidShow } from '@tarojs/taro';
|
|
3
3
|
import { Grid, GridItem, Button, Checkbox, Popup, OverLay, DatePicker } from '@nutui/nutui-taro';
|
|
4
4
|
import dayjs from 'dayjs';
|
|
5
5
|
|
|
@@ -109,11 +109,11 @@ function requestPayment$2(json) {
|
|
|
109
109
|
|
|
110
110
|
function useSafeArea() {
|
|
111
111
|
const systemInfo = Taro.getSystemInfoSync(), capsule = Taro.getMenuButtonBoundingClientRect();
|
|
112
|
-
const status = systemInfo.statusBarHeight || 0, gap = capsule.top - status, nav = capsule.height + gap * 2;
|
|
112
|
+
const status = systemInfo.statusBarHeight || 0, gap = capsule.top - status, nav = capsule.height + gap * 2, safeAreaBottom = systemInfo.safeArea?.bottom || 0, bottom = systemInfo.screenHeight - safeAreaBottom;
|
|
113
113
|
return {
|
|
114
114
|
status,
|
|
115
115
|
nav,
|
|
116
|
-
bottom
|
|
116
|
+
bottom
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
119
|
|
|
@@ -906,6 +906,9 @@ const _hoisted_14$1 = [
|
|
|
906
906
|
];
|
|
907
907
|
var script$7 = /* @__PURE__ */ defineComponent({
|
|
908
908
|
__name: "BalanceCard",
|
|
909
|
+
props: {
|
|
910
|
+
app: { type: String, required: true, default: "" }
|
|
911
|
+
},
|
|
909
912
|
emits: [
|
|
910
913
|
/**
|
|
911
914
|
* 跳账户详情
|
|
@@ -917,6 +920,7 @@ var script$7 = /* @__PURE__ */ defineComponent({
|
|
|
917
920
|
"recharge"
|
|
918
921
|
],
|
|
919
922
|
setup(__props, { emit: __emit }) {
|
|
923
|
+
const props = __props;
|
|
920
924
|
const balance = ref({
|
|
921
925
|
total: 0,
|
|
922
926
|
privileges: []
|
|
@@ -926,7 +930,9 @@ var script$7 = /* @__PURE__ */ defineComponent({
|
|
|
926
930
|
};
|
|
927
931
|
async function loadBalance() {
|
|
928
932
|
const $http = useHttp();
|
|
929
|
-
$http.get(endpoints.\u83B7\u53D6\u4F59\u989D\u660E\u7EC6, {
|
|
933
|
+
$http.get(endpoints.\u83B7\u53D6\u4F59\u989D\u660E\u7EC6, {
|
|
934
|
+
app: props.app
|
|
935
|
+
}).then((data) => {
|
|
930
936
|
balance.value = data;
|
|
931
937
|
});
|
|
932
938
|
}
|
|
@@ -1416,19 +1422,20 @@ var script$2 = /* @__PURE__ */ defineComponent({
|
|
|
1416
1422
|
|
|
1417
1423
|
script$2.__file = "src/balance/components/SecondBalance.vue";
|
|
1418
1424
|
|
|
1419
|
-
const _hoisted_1$1 =
|
|
1425
|
+
const _hoisted_1$1 = { class: "scroll-content" };
|
|
1426
|
+
const _hoisted_2$1 = /* @__PURE__ */ createElementVNode(
|
|
1420
1427
|
"label",
|
|
1421
1428
|
null,
|
|
1422
1429
|
"\u5C0F\u4E91\u8C46\u4F59\u989D",
|
|
1423
1430
|
-1
|
|
1424
1431
|
/* HOISTED */
|
|
1425
1432
|
);
|
|
1426
|
-
const
|
|
1427
|
-
|
|
1433
|
+
const _hoisted_3$1 = [
|
|
1434
|
+
_hoisted_2$1
|
|
1428
1435
|
];
|
|
1429
|
-
const
|
|
1430
|
-
const
|
|
1431
|
-
const
|
|
1436
|
+
const _hoisted_4$1 = { class: "balance" };
|
|
1437
|
+
const _hoisted_5$1 = { class: "bean-box spa-between" };
|
|
1438
|
+
const _hoisted_6 = /* @__PURE__ */ createElementVNode(
|
|
1432
1439
|
"div",
|
|
1433
1440
|
{ class: "bean-img" },
|
|
1434
1441
|
[
|
|
@@ -1441,18 +1448,18 @@ const _hoisted_5$1 = /* @__PURE__ */ createElementVNode(
|
|
|
1441
1448
|
-1
|
|
1442
1449
|
/* HOISTED */
|
|
1443
1450
|
);
|
|
1444
|
-
const
|
|
1445
|
-
const
|
|
1446
|
-
const
|
|
1447
|
-
const
|
|
1451
|
+
const _hoisted_7 = { class: "bean-counts spa-between" };
|
|
1452
|
+
const _hoisted_8 = { class: "counts number" };
|
|
1453
|
+
const _hoisted_9 = { class: "search-time" };
|
|
1454
|
+
const _hoisted_10 = /* @__PURE__ */ createElementVNode(
|
|
1448
1455
|
"div",
|
|
1449
1456
|
{ class: "title" },
|
|
1450
1457
|
"\u6536\u652F\u660E\u7EC6",
|
|
1451
1458
|
-1
|
|
1452
1459
|
/* HOISTED */
|
|
1453
1460
|
);
|
|
1454
|
-
const
|
|
1455
|
-
const
|
|
1461
|
+
const _hoisted_11 = { class: "text number" };
|
|
1462
|
+
const _hoisted_12 = /* @__PURE__ */ createElementVNode(
|
|
1456
1463
|
"img",
|
|
1457
1464
|
{
|
|
1458
1465
|
style: { "margin-top": "-2px" },
|
|
@@ -1463,14 +1470,14 @@ const _hoisted_11 = /* @__PURE__ */ createElementVNode(
|
|
|
1463
1470
|
-1
|
|
1464
1471
|
/* HOISTED */
|
|
1465
1472
|
);
|
|
1466
|
-
const
|
|
1473
|
+
const _hoisted_13 = /* @__PURE__ */ createElementVNode(
|
|
1467
1474
|
"span",
|
|
1468
1475
|
{ class: "text" },
|
|
1469
1476
|
"\u7B5B\u9009",
|
|
1470
1477
|
-1
|
|
1471
1478
|
/* HOISTED */
|
|
1472
1479
|
);
|
|
1473
|
-
const
|
|
1480
|
+
const _hoisted_14 = /* @__PURE__ */ createElementVNode(
|
|
1474
1481
|
"img",
|
|
1475
1482
|
{
|
|
1476
1483
|
class: "time-icon",
|
|
@@ -1480,24 +1487,24 @@ const _hoisted_13 = /* @__PURE__ */ createElementVNode(
|
|
|
1480
1487
|
-1
|
|
1481
1488
|
/* HOISTED */
|
|
1482
1489
|
);
|
|
1483
|
-
const
|
|
1484
|
-
|
|
1485
|
-
|
|
1490
|
+
const _hoisted_15 = [
|
|
1491
|
+
_hoisted_13,
|
|
1492
|
+
_hoisted_14
|
|
1486
1493
|
];
|
|
1487
|
-
const
|
|
1488
|
-
const
|
|
1494
|
+
const _hoisted_16 = { class: "operation-list" };
|
|
1495
|
+
const _hoisted_17 = {
|
|
1489
1496
|
key: 0,
|
|
1490
1497
|
class: "box"
|
|
1491
1498
|
};
|
|
1492
|
-
const
|
|
1493
|
-
const
|
|
1494
|
-
const
|
|
1495
|
-
const
|
|
1496
|
-
const
|
|
1497
|
-
const
|
|
1498
|
-
const
|
|
1499
|
-
const
|
|
1500
|
-
const
|
|
1499
|
+
const _hoisted_18 = { class: "title number" };
|
|
1500
|
+
const _hoisted_19 = { class: "item-type" };
|
|
1501
|
+
const _hoisted_20 = { class: "item-detail" };
|
|
1502
|
+
const _hoisted_21 = { class: "item-info spa-between" };
|
|
1503
|
+
const _hoisted_22 = { class: "item-info-type" };
|
|
1504
|
+
const _hoisted_23 = { class: "item-info-title" };
|
|
1505
|
+
const _hoisted_24 = { class: "item-info-amount number" };
|
|
1506
|
+
const _hoisted_25 = { class: "item-detail-remark" };
|
|
1507
|
+
const _hoisted_26 = {
|
|
1501
1508
|
key: 0,
|
|
1502
1509
|
class: "box-not-text"
|
|
1503
1510
|
};
|
|
@@ -1509,6 +1516,7 @@ var script$1 = /* @__PURE__ */ defineComponent({
|
|
|
1509
1516
|
emits: ["recharge"],
|
|
1510
1517
|
setup(__props, { emit: __emit }) {
|
|
1511
1518
|
const safeArea = useSafeArea();
|
|
1519
|
+
const refreshing = ref(false);
|
|
1512
1520
|
const props = __props;
|
|
1513
1521
|
const emit = __emit;
|
|
1514
1522
|
const filterOpen = ref(false);
|
|
@@ -1619,29 +1627,26 @@ var script$1 = /* @__PURE__ */ defineComponent({
|
|
|
1619
1627
|
filtering.page++;
|
|
1620
1628
|
loadConsumptions(true);
|
|
1621
1629
|
}
|
|
1622
|
-
const
|
|
1623
|
-
|
|
1630
|
+
const scrolled = ref(0);
|
|
1631
|
+
const onScroll = (e) => {
|
|
1624
1632
|
const { scrollTop } = e;
|
|
1625
|
-
|
|
1626
|
-
}
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
Taro.stopPullDownRefresh();
|
|
1630
|
-
return;
|
|
1631
|
-
}
|
|
1633
|
+
scrolled.value = scrollTop;
|
|
1634
|
+
};
|
|
1635
|
+
const onPullDownRefresh = () => {
|
|
1636
|
+
refreshing.value = true;
|
|
1632
1637
|
loadBalance();
|
|
1633
1638
|
setTimeout(() => {
|
|
1634
|
-
|
|
1639
|
+
refreshing.value = false;
|
|
1635
1640
|
}, 500);
|
|
1636
|
-
}
|
|
1637
|
-
|
|
1641
|
+
};
|
|
1642
|
+
const onReachBottom = () => {
|
|
1638
1643
|
if (reachedLastPage.value) {
|
|
1639
1644
|
return false;
|
|
1640
1645
|
}
|
|
1641
1646
|
loadNextPage();
|
|
1642
|
-
}
|
|
1643
|
-
const
|
|
1644
|
-
return rulesPopupOpen.value || datePickerOpen.value || filterOpen.value;
|
|
1647
|
+
};
|
|
1648
|
+
const isAnyPopupOpen = computed(() => {
|
|
1649
|
+
return rulesPopupOpen.value || datePickerOpen.value || filterOpen.value || secondBalanceOpen.value;
|
|
1645
1650
|
});
|
|
1646
1651
|
const secondBalanceOpen = ref(false);
|
|
1647
1652
|
function onSecondBalanceButtonClick() {
|
|
@@ -1664,176 +1669,190 @@ var script$1 = /* @__PURE__ */ defineComponent({
|
|
|
1664
1669
|
filtering.dateTo = dayjs().format("YYYY-MM-DD");
|
|
1665
1670
|
filtering.dateFrom = dayjs().add(-3, "M").format("YYYY-MM-DD");
|
|
1666
1671
|
}
|
|
1672
|
+
function onPageHeaderClose() {
|
|
1673
|
+
Taro.navigateBack({
|
|
1674
|
+
delta: 1
|
|
1675
|
+
});
|
|
1676
|
+
}
|
|
1667
1677
|
onMounted(() => {
|
|
1668
1678
|
resetDateRange();
|
|
1669
1679
|
});
|
|
1670
1680
|
return (_ctx, _cache) => {
|
|
1681
|
+
const _component_scroll_view = resolveComponent("scroll-view");
|
|
1671
1682
|
const _component_nut_popup = resolveComponent("nut-popup");
|
|
1672
1683
|
return openBlock(), createElementBlock(
|
|
1673
1684
|
Fragment,
|
|
1674
1685
|
null,
|
|
1675
1686
|
[
|
|
1676
|
-
|
|
1677
|
-
"
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
createElementVNode("div",
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
createElementVNode("div",
|
|
1695
|
-
_hoisted_5$1,
|
|
1687
|
+
createVNode(_component_scroll_view, {
|
|
1688
|
+
class: normalizeClass(["account-view", { popupOpen: isAnyPopupOpen.value }]),
|
|
1689
|
+
"scroll-y": !isAnyPopupOpen.value,
|
|
1690
|
+
"refresher-enabled": !isAnyPopupOpen.value,
|
|
1691
|
+
"refresher-triggered": refreshing.value,
|
|
1692
|
+
onScroll,
|
|
1693
|
+
onRefresherrefresh: onPullDownRefresh,
|
|
1694
|
+
"lower-threshold": 50,
|
|
1695
|
+
onScrolltolower: onReachBottom
|
|
1696
|
+
}, {
|
|
1697
|
+
default: withCtx(() => [
|
|
1698
|
+
createElementVNode("div", _hoisted_1$1, [
|
|
1699
|
+
createVNode(unref(script$b), {
|
|
1700
|
+
"color-mode": "dark",
|
|
1701
|
+
title: "\u6211\u7684\u8D26\u6237",
|
|
1702
|
+
class: normalizeClass({ "with-background": scrolled.value > 0 }),
|
|
1703
|
+
onClose: onPageHeaderClose
|
|
1704
|
+
}, null, 8, ["class"]),
|
|
1705
|
+
createElementVNode("div", { class: "row jusify-right" }, [
|
|
1696
1706
|
createElementVNode("div", {
|
|
1697
|
-
class: "
|
|
1698
|
-
onClick:
|
|
1699
|
-
},
|
|
1707
|
+
class: "small-bean-button",
|
|
1708
|
+
onClick: onSecondBalanceButtonClick
|
|
1709
|
+
}, [..._hoisted_3$1])
|
|
1700
1710
|
]),
|
|
1701
|
-
createElementVNode("div",
|
|
1702
|
-
createElementVNode(
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
),
|
|
1709
|
-
createElementVNode("div", {
|
|
1710
|
-
class: "pay",
|
|
1711
|
-
onClick: gotoRecharge
|
|
1712
|
-
}, "\u4E91\u8C46\u5145\u503C")
|
|
1713
|
-
])
|
|
1714
|
-
]),
|
|
1715
|
-
createElementVNode(
|
|
1716
|
-
"div",
|
|
1717
|
-
{
|
|
1718
|
-
class: normalizeClass(["operation-title spa-between", { "with-shadow": scrollY.value > 0 }]),
|
|
1719
|
-
style: normalizeStyle({ top: `${unref(safeArea).status + unref(safeArea).nav}px` })
|
|
1720
|
-
},
|
|
1721
|
-
[
|
|
1722
|
-
createElementVNode("div", _hoisted_8, [
|
|
1723
|
-
_hoisted_9,
|
|
1724
|
-
withDirectives(createElementVNode(
|
|
1725
|
-
"div",
|
|
1726
|
-
{
|
|
1727
|
-
class: "time",
|
|
1728
|
-
onClick: openDateFilter
|
|
1729
|
-
},
|
|
1730
|
-
[
|
|
1731
|
-
createElementVNode(
|
|
1732
|
-
"div",
|
|
1733
|
-
_hoisted_10,
|
|
1734
|
-
toDisplayString(dateRangeDisplay.value),
|
|
1735
|
-
1
|
|
1736
|
-
/* TEXT */
|
|
1737
|
-
),
|
|
1738
|
-
_hoisted_11
|
|
1739
|
-
],
|
|
1740
|
-
512
|
|
1741
|
-
/* NEED_PATCH */
|
|
1742
|
-
), [
|
|
1743
|
-
[vShow, filtering.dateFrom]
|
|
1744
|
-
])
|
|
1711
|
+
createElementVNode("div", _hoisted_4$1, [
|
|
1712
|
+
createElementVNode("div", _hoisted_5$1, [
|
|
1713
|
+
_hoisted_6,
|
|
1714
|
+
createElementVNode("div", {
|
|
1715
|
+
class: "rule",
|
|
1716
|
+
onClick: _cache[0] || (_cache[0] = ($event) => rulesPopupOpen.value = true)
|
|
1717
|
+
}, "\u89C4\u5219\u8BF4\u660E")
|
|
1745
1718
|
]),
|
|
1746
|
-
createElementVNode("div",
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1719
|
+
createElementVNode("div", _hoisted_7, [
|
|
1720
|
+
createElementVNode(
|
|
1721
|
+
"div",
|
|
1722
|
+
_hoisted_8,
|
|
1723
|
+
toDisplayString(balance.value.total || 0),
|
|
1724
|
+
1
|
|
1725
|
+
/* TEXT */
|
|
1726
|
+
),
|
|
1727
|
+
createElementVNode("div", {
|
|
1728
|
+
class: "pay",
|
|
1729
|
+
onClick: gotoRecharge
|
|
1730
|
+
}, "\u4E91\u8C46\u5145\u503C")
|
|
1731
|
+
])
|
|
1732
|
+
]),
|
|
1733
|
+
createElementVNode(
|
|
1734
|
+
"div",
|
|
1735
|
+
{
|
|
1736
|
+
class: normalizeClass(["operation-title spa-between", { "with-shadow": scrolled.value > 0 }]),
|
|
1737
|
+
style: normalizeStyle({ top: `${unref(safeArea).status + unref(safeArea).nav}px` })
|
|
1738
|
+
},
|
|
1739
|
+
[
|
|
1740
|
+
createElementVNode("div", _hoisted_9, [
|
|
1741
|
+
_hoisted_10,
|
|
1742
|
+
withDirectives(createElementVNode(
|
|
1743
|
+
"div",
|
|
1744
|
+
{
|
|
1745
|
+
class: "time",
|
|
1746
|
+
onClick: openDateFilter
|
|
1747
|
+
},
|
|
1748
|
+
[
|
|
1749
|
+
createElementVNode(
|
|
1750
|
+
"div",
|
|
1751
|
+
_hoisted_11,
|
|
1752
|
+
toDisplayString(dateRangeDisplay.value),
|
|
1753
|
+
1
|
|
1754
|
+
/* TEXT */
|
|
1755
|
+
),
|
|
1756
|
+
_hoisted_12
|
|
1757
|
+
],
|
|
1758
|
+
512
|
|
1759
|
+
/* NEED_PATCH */
|
|
1760
|
+
), [
|
|
1761
|
+
[vShow, filtering.dateFrom]
|
|
1762
|
+
])
|
|
1763
|
+
]),
|
|
1764
|
+
createElementVNode("div", {
|
|
1765
|
+
class: "search",
|
|
1766
|
+
onClick: _cache[1] || (_cache[1] = ($event) => filterOpen.value = true)
|
|
1767
|
+
}, [..._hoisted_15])
|
|
1768
|
+
],
|
|
1769
|
+
6
|
|
1770
|
+
/* CLASS, STYLE */
|
|
1771
|
+
),
|
|
1772
|
+
createElementVNode("div", _hoisted_16, [
|
|
1773
|
+
consumptionGroups.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_17, [
|
|
1774
|
+
(openBlock(true), createElementBlock(
|
|
1775
|
+
Fragment,
|
|
1776
|
+
null,
|
|
1777
|
+
renderList(consumptionGroups.value, (item, index) => {
|
|
1778
|
+
return openBlock(), createElementBlock("div", {
|
|
1779
|
+
class: "box-detail",
|
|
1780
|
+
key: index
|
|
1781
|
+
}, [
|
|
1782
|
+
createElementVNode(
|
|
1783
|
+
"div",
|
|
1784
|
+
_hoisted_18,
|
|
1785
|
+
toDisplayString(item.date),
|
|
1786
|
+
1
|
|
1787
|
+
/* TEXT */
|
|
1788
|
+
),
|
|
1789
|
+
(openBlock(true), createElementBlock(
|
|
1790
|
+
Fragment,
|
|
1791
|
+
null,
|
|
1792
|
+
renderList(item.consumptions, (it, i) => {
|
|
1793
|
+
return openBlock(), createElementBlock("div", {
|
|
1794
|
+
class: "item",
|
|
1795
|
+
key: i
|
|
1796
|
+
}, [
|
|
1797
|
+
createElementVNode(
|
|
1798
|
+
"div",
|
|
1799
|
+
_hoisted_19,
|
|
1800
|
+
toDisplayString(it.\u4EA4\u6613\u7C7B\u578B),
|
|
1801
|
+
1
|
|
1802
|
+
/* TEXT */
|
|
1803
|
+
),
|
|
1787
1804
|
createElementVNode("div", _hoisted_20, [
|
|
1788
|
-
createElementVNode("div",
|
|
1805
|
+
createElementVNode("div", _hoisted_21, [
|
|
1806
|
+
createElementVNode("div", null, [
|
|
1807
|
+
createElementVNode(
|
|
1808
|
+
"div",
|
|
1809
|
+
_hoisted_22,
|
|
1810
|
+
toDisplayString(it.\u8D26\u6237\u7C7B\u578B),
|
|
1811
|
+
1
|
|
1812
|
+
/* TEXT */
|
|
1813
|
+
),
|
|
1814
|
+
createElementVNode(
|
|
1815
|
+
"div",
|
|
1816
|
+
_hoisted_23,
|
|
1817
|
+
toDisplayString(it.title),
|
|
1818
|
+
1
|
|
1819
|
+
/* TEXT */
|
|
1820
|
+
)
|
|
1821
|
+
]),
|
|
1789
1822
|
createElementVNode(
|
|
1790
1823
|
"div",
|
|
1791
|
-
|
|
1792
|
-
toDisplayString(it.\
|
|
1793
|
-
1
|
|
1794
|
-
/* TEXT */
|
|
1795
|
-
),
|
|
1796
|
-
createElementVNode(
|
|
1797
|
-
"div",
|
|
1798
|
-
_hoisted_22,
|
|
1799
|
-
toDisplayString(it.title),
|
|
1824
|
+
_hoisted_24,
|
|
1825
|
+
toDisplayString(it.\u6536\u5165\u8FD8\u662F\u652F\u51FA == "\u652F\u51FA" ? "-" : "+") + toDisplayString(it.amount),
|
|
1800
1826
|
1
|
|
1801
1827
|
/* TEXT */
|
|
1802
1828
|
)
|
|
1803
1829
|
]),
|
|
1804
1830
|
createElementVNode(
|
|
1805
1831
|
"div",
|
|
1806
|
-
|
|
1807
|
-
toDisplayString(it
|
|
1832
|
+
_hoisted_25,
|
|
1833
|
+
toDisplayString(it.description),
|
|
1808
1834
|
1
|
|
1809
1835
|
/* TEXT */
|
|
1810
1836
|
)
|
|
1811
|
-
])
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
]);
|
|
1826
|
-
}),
|
|
1827
|
-
128
|
|
1828
|
-
/* KEYED_FRAGMENT */
|
|
1829
|
-
)),
|
|
1830
|
-
reachedLastPage.value ? (openBlock(), createElementBlock("div", _hoisted_25, "\u6CA1\u6709\u66F4\u591A\u4E86")) : createCommentVNode("v-if", true)
|
|
1831
|
-
])) : (openBlock(), createBlock(script$3, { key: 1 }))
|
|
1837
|
+
])
|
|
1838
|
+
]);
|
|
1839
|
+
}),
|
|
1840
|
+
128
|
|
1841
|
+
/* KEYED_FRAGMENT */
|
|
1842
|
+
))
|
|
1843
|
+
]);
|
|
1844
|
+
}),
|
|
1845
|
+
128
|
|
1846
|
+
/* KEYED_FRAGMENT */
|
|
1847
|
+
)),
|
|
1848
|
+
reachedLastPage.value ? (openBlock(), createElementBlock("div", _hoisted_26, "\u6CA1\u6709\u66F4\u591A\u4E86")) : createCommentVNode("v-if", true)
|
|
1849
|
+
])) : (openBlock(), createBlock(script$3, { key: 1 }))
|
|
1850
|
+
])
|
|
1832
1851
|
])
|
|
1833
|
-
],
|
|
1834
|
-
|
|
1835
|
-
/*
|
|
1836
|
-
),
|
|
1852
|
+
]),
|
|
1853
|
+
_: 1
|
|
1854
|
+
/* STABLE */
|
|
1855
|
+
}, 8, ["class", "scroll-y", "refresher-enabled", "refresher-triggered"]),
|
|
1837
1856
|
createVNode(_component_nut_popup, {
|
|
1838
1857
|
"pop-class": "consumption-rules-popup",
|
|
1839
1858
|
visible: rulesPopupOpen.value,
|
package/package.json
CHANGED
|
@@ -1,79 +1,90 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
<scroll-view class="account-view"
|
|
3
|
+
:class="{ popupOpen: isAnyPopupOpen }"
|
|
4
|
+
:scroll-y="!isAnyPopupOpen"
|
|
5
|
+
:refresher-enabled="!isAnyPopupOpen"
|
|
6
|
+
:refresher-triggered="refreshing"
|
|
7
|
+
@scroll="onScroll"
|
|
8
|
+
@refresherrefresh="onPullDownRefresh"
|
|
9
|
+
:lower-threshold="50"
|
|
10
|
+
@scrolltolower="onReachBottom">
|
|
11
|
+
<div class="scroll-content">
|
|
12
|
+
<page-header color-mode="dark" title="我的账户"
|
|
13
|
+
:class="{'with-background': scrolled > 0}"
|
|
14
|
+
@close="onPageHeaderClose" />
|
|
15
|
+
<div class="row jusify-right">
|
|
16
|
+
<div class="small-bean-button" @click="onSecondBalanceButtonClick">
|
|
17
|
+
<label>小云豆余额</label>
|
|
17
18
|
</div>
|
|
18
|
-
<div class="rule" @click="rulesPopupOpen = true">规则说明</div>
|
|
19
19
|
</div>
|
|
20
|
-
<div class="
|
|
21
|
-
<div class="
|
|
22
|
-
|
|
20
|
+
<div class="balance">
|
|
21
|
+
<div class="bean-box spa-between">
|
|
22
|
+
<div class="bean-img">
|
|
23
|
+
<img
|
|
24
|
+
class="bean-icon"
|
|
25
|
+
src="https://cdn.ddjf.com/static/images/bpms-workBench/gold-bean.png" />
|
|
26
|
+
<div class="bean-tag tag">云豆</div>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="rule" @click="rulesPopupOpen = true">规则说明</div>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="bean-counts spa-between">
|
|
31
|
+
<div class="counts number">{{ balance.total || 0 }}</div>
|
|
32
|
+
<div class="pay" @click="gotoRecharge">云豆充值</div>
|
|
33
|
+
</div>
|
|
23
34
|
</div>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
35
|
+
<div class="operation-title spa-between"
|
|
36
|
+
:class="{'with-shadow': scrolled > 0}"
|
|
37
|
+
:style="{top: `${safeArea.status + safeArea.nav}px`}">
|
|
38
|
+
<div class="search-time">
|
|
39
|
+
<div class="title">收支明细</div>
|
|
40
|
+
<div class="time" @click="openDateFilter" v-show="filtering.dateFrom">
|
|
41
|
+
<div class="text number">{{ dateRangeDisplay }}</div>
|
|
42
|
+
<img
|
|
43
|
+
style="margin-top: -2px"
|
|
44
|
+
class="time-icon"
|
|
45
|
+
src="https://cdn.ddjf.com/static/images/bpms-workBench/clound-bean-down.png" />
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="search" @click="filterOpen = true">
|
|
49
|
+
<span class="text">筛选</span>
|
|
32
50
|
<img
|
|
33
|
-
style="margin-top: -2px"
|
|
34
51
|
class="time-icon"
|
|
35
|
-
src="https://cdn.ddjf.com/static/images/bpms-workBench/clound-bean-
|
|
52
|
+
src="https://cdn.ddjf.com/static/images/bpms-workBench/clound-bean-select-icon.png" />
|
|
36
53
|
</div>
|
|
37
54
|
</div>
|
|
38
|
-
<div class="
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
<div class="item-info-type">
|
|
60
|
-
{{ it.账户类型 }}
|
|
55
|
+
<div class="operation-list">
|
|
56
|
+
<div class="box" v-if="consumptionGroups.length > 0">
|
|
57
|
+
<div class="box-detail" v-for="(item, index) in consumptionGroups" :key="index">
|
|
58
|
+
<div class="title number">{{ item.date }}</div>
|
|
59
|
+
<div
|
|
60
|
+
class="item"
|
|
61
|
+
v-for="(it, i) in item.consumptions"
|
|
62
|
+
:key="i">
|
|
63
|
+
<div class="item-type">
|
|
64
|
+
{{ it.交易类型 }}
|
|
65
|
+
</div>
|
|
66
|
+
<div class="item-detail">
|
|
67
|
+
<div class="item-info spa-between">
|
|
68
|
+
<div>
|
|
69
|
+
<div class="item-info-type">
|
|
70
|
+
{{ it.账户类型 }}
|
|
71
|
+
</div>
|
|
72
|
+
<div class="item-info-title">{{ it.title }}</div>
|
|
73
|
+
</div>
|
|
74
|
+
<div class="item-info-amount number">
|
|
75
|
+
{{ it.收入还是支出 == '支出' ? '-' : '+' }}{{ it.amount }}
|
|
61
76
|
</div>
|
|
62
|
-
<div class="item-info-title">{{ it.title }}</div>
|
|
63
|
-
</div>
|
|
64
|
-
<div class="item-info-amount number">
|
|
65
|
-
{{ it.收入还是支出 == '支出' ? '-' : '+' }}{{ it.amount }}
|
|
66
77
|
</div>
|
|
78
|
+
<div class="item-detail-remark">{{ it.description }}</div>
|
|
67
79
|
</div>
|
|
68
|
-
<div class="item-detail-remark">{{ it.description }}</div>
|
|
69
80
|
</div>
|
|
70
81
|
</div>
|
|
82
|
+
<div class="box-not-text" v-if="reachedLastPage">没有更多了</div>
|
|
71
83
|
</div>
|
|
72
|
-
<
|
|
84
|
+
<empty-view v-else></empty-view>
|
|
73
85
|
</div>
|
|
74
|
-
<empty-view v-else></empty-view>
|
|
75
86
|
</div>
|
|
76
|
-
</
|
|
87
|
+
</scroll-view>
|
|
77
88
|
<nut-popup
|
|
78
89
|
pop-class="consumption-rules-popup"
|
|
79
90
|
v-model:visible="rulesPopupOpen"
|
|
@@ -114,7 +125,7 @@
|
|
|
114
125
|
</template>
|
|
115
126
|
|
|
116
127
|
<script lang="ts" setup>
|
|
117
|
-
import Taro, { useDidShow
|
|
128
|
+
import Taro, { useDidShow } from '@tarojs/taro'
|
|
118
129
|
import { computed, onMounted, reactive, ref, watch } from 'vue'
|
|
119
130
|
import { endpoints, useHttp } from '../api'
|
|
120
131
|
import { 账户流水筛选项, Balance, ConsumptionGroup, 账户流水 } from '../types'
|
|
@@ -129,6 +140,8 @@ import { useSafeArea } from '../../shared'
|
|
|
129
140
|
|
|
130
141
|
const safeArea = useSafeArea()
|
|
131
142
|
|
|
143
|
+
const refreshing = ref(false)
|
|
144
|
+
|
|
132
145
|
type AccountViewProps = {
|
|
133
146
|
app: string
|
|
134
147
|
}
|
|
@@ -241,15 +254,15 @@ async function loadConsumptions (append: boolean = false) {
|
|
|
241
254
|
app: props.app,
|
|
242
255
|
...filtering
|
|
243
256
|
}).then(response => {
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
257
|
+
consumptionGroups.value = groupDataByDate(response.data)
|
|
258
|
+
if (filtering.page >= response.totalPages) {
|
|
259
|
+
filtering.page = response.totalPages
|
|
260
|
+
reachedLastPage.value = true
|
|
261
|
+
} else {
|
|
262
|
+
reachedLastPage.value = false
|
|
263
|
+
}
|
|
264
|
+
Taro.hideLoading()
|
|
265
|
+
})
|
|
253
266
|
}
|
|
254
267
|
|
|
255
268
|
/**
|
|
@@ -289,38 +302,49 @@ function loadNextPage () {
|
|
|
289
302
|
loadConsumptions(true)
|
|
290
303
|
}
|
|
291
304
|
|
|
305
|
+
// 以下这一大段处理下拉刷新、上滑分页以及弹窗与页面滑动的逻辑
|
|
306
|
+
const scrolled = ref<number>(0)
|
|
292
307
|
|
|
293
|
-
|
|
294
|
-
|
|
308
|
+
/**
|
|
309
|
+
* 记录 scroll-view 滚动的位置
|
|
310
|
+
*/
|
|
311
|
+
const onScroll = (e) => {
|
|
295
312
|
const { scrollTop } = e
|
|
296
|
-
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
usePullDownRefresh(() => {
|
|
300
|
-
if (popupOpen.value) {
|
|
301
|
-
Taro.stopPullDownRefresh()
|
|
302
|
-
return
|
|
303
|
-
}
|
|
313
|
+
scrolled.value = scrollTop
|
|
314
|
+
}
|
|
304
315
|
|
|
305
|
-
|
|
316
|
+
/**
|
|
317
|
+
* 下拉刷新 pull down refresh
|
|
318
|
+
*/
|
|
319
|
+
const onPullDownRefresh = () => {
|
|
320
|
+
refreshing.value = true
|
|
321
|
+
// 重新请求余额数据
|
|
306
322
|
loadBalance()
|
|
307
323
|
setTimeout(() => {
|
|
308
|
-
|
|
324
|
+
refreshing.value = false
|
|
309
325
|
}, 500);
|
|
310
|
-
}
|
|
326
|
+
}
|
|
311
327
|
|
|
312
328
|
/**
|
|
313
329
|
* 滑动到底部请求下一页并合并查询结果
|
|
314
330
|
*/
|
|
315
|
-
|
|
331
|
+
const onReachBottom = () => {
|
|
316
332
|
if (reachedLastPage.value) {
|
|
317
333
|
return false
|
|
318
334
|
}
|
|
319
335
|
loadNextPage()
|
|
320
|
-
}
|
|
336
|
+
}
|
|
321
337
|
|
|
322
|
-
|
|
323
|
-
|
|
338
|
+
/**
|
|
339
|
+
* 浮窗弹出时不允许
|
|
340
|
+
* 1. 下拉刷新
|
|
341
|
+
* 2. 上滑分页
|
|
342
|
+
*/
|
|
343
|
+
const isAnyPopupOpen = computed(() => {
|
|
344
|
+
return rulesPopupOpen.value ||
|
|
345
|
+
datePickerOpen.value ||
|
|
346
|
+
filterOpen.value ||
|
|
347
|
+
secondBalanceOpen.value
|
|
324
348
|
})
|
|
325
349
|
|
|
326
350
|
const secondBalanceOpen = ref<boolean>(false)
|
|
@@ -353,6 +377,12 @@ function resetDateRange () {
|
|
|
353
377
|
filtering.dateFrom = dayjs().add(-3, 'M').format('YYYY-MM-DD')
|
|
354
378
|
}
|
|
355
379
|
|
|
380
|
+
function onPageHeaderClose () {
|
|
381
|
+
Taro.navigateBack({
|
|
382
|
+
delta: 1
|
|
383
|
+
})
|
|
384
|
+
}
|
|
385
|
+
|
|
356
386
|
onMounted(() => {
|
|
357
387
|
resetDateRange()
|
|
358
388
|
})
|
|
@@ -360,9 +390,12 @@ onMounted(() => {
|
|
|
360
390
|
|
|
361
391
|
<style lang="scss">
|
|
362
392
|
.account-view {
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
393
|
+
height: 100vh;
|
|
394
|
+
.scroll-content {
|
|
395
|
+
background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzUwIiBoZWlnaHQ9IjQwNiIgdmlld0JveD0iMCAwIDc1MCA0MDYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0zODIuNSA0MDcuNUM1NzcuMzU3IDQwNy41IDc1My43ODggMzgxLjI0OCA4ODEuNTIxIDMzOC43OTFDOTQ1LjM4NiAzMTcuNTYzIDk5Ny4xMDQgMjkyLjI3NiAxMDMyLjg3IDI2NC4xNzFDMTA2OC42MiAyMzYuMDcxIDEwODguNSAyMDUuMDk3IDEwODguNSAxNzIuNUMxMDg4LjUgMTM5LjkwMyAxMDY4LjYyIDEwOC45MjkgMTAzMi44NyA4MC44Mjg5Qzk5Ny4xMDQgNTIuNzI0NSA5NDUuMzg2IDI3LjQzNjcgODgxLjUyMSA2LjIwODk4Qzc1My43ODggLTM2LjI0ODIgNTc3LjM1NyAtNjIuNSAzODIuNSAtNjIuNUMxODcuNjQzIC02Mi41IDExLjIxMjIgLTM2LjI0ODIgLTExNi41MjIgNi4yMDg5OEMtMTgwLjM4NiAyNy40MzY3IC0yMzIuMTA0IDUyLjcyNDUgLTI2Ny44NjcgODAuODI4OUMtMzAzLjYyNCAxMDguOTI5IC0zMjMuNSAxMzkuOTAzIC0zMjMuNSAxNzIuNUMtMzIzLjUgMjA1LjA5NyAtMzAzLjYyNCAyMzYuMDcxIC0yNjcuODY3IDI2NC4xNzFDLTIzMi4xMDQgMjkyLjI3NiAtMTgwLjM4NiAzMTcuNTYzIC0xMTYuNTIyIDMzOC43OTFDMTEuMjEyMiAzODEuMjQ4IDE4Ny42NDMgNDA3LjUgMzgyLjUgNDA3LjVaIiBmaWxsPSIjM0IzOTNDIiBzdHJva2U9ImJsYWNrIi8+Cjwvc3ZnPgo=");
|
|
396
|
+
background-position: center -200px;
|
|
397
|
+
background-repeat: no-repeat;
|
|
398
|
+
}
|
|
366
399
|
.page-header {
|
|
367
400
|
background-color: #3B393C;
|
|
368
401
|
position: sticky;
|
|
@@ -40,6 +40,15 @@ import { endpoints, useHttp } from '../api'
|
|
|
40
40
|
import { Balance } from '../types'
|
|
41
41
|
import { useDidShow } from '@tarojs/taro'
|
|
42
42
|
|
|
43
|
+
type BalanceCardProps = {
|
|
44
|
+
app: string
|
|
45
|
+
}
|
|
46
|
+
const props = withDefaults(
|
|
47
|
+
defineProps<BalanceCardProps>(), {
|
|
48
|
+
app: ''
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
|
|
43
52
|
const balance = ref<Balance>({
|
|
44
53
|
total: 0,
|
|
45
54
|
privileges: []
|
|
@@ -52,6 +61,7 @@ const gotoRecharge = () => {
|
|
|
52
61
|
async function loadBalance () {
|
|
53
62
|
const $http = useHttp()
|
|
54
63
|
$http.get<Balance>(endpoints.获取余额明细, {
|
|
64
|
+
app: props.app
|
|
55
65
|
}).then(data => {
|
|
56
66
|
balance.value = data
|
|
57
67
|
})
|
|
@@ -33,10 +33,12 @@ export function useSafeArea (): SafeArea {
|
|
|
33
33
|
* 据说是胶囊上下间距
|
|
34
34
|
*/
|
|
35
35
|
gap = capsule.top - status,
|
|
36
|
-
nav = capsule.height + gap * 2
|
|
36
|
+
nav = capsule.height + gap * 2,
|
|
37
|
+
safeAreaBottom = systemInfo.safeArea?.bottom || 0,
|
|
38
|
+
bottom = systemInfo.screenHeight - safeAreaBottom
|
|
37
39
|
return {
|
|
38
40
|
status,
|
|
39
41
|
nav,
|
|
40
|
-
bottom
|
|
42
|
+
bottom
|
|
41
43
|
}
|
|
42
44
|
}
|