Prechádzať zdrojové kódy

feat: 更换账户接口

liangan 2 týždňov pred
rodič
commit
098ff433d9

+ 8 - 1
src/api/wallet.ts

@@ -4,9 +4,16 @@ import { http } from '@/utils/http'
  * 查询收益账户信息
  * @returns
  */
-export function getWalletInfo() {
+export function getAccountInfo() {
   return http.get<any>(`/cif/account/api/getAccountInfo`)
 }
+/**
+ * 查询钱包账户信息
+ * @returns
+ */
+export function getWalletAccountInfo() {
+  return http.get<any>(`/cif/account/api/getWalletAccountInfo`)
+}
 /**
  * 查询收益记录
  * @returns

+ 4 - 4
src/pages/income/income.vue

@@ -15,7 +15,7 @@ import { onPageScroll, onReachBottom } from '@dcloudio/uni-app'
 import useZPaging from 'z-paging/components/z-paging/js/hooks/useZPaging.js'
 // 必须导入需要用到的页面生命周期(即使在当前页面上没有直接使用到)
 
-import { getWalletInfo as _getWalletInfo, envelopeList } from '@/api/wallet'
+import { getAccountInfo as _getAccountInfo, envelopeList } from '@/api/wallet'
 import { formatNumber } from '@/utils'
 import { toPage } from '@/utils/page'
 
@@ -33,8 +33,8 @@ const dayType = ref(1)
 // 搜索结果
 const dataList = ref([])
 const walletInfo = ref<any>({})
-async function getWalletInfo() {
-  const res = await _getWalletInfo()
+async function getAccountInfo() {
+  const res = await _getAccountInfo()
   console.log(res)
   if (res.code === '200') {
     walletInfo.value = res.data
@@ -55,7 +55,7 @@ async function queryList(pageNo, pageSize) {
   }
 }
 onShow(() => {
-  getWalletInfo()
+  getAccountInfo()
 })
 </script>
 

+ 2 - 2
src/pages/productDetail/checkOut.vue

@@ -11,7 +11,7 @@
 
 <script lang="ts" setup>
 import { computedPrice, createOrder, loadPre, payOrder } from '@/api/order'
-import { getWalletInfo } from '@/api/wallet'
+import { getWalletAccountInfo } from '@/api/wallet'
 import DialogBox from '@/components/DialogBox/DialogBox.vue'
 import { DialogUtils } from '@/components/DialogBox/utils'
 import { useUserStore } from '@/store'
@@ -54,7 +54,7 @@ async function getPrice() {
   orderSummary.value.SubTotal = computedPriceRes?.data?.proTotalFee
   orderSummary.value.Total = computedPriceRes?.data?.payFee
   // 获取钱包信息-查询余额
-  const walletInfoRes = await getWalletInfo()
+  const walletInfoRes = await getWalletAccountInfo()
   console.log(walletInfoRes)
   walletBalance.value = walletInfoRes?.data?.balance
 }