新增余额不足弹窗

This commit is contained in:
Dragon
2023-07-20 17:00:09 +08:00
parent f9bf2c5473
commit 59dfb185c7
5 changed files with 188 additions and 1 deletions

View File

@@ -506,4 +506,68 @@ h3 {
bottom: -1.3333333333rem;
}
.shade-mask-fragmentNum {
position: fixed;
top: 0;
left: 0;
z-index: 99999;
width: 100vw;
height: 100vh;
background-color: rgba(0, 0, 0, 0.6);
}
.shade-mask-fragmentNum .shade-content-fragmentNum {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 8rem;
height: 8rem;
background: white;
border-radius: 0.32rem;
overflow: hidden;
display: flex;
flex-direction: column;
align-items: center;
}
.shade-mask-fragmentNum .shade-content-fragmentNum .fragmentNum-title {
font-size: 0.48rem;
font-weight: bold;
color: #333333;
margin-top: 0.5066666667rem;
}
.shade-mask-fragmentNum .shade-content-fragmentNum img {
width: 1.6rem;
width: 1.6rem;
margin-top: 1.44rem;
}
.shade-mask-fragmentNum .shade-content-fragmentNum p {
font-size: 0.4rem;
font-weight: 600;
color: #333333;
margin-top: 0.6666666667rem;
}
.shade-mask-fragmentNum .shade-content-fragmentNum .fragmentNum-btn-wrap {
display: flex;
justify-content: space-between;
width: 6.8266666667rem;
height: 1.0133333333rem;
margin-top: 1.2rem;
}
.shade-mask-fragmentNum .shade-content-fragmentNum .fragmentNum-btn-wrap .cancel-btn,
.shade-mask-fragmentNum .shade-content-fragmentNum .fragmentNum-btn-wrap .confirm-btn {
width: 3.2rem;
height: 1.0133333333rem;
line-height: 1.0133333333rem;
text-align: center;
border-radius: 0.5066666667rem;
font-size: 0.3733333333rem;
font-weight: 600;
background-color: #EAE5FC;
color: #7154EE;
}
.shade-mask-fragmentNum .shade-content-fragmentNum .fragmentNum-btn-wrap .confirm-btn {
background-color: #735FFE;
color: #fff;
}
/*# sourceMappingURL=index.css.map */

View File

@@ -583,4 +583,77 @@ h3 {
bottom: px2rem(-100, );
}
}
}
// 碎片不足弹窗
.shade-mask-fragmentNum {
// display: none;
position: fixed;
top: 0;
left: 0;
z-index: 99999;
width: 100vw;
height: 100vh;
background-color: rgba($color: #000000, $alpha: 0.6);
.shade-content-fragmentNum {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: px2rem(600);
height: px2rem(600);
background: white;
border-radius: px2rem(24);
overflow: hidden;
display: flex;
flex-direction: column;
align-items: center;
.fragmentNum-title {
font-size: px2rem(36);
font-weight: bold;
color: #333333;
margin-top: px2rem(38);
}
img {
width: px2rem(120);
width: px2rem(120);
margin-top: px2rem(108);
}
p {
font-size: px2rem(30);
font-weight: 600;
color: #333333;
margin-top: px2rem(50);
}
.fragmentNum-btn-wrap {
display: flex;
justify-content: space-between;
width: px2rem(512);
height: px2rem(76);
margin-top: px2rem(90);
.cancel-btn,
.confirm-btn {
width: px2rem(240);
height: px2rem(76);
line-height: px2rem(76);
text-align: center;
border-radius: px2rem(38);
font-size: px2rem(28);
font-weight: 600;
background-color: #EAE5FC;
color: #7154EE;
}
.confirm-btn {
background-color: #735FFE;
color: #fff;
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -140,6 +140,18 @@
<img src="./images/close.png" alt="" class="close">
</div>
</div>
<!-- 余额不足提示弹窗 -->
<div class="shade-mask-fragmentNum">
<div class="shade-content-fragmentNum">
<div class="fragmentNum-title">鉆石余額不足</div>
<img src="./images/no-money.png" alt="">
<p>当前鉆石不足</p>
<div class="fragmentNum-btn-wrap">
<div class="cancel-btn">取消</div>
<div class="confirm-btn">获取鉆石</div>
</div>
</div>
</div>
</body>
</html>

View File

@@ -208,7 +208,7 @@ const draw = () => {
data: JSON.stringify({
prodId: prodIdActive,
selectedNo: cardArr,
roomUid:pubInfo.roomUid,
roomUid: pubInfo.roomUid,
// roomUid: pubInfo.uid,
}),
headers: { 'Content-Type': 'application/json;charset=utf8' },
@@ -216,6 +216,12 @@ const draw = () => {
if (res.code == 200) {
kineticEffect(cardArr, res.data.win, res);
getUserInfo();
}
else if (res.code == 2103) {
lock = true;
$('.shade-mask-fragmentNum').show();
bodyScroolFun(true);
toastMsg(res.message);
} else {
lock = true;
toastMsg(res.message);
@@ -432,4 +438,36 @@ $('.winningRecord .winningRecord_in ul').scroll(function () {
console.log('到底了');
}
}
})
// 关闭去充值弹窗
$('.shade-mask-fragmentNum .cancel-btn').click(function () {
$('.shade-mask-fragmentNum').hide();
bodyScroolFun(false);
})
// 确认去充值弹窗
$('.shade-mask-fragmentNum .confirm-btn').click(function () {
$('.shade-mask-fragmentNum').hide();
bodyScroolFun(false);
if (browser.app) {
if (browser.android) {
let channel = pubInfo.deviceInfo.channel;
console.log(pubInfo.deviceInfo);
if (channel == "google") {
window.androidJsObj.openChargePage(6);
} else {
window.androidJsObj.openChargePage(6);
window.location.href = urlPrefix + '/peko/modules/pay/index.html?channelType=4';
}
} else if (browser.ios) {
let channel = pubInfo.deviceInfo.channel;
if (channel == "appstore") {
window.webkit.messageHandlers.openChargePage.postMessage(null);
} else {
window.webkit.messageHandlers.chargePayClickPage.postMessage(6);
window.location.href = urlPrefix + '/peko/modules/pay/index.html?channelType=4';
}
}
} else {
toastMsg('請在app內打開')
}
})