修复塔罗交互异常问题
This commit is contained in:
@@ -32,6 +32,7 @@ var gearPositionActive = 0;//當前選澤的檔位
|
|||||||
var prodId = [];//檔位類型
|
var prodId = [];//檔位類型
|
||||||
var prodIdActive;
|
var prodIdActive;
|
||||||
var lock = true;//鎖
|
var lock = true;//鎖
|
||||||
|
var lock2 = true;
|
||||||
var page = 1;//頁碼
|
var page = 1;//頁碼
|
||||||
var scrollLock = true;
|
var scrollLock = true;
|
||||||
var arrLast = []//記錄上次開獎的數組
|
var arrLast = []//記錄上次開獎的數組
|
||||||
@@ -58,7 +59,6 @@ $(function () {
|
|||||||
})
|
})
|
||||||
getAdvertising();
|
getAdvertising();
|
||||||
productList();
|
productList();
|
||||||
getUserInfo();
|
|
||||||
svgaFun();
|
svgaFun();
|
||||||
svgaFun2();
|
svgaFun2();
|
||||||
}, 100)
|
}, 100)
|
||||||
@@ -161,6 +161,7 @@ function productList () {
|
|||||||
prodId.push(res.prodId);
|
prodId.push(res.prodId);
|
||||||
$(`.tarotBox .tabBox .tabBox${i + 1} b`).text(`${res.prodNeedPrice}鉆/張`)
|
$(`.tarotBox .tabBox .tabBox${i + 1} b`).text(`${res.prodNeedPrice}鉆/張`)
|
||||||
})
|
})
|
||||||
|
getUserInfo();
|
||||||
} else {
|
} else {
|
||||||
toastMsg(res.message)
|
toastMsg(res.message)
|
||||||
}
|
}
|
||||||
@@ -174,7 +175,7 @@ function productList () {
|
|||||||
}
|
}
|
||||||
// 獲取用戶信息
|
// 獲取用戶信息
|
||||||
const getUserInfo = () => {
|
const getUserInfo = () => {
|
||||||
showLoading()
|
// showLoading()
|
||||||
networkRequest({
|
networkRequest({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: urlPrefix + '/seekElfin/user/info',
|
url: urlPrefix + '/seekElfin/user/info',
|
||||||
@@ -356,34 +357,35 @@ function kineticEffect (arr, bool, data) {
|
|||||||
$('.cardBoxBut').hide();
|
$('.cardBoxBut').hide();
|
||||||
$('.tarotBox .butAgain').attr('src', prodIdActive == 1 ? './images/butAgain1.png' : prodIdActive == 2 ? './images/butAgain2.png' : './images/butAgain3.png')
|
$('.tarotBox .butAgain').attr('src', prodIdActive == 1 ? './images/butAgain1.png' : prodIdActive == 2 ? './images/butAgain2.png' : './images/butAgain3.png')
|
||||||
$('.butAgain').show();
|
$('.butAgain').show();
|
||||||
lock = true;
|
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
// 檔位tab切換按鈕
|
// 檔位tab切換按鈕
|
||||||
$('.tarotBox .tabBox div').click(function () {
|
$('.tarotBox .tabBox div').click(function () {
|
||||||
if(lock){
|
if (lock) {
|
||||||
var i = $(this).index() + 1;
|
var i = $(this).index() + 1;
|
||||||
// 切換tab樣式
|
// 切換tab樣式
|
||||||
$('.tarotBox .tabBox div').removeClass('active1').removeClass('active2').removeClass('active3');
|
$('.tarotBox .tabBox div').removeClass('active1').removeClass('active2').removeClass('active3');
|
||||||
$(this).addClass(`active${i}`);
|
$(this).addClass(`active${i}`);
|
||||||
// 切換卡牌樣式
|
// 切換卡牌樣式
|
||||||
$('.tarotBox .cardBox').hide();
|
$('.tarotBox .cardBox').hide();
|
||||||
$(`.tarotBox .card${i}`).show();
|
$(`.tarotBox .card${i}`).show();
|
||||||
// 切換按鈕樣式
|
// 切換按鈕樣式
|
||||||
$('.tarotBox .cardBoxBut').attr('src', `./images/but${i}.png`)
|
$('.tarotBox .cardBoxBut').attr('src', `./images/but${i}.png`)
|
||||||
// if (i == 1) {
|
// if (i == 1) {
|
||||||
gearPositionActive = gearPosition[i - 1];
|
gearPositionActive = gearPosition[i - 1];
|
||||||
prodIdActive = prodId[i - 1];
|
prodIdActive = prodId[i - 1];
|
||||||
$('.tarotBox .gradeText b').text(gearPositionActive * 10);
|
$('.tarotBox .gradeText b').text(gearPositionActive * 10);
|
||||||
// } else if (i == 2) {
|
console.log(gearPositionActive);
|
||||||
// gearPosition = 1000;
|
// } else if (i == 2) {
|
||||||
// $('.tarotBox .gradeText b').text(gearPosition * 10);
|
// gearPosition = 1000;
|
||||||
// } else {
|
// $('.tarotBox .gradeText b').text(gearPosition * 10);
|
||||||
// gearPosition = 10000;
|
// } else {
|
||||||
// $('.tarotBox .gradeText b').text(gearPosition * 10);
|
// gearPosition = 10000;
|
||||||
// }
|
// $('.tarotBox .gradeText b').text(gearPosition * 10);
|
||||||
// 清空默認樣式
|
// }
|
||||||
initialStytle();}
|
// 清空默認樣式
|
||||||
|
initialStytle();
|
||||||
|
}
|
||||||
})
|
})
|
||||||
// 選擇初級卡片按鈕
|
// 選擇初級卡片按鈕
|
||||||
$('.tarotBox .card1').click(function () {
|
$('.tarotBox .card1').click(function () {
|
||||||
@@ -435,6 +437,7 @@ $('.tarotBox .cardBoxBut').click(function () {
|
|||||||
// 再翻一次按鈕
|
// 再翻一次按鈕
|
||||||
$('.butAgain').click(function () {
|
$('.butAgain').click(function () {
|
||||||
initialStytle(true);
|
initialStytle(true);
|
||||||
|
lock = true;
|
||||||
})
|
})
|
||||||
// 跳轉充值頁面
|
// 跳轉充值頁面
|
||||||
$('.tarotBox .diamond').click(() => {
|
$('.tarotBox .diamond').click(() => {
|
||||||
|
Reference in New Issue
Block a user