share update

This commit is contained in:
xiaoaojiao
2025-09-18 22:06:35 +08:00
parent ebcc16086a
commit 23c2c88530

View File

@@ -29,7 +29,7 @@
import { ref, computed } from "vue" import { ref, computed } from "vue"
import { globalStore } from "@/globalstore"; import { globalStore } from "@/globalstore";
import ModalTransition from "./ModalTransition.vue" import ModalTransition from "./ModalTransition.vue"
import { Storage, generateQR, isWeixin, isMiniPage } from "../libs/utils" import { Storage, generateQR, isWeixin, isMiniPage, Request } from "../libs/utils"
import Haibao from "@/libs/haibao" import Haibao from "@/libs/haibao"
import bg from "../assets/images/haibao-bg.webp" import bg from "../assets/images/haibao-bg.webp"
import mask from "../assets/images/haibao-mask.webp" import mask from "../assets/images/haibao-mask.webp"
@@ -122,10 +122,6 @@ const openQiwei = (e) => {
const openHaibao = async (e) => { const openHaibao = async (e) => {
const target = e.currentTarget const target = e.currentTarget
// TODO 首页分享增加一次合成次数
if (!globalStore.first_share_today) {
await Request('face/share', { mergeId: mergeId })
}
if (target.classList.contains("has")) { if (target.classList.contains("has")) {
return return
} }
@@ -147,6 +143,11 @@ const openHaibao = async (e) => {
globalStore.result_url = foundItem.result_url; globalStore.result_url = foundItem.result_url;
mergeId = foundItem.id; mergeId = foundItem.id;
haibaoShow.value = true haibaoShow.value = true
if (!globalStore.first_share_today) {
Request(`face/share/${mergeId}`)
}
handleHaibao() handleHaibao()
} else { } else {
return weui.alert("请先参与活动合成图片并打榜!") return weui.alert("请先参与活动合成图片并打榜!")