|
@@ -3,7 +3,7 @@
|
|
|
<view class="main">
|
|
|
<view class="one">
|
|
|
<view class="one_1">
|
|
|
- <text>{{user.integral||0}}</text><text>分</text>
|
|
|
+ <text>{{integral||0}}</text><text>分</text>
|
|
|
</view>
|
|
|
<view class="one_2" style="display: none;">
|
|
|
<button type="default" size="mini">礼品兑换记录</button>
|
|
@@ -12,11 +12,16 @@
|
|
|
<view class="two">
|
|
|
<view class="two_1" v-if="list&&list.length>0">
|
|
|
<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
|
|
|
- <view class="list-scroll-view">
|
|
|
- <view class="list" v-for="(item, index) in list" :key="index">
|
|
|
-
|
|
|
+ <view class="list-scroll-view">
|
|
|
+ <view class="list" v-for="(item, index) in list" :key="index">
|
|
|
+ <view class="other">
|
|
|
+ <view class="other_1">积分: <text class="integral">{{item.point}}</text></view>
|
|
|
+ <view class="other_1">状态: <text>{{item.zhStatus}}</text></view>
|
|
|
+ <view class="other_1">来源: <text>{{item.zhSource}}</text></view>
|
|
|
+ <view class="other_1">时间: <text>{{item.time}}</text></view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
<view class="two_2" v-else>
|
|
@@ -32,6 +37,7 @@
|
|
|
data() {
|
|
|
return {
|
|
|
user: {},
|
|
|
+ integral: '',
|
|
|
list: [],
|
|
|
total: 0,
|
|
|
skip: 0,
|
|
@@ -75,9 +81,19 @@
|
|
|
})
|
|
|
if (res.errcode == '0') {
|
|
|
let list = [...that.list, ...res.data];
|
|
|
+ for (let val of list) {
|
|
|
+ let status = that.statusList.find(i => i.value == val.status)
|
|
|
+ if (status) val.zhStatus = status.label;
|
|
|
+ let source = that.sourceList.find(i => i.value == val.source)
|
|
|
+ if (source) val.zhSource = source.label;
|
|
|
+ }
|
|
|
that.$set(that, `list`, list);
|
|
|
that.$set(that, `total`, res.total)
|
|
|
}
|
|
|
+ let arr = await that.$api(`/point/computedTotal`, 'GET', {
|
|
|
+ customer: user._id
|
|
|
+ })
|
|
|
+ if (arr.errcode == '0') that.$set(that, `integral`, arr.data);
|
|
|
}
|
|
|
},
|
|
|
// 查询其他信息
|
|
@@ -166,6 +182,37 @@
|
|
|
}
|
|
|
|
|
|
.two {
|
|
|
+ position: relative;
|
|
|
+ flex-grow: 1;
|
|
|
+ padding: 2vw 0 0 0;
|
|
|
+
|
|
|
+ .two_1 {
|
|
|
+ .list {
|
|
|
+ width: 92vw;
|
|
|
+ border: 0.5vw solid var(--f1Color);
|
|
|
+ margin: 2vw 2vw 0 1.5vw;
|
|
|
+ padding: 2vw;
|
|
|
+ border-radius: 5px;
|
|
|
+
|
|
|
+ .other {
|
|
|
+ .other_1 {
|
|
|
+ font-size: var(--font16Size);
|
|
|
+ margin: 0 0 1vw 0;
|
|
|
+
|
|
|
+ .integral {
|
|
|
+ color: #ff0000;
|
|
|
+ }
|
|
|
+
|
|
|
+ text {
|
|
|
+ margin: 0 0 0 2vw;
|
|
|
+ color: var(--f85Color);
|
|
|
+ font-size: var(--font14Size);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.two_2 {
|
|
|
text-align: center;
|
|
|
color: #858585;
|