添加:豆豆积分明细记录
This commit is contained in:
parent
8b690aa555
commit
fe4b7f6e01
|
|
@ -0,0 +1,15 @@
|
|||
import request from "@/utils/request.js";
|
||||
// 获取统计
|
||||
export function getLegumesStatistics(){
|
||||
return request.get('platformCommission/statistics');
|
||||
}
|
||||
// 获取列表
|
||||
export function getLegumesLog(data) {
|
||||
return request.get('platformCommission/record_list',data);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -588,6 +588,12 @@
|
|||
"style": {
|
||||
"navigationBarTitleText": "店铺资质信息"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "platformCommission/integralRecord/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "积分明细"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -0,0 +1,233 @@
|
|||
<template>
|
||||
<view class="page-wrapper integral-record" :style="viewColor">
|
||||
<!--统计信息-->
|
||||
<view class="statistics">
|
||||
<view class="statistics-content">
|
||||
<view class="statistics-block" v-for="(item,index) in statistics_list" :key="index">
|
||||
<view class="statistics-num">{{ item.value }}</view>
|
||||
<view class="statistics-title">{{ item.title }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!--列表记录-->
|
||||
<view class="integral-list" v-if="Object.keys(list).length > 0">
|
||||
<view class="integral-content">
|
||||
<view class="block" v-for="(item,index) in list" :key="index">
|
||||
<view class="left-content">
|
||||
<view class="left-top">
|
||||
购物赠送
|
||||
<view class="left-tag left-tag-released" v-if="item.status == 1">已释放</view>
|
||||
<view class="left-tag left-tag-invalid" v-else-if="item.status == 2">已失效</view>
|
||||
<view class="left-tag left-tag-frozen" v-else>冻结中</view>
|
||||
</view>
|
||||
<view class="left-bottom">
|
||||
<view class="time">{{ item.create_time }}</view>
|
||||
<view class="legumes">赠送豆:{{ (item.get_legumes - item.refund_get_legumes).toFixed(2) }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right-content">
|
||||
<view :class="[{'frozen': (item.status == 0),'released': (item.status == 1),'invalid': (item.status == 2)}]">+{{ item.get_integral }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<emptyPage v-else title="暂无记录~"></emptyPage>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import emptyPage from '@/components/emptyPage.vue'
|
||||
import { mapGetters } from "vuex";
|
||||
import { getLegumesLog,getLegumesStatistics } from "@/api/platformCommission";
|
||||
export default{
|
||||
components:{
|
||||
emptyPage
|
||||
},
|
||||
computed: mapGetters(['isLogin','uid','viewColor']),
|
||||
data(){
|
||||
return {
|
||||
statistics_list: {},
|
||||
list: [],
|
||||
searchData: {
|
||||
page: 1,
|
||||
limit: 20
|
||||
},
|
||||
total_page: 0,
|
||||
allow_page: false,
|
||||
}
|
||||
},
|
||||
onLoad(options){
|
||||
this.getStatistics();
|
||||
this.getList();
|
||||
},
|
||||
onShow() {},
|
||||
methods:{
|
||||
// 统计获取
|
||||
getStatistics(){
|
||||
let _this = this;
|
||||
getLegumesStatistics().then(res => {
|
||||
this.statistics_list = res.data || {};
|
||||
});
|
||||
},
|
||||
// 列表获取
|
||||
getList(){
|
||||
let _this = this
|
||||
getLegumesLog(_this.searchData).then(res => {
|
||||
if(res.status === 200){
|
||||
if(_this.searchData.page == 1){
|
||||
_this.list = res.data.list;
|
||||
}else{
|
||||
_this.list = _this.list.concat(res.data.list);
|
||||
}
|
||||
_this.total_page = Math.ceil(res.data.count / _this.searchData.limit);
|
||||
}
|
||||
_this.allow_page = true;
|
||||
})
|
||||
},
|
||||
},
|
||||
// 触底监听
|
||||
onReachBottom() {
|
||||
if(this.searchData.page < this.total_page && this.allow_page){
|
||||
this.searchData.page = this.searchData.page + 1;
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
// 滚动监听
|
||||
onPageScroll(e) {},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.integral-record{
|
||||
width: 100vw!important;
|
||||
min-height: 100vh!important;
|
||||
background: #f6f6f6;
|
||||
|
||||
// 统计信息
|
||||
.statistics{
|
||||
padding: 20rpx;
|
||||
|
||||
.statistics-content{
|
||||
width: 100%;
|
||||
background: #ffffff;
|
||||
border-radius: 15rpx;
|
||||
padding: 20rpx;
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
align-content: center;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
box-shadow: 0px 0px 5px 1px #0015295e;
|
||||
.statistics-block{
|
||||
width: calc(100% / 3);
|
||||
height: 130rpx!important;
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
.statistics-num{
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
}
|
||||
.statistics-title{
|
||||
font-size: 26rpx;
|
||||
color: #909399;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 信息列表
|
||||
.integral-list{
|
||||
.integral-content{
|
||||
width: 100%;
|
||||
background: #ffffff;
|
||||
padding: 0 20rpx;
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: nowrap;
|
||||
.block {
|
||||
width: 100%;
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx 0;
|
||||
.left-content {
|
||||
width: calc(100% - 200rpx);
|
||||
|
||||
.left-top {
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
color: #222427;
|
||||
.left-tag {
|
||||
font-size: 24rpx;
|
||||
font-weight: unset;
|
||||
margin-left: 20rpx;
|
||||
padding: 5rpx 15rpx;
|
||||
border-radius: 5rpx;
|
||||
}
|
||||
.left-tag-frozen{
|
||||
background: #fceaea;
|
||||
color: #fe4e4d;
|
||||
}
|
||||
.left-tag-released{
|
||||
background: #eafbeb;
|
||||
color: #5fc161;
|
||||
}
|
||||
.left-tag-invalid{
|
||||
background: #e2e2e2;
|
||||
color: #6d6d6d;
|
||||
}
|
||||
}
|
||||
|
||||
.left-bottom {
|
||||
display: inline-flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
font-size: 26rpx;
|
||||
color: #b1b1b1;
|
||||
.time {
|
||||
width: 300rpx;
|
||||
}
|
||||
.legumes {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.right-content {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
width: 180rpx;
|
||||
text-align: right;
|
||||
.released{
|
||||
color: #5fc161;
|
||||
}
|
||||
.invalid{
|
||||
color: #6d6d6d;
|
||||
}
|
||||
.frozen{
|
||||
color: #fe4e4d;
|
||||
}
|
||||
}
|
||||
}
|
||||
.block:not(:last-child){
|
||||
border-bottom: 2rpx solid #f6f6f6;//#f6f6f6
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
|
@ -72,7 +72,7 @@
|
|||
<text class="num">{{userInfo.total_visit_product || 0}}</text>
|
||||
<view class="txt">浏览记录</view>
|
||||
</view>
|
||||
<view class="num-item">
|
||||
<view class="num-item" @click="goMenuPage('/pages/store/platformCommission/integralRecord/index')">
|
||||
<text class="num">{{userInfo.legumes_integral || 0}}</text>
|
||||
<view class="txt">可用积分</view>
|
||||
</view>
|
||||
|
|
@ -574,6 +574,7 @@
|
|||
})
|
||||
},
|
||||
goMenuPage(url) {
|
||||
console.log(url)
|
||||
if (this.isLogin) {
|
||||
uni.navigateTo({
|
||||
url
|
||||
|
|
|
|||
Loading…
Reference in New Issue