apply patch
This commit is contained in:
@@ -13,6 +13,7 @@ Page({
|
||||
totalLength: 0,
|
||||
isExtracting: false,
|
||||
read_count: 0,
|
||||
showQrcodePopup: false, // 新增:二维码弹窗显示状态
|
||||
|
||||
},
|
||||
onLoad: function (options) {
|
||||
@@ -131,6 +132,7 @@ Page({
|
||||
|
||||
// 扣除额度
|
||||
CreditLimit() {
|
||||
var that = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
app.apiRequest({
|
||||
url: '/myapp/increment-download-count/',
|
||||
@@ -143,17 +145,26 @@ Page({
|
||||
console.log(e, !e.data.success)
|
||||
if (e.data.success === false) {
|
||||
wx.hideLoading()
|
||||
wx.showModal({
|
||||
title: "提取视频",
|
||||
content: '哎呀!去开通会员不限次数使用哦',
|
||||
confirmColor: "#00B269",
|
||||
cancelColor: "#858585",
|
||||
success: function (e) {
|
||||
e.confirm ? (console.log("确定"), wx.navigateTo({
|
||||
url: "../vip_recharge/vip_recharge?show=true"
|
||||
})) : e.cancel && console.log("取消");
|
||||
}
|
||||
})
|
||||
// 判断系统类型
|
||||
const systemInfo = wx.getSystemInfoSync();
|
||||
const isIOS = systemInfo.system.toLowerCase().indexOf('ios') !== -1;
|
||||
if (isIOS) {
|
||||
// iOS弹二维码弹窗
|
||||
that.setData({ showQrcodePopup: true });
|
||||
} else {
|
||||
// 安卓弹原有会员弹窗
|
||||
wx.showModal({
|
||||
title: "提取视频",
|
||||
content: '哎呀!去开通会员不限次数使用哦',
|
||||
confirmColor: "#00B269",
|
||||
cancelColor: "#858585",
|
||||
success: function (e) {
|
||||
e.confirm ? (console.log("确定"), wx.navigateTo({
|
||||
url: "../vip_recharge/vip_recharge?show=true"
|
||||
})) : e.cancel && console.log("取消");
|
||||
}
|
||||
})
|
||||
}
|
||||
resolve(false)
|
||||
}
|
||||
resolve(true)
|
||||
@@ -551,4 +562,9 @@ Page({
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
// 关闭二维码弹窗
|
||||
closeQrcodePopup: function () {
|
||||
this.setData({ showQrcodePopup: false });
|
||||
},
|
||||
});
|
||||
@@ -26,3 +26,11 @@
|
||||
buttonText="查看详情"
|
||||
targetUrl="/pages/details/details"
|
||||
/>
|
||||
|
||||
<view wx:if="{{showQrcodePopup}}" class="qrcode-popup-mask" bindtap="closeQrcodePopup">
|
||||
<view class="qrcode-popup" catchtap="preventDefault">
|
||||
<image src="../../images/qrcode_for_gh_e64390b2d04e_258.jpg" class="qrcode-img" show-menu-by-longpress="true"></image>
|
||||
<view class="qrcode-tip">长按识别二维码,前往公众号获取更多额度</view>
|
||||
<view class="qrcode-close-btn" bindtap="closeQrcodePopup">关闭</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -86,4 +86,77 @@ page {
|
||||
|
||||
.advertisement image {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* 二维码弹窗样式 */
|
||||
.qrcode-popup-mask {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
z-index: 2000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.qrcode-popup {
|
||||
background: #fff;
|
||||
border-radius: 18px;
|
||||
box-shadow: 0 8px 32px rgba(0,0,0,0.25);
|
||||
padding: 32px 24px 20px 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
min-width: 260px;
|
||||
max-width: 80vw;
|
||||
animation: popupFadeIn 0.3s ease;
|
||||
}
|
||||
|
||||
@keyframes popupFadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: scale(0.9);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
.qrcode-img {
|
||||
width: 180px;
|
||||
height: 180px;
|
||||
border-radius: 12px;
|
||||
margin-bottom: 18px;
|
||||
box-shadow: 0 2px 12px rgba(0,0,0,0.10);
|
||||
}
|
||||
|
||||
.qrcode-tip {
|
||||
font-size: 16px;
|
||||
color: #333;
|
||||
margin-bottom: 18px;
|
||||
text-align: center;
|
||||
font-weight: 500;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.qrcode-close-btn {
|
||||
margin-top: 8px;
|
||||
padding: 8px 32px;
|
||||
background: linear-gradient(90deg, #8d72d2, #7183f3);
|
||||
color: #fff;
|
||||
border: none;
|
||||
border-radius: 24px;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.10);
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.qrcode-close-btn:active {
|
||||
transform: scale(0.95);
|
||||
background: linear-gradient(90deg, #7183f3, #8d72d2);
|
||||
}
|
||||
Reference in New Issue
Block a user