|
@@ -73,13 +73,13 @@
|
|
|
<!-- 只有非游客用户才显示购买会员按钮 -->
|
|
<!-- 只有非游客用户才显示购买会员按钮 -->
|
|
|
<button
|
|
<button
|
|
|
v-if="!isGuest"
|
|
v-if="!isGuest"
|
|
|
- @click="showMembershipPurchaseModal = true"
|
|
|
|
|
|
|
+ @click="handleMembershipClick"
|
|
|
class="px-2 py-1 rounded-md bg-brand text-slate-900 text-xs font-medium hover:bg-brand/90 transition whitespace-nowrap min-w-fit"
|
|
class="px-2 py-1 rounded-md bg-brand text-slate-900 text-xs font-medium hover:bg-brand/90 transition whitespace-nowrap min-w-fit"
|
|
|
>
|
|
>
|
|
|
开通会员
|
|
开通会员
|
|
|
</button>
|
|
</button>
|
|
|
<button
|
|
<button
|
|
|
- @click="showSinglePurchaseModal = true"
|
|
|
|
|
|
|
+ @click="handleSinglePurchaseClick"
|
|
|
class="px-3 py-2 rounded-lg bg-blue-500 text-white text-sm font-semibold hover:bg-blue-600 transition shadow-lg hover:shadow-xl flash-animation glow-animation hover:animate-none whitespace-nowrap min-w-fit"
|
|
class="px-3 py-2 rounded-lg bg-blue-500 text-white text-sm font-semibold hover:bg-blue-600 transition shadow-lg hover:shadow-xl flash-animation glow-animation hover:animate-none whitespace-nowrap min-w-fit"
|
|
|
>
|
|
>
|
|
|
单片购买
|
|
单片购买
|
|
@@ -684,15 +684,41 @@ const errorMessage = ref("");
|
|
|
const showSinglePaymentWaitingDialog = ref(false);
|
|
const showSinglePaymentWaitingDialog = ref(false);
|
|
|
const singleCurrentOrderNo = ref("");
|
|
const singleCurrentOrderNo = ref("");
|
|
|
|
|
|
|
|
|
|
+// 检测是否为夸克浏览器
|
|
|
|
|
+const isQuarkBrowser = () => {
|
|
|
|
|
+ const ua = navigator.userAgent.toLowerCase();
|
|
|
|
|
+ return ua.includes('quark');
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
// 显示成功/错误提示的函数
|
|
// 显示成功/错误提示的函数
|
|
|
const showSuccess = (message: string) => {
|
|
const showSuccess = (message: string) => {
|
|
|
successMessage.value = message;
|
|
successMessage.value = message;
|
|
|
showSuccessDialog.value = true;
|
|
showSuccessDialog.value = true;
|
|
|
|
|
+
|
|
|
|
|
+ // 夸克浏览器自动滚动到底部
|
|
|
|
|
+ if (isQuarkBrowser()) {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ window.scrollTo({
|
|
|
|
|
+ top: document.documentElement.scrollHeight,
|
|
|
|
|
+ behavior: 'smooth'
|
|
|
|
|
+ });
|
|
|
|
|
+ }, 100);
|
|
|
|
|
+ }
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
const showError = (message: string) => {
|
|
const showError = (message: string) => {
|
|
|
errorMessage.value = message;
|
|
errorMessage.value = message;
|
|
|
showErrorDialog.value = true;
|
|
showErrorDialog.value = true;
|
|
|
|
|
+
|
|
|
|
|
+ // 夸克浏览器自动滚动到底部
|
|
|
|
|
+ if (isQuarkBrowser()) {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ window.scrollTo({
|
|
|
|
|
+ top: document.documentElement.scrollHeight,
|
|
|
|
|
+ behavior: 'smooth'
|
|
|
|
|
+ });
|
|
|
|
|
+ }, 100);
|
|
|
|
|
+ }
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// 生成设备标识
|
|
// 生成设备标识
|
|
@@ -867,12 +893,52 @@ const startTrial = () => {
|
|
|
isTrialMode.value = true;
|
|
isTrialMode.value = true;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+// 处理顶部会员购买按钮点击
|
|
|
|
|
+const handleMembershipClick = () => {
|
|
|
|
|
+ showMembershipPurchaseModal.value = true;
|
|
|
|
|
+
|
|
|
|
|
+ // 夸克浏览器自动滚动到底部
|
|
|
|
|
+ if (isQuarkBrowser()) {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ window.scrollTo({
|
|
|
|
|
+ top: document.documentElement.scrollHeight,
|
|
|
|
|
+ behavior: 'smooth'
|
|
|
|
|
+ });
|
|
|
|
|
+ }, 100);
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+// 处理顶部单片购买按钮点击
|
|
|
|
|
+const handleSinglePurchaseClick = () => {
|
|
|
|
|
+ showSinglePurchaseModal.value = true;
|
|
|
|
|
+
|
|
|
|
|
+ // 夸克浏览器自动滚动到底部
|
|
|
|
|
+ if (isQuarkBrowser()) {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ window.scrollTo({
|
|
|
|
|
+ top: document.documentElement.scrollHeight,
|
|
|
|
|
+ behavior: 'smooth'
|
|
|
|
|
+ });
|
|
|
|
|
+ }, 100);
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
// 购买会员
|
|
// 购买会员
|
|
|
const purchaseMembership = () => {
|
|
const purchaseMembership = () => {
|
|
|
// 关闭试看结束弹窗
|
|
// 关闭试看结束弹窗
|
|
|
showTrialEndModal.value = false;
|
|
showTrialEndModal.value = false;
|
|
|
// 打开会员购买弹窗
|
|
// 打开会员购买弹窗
|
|
|
showMembershipPurchaseModal.value = true;
|
|
showMembershipPurchaseModal.value = true;
|
|
|
|
|
+
|
|
|
|
|
+ // 夸克浏览器自动滚动到底部
|
|
|
|
|
+ if (isQuarkBrowser()) {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ window.scrollTo({
|
|
|
|
|
+ top: document.documentElement.scrollHeight,
|
|
|
|
|
+ behavior: 'smooth'
|
|
|
|
|
+ });
|
|
|
|
|
+ }, 100);
|
|
|
|
|
+ }
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// 处理会员购买
|
|
// 处理会员购买
|
|
@@ -974,6 +1040,16 @@ const handleSingleQueryOrder = async () => {
|
|
|
|
|
|
|
|
// 单独购买本片
|
|
// 单独购买本片
|
|
|
const purchaseVideo = async () => {
|
|
const purchaseVideo = async () => {
|
|
|
|
|
+ // 夸克浏览器自动滚动到底部
|
|
|
|
|
+ if (isQuarkBrowser()) {
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ window.scrollTo({
|
|
|
|
|
+ top: document.documentElement.scrollHeight,
|
|
|
|
|
+ behavior: 'smooth'
|
|
|
|
|
+ });
|
|
|
|
|
+ }, 100);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
try {
|
|
try {
|
|
|
// 使用视频信息的真实ID
|
|
// 使用视频信息的真实ID
|
|
|
if (!videoInfo.value.id || videoInfo.value.id === "unknown") {
|
|
if (!videoInfo.value.id || videoInfo.value.id === "unknown") {
|