@uxda/appkit 1.1.2 → 1.2.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/README.md +26 -1
- package/dist/appkit.css +95 -12
- package/dist/index.js +939 -184
- package/package.json +1 -1
- package/src/balance/api/endpoints.ts +55 -56
- package/src/balance/components/AccountView.vue +196 -178
- package/src/balance/components/BalanceCard.vue +74 -62
- package/src/balance/components/ConsumptionRules.vue +7 -9
- package/src/balance/components/SecondBalance.vue +18 -21
- package/src/balance/types.ts +41 -50
- package/src/components/dd-area/index.vue +210 -0
- package/src/components/dd-icon/doc.md +21 -0
- package/src/components/dd-icon/index.vue +23 -0
- package/src/components/dd-selector/index.vue +124 -0
- package/src/components/ocr-id/index.vue +111 -0
- package/src/components/ocr-id/types.d.ts +13 -0
- package/src/index.ts +9 -0
- package/src/register/components/SelfRegistration.vue +227 -0
- package/src/register/components/index.ts +3 -0
- package/src/register/index.ts +1 -0
- package/src/shared/composables/index.ts +1 -0
- package/src/shared/composables/useTabbar.ts +24 -0
- package/.vscode/components.code-snippets +0 -61
- package/.vscode/extensions.json +0 -7
- package/.vscode/settings.json +0 -98
|
@@ -4,9 +4,12 @@
|
|
|
4
4
|
<div class="card-row">
|
|
5
5
|
<div class="card-row-left">
|
|
6
6
|
<div class="bean-box">
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
<div class="bean-icon-box">
|
|
8
|
+
<img
|
|
9
|
+
class="bean-icon"
|
|
10
|
+
src="https://cdn.ddjf.com/static/images/bpms-workBench/gold-bean.png"
|
|
11
|
+
/>
|
|
12
|
+
</div>
|
|
10
13
|
<span class="baan-name">云豆</span>
|
|
11
14
|
</div>
|
|
12
15
|
<div class="bean-nums number">{{ balance.total || 0 }}</div>
|
|
@@ -15,18 +18,24 @@
|
|
|
15
18
|
<div class="account-info-entry" @click="gotoDetail">
|
|
16
19
|
<div class="account-info-name">账户明细</div>
|
|
17
20
|
<div class="account-info-icon">
|
|
18
|
-
<img
|
|
21
|
+
<img
|
|
22
|
+
class="icon"
|
|
23
|
+
src="https://cdn.ddjf.com/static/images/bpms-workBench/gold-to.png"
|
|
24
|
+
/>
|
|
19
25
|
</div>
|
|
20
26
|
</div>
|
|
21
27
|
</div>
|
|
22
28
|
</div>
|
|
23
29
|
<div class="line"></div>
|
|
24
30
|
<div class="card-row">
|
|
25
|
-
<div class="card-row-left desc"
|
|
31
|
+
<div class="card-row-left desc">权益使用时自动扣减云豆</div>
|
|
26
32
|
<div class="card-row-right">
|
|
27
33
|
<div class="pay" @click="gotoRecharge">
|
|
28
34
|
<div>充值</div>
|
|
29
|
-
<img
|
|
35
|
+
<img
|
|
36
|
+
class="pay-icon"
|
|
37
|
+
src="https://cdn.ddjf.com/static/images/bpms-workBench/bean-right.png"
|
|
38
|
+
/>
|
|
30
39
|
</div>
|
|
31
40
|
</div>
|
|
32
41
|
</div>
|
|
@@ -35,99 +44,97 @@
|
|
|
35
44
|
</template>
|
|
36
45
|
|
|
37
46
|
<script setup lang="ts">
|
|
38
|
-
import { ref } from
|
|
39
|
-
import { endpoints, useHttp } from
|
|
40
|
-
import { Balance } from
|
|
41
|
-
import { useDidShow } from
|
|
47
|
+
import { ref } from "vue";
|
|
48
|
+
import { endpoints, useHttp } from "../api";
|
|
49
|
+
import { Balance } from "../types";
|
|
50
|
+
import { useDidShow } from "@tarojs/taro";
|
|
42
51
|
|
|
43
52
|
type BalanceCardProps = {
|
|
44
|
-
app: string
|
|
45
|
-
}
|
|
46
|
-
const props = withDefaults(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
)
|
|
53
|
+
app: string;
|
|
54
|
+
};
|
|
55
|
+
const props = withDefaults(defineProps<BalanceCardProps>(), {
|
|
56
|
+
app: "",
|
|
57
|
+
});
|
|
51
58
|
|
|
52
59
|
const balance = ref<Balance>({
|
|
53
60
|
total: 0,
|
|
54
|
-
privileges: []
|
|
55
|
-
})
|
|
61
|
+
privileges: [],
|
|
62
|
+
});
|
|
56
63
|
|
|
57
64
|
const gotoRecharge = () => {
|
|
58
|
-
emit(
|
|
59
|
-
}
|
|
65
|
+
emit("recharge");
|
|
66
|
+
};
|
|
60
67
|
|
|
61
|
-
async function loadBalance
|
|
62
|
-
const $http = useHttp()
|
|
63
|
-
$http
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
+
async function loadBalance() {
|
|
69
|
+
const $http = useHttp();
|
|
70
|
+
$http
|
|
71
|
+
.get<Balance>(endpoints.获取余额明细, {
|
|
72
|
+
app: props.app,
|
|
73
|
+
})
|
|
74
|
+
.then((data) => {
|
|
75
|
+
balance.value = data;
|
|
76
|
+
});
|
|
68
77
|
}
|
|
69
78
|
|
|
70
79
|
const emit = defineEmits([
|
|
71
80
|
/**
|
|
72
81
|
* 跳账户详情
|
|
73
82
|
*/
|
|
74
|
-
|
|
83
|
+
"drill",
|
|
75
84
|
/**
|
|
76
85
|
* 跳充值页
|
|
77
86
|
*/
|
|
78
|
-
|
|
79
|
-
])
|
|
87
|
+
"recharge",
|
|
88
|
+
]);
|
|
80
89
|
|
|
81
|
-
function gotoDetail
|
|
82
|
-
emit(
|
|
90
|
+
function gotoDetail() {
|
|
91
|
+
emit("drill");
|
|
83
92
|
}
|
|
84
93
|
|
|
85
94
|
useDidShow(() => {
|
|
86
|
-
loadBalance()
|
|
87
|
-
})
|
|
95
|
+
loadBalance();
|
|
96
|
+
});
|
|
88
97
|
|
|
89
98
|
defineExpose({
|
|
90
|
-
reload: loadBalance
|
|
91
|
-
})
|
|
92
|
-
|
|
93
|
-
|
|
99
|
+
reload: loadBalance,
|
|
100
|
+
});
|
|
94
101
|
</script>
|
|
95
102
|
|
|
96
103
|
<style lang="scss">
|
|
97
|
-
.account-card{
|
|
98
|
-
.card{
|
|
99
|
-
background: #
|
|
104
|
+
.account-card {
|
|
105
|
+
.card {
|
|
106
|
+
background: #2f2f2f;
|
|
100
107
|
border-radius: 10px;
|
|
101
108
|
padding: 13px 20px;
|
|
102
109
|
margin: 0;
|
|
103
|
-
.card-row{
|
|
110
|
+
.card-row {
|
|
104
111
|
display: flex;
|
|
105
112
|
justify-content: space-between;
|
|
106
113
|
align-items: center;
|
|
107
|
-
.card-row-left{
|
|
114
|
+
.card-row-left {
|
|
108
115
|
display: flex;
|
|
109
116
|
flex-direction: column;
|
|
110
|
-
.bean-box{
|
|
117
|
+
.bean-box {
|
|
111
118
|
display: flex;
|
|
112
119
|
align-items: center;
|
|
113
|
-
.bean-icon-box{
|
|
120
|
+
.bean-icon-box {
|
|
114
121
|
width: 20px;
|
|
115
122
|
height: 20px;
|
|
116
123
|
margin-right: 8px;
|
|
117
|
-
.bean-icon{
|
|
124
|
+
.bean-icon {
|
|
118
125
|
display: block;
|
|
119
126
|
font-size: 0;
|
|
120
127
|
width: 100%;
|
|
121
128
|
height: 100%;
|
|
122
129
|
}
|
|
123
130
|
}
|
|
124
|
-
.baan-name{
|
|
125
|
-
color: #
|
|
131
|
+
.baan-name {
|
|
132
|
+
color: #f3d59d;
|
|
126
133
|
font-weight: 600;
|
|
127
134
|
font-size: 11px;
|
|
128
135
|
}
|
|
129
136
|
}
|
|
130
|
-
.bean-nums{
|
|
137
|
+
.bean-nums {
|
|
131
138
|
color: #fff;
|
|
132
139
|
line-height: 22px;
|
|
133
140
|
font-weight: 500;
|
|
@@ -135,29 +142,29 @@ defineExpose({
|
|
|
135
142
|
margin-top: 3px;
|
|
136
143
|
}
|
|
137
144
|
}
|
|
138
|
-
.desc{
|
|
145
|
+
.desc {
|
|
139
146
|
font-size: 10px;
|
|
140
147
|
color: #ccc;
|
|
141
148
|
line-height: 14px;
|
|
142
149
|
}
|
|
143
150
|
}
|
|
144
|
-
.line{
|
|
151
|
+
.line {
|
|
145
152
|
margin: 6px 0px 8px 0px;
|
|
146
153
|
height: 0.5px;
|
|
147
154
|
background: rgb(195, 195, 195);
|
|
148
155
|
opacity: 0.2;
|
|
149
156
|
}
|
|
150
|
-
.card-row-right{
|
|
151
|
-
.pay{
|
|
157
|
+
.card-row-right {
|
|
158
|
+
.pay {
|
|
152
159
|
padding: 0 8px;
|
|
153
160
|
line-height: 18px;
|
|
154
|
-
color: #
|
|
155
|
-
border: 1px solid #
|
|
161
|
+
color: #ffd6a5;
|
|
162
|
+
border: 1px solid #ffd6a5;
|
|
156
163
|
border-radius: 9px;
|
|
157
164
|
font-size: 12px;
|
|
158
165
|
display: flex;
|
|
159
166
|
align-items: center;
|
|
160
|
-
.pay-icon{
|
|
167
|
+
.pay-icon {
|
|
161
168
|
display: block;
|
|
162
169
|
font-size: 0;
|
|
163
170
|
width: 3.5px;
|
|
@@ -165,25 +172,30 @@ defineExpose({
|
|
|
165
172
|
margin-left: 6px;
|
|
166
173
|
}
|
|
167
174
|
}
|
|
168
|
-
.account-info-entry{
|
|
175
|
+
.account-info-entry {
|
|
169
176
|
display: flex;
|
|
170
177
|
align-items: center;
|
|
171
178
|
padding: 0 10px;
|
|
172
179
|
height: 28px;
|
|
173
180
|
line-height: 28px;
|
|
174
181
|
border-radius: 14px;
|
|
175
|
-
background: linear-gradient(
|
|
176
|
-
|
|
182
|
+
background: linear-gradient(
|
|
183
|
+
90deg,
|
|
184
|
+
#ffebc1 0%,
|
|
185
|
+
#ffd7a7 52.29%,
|
|
186
|
+
#ffb875 100%
|
|
187
|
+
);
|
|
188
|
+
.account-info-name {
|
|
177
189
|
color: #975213;
|
|
178
190
|
font-size: 13px;
|
|
179
191
|
font-weight: 500;
|
|
180
192
|
margin-right: 8px;
|
|
181
193
|
}
|
|
182
|
-
.account-info-icon{
|
|
194
|
+
.account-info-icon {
|
|
183
195
|
width: 14px;
|
|
184
196
|
height: 14px;
|
|
185
197
|
border-radius: 7px;
|
|
186
|
-
.icon{
|
|
198
|
+
.icon {
|
|
187
199
|
display: block;
|
|
188
200
|
font-size: 0;
|
|
189
201
|
width: 100%;
|
|
@@ -4,20 +4,20 @@
|
|
|
4
4
|
<div class="desc">
|
|
5
5
|
<div class="desc-title">【云豆】</div>
|
|
6
6
|
<div>
|
|
7
|
-
1
|
|
7
|
+
1、云豆系大道云平台为用户提供的数字化商品,用于大道云平台上的产品权益抵扣使用或者产品权益的兑换。
|
|
8
8
|
</div>
|
|
9
9
|
<div>
|
|
10
10
|
人民币与云豆的兑换比例:1人民币=10云豆。云豆购买成功过后不可转让或者逆向兑换。
|
|
11
11
|
</div>
|
|
12
12
|
<div>
|
|
13
|
-
2
|
|
13
|
+
2、云豆的使用范围:云豆可用于大道云平台各个系统的产品权益抵扣使用或兑换,系统包括但不限于企明星、AI审批、电子签约、蜂鸟周转系统、蜂鸟居间系统。
|
|
14
14
|
</div>
|
|
15
|
-
<div class="desc-title"
|
|
15
|
+
<div class="desc-title">【产品权益】</div>
|
|
16
16
|
<div>
|
|
17
|
-
1
|
|
17
|
+
1、产品权益系大道云平台各个系统产品的使用消耗标准,可直接用于单项产品的使用消耗。产品权益可通过人民币充值购买、云豆兑换或大道云平台赠送获得。产品权益仅用于指定的产品使用消耗,也无法逆向兑换成云豆或人民币。
|
|
18
18
|
</div>
|
|
19
19
|
<div>
|
|
20
|
-
2
|
|
20
|
+
2、产品权益的使用范围:产品权益用于大道云平台各个系统产品的消耗使用,系统包括但不限于企明星、AI审批、电子签约、蜂鸟周转系统、蜂鸟居间系统,各个系统的产品权益仅用于各产品专项使用,无法跨产品使用。
|
|
21
21
|
</div>
|
|
22
22
|
</div>
|
|
23
23
|
<div class="know" @click="emit('complete')">我知道了</div>
|
|
@@ -25,9 +25,7 @@
|
|
|
25
25
|
</template>
|
|
26
26
|
|
|
27
27
|
<script lang="ts" setup>
|
|
28
|
-
|
|
29
|
-
const emit = defineEmits(['complete'])
|
|
30
|
-
|
|
28
|
+
const emit = defineEmits(["complete"]);
|
|
31
29
|
</script>
|
|
32
30
|
<style lang="scss">
|
|
33
31
|
.consumption-rules {
|
|
@@ -67,4 +65,4 @@ const emit = defineEmits(['complete'])
|
|
|
67
65
|
text-align: center;
|
|
68
66
|
}
|
|
69
67
|
}
|
|
70
|
-
</style>
|
|
68
|
+
</style>
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="second-balance">
|
|
3
|
-
<page-header title="
|
|
3
|
+
<page-header title="权益余额" />
|
|
4
4
|
<div class="positions" v-if="data.length">
|
|
5
|
-
<div class="position"
|
|
6
|
-
v-for="(item, index) in data"
|
|
7
|
-
:key="index">
|
|
5
|
+
<div class="position" v-for="(item, index) in data" :key="index">
|
|
8
6
|
<div class="icon"></div>
|
|
9
7
|
<label class="title">{{ item.title }}</label>
|
|
10
|
-
<label class="number amount">{{ item.count }}</label>
|
|
8
|
+
<label class="number amount">{{ item.count }}{{ item.unit }}</label>
|
|
11
9
|
</div>
|
|
12
10
|
</div>
|
|
13
11
|
<empty-view v-else />
|
|
@@ -15,20 +13,18 @@
|
|
|
15
13
|
</template>
|
|
16
14
|
|
|
17
15
|
<script lang="ts" setup>
|
|
18
|
-
import { Privilege } from
|
|
19
|
-
import EmptyView from
|
|
16
|
+
import { Privilege } from "../types";
|
|
17
|
+
import EmptyView from "../../shared/components/EmptyView.vue";
|
|
20
18
|
|
|
21
|
-
//
|
|
19
|
+
// 权益余额
|
|
22
20
|
// 由账户页 AccountView 使用 AppDrawer 弹出
|
|
23
21
|
type SecondBalanceProps = {
|
|
24
|
-
data: Privilege[]
|
|
25
|
-
}
|
|
22
|
+
data: Privilege[];
|
|
23
|
+
};
|
|
26
24
|
|
|
27
|
-
withDefaults(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
)
|
|
25
|
+
withDefaults(defineProps<SecondBalanceProps>(), {
|
|
26
|
+
data: () => [],
|
|
27
|
+
});
|
|
32
28
|
</script>
|
|
33
29
|
|
|
34
30
|
<style lang="scss">
|
|
@@ -38,7 +34,7 @@ withDefaults(
|
|
|
38
34
|
padding: 15px;
|
|
39
35
|
.position {
|
|
40
36
|
border-radius: 5px;
|
|
41
|
-
background: #
|
|
37
|
+
background: #f7f8fa;
|
|
42
38
|
height: 54px;
|
|
43
39
|
display: flex;
|
|
44
40
|
align-items: center;
|
|
@@ -49,9 +45,8 @@ withDefaults(
|
|
|
49
45
|
.icon {
|
|
50
46
|
width: 30px;
|
|
51
47
|
height: 30px;
|
|
52
|
-
background-image:
|
|
53
|
-
|
|
54
|
-
linear-gradient(100deg, #F4E2CE -67.2%, #DEBB9B 98.15%);
|
|
48
|
+
background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTE3LjIyODUgMzcuMjY0M0wxMy43OTk5IDQyLjc1QzEzLjYyODUgNDMuMDkyOSAxMy43OTk5IDQzLjUyMTQgMTQuMjI4NSA0My41MjE0TDE4Ljg1NzEgNDMuNzc4NkMxOS4wMjg1IDQzLjc3ODYgMTkuMTE0MiA0My44NjQzIDE5LjE5OTkgNDMuOTVMMjIuMDI4NSA0Ny43MjE0QzIyLjI4NTcgNDcuOTc4NiAyMi43MTQyIDQ3Ljk3ODYgMjIuODg1NyA0Ny43MjE0TDI2LjE0MjggNDIuMzIxNEMyNi4zMTQyIDQyLjA2NDMgMjYuMjI4NSA0MS44MDcxIDI1Ljk3MTQgNDEuNjM1N0wxNy45MTQyIDM3LjA5MjlDMTcuNjU3MSAzNy4wMDcxIDE3LjM5OTkgMzcuMDkyOSAxNy4yMjg1IDM3LjI2NDNaTTQyLjc3MTQgMzcuMTc4Nkw0Ni4xOTk5IDQyLjY2NDNDNDYuMzcxNCA0My4wMDcxIDQ2LjE5OTkgNDMuNDM1NyA0NS43NzE0IDQzLjQzNTdMNDEuMTQyOCA0My42OTI5QzQwLjk3MTQgNDMuNjkyOSA0MC44ODU3IDQzLjc3ODYgNDAuNzk5OSA0My44NjQzTDM3Ljk3MTQgNDcuNjM1N0MzNy43MTQyIDQ3Ljg5MjkgMzcuMjg1NyA0Ny44OTI5IDM3LjExNDIgNDcuNjM1N0wzMy44NTcxIDQyLjIzNTdDMzMuNjg1NyA0MS45Nzg2IDMzLjc3MTQgNDEuNzIxNCAzNC4wMjg1IDQxLjU1TDQyLjA4NTcgMzcuMDA3MUM0Mi4zNDI4IDM2LjgzNTcgNDIuNTk5OSAzNi45MjE0IDQyLjc3MTQgMzcuMTc4NlpNNDIuMDg1NyAxOC40OTI5TDMxLjE5OTkgMTIuMzIxNEMzMC40Mjg1IDExLjg5MjkgMjkuMzk5OSAxMS44OTI5IDI4LjYyODUgMTIuMzIxNEwxNy44Mjg1IDE4LjQwNzFDMTcuMDU3MSAxOC44MzU3IDE2LjU0MjggMTkuNjkyOSAxNi41NDI4IDIwLjU1VjMyLjgwNzFDMTYuNTQyOCAzMy42NjQzIDE3LjA1NzEgMzQuNTIxNCAxNy44Mjg1IDM0Ljk1TDI4LjcxNDIgNDEuMTIxNEMyOS40ODU3IDQxLjU1IDMwLjUxNDIgNDEuNTUgMzEuMjg1NyA0MS4xMjE0TDQyLjA4NTcgMzUuMTIxNEM0Mi44NTcxIDM0LjY5MjkgNDMuMzcxNCAzMy44MzU3IDQzLjM3MTQgMzIuOTc4NlYyMC43MjE0QzQzLjM3MTQgMTkuNzc4NiA0Mi44NTcxIDE4LjkyMTQgNDIuMDg1NyAxOC40OTI5Wk0zNi45NDI4IDIzLjcyMTRMMzAuNTk5OSAzMi44OTI5QzMwLjQyODUgMzMuMTUgMzAuMDg1NyAzMy4zMjE0IDI5Ljc0MjggMzMuMzIxNEMyOS4zOTk5IDMzLjMyMTQgMjkuMDU3MSAzMy4xNSAyOC44ODU3IDMyLjg5MjlMMjIuNzk5OSAyMy43MjE0QzIyLjQ1NzEgMjMuMjkyOSAyMi42Mjg1IDIyLjYwNzEgMjMuMDU3MSAyMi4zNUMyMy40ODU3IDIyLjA5MjkgMjQuMTcxNCAyMi4xNzg2IDI0LjQyODUgMjIuNjA3MUwyOS42NTcxIDMwLjQ5MjlMMzUuMTQyOCAyMi41MjE0QzM1LjQ4NTcgMjIuMDkyOSAzNi4wODU3IDIxLjkyMTQgMzYuNTE0MiAyMi4yNjQzQzM3LjE5OTkgMjIuNjkyOSAzNy4yODU3IDIzLjI5MjkgMzYuOTQyOCAyMy43MjE0WiIgZmlsbD0id2hpdGUiLz4KPC9zdmc+Cg=="),
|
|
49
|
+
linear-gradient(100deg, #f4e2ce -67.2%, #debb9b 98.15%);
|
|
55
50
|
background-repeat: no-repeat;
|
|
56
51
|
border-radius: 15px;
|
|
57
52
|
background-size: 30px;
|
|
@@ -59,12 +54,14 @@ withDefaults(
|
|
|
59
54
|
flex-grow: 0;
|
|
60
55
|
}
|
|
61
56
|
.title {
|
|
62
|
-
flex-grow: 1;
|
|
57
|
+
flex-grow: 1;
|
|
58
|
+
color: #353535;
|
|
63
59
|
font-size: 14px;
|
|
64
60
|
font-weight: 500;
|
|
65
61
|
}
|
|
66
62
|
.amount {
|
|
67
|
-
flex-grow: 0;
|
|
63
|
+
flex-grow: 0;
|
|
64
|
+
color: #9e7b5a;
|
|
68
65
|
font-size: 14px;
|
|
69
66
|
font-weight: 700;
|
|
70
67
|
}
|
package/src/balance/types.ts
CHANGED
|
@@ -1,32 +1,23 @@
|
|
|
1
|
-
|
|
2
1
|
export const consumptionTypes = [
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
] as const
|
|
2
|
+
"全部",
|
|
3
|
+
"充值",
|
|
4
|
+
"缴费",
|
|
5
|
+
"返额",
|
|
6
|
+
"增加",
|
|
7
|
+
"扣减",
|
|
8
|
+
"消耗",
|
|
9
|
+
"退回",
|
|
10
|
+
] as const;
|
|
12
11
|
|
|
13
|
-
export type ConsumptionType = typeof consumptionTypes[number]
|
|
12
|
+
export type ConsumptionType = (typeof consumptionTypes)[number];
|
|
14
13
|
|
|
15
|
-
export const consumptionPositions = [
|
|
16
|
-
'全部',
|
|
17
|
-
'云豆',
|
|
18
|
-
'小云豆',
|
|
19
|
-
] as const
|
|
14
|
+
export const consumptionPositions = ["全部", "云豆", "权益"] as const;
|
|
20
15
|
|
|
21
|
-
export type ConsumptionPosition = typeof consumptionPositions[number]
|
|
16
|
+
export type ConsumptionPosition = (typeof consumptionPositions)[number];
|
|
22
17
|
|
|
23
|
-
export const consumptionDirections = [
|
|
24
|
-
'全部',
|
|
25
|
-
'收入',
|
|
26
|
-
'支出',
|
|
27
|
-
] as const
|
|
18
|
+
export const consumptionDirections = ["全部", "收入", "支出"] as const;
|
|
28
19
|
|
|
29
|
-
export type ConsumptionDirection = typeof consumptionDirections[number]
|
|
20
|
+
export type ConsumptionDirection = (typeof consumptionDirections)[number];
|
|
30
21
|
|
|
31
22
|
/**
|
|
32
23
|
* 账户流水
|
|
@@ -35,63 +26,63 @@ export type 账户流水 = {
|
|
|
35
26
|
/**
|
|
36
27
|
* 数量
|
|
37
28
|
*/
|
|
38
|
-
amount: number
|
|
29
|
+
amount: number;
|
|
39
30
|
/**
|
|
40
31
|
* 交易名称
|
|
41
32
|
*/
|
|
42
|
-
title: string
|
|
33
|
+
title: string;
|
|
43
34
|
/**
|
|
44
35
|
* 交易说明
|
|
45
36
|
*/
|
|
46
|
-
description: string
|
|
37
|
+
description: string;
|
|
47
38
|
/**
|
|
48
39
|
* 交易时间
|
|
49
40
|
**/
|
|
50
|
-
time: number
|
|
41
|
+
time: number;
|
|
51
42
|
/**
|
|
52
43
|
* 交易类型类型
|
|
53
44
|
*/
|
|
54
|
-
交易类型: ConsumptionType
|
|
55
|
-
权益类目: string
|
|
45
|
+
交易类型: ConsumptionType;
|
|
46
|
+
权益类目: string;
|
|
56
47
|
/**
|
|
57
48
|
* 账户类型
|
|
58
49
|
*/
|
|
59
|
-
账户类型: ConsumptionPosition
|
|
50
|
+
账户类型: ConsumptionPosition;
|
|
60
51
|
/**
|
|
61
52
|
* 收入/支出
|
|
62
53
|
*/
|
|
63
|
-
收入还是支出: ConsumptionDirection
|
|
64
|
-
}
|
|
54
|
+
收入还是支出: ConsumptionDirection;
|
|
55
|
+
};
|
|
65
56
|
|
|
66
57
|
/**
|
|
67
58
|
* 账户流水筛选项
|
|
68
59
|
*/
|
|
69
60
|
export type 账户流水筛选项 = Pick<
|
|
70
61
|
账户流水,
|
|
71
|
-
|
|
62
|
+
"交易类型" | "账户类型" | "收入还是支出" | "权益类目"
|
|
72
63
|
> & {
|
|
73
|
-
dateFrom: string
|
|
74
|
-
dateTo: string
|
|
75
|
-
page: number
|
|
76
|
-
pageSize: 20
|
|
77
|
-
}
|
|
64
|
+
dateFrom: string;
|
|
65
|
+
dateTo: string;
|
|
66
|
+
page: number;
|
|
67
|
+
pageSize: 20;
|
|
68
|
+
};
|
|
78
69
|
|
|
79
70
|
export type ConsumptionGroup = {
|
|
80
|
-
date: string
|
|
81
|
-
consumptions: 账户流水[]
|
|
82
|
-
}
|
|
71
|
+
date: string;
|
|
72
|
+
consumptions: 账户流水[];
|
|
73
|
+
};
|
|
83
74
|
|
|
84
75
|
export type Privilege = {
|
|
85
|
-
title: string
|
|
86
|
-
count: number
|
|
87
|
-
}
|
|
76
|
+
title: string;
|
|
77
|
+
count: number;
|
|
78
|
+
};
|
|
88
79
|
|
|
89
80
|
export type Balance = {
|
|
90
|
-
total: number
|
|
91
|
-
privileges: Privilege[]
|
|
92
|
-
}
|
|
81
|
+
total: number;
|
|
82
|
+
privileges: Privilege[];
|
|
83
|
+
};
|
|
93
84
|
|
|
94
85
|
export type 权益类目 = {
|
|
95
|
-
name: string
|
|
96
|
-
code: string
|
|
97
|
-
}
|
|
86
|
+
name: string;
|
|
87
|
+
code: string;
|
|
88
|
+
};
|