Commit 550d930e authored by 华国豪's avatar 华国豪 🙄

1

parent c6c17c1c
......@@ -34,7 +34,7 @@ img{
text-align: center;
position: absolute;
left: 0;
bottom: .8rem;
bottom: 1rem;
width: 100%;
color: #FE0B02;
font-size: .7rem;
......@@ -242,19 +242,19 @@ img{
height: 5rem;
z-index: 4;
}
.ice_box .row{
.ice_box .row,.quan_box .row{
width: 100%;
margin-top: 4rem;
}
.ice_box .row ul{
.ice_box .row ul,.quan_box .row ul{
/* width: 8rem; */
}
.ice_box .row ul li {
.ice_box .row ul li,.quan_box .row ul li {
width: 100%;
position: relative;
}
.ice_box .row ul li .riight_tag{
.ice_box .row ul li .riight_tag,.quan_box .row ul li .riight_tag{
width: 1.3rem;
height: 1.3rem;
border-radius: 50%;
......@@ -265,7 +265,7 @@ img{
right: -.6rem;
top: .4rem;
}
.ice_box .row ul li img{
.ice_box .row ul li img,.quan_box .row ul li img{
width: 100%;
}
.hechengwu{
......@@ -317,9 +317,22 @@ img{
flex-wrap: wrap;
justify-content: center;
}
.wodecailiao_ice2{
width: 27.5rem;
height: 22rem;
background: url("../images/task/ice/caoliao_bg_2.png");
background-size: 100% 100%;
justify-content: initial;
}
.wodecailiao_ice2 .wodecailiao_ice_item2{
padding: 0 .4rem;
}
.wodecailiao_ice_item{
position: relative;
}
.wodecailiao_ice_item2 img{
width: 5rem;
}
.wodecailiao_ice_item .wodecailiao_ice_item_tag{
min-width: 1.3rem;
height: 1.3rem;
......@@ -329,8 +342,13 @@ img{
color: white;
position: absolute;
right: -.6rem;
top: .4rem;
top: .4rem;
}
.wodecailiao_ice_item2 .wodecailiao_ice_item_tag{
right: 0rem;
top: -.5rem;
}
.no_Amount{
-webkit-filter: grayscale(100%);
-moz-filter: grayscale(100%);
......@@ -341,6 +359,19 @@ img{
}
.cheche{
position: absolute;
right: 1rem;
bottom: 1rem;
z-index: 4;
width: 8rem;
}
.box_daxiang{
position: absolute;
left: 1rem;
top: 10rem;
width: 8rem;
}
/* .说明 */
.huodongshuoming_bg{
......
......@@ -27,7 +27,7 @@
</div>
<div class="top">
<img src="../../images/task/top.png" alt="">
<p>活动时间:6月21日~8月21日</p>
<p id="active_time">活动时间:6月21日~8月21日</p>
</div>
<div class="block">
<!-- 任务 -->
......@@ -143,8 +143,9 @@
</div>
<div class="ice_box">
<div class=" clearfix row">
<img class="cheche" src="../../images/task/ice/cheche.png" alt="">
<ul class="col-xs-4" id="iceList">
</ul>
<div class="hechengwu col-xs-8">
<div class="yuan">
......@@ -162,8 +163,31 @@
</div>
</div>
<div class="quan_box">
<div class="quan_box none">
<div class=" clearfix row">
<img class="box_daxiang" src="../../images/task/ice/daxiang.png" alt="">
<img class="cheche" src="../../images/task/ice/cheche.png" alt="">
<ul class="col-xs-4" id="iceList">
<li>
<img src="../../images/task/ice/quanjiatong.png" alt="">
<div class="riight_tag" id="qAmount"></div>
</li>
</ul>
<div class="hechengwu col-xs-8">
<div class="yuan">
<img id="bigIce" src="../../images/task/ice/c_ice_quan.png" alt="">
</div>
<div class="wo_hecheng_btn" onclick="setFuseMaterial(1)">
<img src="../../images/task/ice/hecheng.png" alt="">
</div>
<div class="cailiao_box" id="cailiao_box">
</div>
</div>
</div>
<div class="wodecailiao_ice wodecailiao_ice2" id="wodecailiao_ice2">
</div>
</div>
</div>
</div>
......@@ -171,8 +195,8 @@
<div id="huodongshuoming" class="none">
<div class="huodongshuoming_bg">
<img onclick="closeBox('huodongshuoming')" class="huodongshuoming_close" src="../../images/task/ass/close2.png" alt="">
<div class="_text">
瓜分现金作为本次获得的爆点,吸引用户。能领到抽奖券的用户,肯定是已经交过客人,大部分会是交过10个人以上的用户,小概率会有人没有交到10个人的,所以看看能不能做0.88+8.8+18.8+68.8+288的现金红包(68的设定30个以内,288设定1个),其它都是小红包的,交客数量最多的前三随机获得288,前50随机获得68,其他人获得小红包。
<div class="_text" id="activeRemark">
</div>
<div class="wozhidaole">
<img onclick="closeBox('huodongshuoming')" src="../../images/task/ass/shuoming_zhidao.png" alt="">
......@@ -214,9 +238,39 @@
<script type="text/javascript" src="../../js/bts/bootstrap.min.js"></script>
<script type="text/javascript" src="../../js/autosize.js"></script>
<script>
let TaskHistory = [], IceList = [], UserMaterials = [], userIceList = [], activityId = 1, customerId = 1549, taskId = 26, iceIndex = 0;
let TaskHistory = [], IceList = [], UserMaterials = [],
userIceList = [], activityId = 1, customerId = 1549,
taskId = 26, iceIndex = 0,UserFamilyInventory = {},
beginTime = '', endTime = '', ActivityInfo = '';
// let url = 'http://efficient.oytour.com/'
let url = getApiUrl().urlJava
// 获取活动说明
getActivity()
function getActivity () {
let msg = {
link: 'IceCreamTask'
};
$.ajax({
type: "POST",
url: `${url}api/mactivity/getActivity`,
contentType: "application/json",
data: getJavaData(msg),
async: false,
success: function (res) {
if (res.resultCode === 1) {
let data = res.data
beginTime = data.beginTime.split('T')[0].split('-')
endTime = data.endTime.split('T')[0].split('-')
ActivityInfo = data
$('#active_time').html(`时间:${beginTime}~${endTime}`)
$('#activeRemark').html(ActivityInfo.remark)
}
},
error: function (res) {
}
})
}
// 获取签到记录
function getQiandao(){
let msg = {
......@@ -275,6 +329,7 @@
}
}
getIce(data)
getUserFamilyInventory()
}
},
error: function (res) {
......@@ -301,18 +356,23 @@
if (IceList[i].MaterialName.indexOf('蒙牛') !== -1) {
IceList[i].src = '../../images/task/ice/big_ice_4.png'
IceList[i].bgSrc = '../../images/task/ice/ice_4.png'
IceList[i].clSrc = '../../images/task/ice/mengniu.png'
} else if (IceList[i].MaterialName.indexOf('DQ') !== -1) {
IceList[i].src = '../../images/task/ice/big_ice_3.png'
IceList[i].bgSrc = '../../images/task/ice/ice_3.png'
IceList[i].clSrc = '../../images/task/ice/dq.png'
} else if (IceList[i].MaterialName.indexOf('明治') !== -1) {
IceList[i].src = '../../images/task/ice/big_ice_2.png'
IceList[i].bgSrc = '../../images/task/ice/ice_2.png'
IceList[i].clSrc = '../../images/task/ice/mingzhi.png'
} else if (IceList[i].MaterialName.indexOf('和路雪') !== -1) {
IceList[i].src = '../../images/task/ice/big_ice_1.png'
IceList[i].bgSrc = '../../images/task/ice/ice_1.png'
IceList[i].clSrc = '../../images/task/ice/heluxue.png'
} else if (IceList[i].MaterialName.indexOf('哈根达斯') !== -1) {
IceList[i].src = '../../images/task/ice/big_ice_5.png'
IceList[i].bgSrc = '../../images/task/ice/ice_5.png'
IceList[i].clSrc = '../../images/task/ice/ice.png'
}
for (let o =0; o < IceList[i].compounds.length; o++) {
for (let y = 0; y < data.length; y++) {
......@@ -347,10 +407,50 @@
switchIce(0)
$("#iceList").html(html)
}
//获取全家桶数据
function getUserFamilyInventory() {
let msg = {
activityId: 1,
customerId: customerId,
}
$.ajax({
type: "POST",
url: `${url}api/mactivity/getUserFamilyInventory`,
contentType: "application/json",
data: getJavaData(msg),
async: false,
success: function (res) {
if (res.resultCode === 1) {
let caiLiaoHtml = ''
UserFamilyInventory = res.data[0]
$("#qAmount").html("x" + UserFamilyInventory.Amount)
for(let i = 0; i < userIceList.length; i++) {
if (userIceList[i].Amount > 1) {
caiLiaoHtml += `<div class="wodecailiao_ice_item wodecailiao_ice_item2">
<img class="" src="${userIceList[i].clSrc}" alt="">
<div class="wodecailiao_ice_item_tag">x${userIceList[i].Amount}</div>
</div>
`
} else {
caiLiaoHtml += `<div class="wodecailiao_ice_item wodecailiao_ice_item2">
<img class="no_Amount" src="${userIceList[i].clSrc}" alt="">
</div>
`
}
}
$("#wodecailiao_ice2").html(caiLiaoHtml)
}
},
error: function (res) {
}
})
}
// 切换冰糕
function switchIce(index){
iceIndex = index;
let html = "", caiLiaoHtml = "";
let html = "", caiLiaoHtml = "", quanJiaHtml = "";
$("#bigIce").attr('src', userIceList[index].src)
for(let i = 0; i < userIceList[index].compounds.length; i++) {
html += `<div class="cailiao_item">
......@@ -378,9 +478,8 @@
}
//合成
function setFuseMaterial (type) {
console.log(userIceList[iceIndex])
let msg = {
targetId: type ? this.UserFamilyInventory.MaterialsId : userIceList[iceIndex].MaterialsId,
targetId: type ? UserFamilyInventory.MaterialsId : userIceList[iceIndex].MaterialsId,
customerId: customerId,
}
$.ajax({
......@@ -391,7 +490,8 @@
async: false,
success: function (res) {
if (res.resultCode === 1) {
console.log(res.data)
getUserMaterials()
showTips('合成成功')
} else {
showTips(res.message)
}
......@@ -427,12 +527,12 @@
$('.'+id2).hide()
$('.'+showD).show()
$('.'+hideID).hide()
console.log(id)
if (id === 'quan_box') {
$('.bingqilingBox_bg').css('height','52rem')
} else {
$('.bingqilingBox_bg').css('height','45rem')
}
// console.log(id)
// if (id === 'quan_box') {
// $('.bingqilingBox_bg').css('height','52rem')
// } else {
// $('.bingqilingBox_bg').css('height','45rem')
// }
}
</script>
</body>
......
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