This commit is contained in:
weicw
2023-08-11 14:30:03 +08:00
parent 7a73b38bd5
commit 81ecfd9df0
9 changed files with 176 additions and 10 deletions

View File

@@ -0,0 +1,76 @@
<template>
<view>
<uni-list>
<uni-list-item :key="index" v-for="(item, index) in dataList" :title="`订单号:${item.orderNo}`"
:note="`${orderType[item.scene]}:+ ${item.money}元`" :rightText="item.createTime"></uni-list-item>
</uni-list>
</view>
</template>
<script>
import * as LogApi from '@/api/shop/profitLog.js'
import {mapGetters} from 'vuex'
export default {
data() {
return {
dataList: [],
hasMore: true,
page: 1,
limit: 10,
where: {
},
orderType:{
1: "投资收益",
3: "推广收益",
4: "门店收益",
5: "门店业绩",
}
};
},
computed: {
...mapGetters(['userId'])
},
onLoad() {
this.queryList()
},
methods: {
queryList() {
LogApi.list({
page: this.page,
limit: this.limit,
userId: this.userId
}).then(res => {
if(res.code == 0){
res.data.list.forEach(item => {
item.createTime = this.$u.timeFormat(item.createTime, 'yyyy-mm-dd');
})
this.dataList.push(...res.data.list)
this.hasMore = this.dataList.length < res.data.count
}
}).finally(()=>{
uni.stopPullDownRefresh()
})
},
scrolltolower(e) {
console.log(e);
}
},
onPullDownRefresh() {
this.page == 1;
this.dataList = [];
this.queryList();
this.hasMore = true
},
onReachBottom() {
if(this.hasMore){
this.page ++
this.queryList();
}
}
}
</script>
<style lang="scss">
</style>

47
pages/saleman/saleman.vue Normal file
View File

@@ -0,0 +1,47 @@
<template>
<view class="page-wrap">
<view class="bg1">
</view>
<view class="page-body">
<view class="card1">
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
};
}
}
</script>
<style lang="scss">
.page-wrap{
min-height: 100vh;
}
.bg1{
width: 100vw;
height: 200rpx;
background-color: #6892FB;
}
.page-body{
position: relative;
bottom: 40rpx;
}
.card1{
background-color: #FFFFFf;
box-shadow: 0 10rpx 20rpx rgba(0,0,0,.15);
width: 620rpx;
height: 400rpx;
margin: 0 auto;
border-radius: 10rpx;
}
</style>