猫妈狗爸伴宠师小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

171 lines
3.1 KiB

<template>
<!-- <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>
<view class="income flex element" :style="{ borderRadius: '31.5rpx',backgroundColor: currentTab === 2 ? '#FFBF60' : '#F3F3F3',
color: currentTab === 2 ? 'white' : 'black'}" @click="tabClick(2)">
支出明细
</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>
</view>
<view class="text3">
¥ {{item.amont}}
</view>
</view>
<up-line color="#C7C7C7"></up-line>
</view>
</view>
</template>
<script setup>
import {
ref,
reactive,
onMounted
} from 'vue';
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
})
onMounted(() => {
getList()
})
const getList = () => {
getTransactionDetailsList({
transactionType: state.transactionType
})
}
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;
}
}
</script>
<style scoped lang="scss">
.box {
width: 750rpx;
height: 100vh;
background-color: #FFFFFF;
padding: 2% 2% 0 2%;
box-sizing: border-box;
}
.top {
width: 722rpx;
height: 63rpx;
background-color: #F3F3F3;
}
// .element:hover {
// background-color: #FFBF60;
// color: white;
// }
.income {
width: 361rpx;
height: 63rpx;
line-height: 63rpx;
font-size: 30rpx;
justify-content: center;
}
.Recharge {
padding: 3% 3% 0 2%;
box-sizing: border-box;
justify-content: space-between;
// background-color: red;
}
.flex {
display: flex;
}
.text1 {
font-size: 30rpx;
color: #949494;
}
.Recharge image {
width: 56rpx;
height: 56rpx;
margin-top: 0.5%;
}
.text2 {
font-weight: 700;
color: #333333;
}
.text3 {
color: #FF2A2A;
}
</style>