Commit fc0633a7 authored by huangyuanyuan's avatar huangyuanyuan

update

parent 1c5c7042
......@@ -59,3 +59,75 @@
#qiandaoBox .monthDiv .monthItem .orange{
background: #FFF5B9;
}
#qiandaoBox .closeImg{
position: absolute;
top:2.5rem;
right: 1rem;
width: 3rem;
height: 3rem;
}
#wodeduihuanBox .myDuiBox{
width: 100%;
height: 29rem;
overflow: scroll;
}
#wodeduihuanBox .wodeduihuanBox_bg{
position: relative;
}
#wodeduihuanBox .wodeduihuanBox_bg .duihuan{
top:4.2rem;
right: -1rem;
width: 3rem;
height: 3rem;
position: absolute;
}
#wodeduihuanBox .duiItem{
width: 24.5%;
background: url('../images/task/ass/bg.png');
background-size: 100% 100%;
height: 7rem;
padding:1rem 0rem;
box-sizing: border-box;
position: relative;
overflow: hidden;
float: left;
}
#wodeduihuanBox .duiItem .imgDiv{
width: 100%;
height: 70%;
text-align: center;
}
#wodeduihuanBox .duiItem .imgDiv img{
height: 100%;
}
#wodeduihuanBox .duiItem .spanDiv{
background: #FF8400;
color: #fff;
border-radius:16px;
font-size: 0.8rem;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-align: center;
width: 75%;
margin:0 auto;
padding:0.1rem 0.5rem;
box-sizing: border-box;
margin-top: 2%;
}
#wodeduihuanBox .duiItem .cpnum{
position: absolute;
top: 0;
right: 0;
background: #FF5656;
width: 1.5rem;
height: 1.5rem;
border-radius: 50%;
color: #fff;
text-align: center;
}
#wodeduihuanBox{
position: fixed;
}
\ No newline at end of file
......@@ -376,11 +376,21 @@ img{
padding: 11rem 6rem 9rem 3rem;
width: 85%;
height: 39.15rem;
margin-left: 2rem;
margin-left: 4rem;
background: url("../images/task/ass/qiandao_bg.png");
background-size: 100% 100%;
position: relative;
}
/* 兑换 */
.wodeduihuanBox_bg{
padding: 8rem 1.5rem 2rem 1.5rem;
width: 90%;
height: 39.15rem;
margin-left: 1.5rem;
background: url("../images/task/ass/duihuan.png");
background-size: 100% 100%;
position: relative;
}
#qiandaoBox .qiandaoBox_close{
position: absolute;
right: 1rem;
......
......@@ -180,9 +180,10 @@
</div>
</div>
</div>
<!-- 签到class="none" -->
<div id="qiandaoBox">
<!-- 签到 -->
<div id="qiandaoBox" class="none">
<div class="qiandaoBox_bg">
<img onclick="CloseqiandaoBox('qiandaoBox')" class="closeImg" src="../../images/task/ass/close3.png" alt="">
<div class="monthDiv">
</div>
<div class="bottomDiv">
......@@ -211,7 +212,19 @@
<!-- 兑换 -->
<div id="wodeduihuanBox" class="none">
<div class="wodeduihuanBox_bg">
<img onclick="CloseqiandaoBox('wodeduihuanBox')" class="duihuan" src="../../images//task//ass/close4.png" alt="">
<div class="myDuiBox">
<!-- <div class="duiItem">
<div class="cpnum">x2</div>
<div class="imgDiv">
<img src="../../images/task/ass/bql_02.png" alt="">
</div>
<div class="spanDiv">
<span>空气进化器</span>
</div>
</div> -->
</div>
</div>
</div>
<div id="tips" class="none">
......
......@@ -5,9 +5,9 @@ let newDate = date.getFullYear()+"-"+((date.getMonth()+1) < 9 ? '0' + (date.getM
let Year=date.getFullYear();
let Month=date.getMonth()+1;
let daynum=mGetDate(Year,Month)
console.log("Year",newDate,Year,Month,daynum)
let qiandaonum=0;
getQiandao();
getActivityGoods();
// 获取签到记录
function getQiandao(){
......@@ -141,10 +141,9 @@ getQiandao();
data: getJavaData(),
async: false,
success: function (res) {
console.log("woyao",res)
if (res.resultCode === 1) {
if (res.award === null) {
this.$message.success('您今天已经签过到了!')
showTips("您今天已经签过到了!")
} else {
getQiandao()
......@@ -158,4 +157,48 @@ getQiandao();
}
})
}
function CloseqiandaoBox(id){
$('#'+id).hide()
$('#'+id).css('display', 'none')
}
// 商品兑换
function getActivityGoods(){
let msg = {
activityId: activityId
}
$.ajax({
type: "POST",
url: `${url}api/mactivity/getUserActivityGoods`,
contentType: "application/json",
data: getJavaData(msg),
async: false,
success: function (res) {
let list=res.data;
if (res.resultCode === 1) {
let goods="";
for(let i=0;i<list.length;i++){
goods+=`
<div class="duiItem">
<div class="cpnum">x${list[i].buyNum}</div>
<div class="imgDiv">
<img src="${list[i].imgs}" alt="">
</div>
<div class="spanDiv">
<span>${list[i].name}</span>
</div>
</div>
`;
}
$('.myDuiBox').html(goods)
}
},
error: function (res) {
}
})
}
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