Ver Fonte

Merge branch 'master' of http://47.92.161.104:10080/zkx/JP-ChargeTeam51

zhengkaixin há 2 anos atrás
pai
commit
5e09f5523d
1 ficheiros alterados com 9 adições e 4 exclusões
  1. 9 4
      pages/index/index.vue

+ 9 - 4
pages/index/index.vue

@@ -101,7 +101,7 @@
 
 		
 		<!-- 充值活动 -->
-		<view class=" top-up" v-if="activityList.length > 0 && description == '0:0:0'">
+		<view class=" top-up" v-if="activityList.length > 0 && !activityListShow">
 			<view class="top-up-title oldTextjp" oldstyle="font-size:20px;"><text class="line"></text>最新活动</view>
 			<view class="img-box">
 				<view class="img-1" v-for="(item,index) in activityList" :key="item.id"
@@ -111,10 +111,10 @@
 			</view>
 		</view>
 		<!-- 最新活动 -->
-		<view class=" top-up" v-if="activityList.length > 0 && description != '0:0:0'">
+		<view class=" top-up" v-if="activityList.length > 0 && activityListShow">
 			<view class="top-up-title oldTextjp" oldstyle="font-size:20px;"><text class="line"></text>最新活动</view>
 			<view class="img-box2">
-				<view class="left-image" @click="rechargeActivity(activityDateList)">
+				<view class="left-image" :style="{backgroundImage: 'url(' + activityDateList.picUrl + ')'}" @click="rechargeActivity(activityDateList)">
 					<p>{{activityDateList.name}}</p>
 					<view class="time-activities">
 						距活动结束仅剩 <text class="time">{{description}}</text>
@@ -374,6 +374,7 @@
 				description: '0:0:0',
 				activityDate: '',
 				activityDateList: {},
+				activityListShow: false,
 			}
 		},
 		onLoad(op) {
@@ -461,6 +462,9 @@
 					var dateTime2=new Date(date).getTime()
 					var c=hourDistanceArr(new Date(),new Date(dateTime2))
 					this.description = c[0]+':'+c[1]+':'+c[2];
+					if(this.description == '0:0:0') {
+						this.activityListShow = false;
+					}
 					setTimeout(()=>{
 						this.getDescriptionTime();
 					},1000)
@@ -796,6 +800,7 @@
 					var list = res.data.data;
 					for (let i = 0; i < list.length; i++) {
 						if(list[i].endTime != null) {
+							this.activityListShow = true;
 							this.activityDate = list[i].endTime.replaceAll('-' ,'/');
 							this.activityDateList = list[i];
 							console.log(this.activityDate);
@@ -1247,7 +1252,7 @@
 			width: 48.3%;
 			height: 166px;
 			padding: 8px 0 0 12px;
-			background: url(@/assets/img/topup1.png);
+			// background: url(@/assets/img/topup1.png);
 			    background-repeat: no-repeat;
 			    background-position: 30% 10%;
 			    background-size: cover;