|
|
|
@ -53,8 +53,14 @@ |
|
|
|
|
<view class='state'>{{item.type}}</view> |
|
|
|
|
<view>{{item.create_time}}</view> |
|
|
|
|
</view> |
|
|
|
|
<view class='num p-color' v-if="item.status==1">+{{item.count}}</view> |
|
|
|
|
<view class='num' v-else>-{{item.count}}</view> |
|
|
|
|
<view> |
|
|
|
|
|
|
|
|
|
<view style="margin-bottom:10rpx;color:#116636"> |
|
|
|
|
{{getLable(item.status)}} |
|
|
|
|
</view> |
|
|
|
|
<view class='num p-color' v-if="item.count.indexOf('-')==-1">{{item.count}}</view> |
|
|
|
|
<view class='num' v-if="item.count.indexOf('-')!=-1">{{item.count}}</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<view class='loadingicon acea-row row-center-wrapper' v-if="integralList.length>0"> |
|
|
|
|
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}} |
|
|
|
@ -111,7 +117,7 @@ |
|
|
|
|
></u--input> |
|
|
|
|
<view class="popTitle" style="margin-top: 15px;display: flex;justify-content: space-between;"> |
|
|
|
|
<text>需支付积分</text> |
|
|
|
|
<text>{{consumeToShareNum?Math.ceil((consumeToShareNum*consumeToShare)):0}}</text> |
|
|
|
|
<text>{{consumeToShareNum?(consumeToShareNum*consumeToShare).toFixed(2):0}}</text> |
|
|
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
@ -182,7 +188,15 @@ |
|
|
|
|
consume_frozen:0, |
|
|
|
|
show1:false, |
|
|
|
|
consumeToShare:1, |
|
|
|
|
consumeToShareNum:0 |
|
|
|
|
consumeToShareNum:0, |
|
|
|
|
statusList:[ |
|
|
|
|
|
|
|
|
|
{key:0,value:'获取冻结'}, |
|
|
|
|
{key:1,value:'获取成功'}, |
|
|
|
|
{key:2,value:'退款'}, |
|
|
|
|
{key:3,value:'支付'}, |
|
|
|
|
|
|
|
|
|
] |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
computed: mapGetters(['isLogin','viewColor']), |
|
|
|
@ -206,6 +220,16 @@ |
|
|
|
|
this.getIntegralList(); |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
getLable(val){ |
|
|
|
|
let arr = this.statusList.filter(item=>{ |
|
|
|
|
return item.key==val |
|
|
|
|
}) |
|
|
|
|
if(arr.length>0){ |
|
|
|
|
return arr[0].value |
|
|
|
|
}else{ |
|
|
|
|
return '-' |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
changeConsume(){ |
|
|
|
|
if(this.consumeToShareNum==0){ |
|
|
|
|
uni.showToast({ |
|
|
|
@ -214,7 +238,7 @@ |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if(Math.ceil((this.consumeToShareNum*this.consumeToShare))>this.consume){ |
|
|
|
|
if((this.consumeToShareNum*this.consumeToShare).toFixed(2)>this.consume){ |
|
|
|
|
uni.showToast({ |
|
|
|
|
title: '积分不足', |
|
|
|
|
icon:'none' |
|
|
|
@ -223,10 +247,8 @@ |
|
|
|
|
} |
|
|
|
|
jifenToShare({count:this.consumeToShareNum}).then(res=>{ |
|
|
|
|
|
|
|
|
|
if(res.status==200){ |
|
|
|
|
this.getUserInfo() |
|
|
|
|
this.show1 = false; |
|
|
|
|
} |
|
|
|
|
}).catch(res => { |
|
|
|
|
this.$util.Tips({ |
|
|
|
|
title: res |
|
|
|
@ -244,20 +266,21 @@ |
|
|
|
|
authColse: function(e) { |
|
|
|
|
this.isShowAuth = e |
|
|
|
|
}, |
|
|
|
|
getUserInfo: function() { |
|
|
|
|
getUserInfo() { |
|
|
|
|
let that = this; |
|
|
|
|
getUserInfo().then((res)=>{ |
|
|
|
|
this.consume = res.data.assets.consume |
|
|
|
|
this.consume_frozen = res.data.assets.consume_frozen |
|
|
|
|
getIntegralInfo().then(function(res) { |
|
|
|
|
that.$set(that,'userInfo',res.data); |
|
|
|
|
that.getIntegralList() |
|
|
|
|
}).catch(res => { |
|
|
|
|
this.integral_status = false |
|
|
|
|
return that.$util.Tips({ |
|
|
|
|
title: res |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
this.consume_frozen = res.data.assets.consume_frozen; |
|
|
|
|
this.getIntegralList() |
|
|
|
|
// getIntegralInfo().then(function(res) { |
|
|
|
|
// that.$set(that,'userInfo',res.data); |
|
|
|
|
// that.getIntegralList() |
|
|
|
|
// }).catch(res => { |
|
|
|
|
// this.integral_status = false |
|
|
|
|
// return that.$util.Tips({ |
|
|
|
|
// title: res |
|
|
|
|
// }); |
|
|
|
|
// }); |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
@ -271,7 +294,7 @@ |
|
|
|
|
/** |
|
|
|
|
* 获取积分明细 |
|
|
|
|
*/ |
|
|
|
|
getIntegralList: function() { |
|
|
|
|
getIntegralList() { |
|
|
|
|
let that = this; |
|
|
|
|
if (that.loading) return; |
|
|
|
|
if (that.loadend) return; |
|
|
|
|