修复bug

This commit is contained in:
dragon
2024-04-28 17:14:59 +08:00
parent 3984328459
commit 3ea9b0b772
9 changed files with 258 additions and 31 deletions

View File

@@ -80,13 +80,13 @@ body {
}
.box1 .signInIcon4 {
left: 3.92rem;
bottom: 8.18667rem;
left: 0.93333rem;
bottom: 5.93333rem;
}
.box1 .signInIcon5 {
left: 0.93333rem;
bottom: 5.93333rem;
left: 3.92rem;
bottom: 8.18667rem;
}
.box1 .signInIcon6 {
@@ -140,3 +140,75 @@ body {
display: block;
margin: 0 auto;
}
.pub {
position: fixed;
left: 0;
top: 0;
bottom: 0;
right: 0;
background: rgba(0, 0, 0, 0.6);
z-index: 999;
display: none;
}
.pub .pub_in {
width: 9.88rem;
height: 10.82667rem;
background: url(../images/bg.png) no-repeat;
background-size: 100% 100%;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}
.pub .pub_in .box {
width: 7rem;
height: 4rem;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 3.4rem;
display: flex;
justify-content: space-around;
align-items: center;
}
.pub .pub_in .box div {
width: 1.98667rem;
height: 2.26667rem;
overflow: hidden;
position: relative;
}
.pub .pub_in .box div img {
width: 1.98667rem;
height: 1.98667rem;
display: block;
margin-bottom: 0.15rem;
}
.pub .pub_in .box div .CHATBUBBLE {
width: 2.2rem;
height: 0.9rem;
margin-top: .7rem;
}
.pub .pub_in .box div p {
width: 100%;
text-align: center;
color: #fff;
font-size: 0.22667rem;
position: absolute;
bottom: 0rem;
}
.pub .pub_in .but {
width: 6rem;
height: 1rem;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 2.2rem;
}

View File

@@ -83,13 +83,13 @@ body {
}
.signInIcon4 {
left: px2rem(294);
bottom: px2rem(614);
left: px2rem(70);
bottom: px2rem(445);
}
.signInIcon5 {
left: px2rem(70);
bottom: px2rem(445);
left: px2rem(294);
bottom: px2rem(614);
}
.signInIcon6 {
@@ -143,4 +143,83 @@ body {
height: px2rem(408);
display: block;
margin: 0 auto;
}
.pub {
position: fixed;
left: 0;
top: 0;
bottom: 0;
right: 0;
background: rgba(0, 0, 0, .6);
z-index: 999;
display: none;
.pub_in {
width: px2rem(741);
height: px2rem(812);
background: url(../images/bg.png) no-repeat;
background-size: 100% 100%;
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
.box {
width: 7rem;
height: 4rem;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 3.4rem;
display: flex;
justify-content: space-around;
align-items: center;
div {
width: px2rem(149);
height: px2rem(170);
overflow: hidden;
position: relative;
img {
width: px2rem(149);
height: px2rem(149);
display: block;
// border-radius: 50%;
margin-bottom: 0.15rem;
}
.HEADWEAR {
// width: 2rem;
// height: 1rem;
}
.CHATBUBBLE {
width: 2.2rem;
height: 0.9rem;
margin-top: .7rem;
}
p {
width: 100%;
text-align: center;
color: #fff;
font-size: px2rem(17);
position: absolute;
bottom: 0rem;
}
}
}
.but {
width: 6rem;
height: 1rem;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 2.2rem;
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 345 KiB

View File

@@ -29,7 +29,7 @@
<img src="./images/signInOut.png" alt="" class="signInIcon signInIcon6">
<img src="./images/signInOut.png" alt="" class="signInIcon signInIcon7">
<div class="butBox">
<img src="./images/notSignInR.png" alt="" class="but1" style="display: none;">
<img src="./images/notSignInR.png" alt="" class="but1">
<img src="./images/notSignIn.png" alt="" class="but2">
</div>
</div>
@@ -39,6 +39,26 @@
<img src="./images/box3.png" alt="" class="box3">
<!-- 活動說明 -->
<img src="./images/box4.png" alt="" class="box4">
<!-- 弹窗 -->
<div class="pub">
<div class="pub_in">
<div class="but"></div>
<div class="box">
<!-- <div>
<img src="http://beta.img.pekolive.com/Fkswg1aPvJj8zruZNd0BHLxtFS4R?imageslim" alt="" class="">
<p>奖励*x天</p>
</div>
<div>
<img src="http://beta.img.pekolive.com/FldcxQ3WyJ1pcLJlg9McU5TZe1vP?imageslim" alt="" class="CHATBUBBLE">
<p>奖励*x天</p>
</div>
<div>
<img src="https://image.hfighting.com/69474adc-728a-4ba8-9a2e-da023ccc90d3" alt="" class="">
<p>奖励*x天</p>
</div> -->
</div>
</div>
</div>
</body>
</html>
@@ -48,4 +68,8 @@
<script src="../../common/js/layer.js"></script>
<script src="../../common/js/vconsole.min.js"></script>
<script src="../../common/js/route-constant.js"></script>
<script src="./js/index.js"></script>
<script src="./local/en.js"></script>
<script src="./local/zh.js"></script>
<script src="./local/ar.js"></script>
<script src="./js/index.js"></script>
<script src="../../common/local/langHandler.js"></script>

View File

@@ -4,6 +4,8 @@ let env = EnvCheck();
if (env == 'test') {
new VConsole();
}
var langReplace;
var localLang;
// 封裝layer消息提醒框
let layerIndex
const showLoading = (content = '加載中...') => {
@@ -29,6 +31,7 @@ const toastMsg = (content = '操作完成', time = 2) => {
// 初始化函數
$(function () {
getInfoFromClient()
fuzzyMatchUpdateQueryStringParameterFun(); // 判断语言
setTimeout(function () {
// 頁面全屏
if (browser.app) {
@@ -61,41 +64,53 @@ function getTask() {
res.data[0].children.forEach((val, i) => {
// 處理icon簽到狀態
if (val.referenceValue) {
$(`.box1 .signInIcon${i + 1}`).addClass('signInIconActive');
$(`.box1 .signInIcon${i + 1}`).attr('src', './images/signInImg.png');
$(`.box1 .signInIcon${res.data[0].children.length - (i)}`).addClass('signInIconActive');
$(`.box1 .signInIcon${res.data[0].children.length - (i)}`).attr('src', './images/signInOut.png');
} else {
$(`.box1 .signInIcon${i + 1}`).removeClass('signInIconActive');
$(`.box1 .signInIcon${res.data[0].children.length - (i)}`).removeClass('signInIconActive');
if (val.completed) {
$(`.box1 .signInIcon${i + 1}`).addClass('signInIconActive');
$(`.box1 .signInIcon${i + 1}`).attr('src', './images/signInOut.png');
$(`.box1 .signInIcon${res.data[0].children.length - (i)}`).addClass('signInIconActive');
$(`.box1 .signInIcon${res.data[0].children.length - (i)}`).attr('src', './images/signInOut.png');
} else {
$(`.box1 .signInIcon${i + 1}`).removeClass('signInIconActive');
$(`.box1 .signInIcon${res.data[0].children.length - (i)}`).removeClass('signInIconActive');
}
}
if (res.data[0].children[i].endTime <= res.timestamp && res.data[0].children[i].completed == false) {
$(`.box1 .signInIcon${res.data[0].children.length - (i)}`).attr('src', './images/signInImg.png');
$(`.box1 .signInIcon${res.data[0].children.length - (i)}`).show()
}
});
for (let index = 0; index < res.data[0].children.length; index++) {
if (res.timestamp >= res.data[0].children[index].startTime && res.timestamp <= res.data[0].children[index].endTime) {
$('.box1 .butBox .but2').attr('click', '1');
$('.box1 .butBox .but2').attr('src', './images/signIn.png');
// 处理签到icon
if (res.data[0].children[index].completed) {
$('.box1 .butBox .but2').attr('click', '0');
$('.box1 .butBox .but2').attr('src', './images/notSignIn.png');
} else {
$('.box1 .butBox .but2').attr('click', '1');
$('.box1 .butBox .but2').attr('src', './images/signIn.png');
}
hideLoading(layerIndex)
return
break
} else {
$('.box1 .butBox .but2').attr('click', '0');
$('.box1 .butBox .but2').attr('src', './images/notSignIn.png');
}
}
// res.data[0].children.forEach((val, i) => {
// if (res.timestamp >= val.startTime && res.timestamp <= val.endTime) {
// $('.box1 .butBox .but2').attr('click', '1');
// $('.box1 .butBox .but2').attr('src', './images/signIn.png');
// return
// } else {
// $('.box1 .butBox .but2').attr('click', '0');
// $('.box1 .butBox .but2').attr('src', './images/notSignIn.png');
// }
// });
}
for (let index = 0; index < res.data[0].children.length; index++) {
// 处理补签icon
if (res.data[0].children[index].endTime <= res.timestamp && res.data[0].children[index].completed == false) {
$('.box1 .butBox .but1').attr('click', '1');
$('.box1 .butBox .but1').attr('src', './images/signInR.png');
break
} else {
$('.box1 .butBox .but1').attr('click', '0');
$('.box1 .butBox .but1').attr('src', './images/notSignInR.png');
}
}
} else {
toastMsg(res.message)
}
@@ -117,6 +132,17 @@ function signin() {
success(res) {
if (res.code === 200) {
toastMsg('簽到成功');
var str = '';
res.data.forEach(res => {
str += `
<div>
<img src="${res.rewardIcon}" alt="" class="${res.rewardType}">
<p>${res.rewardName}*${res.expireDay}天</p>
</div>
`
})
$('.pub .pub_in .box').html(str);
$('.pub').show();
getTask();
} else {
toastMsg(res.message)
@@ -135,4 +161,15 @@ $('.box1 .butBox .but2').click(function () {
if (bool) {
signin();
}
})
// 补签按鈕
$('.box1 .butBox .but1').click(function () {
var bool = $(this).attr('click') == 1 ? true : false;
if (bool) {
toastMsg('任意房間送出【PICK燈牌*1】即可完成補簽');
}
})
// 关闭弹窗按鈕
$('.pub .pub_in .but').click(function () {
$('.pub').hide();
})

View File

@@ -0,0 +1,5 @@
// 阿拉伯
langAr = {
// 模块
demoModule: {}
}

View File

@@ -0,0 +1,5 @@
// 英文
langEn = {
// 模块
demoModule: {}
}

View File

@@ -0,0 +1,5 @@
// 中文
langZh = {
// 模塊
demoModule: {}
}

View File

@@ -737,7 +737,7 @@ function getInfoFromClient() {
} else {
// 非app环境调试参数
pubInfo.uid = sessionStorage.getItem("uid") ? sessionStorage.getItem("uid") : '';
pubInfo.ticket = sessionStorage.getItem("ticket") ? sessionStorage.getItem("ticket") : '';
// pubInfo.ticket = sessionStorage.getItem("ticket") ? sessionStorage.getItem("ticket") : '';
pubInfo.h5_token = sessionStorage.getItem("ticket") ? sessionStorage.getItem("ticket") : '';
pubInfo.deviceId = "0";
pubInfo.deviceInfo = {