@uxda/appkit 4.1.62 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) 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 +6 -8
  5. package/dist/index.js +49 -19
  6. package/package.json +79 -77
  7. package/project.config.json +15 -15
  8. package/project.tt.json +13 -13
  9. package/rollup.config.mjs +67 -56
  10. package/src/Appkit.ts +66 -66
  11. package/src/balance/api/endpoints.ts +133 -133
  12. package/src/balance/api/index.ts +106 -106
  13. package/src/balance/components/AccountView.vue +750 -749
  14. package/src/balance/components/BalanceCard.vue +215 -215
  15. package/src/balance/components/BalanceReminder.vue +85 -85
  16. package/src/balance/components/ConsumptionFilter.vue +218 -218
  17. package/src/balance/components/ConsumptionRules.vue +68 -68
  18. package/src/balance/components/DateFilter.vue +250 -250
  19. package/src/balance/components/DateRange.vue +80 -80
  20. package/src/balance/components/ListFilter.vue +62 -62
  21. package/src/balance/components/ListFilterPicker.vue +191 -191
  22. package/src/balance/components/PromoterCard.vue +237 -237
  23. package/src/balance/components/SecondBalance.vue +71 -71
  24. package/src/balance/components/Tip.vue +45 -45
  25. package/src/balance/components/index.ts +8 -8
  26. package/src/balance/types.ts +97 -97
  27. package/src/components/bt-cropper/index.vue +774 -774
  28. package/src/components/bt-cropper/utils/calcCropper.js +42 -42
  29. package/src/components/bt-cropper/utils/calcImagePosition.js +23 -23
  30. package/src/components/bt-cropper/utils/calcImageSize.js +37 -37
  31. package/src/components/bt-cropper/utils/calcPointDistance.js +12 -12
  32. package/src/components/bt-cropper/utils/calcRightAndBottom.js +7 -7
  33. package/src/components/bt-cropper/utils/ratio.js +3 -3
  34. package/src/components/bt-cropper/utils/tools.js +25 -25
  35. package/src/components/dd-area/index.vue +225 -225
  36. package/src/components/dd-icon/doc.md +21 -21
  37. package/src/components/dd-icon/index.vue +23 -23
  38. package/src/components/dd-notice-bar/index.vue +78 -78
  39. package/src/components/dd-search/doc.md +34 -34
  40. package/src/components/dd-search/index.vue +168 -168
  41. package/src/components/dd-selector/index.vue +124 -124
  42. package/src/components/dd-skeleton/doc.md +19 -19
  43. package/src/components/dd-skeleton/index.vue +36 -36
  44. package/src/global.ts +6 -6
  45. package/src/index.ts +89 -89
  46. package/src/main.scss +1 -1
  47. package/src/notice/api/endpoints.ts +17 -17
  48. package/src/notice/api/index.ts +106 -106
  49. package/src/notice/components/NoticeBanner.vue +243 -243
  50. package/src/notice/components/NoticeEntry.vue +99 -99
  51. package/src/notice/components/NoticeList.vue +315 -315
  52. package/src/notice/components/NoticePopup.vue +162 -162
  53. package/src/notice/components/index.ts +5 -5
  54. package/src/notice/components/useCommonList.ts +86 -86
  55. package/src/notice/components/useNotice.ts +35 -35
  56. package/src/notice/index.ts +1 -1
  57. package/src/notice/types.ts +25 -25
  58. package/src/payment/api/config.ts +7 -7
  59. package/src/payment/api/endpoints.ts +103 -103
  60. package/src/payment/api/index.ts +100 -100
  61. package/src/payment/components/AmountPicker.vue +90 -90
  62. package/src/payment/components/RechargeResult.vue +69 -69
  63. package/src/payment/components/RechargeView.vue +155 -155
  64. package/src/payment/components/RightsPicker.vue +105 -105
  65. package/src/payment/components/TradeView.vue +317 -317
  66. package/src/payment/components/UserAgreement.vue +234 -234
  67. package/src/payment/components/index.ts +22 -22
  68. package/src/payment/index.ts +5 -5
  69. package/src/payment/services/index.ts +16 -16
  70. package/src/payment/services/invoke-recharge.ts +25 -25
  71. package/src/payment/services/request-payment.ts +58 -58
  72. package/src/payment/types.ts +28 -28
  73. package/src/register/components/SelfRegistration.vue +233 -233
  74. package/src/register/components/index.ts +2 -2
  75. package/src/shared/components/AppDrawer.vue +54 -58
  76. package/src/shared/components/AppVerify.vue +128 -128
  77. package/src/shared/components/DeviceVersion.vue +68 -68
  78. package/src/shared/components/EmptyView.vue +33 -33
  79. package/src/shared/components/OcrBusinessLicense.vue +130 -130
  80. package/src/shared/components/OcrIcon.vue +202 -202
  81. package/src/shared/components/PageHeader.vue +79 -79
  82. package/src/shared/components/index.ts +8 -8
  83. package/src/shared/composables/index.ts +8 -8
  84. package/src/shared/composables/useAmount.ts +46 -46
  85. package/src/shared/composables/useCountdown.ts +46 -46
  86. package/src/shared/composables/useCrypto.ts +76 -76
  87. package/src/shared/composables/useDragBox.ts +97 -97
  88. package/src/shared/composables/useEncode.ts +43 -43
  89. package/src/shared/composables/useLogger.ts +123 -123
  90. package/src/shared/composables/useSafeArea.ts +46 -46
  91. package/src/shared/composables/useTabbar.ts +24 -24
  92. package/src/shared/composables/useUpload.ts +54 -54
  93. package/src/shared/composables/useValidator.ts +32 -31
  94. package/src/shared/http/Http.ts +136 -136
  95. package/src/shared/http/index.ts +1 -1
  96. package/src/shared/http/types.ts +157 -157
  97. package/src/shared/index.ts +3 -3
  98. package/src/shared/weixin/payment.ts +38 -38
  99. package/src/styles/vars.scss +3 -3
  100. package/src/user/api/endpoints.ts +17 -17
  101. package/src/user/api/index.ts +111 -111
  102. package/src/user/components/LoginSetting.vue +114 -114
  103. package/src/user/components/UserAuth.vue +238 -216
  104. package/src/user/components/UserBinding.vue +307 -307
  105. package/src/user/components/UserBindingSuccess.vue +80 -80
  106. package/src/user/components/UserEntry.vue +133 -133
  107. package/src/user/components/UserFeedback.vue +431 -431
  108. package/src/user/components/UserFeedbackEntry.vue +192 -192
  109. package/src/user/components/UserHeadCrop.vue +65 -65
  110. package/src/user/components/UserInfo.vue +732 -723
  111. package/src/user/components/UserResourceEmpty.vue +75 -75
  112. package/src/user/components/index.ts +23 -23
  113. package/src/user/index.ts +1 -1
  114. package/tsconfig.json +30 -30
  115. package/types/global.d.ts +21 -21
  116. package/types/vue.d.ts +10 -10
  117. package/dist/assets/asset-3B_CoPto +0 -1
