fixed
This commit is contained in:
parent
bdf990d569
commit
5519dee3cf
@ -1,4 +1,4 @@
|
||||
NODE_ENV = development
|
||||
ENV = development
|
||||
VITE_APP_BASE_URL = https://game.777spinz.com
|
||||
# VITE_APP_BASE_URL=https://game-api.777spinz.com
|
||||
# VITE_APP_BASE_URL=http://192.168.1.24:8093
|
||||
|
@ -1,2 +1,2 @@
|
||||
NODE_ENV=production
|
||||
ENV=production
|
||||
VITE_APP_BASE_URL=https://game-api.777spinz.com
|
38
package.json
38
package.json
@ -180,21 +180,21 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@adjustcom/adjust-web-sdk": "^5.7.1",
|
||||
"@dcloudio/uni-app": "3.0.0-4040520250104002",
|
||||
"@dcloudio/uni-app-harmony": "3.0.0-4040520250104002",
|
||||
"@dcloudio/uni-app-plus": "3.0.0-4040520250104002",
|
||||
"@dcloudio/uni-components": "3.0.0-4040520250104002",
|
||||
"@dcloudio/uni-h5": "3.0.0-4040520250104002",
|
||||
"@dcloudio/uni-mp-alipay": "3.0.0-4040520250104002",
|
||||
"@dcloudio/uni-mp-baidu": "3.0.0-4040520250104002",
|
||||
"@dcloudio/uni-mp-jd": "3.0.0-4040520250104002",
|
||||
"@dcloudio/uni-mp-kuaishou": "3.0.0-4040520250104002",
|
||||
"@dcloudio/uni-mp-lark": "3.0.0-4040520250104002",
|
||||
"@dcloudio/uni-mp-qq": "3.0.0-4040520250104002",
|
||||
"@dcloudio/uni-mp-toutiao": "3.0.0-4040520250104002",
|
||||
"@dcloudio/uni-mp-weixin": "3.0.0-4040520250104002",
|
||||
"@dcloudio/uni-mp-xhs": "3.0.0-4040520250104002",
|
||||
"@dcloudio/uni-quickapp-webview": "3.0.0-4040520250104002",
|
||||
"@dcloudio/uni-app": "3.0.0-4050520250307001",
|
||||
"@dcloudio/uni-app-harmony": "3.0.0-4050520250307001",
|
||||
"@dcloudio/uni-app-plus": "3.0.0-4050520250307001",
|
||||
"@dcloudio/uni-components": "3.0.0-4050520250307001",
|
||||
"@dcloudio/uni-h5": "3.0.0-4050520250307001",
|
||||
"@dcloudio/uni-mp-alipay": "3.0.0-4050520250307001",
|
||||
"@dcloudio/uni-mp-baidu": "3.0.0-4050520250307001",
|
||||
"@dcloudio/uni-mp-jd": "3.0.0-4050520250307001",
|
||||
"@dcloudio/uni-mp-kuaishou": "3.0.0-4050520250307001",
|
||||
"@dcloudio/uni-mp-lark": "3.0.0-4050520250307001",
|
||||
"@dcloudio/uni-mp-qq": "3.0.0-4050520250307001",
|
||||
"@dcloudio/uni-mp-toutiao": "3.0.0-4050520250307001",
|
||||
"@dcloudio/uni-mp-weixin": "3.0.0-4050520250307001",
|
||||
"@dcloudio/uni-mp-xhs": "3.0.0-4050520250307001",
|
||||
"@dcloudio/uni-quickapp-webview": "3.0.0-4050520250307001",
|
||||
"crypto-js": "^4.2.0",
|
||||
"lodash": "^4.17.21",
|
||||
"md5": "^2.3.0",
|
||||
@ -206,11 +206,11 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@dcloudio/types": "3.4.14",
|
||||
"@dcloudio/uni-automator": "3.0.0-4040520250104002",
|
||||
"@dcloudio/uni-cli-shared": "3.0.0-4040520250104002",
|
||||
"@dcloudio/uni-stacktracey": "3.0.0-4040520250104002",
|
||||
"@dcloudio/uni-automator": "3.0.0-4050520250307001",
|
||||
"@dcloudio/uni-cli-shared": "3.0.0-4050520250307001",
|
||||
"@dcloudio/uni-stacktracey": "3.0.0-4050520250307001",
|
||||
"@dcloudio/uni-uts-v1": "3.0.0-4040520250104002",
|
||||
"@dcloudio/vite-plugin-uni": "3.0.0-4040520250104002",
|
||||
"@dcloudio/vite-plugin-uni": "3.0.0-4050520250307001",
|
||||
"@types/crypto-js": "^4.2.2",
|
||||
"@uni-helper/uni-app-types": "1.0.0-alpha.6",
|
||||
"@vue/runtime-core": "3.4.21",
|
||||
|
@ -11,9 +11,16 @@ const api = {
|
||||
openGameSearch: ipConfig.api_app + '/labelGame/openGameSearch',
|
||||
getGameByCategoryAndPage: ipConfig.api_app + '/labelGame/getGameByCategoryAndPage',
|
||||
getSearchResults: ipConfig.api_app + '/labelGame/getSearchResults',
|
||||
jiliLogout: ipConfig.api_app + '/jili/transfer/logout'
|
||||
jiliLogout: ipConfig.api_app + '/jili/transfer/logout',
|
||||
gameOut: ipConfig.api_app + '/labelGame/logoutGame',
|
||||
}
|
||||
|
||||
export const gameOutApi = () => {
|
||||
return httpRequest.post({
|
||||
url: api.gameOut,
|
||||
data: {}
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 获取标签
|
||||
*/
|
||||
|
@ -2,7 +2,7 @@
|
||||
import { ref, computed } from 'vue'
|
||||
import { useThemeStore } from '@/store/useThemeStore.js'
|
||||
import { createBankruptRechargeApi } from '@/api/home'
|
||||
import { formatNum } from '@/module/utils/util'
|
||||
import { openWeb } from '@/module/utils/openUrl'
|
||||
|
||||
const props = defineProps({
|
||||
detail: {
|
||||
@ -23,25 +23,22 @@ const close = () => {
|
||||
emit('close')
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {number} num
|
||||
*/
|
||||
function transNumtoStrArr(num) {
|
||||
if (!num || isNaN(num)) return []
|
||||
return num.toString().split('')
|
||||
}
|
||||
const createOrder = async () => {
|
||||
console.log('createOrder')
|
||||
const { data } = await createBankruptRechargeApi();
|
||||
console.log('createOrder', data);
|
||||
}
|
||||
const calAmount = (obj) => {
|
||||
if(obj.recharge, obj.rate) {
|
||||
return formatNum(obj.recharge * obj.rate + obj.recharge, 1)
|
||||
const createOrder = async (recharge) => {
|
||||
uni.showLoading({ title: 'Loading...' })
|
||||
try {
|
||||
const { data } = await createBankruptRechargeApi(recharge);
|
||||
console.log('createOrder', data);
|
||||
if (data?.isSuccess) {
|
||||
openWeb(data?.url);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log('createOrder error', error);
|
||||
} finally {
|
||||
uni.hideLoading()
|
||||
}
|
||||
return 0
|
||||
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
open,
|
||||
close
|
||||
@ -52,38 +49,39 @@ defineExpose({
|
||||
<view class="pop-content relative" :style="{ background: theme.popBg }">
|
||||
<theme-image src="@/static/greatRebet/image_X.png" class="close pos-absolute" @click="close"></theme-image>
|
||||
<view class="tip pos-absolute" :style="{ color: theme.tip }">{{ $t('home.greatRebet.tip') }}</view>
|
||||
<view class="bonus left pos-absolute">
|
||||
<view class="bonus left pos-absolute" v-if="detail.length > 0">
|
||||
<view class="amount flex-center">
|
||||
<!-- <theme-image src="@/static/greatRebet/lubi.png" class="icon-num"></theme-image>
|
||||
<theme-image v-for="(item, index) in transNumtoStrArr(130)" :key="index" class="icon-num"
|
||||
:src="`@/static/greatRebet/${item}.png`"></theme-image> -->
|
||||
{{ currency }}{{ detail[0]['give'] }}
|
||||
{{ currency }}{{ detail[0]['give'] + detail[0]['recharge'] }}
|
||||
</view>
|
||||
<view class="percent pos-absolute percent-left flex-center"
|
||||
:style="{ background: theme.percentBg, color: theme.percent }">
|
||||
<text>{{ formatNum(detail[0]['rate'] * 100, 1) }}</text>
|
||||
<text>{{ detail[0]['rate'] }}</text>
|
||||
<text style="font-size: 20rpx;">%</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bonus center pos-absolute">
|
||||
<view class="amount flex-center">{{ currency }}{{ detail[1]['give'] }}</view>
|
||||
<view class="amount flex-center">{{ currency }}{{ detail[1]['give'] + detail[1]['recharge'] }}</view>
|
||||
<view class="percent percent-center pos-absolute flex-center"
|
||||
:style="{ background: theme.percentBg, color: theme.percent }">
|
||||
<text>{{ formatNum(detail[1]['rate'] * 100, 1) }}</text>
|
||||
<text>{{ detail[1]['rate'] }}</text>
|
||||
<text style="font-size: 20rpx;">%</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bonus right pos-absolute">
|
||||
<view class="amount flex-center">{{ currency }}{{ detail[2]['give'] }}</view>
|
||||
<view class="amount flex-center">{{ currency }}{{ detail[2]['give'] + detail[2]['recharge'] }}</view>
|
||||
<view class="percent percent-right pos-absolute flex-center"
|
||||
:style="{ background: theme.percentBg, color: theme.percent }">
|
||||
<text>{{ formatNum(detail[2]['rate'] * 100, 1) }}</text>
|
||||
<text>{{ detail[2]['rate'] }}</text>
|
||||
<text style="font-size: 20rpx;">%</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-box pos-absolute flex justify-between w-full">
|
||||
<view v-for="(item, index) in detail" :key="index" class="recharge-btn flex-center" :style="{ background: theme.btnBg, color: theme.light }"
|
||||
@click.stop="createOrder(item.recharge)">{{ currency }}{{ item.recharge }}</view>
|
||||
<view v-for="(item, index) in detail" :key="index" class="recharge-btn flex-center"
|
||||
:style="{ background: theme.btnBg, color: theme.light }" @click.stop="createOrder(item.recharge)">{{
|
||||
currency }}{{ item.recharge }}</view>
|
||||
<!-- <view class="recharge-btn flex-center" :style="{ background: theme.btnBg, color: theme.light }"
|
||||
@click.stop="createOrder">{{ currency }}22</view>
|
||||
<view class="recharge-btn flex-center" :style="{ background: theme.btnBg, color: theme.light }"
|
||||
@ -144,7 +142,7 @@ defineExpose({
|
||||
.amount {
|
||||
font-family: Roboto;
|
||||
font-weight: bold;
|
||||
font-size: 44rpx;
|
||||
font-size: 40rpx;
|
||||
color: #FFFFFF;
|
||||
// text-shadow: 1rpx 1rpx 4rpx #8A0A00;
|
||||
background: linear-gradient(45deg, #F5FF60, #FFDE00, #FFFFFF 10%, #FFDE00, #F5FF60);
|
||||
@ -162,17 +160,17 @@ defineExpose({
|
||||
}
|
||||
|
||||
.percent-left {
|
||||
top: -60rpx;
|
||||
top: -64rpx;
|
||||
right: -20rpx;
|
||||
}
|
||||
|
||||
.percent-center {
|
||||
top: -20rpx;
|
||||
right: -20rpx;
|
||||
top: -60rpx;
|
||||
right: -30rpx;
|
||||
}
|
||||
|
||||
.percent-right {
|
||||
top: -30rpx;
|
||||
top: -60rpx;
|
||||
right: -30rpx;
|
||||
}
|
||||
|
||||
|
@ -5,8 +5,8 @@
|
||||
"appid" : "__UNI__FECBD22",
|
||||
"description" : "Winzz777",
|
||||
// "description" : "Spinz777",
|
||||
"versionName" : "1.2.1",
|
||||
"versionCode" : 121,
|
||||
"versionName" : "1.2.2",
|
||||
"versionCode" : 122,
|
||||
"channel_list" : [
|
||||
{
|
||||
"id" : "suisui2"
|
||||
|
@ -2,18 +2,20 @@
|
||||
<common-layout bgColor="#4D0606">
|
||||
<!-- <theme-image src="@/static/home_bg.png" mode="aspectFill" class="home-bg"
|
||||
:style="{ height: appStore.windowInfo.height + 'px', width: appStore.windowInfo.width + 'px' }" /> -->
|
||||
<view class="home-container"
|
||||
:style="{ background: `top / cover no-repeat ${themeStore.theme.home.bgColor}`, height: appStore.windowInfo.screenHeight + 'px' }">
|
||||
<view class="home-container" :style="{
|
||||
background: `top / cover no-repeat ${themeStore.theme.home.bgColor}`,
|
||||
height: appStore.windowInfo.screenHeight + 'px',
|
||||
}">
|
||||
<HomeHeader />
|
||||
<!-- <view>Hello World</view> -->
|
||||
<view class="plr30">
|
||||
<uni-swiper-dot :info="pageData.bannerList" :current="pageData.currentIndex" field="content"
|
||||
mode="round" :dotsStyles="{
|
||||
backgroundColor: '#fff',
|
||||
selectedBackgroundColor: themeStore.theme.swiper.dot,
|
||||
selectedBorder: 'none',
|
||||
bottom: 6,
|
||||
}">
|
||||
backgroundColor: '#fff',
|
||||
selectedBackgroundColor: themeStore.theme.swiper.dot,
|
||||
selectedBorder: 'none',
|
||||
bottom: 6,
|
||||
}">
|
||||
<swiper class="swiper-view" :circular="true" :duration="500" :autoplay="true"
|
||||
:indicator-dots="false" :interval="3000" @change="handleSwipeChange">
|
||||
<swiper-item v-for="(item, index) in pageData.bannerList" :key="index"
|
||||
@ -33,15 +35,15 @@
|
||||
<view class="plr30">
|
||||
<view class="home-tabs-view" :style="{ 'border-color': themeStore.theme.seplineColor }">
|
||||
<SegmentControl :listData="[
|
||||
{ title: $t('home.allgames') },
|
||||
{ title: $t('home.recent') },
|
||||
{ title: $t('home.favorite') },
|
||||
]" @change="({ index }) => {
|
||||
gameStore.getRecentGames();
|
||||
gameStore.getFavoriteGames();
|
||||
pageData.active = index;
|
||||
}
|
||||
" />
|
||||
{ title: $t('home.allgames') },
|
||||
{ title: $t('home.recent') },
|
||||
{ title: $t('home.favorite') },
|
||||
]" @change="({ index }) => {
|
||||
gameStore.getRecentGames();
|
||||
gameStore.getFavoriteGames();
|
||||
pageData.active = index;
|
||||
}
|
||||
" />
|
||||
</view>
|
||||
</view>
|
||||
<view v-show="pageData.active === 0">
|
||||
@ -62,7 +64,7 @@
|
||||
<NoDataSearch style="width: 100%" v-if="gameStore.favoriteGameList.length === 0" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="w-full space" style="height: 100rpx;"></view>
|
||||
<view class="w-full space" style="height: 100rpx"></view>
|
||||
</view>
|
||||
<!-- float-promo -->
|
||||
<!-- <view class="float-promo" v-if="depositBonusRights" @click.stop="openDepositBonus">
|
||||
@ -106,19 +108,26 @@
|
||||
@close="handleClose" />
|
||||
<ConDepositPop ref="conDepositPop" @close="handleClose" />
|
||||
<DepositBonus ref="depositBonusPop" @close="handleClose" />
|
||||
<GreatRebet v-if="bankruptArr.length > 0" ref="greatPopRef" :detail="bankruptArr" @close="handleClose" />
|
||||
<view v-if="showSlider" class="slider-bar"
|
||||
:style="{ right: -(col * singleItemWidth + 38) + 'rpx', transform: `translateX(${slideTranslateX}rpx)` }">
|
||||
<GreatRebet ref="greatPopRef" :detail="bankruptArr" @close="handleClose" />
|
||||
<view v-if="showSlider" class="slider-bar" :style="{
|
||||
right: -(col * singleItemWidth + 38) + 'rpx',
|
||||
transform: `translateX(${slideTranslateX}rpx)`,
|
||||
}">
|
||||
<view class="out-menu" @click="menuClick">
|
||||
<theme-image :src="`@/static/home/${slideOpen ? 'shouqi.png':'zhankai.png'}`" class="icon-slide-menu" />
|
||||
<theme-image :src="`@/static/home/${slideOpen ? 'shouqi.png' : 'zhankai.png'}`"
|
||||
class="icon-slide-menu" />
|
||||
<view class="red-dot" v-if="isDoted"></view>
|
||||
</view>
|
||||
<view class="slider-box" :style="{ width: slideWidth + 'rpx' }">
|
||||
<view class="slide-item relative" v-for="(item, index) in slideItems" :key="index" @click.stop="openPromo(item)">
|
||||
<theme-image :src="item.icon"
|
||||
:style="{ width: singleItemWidth + 'rpx', height: singleItemWidth + 'rpx' }" class="icon-slide-menu"
|
||||
mode="aspectFit" />
|
||||
<view class="red-dot" v-if="item.doted"></view>
|
||||
<view class="slide-item relative" v-for="(item, index) in slideItems" :key="index"
|
||||
@click.stop="openPromo(item)">
|
||||
<theme-image :src="item.icon" :style="{
|
||||
width: singleItemWidth + 'rpx',
|
||||
height: singleItemWidth + 'rpx',
|
||||
}" class="icon-slide-menu" mode="aspectFit" />
|
||||
<view class="red-dot flex-center" v-if="item.doted">
|
||||
<text :style="{ color: themeStore.theme.depositWheel.quaternary }">{{ item.count }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@ -136,7 +145,11 @@ import { useThemeStore } from "@/store/useThemeStore";
|
||||
import { useMailStore } from "@/store/useMailStore.js";
|
||||
import { useDepositStore } from "@/store/useDepositStore";
|
||||
import { usePromoStore } from "@/store/usePromoStore";
|
||||
import { checkBankruptApi, requestBannerList, requestRechargeButtonStatus } from "@/api/home";
|
||||
import {
|
||||
checkBankruptApi,
|
||||
requestBannerList,
|
||||
requestRechargeButtonStatus,
|
||||
} from "@/api/home";
|
||||
import { requestGetGameUrlByGame } from "@/api/game.js";
|
||||
import HomeUserInfo from "./components/HomeUserInfo.vue";
|
||||
import HomeHeader from "./components/HomeHeader.vue";
|
||||
@ -150,12 +163,12 @@ import Rank from "./components/PromoPopup/Rank.vue";
|
||||
import UpRebate from "./components/PromoPopup/UpRebate.vue";
|
||||
import Signin from "./components/PromoPopup/Signin.vue";
|
||||
import Community from "./components/PromoPopup/Community.vue";
|
||||
import Jili from "./components/PromoPopup/Jili.vue"
|
||||
import Jili from "./components/PromoPopup/Jili.vue";
|
||||
import UserInfoPopUp from "./components/UserInfo.vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import { openUrl } from "@/module/utils/openUrl";
|
||||
// import StartLoading from "@/components/loading/StartLoading.vue"
|
||||
import { okSpin } from '@/module/third/okspin.js'
|
||||
import { okSpin } from "@/module/third/okspin.js";
|
||||
import BindPhonePop from "@/components/popup/BindPhonePop.vue";
|
||||
import Congratulation from "@/components/popup/Congratulation.vue";
|
||||
import BindPromoPop from "@/components/popup/BindPromoPop.vue";
|
||||
@ -175,11 +188,11 @@ const userStore = useUserStore();
|
||||
const appStore = useAppStore();
|
||||
const themeStore = useThemeStore();
|
||||
const mailStore = useMailStore();
|
||||
const depositStore = useDepositStore()
|
||||
const promoStore = usePromoStore()
|
||||
const depositBonusRights = ref(false)
|
||||
const awardPopup = ref(null)
|
||||
const greatPopRef = ref(null)
|
||||
const depositStore = useDepositStore();
|
||||
const promoStore = usePromoStore();
|
||||
const depositBonusRights = ref(false);
|
||||
const awardPopup = ref(null);
|
||||
const greatPopRef = ref(null);
|
||||
const pageData = reactive({
|
||||
// startLoadingVisible: true,
|
||||
currentIndex: 0,
|
||||
@ -189,69 +202,69 @@ const pageData = reactive({
|
||||
});
|
||||
|
||||
// slider area
|
||||
const slideOpen = ref(false)
|
||||
const showSlider = ref(false)
|
||||
const slideWidth = ref(150)
|
||||
const singleItemWidth = 112
|
||||
const slideOpen = ref(false);
|
||||
const showSlider = ref(false);
|
||||
const slideWidth = ref(150);
|
||||
const singleItemWidth = 112;
|
||||
// const slideTranslateX = ref(-150)
|
||||
const colLength = 5
|
||||
const colLength = 5;
|
||||
const col = computed(() => {
|
||||
return Math.ceil(slideItems.value.length / colLength)
|
||||
})
|
||||
const slideItems = ref([])
|
||||
return Math.ceil(slideItems.value.length / colLength);
|
||||
});
|
||||
const slideItems = ref([]);
|
||||
const isDoted = computed(() => {
|
||||
return slideItems.value.filter(v => v.doted).length > 0
|
||||
})
|
||||
return slideItems.value.filter((v) => v.doted).length > 0;
|
||||
});
|
||||
const slideTranslateX = computed(() => {
|
||||
return slideOpen.value ? -152 : 2
|
||||
})
|
||||
return slideOpen.value ? -152 : 2;
|
||||
});
|
||||
const menuClick = () => {
|
||||
slideOpen.value = !slideOpen.value
|
||||
}
|
||||
slideOpen.value = !slideOpen.value;
|
||||
};
|
||||
const openPromo = (item) => {
|
||||
const idx = slideItems.value.findIndex(v => v.dotName == item.dotName)
|
||||
console.log('openPromo', idx, item);
|
||||
|
||||
if(idx > -1) {
|
||||
slideItems.value[idx].doted = false
|
||||
const idx = slideItems.value.findIndex((v) => v.dotName == item.dotName);
|
||||
console.log("openPromo", idx, item);
|
||||
|
||||
if (idx > -1) {
|
||||
slideItems.value[idx].doted = false;
|
||||
}
|
||||
setDot(item.dotName, false)
|
||||
setDot(item.dotName, false);
|
||||
if (item.el) {
|
||||
item.el?.open()
|
||||
item.el?.open();
|
||||
} else {
|
||||
uni.navigateTo({
|
||||
url: item.path,
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
// end
|
||||
|
||||
const posY = ref(200)
|
||||
const rewardDayonce = ref(false)
|
||||
const bindPromoPop = ref(null)
|
||||
const bindPhone = ref(null)
|
||||
const firstRechargePop = ref(null)
|
||||
const popupArr = ref([])
|
||||
const today = ref('')
|
||||
const rankPop = ref(null)
|
||||
const rankRewardPop = ref(null)
|
||||
const rankData = ref(0)
|
||||
const conDepositPop = ref(null)
|
||||
const depositBonusPop = ref(null)
|
||||
const wheelPop = ref(null)
|
||||
const greatRebet = ref(null)
|
||||
const posY = ref(200);
|
||||
const rewardDayonce = ref(false);
|
||||
const bindPromoPop = ref(null);
|
||||
const bindPhone = ref(null);
|
||||
const firstRechargePop = ref(null);
|
||||
const popupArr = ref([]);
|
||||
const today = ref("");
|
||||
const rankPop = ref(null);
|
||||
const rankRewardPop = ref(null);
|
||||
const rankData = ref(0);
|
||||
const conDepositPop = ref(null);
|
||||
const depositBonusPop = ref(null);
|
||||
const wheelPop = ref(null);
|
||||
const greatRebet = ref(null);
|
||||
// const app = getCurrentInstance();
|
||||
const actState = ref(0)
|
||||
const activityData = ref({})
|
||||
const actState = ref(0);
|
||||
const activityData = ref({});
|
||||
const isShowToday = computed(() => {
|
||||
if (today.value) {
|
||||
return today.value == conversionTime()
|
||||
return today.value == conversionTime();
|
||||
}
|
||||
return false
|
||||
})
|
||||
return false;
|
||||
});
|
||||
const onUnbindPhone = () => {
|
||||
bindPhone.value.open()
|
||||
}
|
||||
bindPhone.value.open();
|
||||
};
|
||||
/**
|
||||
* 弹窗显示隐藏相关参数
|
||||
*/
|
||||
@ -260,70 +273,68 @@ let upRebateVisible = ref(false);
|
||||
let signinVisible = ref(false);
|
||||
let rankVisible = ref(false);
|
||||
let communityVisible = ref(false);
|
||||
let jiliVisible = ref(false)
|
||||
let jiliVisible = ref(false);
|
||||
let isRegister = ref(userStore.isOneClickRegister);
|
||||
let registerSuccesVisible = ref(false);
|
||||
let popupData = reactive({});
|
||||
let popupIndex = ref(0);
|
||||
|
||||
|
||||
const openDepositBonus = () => {
|
||||
if (actState.value == 2) {
|
||||
checkUserAct()
|
||||
depositBonusPop.value.open()
|
||||
|
||||
checkUserAct();
|
||||
depositBonusPop.value.open();
|
||||
} else {
|
||||
conDepositPop.value.open()
|
||||
conDepositPop.value.open();
|
||||
}
|
||||
}
|
||||
};
|
||||
const delay = (s) => {
|
||||
return new Promise(resolve => setTimeout(resolve, s))
|
||||
}
|
||||
return new Promise((resolve) => setTimeout(resolve, s));
|
||||
};
|
||||
const handleClose = async () => {
|
||||
await delay(300)
|
||||
showPopQueue()
|
||||
}
|
||||
await delay(300);
|
||||
showPopQueue();
|
||||
};
|
||||
const preLoadImg = (url) => {
|
||||
// const image = new Image();
|
||||
// image.src = url;
|
||||
uni.getImageInfo({
|
||||
src: url,
|
||||
});
|
||||
}
|
||||
};
|
||||
const handleOnBind = () => {
|
||||
bindPhone.value.open()
|
||||
}
|
||||
bindPhone.value.open();
|
||||
};
|
||||
const handleChecked2 = () => {
|
||||
if (rewardDayonce.value) {
|
||||
uni.removeStorageSync('rewardDayonce')
|
||||
rewardDayonce.value = false
|
||||
uni.removeStorageSync("rewardDayonce");
|
||||
rewardDayonce.value = false;
|
||||
} else {
|
||||
uni.setStorageSync('rewardDayonce', conversionTime())
|
||||
rewardDayonce.value = true
|
||||
uni.setStorageSync("rewardDayonce", conversionTime());
|
||||
rewardDayonce.value = true;
|
||||
}
|
||||
}
|
||||
};
|
||||
const handleChecked = () => {
|
||||
if (isShowToday.value) {
|
||||
uni.removeStorageSync('today')
|
||||
today.value = ''
|
||||
uni.removeStorageSync("today");
|
||||
today.value = "";
|
||||
} else {
|
||||
uni.setStorageSync('today', conversionTime())
|
||||
today.value = conversionTime()
|
||||
uni.setStorageSync("today", conversionTime());
|
||||
today.value = conversionTime();
|
||||
}
|
||||
}
|
||||
};
|
||||
const showPopQueue = () => {
|
||||
if (popupArr.value.length > 0) {
|
||||
const popup = popupArr.value.shift()
|
||||
popup && popup.open()
|
||||
const popup = popupArr.value.shift();
|
||||
popup && popup.open();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const getPageData = () => {
|
||||
gameStore.getRecentGames();
|
||||
gameStore.getFavoriteGames();
|
||||
if (userStore.isLogin) {
|
||||
mailStore.getMailList();
|
||||
depositStore.getChargeInfo()
|
||||
depositStore.getChargeInfo();
|
||||
}
|
||||
};
|
||||
|
||||
@ -333,7 +344,7 @@ const getBanner = async () => {
|
||||
return;
|
||||
}
|
||||
pageData.bannerList = data.bannerList || [];
|
||||
pageData.bannerList.forEach(banner => preLoadImg(banner.imageUrl));
|
||||
pageData.bannerList.forEach((banner) => preLoadImg(banner.imageUrl));
|
||||
};
|
||||
|
||||
const handleSwipeChange = (e) => {
|
||||
@ -382,32 +393,32 @@ const handleBannerClick = async (item) => {
|
||||
case 11:
|
||||
break;
|
||||
case 12:
|
||||
navTo('/pages/promo/SignupBonus')
|
||||
navTo("/pages/promo/SignupBonus");
|
||||
break;
|
||||
case 13:
|
||||
navTo('/pages/promo/Jili')
|
||||
navTo("/pages/promo/Jili");
|
||||
break;
|
||||
case 14:
|
||||
navTo('/pages/promo/InvitationalRanks')
|
||||
navTo("/pages/promo/InvitationalRanks");
|
||||
break;
|
||||
case 15:
|
||||
navTo('/pages/activity/Activity')
|
||||
navTo("/pages/activity/Activity");
|
||||
break;
|
||||
case 16:
|
||||
if (!userStore.userInfo?.mobile) {
|
||||
bindPhone.value.open()
|
||||
bindPhone.value.open();
|
||||
} else {
|
||||
toast.show(t('account.bindPhone.binded'))
|
||||
toast.show(t("account.bindPhone.binded"));
|
||||
}
|
||||
break;
|
||||
case 17:
|
||||
navTo('/pages/activity/Poster')
|
||||
navTo("/pages/activity/Poster");
|
||||
break;
|
||||
case 18:
|
||||
navTo('/pages/promo/TgExchange')
|
||||
navTo("/pages/promo/TgExchange");
|
||||
break;
|
||||
case 19:
|
||||
navTo('/pages/redeposit/ReDeposit')
|
||||
navTo("/pages/redeposit/ReDeposit");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@ -482,7 +493,7 @@ const handleBannerClick = async (item) => {
|
||||
if (code !== 200 && !data) {
|
||||
return;
|
||||
}
|
||||
uni.setStorageSync('GAME_URL_KEY', data)
|
||||
uni.setStorageSync("GAME_URL_KEY", data);
|
||||
uni.navigateTo({
|
||||
url: `/pages/webview/GameWeb?url=${encodeURIComponent(data)}`,
|
||||
});
|
||||
@ -496,20 +507,20 @@ const handleBannerClick = async (item) => {
|
||||
*/
|
||||
const getPromoLists = async () => {
|
||||
// await promoStore.getPromoList()
|
||||
const arr = promoStore.promoPopupList
|
||||
console.log('popList:', arr);
|
||||
const arr = promoStore.promoPopupList;
|
||||
console.log("popList:", arr);
|
||||
|
||||
pageData.popupList = arr;
|
||||
if (isRegister.value && userStore.password) {
|
||||
registerSuccesVisible.value = true;
|
||||
} else {
|
||||
if (appStore.hasShowActivity) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
if (pageData.popupList.length > 0) {
|
||||
appStore.hasShowActivity = true
|
||||
appStore.hasShowActivity = true;
|
||||
}
|
||||
console.log('pageData.popupList', pageData.popupList);
|
||||
console.log("pageData.popupList", pageData.popupList);
|
||||
|
||||
popupLogicJudgment(pageData.popupList[0]);
|
||||
}
|
||||
@ -544,8 +555,8 @@ const closePopup = (type, checkValue = false) => {
|
||||
isRegister.value = false;
|
||||
userStore.isOneClickRegister = false;
|
||||
}
|
||||
if (type === 'giftCode') {
|
||||
jiliVisible.value = false
|
||||
if (type === "giftCode") {
|
||||
jiliVisible.value = false;
|
||||
}
|
||||
if (pageData.popupList.length - 1 >= popupIndex.value) {
|
||||
const obj = pageData.popupList[popupIndex.value];
|
||||
@ -559,7 +570,9 @@ const closePopup = (type, checkValue = false) => {
|
||||
* 弹窗逻辑判断
|
||||
*/
|
||||
const popupLogicJudgment = (item) => {
|
||||
if (!item) { return }
|
||||
if (!item) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (item.popup == "firstdeposit") {
|
||||
let value = uni.getStorageSync("checkEndTime");
|
||||
@ -590,52 +603,53 @@ const popupLogicJudgment = (item) => {
|
||||
if (item.popup == "signin") {
|
||||
signinVisible.value = true;
|
||||
}
|
||||
if (item.popup === 'giftCode') {
|
||||
jiliVisible.value = true
|
||||
if (item.popup === "giftCode") {
|
||||
jiliVisible.value = true;
|
||||
}
|
||||
};
|
||||
const date2Date = (dateStr) => {
|
||||
const date = new Date(dateStr)
|
||||
const year = date.getFullYear()
|
||||
const month = date.getMonth()
|
||||
const day = date.getDate()
|
||||
return new Date(year, month, day)
|
||||
}
|
||||
const date = new Date(dateStr);
|
||||
const year = date.getFullYear();
|
||||
const month = date.getMonth();
|
||||
const day = date.getDate();
|
||||
return new Date(year, month, day);
|
||||
};
|
||||
function setDot(key, val) {
|
||||
uni.setStorage({
|
||||
key,
|
||||
data: val,
|
||||
})
|
||||
});
|
||||
}
|
||||
function getDot(key) {
|
||||
return uni.getStorageSync(key)
|
||||
return uni.getStorageSync(key);
|
||||
}
|
||||
const checkUserAct = async () => {
|
||||
const { data } = await checkRechargeActApi()
|
||||
const { data } = await checkRechargeActApi();
|
||||
console.log("User activity", data);
|
||||
actState.value = data.state
|
||||
actState.value = data.state;
|
||||
if (data.state === 0 || (data.activity == null && data.detailList == null)) {
|
||||
depositBonusRights.value = false
|
||||
return
|
||||
depositBonusRights.value = false;
|
||||
return;
|
||||
}
|
||||
depositBonusRights.value = true
|
||||
depositBonusRights.value = true;
|
||||
if (data.state === 1) {
|
||||
if (data.activity?.content) {
|
||||
const content = JSON.parse(data.activity?.content ?? '{}')
|
||||
promoStore.rechargeContent = content
|
||||
let doted = false
|
||||
const dot = getDot('recharge_bonus')
|
||||
if(dot === '') {
|
||||
doted = true
|
||||
const content = JSON.parse(data.activity?.content ?? "{}");
|
||||
promoStore.rechargeContent = content;
|
||||
let doted = false;
|
||||
const dot = getDot("recharge_bonus");
|
||||
if (dot === "") {
|
||||
doted = true;
|
||||
}
|
||||
slideItems.value.push({
|
||||
el: conDepositPop.value,
|
||||
path: '',
|
||||
icon: '@/static/pop_icons/deposit.gif',
|
||||
path: "",
|
||||
icon: "@/static/pop_icons/deposit.gif",
|
||||
doted: doted,
|
||||
dotName: 'recharge_bonus',
|
||||
})
|
||||
popupArr.value.push(conDepositPop.value)
|
||||
dotName: "recharge_bonus",
|
||||
count: 1
|
||||
});
|
||||
popupArr.value.push(conDepositPop.value);
|
||||
}
|
||||
}
|
||||
if (data.state === 2) {
|
||||
@ -643,15 +657,18 @@ const checkUserAct = async () => {
|
||||
// Need to complete the game Galgame
|
||||
if (data.detailList) {
|
||||
promoStore.detailList = data.detailList.map((item, index) => {
|
||||
const condition = JSON.parse(item.condition)
|
||||
const games = condition.typeVal.filter(item => item.name !== '').map(item => {
|
||||
return item?.name
|
||||
}).join('、')
|
||||
const condition = JSON.parse(item.condition);
|
||||
const games = condition.typeVal
|
||||
.filter((item) => item.name !== "")
|
||||
.map((item) => {
|
||||
return item?.name;
|
||||
})
|
||||
.join("、");
|
||||
|
||||
item.conditions = games
|
||||
item.show = false
|
||||
return item
|
||||
})
|
||||
item.conditions = games;
|
||||
item.show = false;
|
||||
return item;
|
||||
});
|
||||
|
||||
promoStore.detailList.unshift({
|
||||
id: 1,
|
||||
@ -660,32 +677,34 @@ const checkUserAct = async () => {
|
||||
status: 2,
|
||||
curBets: 1,
|
||||
maxBets: 1,
|
||||
conditions: '',
|
||||
show: false
|
||||
})
|
||||
const today = date2Date(Date.now())
|
||||
conditions: "",
|
||||
show: false,
|
||||
});
|
||||
const today = date2Date(Date.now());
|
||||
const idx = promoStore.detailList.findIndex((i) => {
|
||||
const endDate = date2Date(i.giveDate)
|
||||
return today.getTime() == endDate.getTime()
|
||||
})
|
||||
const endDate = date2Date(i.giveDate);
|
||||
return today.getTime() == endDate.getTime();
|
||||
});
|
||||
|
||||
if (idx !== -1) {
|
||||
promoStore.detailList[idx].show = true
|
||||
promoStore.detailList[idx].show = true;
|
||||
}
|
||||
|
||||
popupArr.value.push(depositBonusPop.value)
|
||||
const hasDot = promoStore.detailList.filter(item => item.status === 1).length > 0
|
||||
setDot('deposit_doted', hasDot)
|
||||
popupArr.value.push(depositBonusPop.value);
|
||||
const hasDot =
|
||||
promoStore.detailList.filter((item) => item.status === 1).length > 0;
|
||||
setDot("deposit_doted", hasDot);
|
||||
slideItems.value.push({
|
||||
el: depositBonusPop.value,
|
||||
path: '',
|
||||
icon: '@/static/pop_icons/deposit.gif',
|
||||
path: "",
|
||||
icon: "@/static/pop_icons/deposit.gif",
|
||||
doted: hasDot,
|
||||
dotName:'deposit_doted',
|
||||
})
|
||||
dotName: "deposit_doted",
|
||||
count: 1
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
// onPullDownRefresh(async () => {
|
||||
// setTimeout(() => {
|
||||
// uni.stopPullDownRefresh();
|
||||
@ -697,148 +716,183 @@ const checkUserAct = async () => {
|
||||
// showPopQueue()
|
||||
// })
|
||||
const onBindPhoneComplete = () => {
|
||||
const idx = slideItems.value.findIndex(item => item.el === bindPhone.value)
|
||||
const idx = slideItems.value.findIndex((item) => item.el === bindPhone.value);
|
||||
if (idx > -1) {
|
||||
slideItems.value.splice(idx, 1)
|
||||
|
||||
slideItems.value.splice(idx, 1);
|
||||
}
|
||||
}
|
||||
const bankruptArr = ref([])
|
||||
};
|
||||
const bankruptArr = ref([]);
|
||||
const getUserBankrupt = async () => {
|
||||
try {
|
||||
const {data} = await checkBankruptApi()
|
||||
console.log('getUserBankrupt:', data);
|
||||
const {state, details} = data
|
||||
if(state === 0) return
|
||||
if(state === 1) {
|
||||
const arr = details.sort((a, b) => a.recharge - b.recharge)
|
||||
bankruptArr.value = [arr[0], arr[2], arr[1]]
|
||||
popupArr.value.push(greatPopRef.value)
|
||||
let dot = getDot('bankrupt_doted')
|
||||
if(dot === '') {
|
||||
setDot('bankrupt_doted', true)
|
||||
dot = true
|
||||
const { data } = await checkBankruptApi();
|
||||
console.log("getUserBankrupt:", data);
|
||||
const { state, details } = data;
|
||||
if (state === 0) return;
|
||||
if (state === 1) {
|
||||
const arr = details.sort((a, b) => a.recharge - b.recharge);
|
||||
bankruptArr.value = [arr[0], arr[2], arr[1]];
|
||||
popupArr.value.push(greatPopRef.value);
|
||||
|
||||
let dot = getDot("bankrupt_doted");
|
||||
if (dot === "") {
|
||||
dot = true;
|
||||
}
|
||||
slideItems.value.push({
|
||||
el: greatPopRef.value,
|
||||
path: '',
|
||||
icon: '@/static/pop_icons/animation_bx.gif',
|
||||
path: "",
|
||||
icon: "@/static/pop_icons/animation_bx.gif",
|
||||
doted: dot,
|
||||
dotName: 'bankrupt_doted'
|
||||
|
||||
})
|
||||
return
|
||||
dotName: "bankrupt_doted",
|
||||
count: 1
|
||||
});
|
||||
return;
|
||||
}
|
||||
if(state === 2) {
|
||||
let dot = getDot('bankrupt_doted')
|
||||
if(dot === '') {
|
||||
setDot('bankrupt_doted', true)
|
||||
dot = true
|
||||
if (state === 2) {
|
||||
const idx = slideItems.value.findIndex((item) => item.dotName === 'bankrupt_doted');
|
||||
const arr = details.sort((a, b) => a.recharge - b.recharge);
|
||||
bankruptArr.value = [arr[0], arr[2], arr[1]];
|
||||
let dot = getDot("bankrupt_doted");
|
||||
if (dot === "") {
|
||||
dot = true;
|
||||
}
|
||||
slideItems.value.push({
|
||||
el: greatPopRef.value,
|
||||
path: '',
|
||||
icon: '@/static/pop_icons/animation_bx.gif',
|
||||
doted: dot,
|
||||
dotName: 'bankrupt_doted'
|
||||
})
|
||||
if (idx > -1) {
|
||||
slideItems.value[idx].doted = true;
|
||||
} else {
|
||||
slideItems.value.push({
|
||||
el: greatPopRef.value,
|
||||
path: "",
|
||||
icon: "@/static/pop_icons/animation_bx.gif",
|
||||
doted: dot,
|
||||
dotName: "bankrupt_doted",
|
||||
count: 1
|
||||
});
|
||||
}
|
||||
|
||||
console.log("bankruptArr:", slideItems.value);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log('getUserBankrupt error:', error);
|
||||
console.log("getUserBankrupt error:", error);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onLoad(async () => {
|
||||
console.log("onLoad");
|
||||
|
||||
uni.hideTabBar();
|
||||
okSpin.login()
|
||||
okSpin.login();
|
||||
getBanner();
|
||||
await getUserBankrupt()
|
||||
await checkUserAct();
|
||||
checkRedepositApi().then(({ data }) => {
|
||||
console.log("checkRedepositApi:", data);
|
||||
if (data?.activity) {
|
||||
const doted = getDot('wheel_doted')
|
||||
slideItems.value.push({
|
||||
el: null,
|
||||
path: '/pages/redeposit/ReDeposit',
|
||||
icon: '@/static/pop_icons/animation_zp.gif',
|
||||
doted: doted ? true : false,
|
||||
dotName: 'wheel_doted'
|
||||
})
|
||||
}
|
||||
if(data?.lottery?.lottery) {
|
||||
const lottery = JSON.parse(data.lottery.lottery)
|
||||
const count = lottery?.reduce((acc, cur) => {
|
||||
return acc + cur.curCount
|
||||
}, 0) ?? 0;
|
||||
if(count > 0) {
|
||||
const idx = slideItems.value.findIndex(item => item.dotName === 'wheel_doted')
|
||||
setDot('wheel_doted', true)
|
||||
slideItems.value[idx].doted = true
|
||||
}
|
||||
}
|
||||
})
|
||||
const wheelIdx = promoStore.promoList.findIndex(item => item.jumpUrl === 'module:lottery')
|
||||
//console.log('wheelIdx', wheelIdx);
|
||||
|
||||
const wheelIdx = promoStore.promoList.findIndex(
|
||||
(item) => item.jumpUrl === "module:lottery"
|
||||
);
|
||||
|
||||
if (wheelIdx > -1) {
|
||||
popupArr.value.push(wheelPop.value)
|
||||
// slideItems.value.push({
|
||||
// el: wheelPop.value,
|
||||
// icon: '@/static/pop_icons/animation_zp.gif'
|
||||
// })
|
||||
popupArr.value.push(wheelPop.value);
|
||||
}
|
||||
const todayStr = uni.getStorageSync('today')
|
||||
const rewardDate = uni.getStorageSync('rewardDayonce')
|
||||
rewardDayonce.value = rewardDate === conversionTime()
|
||||
today.value = todayStr
|
||||
if (userStore.userInfo?.firstRecharge === 0 && todayStr !== conversionTime()) {
|
||||
popupArr.value.push(firstRechargePop.value)
|
||||
const todayStr = uni.getStorageSync("today");
|
||||
const rewardDate = uni.getStorageSync("rewardDayonce");
|
||||
rewardDayonce.value = rewardDate === conversionTime();
|
||||
today.value = todayStr;
|
||||
if (
|
||||
userStore.userInfo?.firstRecharge === 0 &&
|
||||
todayStr !== conversionTime()
|
||||
) {
|
||||
popupArr.value.push(firstRechargePop.value);
|
||||
}
|
||||
if (!userStore.userInfo?.mobile) {
|
||||
// #ifdef APP-PLUS
|
||||
popupArr.value.push(bindPromoPop.value)
|
||||
popupArr.value.push(bindPromoPop.value);
|
||||
// #endif
|
||||
slideItems.value.push({
|
||||
el: bindPhone.value,
|
||||
path: '',
|
||||
icon: '@/static/pop_icons/animation_verify.gif',
|
||||
path: "",
|
||||
icon: "@/static/pop_icons/animation_verify.gif",
|
||||
doted: true,
|
||||
dotName: 'bind_doted'
|
||||
})
|
||||
dotName: "bind_doted",
|
||||
count: 1
|
||||
});
|
||||
} else {
|
||||
const idx = slideItems.value.findIndex(
|
||||
(item) => item.dotName === "bind_doted"
|
||||
);
|
||||
if (idx > -1) {
|
||||
slideItems.value.splice(idx, 1);
|
||||
}
|
||||
}
|
||||
|
||||
const promoIdx = promoStore.promoList.findIndex(item => item.content?.popup === 'betrank')
|
||||
const promoIdx = promoStore.promoList.findIndex(
|
||||
(item) => item.content?.popup === "betrank"
|
||||
);
|
||||
if (promoIdx !== -1) {
|
||||
// popupArr.value.push(rankRewardPop.value)
|
||||
let doted = false
|
||||
const dot = getDot('rank_doted')
|
||||
if(dot === '') {
|
||||
doted = true
|
||||
let doted = false;
|
||||
const dot = getDot("rank_doted");
|
||||
if (dot === "") {
|
||||
doted = true;
|
||||
}
|
||||
slideItems.value.push({
|
||||
el: null,
|
||||
path: '/pages/promo/Ranking/Ranking',
|
||||
icon: '@/static/pop_icons/animation_phb.gif',
|
||||
path: "/pages/promo/Ranking/Ranking",
|
||||
icon: "@/static/pop_icons/animation_phb.gif",
|
||||
doted: doted,
|
||||
dotName: 'rank_doted'
|
||||
})
|
||||
dotName: "rank_doted",
|
||||
count: 1
|
||||
});
|
||||
}
|
||||
setTimeout(() => {
|
||||
// conDepositPop.value.open()
|
||||
// depositBonusPop.value.open()
|
||||
|
||||
showPopQueue()
|
||||
showSlider.value = true
|
||||
slideOpen.value = true
|
||||
// greatPopRef.value.open()
|
||||
showPopQueue();
|
||||
showSlider.value = true;
|
||||
slideOpen.value = true;
|
||||
}, 1000);
|
||||
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
getUserBankrupt();
|
||||
getPageData();
|
||||
})
|
||||
checkRedepositApi().then(({ data }) => {
|
||||
const idx = slideItems.value.findIndex(
|
||||
(item) => item.dotName === "wheel_doted"
|
||||
);
|
||||
if (idx < 0) {
|
||||
if (data?.activity) {
|
||||
const doted = getDot("wheel_doted");
|
||||
slideItems.value.push({
|
||||
el: null,
|
||||
path: "/pages/redeposit/ReDeposit",
|
||||
icon: "@/static/pop_icons/animation_zp.gif",
|
||||
doted: doted ? true : false,
|
||||
count: 1,
|
||||
dotName: "wheel_doted",
|
||||
});
|
||||
}
|
||||
if (data?.lottery?.lottery) {
|
||||
const idx2 = slideItems.value.findIndex(
|
||||
(item) => item.dotName === "wheel_doted"
|
||||
);
|
||||
const lottery = JSON.parse(data.lottery.lottery);
|
||||
const count =
|
||||
lottery?.reduce((acc, cur) => {
|
||||
return acc + cur.curCount;
|
||||
}, 0) ?? 0;
|
||||
setDot("wheel_doted", true);
|
||||
slideItems.value[idx2].doted = true;
|
||||
slideItems.value[idx2].count = count;
|
||||
}
|
||||
} else {
|
||||
if (data?.lottery?.lottery) {
|
||||
const lottery = JSON.parse(data.lottery.lottery);
|
||||
const count =
|
||||
lottery?.reduce((acc, cur) => {
|
||||
return acc + cur.curCount;
|
||||
}, 0) ?? 0;
|
||||
setDot("wheel_doted", true);
|
||||
slideItems.value[idx].doted = true;
|
||||
slideItems.value[idx].count = count;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@ -981,10 +1035,10 @@ onShow(() => {
|
||||
|
||||
.slider-box {
|
||||
background-color: rgba(0, 0, 0, 0.7);
|
||||
max-height: 640rpx;
|
||||
max-height: 740rpx;
|
||||
// min-height: 360rpx;
|
||||
border-radius: 20rpx;
|
||||
border: 2px solid #FCCA0F;
|
||||
border: 2px solid #fcca0f;
|
||||
padding: 14rpx;
|
||||
|
||||
.slide-item {
|
||||
@ -993,15 +1047,19 @@ onShow(() => {
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.red-dot{
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
|
||||
.red-dot {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
border-radius: 50%;
|
||||
background-color: red;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
font-size: 18rpx;
|
||||
color: "#FFCE18";
|
||||
}
|
||||
|
||||
.icon-slide-menu {
|
||||
width: 98rpx;
|
||||
height: 98rpx;
|
||||
|
@ -64,7 +64,7 @@
|
||||
nextTick(() => {
|
||||
setTimeout(() => {
|
||||
startMove()
|
||||
}, 200);
|
||||
}, 500);
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,7 @@ import HomeNotice from '@/pages/home/components/HomeNotice.vue'
|
||||
import { useAppStore } from '@/store/useAppStore.js'
|
||||
import { useUserStore } from '@/store/useUserStore'
|
||||
import { enterFullscreen, exitFullscreen } from '@/module/fullscreen/fullscreen-handler'
|
||||
import { requestGetGameUrlByGame, requestJiliLogout } from '@/api/game.js'
|
||||
import { gameOutApi, requestGetGameUrlByGame, requestJiliLogout } from '@/api/game.js'
|
||||
|
||||
const appStore = useAppStore()
|
||||
const userStore = useUserStore()
|
||||
@ -144,6 +144,9 @@ const injectPreventFullscreen = () => {
|
||||
}
|
||||
// #endif
|
||||
}
|
||||
const reportGameOut = () => {
|
||||
gameOutApi()
|
||||
}
|
||||
onMounted(() => {
|
||||
enterFullscreen()
|
||||
injectPreventFullscreen()
|
||||
@ -165,6 +168,7 @@ onUnmounted(() => {
|
||||
uni.offWindowResize(computeWebviewHeight)
|
||||
stopReport()
|
||||
requestJiliLogout()
|
||||
reportGameOut()
|
||||
})
|
||||
|
||||
const startReport = () => {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import uni from '@dcloudio/vite-plugin-uni'
|
||||
import compression from 'vite-plugin-compression'
|
||||
// import compression from 'vite-plugin-compression'
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
@ -15,12 +15,11 @@ export default defineConfig({
|
||||
// deleteOriginFile: false, // 是否删除原文件
|
||||
// }),
|
||||
],
|
||||
// resolve: {
|
||||
// alias: {
|
||||
// '@': '/src',
|
||||
// 'vue-i18n': 'vue-i18n/dist/vue-i18n.cjs.js'
|
||||
// }
|
||||
// },
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': '/src'
|
||||
}
|
||||
},
|
||||
css: {
|
||||
preprocessorOptions: {
|
||||
scss: {
|
||||
|
Loading…
Reference in New Issue
Block a user