@uxda/appkit 4.3.6 → 4.3.8

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.
Files changed (135) hide show
  1. package/.eslintrc.mjs +7 -7
  2. package/COMPONENT_USAGE.md +1523 -1523
  3. package/PROJECT_DOCS.md +142 -142
  4. package/README.md +187 -187
  5. package/babel.config.js +12 -12
  6. package/dist/appkit.css +15 -63
  7. package/dist/assets/asset-DcH8Kg-2 +1 -0
  8. package/dist/index.js +259 -806
  9. package/package.json +79 -79
  10. package/project.config.json +15 -15
  11. package/project.tt.json +13 -13
  12. package/rollup.config.mjs +78 -78
  13. package/src/Appkit.ts +72 -72
  14. package/src/balance/api/endpoints.ts +133 -133
  15. package/src/balance/api/index.ts +118 -118
  16. package/src/balance/components/AccountView.vue +770 -770
  17. package/src/balance/components/BalanceCard.vue +210 -210
  18. package/src/balance/components/BalanceReminder.vue +84 -84
  19. package/src/balance/components/ConsumptionFilter.vue +218 -218
  20. package/src/balance/components/ConsumptionRules.vue +68 -68
  21. package/src/balance/components/DateFilter.vue +259 -259
  22. package/src/balance/components/DateRange.vue +111 -111
  23. package/src/balance/components/ListFilter.vue +62 -62
  24. package/src/balance/components/ListFilterPicker.vue +191 -191
  25. package/src/balance/components/PromoterCard.vue +307 -308
  26. package/src/balance/components/SecondBalance.vue +77 -77
  27. package/src/balance/components/Tip.vue +45 -45
  28. package/src/balance/components/index.ts +8 -8
  29. package/src/balance/types.ts +99 -99
  30. package/src/components/bt-cropper/index.vue +730 -730
  31. package/src/components/bt-cropper/utils/calcCropper.js +42 -42
  32. package/src/components/bt-cropper/utils/calcImagePosition.js +23 -23
  33. package/src/components/bt-cropper/utils/calcImageSize.js +37 -37
  34. package/src/components/bt-cropper/utils/calcPointDistance.js +12 -12
  35. package/src/components/bt-cropper/utils/calcRightAndBottom.js +7 -7
  36. package/src/components/bt-cropper/utils/ratio.js +3 -3
  37. package/src/components/bt-cropper/utils/tools.js +25 -25
  38. package/src/components/dd-area/index.vue +225 -225
  39. package/src/components/dd-icon/doc.md +21 -21
  40. package/src/components/dd-icon/index.vue +23 -23
  41. package/src/components/dd-notice-bar/index.vue +78 -78
  42. package/src/components/dd-search/doc.md +34 -34
  43. package/src/components/dd-search/index.vue +168 -168
  44. package/src/components/dd-selector/index.vue +124 -124
  45. package/src/components/dd-skeleton/doc.md +19 -19
  46. package/src/components/dd-skeleton/index.vue +36 -36
  47. package/src/global.ts +6 -6
  48. package/src/index.ts +101 -101
  49. package/src/main.scss +1 -1
  50. package/src/notice/api/endpoints.ts +54 -54
  51. package/src/notice/api/index.ts +121 -121
  52. package/src/notice/components/NoticeBanner.vue +247 -247
  53. package/src/notice/components/NoticeEntry.vue +99 -99
  54. package/src/notice/components/NoticeList.vue +311 -311
  55. package/src/notice/components/NoticeList2.vue +400 -399
  56. package/src/notice/components/NoticePopup.vue +163 -163
  57. package/src/notice/components/index.ts +6 -6
  58. package/src/notice/components/useCommonList.ts +86 -87
  59. package/src/notice/components/useNotice.ts +35 -35
  60. package/src/notice/index.ts +1 -1
  61. package/src/notice/types.ts +25 -25
  62. package/src/payment/api/config.ts +7 -7
  63. package/src/payment/api/endpoints.ts +96 -98
  64. package/src/payment/api/index.ts +107 -108
  65. package/src/payment/components/AmountPicker.vue +90 -90
  66. package/src/payment/components/RechargeResult.vue +69 -68
  67. package/src/payment/components/RechargeView.vue +191 -191
  68. package/src/payment/components/RightsPicker.vue +105 -105
  69. package/src/payment/components/TradeView.vue +363 -571
  70. package/src/payment/components/UserAgreement.vue +234 -234
  71. package/src/payment/components/index.ts +22 -22
  72. package/src/payment/index.ts +5 -5
  73. package/src/payment/services/index.ts +16 -16
  74. package/src/payment/services/invoke-recharge.ts +25 -25
  75. package/src/payment/services/request-payment.ts +130 -132
  76. package/src/payment/types.ts +33 -34
  77. package/src/register/components/SelfRegistration.vue +233 -233
  78. package/src/register/components/index.ts +2 -2
  79. package/src/scenarios/components/SharePoster.vue +364 -364
  80. package/src/scenarios/components/index.ts +2 -2
  81. package/src/scenarios/components/poster-paste.vue +93 -93
  82. package/src/scenarios/components/share-poster.md +273 -273
  83. package/src/shared/components/AppDrawer.vue +53 -53
  84. package/src/shared/components/AppVerify.vue +128 -137
  85. package/src/shared/components/DeviceVersion.vue +78 -78
  86. package/src/shared/components/EmptyView.vue +33 -33
  87. package/src/shared/components/OcrBusinessLicense.vue +137 -120
  88. package/src/shared/components/OcrIcon.vue +229 -267
  89. package/src/shared/components/PageHeader.vue +84 -84
  90. package/src/shared/components/index.ts +8 -10
  91. package/src/shared/composables/index.ts +9 -10
  92. package/src/shared/composables/useAmount.ts +46 -46
  93. package/src/shared/composables/useCountdown.ts +46 -46
  94. package/src/shared/composables/useCrypto.ts +76 -76
  95. package/src/shared/composables/useDeviceEnv.ts +26 -26
  96. package/src/shared/composables/useDragBox.ts +97 -97
  97. package/src/shared/composables/useEncode.ts +43 -43
  98. package/src/shared/composables/useLogger.ts +144 -144
  99. package/src/shared/composables/useSafeArea.ts +46 -46
  100. package/src/shared/composables/useTabbar.ts +24 -24
  101. package/src/shared/composables/useUpload.ts +61 -106
  102. package/src/shared/composables/useValidator.ts +32 -32
  103. package/src/shared/composables/useWxAuth.ts +48 -48
  104. package/src/shared/http/Http.ts +148 -149
  105. package/src/shared/http/index.ts +1 -1
  106. package/src/shared/http/types.ts +163 -163
  107. package/src/shared/index.ts +9 -9
  108. package/src/shared/tracking/directives/index.ts +40 -40
  109. package/src/shared/tracking/examples/page-tracking-template.vue +27 -27
  110. package/src/shared/tracking/tracking-sdk.ts +1 -0
  111. package/src/shared/weixin/index.ts +9 -9
  112. package/src/shared/weixin/jssdk.ts +103 -104
  113. package/src/shared/weixin/payment.ts +38 -38
  114. package/src/styles/vars.scss +3 -3
  115. package/src/user/api/endpoints.ts +17 -17
  116. package/src/user/api/index.ts +123 -123
  117. package/src/user/components/LoginSetting.vue +114 -114
  118. package/src/user/components/UserAuth.vue +218 -218
  119. package/src/user/components/UserBinding.vue +277 -277
  120. package/src/user/components/UserBindingSuccess.vue +80 -80
  121. package/src/user/components/UserEntry.vue +139 -139
  122. package/src/user/components/UserFeedback.vue +427 -428
  123. package/src/user/components/UserFeedbackEntry.vue +175 -175
  124. package/src/user/components/UserHeadCrop.vue +65 -65
  125. package/src/user/components/UserInfo.vue +709 -711
  126. package/src/user/components/UserResourceEmpty.vue +75 -75
  127. package/src/user/components/index.ts +23 -23
  128. package/src/user/index.ts +1 -1
  129. package/src/utils/utils.ts +33 -33
  130. package/tsconfig.json +30 -30
  131. package/types/global.d.ts +22 -24
  132. package/types/vue.d.ts +10 -10
  133. package/src/shared/components/OcrBank.vue +0 -202
  134. package/src/shared/components/OcrInvoice.vue +0 -218
  135. package/src/shared/composables/useCompress.ts +0 -64
