liudan 10 months ago
parent d0e50174fd
commit 65b658dac7
  1. 43
      pages/huitong/huitongbao/index.vue
  2. 61
      pages/users/user_integral/index.vue
  3. 28
      pages/users/user_integral1/fenhong.vue
  4. 32
      pages/users/user_integral1/index.vue
  5. 30
      pages/users/user_integral1/user_contribute.vue

@ -64,9 +64,16 @@
<view class='state'>{{item.type}}</view>
<view>{{item.create_time}}</view>
</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}}
</view>
@ -107,22 +114,22 @@
<view class="popContent">
<view class="popTitle" style="display: flex;justify-content: space-between;">
<text>惠通宝:消费积分比值</text>
<text>{{huitongToConsume}}:1</text>
<text>1:{{huitongToConsume}}</text>
</view>
<view class="popTitle" style="margin-top:29rpx;">
兑换消费积分
兑换惠通宝
</view>
<u--input
placeholder="请输入兑换消费积分"
placeholder="请输入惠通宝个数"
border="surround"
type="number"
v-model="huitongToConsumeNum"
></u--input>
<view class="popTitle" style="margin-top: 15px;display: flex;justify-content: space-between;">
<text>需支付惠通宝</text>
<text>{{huitongToConsumeNum?Math.ceil((huitongToConsumeNum*huitongToConsume)):0}}</text>
<text>可兑换积分</text>
<text>{{huitongToConsumeNum?(huitongToConsumeNum*huitongToConsume).toFixed(2):0}}</text>
</view>
@ -244,7 +251,15 @@
type:'huitong',
},
huitongToConsume:1,
huitongToConsumeNum:0
huitongToConsumeNum:0,
statusList:[
{key:0,value:'获取冻结'},
{key:1,value:'获取成功'},
{key:2,value:'退款'},
{key:3,value:'支付'},
]
};
},
computed: mapGetters(['isLogin','viewColor']),
@ -269,6 +284,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.huitongToConsumeNum==0){
uni.showToast({
@ -277,14 +302,14 @@
});
return;
}
if(Math.ceil((this.huitongToConsumeNum*this.huitongToConsume))>this.huitong){
if(this.huitongToConsumeNum>this.huitong){
uni.showToast({
title: '惠通宝不足',
icon:'none'
});
return;
}
huitongToConsume({count:this.huitongToConsumeNum}).then(res=>{
huitongToConsume({count:this.huitongToConsumeNum.toFixed(2)}).then(res=>{
if(res.status==200){
this.getUserInfo()
@ -335,7 +360,7 @@
});
return;
}
this.zhuanrang.count = this.zhuanrang.count.toFixed(2)
changeHuitong(this.zhuanrang).then(res=>{
if(res.status==200){

@ -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;

@ -43,8 +43,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}}
@ -139,6 +145,14 @@
},
integral_status: true,
share_point:0,
statusList:[
{key:0,value:'获取冻结'},
{key:1,value:'获取成功'},
{key:2,value:'退款'},
{key:3,value:'支付'},
]
};
},
computed: mapGetters(['isLogin','viewColor']),
@ -159,6 +173,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 '-'
}
},
/**
* 授权回调
*/

@ -47,8 +47,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}}
@ -143,7 +149,15 @@
},
integral_status: true,
welfare:0,
welfare_frozen:0
welfare_frozen:0,
statusList:[
{key:0,value:'获取冻结'},
{key:1,value:'获取成功'},
{key:2,value:'退款'},
{key:3,value:'支付'},
]
};
},
computed: mapGetters(['isLogin','viewColor']),
@ -164,6 +178,18 @@
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 '-'
}
},
/**
* 授权回调
*/

@ -47,8 +47,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}}
@ -143,7 +149,15 @@
},
integral_status: true,
contribution:0,
contribution_frozen:0
contribution_frozen:0,
statusList:[
{key:0,value:'获取冻结'},
{key:1,value:'获取成功'},
{key:2,value:'退款'},
{key:3,value:'支付'},
]
};
},
computed: mapGetters(['isLogin','viewColor']),
@ -164,6 +178,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 '-'
}
},
/**
* 授权回调
*/

Loading…
Cancel
Save