繁体化
This commit is contained in:
@@ -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,19 +14,19 @@
|
||||
<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">
|
||||
<!-- 参与记录icon -->
|
||||
<!-- 參與記錄icon -->
|
||||
<img src="./images/record_icon.png" alt="" class="record_icon">
|
||||
<!-- Tab切换 -->
|
||||
<!-- Tab切換 -->
|
||||
<div class="tabBox">
|
||||
<div class="tab1 act1"></div>
|
||||
<div class="tab2"></div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 页面1 -->
|
||||
<!-- 頁面1 -->
|
||||
<div class="page1">
|
||||
<!-- 我的魔法棒 -->
|
||||
<div class="top">
|
||||
@@ -35,21 +35,21 @@
|
||||
<div class="centon">0</div>
|
||||
<div class="but"></div>
|
||||
</div>
|
||||
<!-- 小标题 -->
|
||||
<!-- 小標題 -->
|
||||
<img src="./images/page1Title.png" alt="" class="page1Title">
|
||||
<!-- 许愿列表 -->
|
||||
<!-- 許願列錶 -->
|
||||
<ul>
|
||||
<li>
|
||||
<div class="giftBox">
|
||||
<img src="./images/logo.png" alt="" class="giftImg">
|
||||
</div>
|
||||
<div class="giftInfo">
|
||||
<b>礼物名称</b>
|
||||
<b>禮物名稱</b>
|
||||
<img src="./images/diamond.png" alt="" class="diamond">
|
||||
<i>0</i>
|
||||
</div>
|
||||
<div class="inventory">库存0</div>
|
||||
<div class="schedule">许愿进度</div>
|
||||
<div class="inventory">庫存0</div>
|
||||
<div class="schedule">許願進度</div>
|
||||
<div class="line">
|
||||
<div class="line_in">
|
||||
<img src="./images/line.png" alt="">
|
||||
@@ -62,7 +62,7 @@
|
||||
</ul>
|
||||
<img src="./images/update.png" alt="" class="update">
|
||||
</div>
|
||||
<!-- 页面2 -->
|
||||
<!-- 頁面2 -->
|
||||
<div class="page2">
|
||||
<div class="listTab tab1">
|
||||
<div></div>
|
||||
@@ -72,34 +72,34 @@
|
||||
<li>
|
||||
<div class="num">1</div>
|
||||
<img src="./images/logo.png" alt="" class="tx">
|
||||
<div class="name">用户昵称</div>
|
||||
<div class="name">用戶昵稱</div>
|
||||
<div class="right">
|
||||
<p>0次</p>
|
||||
<b>许愿获奖次数</b>
|
||||
<b>許願獲獎次數</b>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="my">
|
||||
<div class="num">未上榜</div>
|
||||
<img src="./images/logo.png" alt="" class="tx">
|
||||
<div class="name">用户昵称</div>
|
||||
<div class="name">用戶昵稱</div>
|
||||
<div class="right">
|
||||
<p>0次</p>
|
||||
<b>许愿获奖次数</b>
|
||||
<b>許願獲獎次數</b>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 参与许愿弹窗 -->
|
||||
<!-- 參與許願彈窗 -->
|
||||
<div class="wishingPop">
|
||||
<div class="wishingPop_in">
|
||||
<!-- 标题 -->
|
||||
<!-- 標題 -->
|
||||
<img src="./images/wishIngtitle.png" alt="" class="wishIngtitle">
|
||||
<!-- h3 -->
|
||||
<h3>参与许愿次数</h3>
|
||||
<!-- 减 -->
|
||||
<h3>參與許願次數</h3>
|
||||
<!-- 減 -->
|
||||
<img src="./images/decrease.png" alt="" class="decrease">
|
||||
<!-- 输入框 -->
|
||||
<!-- 輸入框 -->
|
||||
<input type="number" value="1">
|
||||
<!-- 加 -->
|
||||
<img src="./images/add.png" alt="" class="add">
|
||||
@@ -120,16 +120,16 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 购买魔法棒弹窗 -->
|
||||
<!-- 購買魔法棒彈窗 -->
|
||||
<div class="magicStick">
|
||||
<div class="magicStick_in">
|
||||
<!-- 标题 -->
|
||||
<!-- 標題 -->
|
||||
<img src="./images/magicSticktitle.png" alt="" class="magicSticktitle">
|
||||
<!-- h3 -->
|
||||
<h3>可用魔法棒不足,请购买/购买数量</h3>
|
||||
<!-- 减 -->
|
||||
<h3>可用魔法棒不足,請購買/購買數量</h3>
|
||||
<!-- 減 -->
|
||||
<img src="./images/decrease.png" alt="" class="decrease">
|
||||
<!-- 输入框 -->
|
||||
<!-- 輸入框 -->
|
||||
<input type="number" value="1">
|
||||
<!-- 加 -->
|
||||
<img src="./images/add.png" alt="" class="add">
|
||||
@@ -150,7 +150,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 活动规则弹窗 -->
|
||||
<!-- 活動規則彈窗 -->
|
||||
<div class="rule">
|
||||
<div class="rule_in">
|
||||
<img src="./images/ruleTitle.png" alt="" class="ruleTitle">
|
||||
@@ -159,7 +159,7 @@
|
||||
<p>2.許願獎勵:每輪投入滿足規定的魔法棒數量後立即開獎,獎勵將會自動發放至獲獎者背包;</p>
|
||||
<p>3.許願開獎:玩家參與過其中任意物品的許願,開獎後將會有小秘書通知,也可以在【中獎記錄】查看自己的中獎記錄,以及曾經投入過的物品被誰帶走;</p>
|
||||
<p>4.許願榜單:許願榜單分為日榜和總榜,日榜每日00:00更新;</p>
|
||||
<p>5.中獎概率:玩家投入魔法棒數量/規定開獎數量=玩家概率。(提示高概率不代表一定中獎哦);</p>
|
||||
<p>5.中獎概率:玩家投入魔法棒數量/規定開獎數量=玩家概率。(提示高概率不代錶一定中獎哦);</p>
|
||||
<p>6.活動結束時間另行通知,請留意小秘書公告;</p>
|
||||
<p>7.如有作弊行為,官方有權清除作弊者所得的所有獎勵;</p>
|
||||
<p>8.有任何疑問請聯繫客服(LINE:pekoyuyin、app內搜索ID:10001、WeChat:sd245376);</p>
|
||||
@@ -168,7 +168,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 参与记录 -->
|
||||
<!-- 參與記錄 -->
|
||||
<div class="record">
|
||||
<div class="record_in">
|
||||
<img src="./images/recordTitl.png" alt="" class="recordTitl">
|
||||
@@ -196,12 +196,12 @@
|
||||
<i>2024-02-23</i>
|
||||
</div>
|
||||
<div class="center">
|
||||
<p>许愿:礼物名称</p>
|
||||
<i>进行中</i>
|
||||
<p>許願:禮物名稱</p>
|
||||
<i>進行中</i>
|
||||
</div>
|
||||
<div class="right">
|
||||
<p>我是用户昵</p>
|
||||
<i>获得</i>
|
||||
<p>我是用戶昵</p>
|
||||
<i>獲得</i>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
@@ -210,26 +210,26 @@
|
||||
<i>2024-02-23</i>
|
||||
</div>
|
||||
<div class="center">
|
||||
<p>许愿:礼物名称</p>
|
||||
<i>进行中</i>
|
||||
<p>許願:禮物名稱</p>
|
||||
<i>進行中</i>
|
||||
</div>
|
||||
<div class="right">
|
||||
<p>我是用户昵</p>
|
||||
<i>获得</i>
|
||||
<p>我是用戶昵</p>
|
||||
<i>獲得</i>
|
||||
</div>
|
||||
</li> -->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 去充值弹窗 -->
|
||||
<!-- 去充值彈窗 -->
|
||||
<div class="goToPay">
|
||||
<div class="goToPay_in">
|
||||
<div class="but"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 购买成功弹窗 -->
|
||||
<!-- 購買成功彈窗 -->
|
||||
<div class="buySuccess">
|
||||
<div class="buySuccess_in">
|
||||
<h3>購買成功</h3>
|
||||
|
@@ -26,8 +26,8 @@ const toastMsg = (content = '操作完成', time = 2) => {
|
||||
skin: 'msg'
|
||||
})
|
||||
}
|
||||
var mymagicStickNum = 0;//魔法棒数量
|
||||
var getRankType = 1;//1=今日奖励榜,2=次数总榜
|
||||
var mymagicStickNum = 0;//魔法棒數量
|
||||
var getRankType = 1;//1=今日獎勵榜,2=次數總榜
|
||||
// 初始化函數
|
||||
$(function () {
|
||||
getInfoFromClient()
|
||||
@@ -104,7 +104,7 @@ function getConfig () {
|
||||
$('.page1 .update').click(function () {
|
||||
getConfig();
|
||||
})
|
||||
// 榜单接口
|
||||
// 榜單接口
|
||||
function getRank (type) {
|
||||
showLoading()
|
||||
networkRequest({
|
||||
@@ -129,7 +129,7 @@ function getRank (type) {
|
||||
})
|
||||
$('.page2 .listBox li').remove()
|
||||
$('.page2 .listBox').append(str);
|
||||
// 处理自己
|
||||
// 處理自己
|
||||
$('.page2 .my .num').text(res.data.meRank.ranking == 0 ? '未上榜' : res.data.meRank.ranking);
|
||||
$('.page2 .my .tx').attr('src', res.data.meRank.avatar);
|
||||
$('.page2 .my .name').text(res.data.meRank.nick);
|
||||
@@ -145,7 +145,7 @@ function getRank (type) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// Tab切换
|
||||
// Tab切換
|
||||
$('.header .tabBox').on('click', ' div', function () {
|
||||
var i = $(this).index() + 1;
|
||||
$('.header .tabBox div').removeClass('act1').removeClass('act2');
|
||||
@@ -156,7 +156,7 @@ $('.header .tabBox').on('click', ' div', function () {
|
||||
getRank(getRankType);
|
||||
}
|
||||
})
|
||||
// 榜单切换
|
||||
// 榜單切換
|
||||
$('.page2 .listTab div').click(function () {
|
||||
var i = $(this).index() + 1;
|
||||
$(this).parent('.listTab').removeClass('tab1').removeClass('tab2');
|
||||
@@ -164,19 +164,19 @@ $('.page2 .listTab div').click(function () {
|
||||
getRankType = i;
|
||||
getRank(getRankType);
|
||||
})
|
||||
// 打开活动规则弹窗
|
||||
// 打開活動規則彈窗
|
||||
$('.header .rule_icon').click(function () {
|
||||
$('.rule').show();
|
||||
bodyScroolFun(true);
|
||||
})
|
||||
// 关闭活动规则弹窗
|
||||
// 關閉活動規則彈窗
|
||||
$('.rule').click(function () {
|
||||
$('.rule').hide();
|
||||
bodyScroolFun(false);
|
||||
})
|
||||
var page = 1;
|
||||
var isLock = true;
|
||||
// 中奖记录接口
|
||||
// 中獎記錄接口
|
||||
function listLuckyRecord (page) {
|
||||
showLoading();
|
||||
networkRequest({
|
||||
@@ -218,7 +218,7 @@ function listLuckyRecord (page) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 参与记录
|
||||
// 參與記錄
|
||||
function listRoundRecord (page) {
|
||||
showLoading();
|
||||
networkRequest({
|
||||
@@ -240,7 +240,7 @@ function listRoundRecord (page) {
|
||||
</div>
|
||||
<div class="center">
|
||||
<p>許願:${res.gift.giftName}</p>
|
||||
<i>${res.luckyUser ? '已结束' : '進行中'}</i>
|
||||
<i>${res.luckyUser ? '已結束' : '進行中'}</i>
|
||||
</div>
|
||||
<div class="right">
|
||||
<p>${res.luckyUser ? res.luckyUser.nick : ''}</p>
|
||||
@@ -264,7 +264,7 @@ function listRoundRecord (page) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 打开参与记录按钮
|
||||
// 打開參與記錄按鈕
|
||||
$('.header .record_icon').click(function () {
|
||||
$('.record .record_in .ul1 li').remove();
|
||||
page = 1;
|
||||
@@ -277,7 +277,7 @@ $('.header .record_icon').click(function () {
|
||||
$('.record').show();
|
||||
bodyScroolFun(true);
|
||||
})
|
||||
// 切换参与记录按钮
|
||||
// 切換參與記錄按鈕
|
||||
$('.record .record_in .recordtab div').click(function () {
|
||||
var i = $(this).index() + 1;
|
||||
$('.record .record_in .recordtab div').removeClass('act1').removeClass('act2');
|
||||
@@ -295,50 +295,50 @@ $('.record .record_in .recordtab div').click(function () {
|
||||
$(`.record .record_in .ul${i}`).show();
|
||||
return false;
|
||||
})
|
||||
// 监听滚动1
|
||||
// 監聽滾動1
|
||||
$('.record .record_in .ul1').scroll(function () {
|
||||
let scrollTop = $(this).scrollTop()
|
||||
let scrollHeight = $('.record .record_in .ul1')[0].scrollHeight
|
||||
let ulHeight = $(this).innerHeight()
|
||||
if (scrollTop + ulHeight + 100 >= scrollHeight) {
|
||||
if (isLock) {
|
||||
// 请求下一页
|
||||
// 請求下一頁
|
||||
page = page + 1;
|
||||
listLuckyRecord(page)
|
||||
isLock = false;
|
||||
}
|
||||
}
|
||||
})
|
||||
// 监听滚动2
|
||||
// 監聽滾動2
|
||||
$('.record .record_in .ul2').scroll(function () {
|
||||
let scrollTop = $(this).scrollTop()
|
||||
let scrollHeight = $('.record .record_in .ul2')[0].scrollHeight
|
||||
let ulHeight = $(this).innerHeight()
|
||||
if (scrollTop + ulHeight + 100 >= scrollHeight) {
|
||||
if (isLock) {
|
||||
// 请求下一页
|
||||
// 請求下一頁
|
||||
page = page + 1;
|
||||
listRoundRecord(page)
|
||||
isLock = false;
|
||||
}
|
||||
}
|
||||
})
|
||||
// 关闭参与记录按钮
|
||||
// 關閉參與記錄按鈕
|
||||
$('.record').click(function () {
|
||||
$('.record').hide();
|
||||
bodyScroolFun(false);
|
||||
})
|
||||
// 关闭去充值弹窗
|
||||
// 關閉去充值彈窗
|
||||
$('.goToPay').click(function () {
|
||||
$('.goToPay').hide();
|
||||
bodyScroolFun(false);
|
||||
})
|
||||
// 关闭购买成功按钮
|
||||
// 關閉購買成功按鈕
|
||||
$('.buySuccess .buySuccess_in .buySuccessBut').click(function () {
|
||||
$('.buySuccess').hide();
|
||||
bodyScroolFun(false);
|
||||
})
|
||||
// 去充值按钮
|
||||
// 去充值按鈕
|
||||
$('.goToPay .goToPay_in .but').click(function () {
|
||||
if (browser.app) {
|
||||
if (browser.android) {
|
||||
@@ -373,10 +373,10 @@ function magicStick (type, num) {
|
||||
// 加
|
||||
magicStickNum++;
|
||||
} else if (type == 2) {
|
||||
// 减
|
||||
// 減
|
||||
magicStickNum--;
|
||||
} else if (type == 3) {
|
||||
// 快捷购买
|
||||
// 快捷購買
|
||||
magicStickNum += num;
|
||||
} else {
|
||||
}
|
||||
@@ -385,42 +385,42 @@ function magicStick (type, num) {
|
||||
$('.magicStick .magicStick_in .magicSticks b').text(magicStickNum * 100);
|
||||
$('.magicStick .magicStick_in input').val(magicStickNum);
|
||||
}
|
||||
// 打开购买魔法棒弹窗
|
||||
// 打開購買魔法棒彈窗
|
||||
$('.page1 .top .but').click(function () {
|
||||
$('.magicStick .magicStick_in h3').text('購買數量');
|
||||
$('.magicStick').show();
|
||||
bodyScroolFun(true);
|
||||
})
|
||||
// 魔法棒加弹窗
|
||||
// 魔法棒加彈窗
|
||||
$('.magicStick .magicStick_in .add').click(function () {
|
||||
magicStick(1)
|
||||
return false;
|
||||
})
|
||||
// 魔法棒减弹窗
|
||||
// 魔法棒減彈窗
|
||||
$('.magicStick .magicStick_in .decrease').click(function () {
|
||||
magicStick(2)
|
||||
return false;
|
||||
})
|
||||
// 魔法棒快捷购买弹窗
|
||||
// 魔法棒快捷購買彈窗
|
||||
$('.magicStick .magicStick_in .quickAddition div').click(function () {
|
||||
var num = Number($(this).attr('num'));
|
||||
magicStick(3, num)
|
||||
return false;
|
||||
})
|
||||
// 监听输入框的变化
|
||||
// 監聽輸入框的變化
|
||||
$('.magicStick .magicStick_in input').on('input', function () {
|
||||
magicStick();
|
||||
})
|
||||
// 魔法棒输入框弹窗
|
||||
// 魔法棒輸入框彈窗
|
||||
$('.magicStick .magicStick_in input').click(function () {
|
||||
return false;
|
||||
})
|
||||
// 关闭购买魔法棒弹窗
|
||||
// 關閉購買魔法棒彈窗
|
||||
$('.magicStick').click(function () {
|
||||
$('.magicStick').hide();
|
||||
bodyScroolFun(false);
|
||||
})
|
||||
// 确认购买魔法棒按钮
|
||||
// 確認購買魔法棒按鈕
|
||||
$('.magicStick .magicStick_in .but').click(function () {
|
||||
if (magicStickNum <= 0) {
|
||||
return toastMsg('購買數量不能小於1')
|
||||
@@ -428,7 +428,7 @@ $('.magicStick .magicStick_in .but').click(function () {
|
||||
buyStick(magicStickNum)
|
||||
bodyScroolFun(false);
|
||||
})
|
||||
// 购买魔法棒
|
||||
// 購買魔法棒
|
||||
function buyStick (num) {
|
||||
showLoading()
|
||||
networkRequest({
|
||||
@@ -465,10 +465,10 @@ function wishing (type, num) {
|
||||
// 加
|
||||
wishingNum++;
|
||||
} else if (type == 2) {
|
||||
// 减
|
||||
// 減
|
||||
wishingNum--;
|
||||
} else if (type == 3) {
|
||||
// 快捷购买
|
||||
// 快捷購買
|
||||
wishingNum += num;
|
||||
} else {
|
||||
}
|
||||
@@ -476,36 +476,36 @@ function wishing (type, num) {
|
||||
wishingNum >= 99999999 ? wishingNum = 99999999 : wishingNum = wishingNum;
|
||||
$('.wishingPop .wishingPop_in input').val(wishingNum);
|
||||
}
|
||||
// 许愿加弹窗
|
||||
// 許願加彈窗
|
||||
$('.wishingPop .wishingPop_in .add').click(function () {
|
||||
wishing(1)
|
||||
return false;
|
||||
})
|
||||
// 许愿减弹窗
|
||||
// 許願減彈窗
|
||||
$('.wishingPop .wishingPop_in .decrease').click(function () {
|
||||
wishing(2)
|
||||
return false;
|
||||
})
|
||||
// 许愿快捷购买弹窗
|
||||
// 許願快捷購買彈窗
|
||||
$('.wishingPop .wishingPop_in .quickAddition div').click(function () {
|
||||
var num = Number($(this).attr('num'));
|
||||
wishing(3, num)
|
||||
return false;
|
||||
})
|
||||
// 监听输入框的变化
|
||||
// 監聽輸入框的變化
|
||||
$('.wishingPop .wishingPop_in input').on('input', function () {
|
||||
wishing();
|
||||
})
|
||||
// 许愿输入框弹窗
|
||||
// 許願輸入框彈窗
|
||||
$('.wishingPop .wishingPop_in input').click(function () {
|
||||
return false;
|
||||
})
|
||||
// 关闭许愿弹窗
|
||||
// 關閉許願彈窗
|
||||
$('.wishingPop').click(function () {
|
||||
$('.wishingPop').hide();
|
||||
bodyScroolFun(false);
|
||||
})
|
||||
// 许愿按钮
|
||||
// 許願按鈕
|
||||
var roundId;
|
||||
var configId;
|
||||
$('.page1 ul').on('click', 'li .wishIngBut', function () {
|
||||
@@ -513,19 +513,19 @@ $('.page1 ul').on('click', 'li .wishIngBut', function () {
|
||||
roundId = $(this).attr('roundId');
|
||||
configId = $(this).attr('configId');
|
||||
if (stockNum == 0) {
|
||||
toastMsg('该礼物库存不足,无法进行许愿');
|
||||
toastMsg('該禮物庫存不足,無法進行許願');
|
||||
return;
|
||||
}
|
||||
$('.wishingPop').show();
|
||||
})
|
||||
// 确认许愿按钮
|
||||
// 確認許願按鈕
|
||||
$('.wishingPop .wishingPop_in .but').click(function () {
|
||||
console.log(wishingNum < mymagicStickNum);
|
||||
if (wishingNum <= 0) {
|
||||
return toastMsg('許願數量不能小於1')
|
||||
}
|
||||
if (wishingNum > mymagicStickNum) {
|
||||
$('.magicStick .magicStick_in h3').text('可用魔法棒不足,请购买');
|
||||
$('.magicStick .magicStick_in h3').text('可用魔法棒不足,請購買');
|
||||
$('.magicStick').show();
|
||||
bodyScroolFun(true);
|
||||
} else {
|
||||
@@ -534,7 +534,7 @@ $('.wishingPop .wishingPop_in .but').click(function () {
|
||||
}
|
||||
|
||||
})
|
||||
// 许愿接口
|
||||
// 許願接口
|
||||
function promise (num, configId) {
|
||||
showLoading()
|
||||
networkRequest({
|
||||
@@ -545,9 +545,9 @@ function promise (num, configId) {
|
||||
if (res.code === 200) {
|
||||
wishingNum = 1;
|
||||
$('.wishingPop .wishingPop_in input').val(wishingNum)
|
||||
toastMsg('参与许愿成功')
|
||||
toastMsg('參與許願成功')
|
||||
} else if (res.code === 5003) {
|
||||
$('.magicStick .magicStick_in h3').text('可用魔法棒不足,请购买');
|
||||
$('.magicStick .magicStick_in h3').text('可用魔法棒不足,請購買');
|
||||
$('.magicStick').show();
|
||||
} else {
|
||||
toastMsg(res.message)
|
||||
|
Reference in New Issue
Block a user