|
|
@ -1,116 +1,77 @@ |
|
|
|
<template> |
|
|
|
<!-- <div>合伙人钱包明细</div> --> |
|
|
|
<!-- <div>交易明细</div> --> |
|
|
|
<view class="box"> |
|
|
|
<view class="top flex" :style="{ borderRadius: '31.5rpx' }"> |
|
|
|
<view class="income flex element" :style="{ borderRadius: '31.5rpx',backgroundColor: currentTab === 1 ? '#FFBF60' : '#F3F3F3', |
|
|
|
color: currentTab === 1 ? 'white' : 'black' }" @click="tabClick(1)"> |
|
|
|
<view @click="changeTab(0)" :class="{ active : type == 0 }" class="income flex element" |
|
|
|
:style="{ borderRadius: '31.5rpx' }"> |
|
|
|
收入明细 |
|
|
|
</view> |
|
|
|
<view class="income flex element" :style="{ borderRadius: '31.5rpx',backgroundColor: currentTab === 2 ? '#FFBF60' : '#F3F3F3', |
|
|
|
color: currentTab === 2 ? 'white' : 'black'}" @click="tabClick(2)"> |
|
|
|
<view @click="changeTab(1)" :class="{ active : type == 1 }" class="income flex element" |
|
|
|
:style="{ borderRadius: '31.5rpx' }"> |
|
|
|
支出明细 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="mt20" v-for="(item,index) in detaliList" :key="index"> |
|
|
|
<view class="Recharge flex mb28"> |
|
|
|
<view class="flex"> |
|
|
|
<!-- <image src="https://img1.baidu.com/it/u=3034232350,1041791648&fm=253&fmt=auto&app=138&f=PNG?w=500&h=500" |
|
|
|
mode=""></image> --> |
|
|
|
<image :src="icon" mode=""></image> |
|
|
|
<view class="text1"> |
|
|
|
<view class="text2"> |
|
|
|
{{item.title}} |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
{{item.time}} |
|
|
|
</view> |
|
|
|
<view v-for="(item,index) in list" :key="index" class="Recharge flex"> |
|
|
|
<view class="flex"> |
|
|
|
<image style="width: 80rpx;height: 80rpx" src="https://img1.baidu.com/it/u=3034232350,1041791648&fm=253&fmt=auto&app=138&f=PNG?w=500&h=500" |
|
|
|
mode="aspectFill"></image> |
|
|
|
<view class="text1"> |
|
|
|
<view class="text2"> |
|
|
|
{{ item.title }} |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
{{ item.createTime }} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="text3"> |
|
|
|
¥ {{item.amont}} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<up-line color="#C7C7C7"></up-line> |
|
|
|
<view class="text3"> |
|
|
|
¥{{ item.amount }} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
<script setup> |
|
|
|
import { |
|
|
|
ref, |
|
|
|
reactive, |
|
|
|
onMounted |
|
|
|
} from 'vue'; |
|
|
|
ref |
|
|
|
} from "vue" |
|
|
|
import { |
|
|
|
amountLogList |
|
|
|
} from "@/api/amount/index.js" |
|
|
|
|
|
|
|
import { |
|
|
|
getTransactionDetailsList |
|
|
|
} from "@/api/home.js" |
|
|
|
|
|
|
|
const icon = ref('/static/images/levelImage/money.png') |
|
|
|
|
|
|
|
const detaliList = reactive([{ |
|
|
|
title: "合伙人推广佣金", |
|
|
|
time: "2020-12-29 12:54:54", |
|
|
|
amont: "168.00" |
|
|
|
}, |
|
|
|
{ |
|
|
|
title: "合伙人推广佣金", |
|
|
|
time: "2020-12-29 12:54:54", |
|
|
|
amont: "168.00" |
|
|
|
}, |
|
|
|
]) |
|
|
|
|
|
|
|
const state = reactive({ |
|
|
|
transactionType: 0 |
|
|
|
}) |
|
|
|
onShow |
|
|
|
} from "@dcloudio/uni-app" |
|
|
|
|
|
|
|
onMounted(() => { |
|
|
|
getList() |
|
|
|
onShow(() => { |
|
|
|
getRunningWater() |
|
|
|
}) |
|
|
|
|
|
|
|
const getList = () => { |
|
|
|
getTransactionDetailsList({ |
|
|
|
transactionType: state.transactionType |
|
|
|
}) |
|
|
|
const list = ref([]); |
|
|
|
const type = ref(0); |
|
|
|
|
|
|
|
// 获取流水 |
|
|
|
const getRunningWater = async () => { |
|
|
|
let response = await amountLogList({ |
|
|
|
type: type.value, |
|
|
|
moneyType:0 |
|
|
|
}); |
|
|
|
if (response.code == 200) { |
|
|
|
list.value = response.data |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const currentTab = ref(1); |
|
|
|
|
|
|
|
const tabClick = (val) => { |
|
|
|
detaliList.splice(0, detaliList.length) |
|
|
|
switch (val) { |
|
|
|
case 1: |
|
|
|
detaliList.push({ |
|
|
|
title: "合伙人推广佣金", |
|
|
|
time: "2020-12-29 12:54:54", |
|
|
|
amont: "168.00" |
|
|
|
}, { |
|
|
|
title: "合伙人推广佣金", |
|
|
|
time: "2020-12-29 12:54:54", |
|
|
|
amont: "168.00" |
|
|
|
}, ) |
|
|
|
currentTab.value = val; |
|
|
|
break; |
|
|
|
case 2: |
|
|
|
detaliList.push({ |
|
|
|
title: "提现", |
|
|
|
time: "2020-12-29 12:54:54", |
|
|
|
amont: "168.00" |
|
|
|
}, ) |
|
|
|
currentTab.value = val; |
|
|
|
break; |
|
|
|
} |
|
|
|
const changeTab = (index) => { |
|
|
|
type.value = index; |
|
|
|
getRunningWater(); |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
.box { |
|
|
|
width: 750rpx; |
|
|
|
height: 100vh; |
|
|
|
height: 1452rpx; |
|
|
|
background-color: #FFFFFF; |
|
|
|
padding: 2% 2% 0 2%; |
|
|
|
box-sizing: border-box; |
|
|
@ -122,10 +83,10 @@ |
|
|
|
background-color: #F3F3F3; |
|
|
|
} |
|
|
|
|
|
|
|
// .element:hover { |
|
|
|
// background-color: #FFBF60; |
|
|
|
// color: white; |
|
|
|
// } |
|
|
|
.active { |
|
|
|
background-color: #FFBF60; |
|
|
|
color: white; |
|
|
|
} |
|
|
|
|
|
|
|
.income { |
|
|
|
width: 361rpx; |
|
|
@ -141,8 +102,6 @@ |
|
|
|
padding: 3% 3% 0 2%; |
|
|
|
box-sizing: border-box; |
|
|
|
justify-content: space-between; |
|
|
|
// background-color: red; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.flex { |
|
|
|