|
@@ -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,
|