@uxda/appkit 1.0.66 → 1.0.70

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.
@@ -1,51 +1,34 @@
1
1
  <template>
2
- <div class="consumption-view" :class="{ popupOpen }">
3
- <div class="header">
4
- <div class="header_card">
5
- <div class="clound-bean">
6
- <div class="bean-box spa-between">
7
- <div class="bean-img">
8
- <img
9
- class="bean-icon"
10
- src="https://cdn.ddjf.com/static/images/bpms-workBench/gold-bean.png" />
11
- <div class="bean-tag tag">云豆</div>
12
- </div>
13
- <div class="rule" @click="rulesPopupOpen = true">规则说明</div>
14
- </div>
15
- <div class="bean-counts spa-between">
16
- <div class="counts number">{{ balance.total || 0 }}</div>
17
- <div class="pay" @click="gotoRecharge">云豆充值</div>
18
- </div>
19
- </div>
20
- <div class="line"></div>
21
- <div
22
- class="small-clound-bean clound-bean"
23
- v-if="balance.privileges.length > 0">
24
- <div class="bean-box spa-between">
25
- <div class="bean-img">
26
- <div class="bean-tag">小云豆</div>
27
- </div>
28
- </div>
29
- <div class="bean-list">
30
- <template v-for="item in balance.privileges" :key="item">
31
- <div class="bean-list-item">
32
- <div class="counts number">
33
- {{ item.amount }}
34
- </div>
35
- <div class="title">
36
- {{ item.title }}
37
- </div>
38
- </div>
39
- </template>
40
- </div>
2
+ <div class="account-view" :class="{ popupOpen }">
3
+ <page-header color-mode="dark" title="我的账户"
4
+ :class="{'with-background': scrollY > 0}" />
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
14
+ class="bean-icon"
15
+ src="https://cdn.ddjf.com/static/images/bpms-workBench/gold-bean.png" />
16
+ <div class="bean-tag tag">云豆</div>
41
17
  </div>
18
+ <div class="rule" @click="rulesPopupOpen = true">规则说明</div>
19
+ </div>
20
+ <div class="bean-counts spa-between">
21
+ <div class="counts number">{{ balance.total || 0 }}</div>
22
+ <div class="pay" @click="gotoRecharge">云豆充值</div>
42
23
  </div>
43
24
  </div>
44
- <div class="operation-title spa-between">
25
+ <div class="operation-title spa-between"
26
+ :class="{'with-shadow': scrollY > 0}"
27
+ :style="{top: `${safeArea.status + safeArea.nav}px`}">
45
28
  <div class="search-time">
46
29
  <div class="title">收支明细</div>
47
30
  <div class="time" @click="openDateFilter" v-show="filtering.dateFrom">
48
- <div class="text">{{ dataRangeDisplay }}</div>
31
+ <div class="text number">{{ dateRangeDisplay }}</div>
49
32
  <img
50
33
  style="margin-top: -2px"
51
34
  class="time-icon"
@@ -60,40 +43,35 @@
60
43
  </div>
61
44
  </div>
62
45
  <div class="operation-list">
63
- <div class="box" v-if="consumptionGroups.list.length > 0">
64
- <div class="box-detail" v-for="(item, index) in consumptionGroups.list" :key="index">
65
- <div class="title">{{ item.date }}</div>
46
+ <div class="box" v-if="consumptionGroups.length > 0">
47
+ <div class="box-detail" v-for="(item, index) in consumptionGroups" :key="index">
48
+ <div class="title number">{{ item.date }}</div>
66
49
  <div
67
50
  class="item"
68
51
  v-for="(it, i) in item.consumptions"
69
52
  :key="i">
70
53
  <div class="item-type">
71
- {{ it.type }}
54
+ {{ it.交易类型 }}
72
55
  </div>
73
56
  <div class="item-detail">
74
57
  <div class="item-info spa-between">
75
58
  <div>
76
59
  <div class="item-info-type">
77
- {{ it.position }}
60
+ {{ it.账户类型 }}
78
61
  </div>
79
62
  <div class="item-info-title">{{ it.title }}</div>
80
63
  </div>
81
64
  <div class="item-info-amount number">
82
- {{ it.direction == '支出' ? '-' : '+' }}{{ it.amount }}
65
+ {{ it.收入还是支出 == '支出' ? '-' : '+' }}{{ it.amount }}
83
66
  </div>
84
67
  </div>
85
68
  <div class="item-detail-remark">{{ it.description }}</div>
