浏览代码

充值设置

zhengkaixin 1 月之前
父节点
当前提交
ec2c1f0909
共有 2 个文件被更改,包括 187 次插入25 次删除
  1. 179 18
      pages/searchPile/chargeProcess/charge.vue
  2. 8 7
      pages/user/finance/recharge.vue

+ 179 - 18
pages/searchPile/chargeProcess/charge.vue

@@ -399,7 +399,7 @@
 		<template>
 		<template>
 			<view>
 			<view>
 				<u-popup v-model="show" mode="bottom">
 				<u-popup v-model="show" mode="bottom">
-					<view class="recharge" style="padding-bottom: 0;">
+					<view class="recharge recharge2" style="padding-bottom: 0;">
 						<view class="title lefttitle ">选择充值金额
 						<view class="title lefttitle ">选择充值金额
 							<span class=" rightspan">当前余额
 							<span class=" rightspan">当前余额
 								<span style="color: red;">{{user.balance>0?user.balance.toFixed(2):'0.00'}}元</span>
 								<span style="color: red;">{{user.balance>0?user.balance.toFixed(2):'0.00'}}元</span>
@@ -411,17 +411,28 @@
 
 
 						<view class="rechargeMain">
 						<view class="rechargeMain">
 							<view class="recharge-item"
 							<view class="recharge-item"
-								:class="!otherNum_f&&moneyActiveClass_f == item.id ? 'active' : ''"
+								:class="{
+									active:otherNum_f==item.rechargeAmount||moneyActiveClass_f == item.id ,
+									'recharge-item-rk':item.amountRemark
+								}"
 								v-for="(item,index) in moneyList_f" :key="item.id" @click="moneyClick_f(item.id,item)">
 								v-for="(item,index) in moneyList_f" :key="item.id" @click="moneyClick_f(item.id,item)">
 								{{item.amountDesc?item.amountDesc:item.rechargeAmount+'元'}}
 								{{item.amountDesc?item.amountDesc:item.rechargeAmount+'元'}}
-								<view class="amount" v-if="item.amountRemark">{{item.amountRemark}}</view>
+								
+								<view class="item-rk" v-if="item.amountRemark">送<span class="item-rk-span" >{{item.amountRemarkNum}}</span>{{item.amountRemarkHtml}}</view>
+								
 							</view>
 							</view>
+							
+							<p  style="   font-size: 14px;" v-show="selectItem.amountRemark">
+								充值满
+								<span style="color: red;">{{selectItem.amountDesc}}</span>立送服务费<span style="color: red;">{{selectItem.amountRemarkNum}}折半年卡</span>1张(<span style="color: red;">有效期180天,不限充电度数</span>)1<span v-if="selectItem.amountRemarkSf">和{{selectItem.amountRemarkSf}}身份</span>,活动所充金额仅用于支付本平台充电费用(含电费和服务费),不可转赠、提现、退款,
+								<span style="color: #ff8600;margin-left: 16px;" @click="gotoUrl('pages/temporary/activity20250501?source=99')">点击查看活动详情</span>
+							</p>
 
 
 						</view>
 						</view>
 						<p class="oldTextjp2" oldstyle="font-size:16px">其他充值金额</p>
 						<p class="oldTextjp2" oldstyle="font-size:16px">其他充值金额</p>
 						<view style="margin-bottom: 32px;">
 						<view style="margin-bottom: 32px;">
 
 
-							<view :class="otherNum_f? 'active' : ''" class="recharge-input self-stop"
+							<view :class="otherNum_f&&selectItem.rechargeAmount!=otherNum_f? 'active' : ''" class="recharge-input self-stop"
 								style="height: 100%;width: 100%;margin-bottom: 8px;">
 								style="height: 100%;width: 100%;margin-bottom: 8px;">
 								<ujp-input v-model="otherNum_f" @input="ckInput_f" @focus="focus" type="digit"
 								<ujp-input v-model="otherNum_f" @input="ckInput_f" @focus="focus" type="digit"
 									:border="true" />
 									:border="true" />
@@ -822,8 +833,8 @@
 				} else {
 				} else {
 					this.show = true;
 					this.show = true;
 					this.recordId = '';
 					this.recordId = '';
-					this.otherNum_f = '';
-					this.fee = 0
+				//	this.otherNum_f = '';
+					//this.fee = 0
 				}
 				}
 
 
 			},
 			},
