zhengkaixin 1 jaar geleden
bovenliggende
commit
f331a01046
2 gewijzigde bestanden met toevoegingen van 40 en 21 verwijderingen
  1. 2 2
      .env.dev.js
  2. 38 19
      pages/discountCard/productDetails.vue

+ 2 - 2
.env.dev.js

@@ -2,7 +2,7 @@ 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: '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/' ,
@@ -15,7 +15,7 @@ const UNI_APP = {
 	openId:"zkxtest",//zkx
 	
 	openId:"oK9Wr54VbEh3xvWYmD_zT5NbH4AY",//zkx
-	openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s",//杨所
+	//openId:"oK9Wr59rru-i3bm7dtTtxnkR-i4s",//杨所
 	//openId:"oK9Wr56vX9nP_B56_Pyigg5n5Ce8",//
 	//openId:"oK9Wr5_2USr1yP4MRew9KbJA0-ng",//老板
 	//openId:"oK9Wr5-ViXQMUP2cjiW3bGIABj1Q",

+ 38 - 19
pages/discountCard/productDetails.vue

@@ -93,19 +93,24 @@
 						自营站充电服务费6折
 					</view>
 				</view>
-				<view class="price">
-					<view class="item" v-for="(item,i) in cardList" :key="i" >
-						<text>{{item.monthlyRentCard.price}}</text>元
-					</view>
-					 
-				</view>
-				<view class="hint1">
-					<view class="item" v-for="(item,i) in cardList" :key="i" >
-						<p>累计{{item.monthlyRentCard.chargeDegreeLimit}}度内可用</p>
-						<p>有效期{{item.monthlyRentCard.periodOfValidity}}天</p>
+				<view class="priceMain" >
+					<view class="price"  v-for="(item,i) in cardList" :key="i" >
+						<view class="item">
+							<text>{{item.monthlyRentCard.price}}</text>元
+						</view>
+						 <view class="hint1">
+						 	<view class="item2"  >
+						 		<p>累计{{item.monthlyRentCard.chargeDegreeLimit}}度内可用</p>
+						 		<p>有效期{{item.monthlyRentCard.periodOfValidity}}天</p>
+						 	</view>
+						 	
+						 </view>
+						 
+						 
 					</view>
-					
 				</view>
+				
+				
 			</view>
 			<!-- 价格对比 -->
 			<view class="price-comparison">
@@ -250,7 +255,7 @@
 				</view>
 				<view class="content">
 					<p>- 新能源车主可购买,购买该卡的手机号所绑定的51充电联盟为使用该卡的唯一账号。</p>
-					<p>- 该产品建议符合以下场景购买:①未拥有“充电服务费折扣卡”的车主;②已购买“充电服务费折扣卡”且卡已过期的车主。</p>
+					<p>- 该产品建议符合以下场景购买:①未拥有“充电服务费折扣卡”的车主;②已购买“充电服务费折扣卡”且卡已过期的车主。</p>
 				</view>
 			</view>
 			<!-- 适用充电站 -->
@@ -620,8 +625,10 @@
 		computed: {
 			isPayText(){
 				var text=""
-				if(this.ispay&&this.startTime&&this.startTime>0){
-					text=this.detail.createTime.substring(0,10)+"上架"
+				if(this.cardList.length==0){
+					text="未上架"
+				}else if(this.ispay&&this.startTime&&this.startTime>0){
+					text=this.detail.startBuyTime.substring(0,10)+"上架"
 				}else if(this.ispay&&this.userCard.classify=="1"){
 					text="已购买其他卡"
 				}else if(this.userInfo.userType=='1'){
@@ -744,6 +751,7 @@
 				API_weixin.checkSubscribe({
 					openId: this.carhelp.getOpenId()
 				}).then((res) => {
+					
 					uni.hideLoading()
 					if (res.data == "0") {
 						this.show1 = true
@@ -787,6 +795,7 @@
 				API.cardList({
 					type:2
 				}).then((response) => {
+					
 					uni.hideLoading()
 					this.cardList = response.data.cardList;
 			 
@@ -794,7 +803,10 @@
 						this.detail = this.cardList[0].monthlyRentCard
 						this.cardId = this.detail.id;
 						this.cardList[0].monthlyRentCard.checked = true
-						this.startTime=(newDate(this.detail.createTime).getTime()-new Date().getTime())
+						if(this.detail.startBuyTime){
+							this.startTime=(newDate(this.detail.startBuyTime).getTime()-new Date().getTime())
+							
+						}
 					}
 					this.getUserInfo()
 					this.isReady = true;
@@ -988,7 +1000,8 @@
 		top: 50%;
 		transform: translate(-50%);
 		left: 50%;
-		color: #fff;
+		color: #fff;
+		z-index: 999;
 
 
 	}
@@ -996,7 +1009,8 @@
 	.upupupView img {
 		top: 15px;
 		position: relative;
-		width: 60px;
+		width: 60px;
+		z-index: 999;
 		animation: movepoint 2s infinite;
 		-webkit-animation: movepoint 2s infinite;
 	}
@@ -1147,10 +1161,15 @@
 					font-weight: bold;
 				}
 			}
-
+			.priceMain{
+				display: flex;
+				flex-wrap: wrap;
+				    justify-content: space-between;
+			}
 			.price {
 				display: flex;
 				justify-content: space-between;
+				 flex-direction: column;
                 margin-top: 20rpx;
 				.item {
 					width: 272rpx;
@@ -1161,7 +1180,7 @@
 					text-align: center;
 					border: 1px solid rgba(77, 196, 140, 1);
 					color: rgba(16, 16, 16, 1);
-                    z-index: 999;
+                    z-index: 699;
 					text {
 						font-size: 64rpx;
 					}