@@ -1,749 +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/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
- Taro.hideLoading()
257
- })
258
- }
259
-
260
- /**
261
- * 获取账户余额明细
262
- */
263
- async function loadBalance() {
264
- const $http = useHttp()
265
- $http
266
- .get<Balance>(endpoints.获取余额明细, {
267
- app: props.app,
268
- })
269
- .then((data) => {
270
- const { privileges, total } = data
271
- const filterData = {
272
- total,
273
- privileges: groupBy(privileges, 'appCode'),
274
- }
275
- balance.value = filterData
276
- })
277
- }
278
-
279
- const onFilterComplete = (value) => {
280
- filtering.账户类型 = value[0]
281
- filtering.收入还是支出 = value[1]
282
- filtering.交易类型 = value[2]
283
- filtering.权益类目 = value[3]
284
- filterOpen.value = false
285
- restartSearch()
286
- }
287
-
288
- const onDateFilterComplete = (value) => {
289
- filtering.dateFrom = value.from
290
- filtering.dateTo = value.to
291
- datePickerOpen.value = false
292
- restartSearch()
293
- }
294
-
295
- function gotoRecharge() {
296
- emit('recharge')
297
- }
298
-
299
- function gotoTrade(item: any) {
300
- emit('trade', item)
301
- }
302
-
303
- function loadNextPage() {
304
- filtering.page++
305
- loadConsumptions(true)
306
- }
307
-
308
- // 以下这一大段处理下拉刷新、上滑分页以及弹窗与页面滑动的逻辑
309
- const scrolled = ref<number>(0)
310
-
311
- /**
312
- * 记录 scroll-view 滚动的位置
313
- */
314
- const onScroll = (e) => {
315
- const { scrollTop } = e
316
- scrolled.value = scrollTop
317
- }
318
-
319
- /**
320
- * 下拉刷新 pull down refresh
321
- */
322
- const onPullDownRefresh = () => {
323
- refreshing.value = true
324
- // 重新请求余额数据
325
- loadBalance()
326
- setTimeout(() => {
327
- refreshing.value = false
328
- }, 500)
329
- }
330
-
331
- /**
332
- * 滑动到底部请求下一页并合并查询结果
333
- */
334
- const onReachBottom = () => {
335
- console.log('到底了')
336
- if (reachedLastPage.value) {
337
- return false
338
- }
339
- loadNextPage()
340
- }
341
-
342
- /**
343
- * 浮窗弹出时不允许
344
- * 1. 下拉刷新
345
- * 2. 上滑分页
346
- */
347
- const isAnyPopupOpen = computed(() => {
348
- return rulesPopupOpen.value || datePickerOpen.value || filterOpen.value || secondBalanceOpen.value
349
- })
350
-
351
- const secondBalanceOpen = ref<boolean>(false)
352
-
353
- function onSecondBalanceButtonClick() {
354
- secondBalanceOpen.value = true
355
- loadConsumptions()
356
- }
357
-
358
- watch(secondBalanceOpen, () => {
359
- Taro.setNavigationBarColor({
360
- frontColor: secondBalanceOpen.value ? '#000000' : '#ffffff',
361
- backgroundColor: '#ffffff',
362
- animation: {
363
- duration: 400,
364
- timingFunc: 'easeIn',
365
- },
366
- })
367
- })
368
-
369
- function onDateReset() {
370
- resetDateRange()
371
- }
372
-
373
- /**
374
- * 充值筛选的起止时间
375
- */
376
- function resetDateRange() {
377
- // 筛选的起止时间
378
- filtering.dateTo = dayjs().format('YYYY-MM-DD')
379
- filtering.dateFrom = dayjs().add(-3, 'M').format('YYYY-MM-DD')
380
- }
381
-
382
- function onPageHeaderClose() {
383
- Taro.navigateBack({
384
- delta: 1,
385
- })
386
- }
387
-
388
- onMounted(() => {
389
- resetDateRange()
390
- })
391
- </script>
392
-
393
- <style lang="scss">
394
- .account-view {
395
- height: 100vh;
396
-
397
- .scroll-content {
398
- background-image: url('https://cdn.ddjf.com/static/images/customer-center/blue-bg.png');
399
- background-position: center 0;
400
- background-repeat: no-repeat;
401
- background-size: 100% 200px;
402
- }
403
-
404
- .page-header {
405
- background-color: transparent;
406
- position: sticky;
407
- top: 0;
408
- z-index: 1;
409
- transition: background-color 0.3s;
410
-
411
- &.with-background {
412
- background-color: #3b393c;
413
- color: #fff;
414
- }
415
- }
416
-
417
- .spa-between {
418
- display: flex;
419
- justify-content: space-between;
420
- align-items: center;
421
- }
422
-
423
- .row {
424
- display: flex;
425
- flex-direction: row;
426
- margin: 10px 15px;
427
- }
428
-
429
- .jusify-right {
430
- justify-content: flex-end;
431
- }
432
-
433
- .small-bean-button {
434
- height: 22px;
435
- border-radius: 11px;
436
- background-color: #fff;
437
- display: inline-flex;
438
- align-items: center;
439
- padding: 0 10px;
440
- color: #353535;
441
- font-size: 12px;
442
-
443
- label {
444
- background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEwIDZMMTYgMTJMMTAgMThWNloiIGZpbGw9IiMzNTM1MzUiIHN0cm9rZT0iIzM1MzUzNSIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=');
445
- padding-right: 18px;
446
- background-repeat: no-repeat;
447
- background-position: right center;
448
- background-size: 16px;
449
- }
450
- }
451
-
452
- .balance {
453
- border-radius: 15px;
454
- background: linear-gradient(90deg, #FFEBC1 0%, #FFB875 100%);
455
- height: 112px;
456
- padding: 20px;
457
- margin: 0 15px;
458
- box-sizing: border-box;
459
- font-size: 10px;
460
-
461
- .bean-img {
462
- display: flex;
463
- justify-content: flex-start;
464
- align-items: center;
465
-
466
- .bean-icon {
467
- display: block;
468
- font-size: 0;
469
- width: 20px;
470
- height: 20px;
471
- margin-right: 4px;
472
- }
473
-
474
- .bean-tag {
475
- color: #353535;
476
- height: 15px;
477
- line-height: 15px;
478
- border-radius: 30px 50px 50px 0px;
479
- background: rgba(#ff8320, 0.3);
480
- padding-left: 5px;
481
- padding-right: 10px;
482
- }
483
-
484
- .tag {
485
- background: #ff8320;
486
- color: #fff;
487
- }
488
- }
489
-
490
- .rule {
491
- color: #353535;
492
- opacity: 0.5;
493
- }
494
- }
495
-
496
- .bean-counts {
497
- margin-top: 12px;
498
-
499
- .counts {
500
- color: #3d3835;
501
- font-size: 32px;
502
- font-weight: 700;
503
- }
504
-
505
- .pay {
506
- padding: 0 20px;
507
- height: 32px;
508
- line-height: 32px;
509
- background: linear-gradient(187.18deg, #353535 10.04%, #433f46 90.21%);
510
- border-radius: 16px;
511
- color: #e7caad;
512
- font-size: 15px;
513
- font-weight: 500;
514
- }
515
- }
516
- }
517
-
518
- .consumption-rules-popup {
519
- border-radius: 16px;
520
- width: 70%;
521
- max-height: 80%;
522
- padding: 24px;
523
- }
524
-
525
- .operation-box {
526
- width: 100vw;
527
- overflow: hidden;
528
- display: flex;
529
- flex-direction: column;
530
- height: calc(100vh - 87px);
531
-
532
- .operation-title {
533
- padding: 10px 15px;
534
- background: #fff;
535
- transition: box-shadow 0.3s;
536
-
537
- &.with-shadow {
538
- box-shadow: 0px 1px 10px 0px #99999933;
539
- }
540
-
541
- .text {
542
- color: #353535;
543
- font-size: 12px;
544
- opacity: 0.5;
545
- }
546
-
547
- .time-icon {
548
- display: block;
549
- font-size: 0;
550
- width: 12px;
551
- height: 12px;
552
- margin-left: 4px;
553
- }
554
-
555
- .search-time {
556
- display: flex;
557
- align-items: center;
558
-
559
- .title {
560
- color: #000;
561
- font-weight: 500;
562
- font-size: 17px;
563
- margin-right: 10px;
564
- }
565
-
566
- .time {
567
- height: 22px;
568
- padding-right: 5px;
569
- flex: 1;
570
- display: flex;
571
- align-items: center;
572
- }
573
- }
574
-
575
- .search {
576
- display: flex;
577
- align-items: center;
578
- height: 22px;
579
- padding-left: 5px;
580
- }
581
- }
582
-
583
- .spa-between {
584
- display: flex;
585
- justify-content: space-between;
586
- align-items: center;
587
- }
588
-
589
- .operation-list {
590
- flex: 1;
591
- width: 100%;
592
-
593
- .operation-scroll {
594
- height: calc(100vh - 130px);
595
- padding: 0 15px;
596
- box-sizing: border-box;
597
- }
598
-
599
- .box {
600
- &-detail {
601
- .title {
602
- line-height: 22px;
603
- font-weight: 700;
604
- font-size: 12px;
605
- color: #000;
606
- opacity: 0.5;
607
- margin-bottom: 10px;
608
- }
609
-
610
- .item {
611
- border-radius: 5px;
612
- background: rgba(255, 255, 255, 0.5);
613
- box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.05);
614
- border-radius: 5px;
615
- padding: 12px 10px;
616
- display: flex;
617
- margin-bottom: 10px;
618
-
619
- &-type {
620
- background: linear-gradient(113.95deg, #f4e2ce 1.2%, #debb9b 77.63%);
621
- width: 30px;
622
- height: 30px;
623
- border-radius: 15px;
624
- margin-right: 15px;
625
- line-height: 30px;
626
- font-size: 10px;
627
- font-weight: 500;
628
- color: #000;
629
- text-align: center;
630
- }
631
-
632
- &-detail {
633
- flex: 1;
634
-
635
- .item-info {
636
- padding: 0;
637
- font-size: 14px;
638
- font-weight: 700;
639
- color: #000;
640
-
641
- &-type {
642
- line-height: 15px;
643
- }
644
-
645
- &-title {
646
- font-weight: 400;
647
- opacity: 0.8;
648
- font-size: 11px;
649
- }
650
-
651
- &-amount {
652
- color: #9e7b5a;
653
- }
654
- }
655
-
656
- &-remark {
657
- opacity: 0.3;
658
- line-height: 15px;
659
- font-size: 10px;
660
- }
661
- }
662
- }
663
- }
664
-
665
- &-not-text {
666
- opacity: 0.4;
667
- color: #353535;
668
- font-size: 12px;
669
- line-height: 20px;
670
- margin: 0 auto 40px;
671
- text-align: center;
672
- }
673
- }
674
- }
675
- }
676
-
677
- .rights-card {
678
- margin: 10px 15px 0px;
679
- background: rgb(255, 248, 243, 0.8);
680
- border-radius: 5px;
681
- padding: 15px 20px;
682
- box-shadow: 0px 5px 18.9px 2px #0000000D;
683
-
684
-
685
- .title {
686
- height: 25px;
687
- line-height: 25px;
688
- background: rgba($color: #ff8320, $alpha: 0.3);
689
- border-radius: 20px 50px 50px 0px;
690
- color: #353535;
691
- font-size: 12px;
692
- display: inline-block;
693
- padding-left: 5px;
694
- padding-right: 12px;
695
- }
696
-
697
- .list {
698
- display: flex;
699
- flex-wrap: wrap;
700
-
701
- .item {
702
- width: 50%;
703
- margin-top: 15px;
704
-
705
- .item-count {
706
- font-size: 20px;
707
- color: #353535;
708
- font-weight: 700;
709
- line-height: 23px;
710
- }
711
-
712
- .item-title {
713
- line-height: 23px;
714
- color: #987356;
715
- font-size: 11px;
716
- display: flex;
717
- align-items: center;
718
-
719
- .item-title-button {
720
- padding: 0 27rpx;
721
- height: 54rpx;
722
- line-height: 54rpx;
723
- background: -webkit-linear-gradient(262.82deg, #353535 10.04%, #433f46 90.21%);
724
- background: linear-gradient(187.18deg, #353535 10.04%, #433f46 90.21%);
725
- border-radius: 27rpx;
726
- color: #e7caad;
727
- font-size: 24rpx;
728
- font-weight: 400;
729
- margin-left: 40rpx;
730
- display: flex;
731
- align-items: center;
732
-
733
- .button-icon {
734
- display: block;
735
- width: 24rpx;
736
- height: 24rpx;
737
- font-size: 0;
738
- margin-left: 4px;
739
- }
740
- }
741
- }
742
- }
743
-
744
- .star-item {
745
- width: 100%;
746
- }
747
- }
748
- }
749
- </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>