86
69
  </div>
87
70
  </div>
88
71
  </div>
89
- <div class="box-not-text">没有更多了</div>
90
- </div>
91
- <div v-else class="operations-empty">
92
- <img
93
- class="operations-empty-img"
94
- src="https://cdn.ddjf.com/static/images/fnfundkit/bean-no-thing.png" />
95
- <div class="operations-empty-text">暂无数据</div>
72
+ <div class="box-not-text" v-if="reachedLastPage">没有更多了</div>
96
73
  </div>
74
+ <empty-view v-else></empty-view>
97
75
  </div>
98
76
  </div>
99
77
  <nut-popup
@@ -112,31 +90,44 @@
112
90
  v-if="datePickerOpen"
113
91
  :from="filtering.dateFrom"
114
92
  :to="filtering.dateTo"
93
+ @reset="onDateReset"
115
94
  @complete="onDateFilterComplete"/>
116
95
  </nut-popup>
117
96
  <nut-popup
118
97
  position="bottom"
119
- :style="{ height: '70%' }"
98
+ :style="{ height: '75%' }"
120
99
  round
121
100
  :close-on-click-overlay="true"
122
101
  v-model:visible="filterOpen">
123
102
  <consumption-filter :modelValue="[
124
- filtering.position,
125
- filtering.direction,
126
- filtering.type,
103
+ filtering.账户类型,
104
+ filtering.收入还是支出,
105
+ filtering.交易类型,
106
+ filtering.权益类目
127
107
  ]" @complete="onFilterComplete" />
128
108
  </nut-popup>
109
+ <app-drawer
110
+ v-model="secondBalanceOpen"
111
+ title="小云豆余额">
112
+ <second-balance :data="balance.privileges" />
113
+ </app-drawer>
129
114
  </template>
130
115
 
131
116
  <script lang="ts" setup>
132
- import Taro, { useDidShow, usePageScroll, usePullDownRefresh } from '@tarojs/taro'
133
- import { computed, reactive, ref } from 'vue'
134
- import { endpoints, makeHttp } from '../api'
135
- import { ConsumptionFiltering, ConsumptionGroups, Balance } from '../types'
117
+ import Taro, { useDidShow, usePageScroll, usePullDownRefresh, useReachBottom } from '@tarojs/taro'
118
+ import { computed, onMounted, reactive, ref } from 'vue'
119
+ import { endpoints, useHttp } from '../api'
120
+ import { 账户流水筛选项, Balance, ConsumptionGroup, 账户流水 } from '../types'
136
121
  import ConsumptionFilter from './ConsumptionFilter.vue'
137
122
  import DateFilter from './DateFilter.vue'
138
123
  import ConsumptionRules from './ConsumptionRules.vue'
124
+ import { AppDrawer, PageHeader, WithPaging } from '../../shared'
125
+ import SecondBalance from './SecondBalance.vue'
126
+ import dayjs from 'dayjs'
127
+ import EmptyView from '../../shared/components/EmptyView.vue'
128
+ import { useSafeArea } from '../../shared'
139
129
 
130
+ const safeArea = useSafeArea()
140
131
  const emit = defineEmits(['recharge'])
141
132
 
142
133
  const filterOpen = ref<boolean>(false)
@@ -144,14 +135,30 @@ const filterOpen = ref<boolean>(false)
144
135
  // 规则说明弹窗
145
136
  const rulesPopupOpen = ref<boolean>(false)
146
137
 
