update
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-07-14 01:25:10 +08:00
parent 1cb26f4e20
commit b716190757
3 changed files with 43 additions and 13 deletions

View File

@@ -96,5 +96,6 @@
"vue-loader": "^17.1.0", "vue-loader": "^17.1.0",
"weapp-tailwindcss": "^3.3.3", "weapp-tailwindcss": "^3.3.3",
"webpack": "5.78.0" "webpack": "5.78.0"
} },
"packageManager": "pnpm@9.1.4+sha512.9df9cf27c91715646c7d675d1c9c8e41f6fce88246f1318c1aa6a1ed1aeb3c4f032fcdf4ba63cc69c4fe6d634279176b5358727d8f2cc1e65b65f43ce2f8bfb0"
} }

View File

@@ -21,9 +21,13 @@
} }
.nut-popover-content { .nut-popover-content {
width: 150px; width: 300px;
.nut-popover-menu-item {
height: 100px;
font-size: 30px; font-size: 30px;
} }
}
.popover .nut-popover-content { .popover .nut-popover-content {
width: 1000px; width: 1000px;

View File

@@ -1,9 +1,9 @@
<template> <template>
<view class="relative"> <view class="relative">
<!-- 直播区域 --> <!-- 直播区域 -->
<!-- <view id="Player" class="w-full h-[350px]"></view> --> <view id="Player" class="w-full h-[350px]"></view>
<!-- <view id="J_prismPlayer"></view> --> <!-- <view id="J_prismPlayer"></view> -->
<view class="player" id="mse"></view> <!-- <view class="player" id="mse"></view> -->
<!-- 头部 --> <!-- 头部 -->
<view <view
class="z-50 bg-[#EB1313] w-full h-[110px] p-[18px] text-[30px] flex text-white justify-between items-center" class="z-50 bg-[#EB1313] w-full h-[110px] p-[18px] text-[30px] flex text-white justify-between items-center"
@@ -54,9 +54,9 @@
<view class="flex justify-between items-center p-[20px]"> <view class="flex justify-between items-center p-[20px]">
<view class="text-center relative aft"> <view class="text-center relative aft">
<view class="text-[28px] text-[#333333]" <view class="text-[28px] text-[#333333]"
>{{ data[0]?.qs + 1 }}期截止时间</view >{{ Number(data[0]?.qs) + 1 }}期截止时间</view
> >
<view class="text-[red] text-[40px]">未知</view> <view class="text-[red] text-[40px]">{{ tStr }}</view>
</view> </view>
<view class="flex flex-col items-center popover"> <view class="flex flex-col items-center popover">
<nut-popover <nut-popover
@@ -120,7 +120,16 @@
> >
<view <view
:class="formData.betIndexs.includes(item.value) ? 'text-white' : ''" :class="formData.betIndexs.includes(item.value) ? 'text-white' : ''"
><view>{{ item.label }}</view> <view>{{ item.odds }}</view> ><view>{{ item.label }}</view>
<view
:class="[
formData.betIndexs.includes(item.value)
? 'text-white'
: 'text-[#EB1313]',
'text-[30px]',
]"
>{{ item.odds }}</view
>
<viwe v-if="item.betVal > 0">{{ item.betVal }}</viwe></view <viwe v-if="item.betVal > 0">{{ item.betVal }}</viwe></view
> >
</view> </view>
@@ -146,8 +155,10 @@
: `text-[${item.color}]` : `text-[${item.color}]`
" "
><view>{{ item.label }}</view> ><view>{{ item.label }}</view>
<!-- <view>{{ item.odds }}</view> <view class="text-[25px] text-[#EB1313] leading-[50px]">{{
<view>{{ item.betVal }}</view> --> item.odds
}}</view>
<!-- <view>{{ item.betVal }}</view> -->
</view> </view>
</view> </view>
</view> </view>
@@ -201,7 +212,7 @@
一键投注 一键投注
</button> --> </button> -->
<nut-button <nut-button
style="height: 70px" style="height: 70px; font-size: 23px"
shape="square" shape="square"
block block
type="primary" type="primary"
@@ -239,6 +250,8 @@ Taro.useLoad((options) => {
const ws = ref(null); const ws = ref(null);
const tStr = ref("···");
const initWs = (options) => { const initWs = (options) => {
ws.value = new WebSocket( ws.value = new WebSocket(
`wss://${process.env.TARO_APP_WS}/dice/home?uid=${options.uid}&game_id=${options.game_id}` `wss://${process.env.TARO_APP_WS}/dice/home?uid=${options.uid}&game_id=${options.game_id}`
@@ -262,12 +275,23 @@ const initWs = (options) => {
icon: "none", icon: "none",
}); });
break; break;
case 200:
if (Number(res.data) === 1) {
tStr.value = "开奖中";
return;
} }
tStr.value = `${res.data}`;
break;
}
};
ws.value.onerror = () => {
initWs();
}; };
}; };
Taro.useDidShow(() => { Taro.useDidShow(() => {
// loadTplayer(); loadTplayer();
// loadAliplayer(); // loadAliplayer();
initPlayer(); initPlayer();
getUserInfo(); getUserInfo();
@@ -365,6 +389,7 @@ const loadTplayer = () => {
videoEl.setAttribute("class", "w-full h-full"); videoEl.setAttribute("class", "w-full h-full");
videoEl.setAttribute("playsinline", ""); videoEl.setAttribute("playsinline", "");
videoEl.setAttribute("webkit-playsinline", ""); videoEl.setAttribute("webkit-playsinline", "");
videoEl.setAttribute("x5-playsinline", "");
el.appendChild(videoEl); el.appendChild(videoEl);
player.value = TCPlayer("player-container-id", { player.value = TCPlayer("player-container-id", {
@@ -393,7 +418,7 @@ const loadTplayer = () => {
}, },
], ],
licenseUrl: licenseUrl:
"https://license.vod2.myqcloud.com/license/v2/1258524015_1/v_cube.license", // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl "https://license.vod2.myqcloud.com/license/v2/1327927250_1/v_cube.license", // license 地址,参考准备工作部分,在视立方控制台申请 license 后可获得 licenseUrl
}); });
player.value.muted(false); player.value.muted(false);