@@ -855,9 +866,11 @@
 				
 				
 
 
 			},
 			},
-			moneyClick_f(index, item) {
-				this.otherNum_f = '';
-				this.moneyActiveClass_f = index;
+			moneyClick_f(id, item) {
+				
+				this.otherNum_f = item.rechargeAmount;
+				
+				this.moneyActiveClass_f = id;
 				if (item) {
 				if (item) {
 					this.selectItem = item;
 					this.selectItem = item;
 					// if(item.imgUrl){
 					// if(item.imgUrl){
@@ -895,10 +908,16 @@
 					})
 					})
 					return
 					return
 				}
 				}
-
+				if(!this.otherNum_f){
+					uni.showToast({
+						title:"请选择充值金额"
+					})
+					return
+				}
+				
 				this.submitForm_f = {};
 				this.submitForm_f = {};
 				var fee = 0;
 				var fee = 0;
-				if (!this.otherNum_f) {
+				if (this.moneyActiveClass_f) {
 					this.submitForm_f.chargingMarketingId = this.selectItem.id;
 					this.submitForm_f.chargingMarketingId = this.selectItem.id;
 					fee = this.selectItem.rechargeAmount
 					fee = this.selectItem.rechargeAmount
 				} else {
 				} else {
@@ -991,8 +1010,34 @@
 						this.selectItem = this.moneyList_f[0];
 						this.selectItem = this.moneyList_f[0];
 						this.moneyActiveClass_f = this.moneyList_f[0].id
 						this.moneyActiveClass_f = this.moneyList_f[0].id
 						//(this.moneyActiveClass)
 						//(this.moneyActiveClass)
+						
+						this.moneyClick_f( this.moneyList_f[0].id,this.moneyList_f[0])
+						
 					}
 					}
 
 
+					for(var i in this.moneyList_f){
+						var item =this.moneyList_f[i]
+						console.log(item.rechargeAmount)
+						if(item.rechargeAmount==100){
+							// this.selectItem = this.moneyList[i];
+							// this.moneyActiveClass = this.moneyList[i].id
+							this.moneyClick_f(item.id,item)
+						}
+						if(item.amountRemark){
+							item.amountRemarkNum=item.amountRemark.substring(1,item.amountRemark.indexOf('折'))
+							item.amountRemarkHtml=item.amountRemark.substring(item.amountRemark.indexOf('折'))
+							
+							if(item.amountRemark.indexOf('、')!=-1){
+								item.amountRemarkSf=item.amountRemark.substring(item.amountRemark.indexOf('、')+1)
+							}else{
+								item.amountRemarkSf=""
+							}
+							
+						}
+						
+					}
+
+
 					var list = res.data.priceList
 					var list = res.data.priceList
 					if (list.length) {
 					if (list.length) {
 						this.moneyListN = [];
 						this.moneyListN = [];
@@ -1086,18 +1131,26 @@
 					}
 					}
 				}
 				}
 				var t = Number(text);
 				var t = Number(text);
-				if (t < 1) {
-					this.$nextTick(() => {
-						this.otherNum_f = '';
-					})
+				// if (t < 1) {
+				// 	this.$nextTick(() => {
+				// 		this.otherNum_f = '';
+				// 	})
 
 
-				}
+				// }
 				if (t > 500) {
 				if (t > 500) {
 					this.$nextTick(() => {
 					this.$nextTick(() => {
 						this.otherNum_f = 500;
 						this.otherNum_f = 500;
 					})
 					})
 
 
 				}
 				}
+				
+				this.moneyActiveClass_f=''
+				for(var i in this.moneyList_f){
+					var item=this.moneyList_f[i]
+					if(this.otherNum_f==item.rechargeAmount){
+						this.moneyClick_f(item.id,item)
+					}
+				}
 
 
 			},
 			},
 			ckInput(text) {
 			ckInput(text) {
@@ -1613,11 +1666,13 @@
 
 
 				/*				font-size: 16px;*/
 				/*				font-size: 16px;*/
 			}
 			}
+			 
 
 
 			.active {
 			.active {
 				background-color: #EFFFF7;
 				background-color: #EFFFF7;
 				border-color: #00B962;
 				border-color: #00B962;
 				color: #00B962;
 				color: #00B962;
+				 
 			}
 			}
 		}
 		}
 
 
