第一次上传
This commit is contained in:
@@ -0,0 +1,150 @@
|
||||
<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="" v-for="(item,index) in historyList" :key="index" 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(item.merchLogo)" style=" border-radius: 10rpx; width: 90rpx; height: 90rpx;" alt="" />
|
||||
<text style="margin-left: 10rpx;" >{{ item.merchName }}</text>
|
||||
</view>
|
||||
<view class="" style="margin-top: 15rpx; color: #999999; " >
|
||||
{{ item.payTime }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="font-weight: 600; color: #666666;" >
|
||||
¥-{{ item.amount }}
|
||||
</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'
|
||||
import { vpOrderService } from '@/Service/vp/vpOrderService'
|
||||
|
||||
let currentIndex=ref(0)
|
||||
let tag = ref([
|
||||
'全部',
|
||||
'今日',
|
||||
'本月',
|
||||
'自定义'
|
||||
])
|
||||
|
||||
// 日历管理
|
||||
const showDate = ref(false);
|
||||
const mode = ref('range');
|
||||
|
||||
let page=ref(1)
|
||||
let status=ref('nomore')
|
||||
let historyList=ref<Array<any>>([])
|
||||
|
||||
let type=ref(null)
|
||||
let time=ref('')
|
||||
|
||||
onLoad((data:any) => {
|
||||
type.value=data.type
|
||||
if(data.type==0){
|
||||
uni.setNavigationBarTitle({
|
||||
title:'交易明细'
|
||||
})
|
||||
}else{
|
||||
uni.setNavigationBarTitle({
|
||||
title:'交易记录'
|
||||
})
|
||||
}
|
||||
getData()
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
|
||||
});
|
||||
|
||||
const getData=()=>{
|
||||
status.value='Loadmore'
|
||||
page.value=1
|
||||
getList()
|
||||
}
|
||||
|
||||
const getList=()=>{
|
||||
if(status.value=='loading' || status.value=='loadmore' ){
|
||||
return
|
||||
}
|
||||
status.value='loading'
|
||||
vpOrderService.GetUserOrderList(String(currentIndex.value),page.value).then(res=>{
|
||||
if(res.code==0){
|
||||
historyList.value=[...historyList.value,...res.data.list]
|
||||
status.value=res.data.list.length==10?'loadmore':'nomore'
|
||||
page.value++
|
||||
}else{
|
||||
Service.Msg(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
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>
|
||||
Reference in New Issue
Block a user