|
@@ -14,6 +14,7 @@
|
|
|
import { onPageScroll, onReachBottom } from '@dcloudio/uni-app' // 必须导入需要用到的页面生命周期(即使在当前页面上没有直接使用到)
|
|
|
import useZPaging from 'z-paging/components/z-paging/js/hooks/useZPaging.js'
|
|
|
|
|
|
+import { getEnum as _getEnum } from '@/api/common'
|
|
|
import { getAccountInfo as _getAccountInfo, envelopeList } from '@/api/wallet'
|
|
|
import { formatNumber } from '@/utils'
|
|
|
import { toPage } from '@/utils/page'
|
|
@@ -30,8 +31,19 @@ useZPaging(paging)
|
|
|
const dayType = ref(1)
|
|
|
|
|
|
// 搜索结果
|
|
|
+const statusEnum = ref<any[]>([])
|
|
|
+const typeEnum = ref<any[]>([])
|
|
|
const dataList = ref([])
|
|
|
const walletInfo = ref<any>({})
|
|
|
+async function getEnum(id: number) {
|
|
|
+ const res = await _getEnum({ id })
|
|
|
+ if (id === 4) {
|
|
|
+ statusEnum.value = res.data
|
|
|
+ }
|
|
|
+ else if (id === 5) {
|
|
|
+ typeEnum.value = res.data
|
|
|
+ }
|
|
|
+}
|
|
|
async function getAccountInfo() {
|
|
|
const res = await _getAccountInfo()
|
|
|
console.log(res)
|
|
@@ -39,7 +51,7 @@ async function getAccountInfo() {
|
|
|
walletInfo.value = res.data
|
|
|
}
|
|
|
}
|
|
|
-async function queryList(pageNo, pageSize) {
|
|
|
+async function queryList(pageNo: number, pageSize: number) {
|
|
|
const data = {
|
|
|
page: pageNo,
|
|
|
size: pageSize,
|
|
@@ -54,6 +66,8 @@ async function queryList(pageNo, pageSize) {
|
|
|
}
|
|
|
}
|
|
|
onShow(() => {
|
|
|
+ getEnum(4)
|
|
|
+ getEnum(5)
|
|
|
getAccountInfo()
|
|
|
})
|
|
|
</script>
|
|
@@ -183,7 +197,7 @@ onShow(() => {
|
|
|
>
|
|
|
<view class="mb-8rpx flex items-center justify-between text-24rpx">
|
|
|
<text class="truncate">
|
|
|
- Group Buying Reward:PPB123456789
|
|
|
+ {{ typeEnum.find(i => i.code === item.bizType)?.name }}:{{ item.orderNo }}
|
|
|
</text>
|
|
|
<text class="flex-shrink-0 pl-16rpx">
|
|
|
৳ {{ formatNumber(item.amount) }}
|
|
@@ -193,7 +207,7 @@ onShow(() => {
|
|
|
<text class="text-#5B5B5B">
|
|
|
{{ item.updateTime }}
|
|
|
</text>
|
|
|
- <wd-text type="success" text="Completed" />
|
|
|
+ <wd-text :type="item.status === 2 ? 'success' : 'primary'" :text="statusEnum.find(i => i.code === item.status)?.name" />
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|