From bcdd71940bbae51b318aa3ab50e4590ef8c6069d Mon Sep 17 00:00:00 2001 From: qf Date: Mon, 6 Feb 2023 11:28:16 +0800 Subject: [PATCH] =?UTF-8?q?2023=E6=83=85=E4=BA=BA=E8=8A=82=EF=BC=9A?= =?UTF-8?q?=E8=B4=AD=E4=B9=B0=E5=90=8E=E5=88=B7=E6=96=B0=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=88=91=E7=9A=84cp=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../2023-Valentines-Day/css/index.css | 22 +++++-- .../2023-Valentines-Day/css/index.scss | 23 +++++-- .../activity/2023-Valentines-Day/index.html | 12 ++-- .../activity/2023-Valentines-Day/js/index.js | 60 +++++++++++-------- 4 files changed, 77 insertions(+), 40 deletions(-) diff --git a/view/peko/activity/2023-Valentines-Day/css/index.css b/view/peko/activity/2023-Valentines-Day/css/index.css index 152dda8..c1b5060 100644 --- a/view/peko/activity/2023-Valentines-Day/css/index.css +++ b/view/peko/activity/2023-Valentines-Day/css/index.css @@ -900,20 +900,32 @@ body { display: flex; justify-content: space-around; } -.mycpBox .mycp_in ul li b, +.mycpBox .mycp_in ul li b { + width: 1.8rem; + height: 0.4rem; + text-align: center; + color: #AE2B5C; + font-size: 0.32rem; + margin-bottom: 0.2666666667rem; +} +.mycpBox .mycp_in ul li .cpValue { + width: 2.4rem; + height: 0.4rem; + text-align: center; +} .mycpBox .mycp_in ul li span { + width: 1.2rem; + height: 0.4rem; + text-align: center; + line-height: 0.4rem; color: #AE2B5C; font-size: 0.32rem; margin-bottom: 0.2666666667rem; } .mycpBox .mycp_in ul li .waitpass { - width: 1rem; - height: 0.4rem; background-color: #FF63D0; border-radius: 0.2rem; color: #ffffff; - text-align: center; - line-height: 0.4rem; } .mycpBox .mycp_in ul li .pass { color: #FE28B0; diff --git a/view/peko/activity/2023-Valentines-Day/css/index.scss b/view/peko/activity/2023-Valentines-Day/css/index.scss index 1d1aad6..89cbf87 100644 --- a/view/peko/activity/2023-Valentines-Day/css/index.scss +++ b/view/peko/activity/2023-Valentines-Day/css/index.scss @@ -1022,21 +1022,34 @@ body { display: flex; justify-content: space-around; - b, + b { + width: 1.8rem; + height: px2rem(30, ); + text-align: center; + color: #AE2B5C; + font-size: px2rem(24, ); + margin-bottom: px2rem(20, ); + } + .cpValue { + width: 2.4rem; + height: px2rem(30, ); + text-align: center; + } span { + width: 1.2rem; + height: px2rem(30, ); + text-align: center; + line-height: px2rem(30, ); color: #AE2B5C; font-size: px2rem(24, ); margin-bottom: px2rem(20, ); } .waitpass { - width: 1rem; - height: px2rem(30, ); background-color: #FF63D0; border-radius: px2rem(15, ); color: #ffffff; - text-align: center; - line-height: px2rem(30, ); + } .pass { diff --git a/view/peko/activity/2023-Valentines-Day/index.html b/view/peko/activity/2023-Valentines-Day/index.html index e79c8d9..c0a07b4 100644 --- a/view/peko/activity/2023-Valentines-Day/index.html +++ b/view/peko/activity/2023-Valentines-Day/index.html @@ -92,7 +92,7 @@
- 我的情簽: 999,999,999 + 我的情簽:
兌換記錄
贈送情人節限定禮物,送出一個禮物可得對應數量的「幸運情簽」,且可增加CP間的情緣值,情簽可兌換特權或抽獎喲~
@@ -257,18 +257,18 @@
暫無更多記錄~
diff --git a/view/peko/activity/2023-Valentines-Day/js/index.js b/view/peko/activity/2023-Valentines-Day/js/index.js index 931c911..53fbbf4 100644 --- a/view/peko/activity/2023-Valentines-Day/js/index.js +++ b/view/peko/activity/2023-Valentines-Day/js/index.js @@ -176,8 +176,8 @@ function myCpList() { cpList = `
  • ${res.nick.length > 5 ? res.nick.slice(0, 5) + '...' : res.nick} - ${res.cpValue} - ${res.status == 0 ? "通過" : res.status == 1 ? "可通過" : "已締結"} + ${res.cpValue} + ${res.status == 0 ? "待通過" : res.status == 1 ? "可通過" : "已締結"}
  • ` }) @@ -356,21 +356,31 @@ function buy(id, num) { data: { id, num }, success(res) { if (res.code === 200) { - if (id == 1) { - toastMsg('購買成功,禮券已放進背包,快送給你心意的TA吧~') - canGet = true - } else if (id == 6) { - $('.gx .gx_in .box li img').attr('src', res, data.icon) - $('.gx .gx_in .box li span').attr('src', res, data.name) - $('.gx .gx_in .tips').html(`*情人节限定5位靓号:52XXX(XXX为随机数字,一组为2个靓号,
    联系客服领取:LINE: pekoyuyin)`) - $('.gx').show() - } else { - $('.gx .gx_in .box li img').attr('src', res, data.icon) - $('.gx .gx_in .box li span').attr('src', res, data.name) - $('.gx .gx_in .tips').html(`奖励将自动发放到装扮中心,快去展示自己吧~`) - $('.gx').show() + if (res.data.prop) { + if (res.data.prop.type == 1) { + $('.letter-wrap .letter p e').html(res.data.remain) + 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) + $('.gx .gx_in .tips').html(`*情人節限定5位靚號:52XXX(XXX為隨機數字,一組為2個靚號,
    聯系客服領取: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) + $('.gx .gx_in .tips').html(`獎勵將自動發放到裝扮中心,快去展示自己吧~`) + $('.gx').show() + } + } else { + toastMsg(res.message) + canGet = true } + hideLoading(layerIndex) } else if (res.code == 31005) { $('.tishiBox').show() @@ -416,7 +426,7 @@ function getRank() { $(`.rank-wrap .list .no${index + 1} .txbox1 img`).attr('src', res.inviterAvatar); $(`.rank-wrap .list .no${index + 1} .txbox1`).attr('uid', res.inviterUid); $(`.rank-wrap .list .no${index + 1} .nick1`).html(res.inviterNick.length > 5 ? res.inviterNick.slice(0, 5) + '...' : res.inviterNick); - $(`.rank-wrap .list .no${index + 1} .txbox2 img`).attr('src', res.inviterAvatar); + $(`.rank-wrap .list .no${index + 1} .txbox2 img`).attr('src', res.inviteeAvatar); $(`.rank-wrap .list .no${index + 1} .txbox2`).attr('uid', res.inviteeUid); $(`.rank-wrap .list .no${index + 1} .nick2`).html(res.inviteeNick.length > 5 ? res.inviteeNick.slice(0, 5) + '...' : res.inviteeNick); $(`.rank-wrap .list .no${index + 1} .score b`).html(`${res.cpValue > 10000 ? (Math.floor(res.cpValue / 1000) / 10).toFixed(1) + 'w' : res.cpValue}`); @@ -431,7 +441,7 @@ function getRank() {
    - +
    ${res.inviterNick}
    ${res.inviteeNick}
    @@ -451,12 +461,14 @@ function getRank() { } // 自己排名 - // $('.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); - // $('.rank-wrap .myRank .nick1').text(res.data.meRank.inviterNick.length > 5 ? res.data.meRank.inviterNick.slice(0, 5) + '...' : res.data.meRank.inviterNick) - // $('.rank-wrap .myRank .nick2').text(res.data.meRank.inviteeNick.length > 5 ? res.data.meRank.inviteeNick.slice(0, 5) + '...' : res.data.meRank.inviteeNick) - // $('.rank-wrap .myRank .score').html(`${res.data.meRank.cpValue > 10000 ? (Math.floor(res.data.meRank.cpValue / 1000) / 10).toFixed(1) + 'w' : res.data.meRank.cpValue}`); + if (res.data.meRank) { + $('.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); + $('.rank-wrap .myRank .nick1').text(res.data.meRank.inviterNick.length > 5 ? res.data.meRank.inviterNick.slice(0, 5) + '...' : res.data.meRank.inviterNick) + $('.rank-wrap .myRank .nick2').text(res.data.meRank.inviteeNick.length > 5 ? res.data.meRank.inviteeNick.slice(0, 5) + '...' : res.data.meRank.inviteeNick) + $('.rank-wrap .myRank .score').html(`${res.data.meRank.cpValue > 10000 ? (Math.floor(res.data.meRank.cpValue / 1000) / 10).toFixed(1) + 'w' : res.data.meRank.cpValue}`); + } hideLoading(layerIndex) $('.rank-wrap .list ul li').on('click', '.txbox1,.txbox2', function () { @@ -466,7 +478,7 @@ function getRank() { openPerson(uid) } }) - + } else { toastMsg(res.message) hideLoading(layerIndex)