147
- const filtering = reactive<ConsumptionFiltering>({
148
- position: '全部',
149
- direction: '全部',
150
- type: '全部',
138
+ const filtering = reactive<账户流水筛选项>({
139
+ 账户类型: '全部',
140
+ 收入还是支出: '全部',
141
+ 交易类型: '全部',
142
+ 权益类目: '',
151
143
  dateFrom: '',
152
- dateTo: ''
144
+ dateTo: '',
145
+ page: 1,
146
+ pageSize: 20,
153
147
  })
154
148
 
149
+ const reachedLastPage = ref<boolean>(false)
150
+
151
+ /**
152
+ * 全新搜索
153
+ * 重置某些查询条件
154
+ */
155
+ function restartSearch () {
156
+ // 从第一页开始
157
+ filtering.page = 1
158
+ consumptionGroups.value = []
159
+ loadConsumptions()
160
+ }
161
+
155
162
  // 时间筛选
156
163
  const datePickerOpen = ref<boolean>(false)
157
164
 
@@ -159,18 +166,17 @@ function openDateFilter () {
159
166
  datePickerOpen.value = true
160
167
  }
161
168
 
162
- const dataRangeDisplay = computed(() => {
169
+ const dateRangeDisplay = computed(() => {
163
170
  let startTime = filtering.dateFrom?.replace(/-/g, '.').substring(2)
164
171
  let endTime = filtering.dateTo?.replace(/-/g, '.').substring(2)
165
172
  return startTime + ' - ' + endTime
166
173
  })
167
174
 
168
- const consumptionGroups = ref<ConsumptionGroups>({
169
- from: '',
170
- to: '',
171
- list: []
172
- })
175
+ const consumptionGroups = ref<ConsumptionGroup[]>([])
173
176
 
177
+ /**
178
+ * 余额数据
179
+ */
174
180
  const balance = ref<Balance>({
175
181
  total: 0,
176
182
  privileges: []
@@ -180,53 +186,95 @@ useDidShow(() => {
180
186
  Taro.setNavigationBarTitle({
181
187
  title: '我的账户',
182
188
  })
183
- loadConsumptions(true)
189
+ loadConsumptions()
184
190
  loadBalance()
185
191
  })
186
192
 
187
- async function loadConsumptions (firstTime?: boolean) {
188
- const $http = makeHttp()
193
+ function groupDataByDate (data: 账户流水[]): ConsumptionGroup[] {
194
+ // 按照日期分组
195
+ const groups: ConsumptionGroup[] = consumptionGroups.value || []
196
+ // [
197
+ // date: '2023-10-1',
198
+ // consumptions: []
199
+ // ]
200
+ // 组装成按日期分组
201
+ data.forEach(d => {
202
+ const date = dayjs(d.time).format('YYYY-MM-DD')
203
+ let group: ConsumptionGroup | undefined = groups.find(g => g.date === date)
204
+ if (!group) {
205
+ group = {
206
+ date,
207
+ consumptions: []
208
+ }
209
+ groups.push(group)
210
+ }
211
+ group.consumptions.push(d)
212
+ })
213
+ groups.sort((a, b) => a.date > b.date ? -1 : 1)
214
+ return groups
215
+ }
216
+
217
+ /**
218
+ * 请求账户流水
219
+ * @param append 搜索结果累加 上拉分页时
220
+ */
221
+ async function loadConsumptions (append: boolean = false) {
222
+ if (!append) {
223
+ consumptionGroups.value = []
224
+ }
225
+ const $http = useHttp()
189
226
  Taro.showLoading({
190
227
  title: `加载中...`,
191
228
  mask: true,
192
229
  })
193
- $http.get<ConsumptionGroups>(endpoints.getOperations, filtering).then(data => {
194
- consumptionGroups.value = data
195
- if (firstTime) {
196
- filtering.dateFrom = data.from
197
- filtering.dateTo = data.to
230
+ $http.get<WithPaging<账户流水[]>>(endpoints.获取账户流水, filtering).then(response => {
231
+ consumptionGroups.value = groupDataByDate(response.data)
232
+ if (filtering.page >= response.totalPages) {
233
+ filtering.page = response.totalPages
234
+ reachedLastPage.value = true
235
+ } else {
236
+ reachedLastPage.value = false
198
237
  }
238
+ Taro.hideLoading()
199
239
  })
200
- Taro.hideLoading()
201
240
  }
202
241
 
242
+ /**
243
+ * 获取账户余额明细
244
+ */
203
245
  async function loadBalance() {
204
- const $http = makeHttp()
205
- $http.get<Balance>(endpoints.getBalance, {
246
+ const $http = useHttp()
247
+ $http.get<Balance>(endpoints.获取余额明细, {
206
248
  }).then(data => {
207
249
  balance.value = data
208
250
  })
209
251
  }
210
252
 
211
253
  const onFilterComplete = (value) => {
212
- filtering.position = value[0]
213
- filtering.direction = value[1]
214
- filtering.type = value[2]
254
+ filtering.账户类型 = value[0]
255
+ filtering.收入还是支出 = value[1]
256
+ filtering.交易类型 = value[2]
257
+ filtering.权益类目 = value[3]
215
258
  filterOpen.value = false
216
- loadConsumptions()
259
+ restartSearch()
217
260
  }
218
261
 
219
262
  const onDateFilterComplete = (value) => {
220
263
  filtering.dateFrom = value.from
221
264
  filtering.dateTo = value.to
222
265
  datePickerOpen.value = false
223
- loadConsumptions()
266
+ restartSearch()
224
267
  }
225
268
 
226
269
  function gotoRecharge () {
227
270
  emit('recharge')
228
271
  }
229
272
 
273
+ function loadNextPage () {
274
+ filtering.page ++
275
+ loadConsumptions(true)
276
+ }
277
+
230
278
 
231
279
  const scrollY = ref<number>(0)
232
280
  usePageScroll((e) => {
@@ -247,132 +295,164 @@ usePullDownRefresh(() => {
247
295
  }, 500);
248
296
  })
249
297
 
298
+ /**
299
+ * 滑动到底部请求下一页并合并查询结果
300
+ */
301
+ useReachBottom(() => {
302
+ if (reachedLastPage.value) {
303
+ return false
304
+ }
305
+ loadNextPage()
306
+ })
307
+
250
308
  const popupOpen = computed(() => {
251
309
  return rulesPopupOpen.value || datePickerOpen.value || filterOpen.value
252
310
  })
311
+
312
+ const secondBalanceOpen = ref<boolean>(false)
313
+
314
+ function onSecondBalanceButtonClick () {
315
+ secondBalanceOpen.value = true
316
+ }
317
+
318
+ function onDateReset () {
319
+ resetDateRange()
320
+ }
321
+
322
+ /**
323
+ * 充值筛选的起止时间
324
+ */
325
+ function resetDateRange () {
326
+ // 筛选的起止时间
327
+ filtering.dateTo = dayjs().format('YYYY-MM-DD')
328
+ filtering.dateFrom = dayjs().add(-3, 'M').format('YYYY-MM-DD')
329
+ }
330
+
331
+ onMounted(() => {
332
+ resetDateRange()
333
+ })
253
334
  </script>
254
335
 
255
336
  <style lang="scss">
256
- .consumption-view {
337
+ .account-view {
338
+ background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNzUwIiBoZWlnaHQ9IjQwNiIgdmlld0JveD0iMCAwIDc1MCA0MDYiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIGQ9Ik0zODIuNSA0MDcuNUM1NzcuMzU3IDQwNy41IDc1My43ODggMzgxLjI0OCA4ODEuNTIxIDMzOC43OTFDOTQ1LjM4NiAzMTcuNTYzIDk5Ny4xMDQgMjkyLjI3NiAxMDMyLjg3IDI2NC4xNzFDMTA2OC42MiAyMzYuMDcxIDEwODguNSAyMDUuMDk3IDEwODguNSAxNzIuNUMxMDg4LjUgMTM5LjkwMyAxMDY4LjYyIDEwOC45MjkgMTAzMi44NyA4MC44Mjg5Qzk5Ny4xMDQgNTIuNzI0NSA5NDUuMzg2IDI3LjQzNjcgODgxLjUyMSA2LjIwODk4Qzc1My43ODggLTM2LjI0ODIgNTc3LjM1NyAtNjIuNSAzODIuNSAtNjIuNUMxODcuNjQzIC02Mi41IDExLjIxMjIgLTM2LjI0ODIgLTExNi41MjIgNi4yMDg5OEMtMTgwLjM4NiAyNy40MzY3IC0yMzIuMTA0IDUyLjcyNDUgLTI2Ny44NjcgODAuODI4OUMtMzAzLjYyNCAxMDguOTI5IC0zMjMuNSAxMzkuOTAzIC0zMjMuNSAxNzIuNUMtMzIzLjUgMjA1LjA5NyAtMzAzLjYyNCAyMzYuMDcxIC0yNjcuODY3IDI2NC4xNzFDLTIzMi4xMDQgMjkyLjI3NiAtMTgwLjM4NiAzMTcuNTYzIC0xMTYuNTIyIDMzOC43OTFDMTEuMjEyMiAzODEuMjQ4IDE4Ny42NDMgNDA3LjUgMzgyLjUgNDA3LjVaIiBmaWxsPSIjM0IzOTNDIiBzdHJva2U9ImJsYWNrIi8+Cjwvc3ZnPgo=");
339
+ background-position: center -200px;
340
+ background-repeat: no-repeat;
341
+ .page-header {
342
+ background-color: #3B393C;
343
+ position: sticky;
344
+ top: 0;
345
+ z-index: 1;
346
+ transition: background-color .3s;
347
+ &.with-background {
348
+ background-color: #3B393C;
349
+ }
350
+ }
257
351
  &.popupOpen {
258
352
  height: 100vh;
259
353
  overflow: hidden;
260
354
  }
261
355
  .spa-between {
262
- padding: 0 0 0 10px;
263
356
  display: flex;
264
357
  justify-content: space-between;
265
358
  align-items: center;
266
359
  }
267
- .header {
268
- position: relative;
269
- background: linear-gradient(187.18deg, #353535 10.04%, #433f46 90.21%);
270
- background-size: 100% 106px;
271
- padding-top: 20px;
272
- background-repeat: no-repeat;
273
- &_card {
274
- background: linear-gradient(104.85deg, #f4e2ce 1.88%, #debb9b 98.18%);
275
- border-radius: 15px;
276
- padding: 10px;
277
- margin: 0 15px;
278
- .clound-bean {
279
- .bean-box {
280
- font-size: 10px;
281
- .bean-img {
282
- display: flex;
283
- justify-content: flex-start;
284
- align-items: center;
285
- .bean-icon {
286
- display: block;
287
- font-size: 0;
288
- width: 20px;
289
- height: 20px;
290
- margin-right: 4px;
291
- }
292
- .bean-tag {
293
- color: #353535;
294
- height: 15px;
295
- line-height: 15px;
296
- border-radius: 30px 50px 50px 0px;
297
- background: rgba(#ff8320, 0.3);
298
- padding-left: 5px;
299
- padding-right: 10px;
300
- }
301
- .tag {
302
- background: #ff8320;
303
- color: #fff;
304
- }
305
- }
306
- .rule {
307
- color: #353535;
308
- opacity: 0.5;
309
- }
310
- }
311
- .bean-counts {
312
- margin-top: 5px;
313
- .counts {
314
- color: #3d3835;
315
- font-size: 32px;
316
- font-weight: 700;
317
- }
318
- .pay {
319
- padding: 0 20px;
320
- height: 32px;
321
- line-height: 32px;
322
- background: linear-gradient(
323
- 187.18deg,
324
- #353535 10.04%,
325
- #433f46 90.21%
326
- );
327
- border-radius: 16px;
328
- color: #e7caad;
329
- font-size: 15px;
330
- font-weight: 500;
331
- }
332
- }
360
+ .row {
361
+ display: flex;
362
+ flex-direction: row;
363
+ margin: 10px 15px;
364
+ }
365
+ .jusify-right {
366
+ justify-content: flex-end;
367
+ }
368
+ .small-bean-button {
369
+ height: 22px;
370
+ border-radius: 11px;
371
+ border: 1px solid #ffffff10;
372
+ background-color: #ffffff18;
373
+ display: inline-block;
374
+ padding: 0 10px;
375
+ line-height: 22px;
376
+ color: #E7CAAD;
377
+ font-size: 12px;
378
+ label {
379
+ background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEwIDZMMTYgMTJMMTAgMThWNloiIGZpbGw9IiNFN0NBQUQiIHN0cm9rZT0iI0U3Q0FBRCIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=");
380
+ padding-right: 18px;
381
+ background-repeat: no-repeat;
382
+ background-position: right center;
383
+ background-size: 16px;
384
+ }
385
+ }
386
+ .balance {
387
+ border-radius: 15px;
388
+ background: linear-gradient(105deg, #F4E2CE 1.88%, #DEBB9B 98.18%);
389
+ box-shadow: 0px -10px 9px -3px rgba(0, 0, 0, 0.33);
390
+ height: 112px;
391
+ padding: 20px;
392
+ margin: 0 15px;
393
+ box-sizing: border-box;
394
+ font-size: 10px;
395
+ .bean-img {
396
+ display: flex;
397
+ justify-content: flex-start;
398
+ align-items: center;
399
+ .bean-icon {
400
+ display: block;
401
+ font-size: 0;
402
+ width: 20px;
403
+ height: 20px;
404
+ margin-right: 4px;
333
405
  }
334
- .line {
335
- height: 3px;
336
- width: 100%;
337
- margin: 10px 0;
338
- background: linear-gradient(90deg, #e7c39f 0.84%, #e6c9ad 27.74%);
406
+ .bean-tag {
407
+ color: #353535;
408
+ height: 15px;
409
+ line-height: 15px;
410
+ border-radius: 30px 50px 50px 0px;
411
+ background: rgba(#ff8320, 0.3);
412
+ padding-left: 5px;
413
+ padding-right: 10px;
339
414
  }
340
- .small-clound-bean {
341
- margin-top: 20px;
342
- .bean-list {
343
- margin-top: 8px;
344
- display: flex;
345
- flex-wrap: wrap;
346
- &-item {
347
- width: 50%;
348
- line-height: 23px;
349
- padding-left: 10px;
350
- box-sizing: border-box;
351
- margin-bottom: 10px;
352
- .counts {
353
- color: #353535;
354
- font-size: 20px;
355
- font-weight: 700;
356
- }
357
- .title {
358
- color: #987356;
359
- font-weight: 400;
360
- font-size: 11px;
361
- }
362
- }
363
- &-item:nth-child(2n) {
364
- padding-left: 30px;
365
- }
366
- }
415
+ .tag {
416
+ background: #ff8320;
417
+ color: #fff;
367
418
  }
368
419
  }
420
+ .rule {
421
+ color: #353535;
422
+ opacity: 0.5;
423
+ }
424
+ }
425
+ .bean-counts {
426
+ margin-top: 12px;
427
+ .counts {
428
+ color: #3d3835;
429
+ font-size: 32px;
430
+ font-weight: 700;
431
+ }
432
+ .pay {
433
+ padding: 0 20px;
434
+ height: 32px;
435
+ line-height: 32px;
436
+ background: linear-gradient(
437
+ 187.18deg,
438
+ #353535 10.04%,
439
+ #433f46 90.21%
440
+ );
441
+ border-radius: 16px;
442
+ color: #e7caad;
443
+ font-size: 15px;
444
+ font-weight: 500;
445
+ }
369
446
  }
370
447
  .operation-title {
371
448
  padding: 10px 15px;
372
449
  background: #fff;
373
450
  position: sticky;
374
451
  z-index: 10;
375
- top: 0;
452
+ transition: box-shadow .3s;
453
+ &.with-shadow {
454
+ box-shadow: 0px 1px 10px 0px #99999933
455
+ }
376
456
  .text {
377
457
  color: #353535;
378
458
  font-size: 12px;
@@ -411,6 +491,7 @@ const popupOpen = computed(() => {
411
491
  }
412
492
  .operation-list {
413
493
  margin: 0 15px;
494
+ padding-bottom: 15px;
414
495
  .box {
415
496
  &-detail {
416
497
  .title {
@@ -422,7 +503,9 @@ const popupOpen = computed(() => {
422
503
  margin-bottom: 10px;
423
504
  }
424
505
  .item {
425
- box-shadow: 0px 5px 18px 2px #00000029;
506
+ border-radius: 5px;
507
+ background: rgba(255, 255, 255, 0.50);
508
+ box-shadow: 0px 2.5px 9.5px 2px rgba(0, 0, 0, 0.05);
426
509
  border-radius: 5px;
427
510
  padding: 12px 10px;
428
511
  display: flex;
@@ -479,28 +562,8 @@ const popupOpen = computed(() => {
479
562
  text-align: center;
480
563
  }
481
564
  }
482
- .operations-empty {
483
- display: flex;
484
- flex-direction: column;
485
- justify-content: center;
486
- align-items: center;
487
- margin-top: 80px;
488
- &-img {
489
- display: block;
490
- font-size: 0;
491
- width: 144px;
492
- height: 80px;
493
- }
494
- &-text {
495
- opacity: 0.4;
496
- color: #353535;
497
- font-size: 12px;
498
- line-height: 28px;
499
- }
500
- }
501
565
  }
502
566
  }
503
-
504
567
  .consumption-rules-popup {
505
568
  border-radius: 16px;
506
569
  width: 70%;
@@ -36,7 +36,7 @@
36
36
 
37
37
  <script setup lang="ts">
38
38
  import { ref } from 'vue'
39
- import { endpoints, makeHttp } from '../api'
39
+ import { endpoints, useHttp } from '../api'
40
40
  import { Balance } from '../types'
41
41
  import { useDidShow } from '@tarojs/taro'
42
42
 
@@ -50,8 +50,8 @@ const gotoRecharge = () => {
50
50
  }
51
51
 
52
52
  async function loadBalance () {
53
- const $http = makeHttp()
54
- $http.get<Balance>(endpoints.getBalance, {
53
+ const $http = useHttp()
54
+ $http.get<Balance>(endpoints.获取余额明细, {
55
55
  }).then(data => {
56
56
  balance.value = data
57
57
  })