压缩图片
@@ -605,6 +605,10 @@ body {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.rule .rule_in .box .img2 {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.rule .rule_in .box2 {
|
||||
width: 8.29333rem;
|
||||
}
|
||||
|
@@ -613,6 +613,9 @@ body {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
.img2{
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.box2 {
|
||||
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 631 B |
Before Width: | Height: | Size: 466 KiB After Width: | Height: | Size: 116 KiB |
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 3.6 MiB After Width: | Height: | Size: 819 KiB |
Before Width: | Height: | Size: 123 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 236 KiB After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 381 KiB After Width: | Height: | Size: 106 KiB |
Before Width: | Height: | Size: 188 KiB After Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 239 KiB After Width: | Height: | Size: 63 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 1.1 MiB After Width: | Height: | Size: 317 KiB |
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 447 KiB |
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 459 KiB |
Before Width: | Height: | Size: 399 KiB After Width: | Height: | Size: 393 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 554 KiB |
Before Width: | Height: | Size: 709 KiB After Width: | Height: | Size: 222 KiB |
Before Width: | Height: | Size: 129 KiB After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 554 KiB After Width: | Height: | Size: 468 KiB |
Before Width: | Height: | Size: 2.5 MiB After Width: | Height: | Size: 632 KiB |
Before Width: | Height: | Size: 324 KiB After Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 90 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 127 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 128 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 138 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 139 KiB After Width: | Height: | Size: 29 KiB |
@@ -4,7 +4,7 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>全城热恋</title>
|
||||
<title>全城熱戀</title>
|
||||
<link rel="stylesheet" href="../../common/css/reset.css">
|
||||
<link rel="stylesheet" href="./css/index.css">
|
||||
</head>
|
||||
@@ -14,9 +14,9 @@
|
||||
<div class="back">
|
||||
<img src="./images/travel/back.png" alt="">
|
||||
</div>
|
||||
<!-- 头部 -->
|
||||
<!-- 頭部 -->
|
||||
<div class="header">
|
||||
<!-- 规则Icon -->
|
||||
<!-- 規則Icon -->
|
||||
<img src="./images/rule_icon.png" alt="" class="rule_icon">
|
||||
<!-- tab -->
|
||||
<div class="tab">
|
||||
@@ -24,7 +24,7 @@
|
||||
<div class="tab2"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 热恋攻略 -->
|
||||
<!-- 熱戀攻略 -->
|
||||
<div class="page1">
|
||||
<img src="./images/page1Box1.png" alt="" class="page1Box1">
|
||||
<img src="./images/page1Box2.png" alt="" class="page1Box2">
|
||||
@@ -64,8 +64,8 @@
|
||||
<img src="./images/logo.png" alt="" class="left_tx">
|
||||
<img src="./images/logo.png" alt="" class="right_tx">
|
||||
<img src="./images/love.png" alt="" class="love">
|
||||
<div class="nickLeft">虚位以待</div>
|
||||
<div class="nickRight">虚位以待</div>
|
||||
<div class="nickLeft">虛位以待</div>
|
||||
<div class="nickRight">虛位以待</div>
|
||||
<div class="score">0</div>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -77,8 +77,8 @@
|
||||
<img src="./images/logo.png" alt="" class="left_tx">
|
||||
<img src="./images/logo.png" alt="" class="right_tx">
|
||||
<img src="./images/love.png" alt="" class="love">
|
||||
<div class="nickLeft">虚位以待</div>
|
||||
<div class="nickRight">虚位以待</div>
|
||||
<div class="nickLeft">虛位以待</div>
|
||||
<div class="nickRight">虛位以待</div>
|
||||
<div class="score">0</div>
|
||||
</li>
|
||||
<li>
|
||||
@@ -86,8 +86,8 @@
|
||||
<img src="./images/logo.png" alt="" class="left_tx">
|
||||
<img src="./images/logo.png" alt="" class="right_tx">
|
||||
<img src="./images/love.png" alt="" class="love">
|
||||
<div class="nickLeft">虚位以待</div>
|
||||
<div class="nickRight">虚位以待</div>
|
||||
<div class="nickLeft">虛位以待</div>
|
||||
<div class="nickRight">虛位以待</div>
|
||||
<div class="score">0</div>
|
||||
</li>
|
||||
<li>
|
||||
@@ -95,8 +95,8 @@
|
||||
<img src="./images/logo.png" alt="" class="left_tx">
|
||||
<img src="./images/logo.png" alt="" class="right_tx">
|
||||
<img src="./images/love.png" alt="" class="love">
|
||||
<div class="nickLeft">虚位以待</div>
|
||||
<div class="nickRight">虚位以待</div>
|
||||
<div class="nickLeft">虛位以待</div>
|
||||
<div class="nickRight">虛位以待</div>
|
||||
<div class="score">0</div>
|
||||
</li>
|
||||
<li>
|
||||
@@ -104,14 +104,14 @@
|
||||
<img src="./images/logo.png" alt="" class="left_tx">
|
||||
<img src="./images/logo.png" alt="" class="right_tx">
|
||||
<img src="./images/love.png" alt="" class="love">
|
||||
<div class="nickLeft">虚位以待</div>
|
||||
<div class="nickRight">虚位以待</div>
|
||||
<div class="nickLeft">虛位以待</div>
|
||||
<div class="nickRight">虛位以待</div>
|
||||
<div class="score">0</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 活动规则弹窗 -->
|
||||
<!-- 活動規則彈窗 -->
|
||||
<div class="rule">
|
||||
<div class="rule_in">
|
||||
<div class="tab">
|
||||
@@ -119,21 +119,22 @@
|
||||
<div class="tab2"></div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<img src="./images/rule1.png" alt="">
|
||||
<img src="./images/rule1.png" alt="" class="img1">
|
||||
<img src="./images/rule2.png" alt="" class="img2">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 活动结束弹窗 -->
|
||||
<!-- 活動結束彈窗 -->
|
||||
<div class="end">
|
||||
<div class="end_in">
|
||||
<img src="./images/endBut.png" alt="" class="but">
|
||||
</div>
|
||||
</div>
|
||||
<!-- 兑换记录弹窗 -->
|
||||
<!-- 兌換記錄彈窗 -->
|
||||
<div class="records">
|
||||
<div class="records_in">
|
||||
<div class="title">
|
||||
<div>兑换时间</div>
|
||||
<div>兌換時間</div>
|
||||
<div>商品</div>
|
||||
</div>
|
||||
<ul>
|
||||
|
@@ -8,7 +8,7 @@ var langReplace;
|
||||
var localLang;
|
||||
// 封裝layer消息提醒框
|
||||
let layerIndex
|
||||
const showLoading = (content = '加载中') => {
|
||||
const showLoading = (content = '加載中') => {
|
||||
layer.open({
|
||||
type: 2,
|
||||
shadeClose: false,
|
||||
@@ -53,6 +53,7 @@ $(function () {
|
||||
}
|
||||
})
|
||||
getCurrency();
|
||||
activityCodeInfo();
|
||||
}, 100)
|
||||
})
|
||||
|
||||
@@ -75,10 +76,10 @@ function getCurrency() {
|
||||
success(res) {
|
||||
if (res.code === 200) {
|
||||
res.data.forEach((res, i) => {
|
||||
if (res.taskValue <= 0) {
|
||||
if (res.stockValue <= 0) {
|
||||
$(`.page1 .page1Box4 .convert${i + 1}`).attr("src", './images/convertOut.png');
|
||||
$(`.page1 .page1Box4 .convert${i + 1}`).attr("click", 0);
|
||||
} else if (res.isExchange == false && taskValue >= res.taskValue) {
|
||||
} else if (taskValue >= res.taskValue) {
|
||||
$(`.page1 .page1Box4 .convert${i + 1}`).attr("src", './images/convert.png');
|
||||
$(`.page1 .page1Box4 .convert${i + 1}`).attr("click", 1);
|
||||
} else {
|
||||
@@ -86,6 +87,7 @@ function getCurrency() {
|
||||
$(`.page1 .page1Box4 .convert${i + 1}`).attr("click", 0);
|
||||
}
|
||||
$(`.page1 .page1Box4 .convert${i + 1}`).attr('taskCode', res.taskCode);
|
||||
$(`.page1 .page1Box4 .convert${i + 1}`).attr('conditionCode', res.conditionCode);
|
||||
$(`.page1 .page1Box4 .dayLimit${i + 1}`).text(`日限:${res.stockValue}`)
|
||||
})
|
||||
} else {
|
||||
@@ -95,7 +97,7 @@ function getCurrency() {
|
||||
},
|
||||
error(err) {
|
||||
hideLoading(layerIndex)
|
||||
toastMsg( '网络错误')
|
||||
toastMsg('網絡錯誤')
|
||||
}
|
||||
})
|
||||
} else {
|
||||
@@ -105,11 +107,35 @@ function getCurrency() {
|
||||
},
|
||||
error(err) {
|
||||
hideLoading(layerIndex)
|
||||
toastMsg( '网络错误')
|
||||
toastMsg('網絡錯誤')
|
||||
}
|
||||
})
|
||||
}
|
||||
// tab切换
|
||||
// 获取时间接口
|
||||
function activityCodeInfo() {
|
||||
showLoading()
|
||||
networkRequest({
|
||||
type: 'get',
|
||||
url: urlPrefix + '/activity/info',
|
||||
data: { activityCode: "ACT_2024_HOT_LOVE" },
|
||||
success(res) {
|
||||
if (res.code === 200) {
|
||||
// 判断活动结束时间
|
||||
if (res.timestamp > res.data.endTime) {
|
||||
$('.end').show();
|
||||
}
|
||||
} else {
|
||||
toastMsg(res.message)
|
||||
}
|
||||
hideLoading(layerIndex)
|
||||
},
|
||||
error(err) {
|
||||
hideLoading(layerIndex)
|
||||
toastMsg('網絡錯誤')
|
||||
}
|
||||
})
|
||||
}
|
||||
// tab切換
|
||||
$('.header .tab div').click(function () {
|
||||
var i = $(this).index() + 1;
|
||||
$('.header .tab div').removeClass('act1').removeClass('act2');
|
||||
@@ -121,7 +147,7 @@ $('.header .tab div').click(function () {
|
||||
}
|
||||
})
|
||||
|
||||
// 榜单接口
|
||||
// 榜單接口
|
||||
function getRank() {
|
||||
$('.page2 .my ul li').remove();
|
||||
$('.page2 .notFirst li').remove();
|
||||
@@ -134,7 +160,7 @@ function getRank() {
|
||||
if (res.code === 200) {
|
||||
var first = res.data.rankList.slice(0, 1);
|
||||
var notFirst = res.data.rankList.slice(1);
|
||||
// 处理第一名
|
||||
// 處理第一名
|
||||
if (first.length < 1) {
|
||||
let arr = new Array(3 - first.length).fill({
|
||||
leftAvatar: './images/logo.png',
|
||||
@@ -152,7 +178,7 @@ function getRank() {
|
||||
$('.page2 .first .rightNick').text(res.rightNick)
|
||||
$('.page2 .first .score').text(unitProcessing(res.score, 10000, 1, 'w'))
|
||||
})
|
||||
// 处理非第一名
|
||||
// 處理非第一名
|
||||
var str = '';
|
||||
notFirst.forEach((res, i) => {
|
||||
str += `
|
||||
@@ -167,11 +193,11 @@ function getRank() {
|
||||
</li>`
|
||||
})
|
||||
$('.page2 .notFirst').append(str);
|
||||
// 处理自己
|
||||
// 處理自己
|
||||
var strMy = '';
|
||||
if (res.data.meRankList.length <= 0) {
|
||||
$('.page2 .my .more').hide();
|
||||
strMy += `<li class="null">暂无组合~</li>`
|
||||
strMy += `<li class="null">暫無組合~</li>`
|
||||
} else {
|
||||
$('.page2 .my .more').show();
|
||||
res.data.meRankList.forEach((res, i) => {
|
||||
@@ -196,12 +222,12 @@ function getRank() {
|
||||
},
|
||||
error(err) {
|
||||
hideLoading(layerIndex)
|
||||
toastMsg( '网络错误')
|
||||
toastMsg('網絡錯誤')
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
// 榜单查看更多按钮
|
||||
// 榜單查看更多按鈕
|
||||
$('.page2 .my .more').click(function () {
|
||||
if (listMoreBool) {
|
||||
$('.page2 .my').css({ "height": '7.76rem', "background": "url(./images/my2.png) no-repeat", "background-size": "100% 100%" });
|
||||
@@ -217,89 +243,97 @@ $('.page2 .my .more').click(function () {
|
||||
$('.page2 .my ul').scrollTop(0);
|
||||
listMoreBool = !listMoreBool;
|
||||
})
|
||||
// 活动规则切换
|
||||
// 活動規則切換
|
||||
$('.rule .rule_in .tab div').click(function () {
|
||||
var i = $(this).index() + 1;
|
||||
$('.rule .rule_in .tab div').removeClass('act1').removeClass('act2');
|
||||
$(this).addClass(`act${i}`);
|
||||
$(`.rule .rule_in .box img`).attr('src', `./images/rule${i}.png`);
|
||||
// $(`.rule .rule_in .box img`).attr('src', `./images/rule${i}.png`);
|
||||
$(`.rule .rule_in .box .img1,.rule .rule_in .box .img2`).hide();
|
||||
$(`.rule .rule_in .box .img${i}`).show();
|
||||
i == 1 ? $('.rule .rule_in .box').removeClass('box2') : $('.rule .rule_in .box').addClass('box2');
|
||||
return false;
|
||||
})
|
||||
// 打开活动规则
|
||||
// 打開活動規則
|
||||
$('.header .rule_icon').click(function () {
|
||||
$('.rule').show();
|
||||
bodyScroolFun(true);
|
||||
})
|
||||
// 关闭活动规则
|
||||
// 關閉活動規則
|
||||
$('.rule').click(function () {
|
||||
$('.rule').hide();
|
||||
bodyScroolFun(false);
|
||||
})
|
||||
// 关闭活动结束
|
||||
// 關閉活動結束
|
||||
$('.end .but').click(function () {
|
||||
$('.end').hide();
|
||||
bodyScroolFun(false);
|
||||
$('.header .tab div').removeClass('act1').removeClass('act2');
|
||||
$('.header .tab .tab2').addClass(`act${2}`);
|
||||
$(`.page${2}`).show();
|
||||
$('.page1').hide();
|
||||
getRank();
|
||||
})
|
||||
// 打开记录弹窗
|
||||
// 打開記錄彈窗
|
||||
$('.page1 .page1Box4 .right').click(function () {
|
||||
$('.records .records_in ul li').remove();
|
||||
isLock = true;
|
||||
page = 1;
|
||||
record(page);
|
||||
$('.records').show();
|
||||
bodyScroolFun(true);
|
||||
})
|
||||
// 关闭记录弹窗
|
||||
// 關閉記錄彈窗
|
||||
$('.records').click(function () {
|
||||
$('.records').hide();
|
||||
bodyScroolFun(false);
|
||||
})
|
||||
// 兑换按钮
|
||||
// 兌換按鈕
|
||||
$('.page1 .page1Box4 .convert').click(function () {
|
||||
var taskcode = $(this).attr('taskcode');
|
||||
var conditionCode = $(this).attr('conditionCode');
|
||||
var bool = $(this).attr('click');
|
||||
if (bool == 1) {
|
||||
exchange(taskcode);
|
||||
exchange(taskcode, conditionCode);
|
||||
}
|
||||
})
|
||||
// 兑换接口
|
||||
function exchange(taskCode) {
|
||||
// 兌換接口
|
||||
function exchange(taskCode, conditionCode) {
|
||||
showLoading()
|
||||
networkRequest({
|
||||
type: 'post',
|
||||
url: urlPrefix + '/act/hotLove/exchange',
|
||||
data: { taskCode, activityCode: 'ACT_2024_HOT_LOVE', conditionCode: 'RE_LIAN_SHANG_DIAN' },
|
||||
data: { taskCode, activityCode: 'ACT_2024_HOT_LOVE', conditionCode, },
|
||||
success(res) {
|
||||
if (res.code === 200) {
|
||||
} else {
|
||||
getCurrency();
|
||||
toastMsg('兑换成功')
|
||||
toastMsg('兌換成功')
|
||||
} else {
|
||||
toastMsg(res.message)
|
||||
}
|
||||
hideLoading(layerIndex)
|
||||
},
|
||||
error(err) {
|
||||
hideLoading(layerIndex)
|
||||
toastMsg( '网络错误')
|
||||
toastMsg('網絡錯誤')
|
||||
}
|
||||
})
|
||||
}
|
||||
// 兑换记录滚动
|
||||
// 兌換記錄滾動
|
||||
$('.records .records_in ul').scroll(function () {
|
||||
let scrollTop = $(this).scrollTop()
|
||||
let scrollHeight = $('.record .record_in .ul1')[0].scrollHeight
|
||||
let scrollHeight = $('.records .records_in ul')[0].scrollHeight
|
||||
let ulHeight = $(this).innerHeight()
|
||||
if (scrollTop + ulHeight + 100 >= scrollHeight) {
|
||||
if (isLock) {
|
||||
// 請求下一頁
|
||||
page = page + 1;
|
||||
page++;
|
||||
record(page)
|
||||
isLock = false;
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
// 记录接口
|
||||
// 記錄接口
|
||||
function record(pageNum) {
|
||||
showLoading()
|
||||
networkRequest({
|
||||
@@ -309,11 +343,12 @@ function record(pageNum) {
|
||||
success(res) {
|
||||
if (res.code === 200) {
|
||||
var str = '';
|
||||
if (res.data.records.length >= 0) {
|
||||
str += `<li class="null"><div class="nulls">暂无</div><div class="nulls">暂无</div></li>`
|
||||
if (res.data.records.length <= 0 && pageNum == 1) {
|
||||
str += `<li class="null"><div class="nulls">暫無</div><div class="nulls">暫無</div></li>`
|
||||
isLock = false;
|
||||
} else {
|
||||
str += `
|
||||
res.data.records.forEach(res => {
|
||||
str += `
|
||||
<li>
|
||||
<div>
|
||||
<p>${dateFormat(res.createTime, "yyyy/MM/dd")}</p>
|
||||
@@ -324,9 +359,10 @@ function record(pageNum) {
|
||||
<b>${res.rewardNum}${rewardTypeFun(res.rewardType).unit}</b>
|
||||
</div>
|
||||
</li>
|
||||
`
|
||||
`})
|
||||
}
|
||||
$('.records .records_in ul').append(str);
|
||||
$('.records').show();
|
||||
} else {
|
||||
toastMsg(res.message)
|
||||
}
|
||||
@@ -334,7 +370,7 @@ function record(pageNum) {
|
||||
},
|
||||
error(err) {
|
||||
hideLoading(layerIndex)
|
||||
toastMsg( '网络错误')
|
||||
toastMsg('網絡錯誤')
|
||||
|
||||
}
|
||||
})
|
||||
|
@@ -1111,4 +1111,25 @@ function bodyScroolFun(bool) {
|
||||
$('body').css('overflow', 'auto');
|
||||
|
||||
}
|
||||
}
|
||||
function rewardTypeFun(type) {
|
||||
if (type == "HEADWEAR") {
|
||||
return { name: "头饰", unit: '天' };
|
||||
} else if (type == "NAMEPLATE") {
|
||||
return { name: "铭牌", unit: '天' };
|
||||
} else if (type == "CHATBUBBLE") {
|
||||
return { name: "气泡", unit: '天' };
|
||||
} else if (type == "INFOCARD") {
|
||||
return { name: "资料卡", unit: '天' };
|
||||
} else if (type == "CAR") {
|
||||
return { name: "座驾", unit: '天' };
|
||||
} else if (type == "GIFT") {
|
||||
return { name: "礼物", unit: '个' };
|
||||
} else if (type == "DIAMOND") {
|
||||
return { name: "钻石", unit: '个' };
|
||||
} else if (type == "GOLD") {
|
||||
return { name: "金币", unit: '个' };
|
||||
} else if (type == "EMPTY") {
|
||||
return { name: nick, unit: '个' };
|
||||
}
|
||||
}
|