流水记录
This commit is contained in:
1 parent
e982f33804
commit
c87df798e8
3 files changed
+89
-7
No files matched your search
@@ -132,17 +132,17 @@ const state = reactive({
|
||||
txTab: [
|
||||
{
|
||||
title: '累计收益',
|
||||
value: '100',
|
||||
value: '0',
|
||||
path: "/pages/wechat/pages/gift/history",
|
||||
},
|
||||
{
|
||||
title: '可提现',
|
||||
value: '200',
|
||||
value: '0',
|
||||
path: "/pages/wechat/pages/gift/index",
|
||||
},
|
||||
{
|
||||
title: '成功邀请',
|
||||
value: '300',
|
||||
value: '0',
|
||||
path: "/pages/wechat/pages/inviter/index",
|
||||
},
|
||||
],
|
||||
|
||||
@@ -7,17 +7,93 @@
|
||||
</navigator>
|
||||
</template>
|
||||
</wd-navbar>
|
||||
<wd-tabs v-model="activeTab">
|
||||
<wd-tabs v-model="activeTab" @change="tabsChange">
|
||||
<wd-tab title="提现记录" />
|
||||
<wd-tab title="消费记录" />
|
||||
<wd-tab title="缘豆记录" />
|
||||
</wd-tabs>
|
||||
<view class="mt-15rpx mx-30rpx" style="height: calc(100dvh - 44px - 84rpx);">
|
||||
<scroll-list v-if="[0, 1].includes(activeTab)" class="h-full" :loadMoreStatus="loadMoreStatus"
|
||||
@refresh="refreshList" @loadMore="listLoadMore">
|
||||
<view class="flex items-center card-thin px-20rpx py-18rpx mb-15rpx" v-for="(v, i) in listData"
|
||||
:key="v.id">
|
||||
<view class="flex-2 text-xs">
|
||||
<wd-tag v-if="v.bizType == 7" size="30rpx" type="danger" custom-class="space">
|
||||
<view class="p-0.75">{{ v.title }}</view>
|
||||
</wd-tag>
|
||||
<wd-tag v-else size="30rpx" custom-class="space">
|
||||
<view class="p-0.75">{{ v.title }}</view>
|
||||
</wd-tag>
|
||||
</view>
|
||||
<text class="flex-1 text-base text-color-theme text-center">{{ fen2yuan(v.price) }}</text>
|
||||
<text class="flex-2 text-xs">{{ formatDate(v.createTime) }}</text>
|
||||
</view>
|
||||
</scroll-list>
|
||||
<scroll-list v-else class="h-full" :loadMoreStatus="loadMoreStatus_gift" @refresh="refreshList_gift"
|
||||
@loadMore="listLoadMore_gift">
|
||||
<view class="flex-col justify-center card-thin px-20rpx py-18rpx mb-15rpx"
|
||||
v-for="(v, i) in listData_gift" :key="v.id">
|
||||
<text class="text-xs indent-2em">{{ v.title }}</text>
|
||||
<text class="m-t-6rpx text-xs text-right">{{ formatDate(v.createTime) }}</text>
|
||||
</view>
|
||||
</scroll-list>
|
||||
</view>
|
||||
</wd-config-provider>
|
||||
</template>
|
||||
<script setup>
|
||||
import { computed, reactive, ref } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
|
||||
import sheep from '@/sheep';
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { fen2yuan } from '@/sheep/hooks/useGoods';
|
||||
import { formatDate } from '@/sheep/helper/utils';
|
||||
import ScrollList from '@/sheep/components/scroll-list/scroll-list.vue';
|
||||
import useScroll from '@/sheep/hooks/use-scroll';
|
||||
|
||||
import PayWalletApi from "@/sheep/api/pay/wallet.js"
|
||||
|
||||
const activeTab = ref(0);
|
||||
|
||||
const state = {
|
||||
queryParams: {
|
||||
// 1收入;2支出
|
||||
type: 1
|
||||
},
|
||||
giftParams: {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
const {
|
||||
listData,
|
||||
loadMoreStatus: loadMoreStatus,
|
||||
refreshList: refreshList,
|
||||
listLoadMore: listLoadMore,
|
||||
} = useScroll(PayWalletApi.getWalletTransactionPage, state.queryParams);
|
||||
|
||||
const {
|
||||
listData: listData_gift,
|
||||
loadMoreStatus: loadMoreStatus_gift,
|
||||
refreshList: refreshList_gift,
|
||||
listLoadMore: listLoadMore_gift,
|
||||
} = useScroll(PayWalletApi.giftPage, state.giftParams);
|
||||
|
||||
onShow(() => {
|
||||
refreshList()
|
||||
})
|
||||
|
||||
const tabsChange = ({ index }) => {
|
||||
if ([0, 1].includes(index)) {
|
||||
if (index == 0) {
|
||||
state.queryParams.type = 1
|
||||
}
|
||||
if (index == 1) {
|
||||
state.queryParams.type = 2
|
||||
}
|
||||
refreshList()
|
||||
} else if ([2].includes(index)) {
|
||||
refreshList_gift()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const activeTab = ref();
|
||||
</script>
|
||||
@@ -21,6 +21,9 @@ const BrokerageApi = {
|
||||
return request({
|
||||
url: '/trade/brokerage-user/get-summary',
|
||||
method: 'GET',
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
});
|
||||
},
|
||||
// 获得分销记录分页
|
||||
@@ -112,6 +115,9 @@ const BrokerageApi = {
|
||||
url: '/trade/brokerage-code/get',
|
||||
method: 'GET',
|
||||
params,
|
||||
custom: {
|
||||
showLoading: false,
|
||||
},
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user