浏览代码

主页活动,退款

wkyy 2 年之前
父节点
当前提交
945cd56754
共有 3 个文件被更改,包括 29 次插入17 次删除
  1. 26 14
      pages/index/index.vue
  2. 2 2
      pages/user/finance/refundDet.vue
  3. 1 1
      pages/user/finance/refundList.vue

+ 26 - 14
pages/index/index.vue

@@ -105,27 +105,27 @@
 			<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"
-					@click="rechargeActivity(index)">
+					@click="rechargeActivity(item)">
 					<img :src="item.picUrl" alt="">
 				</view>
 			</view>
 		</view>
 		<!-- 最新活动 -->
-		<view class=" top-up" v-if="description != '0:0:0'">
+		<view class=" top-up" v-if="activityList.length > 0 && description != '0:0:0'">
 			<view class="top-up-title oldTextjp" oldstyle="font-size:20px;"><text class="line"></text>最新活动</view>
 			<view class="img-box2">
-				<view class="left-image" @click="gotoUrl('pages/monthlyCardActivity/monthlyCardBuy')">
-					<p>充电免服务费包月卡</p>
+				<view class="left-image" @click="rechargeActivity(activityDateList)">
+					<p>{{activityDateList.name}}</p>
 					<view class="time-activities">
 						距活动结束仅剩 <text class="time">{{description}}</text>
 					</view>
 				</view>
 				<view class="right-image">
 			
-					<!-- <img class="margin-bottom" v-for="(item,index) in activityList" :key="item.id" 
-						@click="rechargeActivity(index)" :src="item.picUrl" alt=""> -->
-					<img class="margin-bottom" src="../../assets/img/topup2.png" alt="" @click="rechargeActivity(0)">
-					<img class="margin-bottom" src="../../assets/img/topup3.png" alt="" @click="rechargeActivity(1)">
+					<img class="margin-bottom" v-for="(item,index) in activityList" :key="item.id" 
+						@click="rechargeActivity(item)" :src="item.narrowUrl" alt="">
+					<!-- <img class="margin-bottom" src="../../assets/img/topup2.png" alt="" @click="rechargeActivity(0)">
+					<img class="margin-bottom" src="../../assets/img/topup3.png" alt="" @click="rechargeActivity(1)"> -->
 				</view>
 		
 			</view>
@@ -371,7 +371,9 @@
 				value: '长辈模式',
 				elderStatus: false,
 				fontMode: '',
-				description: '0:0:0'
+				description: '0:0:0',
+				activityDate: '',
+				activityDateList: {},
 			}
 		},
 		onLoad(op) {
@@ -439,11 +441,10 @@
 			this.getPointTimeOut();
 			this.getNewsList();
 			this.getActivityInfoList();
-			this.getDescriptionTime();
 		},
 		methods: {
 			getDescriptionTime() {
-				var date = '2022/08/08 00:00:00';
+				var date = this.activityDate;
 				var dateMonth1 = new Date().getMonth()+1;
 				var dateDay1 = new Date().getDate();
 				var dateMonth2 =  parseInt(date.slice(5,7));
@@ -748,11 +749,11 @@
 					})
 				}
 			},
-			rechargeActivity(index) {
+			rechargeActivity(item) {
 				if (this.userId) {
 					var uurl="&uid="+this.userId;
 					
-					var mod = this.activityList[index]
+					var mod = item
 					
 					if (mod.clickUrl == null) {
 					
@@ -791,7 +792,18 @@
 					pageSize: 10
 				}).then((res) => {
 					uni.hideLoading()
-					this.activityList = res.data.data;
+					var list = res.data.data;
+					for (let i = 0; i < list.length; i++) {
+						if(list[i].endTime != null) {
+							this.activityDate = list[i].endTime.replaceAll('-' ,'/');
+							this.activityDateList = list[i];
+							console.log(this.activityDate);
+							list.splice(i, 1);
+							
+							this.getDescriptionTime();
+						}
+					}
+					this.activityList = list;
 				}).catch(error => {
 					uni.showToast({
 						title: error,

+ 2 - 2
pages/user/finance/refundDet.vue

@@ -18,9 +18,9 @@
 			<view class="rechargeDet-list">
 				<p>退费时间</p><span>{{refund.applicationTime}}</span>
 			</view>
-			<view class="rechargeDet-list">
+			<!-- <view class="rechargeDet-list">
 				<p>退费渠道</p><span>{{refund.refundChannelText}}</span>
-			</view>
+			</view> -->
 			<view class="rechargeDet-list">
 				<p>退费金额</p><span>{{refund.refundRealAmount!=null?refund.refundRealAmount.toFixed(2):'0'}}元</span>
 			</view>

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

@@ -20,7 +20,7 @@
 				<view class="refundList">
 					<view class="refundList-item" v-for="(item,index) in items" :key="index" @click="refundItem(item)"> 
 						<view class="refundList-row">
-							<font>退至 {{item.refundChannelText}}</font>
+							<font>原路退回</font>
 							<span :class="item.status == '0'? 'state1':'state2' ">{{item.statusText}}</span>
 						</view>
 						<view class="refundList-row" >