Commit 006f49cd authored by Mac's avatar Mac

样式修改

parent b7004492
......@@ -17,7 +17,10 @@
<view class="inter-item" v-for="(x, i) in g" :key="i" @click="goActiveContent(x)">
<view style="width: 100%;height: 190px;border-top-left-radius: 6px;border-top-right-radius: 6px;position: relative;">
<image :src="x.CoverImage" mode='aspectFill' style="width: 100%;height: 190px;;border-top-left-radius: 6px;border-top-right-radius: 6px;"></image>
<view class="imgview" v-if="msg.QActivityState ==1 " :style="{background:mainColor,color:'#FFF'}">距离活动结束还有{{x.SurplusDay}}</view>
<view class="imgview" v-if="msg.QActivityState ==1 && x.SurplusDay>0" :style="{background:mainColor,color:'#FFF'}">距离活动结束还有{{x.SurplusDay}}</view>
<view class="imgview" v-if="msg.QActivityState ==1 && x.SurplusDay== 0" :style="{background:mainColor,color:'#FFF'}">
距离活动结束还有{{(x.SurplusHour).toFixed(0)}}小时{{(x.SurplusMin).toFixed(0)}}分钟
</view>
<view class="imgview imgview2" v-if=" msg.QActivityState ==2 " >兑换截止期限:{{x.ReceiveTime}}</view>
</view>
......@@ -198,6 +201,25 @@
uni.navigateTo({
url: '/pages/friendcircle/activeContent?ActivityId=' + x.Id
});
},
dateDiff(d1){//2个日期差多少天的计算
var date1 = new Date(d1);
var date2 = new Date();
var ms = Math.abs(date1.getTime() - date2.getTime());
var hm=1000;
var mi=hm*60;
var hh=mi*60;
var dd=hh*24;
var day=parseInt(ms/dd);
var hour= ((ms-day*dd)/hh).toFixed();
var minute = ((ms - day * dd - hour * hh) / mi).toFixed(0);
var second = (ms - day * dd - hour * hh - minute * mi) / hm;
var milliSecond = ms - day * dd - hour * hh - minute * mi - second * hm;
console.log(hour+"小时"+minute+"分钟")
return hour+"小时"+minute+"分钟"
}
},
};
......
......@@ -27,7 +27,7 @@
font-size:12px;
}
.rewardStatus{
padding:5px 10px;
padding:2px 10px;
border:1px solid #999999;
color:#999999;
border-radius: 20px;
......@@ -43,7 +43,7 @@
.onlineWay{
color:#FF4048;
border:1px solid #FF4048;
padding:5px 10px;
padding:2px 10px;
border-radius: 20px;
font-size:13px;
}
......@@ -69,31 +69,32 @@
>
<view class="details" v-for="(x, i) in dataList" :key="i">
<view class="myRewardContent">
<view style="width:calc(100vw - 110px);display: flex;">
<view style="width:calc(100vw - 30px);display: flex;">
<view class="reward_ImgDiv">
<image :src="x.PrizeImage" alt="" mode='aspectFill'/>
</view>
<view style="padding-left:10px;flex: 1;width: 1px;">
<view class="rewardTop Chaochu">{{x.ActivityName}}</view>
<view class="reDuihuan Chaochu">{{x.PrizeName}}</view>
<view class="reDuihuan Chaochu" style="display:flex;flex-direction: row;align-items: center;font-family: aa;">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/tiaoxingma.png" style="width: 13px;height: 10px;margin-right: 5px;"></image>
{{x.Code}}</view>
<view class="reDuihuan Chaochu" style="font-family: aa;" >截止{{x.ReceiveTime}}之前兑换</view>
<view class="reDuihuan Chaochu">{{x.PrizeName}}</view>
<view style="width:calc(100vw - 110px);display: flex;width: 100%;flex-direction: row;align-items: center;justify-content: space-between;">
<view class="reDuihuan" style="display:flex;flex-direction: row;align-items: center;font-family: aa;">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/tiaoxingma.png" style="width: 13px;height: 10px;margin-right: 5px;"></image>
{{x.Code}}</view>
<view>
<view class="rewardStatus" v-if="x.Way==2">
<text v-if="x.State==1">未兑换</text>
<text v-if="x.State==2">已兑换</text>
<text v-if="x.State==3">已过期</text>
</view>
<view v-if="x.Way==1" class="onlineWay">
<text v-if="x.State==1">立即兑换</text>
</view>
</view>
</view>
</view>
</view>
<view>
<view class="rewardStatus" v-if="x.Way==2">
<text v-if="x.State==1">未兑换</text>
<text v-if="x.State==2">已兑换</text>
<text v-if="x.State==3">已过期</text>
</view>
<view v-if="x.Way==1" class="onlineWay">
<text v-if="x.State==1">立即兑换</text>
</view>
</view>
</view>
</view>
<u-loadmore
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment