|
@@ -919,6 +919,9 @@
|
|
showTop:false,
|
|
showTop:false,
|
|
showTopImg:"",
|
|
showTopImg:"",
|
|
showTopIndex: 0,
|
|
showTopIndex: 0,
|
|
|
|
+ userChargingAmountObj:{
|
|
|
|
+
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad(op) {
|
|
onLoad(op) {
|
|
@@ -1562,6 +1565,34 @@
|
|
phoneNumber: this.consumerPhone //仅为示例
|
|
phoneNumber: this.consumerPhone //仅为示例
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ userChargingAmount(){
|
|
|
|
+
|
|
|
|
+ API_index.userChargingAmount().then((res) => {
|
|
|
|
+ this.userChargingAmountObj = res.data
|
|
|
|
+ //this.userChargingAmountObj.type=3
|
|
|
|
+ this.showChargingTag = true;
|
|
|
|
+ this.chargingTagUrl = "/pages/temporary/activity20250501"
|
|
|
|
+ this.chargingTag = ""
|
|
|
|
+
|
|
|
|
+ var text=``
|
|
|
|
+
|
|
|
|
+ if(this.userChargingAmountObj.type==1){
|
|
|
|
+ text="新用户参与充值送折扣卡活动推荐充值<span class='chargingTag' >1000元</span>,预计可省 <span class='chargingTag'> 133元</span>"
|
|
|
|
+ }
|
|
|
|
+ if(this.userChargingAmountObj.type==2){
|
|
|
|
+ text=`按您每月充电花费,半年将超<span class='chargingTag'>${this.userChargingAmountObj.money}元</span>,参与充值送折扣卡活动推荐充值 <span class='chargingTag'>${this.userChargingAmountMethod(this.userChargingAmountObj).num1}元</span>,预计可省 <span class='chargingTag'>${this.userChargingAmountMethod(this.userChargingAmountObj).num3}元</span>。`
|
|
|
|
+ }
|
|
|
|
+ if(this.userChargingAmountObj.type==3){
|
|
|
|
+ text=`近半年您已花费<span class='chargingTag'>${this.userChargingAmountObj.money}元</span>充电,参与充值送折扣卡活动推荐充值 <span class='chargingTag'> ${this.userChargingAmountMethod(this.userChargingAmountObj).num1}元</span>,预计可省 <span class='chargingTag'>${this.userChargingAmountMethod(this.userChargingAmountObj).num3}元</span>。`
|
|
|
|
+ }
|
|
|
|
+ console.log(text)
|
|
|
|
+ this.chargingTag = text
|
|
|
|
+
|
|
|
|
+ }).catch(error => {
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ },
|
|
getInfo() {
|
|
getInfo() {
|
|
// uni.showLoading({
|
|
// uni.showLoading({
|
|
// title: "加载中",
|
|
// title: "加载中",
|
|
@@ -1577,9 +1608,24 @@
|
|
id: this.id,
|
|
id: this.id,
|
|
chargingKwh: electricQuantity
|
|
chargingKwh: electricQuantity
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
- this.showChargingTag = res.data.showChargingTag
|
|
|
|
- this.chargingTagUrl = res.data.chargingTagUrl
|
|
|
|
- this.chargingTag = res.data.chargingTag
|
|
|
|
|
|
+ if(this.userChargingAmountObj.type){
|
|
|
|
+
|
|
|
|
+ }else{
|
|
|
|
+
|
|
|
|
+ if(!this.userCardBool&&this.personInfo.userType==2){
|
|
|
|
+
|
|
|
|
+ this.userChargingAmount()
|
|
|
|
+ }else{
|
|
|
|
+ this.showChargingTag = res.data.showChargingTag
|
|
|
|
+ this.chargingTagUrl = res.data.chargingTagUrl
|
|
|
|
+ this.chargingTag = res.data.chargingTag
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
if(this.chargingRecord&&this.chargingRecord.status==1&&res.data.chargingRecord.status==2){
|
|
if(this.chargingRecord&&this.chargingRecord.status==1&&res.data.chargingRecord.status==2){
|
|
this.lotteryApi(true)
|
|
this.lotteryApi(true)
|
|
}
|
|
}
|