@uxda/appkit 4.2.82 → 4.2.84

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