From 65b658dac7f52548d513a013b1b3ebcbdac4a27b Mon Sep 17 00:00:00 2001
From: liudan <18634735655@163.com>
Date: Fri, 22 Mar 2024 15:52:54 +0800
Subject: [PATCH] 1
---
pages/huitong/huitongbao/index.vue | 47 ++++++++++----
pages/users/user_integral/index.vue | 65 +++++++++++++------
pages/users/user_integral1/fenhong.vue | 28 +++++++-
pages/users/user_integral1/index.vue | 32 ++++++++-
.../users/user_integral1/user_contribute.vue | 30 ++++++++-
5 files changed, 162 insertions(+), 40 deletions(-)
diff --git a/pages/huitong/huitongbao/index.vue b/pages/huitong/huitongbao/index.vue
index 3d2c3fb..5309a9e 100644
--- a/pages/huitong/huitongbao/index.vue
+++ b/pages/huitong/huitongbao/index.vue
@@ -64,8 +64,15 @@
{{item.type}}
{{item.create_time}}
- {{item.count}}
- {{item.count}}
+
+
+
+ {{getLable(item.status)}}
+
+ {{item.count}}
+ {{item.count}}
+
+
{{loadTitle}}
@@ -107,22 +114,22 @@
惠通宝:消费积分比值
- {{huitongToConsume}}:1
+ 1:{{huitongToConsume}}
- 兑换消费积分
+ 兑换惠通宝
- 需支付惠通宝
- {{huitongToConsumeNum?Math.ceil((huitongToConsumeNum*huitongToConsume)):0}}
+ 可兑换积分
+ {{huitongToConsumeNum?(huitongToConsumeNum*huitongToConsume).toFixed(2):0}}
@@ -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){
diff --git a/pages/users/user_integral/index.vue b/pages/users/user_integral/index.vue
index 5aa150f..8bb8e20 100644
--- a/pages/users/user_integral/index.vue
+++ b/pages/users/user_integral/index.vue
@@ -53,8 +53,14 @@
{{item.type}}
{{item.create_time}}
- +{{item.count}}
- -{{item.count}}
+
+
+
+ {{getLable(item.status)}}
+
+ {{item.count}}
+ {{item.count}}
+
{{loadTitle}}
@@ -111,7 +117,7 @@
>
需支付积分
- {{consumeToShareNum?Math.ceil((consumeToShareNum*consumeToShare)):0}}
+ {{consumeToShareNum?(consumeToShareNum*consumeToShare).toFixed(2):0}}
@@ -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;
- }
+ 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;
diff --git a/pages/users/user_integral1/fenhong.vue b/pages/users/user_integral1/fenhong.vue
index 72e9125..406604e 100644
--- a/pages/users/user_integral1/fenhong.vue
+++ b/pages/users/user_integral1/fenhong.vue
@@ -43,8 +43,14 @@
{{item.type}}
{{item.create_time}}
- +{{item.count}}
- -{{item.count}}
+
+
+
+ {{getLable(item.status)}}
+
+ {{item.count}}
+ {{item.count}}
+
{{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 '-'
+ }
+ },
/**
* 授权回调
*/
diff --git a/pages/users/user_integral1/index.vue b/pages/users/user_integral1/index.vue
index 4665084..e2a2f5c 100644
--- a/pages/users/user_integral1/index.vue
+++ b/pages/users/user_integral1/index.vue
@@ -47,8 +47,14 @@
{{item.type}}
{{item.create_time}}
- +{{item.count}}
- -{{item.count}}
+
+
+
+ {{getLable(item.status)}}
+
+ {{item.count}}
+ {{item.count}}
+
{{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 '-'
+ }
+ },
/**
* 授权回调
*/
diff --git a/pages/users/user_integral1/user_contribute.vue b/pages/users/user_integral1/user_contribute.vue
index 6f3beb4..3122f9d 100644
--- a/pages/users/user_integral1/user_contribute.vue
+++ b/pages/users/user_integral1/user_contribute.vue
@@ -47,8 +47,14 @@
{{item.type}}
{{item.create_time}}
- +{{item.count}}
- -{{item.count}}
+
+
+
+ {{getLable(item.status)}}
+
+ {{item.count}}
+ {{item.count}}
+
{{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 '-'
+ }
+ },
/**
* 授权回调
*/