Explorar el Código

钱包流水记录

Xiao_123 hace 7 meses
padre
commit
c51add726d
Se han modificado 2 ficheros con 27 adiciones y 10 borrados
  1. 13 0
      api/sign.js
  2. 14 10
      pagesA/balance/index.vue

+ 13 - 0
api/sign.js

@@ -160,6 +160,19 @@ export const getUserWalletRechargePage = async (params) => {
   })
 }
 
+// 获得钱包流水分页
+export const getUserWalletTransactionPage = async (params) => {
+  return request({
+    url: '/app-api/pay/wallet-transaction/page',
+    method: 'GET',
+    params,
+    custom: {
+      showLoading: false,
+      auth: true
+    }
+  })
+}
+
 // 账户变动记录
 export const getEnterpriseAccountRecordPage = async (params) => {
   return request({

+ 14 - 10
pagesA/balance/index.vue

@@ -15,11 +15,11 @@
           <view class="list">
             <uni-list border-full>
               <uni-list-item
-                v-for="item in items"
-                :key="item.id"
-                :title="item._payPrice"
-                :note="item._payTime"
-                :rightText="item.payChannelName"
+                v-for="(item, index) in items"
+                :key="index"
+                :title="item.title"
+                :note="item.price"
+                :rightText="item.createTime"
               />
             </uni-list>
             <uni-load-more :status="more" />
@@ -34,7 +34,7 @@
 import { ref } from 'vue'
 import {
   getAccountBalance,
-  getUserWalletRechargePage
+  getUserWalletTransactionPage
 } from '@/api/sign'
 import { timesTampChange } from '@/utils/date'
 
@@ -61,7 +61,7 @@ async function getBalance() {
 
 async function getList () {
   try {
-    const { data } = await getUserWalletRechargePage(pageInfo.value)
+    const { data } = await getUserWalletTransactionPage(pageInfo.value)
     if (!data || !data.list || !data.list.length) {
       if (pageInfo.value.pageNo === 1) {
         return
@@ -72,9 +72,13 @@ async function getList () {
     }
     const _data = data.list.map(e => {
       return {
-        ...e,
-        _payPrice: (e.payPrice / 100.0).toFixed(2),
-        _payTime: timesTampChange(e.payTime)
+        // ...e,
+        // _payPrice: (e.payPrice / 100.0).toFixed(2),
+        // _payTime: timesTampChange(e.payTime)
+        // ...e,
+        title: e.title,
+        createTime: timesTampChange(e.createTime),
+        price: (e.price / 100.0).toFixed(2)
       }
     })
     items.value.push(..._data)