dt积分冻结模块处理重置签到处理等接口

This commit is contained in:
2022-07-05 17:21:45 +08:00
parent 9021940563
commit ef25cef8fb
8 changed files with 373 additions and 62 deletions

View File

@@ -5,15 +5,31 @@
<view class="title">DT积分余额</view>
<view class="num">{{score}}</view>
</view>
</view>
<view class="dt-header1">
<view class="dt-header-number">
<view class="title" @click="frozenInfo(description)">
DT积分冻结
<image src="/static/rank/help.png" style="width: 30rpx;" mode="widthFix" />
</view>
<view class="num">{{frozenScore}}</view>
</view>
<button class="transfer" size="mini" @click="onTransfer('AccountRecharge')">充值</button>
<button class="transfer" size="mini" @click="onTransfer('AccountTransfer')">转账</button>
</view>
<block v-if="logs.length > 0">
<view class="logs-title">账户记录</view>
<view class="logs-item" v-for="(item,index) in logs" :key="index">
<view class="logs-item-title">{{item.remark}}</view>
<view class="logs-item" v-for="(item,index) in logs" :key="index" @click="frozenInfo(item.description)">
<view class="logs-item-title">
{{item.remark}}
<image v-if ="item.description!== ''" src="/static/rank/help3.png" mode="widthFix" />
</view>
<view class="logs-item-time">{{item.created_at}}</view>
<view class="logs-item-price" :class="item.amount > 0 ? 'add': 'remove'">{{item.amount}}</view>
<view class="logs-item-price" :class="item.amount > 0 ? 'add': 'remove'">
{{item.amount}}
<view v-if="item.frozen.value === 1"> {{item.frozen.value === 1?'冻结中':item.frozen.text}}</view>
</view>
</view>
</block>
<block v-else>
@@ -33,9 +49,11 @@
data() {
return {
score: '0.00',
frozenScore: '0.00',
logs: [],
page: 1,
has_more: true,
has_more: true,
description:'',
};
},
onShow() {
@@ -60,8 +78,10 @@
this.logs = [];
}
this.score = res.score;
this.logs = this.logs.concat(res.lists.data);
this.has_more = res.lists.page.has_more;
this.frozenScore = res.frozenScore;
this.logs = this.logs.concat(res.lists.data);
this.description = res.description;
this.has_more = res.lists.page.has_more;
uni.stopPullDownRefresh();
}).catch(err => {
uni.showToast({
@@ -75,7 +95,19 @@
this.$Router.push({
name
})
}
},
frozenInfo(description){
if(description!== ''){
uni.showModal({
title:'温馨提示',
content:description,
showCancel:false,
confirmColor:"#34ce98",
confirmText:' 知道了'
})
}
},
},
onNavigationBarButtonTap() {
this.$Router.push({
@@ -99,7 +131,7 @@
justify-content: space-between;
flex-direction: row;
background: $main-color;
padding: $padding*3 $padding $padding*2;
padding: $padding*2 $padding 0;
align-items: center;
.dt-header-number {
@@ -137,6 +169,56 @@
}
}
.dt-header1 {
display: flex;
justify-content: space-between;
flex-direction: row;
background: $main-color;
padding: $padding $padding $padding*2;
align-items: center;
.dt-header-number {
width: calc(100% - 330rpx);
.title {
color: rgba(255, 255, 255, .9);
font-size: 28rpx;
@extend .nowrap;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
image{
padding-left: 4rpx;
}
}
.num {
font-weight: bold;
font-size: 40rpx;
color: white;
@extend .nowrap;
}
}
.transfer[size="mini"] {
width: 160rpx;
height: 70rpx;
border-radius: 40rpx;
line-height: 70rpx;
background: white;
font-size: 30rpx;
color: $main-color;
margin: 0;
font-weight: bold;
&::after {
display: none;
}
}
}
// 账户记录
.logs-title {
padding: 0 $padding;
@@ -158,11 +240,20 @@
.logs-item-title {
font-weight: bold;
font-size: 30rpx;
line-height: 50rpx;
line-height: 50rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
image{
width: 30rpx;
padding-left: 4rpx;
}
}
.logs-item-time {
font-size: 28rpx;
font-size: 26rpx;
line-height: 40rpx;
color: gray;
}
@@ -175,6 +266,7 @@
width: 180rpx;
text-align: right;
font-weight: bold;
font-size: 30rpx;
@extend .nowrap;
&.add {
@@ -184,6 +276,15 @@
&.remove {
color: $text-price;
}
view {
position: absolute;
top: $padding+4;
right: 0;
color: #999;
font-size: 22rpx;
font-weight: normal;
}
}
}
}