@uxda/appkit 4.1.62 → 4.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/.eslintrc.mjs +7 -7
- package/README.md +187 -187
- package/babel.config.js +12 -12
- package/dist/appkit.css +6 -8
- package/dist/index.js +49 -19
- package/package.json +79 -77
- package/project.config.json +15 -15
- package/project.tt.json +13 -13
- package/rollup.config.mjs +67 -56
- package/src/Appkit.ts +66 -66
- package/src/balance/api/endpoints.ts +133 -133
- package/src/balance/api/index.ts +106 -106
- package/src/balance/components/AccountView.vue +750 -749
- package/src/balance/components/BalanceCard.vue +215 -215
- package/src/balance/components/BalanceReminder.vue +85 -85
- package/src/balance/components/ConsumptionFilter.vue +218 -218
- package/src/balance/components/ConsumptionRules.vue +68 -68
- package/src/balance/components/DateFilter.vue +250 -250
- package/src/balance/components/DateRange.vue +80 -80
- package/src/balance/components/ListFilter.vue +62 -62
- package/src/balance/components/ListFilterPicker.vue +191 -191
- package/src/balance/components/PromoterCard.vue +237 -237
- package/src/balance/components/SecondBalance.vue +71 -71
- package/src/balance/components/Tip.vue +45 -45
- package/src/balance/components/index.ts +8 -8
- package/src/balance/types.ts +97 -97
- package/src/components/bt-cropper/index.vue +774 -774
- package/src/components/bt-cropper/utils/calcCropper.js +42 -42
- package/src/components/bt-cropper/utils/calcImagePosition.js +23 -23
- package/src/components/bt-cropper/utils/calcImageSize.js +37 -37
- package/src/components/bt-cropper/utils/calcPointDistance.js +12 -12
- package/src/components/bt-cropper/utils/calcRightAndBottom.js +7 -7
- package/src/components/bt-cropper/utils/ratio.js +3 -3
- package/src/components/bt-cropper/utils/tools.js +25 -25
- package/src/components/dd-area/index.vue +225 -225
- package/src/components/dd-icon/doc.md +21 -21
- package/src/components/dd-icon/index.vue +23 -23
- package/src/components/dd-notice-bar/index.vue +78 -78
- package/src/components/dd-search/doc.md +34 -34
- package/src/components/dd-search/index.vue +168 -168
- package/src/components/dd-selector/index.vue +124 -124
- package/src/components/dd-skeleton/doc.md +19 -19
- package/src/components/dd-skeleton/index.vue +36 -36
- package/src/global.ts +6 -6
- package/src/index.ts +89 -89
- package/src/main.scss +1 -1
- package/src/notice/api/endpoints.ts +17 -17
- package/src/notice/api/index.ts +106 -106
- package/src/notice/components/NoticeBanner.vue +243 -243
- package/src/notice/components/NoticeEntry.vue +99 -99
- package/src/notice/components/NoticeList.vue +315 -315
- package/src/notice/components/NoticePopup.vue +162 -162
- package/src/notice/components/index.ts +5 -5
- package/src/notice/components/useCommonList.ts +86 -86
- package/src/notice/components/useNotice.ts +35 -35
- package/src/notice/index.ts +1 -1
- package/src/notice/types.ts +25 -25
- package/src/payment/api/config.ts +7 -7
- package/src/payment/api/endpoints.ts +103 -103
- package/src/payment/api/index.ts +100 -100
- package/src/payment/components/AmountPicker.vue +90 -90
- package/src/payment/components/RechargeResult.vue +69 -69
- package/src/payment/components/RechargeView.vue +155 -155
- package/src/payment/components/RightsPicker.vue +105 -105
- package/src/payment/components/TradeView.vue +317 -317
- package/src/payment/components/UserAgreement.vue +234 -234
- package/src/payment/components/index.ts +22 -22
- package/src/payment/index.ts +5 -5
- package/src/payment/services/index.ts +16 -16
- package/src/payment/services/invoke-recharge.ts +25 -25
- package/src/payment/services/request-payment.ts +58 -58
- package/src/payment/types.ts +28 -28
- package/src/register/components/SelfRegistration.vue +233 -233
- package/src/register/components/index.ts +2 -2
- package/src/shared/components/AppDrawer.vue +54 -58
- package/src/shared/components/AppVerify.vue +128 -128
- package/src/shared/components/DeviceVersion.vue +68 -68
- package/src/shared/components/EmptyView.vue +33 -33
- package/src/shared/components/OcrBusinessLicense.vue +130 -130
- package/src/shared/components/OcrIcon.vue +202 -202
- package/src/shared/components/PageHeader.vue +79 -79
- package/src/shared/components/index.ts +8 -8
- package/src/shared/composables/index.ts +8 -8
- package/src/shared/composables/useAmount.ts +46 -46
- package/src/shared/composables/useCountdown.ts +46 -46
- package/src/shared/composables/useCrypto.ts +76 -76
- package/src/shared/composables/useDragBox.ts +97 -97
- package/src/shared/composables/useEncode.ts +43 -43
- package/src/shared/composables/useLogger.ts +123 -123
- package/src/shared/composables/useSafeArea.ts +46 -46
- package/src/shared/composables/useTabbar.ts +24 -24
- package/src/shared/composables/useUpload.ts +54 -54
- package/src/shared/composables/useValidator.ts +32 -31
- package/src/shared/http/Http.ts +136 -136
- package/src/shared/http/index.ts +1 -1
- package/src/shared/http/types.ts +157 -157
- package/src/shared/index.ts +3 -3
- package/src/shared/weixin/payment.ts +38 -38
- package/src/styles/vars.scss +3 -3
- package/src/user/api/endpoints.ts +17 -17
- package/src/user/api/index.ts +111 -111
- package/src/user/components/LoginSetting.vue +114 -114
- package/src/user/components/UserAuth.vue +238 -216
- package/src/user/components/UserBinding.vue +307 -307
- package/src/user/components/UserBindingSuccess.vue +80 -80
- package/src/user/components/UserEntry.vue +133 -133
- package/src/user/components/UserFeedback.vue +431 -431
- package/src/user/components/UserFeedbackEntry.vue +192 -192
- package/src/user/components/UserHeadCrop.vue +65 -65
- package/src/user/components/UserInfo.vue +732 -723
- package/src/user/components/UserResourceEmpty.vue +75 -75
- package/src/user/components/index.ts +23 -23
- package/src/user/index.ts +1 -1
- package/tsconfig.json +30 -30
- package/types/global.d.ts +21 -21
- package/types/vue.d.ts +10 -10
- package/dist/assets/asset-3B_CoPto +0 -1
package/.eslintrc.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
extends: [
|
|
3
|
-
'./.eslintrc-auto-import.json'
|
|
4
|
-
],
|
|
5
|
-
rules: {
|
|
6
|
-
ident: ['error', 2]
|
|
7
|
-
}
|
|
1
|
+
module.exports = {
|
|
2
|
+
extends: [
|
|
3
|
+
'./.eslintrc-auto-import.json'
|
|
4
|
+
],
|
|
5
|
+
rules: {
|
|
6
|
+
ident: ['error', 2]
|
|
7
|
+
}
|
|
8
8
|
}
|
package/README.md
CHANGED
|
@@ -1,188 +1,188 @@
|
|
|
1
|
-
# AppKit
|
|
2
|
-
|
|
3
|
-
小程序应用开发包
|
|
4
|
-
|
|
5
|
-
向诸小程序提供供用的组件及基础设施
|
|
6
|
-
|
|
7
|
-
模块:
|
|
8
|
-
* payment 支付
|
|
9
|
-
* balance 账户、代币(云豆)余额
|
|
10
|
-
* auth 登录及会话状态 (待定)
|
|
11
|
-
|
|
12
|
-
## 将 AppKit 加入应用项目
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
git clone git@10.1.108.137:fed/appkit.git
|
|
16
|
-
cd appkit
|
|
17
|
-
yarn link
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
然后 cd 到(周转)小程序根目录执行:
|
|
21
|
-
```bash
|
|
22
|
-
yarn link @uxda/appkit
|
|
23
|
-
```
|
|
24
|
-
完成 npm link
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
## 用法
|
|
28
|
-
```typescript
|
|
29
|
-
import AppKit from '@uxda/appkit'
|
|
30
|
-
import '@uxda/appkit/appkit.css'
|
|
31
|
-
```
|
|
32
|
-
## AppKit 初始化
|
|
33
|
-
|
|
34
|
-
在应用入口页调用(示例)
|
|
35
|
-
```typescript
|
|
36
|
-
const App = createApp({})
|
|
37
|
-
App.use(AppKit, {
|
|
38
|
-
app: () => 'cloudkitPro',
|
|
39
|
-
tenant: () => '1',
|
|
40
|
-
token: () => localStorage.getItem('token'),
|
|
41
|
-
baseUrl: () => process.env.TARO_APP_BASE_URL,
|
|
42
|
-
401: () => {
|
|
43
|
-
// 登录态丢失时的处理
|
|
44
|
-
}
|
|
45
|
-
})
|
|
46
|
-
```
|
|
47
|
-
为 AppKit 的运行提供必需的 API 参数
|
|
48
|
-
* app: 当前的 app code (嵌入接口调用的 header 参数)
|
|
49
|
-
* tenant: 租户ID 需要提供以便调用接口
|
|
50
|
-
* token: 用户登录态 token
|
|
51
|
-
* baseUrl: 调用 API 的URL域名
|
|
52
|
-
* 401: 登录态丢失异常处理 (通常要跳转登录页)
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
## UI组件
|
|
56
|
-
### 1️⃣ 充值用户界面 <recharge-view>
|
|
57
|
-
|
|
58
|
-
```typescript
|
|
59
|
-
import { RechargeView } from '@uxda/appkit'
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
```html
|
|
63
|
-
<template>
|
|
64
|
-
<recharge-view
|
|
65
|
-
app="crm"
|
|
66
|
-
tenant="1"
|
|
67
|
-
@complete="onRechargeComplete" />
|
|
68
|
-
</template>
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
#### 属性 props
|
|
72
|
-
|
|
73
|
-
#### 事件 emits
|
|
74
|
-
|
|
75
|
-
* @complete: 充值完成时发生
|
|
76
|
-
|
|
77
|
-
### 2️⃣ 账户页 <account-view>
|
|
78
|
-
```
|
|
79
|
-
import { AccountView } from '@uxda/appkit'
|
|
80
|
-
```
|
|
81
|
-
```html
|
|
82
|
-
<template>
|
|
83
|
-
<account-view app="crm" @recharge=onAccountViewRecharge />
|
|
84
|
-
<template>
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
#### 事件 emits
|
|
88
|
-
* @recharge 点击充值按钮时发生
|
|
89
|
-
|
|
90
|
-
### 3️⃣ 账户卡片 <balance-card>
|
|
91
|
-
|
|
92
|
-
```typescript
|
|
93
|
-
import { BalanceCard } from '@uxda/appkit'
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
```html
|
|
97
|
-
<template>
|
|
98
|
-
<balance-card app="crm" @drill="onBalanceCardDrill" @recharge="onBalanceCardRecharge" />
|
|
99
|
-
<template>
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
#### 事件 emits
|
|
103
|
-
* app 配置到组件上的 app code
|
|
104
|
-
* @drill 点击账户详情时发生
|
|
105
|
-
* @recharge 点击充值按钮时发生
|
|
106
|
-
|
|
107
|
-
场景端需定义以上跳转逻辑:
|
|
108
|
-
|
|
109
|
-
```typescript
|
|
110
|
-
function onBalanceCardDrill () {
|
|
111
|
-
//...
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
function onBalanceCardRecharge () {
|
|
115
|
-
//...
|
|
116
|
-
}
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
### 方法 methods
|
|
120
|
-
* reload() 刷新数据
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
### 4️⃣ 余额不足提示框 <balance-reminder>
|
|
125
|
-
|
|
126
|
-
```typescript
|
|
127
|
-
import { BalanceReminder } from '@uxda/appkit'
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
```html
|
|
131
|
-
<balance-reminder v-model="balanceReminderOpen"
|
|
132
|
-
@recharge="onBalanceReminderRecharge" />
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
#### 事件 emits
|
|
136
|
-
* @recharge 点击充值按钮时发生
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
## 公共API
|
|
140
|
-
### 1️⃣ 唤起充值(跳支付中心小程序) $app.invokeRecharge()
|
|
141
|
-
|
|
142
|
-
```typescript
|
|
143
|
-
import { useAppKit } from '@uxda/appkit'
|
|
144
|
-
const $app = useAppKit()
|
|
145
|
-
$app.invokeRecharge({
|
|
146
|
-
app: 'crm',
|
|
147
|
-
tenant: '1',
|
|
148
|
-
})
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
### 2️⃣ 唤起充值(小程序内直接支付、不跳) $app.requestPayment()
|
|
152
|
-
|
|
153
|
-
```typescript
|
|
154
|
-
import { useAppKit } from '@uxda/appkit'
|
|
155
|
-
const $app = useAppKit()
|
|
156
|
-
$app.requestPayment({
|
|
157
|
-
app: 'crm',
|
|
158
|
-
tenant: '1',
|
|
159
|
-
amount: 100,
|
|
160
|
-
user: '' // wx.login 之后得到的用户临时凭证
|
|
161
|
-
})
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
## Hooks (Vue Composables)
|
|
165
|
-
|
|
166
|
-
### useTabbar
|
|
167
|
-
用于获取或设置 custom tab bar
|
|
168
|
-
|
|
169
|
-
```typescript
|
|
170
|
-
import { useTabbar } from '@uxda/appkit-next'
|
|
171
|
-
|
|
172
|
-
onMounted(() => {
|
|
173
|
-
const { setTab } = useTabbar()
|
|
174
|
-
setTab('home')
|
|
175
|
-
})
|
|
176
|
-
```
|
|
177
|
-
以上代码用于切换到 /pages/home/index 时, 设置 tab bar 选中项为 'home'
|
|
178
|
-
在 custom-tab-bar/index.vue 需要做以下设置
|
|
179
|
-
|
|
180
|
-
```typescript
|
|
181
|
-
import { useSafeArea, useTabbar } from '@uxda/appkit-next'
|
|
182
|
-
|
|
183
|
-
const { onTabChange } = useTabbar()
|
|
184
|
-
onTabChange((value: string) => {
|
|
185
|
-
selected.value = value
|
|
186
|
-
})
|
|
187
|
-
```
|
|
1
|
+
# AppKit
|
|
2
|
+
|
|
3
|
+
小程序应用开发包
|
|
4
|
+
|
|
5
|
+
向诸小程序提供供用的组件及基础设施
|
|
6
|
+
|
|
7
|
+
模块:
|
|
8
|
+
* payment 支付
|
|
9
|
+
* balance 账户、代币(云豆)余额
|
|
10
|
+
* auth 登录及会话状态 (待定)
|
|
11
|
+
|
|
12
|
+
## 将 AppKit 加入应用项目
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
git clone git@10.1.108.137:fed/appkit.git
|
|
16
|
+
cd appkit
|
|
17
|
+
yarn link
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
然后 cd 到(周转)小程序根目录执行:
|
|
21
|
+
```bash
|
|
22
|
+
yarn link @uxda/appkit
|
|
23
|
+
```
|
|
24
|
+
完成 npm link
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## 用法
|
|
28
|
+
```typescript
|
|
29
|
+
import AppKit from '@uxda/appkit'
|
|
30
|
+
import '@uxda/appkit/appkit.css'
|
|
31
|
+
```
|
|
32
|
+
## AppKit 初始化
|
|
33
|
+
|
|
34
|
+
在应用入口页调用(示例)
|
|
35
|
+
```typescript
|
|
36
|
+
const App = createApp({})
|
|
37
|
+
App.use(AppKit, {
|
|
38
|
+
app: () => 'cloudkitPro',
|
|
39
|
+
tenant: () => '1',
|
|
40
|
+
token: () => localStorage.getItem('token'),
|
|
41
|
+
baseUrl: () => process.env.TARO_APP_BASE_URL,
|
|
42
|
+
401: () => {
|
|
43
|
+
// 登录态丢失时的处理
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
```
|
|
47
|
+
为 AppKit 的运行提供必需的 API 参数
|
|
48
|
+
* app: 当前的 app code (嵌入接口调用的 header 参数)
|
|
49
|
+
* tenant: 租户ID 需要提供以便调用接口
|
|
50
|
+
* token: 用户登录态 token
|
|
51
|
+
* baseUrl: 调用 API 的URL域名
|
|
52
|
+
* 401: 登录态丢失异常处理 (通常要跳转登录页)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
## UI组件
|
|
56
|
+
### 1️⃣ 充值用户界面 <recharge-view>
|
|
57
|
+
|
|
58
|
+
```typescript
|
|
59
|
+
import { RechargeView } from '@uxda/appkit'
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
```html
|
|
63
|
+
<template>
|
|
64
|
+
<recharge-view
|
|
65
|
+
app="crm"
|
|
66
|
+
tenant="1"
|
|
67
|
+
@complete="onRechargeComplete" />
|
|
68
|
+
</template>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
#### 属性 props
|
|
72
|
+
|
|
73
|
+
#### 事件 emits
|
|
74
|
+
|
|
75
|
+
* @complete: 充值完成时发生
|
|
76
|
+
|
|
77
|
+
### 2️⃣ 账户页 <account-view>
|
|
78
|
+
```
|
|
79
|
+
import { AccountView } from '@uxda/appkit'
|
|
80
|
+
```
|
|
81
|
+
```html
|
|
82
|
+
<template>
|
|
83
|
+
<account-view app="crm" @recharge=onAccountViewRecharge />
|
|
84
|
+
<template>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
#### 事件 emits
|
|
88
|
+
* @recharge 点击充值按钮时发生
|
|
89
|
+
|
|
90
|
+
### 3️⃣ 账户卡片 <balance-card>
|
|
91
|
+
|
|
92
|
+
```typescript
|
|
93
|
+
import { BalanceCard } from '@uxda/appkit'
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
```html
|
|
97
|
+
<template>
|
|
98
|
+
<balance-card app="crm" @drill="onBalanceCardDrill" @recharge="onBalanceCardRecharge" />
|
|
99
|
+
<template>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
#### 事件 emits
|
|
103
|
+
* app 配置到组件上的 app code
|
|
104
|
+
* @drill 点击账户详情时发生
|
|
105
|
+
* @recharge 点击充值按钮时发生
|
|
106
|
+
|
|
107
|
+
场景端需定义以上跳转逻辑:
|
|
108
|
+
|
|
109
|
+
```typescript
|
|
110
|
+
function onBalanceCardDrill () {
|
|
111
|
+
//...
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function onBalanceCardRecharge () {
|
|
115
|
+
//...
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### 方法 methods
|
|
120
|
+
* reload() 刷新数据
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
### 4️⃣ 余额不足提示框 <balance-reminder>
|
|
125
|
+
|
|
126
|
+
```typescript
|
|
127
|
+
import { BalanceReminder } from '@uxda/appkit'
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
```html
|
|
131
|
+
<balance-reminder v-model="balanceReminderOpen"
|
|
132
|
+
@recharge="onBalanceReminderRecharge" />
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
#### 事件 emits
|
|
136
|
+
* @recharge 点击充值按钮时发生
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
## 公共API
|
|
140
|
+
### 1️⃣ 唤起充值(跳支付中心小程序) $app.invokeRecharge()
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
import { useAppKit } from '@uxda/appkit'
|
|
144
|
+
const $app = useAppKit()
|
|
145
|
+
$app.invokeRecharge({
|
|
146
|
+
app: 'crm',
|
|
147
|
+
tenant: '1',
|
|
148
|
+
})
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### 2️⃣ 唤起充值(小程序内直接支付、不跳) $app.requestPayment()
|
|
152
|
+
|
|
153
|
+
```typescript
|
|
154
|
+
import { useAppKit } from '@uxda/appkit'
|
|
155
|
+
const $app = useAppKit()
|
|
156
|
+
$app.requestPayment({
|
|
157
|
+
app: 'crm',
|
|
158
|
+
tenant: '1',
|
|
159
|
+
amount: 100,
|
|
160
|
+
user: '' // wx.login 之后得到的用户临时凭证
|
|
161
|
+
})
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Hooks (Vue Composables)
|
|
165
|
+
|
|
166
|
+
### useTabbar
|
|
167
|
+
用于获取或设置 custom tab bar
|
|
168
|
+
|
|
169
|
+
```typescript
|
|
170
|
+
import { useTabbar } from '@uxda/appkit-next'
|
|
171
|
+
|
|
172
|
+
onMounted(() => {
|
|
173
|
+
const { setTab } = useTabbar()
|
|
174
|
+
setTab('home')
|
|
175
|
+
})
|
|
176
|
+
```
|
|
177
|
+
以上代码用于切换到 /pages/home/index 时, 设置 tab bar 选中项为 'home'
|
|
178
|
+
在 custom-tab-bar/index.vue 需要做以下设置
|
|
179
|
+
|
|
180
|
+
```typescript
|
|
181
|
+
import { useSafeArea, useTabbar } from '@uxda/appkit-next'
|
|
182
|
+
|
|
183
|
+
const { onTabChange } = useTabbar()
|
|
184
|
+
onTabChange((value: string) => {
|
|
185
|
+
selected.value = value
|
|
186
|
+
})
|
|
187
|
+
```
|
|
188
188
|
以上代码设置响应页面内的 setTab() 动作
|
package/babel.config.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
// babel-preset-taro 更多选项和默认值:
|
|
2
|
-
// https://github.com/NervJS/taro/blob/next/packages/babel-preset-taro/README.md
|
|
3
|
-
module.exports = {
|
|
4
|
-
presets: [
|
|
5
|
-
['taro', {
|
|
6
|
-
framework: 'vue3',
|
|
7
|
-
ts: true
|
|
8
|
-
}]
|
|
9
|
-
],
|
|
10
|
-
plugins: [
|
|
11
|
-
],
|
|
12
|
-
}
|
|
1
|
+
// babel-preset-taro 更多选项和默认值:
|
|
2
|
+
// https://github.com/NervJS/taro/blob/next/packages/babel-preset-taro/README.md
|
|
3
|
+
module.exports = {
|
|
4
|
+
presets: [
|
|
5
|
+
['taro', {
|
|
6
|
+
framework: 'vue3',
|
|
7
|
+
ts: true
|
|
8
|
+
}]
|
|
9
|
+
],
|
|
10
|
+
plugins: [
|
|
11
|
+
],
|
|
12
|
+
}
|
package/dist/appkit.css
CHANGED
|
@@ -72,10 +72,6 @@
|
|
|
72
72
|
.app-drawer.open {
|
|
73
73
|
height: 100vh;
|
|
74
74
|
}
|
|
75
|
-
.app-drawer .page-header {
|
|
76
|
-
flex-grow: 0;
|
|
77
|
-
background-color: #fff;
|
|
78
|
-
}
|
|
79
75
|
.app-drawer .drawer-body {
|
|
80
76
|
flex-grow: 1;
|
|
81
77
|
overflow: scroll;
|
|
@@ -449,9 +445,9 @@
|
|
|
449
445
|
color: #353535;
|
|
450
446
|
background: linear-gradient(90deg, #FFEBC1 0%, #FFB875 100%);
|
|
451
447
|
}
|
|
452
|
-
page {
|
|
453
|
-
--text-color: #333;
|
|
454
|
-
--text-color-dark-mode: #eee;
|
|
448
|
+
page {
|
|
449
|
+
--text-color: #333;
|
|
450
|
+
--text-color-dark-mode: #eee;
|
|
455
451
|
}
|
|
456
452
|
.account-card .card {
|
|
457
453
|
background: linear-gradient(90deg, #FFEBC1 0%, #FFB875 100%);
|
|
@@ -974,9 +970,11 @@ page {
|
|
|
974
970
|
}
|
|
975
971
|
.operation-box .operation-list .operation-scroll {
|
|
976
972
|
height: calc(100vh - 130px);
|
|
977
|
-
padding: 0 15px;
|
|
978
973
|
box-sizing: border-box;
|
|
979
974
|
}
|
|
975
|
+
.operation-box .operation-list .box {
|
|
976
|
+
padding: 0 10px;
|
|
977
|
+
}
|
|
980
978
|
.operation-box .operation-list .box-detail .title {
|
|
981
979
|
line-height: 22px;
|
|
982
980
|
font-weight: 700;
|
package/dist/index.js
CHANGED
|
@@ -6,14 +6,15 @@ import '@nutui/nutui-taro/dist/packages/grid/style/css';
|
|
|
6
6
|
import '@nutui/nutui-taro/dist/packages/griditem/style/css';
|
|
7
7
|
import Taro, { useDidShow, useRouter } from '@tarojs/taro';
|
|
8
8
|
import '@nutui/nutui-taro/dist/packages/popup/style/css';
|
|
9
|
-
import
|
|
9
|
+
import isMobilePhone from 'validator/es/lib/isMobilePhone';
|
|
10
|
+
import isIdentityCard from 'validator/es/lib/isIdentityCard';
|
|
10
11
|
import { NsForm, NsInput, NsButton, NsIcon, usePopup, useNutshell, NsPage, NsPageContent, NsCard, NsCheckbox } from '@uxda/nutshell/taro';
|
|
11
12
|
import '@nutui/nutui-taro/dist/packages/actionsheet/style/css';
|
|
12
|
-
import debounce from 'lodash/debounce';
|
|
13
|
+
import debounce from 'lodash-es/debounce';
|
|
13
14
|
import '@nutui/nutui-taro/dist/packages/dialog/style/css';
|
|
14
15
|
import '@nutui/nutui-taro/dist/packages/datepicker/style/css';
|
|
15
16
|
import dayjs from 'dayjs';
|
|
16
|
-
import groupBy from 'lodash/groupBy';
|
|
17
|
+
import groupBy from 'lodash-es/groupBy';
|
|
17
18
|
import { IconFont } from '@nutui/icons-vue-taro';
|
|
18
19
|
import '@nutui/nutui-taro/dist/packages/form/style/css';
|
|
19
20
|
import '@nutui/nutui-taro/dist/packages/formitem/style/css';
|
|
@@ -2237,7 +2238,7 @@ var script$w = /* @__PURE__ */ defineComponent({
|
|
|
2237
2238
|
]))
|
|
2238
2239
|
])
|
|
2239
2240
|
]),
|
|
2240
|
-
createCommentVNode(' <div class="line"></div>\
|
|
2241
|
+
createCommentVNode(' <div class="line"></div>\n <div class="card-row">\n <div class="card-row-left desc">\u6743\u76CA\u4F7F\u7528\u65F6\u81EA\u52A8\u6263\u51CF\u4E91\u8C46</div>\n <div class="card-row-right">\n <div class="pay" @click="gotoRecharge">\n <div>\u5145\u503C</div>\n <img\n class="pay-icon"\n src="https://cdn.ddjf.com/static/images/bpms-workBench/bean-right.png"\n />\n </div>\n </div>\n </div> ')
|
|
2241
2242
|
])
|
|
2242
2243
|
]);
|
|
2243
2244
|
};
|
|
@@ -2797,6 +2798,7 @@ var script$q = /* @__PURE__ */ defineComponent({
|
|
|
2797
2798
|
} else {
|
|
2798
2799
|
reachedLastPage.value = false;
|
|
2799
2800
|
}
|
|
2801
|
+
}).finally(() => {
|
|
2800
2802
|
Taro.hideLoading();
|
|
2801
2803
|
});
|
|
2802
2804
|
}
|
|
@@ -5843,7 +5845,12 @@ var script$9 = /* @__PURE__ */ defineComponent({
|
|
|
5843
5845
|
emits("binding", userInfo.value.mobile || "");
|
|
5844
5846
|
}
|
|
5845
5847
|
function toAuth() {
|
|
5846
|
-
emits(
|
|
5848
|
+
emits(
|
|
5849
|
+
"auth",
|
|
5850
|
+
props.userId,
|
|
5851
|
+
userInfo.value?.verifyResult,
|
|
5852
|
+
userInfo.value?.mobile
|
|
5853
|
+
);
|
|
5847
5854
|
}
|
|
5848
5855
|
const emits = __emit;
|
|
5849
5856
|
__expose({
|
|
@@ -5920,7 +5927,8 @@ var script$9 = /* @__PURE__ */ defineComponent({
|
|
|
5920
5927
|
}, {
|
|
5921
5928
|
desc: withCtx(() => [
|
|
5922
5929
|
userInfo.value?.verifyResult == 1 ? (openBlock(), createElementBlock("span", _hoisted_5$2, "\u5DF2\u8BA4\u8BC1")) : createCommentVNode("v-if", true),
|
|
5923
|
-
userInfo.value?.verifyResult == 0 ? (openBlock(), createElementBlock("span", _hoisted_6$1, "\u5DF2\u5931\u6548\uFF0C\u91CD\u65B0\u8BA4\u8BC1")) : (
|
|
5930
|
+
userInfo.value?.verifyResult == 0 ? (openBlock(), createElementBlock("span", _hoisted_6$1, "\u5DF2\u5931\u6548\uFF0C\u91CD\u65B0\u8BA4\u8BC1")) : createCommentVNode("v-if", true),
|
|
5931
|
+
userInfo.value?.verifyResult != 0 && userInfo.value?.verifyResult != 1 ? (openBlock(), createElementBlock("span", _hoisted_7$1, "\u672A\u8BA4\u8BC1\uFF0C\u53BB\u8BA4\u8BC1")) : createCommentVNode("v-if", true)
|
|
5924
5932
|
]),
|
|
5925
5933
|
_: 1
|
|
5926
5934
|
/* STABLE */
|
|
@@ -8111,13 +8119,15 @@ const _hoisted_2 = {
|
|
|
8111
8119
|
var script = /* @__PURE__ */ defineComponent({
|
|
8112
8120
|
__name: "UserAuth",
|
|
8113
8121
|
props: {
|
|
8114
|
-
userId: { type: String, required: true, default: "" }
|
|
8122
|
+
userId: { type: String, required: true, default: "" },
|
|
8123
|
+
verifyResult: { type: Number, required: true, default: -1 },
|
|
8124
|
+
mobile: { type: String, required: true, default: "" }
|
|
8115
8125
|
},
|
|
8116
8126
|
emits: ["toAgreement"],
|
|
8117
8127
|
setup(__props, { emit: __emit }) {
|
|
8118
8128
|
const props = __props;
|
|
8119
8129
|
const formRef = ref(), $n = useNutshell();
|
|
8120
|
-
|
|
8130
|
+
let formData = reactive({
|
|
8121
8131
|
\u59D3\u540D: "",
|
|
8122
8132
|
\u8EAB\u4EFD\u8BC1\u53F7\u7801: "",
|
|
8123
8133
|
\u7535\u8BDD\u53F7\u7801: "",
|
|
@@ -8156,6 +8166,22 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
8156
8166
|
Taro.showToast({ title: err?.errMsg || "\u8BA4\u8BC1\u5931\u8D25", icon: "none" });
|
|
8157
8167
|
});
|
|
8158
8168
|
}
|
|
8169
|
+
watch(
|
|
8170
|
+
() => props.verifyResult,
|
|
8171
|
+
() => {
|
|
8172
|
+
if (props.verifyResult == 1) {
|
|
8173
|
+
\u5DF2\u8BA4\u8BC1.value = true;
|
|
8174
|
+
}
|
|
8175
|
+
},
|
|
8176
|
+
{ deep: true, immediate: true }
|
|
8177
|
+
);
|
|
8178
|
+
watch(
|
|
8179
|
+
() => props.mobile,
|
|
8180
|
+
() => {
|
|
8181
|
+
formData.\u7535\u8BDD\u53F7\u7801 = props.mobile;
|
|
8182
|
+
},
|
|
8183
|
+
{ deep: true, immediate: true }
|
|
8184
|
+
);
|
|
8159
8185
|
const emits = __emit;
|
|
8160
8186
|
return (_ctx, _cache) => {
|
|
8161
8187
|
return openBlock(), createBlock(unref(NsPage), { class: "user-auth" }, {
|
|
@@ -8167,21 +8193,24 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
8167
8193
|
createVNode(unref(NsForm), {
|
|
8168
8194
|
ref_key: "formRef",
|
|
8169
8195
|
ref: formRef,
|
|
8170
|
-
modelValue: formData,
|
|
8171
|
-
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => formData = $event)
|
|
8196
|
+
modelValue: unref(formData),
|
|
8197
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => isRef(formData) ? formData.value = $event : formData = $event)
|
|
8172
8198
|
}, {
|
|
8173
8199
|
default: withCtx(() => [
|
|
8174
8200
|
createVNode(unref(NsInput), {
|
|
8175
8201
|
label: "\u4F60\u7684\u59D3\u540D",
|
|
8176
8202
|
name: "\u59D3\u540D",
|
|
8177
|
-
modelValue: formData.\u59D3\u540D,
|
|
8178
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => formData.\u59D3\u540D = $event),
|
|
8203
|
+
modelValue: unref(formData).\u59D3\u540D,
|
|
8204
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(formData).\u59D3\u540D = $event),
|
|
8179
8205
|
placeholder: "\u8BF7\u8F93\u5165\u6216\u62CD\u7167\u8BC6\u522B",
|
|
8180
8206
|
maxlength: 30,
|
|
8181
8207
|
rules: ["required"]
|
|
8182
8208
|
}, {
|
|
8183
8209
|
append: withCtx(() => [
|
|
8184
|
-
|
|
8210
|
+
!\u5DF2\u8BA4\u8BC1.value ? (openBlock(), createBlock(unref(script$D), {
|
|
8211
|
+
key: 0,
|
|
8212
|
+
onComplete: onOcrComplete
|
|
8213
|
+
})) : createCommentVNode("v-if", true)
|
|
8185
8214
|
]),
|
|
8186
8215
|
_: 1
|
|
8187
8216
|
/* STABLE */
|
|
@@ -8191,8 +8220,8 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
8191
8220
|
name: "\u8EAB\u4EFD\u8BC1\u53F7\u7801",
|
|
8192
8221
|
placeholder: "\u8BF7\u8F93\u5165\u8EAB\u4EFD\u8BC1\u53F7\u7801",
|
|
8193
8222
|
maxlength: 30,
|
|
8194
|
-
modelValue: formData.\u8EAB\u4EFD\u8BC1\u53F7\u7801,
|
|
8195
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => formData.\u8EAB\u4EFD\u8BC1\u53F7\u7801 = $event),
|
|
8223
|
+
modelValue: unref(formData).\u8EAB\u4EFD\u8BC1\u53F7\u7801,
|
|
8224
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(formData).\u8EAB\u4EFD\u8BC1\u53F7\u7801 = $event),
|
|
8196
8225
|
rules: [
|
|
8197
8226
|
"required",
|
|
8198
8227
|
{
|
|
@@ -8207,8 +8236,9 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
8207
8236
|
name: "\u7535\u8BDD\u53F7\u7801",
|
|
8208
8237
|
placeholder: "\u8BF7\u8F93\u5165\u7535\u8BDD\u53F7\u7801",
|
|
8209
8238
|
maxlength: 11,
|
|
8210
|
-
modelValue: formData.\u7535\u8BDD\u53F7\u7801,
|
|
8211
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => formData.\u7535\u8BDD\u53F7\u7801 = $event),
|
|
8239
|
+
modelValue: unref(formData).\u7535\u8BDD\u53F7\u7801,
|
|
8240
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(formData).\u7535\u8BDD\u53F7\u7801 = $event),
|
|
8241
|
+
disabled: true,
|
|
8212
8242
|
rules: [
|
|
8213
8243
|
{
|
|
8214
8244
|
name: "function",
|
|
@@ -8229,8 +8259,8 @@ var script = /* @__PURE__ */ defineComponent({
|
|
|
8229
8259
|
!\u5DF2\u8BA4\u8BC1.value ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
8230
8260
|
createVNode(unref(NsCheckbox), {
|
|
8231
8261
|
style: { "font-size": "11px" },
|
|
8232
|
-
modelValue: formData.\u540C\u610F,
|
|
8233
|
-
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => formData.\u540C\u610F = $event)
|
|
8262
|
+
modelValue: unref(formData).\u540C\u610F,
|
|
8263
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => unref(formData).\u540C\u610F = $event)
|
|
8234
8264
|
}, {
|
|
8235
8265
|
default: withCtx(() => _cache[5] || (_cache[5] = [
|
|
8236
8266
|
createTextVNode("\u6211\u5DF2\u9605\u8BFB\u5E76\u540C\u610F")
|