zhengkaixin пре 1 година
родитељ
комит
5e109e924b

+ 4 - 4
.env.dev.js

@@ -1,8 +1,8 @@
 const UNI_APP = {  
 	ProjectName :"51充电联盟",
 	BASE_URL: 'https://51team.xiaoxinda.com/charging-station-server/',
-	//BASE_URL: 'https://charging.xiaoxinda.com/charging-station-test/',
-	BASE_URL: 'http://192.168.77.162:8081/charging-station/' ,
+	BASE_URL: 'https://charging.xiaoxinda.com/charging-station-test/',
+	//BASE_URL: 'http://192.168.77.162:8081/charging-station/' ,
 	//PARK_URL: 'http://192.168.11.120:8082/charging-parking/' ,
 	//PARK_URL: 'https://51team.xiaoxinda.com/charging-parking/' ,
 	NODE_ENV :"dev",
@@ -12,8 +12,8 @@ const UNI_APP = {
 	//defaultStation:[],
 	openId:"zkxtest",//zkx
 	
-	//openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",//zkx
-	openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s",//杨所
+	openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",//zkx
+	//openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s",//杨所
 	//openId:"oK9Wr56vX9nP_B56_Pyigg5n5Ce8",//
 	//openId:"oK9Wr5_2USr1yP4MRew9KbJA0-ng",//老板
 	//openId:"oK9Wr5-ViXQMUP2cjiW3bGIABj1Q",

+ 28 - 8
pages/discountCard/myOrder.vue

@@ -7,25 +7,26 @@
 		<view class="card" v-for="(item,i) in list[current].list"   :key="i" >
 			<view class="state">
 				<view class="time">
-					订单生成时间:2023-08-16 12:00:00
+					订单生成时间:{{item.createTime}}
 				</view>
 				<view class="payment-state">
-					待付款
+					{{item.status=='1'?'已付款':''}}
+					{{item.status=='0'?'未付款':''}}
 				</view>
 			</view>
 			<view class="card-infos">
 				<view class="picture">
-					<img src="../../assets/img/productPic.png" alt="">
+					<img :src="item.monthlyRentCard.image" alt="">
 				</view>
 				<view class="infos">
 					<view class="name">
-						自营站充电服务费6折卡
+						{{item.monthlyRentName}}
 					</view>
-					<view class="usable">
-						可用338度(有效期30天)
+					<view class="usable" v-if="item.monthlyRentCard.classify==2">
+						可用{{item.monthlyRentCard.chargeDegreeLimit}}度(有效期{{item.monthlyRentCard.periodOfValidity}}天)
 					</view>
 					<view class="price">
-						12.9
+						{{item.monthlyRentCard.price}}
 					</view>
 				</view>
 				<view class="amount">
@@ -38,11 +39,17 @@
 					订单金额
 				</view>
 				<view class="value">
-					12.9
+					{{item.monthlyRentCard.price}}
 				</view>
 			</view>
 			
 		</view>
+		
+		<view class="carNone" v-if="list[current].list.length == 0">
+				<img src="static/img/暂无数据-缺省页.png" alt="">
+				<p class="oldTextjp2" oldstyle="font-size: 18px;">暂无记录</p>
+			</view>
+			
 	</view>
 </template>
 
@@ -145,6 +152,19 @@
 </script>
 
 <style lang="scss" scoped>
+	.carNone{
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		img{
+			width: 100%;
+			height: 100%;
+		}
+		p{
+			margin-top: -60px;
+		}
+	}
 	.tabs{
 		padding: 0 80rpx;
 		background-color: #fff;

+ 4 - 2
pages/discountCard/productDetails.vue

@@ -602,7 +602,9 @@
 		computed: {
 			isPayText(){
 				var text=""
-				if(this.userInfo.userType=='1'){
+				if(this.ispay&&this.userCard.classify=="1"){
+					text="已购买其他卡"
+				}else if(this.userInfo.userType=='1'){
 					text="游客无法购买"
 				}else if(!this.isReady){
 					text="加载中"
@@ -694,7 +696,7 @@
 						this.show1 = true
 			
 					} else {
-						//this.getInfo();
+						this.getUserInfo();
 			
 						//this.getCardList();
 						this.show2 = true;

+ 112 - 32
pages/monthlyCardActivity/monthlyCardBuy.vue

@@ -202,7 +202,102 @@
 
 		</view>
 		<view class="notice2">
-			
+			<view class="titleHead">适用充电站点</view>
+
+			<!-- 附近站点 -->
+			<view class="station" v-for="(stationData,i) in pageListGetObj.list" :key="i"
+				@click="gotoUrl('pages/searchPile/stationAndPile/stationDetails?id=' + stationData.id)">
+				<view class="head">
+					<view class="title oldTextjp" oldstyle="font-size: 20px;">
+						{{stationData.name}}
+					</view>
+					<view class="distance ">
+						<!-- <text class="iconfont" style="color:#666666">&#xe615;</text>{{stationData.distance!=null&&stationData.distance>0.1 ? stationData.distance.toFixed(1)+'公里':'小于100米'}} -->
+					</view>
+				</view>
+				<view class="sign" v-if="stationData.stationType==50">
+					{{stationData.address}}
+				</view>
+				<view class="sign" v-else>
+					 
+						<!-- 	 -->
+						<view class="sign-1"
+							v-if="stationData.giveDiscount&&stationData.discountRatio&&stationData.discountRatio!=100">
+							会员服务费{{discountRatio10(stationData.discountRatio)}}折</view>
+						<view class="sign-3" v-if="stationData.category=='超充'">160kW超充站</view>
+						<view class="sign-4"
+							v-if="stationData.nightLowPriceEnabled">
+							夜间超低价</view>
+							<view class="sign-2" v-if="stationData.platformType==1">自营站</view>
+						<view class="sign-2" v-if="stationData.tagList.length != 0"
+							v-for="(tagName,tagIndex) in stationData.tagList" :key="tagIndex">{{tagName}}</view>
+				 
+				</view>
+				<view class="price-free oldTextClass">
+					<view class="price" v-if="userInfo&&userInfo.userType==2">
+						<view class="price-1">
+							<text class="num">
+								{{!stationData.giveDiscount ? (stationData.electricityPrice+stationData.servicePrice).toFixed(2)
+								: (stationData.electricityPrice+stationData.discountServicePrice).toFixed(2)}}</text>
+							<text class="unit " oldstyle="font-size: 48rpx;">元/度</text>
+						</view>
+						<view class="price-2 " oldstyle="font-size: 48rpx;" v-if="stationData.giveDiscount">
+							<text
+								class="num">{{(stationData.electricityPrice+stationData.servicePrice).toFixed(2)}}</text>
+							<text class="unit ">元/度</text>
+						</view>
+					</view>
+					<!-- 游客价格-->
+					<view class="price" v-else>
+						<view class="price-1">
+							<text class="num">
+								{{(stationData.electricityPrice+stationData.servicePrice).toFixed(2)}}</text>
+							<text class="unit " oldstyle="font-size: 48rpx;">元/度</text>
+						</view>
+						<view class="price-3 " oldstyle="font-size: 48rpx;" v-if="stationData.giveDiscount">
+							<text class="num1">会员</text>
+							<text class="num">{{ (stationData.electricityPrice+stationData.discountServicePrice).toFixed(2)}}</text>
+							<text class="unit ">元/度</text>
+						</view>
+					</view>
+
+					<view class="free">
+
+						<view class="fast" v-if="stationData.fastNum">
+							<view class="fast-font">
+								快
+							</view>
+							<view class="num">
+								{{stationData.fastAvailableNum}}/{{stationData.fastNum}}
+							</view>
+						</view>
+						<view class="slow oldTextjp2" oldstyle="margin-left: 1px;" v-if="stationData.slowNum">
+							<view class="slow-font">
+								慢
+							</view>
+							<view class="num">
+								{{stationData.slowAvailableNum}}/{{stationData.slowNum}}
+							</view>
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="bottom" @click="getPageList(true)"
+				v-if="pageListGetObj.recordsTotal!=pageListGetObj.list.length">
+				<view class="bot">
+					<view class="bot-line"></view>
+					<view class="bot-text " style="color: #00B962;text-align: center;margin-top: 10px">
+						点击查看更多(共{{pageListGetObj.recordsTotal}}站点)</view>
+					<view class="bot-line"></view>
+				</view>
+			</view>
+			<view class="bottom" v-else>
+				<view class="bot">
+					<view class="bot-line"></view>
+					<view class="bot-text " style="color: #00B962;text-align: center;margin-top: 10px;">已经到底了</view>
+					<view class="bot-line"></view>
+				</view>
+			</view>
 
 			<view class="upupupView" v-show="flag==1">
 				<view class="upupupImg">
@@ -213,17 +308,13 @@
 			</view>
 
 		</view>
-		<!-- 按钮 -->
-		<view class="button" >
-			<button class="btn " v-if="ispay"> {{userCard&&ispay?userCard.endTime:''}}到期
-			</button>
-			<button class="btn " v-else >
-				暂停购买
-			</button>
-		</view>
-		<view class="button" v-if="false&&!ispay" >
-
-			<button class="btn " v-if="userInfo.userType=='1'">游客无法购买
+		<!-- 按钮 -->
+		<view class="button" v-if="!ispay">
+			
+			
+			<button class="btn " v-if="userCard&&userCard.classify==2">已购买其他卡
+			</button>
+			<button class="btn " v-else-if="userInfo.userType=='1'">游客无法购买月卡
 			</button>
 			<button class="btn " v-else-if="!isReady">加载中
 			</button>
@@ -347,17 +438,8 @@
 				this.consumerPhone = consumerPhone
 			}
 
-			this.ykgz = this.carhelp.getConfig().ykgz
-			
-			var userCard = this.carhelp.getPersonInfoPlus().userCard
-			if(userCard&&userCard.classify==1){
-				this.userCard=userCard
-				this.ispay = this.userCardBool(this.userCard)
-			}
-			
-			
-			//this.checkSubscribe()
-			this.getCardList();
+			this.ykgz = this.carhelp.getConfig().ykgz
+			//this.checkSubscribe()
 
 		},
 		onShow() {
@@ -482,8 +564,7 @@
 				window.location.href = url
 
 			},
-			checkSubscribe() {
-				return
+			checkSubscribe() {
 				uni.showLoading({
 					title: "加载中",
 					mask: true,
@@ -514,7 +595,7 @@
 			userCardBool(userCard) {
 
 
-				if (userCard) {
+				if (userCard&&userCard.classify==1) {
 					var date = new Date().getTime()
 					var date2 = newDate(userCard.endTime).getTime();
 					if (date < date2) {
@@ -529,9 +610,9 @@
 					mask: true,
 				})
 				API.cardList({
-					type:1
+
 				}).then((response) => {
-					uni.hideLoading()
+
 					this.cardList = response.data.cardList;
 
 					for (var i in this.cardList) {
@@ -579,7 +660,7 @@
 				})
 			},
 			getPageList(bl) {
-				return 
+
 				var cardId = this.cardId
 				if (this.ispay) {
 					cardId = this.userCard.rentCardId;
@@ -633,8 +714,7 @@
 					})
 				})
 			},
-			getUserInfo() {
-				return
+			getUserInfo() {
 				uni.showLoading({
 					title: "加载中",
 					mask: true,
@@ -665,7 +745,7 @@
 
 							var userCard = res.data.userCard;
 							this.userCard = userCard
-							//this.ispay = this.userCardBool(userCard)
+							this.ispay = this.userCardBool(userCard)
 
 						} else {
 

+ 1 - 1
pages/searchPile/stationAndPile/chargingPileDetails.vue

@@ -153,7 +153,7 @@
 					</view>
 				</view>
 				</view>
-				<view class="discount-card" v-if="userCardBool&&userCard.classify==2&&station.platformType==1">
+				<view class="discount-card" v-if="userCardBool&&userCard.classify==2">
 					<view class="name">
 						自营站充电服务费6折卡
 					</view>