Forráskód Böngészése

修改充电中小贴士, 充值、快速充值营销冒泡

zhengkaixin 1 hónapja
szülő
commit
e535fb65e9

+ 49 - 3
pages/searchPile/chargeProcess/dcCharging.vue

@@ -919,6 +919,9 @@
 				showTop:false,
 				showTopImg:"",
 				showTopIndex: 0,
+				userChargingAmountObj:{
+					
+				}
 			}
 		},
 		onLoad(op) {
@@ -1562,6 +1565,34 @@
 					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() {
 				// uni.showLoading({
 				// 	title: "加载中",
@@ -1577,9 +1608,24 @@
 					id: this.id,
 					chargingKwh: electricQuantity
 				}).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){
 						this.lotteryApi(true)
 					}

+ 1 - 1
pages/user/finance/recharge.vue

@@ -24,7 +24,7 @@
 
 					</template>
 					<template v-else-if="userChargingAmountObj.type==2">
-						按您每月充电花费,半年将超<span>{{userChargingAmountObj.money}}元</span>,参与充值送折扣卡活动推荐充值 <span>500元</span>,预计可省 <span>42.8元</span>。
+						按您每月充电花费,半年将超<span>{{userChargingAmountObj.money}}元</span>,参与充值送折扣卡活动推荐充值 <span>{{userChargingAmountMethod(userChargingAmountObj).num1}}元</span>,预计可省 <span>{{userChargingAmountMethod(userChargingAmountObj).num3}}元</span>。
 
 					</template>
 					<template v-else>