替换为繁体
This commit is contained in:
@@ -26,20 +26,20 @@ const toastMsg = (content = '操作完成', time = 2) => {
|
||||
skin: 'msg'
|
||||
})
|
||||
}
|
||||
var xiqueNum = 0;//当前剩余喜鹊数量
|
||||
var roomUid = 0;//房间uid
|
||||
var giftId = 0;//默认礼物id
|
||||
var xiqueBut = true;//投放喜鹊锁
|
||||
var data = null;//默认日榜
|
||||
var rankType = 1;//排行榜类型(1=甜蜜日榜,2=甜蜜总榜,3=爱意日榜,4=爱意总榜)
|
||||
var curDate;//当天日期
|
||||
var nextHourTimeStamp;//下一轮结束时间戳
|
||||
var leftTime;//倒计时暂存
|
||||
var timeOut2;//储存定时器
|
||||
var redLineNum = 0;//红绳数量
|
||||
var page = 1;//页码
|
||||
var pageSizeLack = true;// 下拉更多锁
|
||||
var lack = true;// 抽奖锁
|
||||
var xiqueNum = 0;//當前剩余喜鵲數量
|
||||
var roomUid = 0;//房間uid
|
||||
var giftId = 0;//默認禮物id
|
||||
var xiqueBut = true;//投放喜鵲鎖
|
||||
var data = null;//默認日榜
|
||||
var rankType = 1;//排行榜類型(1=甜蜜日榜,2=甜蜜總榜,3=愛意日榜,4=愛意總榜)
|
||||
var curDate;//當天日期
|
||||
var nextHourTimeStamp;//下一輪結束時間戳
|
||||
var leftTime;//倒計時暫存
|
||||
var timeOut2;//儲存定時器
|
||||
var redLineNum = 0;//紅繩數量
|
||||
var page = 1;//頁碼
|
||||
var pageSizeLack = true;// 下拉更多鎖
|
||||
var lack = true;// 抽獎鎖
|
||||
// 初始化函數
|
||||
$(function () {
|
||||
setTimeout(function () {
|
||||
@@ -76,22 +76,22 @@ function getConfig () {
|
||||
data: {},
|
||||
success (res) {
|
||||
if (res.code === 200) {
|
||||
// 处理活动时间
|
||||
// 處理活動時間
|
||||
$('.header .titleHeader').text(`活動時間:${dateFormat(res.data.startTime, 'yyyy年MM月dd日')}-${dateFormat(res.data.endTime, 'yyyy年MM月dd日')}`)
|
||||
// 当前用户喜鹊
|
||||
// 當前用戶喜鵲
|
||||
xiqueNum = res.data.xiqueNum
|
||||
$('.page1 .magpieBridge .birdNum b').text(`我的喜鵲: ${res.data.xiqueNum}`)
|
||||
// 处理当前喜鹊进度状态值
|
||||
// 處理當前喜鵲進度狀態值
|
||||
var curXiqueNums = res.data.serverCurXiqueNum / res.data.serverMaxXiqueNum * 100;
|
||||
$('.page1 .magpieBridge .line .line_in').css('width', curXiqueNums >= 100 ? '100%' : `${curXiqueNums}%`);
|
||||
// 处理领取喜鹊头饰按钮状态
|
||||
if (res.data.devotedBtnStatus == 0) {//投入按钮状态(0=可投入,1=可领取,2=不能领取,-1=已领取)
|
||||
// 處理領取喜鵲頭飾按鈕狀態
|
||||
if (res.data.devotedBtnStatus == 0) {//投入按鈕狀態(0=可投入,1=可領取,2=不能領取,-1=已領取)
|
||||
$('.page1 .magpieBridge .buting').hide();
|
||||
$('.page1 .magpieBridge .buterr').hide();
|
||||
$('.page1 .magpieBridge .butout').hide();
|
||||
$('.page1 .magpieBridge .but1').show();
|
||||
$('.page1 .magpieBridge .but10').show();
|
||||
} else if (res.data.devotedBtnStatus == 1) {//投入按钮状态(0=可投入,1=可领取,2=不能领取,-1=已领取)
|
||||
} else if (res.data.devotedBtnStatus == 1) {//投入按鈕狀態(0=可投入,1=可領取,2=不能領取,-1=已領取)
|
||||
$('.page1 .magpieBridge .buting').show();
|
||||
$('.page1 .magpieBridge .but1').hide();
|
||||
$('.page1 .magpieBridge .but10').hide();
|
||||
@@ -104,7 +104,7 @@ function getConfig () {
|
||||
$('.page1 .magpieBridge .but1').hide();
|
||||
$('.page1 .magpieBridge .but10').hide();
|
||||
}
|
||||
// 处理任务状态
|
||||
// 處理任務狀態
|
||||
res.data.dailyTaskList.forEach((res, i) => {
|
||||
$(`.page1 .task .box1 .task${i + 1} .p2`).text(`獎勵:喜鵲*${res.xiqueNum}`)
|
||||
if (res.btnStatus == 1) {//已完成
|
||||
@@ -131,7 +131,7 @@ function getConfig () {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取房间Uid接口
|
||||
// 獲取房間Uid接口
|
||||
function getRecommendRoom () {
|
||||
showLoading()
|
||||
networkRequest({
|
||||
@@ -162,10 +162,10 @@ function redLineGetConfig () {
|
||||
data: { pub_ticket: pubInfo.ticket, pub_uid: pubInfo.uid },
|
||||
success (res) {
|
||||
if (res.code === 200) {
|
||||
// 设置红绳数量
|
||||
// 設置紅繩數量
|
||||
redLineNum = res.data.redLineNum;
|
||||
$('.page2 .blessingTree .redRope b').text(res.data.redLineNum);
|
||||
// 渲染祈福列表
|
||||
// 渲染祈福列錶
|
||||
res.data.drawList.forEach((res, i) => {
|
||||
$(`.page2 .blessingTree .lantern${i + 1}`).attr('id', res.id);
|
||||
if (res.able) {
|
||||
@@ -190,7 +190,7 @@ function redLineGetConfig () {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 祈福抽奖接口
|
||||
// 祈福抽獎接口
|
||||
function redLineDraw (id) {
|
||||
// showLoading()
|
||||
networkRequest({
|
||||
@@ -227,7 +227,7 @@ function redLineDraw (id) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 默认抽奖祈福按钮
|
||||
// 默認抽獎祈福按鈕
|
||||
$('.page2 .blessingTree .but').click(function () {
|
||||
if (redLineNum > 0) {
|
||||
if (lack) {
|
||||
@@ -235,10 +235,10 @@ $('.page2 .blessingTree .but').click(function () {
|
||||
redLineDraw(null);
|
||||
}
|
||||
} else {
|
||||
toastMsg('红绳数量不足,可参与投放喜鹊活动获得')
|
||||
toastMsg('紅繩數量不足,可參與投放喜鵲活動獲得')
|
||||
}
|
||||
})
|
||||
// 指定抽奖
|
||||
// 指定抽獎
|
||||
$('.page2 .blessingTree .lantern').click(function () {
|
||||
var id = $(this).attr('id');
|
||||
if (redLineNum > 0) {
|
||||
@@ -247,10 +247,10 @@ $('.page2 .blessingTree .lantern').click(function () {
|
||||
redLineDraw(id);
|
||||
}
|
||||
} else {
|
||||
toastMsg('红绳数量不足,可参与投放喜鹊活动获得')
|
||||
toastMsg('紅繩數量不足,可參與投放喜鵲活動獲得')
|
||||
}
|
||||
})
|
||||
// 播放喜鹊svg
|
||||
// 播放喜鵲svg
|
||||
function blessingTreeSvgaFun1 () {
|
||||
$('.page2 .blessingTree .blessingTreeSvga1').show();
|
||||
setTimeout(function () {
|
||||
@@ -270,7 +270,7 @@ function blessingTreeSvgaFun1 () {
|
||||
})
|
||||
})
|
||||
}
|
||||
// 播放喜鹊svg
|
||||
// 播放喜鵲svg
|
||||
function blessingTreeSvgaFun2 () {
|
||||
$('.page2 .blessingTree .blessingTreeSvga2').show();
|
||||
setTimeout(function () {
|
||||
@@ -290,7 +290,7 @@ function blessingTreeSvgaFun2 () {
|
||||
})
|
||||
})
|
||||
}
|
||||
// 播放喜鹊svg
|
||||
// 播放喜鵲svg
|
||||
function blessingTreeSvgaFun3 () {
|
||||
$('.page2 .blessingTree .blessingTreeSvga3').show();
|
||||
setTimeout(function () {
|
||||
@@ -310,7 +310,7 @@ function blessingTreeSvgaFun3 () {
|
||||
})
|
||||
})
|
||||
}
|
||||
// 播放喜鹊svg
|
||||
// 播放喜鵲svg
|
||||
function blessingTreeSvgaFun4 () {
|
||||
$('.page2 .blessingTree .blessingTreeSvga4').show();
|
||||
setTimeout(function () {
|
||||
@@ -352,22 +352,22 @@ function fresh () {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 刷新按钮
|
||||
// 刷新按鈕
|
||||
$('.page2 .blessingTree .refresh').click(function () {
|
||||
fresh();
|
||||
})
|
||||
// 定情信物礼物轮播
|
||||
// 定情信物禮物輪播
|
||||
function swiperFun () {
|
||||
var mySwiper = new Swiper('.swiper', {
|
||||
direction: "vertical",
|
||||
loop: true,
|
||||
autoplay: {
|
||||
delay: 2000,//3秒切换一次
|
||||
delay: 2000,//3秒切換一次
|
||||
disableOnInteraction: false
|
||||
}
|
||||
})
|
||||
}
|
||||
// 总tab切换
|
||||
// 總tab切換
|
||||
$('.tabs div').click(function () {
|
||||
var i = $(this).index() + 1;
|
||||
$('.tabs').removeClass('tab1').removeClass('tab2').removeClass('tab3').removeClass('tab4');
|
||||
@@ -390,7 +390,7 @@ $('.tabs div').click(function () {
|
||||
getCpRank();
|
||||
}
|
||||
})
|
||||
// 房间榜单接口
|
||||
// 房間榜單接口
|
||||
function getRoomRank () {
|
||||
$('.page3 ul li').remove();
|
||||
showLoading()
|
||||
@@ -402,11 +402,11 @@ function getRoomRank () {
|
||||
if (res.code === 200) {
|
||||
var top3 = res.data.rankList.slice(0, 3);
|
||||
var notTop3 = res.data.rankList.slice(3);
|
||||
// 处理前三
|
||||
// 處理前三
|
||||
if (top3.length < 3) {
|
||||
let arr = new Array(3 - top3.length).fill({
|
||||
avatar: './images/logo.png',
|
||||
nick: '虚位以待',
|
||||
nick: '虛位以待',
|
||||
score: "0"
|
||||
})
|
||||
top3.push(...arr)
|
||||
@@ -417,7 +417,7 @@ function getRoomRank () {
|
||||
$(`.page3 .no${index + 1} b`).text(`情緣值:${unitProcessing(res.score, 10000, 1, 'w')}`);
|
||||
$(`.page3 .no${index + 1} .txBg`).attr('uid', res.uid);
|
||||
})
|
||||
// 跳转前三房间
|
||||
// 跳轉前三房間
|
||||
$('.page3 .no .txBg').click(function () {
|
||||
var uid = $(this).attr('uid');
|
||||
if (browser.ios) {
|
||||
@@ -444,7 +444,7 @@ function getRoomRank () {
|
||||
`
|
||||
})
|
||||
$('.page3 ul').append(str);
|
||||
// 跳转非前三房间
|
||||
// 跳轉非前三房間
|
||||
$('.page3 ul li .tx').click(function () {
|
||||
var uid = $(this).attr('uid');
|
||||
if (browser.ios) {
|
||||
@@ -455,7 +455,7 @@ function getRoomRank () {
|
||||
}
|
||||
}
|
||||
})
|
||||
// 处理自己榜单
|
||||
// 處理自己榜單
|
||||
var meRank = res.data.meRank;
|
||||
$('.page3 .my .num').text(meRank.ranking == 0 ? '未上榜' : meRank.ranking);
|
||||
$('.page3 .my .tx').attr('src', meRank.avatar);
|
||||
@@ -472,7 +472,7 @@ function getRoomRank () {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取情缘榜接口
|
||||
// 獲取情緣榜接口
|
||||
function getRank (date, rankType) {
|
||||
$('.page4 ul li').remove();
|
||||
showLoading()
|
||||
@@ -482,9 +482,9 @@ function getRank (date, rankType) {
|
||||
data: { date, rankType },
|
||||
success (res) {
|
||||
if (res.code === 200) {
|
||||
// 设置当天日期
|
||||
// 設置當天日期
|
||||
curDate = res.data.curDate;
|
||||
// 处理日期
|
||||
// 處理日期
|
||||
if (res.data.dateList) {
|
||||
res.data.dateList.forEach((res, i) => {
|
||||
$('.page4 .timeList div').eq(i).text(`${res[6]}.${res[8]}${res[9]}`);
|
||||
@@ -497,11 +497,11 @@ function getRank (date, rankType) {
|
||||
}
|
||||
var top3 = res.data.rankList.slice(0, 3);
|
||||
var notTop3 = res.data.rankList.slice(3);
|
||||
// 处理前三
|
||||
// 處理前三
|
||||
if (top3.length < 3) {
|
||||
let arr = new Array(3 - top3.length).fill({
|
||||
avatar: './images/logo.png',
|
||||
nick: '虚位以待',
|
||||
nick: '虛位以待',
|
||||
score: "0"
|
||||
})
|
||||
top3.push(...arr)
|
||||
@@ -512,7 +512,7 @@ function getRank (date, rankType) {
|
||||
if (rankType == 1 || rankType == 2) {
|
||||
$(`.page4 .no${index + 1} b`).text(`甜蜜值:${unitProcessing(res.score, 10000, 1, 'w')}`);
|
||||
} else {
|
||||
$(`.page4 .no${index + 1} b`).text(`心动值:${unitProcessing(res.score, 10000, 1, 'w')}`);
|
||||
$(`.page4 .no${index + 1} b`).text(`心動值:${unitProcessing(res.score, 10000, 1, 'w')}`);
|
||||
}
|
||||
})
|
||||
// 非前三
|
||||
@@ -525,13 +525,13 @@ function getRank (date, rankType) {
|
||||
<div class="name">${res.nick}</div>
|
||||
<div class="score">
|
||||
<img src="./images/loveIcon.png" alt="" class="loveIcon">
|
||||
<b>${rankType == 1 || rankType == 2 ? "甜蜜值:" : '心动值:'}${unitProcessing(res.score, 10000, 1, 'w')}</b>
|
||||
<b>${rankType == 1 || rankType == 2 ? "甜蜜值:" : '心動值:'}${unitProcessing(res.score, 10000, 1, 'w')}</b>
|
||||
</div>
|
||||
</li>
|
||||
`
|
||||
})
|
||||
$('.page4 ul').append(str);
|
||||
// 处理自己榜单
|
||||
// 處理自己榜單
|
||||
var meRank = res.data.meRank;
|
||||
$('.page4 .my .num').text(meRank.ranking == 0 ? '未上榜' : meRank.ranking);
|
||||
$('.page4 .my .tx').attr('src', meRank.avatar);
|
||||
@@ -539,7 +539,7 @@ function getRank (date, rankType) {
|
||||
if (rankType == 1 || rankType == 2) {
|
||||
$('.page4 .my .score b').text(`甜蜜值:${unitProcessing(meRank.score, 10000, 1, 'w')}`);
|
||||
} else {
|
||||
$('.page4 .my .score b').text(`心动值:${unitProcessing(meRank.score, 10000, 1, 'w')}`);
|
||||
$('.page4 .my .score b').text(`心動值:${unitProcessing(meRank.score, 10000, 1, 'w')}`);
|
||||
}
|
||||
hideLoading(layerIndex)
|
||||
} else {
|
||||
@@ -553,7 +553,7 @@ function getRank (date, rankType) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 首页任务切换
|
||||
// 首頁任務切換
|
||||
$('.page1 .task .tab div').click(function () {
|
||||
var i = $(this).index() + 1;
|
||||
if (i == 1) {
|
||||
@@ -562,37 +562,37 @@ $('.page1 .task .tab div').click(function () {
|
||||
$('.page1 .task').addClass('tasks2');
|
||||
}
|
||||
})
|
||||
// 打开活动规则
|
||||
// 打開活動規則
|
||||
$('.header .rule').click(function () {
|
||||
bodyScroolFun(true);
|
||||
$('.rule_pub').show();
|
||||
})
|
||||
// 关闭活动规则
|
||||
// 關閉活動規則
|
||||
$('.rule_pub').click(function () {
|
||||
bodyScroolFun(false);
|
||||
$('.rule_pub').hide();
|
||||
})
|
||||
// 打开房间榜活动规则
|
||||
// 打開房間榜活動規則
|
||||
$('.page3 .rule').click(function () {
|
||||
bodyScroolFun(true);
|
||||
$('.page3 .roomRule').show();
|
||||
})
|
||||
// 关闭房间榜活动规则
|
||||
// 關閉房間榜活動規則
|
||||
$('.roomRule').click(function () {
|
||||
bodyScroolFun(false);
|
||||
$('.roomRule').hide();
|
||||
})
|
||||
// 打开房间榜活动规则
|
||||
// 打開房間榜活動規則
|
||||
$('.page4 .rule').click(function () {
|
||||
bodyScroolFun(true);
|
||||
$('.page4 .sweet').show();
|
||||
})
|
||||
// 关闭房间榜活动规则
|
||||
// 關閉房間榜活動規則
|
||||
$('.sweet').click(function () {
|
||||
bodyScroolFun(false);
|
||||
$('.sweet').hide();
|
||||
})
|
||||
// 祈愿树tab切换
|
||||
// 祈願樹tab切換
|
||||
$('.page2 .blessingTreeBoomt .tab div').click(function () {
|
||||
var i = $(this).index() + 1;
|
||||
if (i == 1) {
|
||||
@@ -604,14 +604,14 @@ $('.page2 .blessingTreeBoomt .tab div').click(function () {
|
||||
$('.page2 .blessingTreeBoomt2 .box2 ul li').remove();
|
||||
}
|
||||
})
|
||||
//检测是否到达底部
|
||||
//檢測是否到達底部
|
||||
$(document).ready(function () {
|
||||
$(".page2 .blessingTreeBoomt2 .box2 ul").scroll(function () {
|
||||
var divHeight = $(this).height();
|
||||
var nScrollHeight = $(this)[0].scrollHeight;
|
||||
var nScrollTop = $(this)[0].scrollTop;
|
||||
if (nScrollTop + divHeight >= nScrollHeight) {
|
||||
console.log("到达底部了");
|
||||
console.log("到達底部了");
|
||||
if (pageSizeLack) {
|
||||
pageSizeLack = false;
|
||||
page++;
|
||||
@@ -620,7 +620,7 @@ $(document).ready(function () {
|
||||
}
|
||||
});
|
||||
});
|
||||
// 祈福记录
|
||||
// 祈福記錄
|
||||
function pageRecord (page) {
|
||||
showLoading()
|
||||
networkRequest({
|
||||
@@ -661,7 +661,7 @@ function pageRecord (page) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 获取CP榜单接口
|
||||
// 獲取CP榜單接口
|
||||
function getCpRank () {
|
||||
showLoading()
|
||||
networkRequest({
|
||||
@@ -678,8 +678,8 @@ function getCpRank () {
|
||||
} else {
|
||||
$('.page4 .loveList .txL').attr('src', './images/logo.png');
|
||||
$('.page4 .loveList .txR').attr('src', './images/logo.png');
|
||||
$('.page4 .loveList .leftName').text('虚位以待');
|
||||
$('.page4 .loveList .rightName').text('虚位以待');
|
||||
$('.page4 .loveList .leftName').text('虛位以待');
|
||||
$('.page4 .loveList .rightName').text('虛位以待');
|
||||
}
|
||||
|
||||
if (res.data.nextHourTimeStamp) {
|
||||
@@ -702,27 +702,27 @@ function getCpRank () {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 倒计时
|
||||
// 倒計時
|
||||
function countup () {
|
||||
clearTimeout(timeOut2)
|
||||
//获取当前时间
|
||||
//獲取當前時間
|
||||
// var now = nowTime;
|
||||
var d = 0;
|
||||
var h = 0;
|
||||
var m = 0;
|
||||
var s = 0;
|
||||
//定义变量 d,h,m,s保存倒计时的时间
|
||||
//定義變量 d,h,m,s保存倒計時的時間
|
||||
var d, h, m, s;
|
||||
if (leftTime >= 0) {
|
||||
d = getzf(Math.floor(leftTime / 1000 / 60 / 60 / 24));
|
||||
h = getzf(Math.floor(leftTime / 1000 / 60 / 60 % 24));
|
||||
m = getzf(Math.floor(leftTime / 1000 / 60 % 60));
|
||||
s = getzf(Math.floor(leftTime / 1000 % 60));
|
||||
//将倒计时赋值到div中
|
||||
//將倒計時賦值到div中
|
||||
$('.page4 .loveList .times span').eq(0).text(m);
|
||||
$('.page4 .loveList .times span').eq(1).text(s);
|
||||
leftTime = leftTime - 1000;
|
||||
//递归每秒调⽤countTime⽅法,显⽰动态时间效果
|
||||
//遞歸每秒調⽤countTime⽅法,顯⽰動態時間效果
|
||||
} else {
|
||||
getCpRank();
|
||||
// location.reload();
|
||||
@@ -730,20 +730,20 @@ function countup () {
|
||||
}
|
||||
timeOut2 = setTimeout(countup, 1000);
|
||||
}
|
||||
//补0操作
|
||||
//補0操作
|
||||
function getzf (num) {
|
||||
if (parseInt(num) < 10) {
|
||||
num = '0' + num;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
// 七夕榜单tab切换
|
||||
var type = 'a';//a:甜蜜b:心动
|
||||
// 七夕榜單tab切換
|
||||
var type = 'a';//a:甜蜜b:心動
|
||||
$('.page4 .page4Tab div').click(function () {
|
||||
$('.page4 .dayAll').removeClass('dayAll2');
|
||||
var i = $(this).index() + 1;
|
||||
if (i == 1) {
|
||||
rankType = 1;//排行榜类型(1=甜蜜日榜,2=甜蜜总榜,3=爱意日榜,4=爱意总榜)
|
||||
rankType = 1;//排行榜類型(1=甜蜜日榜,2=甜蜜總榜,3=愛意日榜,4=愛意總榜)
|
||||
data = null;
|
||||
getRank(data, rankType);
|
||||
$('.page4 .page4Tab').removeClass('page4Tab2');
|
||||
@@ -756,37 +756,37 @@ $('.page4 .page4Tab div').click(function () {
|
||||
type = 'b';
|
||||
}
|
||||
})
|
||||
// 七夕榜单日榜总榜切换
|
||||
// 七夕榜單日榜總榜切換
|
||||
$('.page4 .dayAll div').click(function () {
|
||||
var i = $(this).index() + 1;
|
||||
if (i == 1) {
|
||||
$('.page4 .dayAll').removeClass('dayAll2');
|
||||
rankType = type == "a" ? 1 : 3;//排行榜类型(1=甜蜜日榜,2=甜蜜总榜,3=爱意日榜,4=爱意总榜)
|
||||
rankType = type == "a" ? 1 : 3;//排行榜類型(1=甜蜜日榜,2=甜蜜總榜,3=愛意日榜,4=愛意總榜)
|
||||
data = null;
|
||||
getRank(data, rankType);
|
||||
$('.page4 .timeList').show();
|
||||
} else {
|
||||
$('.page4 .dayAll').addClass('dayAll2');
|
||||
rankType = type == "a" ? 2 : 4;//排行榜类型(1=甜蜜日榜,2=甜蜜总榜,3=爱意日榜,4=爱意总榜)
|
||||
rankType = type == "a" ? 2 : 4;//排行榜類型(1=甜蜜日榜,2=甜蜜總榜,3=愛意日榜,4=愛意總榜)
|
||||
data = null;
|
||||
getRank(data, rankType);
|
||||
$('.page4 .timeList').hide();
|
||||
}
|
||||
})
|
||||
// 日榜切换日期
|
||||
// 日榜切換日期
|
||||
$('.page4 .timeList div').click(function () {
|
||||
var datas = $(this).attr('data');
|
||||
$(this).addClass('active').siblings().removeClass('active');
|
||||
rankType = type == "a" ? 1 : 3;//排行榜类型(1=甜蜜日榜,2=甜蜜总榜,3=爱意日榜,4=爱意总榜)
|
||||
rankType = type == "a" ? 1 : 3;//排行榜類型(1=甜蜜日榜,2=甜蜜總榜,3=愛意日榜,4=愛意總榜)
|
||||
data = datas;
|
||||
getRank(data, rankType);
|
||||
})
|
||||
// 关闭活动结束按钮
|
||||
// 關閉活動結束按鈕
|
||||
$('.endActivity .endActivity_in .but').click(function () {
|
||||
$('.endActivity').hide();
|
||||
bodyScroolFun(false);
|
||||
})
|
||||
//领取全服喜鹊奖励
|
||||
//領取全服喜鵲獎勵
|
||||
function getXiqueReward () {
|
||||
showLoading()
|
||||
networkRequest({
|
||||
@@ -796,7 +796,7 @@ function getXiqueReward () {
|
||||
success (res) {
|
||||
if (res.code === 200) {
|
||||
getConfig();
|
||||
toastMsg('领取成功');
|
||||
toastMsg('領取成功');
|
||||
} else {
|
||||
toastMsg(res.message)
|
||||
}
|
||||
@@ -808,15 +808,15 @@ function getXiqueReward () {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 领取喜鹊奖励按钮
|
||||
// 領取喜鵲獎勵按鈕
|
||||
$('.page1 .magpieBridge .buting').click(function () {
|
||||
getXiqueReward();
|
||||
})
|
||||
// 领取喜鹊未参与按钮
|
||||
// 領取喜鵲未參與按鈕
|
||||
$('.page1 .magpieBridge .buterr').click(function () {
|
||||
toastMsg('您未参加搭建鹊桥活动,无法领取');
|
||||
toastMsg('您未參加搭建鵲橋活動,無法領取');
|
||||
})
|
||||
// 投放喜鹊接口
|
||||
// 投放喜鵲接口
|
||||
function devotedXique (num) {
|
||||
// showLoading()
|
||||
networkRequest({
|
||||
@@ -842,7 +842,7 @@ function devotedXique (num) {
|
||||
}
|
||||
})
|
||||
}
|
||||
// 播放喜鹊svg
|
||||
// 播放喜鵲svg
|
||||
function svgaFun () {
|
||||
player1 = new SVGA.Player('.xique');
|
||||
parser1 = new SVGA.Parser('.xique');
|
||||
@@ -857,12 +857,12 @@ function svgaFun () {
|
||||
})
|
||||
})
|
||||
}
|
||||
// 投放按钮
|
||||
// 投放按鈕
|
||||
$('.page1 .magpieBridge .but1,.page1 .magpieBridge .but10').click(function () {
|
||||
var clas = $(this).attr('class')
|
||||
if (clas == 'but1') {
|
||||
if (xiqueNum < 1) {
|
||||
toastMsg('喜鹊数量不足,参加任务获得吧~')
|
||||
toastMsg('喜鵲數量不足,參加任務獲得吧~')
|
||||
return
|
||||
}
|
||||
if (xiqueBut) {
|
||||
@@ -875,7 +875,7 @@ $('.page1 .magpieBridge .but1,.page1 .magpieBridge .but10').click(function () {
|
||||
|
||||
} else {
|
||||
if (xiqueNum < 10) {
|
||||
toastMsg('喜鹊数量不足,参加任务获得吧~')
|
||||
toastMsg('喜鵲數量不足,參加任務獲得吧~')
|
||||
return
|
||||
}
|
||||
if (xiqueBut) {
|
||||
@@ -888,7 +888,7 @@ $('.page1 .magpieBridge .but1,.page1 .magpieBridge .but10').click(function () {
|
||||
// devotedXique(10);
|
||||
}
|
||||
})
|
||||
// 去完成任务2按钮
|
||||
// 去完成任務2按鈕
|
||||
$('.page1 .task .box1 .task2 .but').click(function () {
|
||||
var click = $(this).attr('click');
|
||||
if (click != 0) {
|
||||
@@ -901,7 +901,7 @@ $('.page1 .task .box1 .task2 .but').click(function () {
|
||||
}
|
||||
}
|
||||
})
|
||||
// 去完成任务3按钮
|
||||
// 去完成任務3按鈕
|
||||
$('.page1 .task .box1 .task3 .but').click(function () {
|
||||
var click = $(this).attr('click');
|
||||
if (click != 0) {
|
||||
@@ -913,4 +913,14 @@ $('.page1 .task .box1 .task3 .but').click(function () {
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
// 循環任務按鈕
|
||||
$('.page1 .tasks2 .box2 .task2But').click(function(){
|
||||
if (browser.ios) {
|
||||
window.webkit.messageHandlers.openRoomForGiftId.postMessage(JSON.stringify({ uid: roomUid, giftId: giftId }))
|
||||
} else if (browser.android) {
|
||||
if (androidJsObj && typeof androidJsObj === 'object') {
|
||||
window.androidJsObj.openRoomForGiftId(roomUid, giftId);
|
||||
}
|
||||
}
|
||||
})
|
Reference in New Issue
Block a user