23情人节:自己排名、购买成功礼物样式,替换图片

This commit is contained in:
qf
2023-02-07 16:28:05 +08:00
parent 8729fc7f5b
commit a259af6c6a
10 changed files with 48 additions and 18 deletions

View File

@@ -353,7 +353,7 @@ function getDrawRecord(drawPage, tab) {
}
// 购买信物、兑换、抽奖 (道具id,数量)
function buy(id, num, type ) {
function buy(id, num, type) {
showLoading()
networkRequest({
type: 'POST',
@@ -367,27 +367,31 @@ function buy(id, num, type ) {
toastMsg('購買成功信物已放進背包快送給你心儀的TA吧~')
canGet = true
} else if (res.data.prop.type == 6) {
$('.petition-wrap .myticket span e').html(res.data.remain)
$('.gx .gx_in .box li img').attr('src', res.data.prop.icon)
$('.gx .gx_in .box li span').attr('src', res.data.name)
$('.petition-wrap .myticket span e').html(res.data.prop.remain)
$('.gx .gx_in .box li img').attr('src', res.data.prop.prop.icon)
$('.gx .gx_in .box li span').attr('src', res.data.prop.name)
$('.gx .gx_in .tips').html(`*情人節限定5位靚號:52XXXXXX為隨機數字一組為2個靚號<br>聯系客服領取LINE: pekoyuyin)`)
$('.gx').show()
} else {
$('.petition-wrap .myticket span e').html(res.data.remain)
$('.gx .gx_in .box li img').attr('src', res.data.icon)
$('.gx .gx_in .box li span').attr('src', res.data.name)
// if (res.data.prop.type == 2){
// $('.gx .gx_in .box li img').addClass('mingpai')
// }else {
// $('.gx .gx_in .box li img').removeClass('mingpai')
// }
$('.petition-wrap .myticket span e').html(res.data.prop.remain)
$('.gx .gx_in .box li img').attr('src', res.data.prop.icon)
$('.gx .gx_in .box li span').attr('src', res.data.prop.name)
$('.gx .gx_in .tips').html(`獎勵將自動發放到裝扮中心,快去展示自己吧~`)
$('.gx').show()
}
} else {
if(type == 6) {
if (type == 6) {
toastMsg('很遺憾沒有抽到,距離靚號就差一點啦~')
}else {
} else {
toastMsg(res.message)
}
canGet = true
}
@@ -472,6 +476,11 @@ function getRank() {
// 自己排名
if (res.data.meRank) {
if (res.data.meRank.ranking == 0) {
$('.rank-wrap .myRank .num').removeClass('norank')
} else {
$('.rank-wrap .myRank .num').addClass('norank')
}
$('.rank-wrap .myRank .num').html(res.data.meRank.ranking == 0 ? '未上榜' : res.data.meRank.ranking);
$('.rank-wrap .myRank .txbox1 img').attr('src', res.data.meRank.inviterAvatar);
$('.rank-wrap .myRank .txbox2 img').attr('src', res.data.meRank.inviteeAvatar);