@@ -1630,8 +1685,8 @@
 
 
 			@include themeify {
 			@include themeify {
 				font-size: themed('font-size3');
 				font-size: themed('font-size3');
-				height: themed('font-size19');
-				line-height: themed('font-size19')
+				// height: themed('font-size19');
+				// line-height: themed('font-size19')
 			}
 			}
 
 
 			/*			font-size: 16px;*/
 			/*			font-size: 16px;*/
@@ -1642,6 +1697,112 @@
 		}
 		}
 	}
 	}
 
 
+
+
+.recharge2 {
+		padding: 32rpx;
+		padding-bottom: 250rpx;
+
+		.title {
+			@include themeify {
+				font-size: themed('font-size3');
+			}
+
+			/*			font-size: 16px;*/
+			position: relative;
+		}
+
+		p {
+			color: #666;
+			margin-top: 4px;
+		}
+
+		.self-stop.active {
+
+			background-color: #EFFFF7;
+			border-color: #00B962;
+			color: #00B962;
+
+		}
+
+		.rechargeMain {
+			display: flex;
+			flex-wrap: wrap;
+			// justify-content: space-between;
+			margin-top: 24rpx;
+			margin-bottom: 10rpx;
+
+			.recharge-item {
+				.u-input {
+					text-align: center !important;
+				}
+
+				width: 23%;
+				border: 1px solid #e3e3e3;
+				padding: 20rpx 0;
+				border-radius: 4px;
+				text-align: center;
+				margin-bottom: 20rpx;
+				position: relative;
+				margin-left: 10rpx;
+
+				@include themeify {
+					font-size: themed('font-size3');
+				}
+
+				/*				font-size: 16px;*/
+			}
+			.recharge-item-rk{
+				width: 48%;
+				padding-bottom: 0;
+				padding-top: 10rpx;
+				.item-rk{
+					margin-top: 10rpx;
+					padding: 8rpx 0;
+					background-color: rgba(232, 232, 232, 1);
+					color: rgba(51, 51, 51, 1);
+					font-size: 24rpx;
+				}
+				.item-rk-span{
+					margin:0 4px ;
+					color: #ec4530;
+				}
+			}
+
+			.active {
+				background-color: #EFFFF7;
+				border-color: #00B962;
+				color: #00B962;
+				.item-rk{
+					background-color: #53B56B;
+					color: #fff;
+				}
+				.item-rk-span{
+					color: #fff;
+				}
+			}
+		}
+
+		.self-stop {
+			width: 105px;
+			/*			height: 48px;
+			line-height: 48px;*/
+			border-radius: 4px;
+			color: #101010;
+
+			@include themeify {
+				font-size: themed('font-size3');
+				// height: themed('font-size19');
+				// line-height: themed('font-size19')
+			}
+
+			/*			font-size: 16px;*/
+			text-align: center;
+			font-family: Arial;
+			border: 1px solid rgba(227, 227, 227, 100);
+			margin-top: 12px;
+		}
+	}
 	.recharge-input {
 	.recharge-input {
 		margin-top: 8px;
 		margin-top: 8px;
 		margin-bottom: 32px;
 		margin-bottom: 32px;

+ 8 - 7
pages/user/finance/recharge.vue

@@ -499,19 +499,20 @@
 					})
 					})
 					return
 					return
 				}
 				}
+				if(!this.otherNum){
+					uni.showToast({
+						title:"请选择充值金额"
+					})
+					return
+				}
 				uni.showLoading({
 				uni.showLoading({
 					title: "加载中",
 					title: "加载中",
 					mask: true,
 					mask: true,
 				})
 				})
 				this.submitForm={};
 				this.submitForm={};
-				if(!this.otherNum){
-					uni.showToast({
-						title:"请选择充值金额"
-					})
-					return
-				}
+				
 				
 				
-				if(!this.otherNum){
+				if(this.moneyActiveClass){
 					this.submitForm.chargingMarketingId=this.selectItem.id;
 					this.submitForm.chargingMarketingId=this.selectItem.id;
 				}else{
 				}else{
 					this.submitForm.amount=this.otherNum
 					this.submitForm.amount=this.otherNum