@uxda/appkit 1.2.73 → 1.2.75
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 +806 -29
- package/dist/assets/asset-BnRbHhKf +88 -0
- package/dist/index.js +3040 -556
- package/package.json +2 -1
- package/src/balance/api/endpoints.ts +44 -44
- package/src/balance/types.ts +42 -42
- package/src/components/bt-cropper/index.vue +774 -0
- package/src/components/bt-cropper/utils/calcCropper.js +42 -0
- package/src/components/bt-cropper/utils/calcImagePosition.js +23 -0
- package/src/components/bt-cropper/utils/calcImageSize.js +37 -0
- package/src/components/bt-cropper/utils/calcPointDistance.js +12 -0
- package/src/components/bt-cropper/utils/calcRightAndBottom.js +7 -0
- package/src/components/bt-cropper/utils/ratio.js +3 -0
- package/src/components/bt-cropper/utils/tools.js +25 -0
- package/src/components/dd-search/index.vue +3 -3
- package/src/index.ts +1 -0
- package/src/notice/components/NoticeBanner.vue +1 -1
- package/src/notice/components/NoticeList.vue +3 -1
- package/src/notice/components/index.ts +1 -2
- package/src/shared/components/DeviceVersion.vue +3 -2
- package/src/shared/composables/index.ts +3 -0
- package/src/shared/composables/useCountdown.ts +46 -0
- package/src/shared/composables/useDragBox.ts +88 -0
- package/src/shared/composables/useEncode.ts +43 -0
- package/src/shared/composables/useValidator.ts +31 -0
- package/src/shared/http/Http.ts +4 -3
- package/src/user/api/endpoints.ts +17 -0
- package/src/user/api/index.ts +86 -0
- package/src/{notice → user}/components/LoginSetting.vue +1 -0
- package/src/user/components/UserBinding.vue +300 -0
- package/src/user/components/UserBindingSuccess.vue +80 -0
- package/src/user/components/UserEntry.vue +129 -0
- package/src/user/components/UserFeedback.vue +410 -0
- package/src/user/components/UserFeedbackEntry.vue +137 -0
- package/src/user/components/UserHeadCrop.vue +65 -0
- package/src/user/components/UserInfo.vue +612 -0
- package/src/user/components/UserResourceEmpty.vue +74 -0
- package/src/user/components/index.ts +21 -0
- package/src/user/index.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uxda/appkit",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.75",
|
|
4
4
|
"description": "小程序应用开发包",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.ts",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"@tarojs/taro-h5": "^3.5.6",
|
|
41
41
|
"@types/wechat-miniprogram": "^3.4.7",
|
|
42
42
|
"dayjs": "^1.11.10",
|
|
43
|
+
"validator": "^13.12.0",
|
|
43
44
|
"vue": "^3.3.0"
|
|
44
45
|
},
|
|
45
46
|
"devDependencies": {
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { HttpEndpoints } from
|
|
2
|
-
import { 账户流水筛选项, ConsumptionType } from
|
|
1
|
+
import { HttpEndpoints } from '../../shared/http'
|
|
2
|
+
import { 账户流水筛选项, ConsumptionType } from '../types'
|
|
3
3
|
|
|
4
4
|
type OnlyApp = {
|
|
5
|
-
app: string
|
|
6
|
-
}
|
|
5
|
+
app: string
|
|
6
|
+
}
|
|
7
7
|
|
|
8
|
-
type AndApp<T> = OnlyApp & T
|
|
8
|
+
type AndApp<T> = OnlyApp & T
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* 流水交易类型映射
|
|
12
12
|
*/
|
|
13
13
|
const typeMappings: Record<string, ConsumptionType> = {
|
|
14
|
-
CZ:
|
|
15
|
-
JF:
|
|
16
|
-
FE:
|
|
17
|
-
ZJ:
|
|
18
|
-
KJ:
|
|
19
|
-
XH:
|
|
20
|
-
TH:
|
|
21
|
-
ZS:
|
|
22
|
-
HG:
|
|
23
|
-
}
|
|
14
|
+
CZ: '充值',
|
|
15
|
+
JF: '缴费',
|
|
16
|
+
FE: '返额',
|
|
17
|
+
ZJ: '增加',
|
|
18
|
+
KJ: '扣减',
|
|
19
|
+
XH: '消耗',
|
|
20
|
+
TH: '退回',
|
|
21
|
+
ZS: '赠送',
|
|
22
|
+
HG: '换购',
|
|
23
|
+
}
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* 映射还能反过来
|
|
27
27
|
*/
|
|
28
28
|
const typeMappingsReversed = Object.fromEntries(
|
|
29
29
|
Object.entries(typeMappings).map(([x, y]) => [y, x])
|
|
30
|
-
)
|
|
30
|
+
)
|
|
31
31
|
|
|
32
32
|
const positionMappings = {
|
|
33
|
-
common:
|
|
34
|
-
rights:
|
|
35
|
-
gift:
|
|
36
|
-
}
|
|
33
|
+
common: '云豆',
|
|
34
|
+
rights: '小云豆',
|
|
35
|
+
gift: '权益',
|
|
36
|
+
}
|
|
37
37
|
|
|
38
38
|
const positionMappingsReversed = Object.fromEntries(
|
|
39
39
|
Object.entries(positionMappings).map(([x, y]) => [y, x])
|
|
40
|
-
)
|
|
40
|
+
)
|
|
41
41
|
|
|
42
42
|
const directionMappings = {
|
|
43
|
-
0:
|
|
44
|
-
1:
|
|
45
|
-
}
|
|
43
|
+
0: '收入',
|
|
44
|
+
1: '支出',
|
|
45
|
+
}
|
|
46
46
|
|
|
47
47
|
const directionMappingsReversed = Object.fromEntries(
|
|
48
48
|
Object.entries(directionMappings).map(([x, y]) => [y, x])
|
|
49
|
-
)
|
|
49
|
+
)
|
|
50
50
|
|
|
51
51
|
const endpointsList: HttpEndpoints = {
|
|
52
52
|
获取余额明细: {
|
|
53
|
-
path:
|
|
53
|
+
path: '/ac-app/account/info/detail/app', // /app
|
|
54
54
|
translate: (data: OnlyApp) => ({
|
|
55
55
|
appCode: data.app,
|
|
56
56
|
}),
|
|
@@ -62,25 +62,25 @@ const endpointsList: HttpEndpoints = {
|
|
|
62
62
|
count: r.rightsAccount,
|
|
63
63
|
unit: r.rightsUnit,
|
|
64
64
|
appCode: r.appCode,
|
|
65
|
-
id: r.activityId
|
|
65
|
+
id: r.activityId,
|
|
66
66
|
})),
|
|
67
|
-
}
|
|
67
|
+
}
|
|
68
68
|
},
|
|
69
69
|
},
|
|
70
70
|
获取账户流水: {
|
|
71
|
-
path:
|
|
71
|
+
path: '/ac-app/account/record/detail/mobile',
|
|
72
72
|
translate: (data: AndApp<账户流水筛选项>) => {
|
|
73
73
|
return {
|
|
74
74
|
appCode: data.app,
|
|
75
|
-
accountType: positionMappingsReversed[data.账户类型] ||
|
|
76
|
-
inOrOut: directionMappingsReversed[data.收入还是支出] ||
|
|
77
|
-
changeType: typeMappingsReversed[data.交易类型] ||
|
|
78
|
-
operateTimeStart: data.dateFrom ||
|
|
79
|
-
operateTimeEnd: data.dateTo ||
|
|
75
|
+
accountType: positionMappingsReversed[data.账户类型] || '',
|
|
76
|
+
inOrOut: directionMappingsReversed[data.收入还是支出] || '',
|
|
77
|
+
changeType: typeMappingsReversed[data.交易类型] || '',
|
|
78
|
+
operateTimeStart: data.dateFrom || '',
|
|
79
|
+
operateTimeEnd: data.dateTo || '',
|
|
80
80
|
rightsCode: data.权益类目,
|
|
81
81
|
pageNum: data.page,
|
|
82
82
|
pageSize: 10,
|
|
83
|
-
}
|
|
83
|
+
}
|
|
84
84
|
},
|
|
85
85
|
transform(response: any) {
|
|
86
86
|
const data = response.list.map((d: any) => ({
|
|
@@ -91,12 +91,12 @@ const endpointsList: HttpEndpoints = {
|
|
|
91
91
|
title: d.rightsName,
|
|
92
92
|
time: Date.parse(d.operateTime), // 后台返回的是日期字符串,这里格式化成 timestamp
|
|
93
93
|
description: d.remark,
|
|
94
|
-
}))
|
|
95
|
-
return data
|
|
94
|
+
}))
|
|
95
|
+
return data
|
|
96
96
|
},
|
|
97
97
|
},
|
|
98
98
|
获取权益类目: {
|
|
99
|
-
path:
|
|
99
|
+
path: '/ac-app/rights/item/list',
|
|
100
100
|
translate: (data: OnlyApp) => ({
|
|
101
101
|
appCode: data.app,
|
|
102
102
|
}),
|
|
@@ -108,19 +108,19 @@ const endpointsList: HttpEndpoints = {
|
|
|
108
108
|
name: d.rightsName,
|
|
109
109
|
code: d.rightsCode,
|
|
110
110
|
})),
|
|
111
|
-
}
|
|
112
|
-
}
|
|
111
|
+
},
|
|
112
|
+
}
|
|
113
113
|
|
|
114
114
|
const endpoints = Object.fromEntries(
|
|
115
115
|
Object.entries(endpointsList).map(([name, def]) => [name, def.path])
|
|
116
|
-
)
|
|
116
|
+
)
|
|
117
117
|
|
|
118
118
|
const translates = Object.fromEntries(
|
|
119
119
|
Object.entries(endpointsList).map(([, def]) => [def.path, def.translate])
|
|
120
|
-
)
|
|
120
|
+
)
|
|
121
121
|
|
|
122
122
|
const transforms = Object.fromEntries(
|
|
123
123
|
Object.entries(endpointsList).map(([, def]) => [def.path, def.transform])
|
|
124
|
-
)
|
|
124
|
+
)
|
|
125
125
|
|
|
126
|
-
export { endpoints, translates, transforms }
|
|
126
|
+
export { endpoints, translates, transforms }
|
package/src/balance/types.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
export const consumptionTypes = [
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
] as const
|
|
2
|
+
'全部',
|
|
3
|
+
'充值',
|
|
4
|
+
'缴费',
|
|
5
|
+
'返额',
|
|
6
|
+
'增加',
|
|
7
|
+
'扣减',
|
|
8
|
+
'消耗',
|
|
9
|
+
'退回',
|
|
10
|
+
'赠送',
|
|
11
|
+
'换购',
|
|
12
|
+
] as const
|
|
13
13
|
|
|
14
|
-
export type ConsumptionType = (typeof consumptionTypes)[number]
|
|
14
|
+
export type ConsumptionType = (typeof consumptionTypes)[number]
|
|
15
15
|
|
|
16
|
-
export const consumptionPositions = [
|
|
16
|
+
export const consumptionPositions = ['全部', '云豆', '权益'] as const
|
|
17
17
|
|
|
18
|
-
export type ConsumptionPosition = (typeof consumptionPositions)[number]
|
|
18
|
+
export type ConsumptionPosition = (typeof consumptionPositions)[number]
|
|
19
19
|
|
|
20
|
-
export const consumptionDirections = [
|
|
20
|
+
export const consumptionDirections = ['全部', '收入', '支出'] as const
|
|
21
21
|
|
|
22
|
-
export type ConsumptionDirection = (typeof consumptionDirections)[number]
|
|
22
|
+
export type ConsumptionDirection = (typeof consumptionDirections)[number]
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* 账户流水
|
|
@@ -28,63 +28,63 @@ export type 账户流水 = {
|
|
|
28
28
|
/**
|
|
29
29
|
* 数量
|
|
30
30
|
*/
|
|
31
|
-
amount: number
|
|
31
|
+
amount: number
|
|
32
32
|
/**
|
|
33
33
|
* 交易名称
|
|
34
34
|
*/
|
|
35
|
-
title: string
|
|
35
|
+
title: string
|
|
36
36
|
/**
|
|
37
37
|
* 交易说明
|
|
38
38
|
*/
|
|
39
|
-
description: string
|
|
39
|
+
description: string
|
|
40
40
|
/**
|
|
41
41
|
* 交易时间
|
|
42
42
|
**/
|
|
43
|
-
time: number
|
|
43
|
+
time: number
|
|
44
44
|
/**
|
|
45
45
|
* 交易类型类型
|
|
46
46
|
*/
|
|
47
|
-
交易类型: ConsumptionType
|
|
48
|
-
权益类目: string
|
|
47
|
+
交易类型: ConsumptionType
|
|
48
|
+
权益类目: string
|
|
49
49
|
/**
|
|
50
50
|
* 账户类型
|
|
51
51
|
*/
|
|
52
|
-
账户类型: ConsumptionPosition
|
|
52
|
+
账户类型: ConsumptionPosition
|
|
53
53
|
/**
|
|
54
54
|
* 收入/支出
|
|
55
55
|
*/
|
|
56
|
-
收入还是支出: ConsumptionDirection
|
|
57
|
-
}
|
|
56
|
+
收入还是支出: ConsumptionDirection
|
|
57
|
+
}
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
60
|
* 账户流水筛选项
|
|
61
61
|
*/
|
|
62
62
|
export type 账户流水筛选项 = Pick<
|
|
63
63
|
账户流水,
|
|
64
|
-
|
|
64
|
+
'交易类型' | '账户类型' | '收入还是支出' | '权益类目'
|
|
65
65
|
> & {
|
|
66
|
-
dateFrom: string
|
|
67
|
-
dateTo: string
|
|
68
|
-
page: number
|
|
69
|
-
pageSize: 20
|
|
70
|
-
}
|
|
66
|
+
dateFrom: string
|
|
67
|
+
dateTo: string
|
|
68
|
+
page: number
|
|
69
|
+
pageSize: 20
|
|
70
|
+
}
|
|
71
71
|
|
|
72
72
|
export type ConsumptionGroup = {
|
|
73
|
-
date: string
|
|
74
|
-
consumptions: 账户流水[]
|
|
75
|
-
}
|
|
73
|
+
date: string
|
|
74
|
+
consumptions: 账户流水[]
|
|
75
|
+
}
|
|
76
76
|
|
|
77
77
|
export type Privilege = {
|
|
78
|
-
title: string
|
|
79
|
-
count: number
|
|
80
|
-
}
|
|
78
|
+
title: string
|
|
79
|
+
count: number
|
|
80
|
+
}
|
|
81
81
|
|
|
82
82
|
export type Balance = {
|
|
83
|
-
total: number
|
|
83
|
+
total: number
|
|
84
84
|
privileges: any
|
|
85
|
-
}
|
|
85
|
+
}
|
|
86
86
|
|
|
87
87
|
export type 权益类目 = {
|
|
88
|
-
name: string
|
|
89
|
-
code: string
|
|
90
|
-
}
|
|
88
|
+
name: string
|
|
89
|
+
code: string
|
|
90
|
+
}
|