This commit is contained in:
@@ -96,5 +96,6 @@
|
||||
"vue-loader": "^17.1.0",
|
||||
"weapp-tailwindcss": "^3.3.3",
|
||||
"webpack": "5.78.0"
|
||||
}
|
||||
},
|
||||
"packageManager": "pnpm@9.1.4+sha512.9df9cf27c91715646c7d675d1c9c8e41f6fce88246f1318c1aa6a1ed1aeb3c4f032fcdf4ba63cc69c4fe6d634279176b5358727d8f2cc1e65b65f43ce2f8bfb0"
|
||||
}
|
||||
|
||||
@@ -21,8 +21,12 @@
|
||||
}
|
||||
|
||||
.nut-popover-content {
|
||||
width: 150px;
|
||||
font-size: 30px;
|
||||
width: 300px;
|
||||
|
||||
.nut-popover-menu-item {
|
||||
height: 100px;
|
||||
font-size: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.popover .nut-popover-content {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<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 class="player" id="mse"></view>
|
||||
<!-- <view class="player" id="mse"></view> -->
|
||||
<!-- 头部 -->
|
||||
<view
|
||||
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="text-center relative aft">
|
||||
<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 class="flex flex-col items-center popover">
|
||||
<nut-popover
|
||||
@@ -120,7 +120,16 @@
|
||||
>
|
||||
<view
|
||||
: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
|
||||
>
|
||||
</view>
|
||||
@@ -146,8 +155,10 @@
|
||||
: `text-[${item.color}]`
|
||||
"
|
||||
><view>{{ item.label }}</view>
|
||||
<!-- <view>{{ item.odds }}</view>
|
||||
<view>{{ item.betVal }}</view> -->
|
||||
<view class="text-[25px] text-[#EB1313] leading-[50px]">{{
|
||||
item.odds
|
||||
}}</view>
|
||||
<!-- <view>{{ item.betVal }}</view> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -201,7 +212,7 @@
|
||||
一键投注
|
||||
</button> -->
|
||||
<nut-button
|
||||
style="height: 70px"
|
||||
style="height: 70px; font-size: 23px"
|
||||
shape="square"
|
||||
block
|
||||
type="primary"
|
||||
@@ -239,6 +250,8 @@ Taro.useLoad((options) => {
|
||||
|
||||
const ws = ref(null);
|
||||
|
||||
const tStr = ref("···");
|
||||
|
||||
const initWs = (options) => {
|
||||
ws.value = new WebSocket(
|
||||
`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",
|
||||
});
|
||||
break;
|
||||
case 200:
|
||||
if (Number(res.data) === 1) {
|
||||
tStr.value = "开奖中";
|
||||
return;
|
||||
}
|
||||
tStr.value = `${res.data}秒`;
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
ws.value.onerror = () => {
|
||||
initWs();
|
||||
};
|
||||
};
|
||||
|
||||
Taro.useDidShow(() => {
|
||||
// loadTplayer();
|
||||
loadTplayer();
|
||||
// loadAliplayer();
|
||||
initPlayer();
|
||||
getUserInfo();
|
||||
@@ -365,6 +389,7 @@ const loadTplayer = () => {
|
||||
videoEl.setAttribute("class", "w-full h-full");
|
||||
videoEl.setAttribute("playsinline", "");
|
||||
videoEl.setAttribute("webkit-playsinline", "");
|
||||
videoEl.setAttribute("x5-playsinline", "");
|
||||
el.appendChild(videoEl);
|
||||
|
||||
player.value = TCPlayer("player-container-id", {
|
||||
@@ -393,7 +418,7 @@ const loadTplayer = () => {
|
||||
},
|
||||
],
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user