@uxda/appkit 4.1.40 → 4.1.42

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