首次合成次数

This commit is contained in:
xiaoaojiao
2025-09-18 17:27:03 +08:00
parent 5f63d4bd1a
commit 438bf9eecf
3 changed files with 8 additions and 8 deletions

View File

@@ -292,7 +292,7 @@ const initUserGameInfos = async (refresh_official, refresh_cap_scan) => {
if (result.res.status === 200) { if (result.res.status === 200) {
globalStore.draw_chances = result.json.draw_chances globalStore.draw_chances = result.json.draw_chances
globalStore.game_chances = result.json.game_chances globalStore.game_chances = result.json.game_chances
globalStore.invitees = result.json.invitees globalStore.first_share_today = result.json.first_share_today
globalStore.followed_official = result.json.followed_official globalStore.followed_official = result.json.followed_official
globalStore.cap_scan = result.json.cap_scan globalStore.cap_scan = result.json.cap_scan
globalStore.game_chances_view_recipes = result.json.game_chances_view_recipes globalStore.game_chances_view_recipes = result.json.game_chances_view_recipes

View File

@@ -5,8 +5,7 @@
<div class="btn-qiwei" :class="globalStore.followed_official && 'has'" @click="openQiwei($event)"></div> <div class="btn-qiwei" :class="globalStore.followed_official && 'has'" @click="openQiwei($event)"></div>
<div class="btn-scan" :class="globalStore.cap_scan >= globalStore.MAX_CAP_SCAN && 'has'" <div class="btn-scan" :class="globalStore.cap_scan >= globalStore.MAX_CAP_SCAN && 'has'"
@click="handleScan($event)"></div> @click="handleScan($event)"></div>
<div class="btn-share" :class="globalStore.invitees >= globalStore.MAX_INVITE_DAILY && 'has'" <div class="btn-share" @click="openHaibao($event)"></div>
@click="openHaibao($event)"></div>
</div> </div>
<div class="close" @click="$emit('close')"></div> <div class="close" @click="$emit('close')"></div>
</div> </div>
@@ -114,8 +113,12 @@ const openQiwei = (e) => {
qiweiShow.value = true qiweiShow.value = true
} }
const openHaibao = (e) => { const openHaibao = async(e) => {
const target = e.currentTarget const target = e.currentTarget
// TODO 首页分享增加一次合成次数
// if(!globalStore.first_share_today){
// const result = await Request('face/share',{mergeId:xxx})
// }
if (target.classList.contains("has")) { if (target.classList.contains("has")) {
return return
} }

View File

@@ -1,6 +1,7 @@
import { reactive } from "vue" import { reactive } from "vue"
export const globalStore = reactive({ export const globalStore = reactive({
first_share_today:false,
globalAudio: null, globalAudio: null,
userMutedMusic: false, // 用户是否手动静音了音乐 userMutedMusic: false, // 用户是否手动静音了音乐
isFirstVisitHomePage: true, // 是否首次访问首页 isFirstVisitHomePage: true, // 是否首次访问首页
@@ -14,7 +15,6 @@ export const globalStore = reactive({
generateStatus: false, generateStatus: false,
generateImgTemplates: [], generateImgTemplates: [],
chartsBattle: false, chartsBattle: false,
invitees: 0,
followed_official: false, followed_official: false,
cap_scan: 0, cap_scan: 0,
game_chances_view_recipes: 0, game_chances_view_recipes: 0,
@@ -36,7 +36,4 @@ export const globalStore = reactive({
lotteryAdd () { lotteryAdd () {
this.lotteryCount++ this.lotteryCount++
}, },
updateViewRecipesCount () {
this.game_chances_view_recipes = this.game_chances_view_recipes >= this.MAX_VIEW_RECIPES_DAILY ? this.MAX_VIEW_RECIPES_DAILY : this.game_chances_view_recipes + 1
}
}) })