apply patch
This commit is contained in:
@@ -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 });
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user