@uxda/appkit 4.2.0 → 4.2.2

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