Files
vpUni/.svn/pristine/99/9950034724211db1bcc2f9cc635e8e050d430d8d.svn-base
2026-03-09 16:39:03 +08:00

119 lines
3.3 KiB
Plaintext

<template>
<view>
<view class="" style=" margin: 25rpx 0; padding: 0 20rpx; display: flex; align-items: center; justify-content: space-between;">
<view @click="changetab(index)" v-for="(item,index) in tag" :key="index"
:class="{active:index!=currentIndex,actived:index==currentIndex}" class="tag"
style=" padding: 14rpx 36rpx; border-radius: 14rpx; ">
{{item}}
</view>
</view>
<view v-if="type==0"class="" style=" margin:20rpx; margin-top: 30rpx; " >
<view class="" style="display: flex; align-items: center; padding: 40rpx 30rpx; margin-top: 20rpx; justify-content: space-between; border-radius: 20rpx; box-shadow: 0 0 10rpx 4rpx #e2e2e2; " >
<view class="">
<view class="" style="display: flex; align-items: center;" >
<img :src="Service.GetMateUrlByImg('/static/dele/dele1.jpg')" style=" border-radius: 10rpx; width: 60rpx; height: 60rpx;" alt="" />
<text style="margin-left: 10rpx;" >星巴克咖啡</text>
</view>
<view class="" style="margin-top: 15rpx; color: #999999; " >
今天 14:30
</view>
</view>
<view class="" style="font-weight: 600; color: #666666;" >
¥-38.00
</view>
</view>
<up-loadmore :status="status" />
</view>
<view v-else class="" style=" margin:20rpx; margin-top: 30rpx; " >
<view class="" style="display: flex; align-items: center; padding: 40rpx 30rpx; margin-top: 20rpx; justify-content: space-between; border-radius: 20rpx; box-shadow: 0 0 10rpx 4rpx #e2e2e2; " >
<view class="">
<view class="" style="display: flex; align-items: center;" >
<img :src="Service.GetMateUrlByImg('/static/dele/dele1.jpg')" style=" border-radius: 10rpx; width: 60rpx; height: 60rpx;" alt="" />
<text style="margin-left: 10rpx;" >星巴克咖啡</text>
</view>
<view class="" style="margin-top: 15rpx; color: #999999; " >
今天 14:30
</view>
</view>
<view class="" style="font-weight: 600; color: #666666;" >
¥-38.00
</view>
</view>
<up-loadmore :status="status" />
</view>
<up-calendar :show="showDate" :mode="mode" monthNum='5' minDate='2025-12-01' maxDate='2999-12-31' @close="showDate=false" @confirm="confirmDate"></up-calendar>
</view>
</template>
<script setup lang="ts">
import { onShow, onLoad } from "@dcloudio/uni-app";
import { ref } from "vue";
import { Service } from '@/Service/Service'
let status=ref('nomore')
let currentIndex=ref(0)
let tag = ref([
'全部',
'今日',
'本月',
'自定义'
])
// 日历管理
const showDate = ref(false);
const mode = ref('range');
let type=ref(null)
onLoad((data:any) => {
type.value=data.type
if(data.type==0){
uni.setNavigationBarTitle({
title:'交易明细'
})
}else{
uni.setNavigationBarTitle({
title:'交易记录'
})
}
});
onShow(() => {
});
const changetab=(e:number)=>{
if(e==3){
showDate.value=true
return
}
currentIndex.value=e
}
const confirmDate = (e) => {
console.log(e);
currentIndex.value=3
showDate.value=false
};
</script>
<style lang="scss">
.active{
background-color: #F3F4F6;
color: #4B5563;
}
.actived{
background-color: #FF6B35;
color: #fff;
}
.tag{
display: flex;
align-items: center;
justify-content: center;
width: fit-content;
font-size: 28rpx;
}
</style>