apply patch

This commit is contained in:
林滔
2025-08-15 10:49:43 +08:00
parent 6eeb305e79
commit d26d3b4d11
27 changed files with 877 additions and 522 deletions

View File

@@ -14,7 +14,8 @@ Page({
page: 1,
isLoading: false,
hasMore: true,
externalOpenid:''
externalOpenid: '',
showQrcodePopup: false, // 新增:二维码弹窗显示状态
},
// 切换单选框模式
@@ -169,8 +170,37 @@ goToExtract(e) {
openid: wx.getStorageSync("openid")
},
success: (res) => {
console.log("视频提取结果:", res);
if (res.data.data.medias[0]) {
// 新增额度判断
if (res.data.success === false || res.data.code === 1000) {
let isIOS = false;
try {
const sysInfo = wx.getSystemInfoSync();
isIOS = sysInfo.system.toLowerCase().indexOf('ios') !== -1;
} catch (e) {
console.error('获取系统信息失败');
}
if (isIOS) {
this.setData({ showQrcodePopup: true });
} else {
wx.showModal({
title: "提取视频",
content:"哎呀!去开通会员不限次数使用哦",
confirmColor: "#00B269",
cancelColor: "#858585",
success: function(e) {
if (e.confirm) {
wx.navigateTo({
url: "../vip_recharge/vip_recharge?show=true"
});
}
}
});
}
wx.hideLoading();
return;
}
// 只有额度足够才执行下面
if (res.data.data && res.data.data.medias && res.data.data.medias[0]) {
const media = res.data.data.medias[0];
wx.navigateTo({
url: `../video/video?url=${encodeURIComponent(media.resource_url)}&image=${encodeURIComponent(media.preview_url)}&preview=${encodeURIComponent(res.data.data.text)}&type=index&read_count=0`
@@ -181,6 +211,7 @@ goToExtract(e) {
icon: "none"
});
}
wx.hideLoading();
},
fail: (err) => {
console.error("视频解析失败:", err);
@@ -226,17 +257,31 @@ extractText() {
},
success(res) {
if (res.data.success === false) {
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("取消");
}
});
// 判断系统类型(平台)
let isIOS = false;
try {
const sysInfo = wx.getSystemInfoSync();
isIOS = sysInfo.system.toLowerCase().indexOf('ios') !== -1;
} catch (e) {
console.error('获取系统信息失败');
}
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("取消");
}
});
}
wx.hideLoading();
return;
}
@@ -459,5 +504,10 @@ removeTimestampAndMergeLines: function(textWithTimestamp) {
path: `/pages/index/index?uuid=${wx.getStorageSync("uuid")}`,
imageUrl: "/images/share.jpg"
};
}
},
// 关闭二维码弹窗
closeQrcodePopup() {
this.setData({ showQrcodePopup: false });
},
});

View File

@@ -2,7 +2,7 @@
"usingComponents": {
"popup": "/popup/popup"
},
"navigationBarTitleText": "快影下载",
"navigationBarTitleText": "抖视下载",
"navigationBarBackgroundColor": "#222238",
"navigationBarTextStyle": "white"

View File

@@ -116,3 +116,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>

View File

@@ -364,4 +364,57 @@ page {
40% {
transform: translateY(-10rpx);
}
}
.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;
}
.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;
}
.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: background 0.2s;
}
.qrcode-close-btn:active {
background: linear-gradient(90deg, #7183f3, #8d72d2);
}