@@ -1,770 +1,770 @@
1
- <template>
2
- <div class="account-view">
3
- <div class="scroll-content">
4
- <page-header :title="Taro.getEnv() !== 'WEB' ? '我的账户' : ''" :class="{ 'with-background': scrolled > 0 }"
5
- @close="onPageHeaderClose" />
6
- <div class="row jusify-right">
7
- <div class="small-bean-button" v-track-click @click="onSecondBalanceButtonClick">
8
- <label class="label">收支明细</label>
9
- </div>
10
- </div>
11
- <div class="balance">
12
- <div class="bean-box spa-between">
13
- <div class="bean-img">
14
- <img class="bean-icon" src="https://cdn.ddjf.com/static/images/bpms-workBench/gold-bean.png" />
15
- <div class="bean-tag tag">云豆</div>
16
- </div>
17
- <div v-if="!isAppEnv || (isAppEnv && !isIOS())" class="rule" v-track-click @click="rulesPopupOpen = true">规则说明</div>
18
- </div>
19
- <div class="bean-counts spa-between">
20
- <div class="counts number">{{ formatAmount(balance.total || 0) }}</div>
21
- <div v-if="!isAppEnv || (isAppEnv && !isIOS())" class="pay" v-track-click @click="gotoRecharge">云豆充值</div>
22
- </div>
23
- </div>
24
- <Tip />
25
- <div class="rights-card" v-if="balance.privileges?.corporateStar">
26
- <div class="title">企明星权益</div>
27
- <div class="list">
28
- <div class="item star-item" v-for="(item, index) in balance.privileges.corporateStar" :key="index">
29
- <div class="item-count">
30
- <span>{{ formatAmount(item.count || 0) }}</span><span>{{ item.unit }}</span>
31
- </div>
32
- <div class="item-title">
33
- <div>{{ item.title }}</div>
34
- <div class="item-title-button" v-if="item.id && (!isAppEnv || (isAppEnv && !isIOS()))">
35
- <div v-track-click @click="gotoTrade(item)">企明星优惠充值</div>
36
- <img class="button-icon" src="https://cdn.ddjf.com/static/images/bpms-workBench/button-hg.svg" />
37
- </div>
38
- </div>
39
- </div>
40
- </div>
41
- </div>
42
- <div class="rights-card" v-if="balance.privileges?.aiapprove">
43
- <div class="title">AI审批权益</div>
44
- <div class="list">
45
- <div class="item star-item" v-for="(item, index) in balance.privileges.aiapprove" :key="index">
46
- <div class="item-count">{{ formatAmount(item.count || 0) }}{{ item.unit }}</div>
47
- <div class="item-title">
48
- <div>{{ item.title }}</div>
49
- <div class="item-title-button" v-if="item.id && (!isAppEnv || (isAppEnv && !isIOS()))">
50
- <div v-track-click @click="gotoTrade(item)">AI审批充值</div>
51
- <img class="button-icon" src="https://cdn.ddjf.com/static/images/bpms-workBench/button-hg.svg" />
52
- </div>
53
- </div>
54
- </div>
55
- </div>
56
- </div>
57
- <div class="rights-card" v-if="balance.privileges?.signkit">
58
- <div class="title">电子签约权益</div>
59
- <div class="list">
60
- <div class="item" v-for="(item, index) in balance.privileges.signkit" :key="index">
61
- <div class="item-count">{{ formatAmount(item.count || 0) }}{{ item.unit }}</div>
62
- <div class="item-title">{{ item.title }}</div>
63
- </div>
64
- </div>
65
- </div>
66
- </div>
67
- </div>
68
- <nut-popup pop-class="consumption-rules-popup" v-model:visible="rulesPopupOpen" :close-on-click-overlay="false">
69
- <consumption-rules @complete="rulesPopupOpen = false" />
70
- </nut-popup>
71
- <nut-popup position="bottom" :style="{ height: '40%' }" round :close-on-click-overlay="true"
72
- v-model:visible="datePickerOpen">
73
- <date-filter v-if="datePickerOpen" :from="filtering.dateFrom" :to="filtering.dateTo" @reset="onDateReset"
74
- @complete="onDateFilterComplete" />
75
- </nut-popup>
76
- <nut-popup position="bottom" :style="{ height: '75%' }" round :close-on-click-overlay="true"
77
- v-model:visible="filterOpen">
78
- <consumption-filter :modelValue="[
79
- filtering.账户类型,
80
- filtering.收入还是支出,
81
- filtering.交易类型,
82
- filtering.权益类目,
83
- ]" @complete="onFilterComplete" />
84
- </nut-popup>
85
- <app-drawer v-model="secondBalanceOpen" title="收支明细">
86
- <div class="operation-box">
87
- <div class="operation-title spa-between" :class="{ 'with-shadow': scrolled > 0 }">
88
- <div class="search-time">
89
- <div class="title">收支明细</div>
90
- <div class="time" @click="openDateFilter" v-show="filtering.dateFrom">
91
- <div class="text number">{{ dateRangeDisplay }}</div>
92
- <img style="margin-top: -2px" class="time-icon"
93
- src="https://cdn.ddjf.com/static/images/bpms-workBench/clound-bean-down.png" />
94
- </div>
95
- </div>
96
- <div class="search" v-track-click @click="filterOpen = true">
97
- <span class="text">筛选</span>
98
- <img class="time-icon" src="https://cdn.ddjf.com/static/images/bpms-workBench/clound-bean-select-icon.png" />
99
- </div>
100
- </div>
101
- <div class="operation-list">
102
- <ScrollView class="operation-scroll" :scroll-y="true" @scroll="onScroll" :lower-threshold="100"
103
- @scrolltolower="onReachBottom">
104
- <div class="box" v-if="consumptionGroups.length > 0">
105
- <div class="box-detail" v-for="(item, index) in consumptionGroups" :key="index">
106
- <div class="title number">{{ item.date }}</div>
107
- <div class="item" v-for="(it, i) in item.consumptions" :key="i">
108
- <div class="item-type">
109
- {{ it.交易类型 }}
110
- </div>
111
- <div class="item-detail">
112
- <div class="item-info spa-between">
113
- <div>
114
- <div class="item-info-type">
115
- {{ it.账户类型 }}
116
- </div>
117
- <div class="item-info-title">{{ it.title }}</div>
118
- </div>
119
- <div class="item-info-amount number">
120
- {{ it.收入还是支出 == '支出' ? '-' : '+' }}{{ it.amount }}
121
- </div>
122
- </div>
123
- <div class="item-detail-remark">{{ it.description }}</div>
124
- </div>
125
- </div>
126
- </div>
127
- <div class="box-not-text" v-if="reachedLastPage">没有更多了</div>
128
- </div>
129
- <empty-view v-else></empty-view>
130
- </ScrollView>
131
- </div>
132
- </div>
133
- </app-drawer>
134
- </template>
135
-
136
- <script lang="ts" setup>
137
- import Taro, { useDidShow, showLoading, hideLoading } from '@tarojs/taro'
138
- import { computed, onMounted, reactive, ref, watch } from 'vue'
139
- import { endpoints, useHttp } from '../api'
140
- import { 账户流水筛选项, Balance, ConsumptionGroup, 账户流水 } from '../types'
141
- import ConsumptionFilter from './ConsumptionFilter.vue'
142
- import DateFilter from './DateFilter.vue'
143
- import ConsumptionRules from './ConsumptionRules.vue'
144
- import { AppDrawer, PageHeader, WithPaging } from '../../shared'
145
- import dayjs from 'dayjs'
146
- import EmptyView from '../../shared/components/EmptyView.vue'
147
- import Tip from './Tip.vue'
148
- import groupBy from 'lodash-es/groupBy'
149
- import { useAmount } from '../../shared/composables/useAmount'
150
- import { ScrollView } from '@tarojs/components'
151
- import { isApp } from '../../utils/utils'
152
- import { isIOS } from '../../shared/composables/useDeviceEnv'
153
-
154
- type AccountViewProps = {
155
- app: string
156
- }
157
- const props = withDefaults(defineProps<AccountViewProps>(), {
158
- app: '',
159
- })
160
-
161
- const refreshing = ref(false)
162
- const { formatAmount } = useAmount()
163
- const emit = defineEmits(['recharge', 'trade'])
164
-
165
- const filterOpen = ref<boolean>(false)
166
-
167
- // 规则说明弹窗
168
- const rulesPopupOpen = ref<boolean>(false)
169
-
170
- const filtering = reactive<账户流水筛选项>({
171
- 账户类型: '全部',
172
- 收入还是支出: '全部',
173
- 交易类型: '全部',
174
- 权益类目: '',
175
- dateFrom: '',
176
- dateTo: '',
177
- page: 1,
178
- pageSize: 20,
179
- })
180
-
181
- const reachedLastPage = ref<boolean>(false)
182
-
183
- /**
184
- * 全新搜索
185
- * 重置某些查询条件
186
- */
187
- function restartSearch() {
188
- // 从第一页开始
189
- filtering.page = 1
190
- consumptionGroups.value = []
191
- loadConsumptions()
192
- }
193
-
194
- // 时间筛选
195
- const datePickerOpen = ref<boolean>(false)
196
-
197
- function openDateFilter() {
198
- datePickerOpen.value = true
199
- }
200
-
201
- const dateRangeDisplay = computed(() => {
202
- let startTime = (filtering.dateFrom || '').replace(/-/g, '.').substring(2)
203
- let endTime = (filtering.dateTo || '').replace(/-/g, '.').substring(2)
204
- return startTime + ' - ' + endTime
205
- })
206
-
207
- const consumptionGroups = ref<ConsumptionGroup[]>([])
208
-
209
- /**
210
- * 余额数据
211
- */
212
- const balance = ref<Balance>({
213
- total: 0,
214
- privileges: {},
215
- })
216
-
217
- useDidShow(() => {
218
- if (Taro.getEnv() !== 'WEB') {
219
- Taro.setNavigationBarTitle({
220
- title: '我的账户',
221
- })
222
- }
223
- loadBalance()
224
- })
225
-
226
- function groupDataByDate(data: 账户流水[]): ConsumptionGroup[] {
227
- // 按照日期分组
228
- const groups: ConsumptionGroup[] = consumptionGroups.value || []
229
- // [
230
- // date: '2023-10-1',
231
- // consumptions: []
232
- // ]
233
- // 组装成按日期分组
234
- data.forEach((d) => {
235
- const date = dayjs(d.time).format('YYYY-MM-DD')
236
- let group: ConsumptionGroup | undefined = groups.find((g) => g.date === date)
237
- if (!group) {
238
- group = {
239
- date,
240
- consumptions: [],
241
- }
242
- groups.push(group)
243
- }
244
- group.consumptions.push(d)
245
- })
246
- groups.sort((a, b) => (a.date > b.date ? -1 : 1))
247
- return groups
248
- }
249
-
250
- /**
251
- * 请求账户流水
252
- * @param append 搜索结果累加 上拉分页时
253
- */
254
- async function loadConsumptions(append: boolean = false) {
255
- if (!append) {
256
- consumptionGroups.value = []
257
- }
258
- const $http = useHttp()
259
- showLoading({
260
- title: `加载中...`,
261
- mask: true,
262
- })
263
- $http
264
- .get<WithPaging<账户流水[]>>(endpoints.获取账户流水, {
265
- app: props.app,
266
- ...filtering,
267
- })
268
- .then((response) => {
269
- consumptionGroups.value = groupDataByDate(response.data)
270
- if (filtering.page >= response.totalPages) {
271
- filtering.page = response.totalPages
272
- reachedLastPage.value = true
273
- } else {
274
- reachedLastPage.value = false
275
- }
276
- }).finally(() => {
277
- hideLoading()
278
- })
279
- }
280
-
281
- /**
282
- * 获取账户余额明细
283
- */
284
- async function loadBalance() {
285
- const $http = useHttp()
286
- $http
287
- .get<Balance>(endpoints.获取余额明细, {
288
- app: props.app,
289
- })
290
- .then((data) => {
291
- const { privileges, total } = data
292
- const filterData = {
293
- total,
294
- privileges: groupBy(privileges, 'appCode'),
295
- }
296
- balance.value = filterData
297
- })
298
- }
299
-
300
- const onFilterComplete = (value) => {
301
- filtering.账户类型 = value[0]
302
- filtering.收入还是支出 = value[1]
303
- filtering.交易类型 = value[2]
304
- filtering.权益类目 = value[3]
305
- filterOpen.value = false
306
- restartSearch()
307
- }
308
-
309
- const onDateFilterComplete = (value) => {
310
- filtering.dateFrom = value.from
311
- filtering.dateTo = value.to
312
- datePickerOpen.value = false
313
- restartSearch()
314
- }
315
-
316
- function gotoRecharge() {
317
- emit('recharge')
318
- }
319
-
320
- function gotoTrade(item: any) {
321
- emit('trade', item)
322
- }
323
-
324
- function loadNextPage() {
325
- filtering.page++
326
- loadConsumptions(true)
327
- }
328
-
329
- // 以下这一大段处理下拉刷新、上滑分页以及弹窗与页面滑动的逻辑
330
- const scrolled = ref<number>(0)
331
-
332
- /**
333
- * 记录 scroll-view 滚动的位置
334
- */
335
- const onScroll = (e) => {
336
- const { scrollTop } = e
337
- scrolled.value = scrollTop
338
- }
339
-
340
- /**
341
- * 下拉刷新 pull down refresh
342
- */
343
- const onPullDownRefresh = () => {
344
- refreshing.value = true
345
- // 重新请求余额数据
346
- loadBalance()
347
- setTimeout(() => {
348
- refreshing.value = false
349
- }, 500)
350
- }
351
-
352
- /**
353
- * 滑动到底部请求下一页并合并查询结果
354
- */
355
- const onReachBottom = () => {
356
- console.log('到底了')
357
- if (reachedLastPage.value) {
358
- return false
359
- }
360
- loadNextPage()
361
- }
362
-
363
- const secondBalanceOpen = ref<boolean>(false)
364
-
365
- function onSecondBalanceButtonClick() {
366
- secondBalanceOpen.value = true
367
- loadConsumptions()
368
- }
369
-
370
- watch(secondBalanceOpen, () => {
371
- if (Taro.getEnv() !== 'WEB') {
372
- Taro.setNavigationBarColor({
373
- frontColor: secondBalanceOpen.value ? '#000000' : '#ffffff',
374
- backgroundColor: '#ffffff',
375
- animation: {
376
- duration: 400,
377
- timingFunc: 'easeIn',
378
- },
379
- })
380
- }
381
- })
382
-
383
- function onDateReset() {
384
- resetDateRange()
385
- datePickerOpen.value = false
386
- restartSearch()
387
- }
388
-
389
- /**
390
- * 充值筛选的起止时间
391
- */
392
- function resetDateRange() {
393
- // 筛选的起止时间
394
- filtering.dateTo = dayjs().format('YYYY-MM-DD')
395
- filtering.dateFrom = dayjs().add(-3, 'M').format('YYYY-MM-DD')
396
- }
397
-
398
- function onPageHeaderClose() {
399
- Taro.navigateBack({
400
- delta: 1,
401
- })
402
- }
403
-
404
- const isAppEnv = computed(() => {
405
- return isApp()
406
- })
407
-
408
- onMounted(() => {
409
- resetDateRange()
410
- })
411
- </script>
412
-
413
- <style lang="scss">
414
- .account-view {
415
- height: 100vh;
416
-
417
- .scroll-content {
418
- background-image: url('https://cdn.ddjf.com/static/images/customer-center/blue-bg.png');
419
- background-position: center 0;
420
- background-repeat: no-repeat;
421
- background-size: 100% 200px;
422
- }
423
-
424
- .page-header {
425
- background-color: transparent;
426
- position: sticky;
427
- top: 0;
428
- z-index: 1;
429
- transition: background-color 0.3s;
430
-
431
- &.with-background {
432
- background-color: #3b393c;
433
- color: #fff;
434
- }
435
- }
436
-
437
- .spa-between {
438
- display: flex;
439
- justify-content: space-between;
440
- align-items: center;
441
- }
442
-
443
- .row {
444
- display: flex;
445
- flex-direction: row;
446
- padding: 10px 15px;
447
- }
448
-
449
- .jusify-right {
450
- justify-content: flex-end;
451
- }
452
-
453
- .small-bean-button {
454
- height: 22px;
455
- border-radius: 11px;
456
- background-color: #fff;
457
- display: inline-flex;
458
- align-items: center;
459
- padding: 0 10px;
460
- color: #353535;
461
- font-size: 12px;
462
-
463
- .label {
464
- background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEwIDZMMTYgMTJMMTAgMThWNloiIGZpbGw9IiMzNTM1MzUiIHN0cm9rZT0iIzM1MzUzNSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=');
465
- padding-right: 18px;
466
- background-repeat: no-repeat;
467
- background-position: right center;
468
- background-size: 16px;
469
- }
470
- }
471
-
472
- .balance {
473
- border-radius: 15px;
474
- background: linear-gradient(90deg, #FFEBC1 0%, #FFB875 100%);
475
- height: 112px;
476
- padding: 20px;
477
- margin: 0 15px;
478
- box-sizing: border-box;
479
- font-size: 10px;
480
-
481
- .bean-img {
482
- display: flex;
483
- justify-content: flex-start;
484
- align-items: center;
485
-
486
- .bean-icon {
487
- display: block;
488
- font-size: 0;
489
- width: 20px;
490
- height: 20px;
491
- margin-right: 4px;
492
- }
493
-
494
- .bean-tag {
495
- color: #353535;
496
- height: 15px;
497
- line-height: 15px;
498
- border-radius: 30px 50px 50px 0px;
499
- background: rgba(#ff8320, 0.3);
500
- padding-left: 5px;
501
- padding-right: 10px;
502
- }
503
-
504
- .tag {
505
- background: #ff8320;
506
- color: #fff;
507
- }
508
- }
509
-
510
- .rule {
511
- color: #353535;
512
- opacity: 0.5;
513
- }
514
- }
515
-
516
- .bean-counts {
517
- margin-top: 12px;
518
-
519
- .counts {
520
- color: #3d3835;
521
- font-size: 32px;
522
- font-weight: 700;
523
- }
524
-
525
- .pay {
526
- padding: 0 20px;
527
- height: 32px;
528
- line-height: 32px;
529
- background: linear-gradient(187.18deg, #353535 10.04%, #433f46 90.21%);
530
- border-radius: 16px;
531
- color: #e7caad;
532
- font-size: 15px;
533
- font-weight: 500;
534
- }
535
- }
536
- }
537
-
538
- .consumption-rules-popup {
539
- border-radius: 16px;
540
- width: 70%;
541
- max-height: 80%;
542
- padding: 24px;
543
- }
544
-
545
- .operation-box {
546
- width: 100vw;
547
- overflow: hidden;
548
- display: flex;
549
- flex-direction: column;
550
- height: calc(100vh - 87px);
551
-
552
- .operation-title {
553
- padding: 10px 15px;
554
- background: #fff;
555
- transition: box-shadow 0.3s;
556
-
557
- &.with-shadow {
558
- box-shadow: 0px 1px 10px 0px #99999933;
559
- }
560
-
561
- .text {
562
- color: #353535;
563
- font-size: 12px;
564
- opacity: 0.5;
565
- }
566
-
567
- .time-icon {
568
- display: block;
569
- font-size: 0;
570
- width: 12px;
571
- height: 12px;
572
- margin-left: 4px;
573
- }
574
-
575
- .search-time {
576
- display: flex;
577
- align-items: center;
578
-
579
- .title {
580
- color: #000;
581
- font-weight: 500;
582
- font-size: 17px;
583
- margin-right: 10px;
584
- }
585
-
586
- .time {
587
- height: 22px;
588
- padding-right: 5px;
589
- flex: 1;
590
- display: flex;
591
- align-items: center;
592
- }
593
- }
594
-
595
- .search {
596
- display: flex;
597
- align-items: center;
598
- height: 22px;
599
- padding-left: 5px;
600
- }
601
- }
602
-
603
- .spa-between {
604
- display: flex;
605
- justify-content: space-between;
606
- align-items: center;
607
- }
608
-
609
- .operation-list {
610
- flex: 1;
611
- width: 100%;
612
-
613
- .operation-scroll {
614
- height: calc(100vh - 132px);
615
- box-sizing: border-box;
616
- }
617
-
618
- .box {
619
- padding: 0 10px;
620
-
621
- &-detail {
622
- .title {
623
- line-height: 22px;
624
- font-weight: 700;
625
- font-size: 12px;
626
- color: #000;
627
- opacity: 0.5;
628
- margin-bottom: 10px;
629
- }
630
-
631
- .item {
632
- border-radius: 5px;
633
- background: rgba(255, 255, 255, 0.5);
634
- box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.05);
635
- border-radius: 5px;
636
- padding: 12px 10px;
637
- display: flex;
638
- margin-bottom: 10px;
639
-
640
- &-type {
641
- background: linear-gradient(113.95deg, #f4e2ce 1.2%, #debb9b 77.63%);
642
- width: 30px;
643
- height: 30px;
644
- border-radius: 15px;
645
- margin-right: 15px;
646
- line-height: 30px;
647
- font-size: 10px;
648
- font-weight: 500;
649
- color: #000;
650
- text-align: center;
651
- }
652
-
653
- &-detail {
654
- flex: 1;
655
-
656
- .item-info {
657
- padding: 0;
658
- font-size: 14px;
659
- font-weight: 700;
660
- color: #000;
661
-
662
- &-type {
663
- line-height: 15px;
664
- }
665
-
666
- &-title {
667
- font-weight: 400;
668
- opacity: 0.8;
669
- font-size: 11px;
670
- }
671
-
672
- &-amount {
673
- color: #9e7b5a;
674
- }
675
- }
676
-
677
- &-remark {
678
- opacity: 0.3;
679
- line-height: 15px;
680
- font-size: 10px;
681
- }
682
- }
683
- }
684
- }
685
-
686
- &-not-text {
687
- opacity: 0.4;
688
- color: #353535;
689
- font-size: 12px;
690
- line-height: 20px;
691
- margin: 0 auto 40px;
692
- text-align: center;
693
- }
694
- }
695
- }
696
- }
697
-
698
- .rights-card {
699
- margin: 10px 15px 0px;
700
- background: rgb(255, 248, 243, 0.8);
701
- border-radius: 5px;
702
- padding: 15px 20px;
703
- box-shadow: 0px 5px 18.9px 2px #0000000D;
704
-
705
-
706
- .title {
707
- height: 25px;
708
- line-height: 25px;
709
- background: rgba($color: #ff8320, $alpha: 0.3);
710
- border-radius: 20px 50px 50px 0px;
711
- color: #353535;
712
- font-size: 12px;
713
- display: inline-block;
714
- padding-left: 5px;
715
- padding-right: 12px;
716
- }
717
-
718
- .list {
719
- display: flex;
720
- flex-wrap: wrap;
721
-
722
- .item {
723
- width: 50%;
724
- margin-top: 15px;
725
-
726
- .item-count {
727
- font-size: 20px;
728
- color: #353535;
729
- font-weight: 700;
730
- line-height: 23px;
731
- }
732
-
733
- .item-title {
734
- line-height: 23px;
735
- color: #987356;
736
- font-size: 11px;
737
- display: flex;
738
- align-items: center;
739
-
740
- .item-title-button {
741
- padding: 0 14px;
742
- height: 27px;
743
- line-height: 27px;
744
- background: -webkit-linear-gradient(262.82deg, #353535 10.04%, #433f46 90.21%);
745
- background: linear-gradient(187.18deg, #353535 10.04%, #433f46 90.21%);
746
- border-radius: 14px;
747
- color: #e7caad;
748
- font-size: 12px;
749
- font-weight: 400;
750
- margin-left: 20px;
751
- display: flex;
752
- align-items: center;
753
-
754
- .button-icon {
755
- display: block;
756
- width: 12px;
757
- height: 12px;
758
- font-size: 0;
759
- margin-left: 4px;
760
- }
761
- }
762
- }
763
- }
764
-
765
- .star-item {
766
- width: 100%;
767
- }
768
- }
769
- }
770
- </style>
1
+ <template>
2
+ <div class="account-view">
3
+ <div class="scroll-content">
4
+ <page-header :title="Taro.getEnv() !== 'WEB' ? '我的账户' : ''" :class="{ 'with-background': scrolled > 0 }"
5
+ @close="onPageHeaderClose" />
6
+ <div class="row jusify-right">
7
+ <div class="small-bean-button" v-track-click @click="onSecondBalanceButtonClick">
8
+ <label class="label">收支明细</label>
9
+ </div>
10
+ </div>
11
+ <div class="balance">
12
+ <div class="bean-box spa-between">
13
+ <div class="bean-img">
14
+ <img class="bean-icon" src="https://cdn.ddjf.com/static/images/bpms-workBench/gold-bean.png" />
15
+ <div class="bean-tag tag">云豆</div>
16
+ </div>
17
+ <div v-if="!isAppEnv || (isAppEnv && !isIOS())" class="rule" v-track-click @click="rulesPopupOpen = true">规则说明</div>
18
+ </div>
19
+ <div class="bean-counts spa-between">
20
+ <div class="counts number">{{ formatAmount(balance.total || 0) }}</div>
21
+ <div v-if="!isAppEnv || (isAppEnv && !isIOS())" class="pay" v-track-click @click="gotoRecharge">云豆充值</div>
22
+ </div>
23
+ </div>
24
+ <Tip />
25
+ <div class="rights-card" v-if="balance.privileges?.corporateStar">
26
+ <div class="title">企明星权益</div>
27
+ <div class="list">
28
+ <div class="item star-item" v-for="(item, index) in balance.privileges.corporateStar" :key="index">
29
+ <div class="item-count">
30
+ <span>{{ formatAmount(item.count || 0) }}</span><span>{{ item.unit }}</span>
31
+ </div>
32
+ <div class="item-title">
33
+ <div>{{ item.title }}</div>
34
+ <div class="item-title-button" v-if="item.id && (!isAppEnv || (isAppEnv && !isIOS()))">
35
+ <div v-track-click @click="gotoTrade(item)">企明星优惠充值</div>
36
+ <img class="button-icon" src="https://cdn.ddjf.com/static/images/bpms-workBench/button-hg.svg" />
37
+ </div>
38
+ </div>
39
+ </div>
40
+ </div>
41
+ </div>
42
+ <div class="rights-card" v-if="balance.privileges?.aiapprove">
43
+ <div class="title">AI审批权益</div>
44
+ <div class="list">
45
+ <div class="item star-item" v-for="(item, index) in balance.privileges.aiapprove" :key="index">
46
+ <div class="item-count">{{ formatAmount(item.count || 0) }}{{ item.unit }}</div>
47
+ <div class="item-title">
48
+ <div>{{ item.title }}</div>
49
+ <div class="item-title-button" v-if="item.id && (!isAppEnv || (isAppEnv && !isIOS()))">
50
+ <div v-track-click @click="gotoTrade(item)">AI审批充值</div>
51
+ <img class="button-icon" src="https://cdn.ddjf.com/static/images/bpms-workBench/button-hg.svg" />
52
+ </div>
53
+ </div>
54
+ </div>
55
+ </div>
56
+ </div>
57
+ <div class="rights-card" v-if="balance.privileges?.signkit">
58
+ <div class="title">电子签约权益</div>
59
+ <div class="list">
60
+ <div class="item" v-for="(item, index) in balance.privileges.signkit" :key="index">
61
+ <div class="item-count">{{ formatAmount(item.count || 0) }}{{ item.unit }}</div>
62
+ <div class="item-title">{{ item.title }}</div>
63
+ </div>
64
+ </div>
65
+ </div>
66
+ </div>
67
+ </div>
68
+ <nut-popup pop-class="consumption-rules-popup" v-model:visible="rulesPopupOpen" :close-on-click-overlay="false">
69
+ <consumption-rules @complete="rulesPopupOpen = false" />
70
+ </nut-popup>
71
+ <nut-popup position="bottom" :style="{ height: '40%' }" round :close-on-click-overlay="true"
72
+ v-model:visible="datePickerOpen">
73
+ <date-filter v-if="datePickerOpen" :from="filtering.dateFrom" :to="filtering.dateTo" @reset="onDateReset"
74
+ @complete="onDateFilterComplete" />
75
+ </nut-popup>
76
+ <nut-popup position="bottom" :style="{ height: '75%' }" round :close-on-click-overlay="true"
77
+ v-model:visible="filterOpen">
78
+ <consumption-filter :modelValue="[
79
+ filtering.账户类型,
80
+ filtering.收入还是支出,
81
+ filtering.交易类型,
82
+ filtering.权益类目,
83
+ ]" @complete="onFilterComplete" />
84
+ </nut-popup>
85
+ <app-drawer v-model="secondBalanceOpen" title="收支明细">
86
+ <div class="operation-box">
87
+ <div class="operation-title spa-between" :class="{ 'with-shadow': scrolled > 0 }">
88
+ <div class="search-time">
89
+ <div class="title">收支明细</div>
90
+ <div class="time" @click="openDateFilter" v-show="filtering.dateFrom">
91
+ <div class="text number">{{ dateRangeDisplay }}</div>
92
+ <img style="margin-top: -2px" class="time-icon"
93
+ src="https://cdn.ddjf.com/static/images/bpms-workBench/clound-bean-down.png" />
94
+ </div>
95
+ </div>
96
+ <div class="search" v-track-click @click="filterOpen = true">
97
+ <span class="text">筛选</span>
98
+ <img class="time-icon" src="https://cdn.ddjf.com/static/images/bpms-workBench/clound-bean-select-icon.png" />
99
+ </div>
100
+ </div>
101
+ <div class="operation-list">
102
+ <ScrollView class="operation-scroll" :scroll-y="true" @scroll="onScroll" :lower-threshold="100"
103
+ @scrolltolower="onReachBottom">
104
+ <div class="box" v-if="consumptionGroups.length > 0">
105
+ <div class="box-detail" v-for="(item, index) in consumptionGroups" :key="index">
106
+ <div class="title number">{{ item.date }}</div>
107
+ <div class="item" v-for="(it, i) in item.consumptions" :key="i">
108
+ <div class="item-type">
109
+ {{ it.交易类型 }}
110
+ </div>
111
+ <div class="item-detail">
112
+ <div class="item-info spa-between">
113
+ <div>
114
+ <div class="item-info-type">
115
+ {{ it.账户类型 }}
116
+ </div>
117
+ <div class="item-info-title">{{ it.title }}</div>
118
+ </div>
119
+ <div class="item-info-amount number">
120
+ {{ it.收入还是支出 == '支出' ? '-' : '+' }}{{ it.amount }}
121
+ </div>
122
+ </div>
123
+ <div class="item-detail-remark">{{ it.description }}</div>
124
+ </div>
125
+ </div>
126
+ </div>
127
+ <div class="box-not-text" v-if="reachedLastPage">没有更多了</div>
128
+ </div>
129
+ <empty-view v-else></empty-view>
130
+ </ScrollView>
131
+ </div>
132
+ </div>
133
+ </app-drawer>
134
+ </template>
135
+
136
+ <script lang="ts" setup>
137
+ import Taro, { useDidShow, showLoading, hideLoading } from '@tarojs/taro'
138
+ import { computed, onMounted, reactive, ref, watch } from 'vue'
139
+ import { endpoints, useHttp } from '../api'
140
+ import { 账户流水筛选项, Balance, ConsumptionGroup, 账户流水 } from '../types'
141
+ import ConsumptionFilter from './ConsumptionFilter.vue'
142
+ import DateFilter from './DateFilter.vue'
143
+ import ConsumptionRules from './ConsumptionRules.vue'
144
+ import { AppDrawer, PageHeader, WithPaging } from '../../shared'
145
+ import dayjs from 'dayjs'
146
+ import EmptyView from '../../shared/components/EmptyView.vue'
147
+ import Tip from './Tip.vue'
148
+ import groupBy from 'lodash-es/groupBy'
149
+ import { useAmount } from '../../shared/composables/useAmount'
150
+ import { ScrollView } from '@tarojs/components'
151
+ import { isApp } from '../../utils/utils'
152
+ import { isIOS } from '../../shared/composables/useDeviceEnv'
153
+
154
+ type AccountViewProps = {
155
+ app: string
156
+ }
157
+ const props = withDefaults(defineProps<AccountViewProps>(), {
158
+ app: '',
159
+ })
160
+
161
+ const refreshing = ref(false)
162
+ const { formatAmount } = useAmount()
163
+ const emit = defineEmits(['recharge', 'trade'])
164
+
165
+ const filterOpen = ref<boolean>(false)
166
+
167
+ // 规则说明弹窗
168
+ const rulesPopupOpen = ref<boolean>(false)
169
+
170
+ const filtering = reactive<账户流水筛选项>({
171
+ 账户类型: '全部',
172
+ 收入还是支出: '全部',
173
+ 交易类型: '全部',
174
+ 权益类目: '',
175
+ dateFrom: '',
176
+ dateTo: '',
177
+ page: 1,
178
+ pageSize: 20,
179
+ })
180
+
181
+ const reachedLastPage = ref<boolean>(false)
182
+
183
+ /**
184
+ * 全新搜索
185
+ * 重置某些查询条件
186
+ */
187
+ function restartSearch() {
188
+ // 从第一页开始
189
+ filtering.page = 1
190
+ consumptionGroups.value = []
191
+ loadConsumptions()
192
+ }
193
+
194
+ // 时间筛选
195
+ const datePickerOpen = ref<boolean>(false)
196
+
197
+ function openDateFilter() {
198
+ datePickerOpen.value = true
199
+ }
200
+
201
+ const dateRangeDisplay = computed(() => {
202
+ let startTime = (filtering.dateFrom || '').replace(/-/g, '.').substring(2)
203
+ let endTime = (filtering.dateTo || '').replace(/-/g, '.').substring(2)
204
+ return startTime + ' - ' + endTime
205
+ })
206
+
207
+ const consumptionGroups = ref<ConsumptionGroup[]>([])
208
+
209
+ /**
210
+ * 余额数据
211
+ */
212
+ const balance = ref<Balance>({
213
+ total: 0,
214
+ privileges: {},
215
+ })
216
+
217
+ useDidShow(() => {
218
+ if (Taro.getEnv() !== 'WEB') {
219
+ Taro.setNavigationBarTitle({
220
+ title: '我的账户',
221
+ })
222
+ }
223
+ loadBalance()
224
+ })
225
+
226
+ function groupDataByDate(data: 账户流水[]): ConsumptionGroup[] {
227
+ // 按照日期分组
228
+ const groups: ConsumptionGroup[] = consumptionGroups.value || []
229
+ // [
230
+ // date: '2023-10-1',
231
+ // consumptions: []
232
+ // ]
233
+ // 组装成按日期分组
234
+ data.forEach((d) => {
235
+ const date = dayjs(d.time).format('YYYY-MM-DD')
236
+ let group: ConsumptionGroup | undefined = groups.find((g) => g.date === date)
237
+ if (!group) {
238
+ group = {
239
+ date,
240
+ consumptions: [],
241
+ }
242
+ groups.push(group)
243
+ }
244
+ group.consumptions.push(d)
245
+ })
246
+ groups.sort((a, b) => (a.date > b.date ? -1 : 1))
247
+ return groups
248
+ }
249
+
250
+ /**
251
+ * 请求账户流水
252
+ * @param append 搜索结果累加 上拉分页时
253
+ */
254
+ async function loadConsumptions(append: boolean = false) {
255
+ if (!append) {
256
+ consumptionGroups.value = []
257
+ }
258
+ const $http = useHttp()
259
+ showLoading({
260
+ title: `加载中...`,
261
+ mask: true,
262
+ })
263
+ $http
264
+ .get<WithPaging<账户流水[]>>(endpoints.获取账户流水, {
265
+ app: props.app,
266
+ ...filtering,
267
+ })
268
+ .then((response) => {
269
+ consumptionGroups.value = groupDataByDate(response.data)
270
+ if (filtering.page >= response.totalPages) {
271
+ filtering.page = response.totalPages
272
+ reachedLastPage.value = true
273
+ } else {
274
+ reachedLastPage.value = false
275
+ }
276
+ }).finally(() => {
277
+ hideLoading()
278
+ })
279
+ }
280
+
281
+ /**
282
+ * 获取账户余额明细
283
+ */
284
+ async function loadBalance() {
285
+ const $http = useHttp()
286
+ $http
287
+ .get<Balance>(endpoints.获取余额明细, {
288
+ app: props.app,
289
+ })
290
+ .then((data) => {
291
+ const { privileges, total } = data
292
+ const filterData = {
293
+ total,
294
+ privileges: groupBy(privileges, 'appCode'),
295
+ }
296
+ balance.value = filterData
297
+ })
298
+ }
299
+
300
+ const onFilterComplete = (value) => {
301
+ filtering.账户类型 = value[0]
302
+ filtering.收入还是支出 = value[1]
303
+ filtering.交易类型 = value[2]
304
+ filtering.权益类目 = value[3]
305
+ filterOpen.value = false
306
+ restartSearch()
307
+ }
308
+
309
+ const onDateFilterComplete = (value) => {
310
+ filtering.dateFrom = value.from
311
+ filtering.dateTo = value.to
312
+ datePickerOpen.value = false
313
+ restartSearch()
314
+ }
315
+
316
+ function gotoRecharge() {
317
+ emit('recharge')
318
+ }
319
+
320
+ function gotoTrade(item: any) {
321
+ emit('trade', item)
322
+ }
323
+
324
+ function loadNextPage() {
325
+ filtering.page++
326
+ loadConsumptions(true)
327
+ }
328
+
329
+ // 以下这一大段处理下拉刷新、上滑分页以及弹窗与页面滑动的逻辑
330
+ const scrolled = ref<number>(0)
331
+
332
+ /**
333
+ * 记录 scroll-view 滚动的位置
334
+ */
335
+ const onScroll = (e) => {
336
+ const { scrollTop } = e
337
+ scrolled.value = scrollTop
338
+ }
339
+
340
+ /**
341
+ * 下拉刷新 pull down refresh
342
+ */
343
+ const onPullDownRefresh = () => {
344
+ refreshing.value = true
345
+ // 重新请求余额数据
346
+ loadBalance()
347
+ setTimeout(() => {
348
+ refreshing.value = false
349
+ }, 500)
350
+ }
351
+
352
+ /**
353
+ * 滑动到底部请求下一页并合并查询结果
354
+ */
355
+ const onReachBottom = () => {
356
+ console.log('到底了')
357
+ if (reachedLastPage.value) {
358
+ return false
359
+ }
360
+ loadNextPage()
361
+ }
362
+
363
+ const secondBalanceOpen = ref<boolean>(false)
364
+
365
+ function onSecondBalanceButtonClick() {
366
+ secondBalanceOpen.value = true
367
+ loadConsumptions()
368
+ }
369
+
370
+ watch(secondBalanceOpen, () => {
371
+ if (Taro.getEnv() !== 'WEB') {
372
+ Taro.setNavigationBarColor({
373
+ frontColor: secondBalanceOpen.value ? '#000000' : '#ffffff',
374
+ backgroundColor: '#ffffff',
375
+ animation: {
376
+ duration: 400,
377
+ timingFunc: 'easeIn',
378
+ },
379
+ })
380
+ }
381
+ })
382
+
383
+ function onDateReset() {
384
+ resetDateRange()
385
+ datePickerOpen.value = false
386
+ restartSearch()
387
+ }
388
+
389
+ /**
390
+ * 充值筛选的起止时间
391
+ */
392
+ function resetDateRange() {
393
+ // 筛选的起止时间
394
+ filtering.dateTo = dayjs().format('YYYY-MM-DD')
395
+ filtering.dateFrom = dayjs().add(-3, 'M').format('YYYY-MM-DD')
396
+ }
397
+
398
+ function onPageHeaderClose() {
399
+ Taro.navigateBack({
400
+ delta: 1,
401
+ })
402
+ }
403
+
404
+ const isAppEnv = computed(() => {
405
+ return isApp()
406
+ })
407
+
408
+ onMounted(() => {
409
+ resetDateRange()
410
+ })
411
+ </script>
412
+
413
+ <style lang="scss">
414
+ .account-view {
415
+ height: 100vh;
416
+
417
+ .scroll-content {
418
+ background-image: url('https://cdn.ddjf.com/static/images/customer-center/blue-bg.png');
419
+ background-position: center 0;
420
+ background-repeat: no-repeat;
421
+ background-size: 100% 200px;
422
+ }
423
+
424
+ .page-header {
425
+ background-color: transparent;
426
+ position: sticky;
427
+ top: 0;
428
+ z-index: 1;
429
+ transition: background-color 0.3s;
430
+
431
+ &.with-background {
432
+ background-color: #3b393c;
433
+ color: #fff;
434
+ }
435
+ }
436
+
437
+ .spa-between {
438
+ display: flex;
439
+ justify-content: space-between;
440
+ align-items: center;
441
+ }
442
+
443
+ .row {
444
+ display: flex;
445
+ flex-direction: row;
446
+ padding: 10px 15px;
447
+ }
448
+
449
+ .jusify-right {
450
+ justify-content: flex-end;
451
+ }
452
+
453
+ .small-bean-button {
454
+ height: 22px;
455
+ border-radius: 11px;
456
+ background-color: #fff;
457
+ display: inline-flex;
458
+ align-items: center;
459
+ padding: 0 10px;
460
+ color: #353535;
461
+ font-size: 12px;
462
+
463
+ .label {
464
+ background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEwIDZMMTYgMTJMMTAgMThWNloiIGZpbGw9IiMzNTM1MzUiIHN0cm9rZT0iIzM1MzUzNSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=');
465
+ padding-right: 18px;
466
+ background-repeat: no-repeat;
467
+ background-position: right center;
468
+ background-size: 16px;
469
+ }
470
+ }
471
+
472
+ .balance {
473
+ border-radius: 15px;
474
+ background: linear-gradient(90deg, #FFEBC1 0%, #FFB875 100%);
475
+ height: 112px;
476
+ padding: 20px;
477
+ margin: 0 15px;
478
+ box-sizing: border-box;
479
+ font-size: 10px;
480
+
481
+ .bean-img {
482
+ display: flex;
483
+ justify-content: flex-start;
484
+ align-items: center;
485
+
486
+ .bean-icon {
487
+ display: block;
488
+ font-size: 0;
489
+ width: 20px;
490
+ height: 20px;
491
+ margin-right: 4px;
492
+ }
493
+
494
+ .bean-tag {
495
+ color: #353535;
496
+ height: 15px;
497
+ line-height: 15px;
498
+ border-radius: 30px 50px 50px 0px;
499
+ background: rgba(#ff8320, 0.3);
500
+ padding-left: 5px;
501
+ padding-right: 10px;
502
+ }
503
+
504
+ .tag {
505
+ background: #ff8320;
506
+ color: #fff;
507
+ }
508
+ }
509
+
510
+ .rule {
511
+ color: #353535;
512
+ opacity: 0.5;
513
+ }
514
+ }
515
+
516
+ .bean-counts {
517
+ margin-top: 12px;
518
+
519
+ .counts {
520
+ color: #3d3835;
521
+ font-size: 32px;
522
+ font-weight: 700;
523
+ }
524
+
525
+ .pay {
526
+ padding: 0 20px;
527
+ height: 32px;
528
+ line-height: 32px;
529
+ background: linear-gradient(187.18deg, #353535 10.04%, #433f46 90.21%);
530
+ border-radius: 16px;
531
+ color: #e7caad;
532
+ font-size: 15px;
533
+ font-weight: 500;
534
+ }
535
+ }
536
+ }
537
+
538
+ .consumption-rules-popup {
539
+ border-radius: 16px;
540
+ width: 70%;
541
+ max-height: 80%;
542
+ padding: 24px;
543
+ }
544
+
545
+ .operation-box {
546
+ width: 100vw;
547
+ overflow: hidden;
548
+ display: flex;
549
+ flex-direction: column;
550
+ height: calc(100vh - 87px);
551
+
552
+ .operation-title {
553
+ padding: 10px 15px;
554
+ background: #fff;
555
+ transition: box-shadow 0.3s;
556
+
557
+ &.with-shadow {
558
+ box-shadow: 0px 1px 10px 0px #99999933;
559
+ }
560
+
561
+ .text {
562
+ color: #353535;
563
+ font-size: 12px;
564
+ opacity: 0.5;
565
+ }
566
+
567
+ .time-icon {
568
+ display: block;
569
+ font-size: 0;
570
+ width: 12px;
571
+ height: 12px;
572
+ margin-left: 4px;
573
+ }
574
+
575
+ .search-time {
576
+ display: flex;
577
+ align-items: center;
578
+
579
+ .title {
580
+ color: #000;
581
+ font-weight: 500;
582
+ font-size: 17px;
583
+ margin-right: 10px;
584
+ }
585
+
586
+ .time {
587
+ height: 22px;
588
+ padding-right: 5px;
589
+ flex: 1;
590
+ display: flex;
591
+ align-items: center;
592
+ }
593
+ }
594
+
595
+ .search {
596
+ display: flex;
597
+ align-items: center;
598
+ height: 22px;
599
+ padding-left: 5px;
600
+ }
601
+ }
602
+
603
+ .spa-between {
604
+ display: flex;
605
+ justify-content: space-between;
606
+ align-items: center;
607
+ }
608
+
609
+ .operation-list {
610
+ flex: 1;
611
+ width: 100%;
612
+
613
+ .operation-scroll {
614
+ height: calc(100vh - 132px);
615
+ box-sizing: border-box;
616
+ }
617
+
618
+ .box {
619
+ padding: 0 10px;
620
+
621
+ &-detail {
622
+ .title {
623
+ line-height: 22px;
624
+ font-weight: 700;
625
+ font-size: 12px;
626
+ color: #000;
627
+ opacity: 0.5;
628
+ margin-bottom: 10px;
629
+ }
630
+
631
+ .item {
632
+ border-radius: 5px;
633
+ background: rgba(255, 255, 255, 0.5);
634
+ box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.05);
635
+ border-radius: 5px;
636
+ padding: 12px 10px;
637
+ display: flex;
638
+ margin-bottom: 10px;
639
+
640
+ &-type {
641
+ background: linear-gradient(113.95deg, #f4e2ce 1.2%, #debb9b 77.63%);
642
+ width: 30px;
643
+ height: 30px;
644
+ border-radius: 15px;
645
+ margin-right: 15px;
646
+ line-height: 30px;
647
+ font-size: 10px;
648
+ font-weight: 500;
649
+ color: #000;
650
+ text-align: center;
651
+ }
652
+
653
+ &-detail {
654
+ flex: 1;
655
+
656
+ .item-info {
657
+ padding: 0;
658
+ font-size: 14px;
659
+ font-weight: 700;
660
+ color: #000;
661
+
662
+ &-type {
663
+ line-height: 15px;
664
+ }
665
+
666
+ &-title {
667
+ font-weight: 400;
668
+ opacity: 0.8;
669
+ font-size: 11px;
670
+ }
671
+
672
+ &-amount {
673
+ color: #9e7b5a;
674
+ }
675
+ }
676
+
677
+ &-remark {
678
+ opacity: 0.3;
679
+ line-height: 15px;
680
+ font-size: 10px;
681
+ }
682
+ }
683
+ }
684
+ }
685
+
686
+ &-not-text {
687
+ opacity: 0.4;
688
+ color: #353535;
689
+ font-size: 12px;
690
+ line-height: 20px;
691
+ margin: 0 auto 40px;
692
+ text-align: center;
693
+ }
694
+ }
695
+ }
696
+ }
697
+
698
+ .rights-card {
699
+ margin: 10px 15px 0px;
700
+ background: rgb(255, 248, 243, 0.8);
701
+ border-radius: 5px;
702
+ padding: 15px 20px;
703
+ box-shadow: 0px 5px 18.9px 2px #0000000D;
704
+
705
+
706
+ .title {
707
+ height: 25px;
708
+ line-height: 25px;
709
+ background: rgba($color: #ff8320, $alpha: 0.3);
710
+ border-radius: 20px 50px 50px 0px;
711
+ color: #353535;
712
+ font-size: 12px;
713
+ display: inline-block;
714
+ padding-left: 5px;
715
+ padding-right: 12px;
716
+ }
717
+
718
+ .list {
719
+ display: flex;
720
+ flex-wrap: wrap;
721
+
722
+ .item {
723
+ width: 50%;
724
+ margin-top: 15px;
725
+
726
+ .item-count {
727
+ font-size: 20px;
728
+ color: #353535;
729
+ font-weight: 700;
730
+ line-height: 23px;
731
+ }
732
+
733
+ .item-title {
734
+ line-height: 23px;
735
+ color: #987356;
736
+ font-size: 11px;
737
+ display: flex;
738
+ align-items: center;
739
+
740
+ .item-title-button {
741
+ padding: 0 14px;
742
+ height: 27px;
743
+ line-height: 27px;
744
+ background: -webkit-linear-gradient(262.82deg, #353535 10.04%, #433f46 90.21%);
745
+ background: linear-gradient(187.18deg, #353535 10.04%, #433f46 90.21%);
746
+ border-radius: 14px;
747
+ color: #e7caad;
748
+ font-size: 12px;
749
+ font-weight: 400;
750
+ margin-left: 20px;
751
+ display: flex;
752
+ align-items: center;
753
+
754
+ .button-icon {
755
+ display: block;
756
+ width: 12px;
757
+ height: 12px;
758
+ font-size: 0;
759
+ margin-left: 4px;
760
+ }
761
+ }
762
+ }
763
+ }
764
+
765
+ .star-item {
766
+ width: 100%;
767
+ }
768
+ }
769
+ }
770
+ </style>