This commit is contained in:
2026-04-28 10:34:29 +08:00
parent 77b16a12f1
commit db76c41753
13 changed files with 428 additions and 55 deletions

View File

@@ -19,31 +19,10 @@
<!-- 统计信息卡片 -->
<div class="knapsack-stats">
<div class="stats-item">品总数{{ totalOrnamentNumber }}</div>
<div class="stats-divider"></div>
<div class="stats-item">饰品总价值{{ totalOrnamentPrice }}</div>
<div class="stats-item">品总数{{ totalOrnamentNumber }}</div>
</div>
<!-- 工具栏排序 + 搜索 -->
<div class="knapsack-toolbar">
<div class="sort-btn" @click.stop="selectlist = !selectlist">
{{ selected }}
<div class="sort-dropdown" v-if="selectlist">
<div class="sort-option" @click.stop="handlesort(0); playAudio();">默认排序</div>
<div class="sort-option" @click.stop="handlesort(1); playAudio();">价格从低到高</div>
<div class="sort-option" @click.stop="handlesort(2); playAudio();">价格从高到低</div>
</div>
</div>
<div class="search-box">
<input
type="text"
v-model="page.name"
placeholder="请输入饰品名称"
@keyup.enter="handlesearch"
/>
<span class="search-icon" @click="handlesearch">&#128269;</span>
</div>
</div>
<!-- 物品网格列表 -->
<div class="knapsack-grid" @scroll="scroll">

View File

@@ -157,7 +157,7 @@
name
id
style="serch"
placeholder="请输入ROLL房密码"
:placeholder="obj.hasCdk ? '请输入CDK码' : '请输入ROLL房密码'"
/>
</div>
<div class="lvbu"></div>
@@ -239,13 +239,6 @@ export default {
this.RollPlayers();
this.RollPrizePool();
this.RollOpenPrize();
// autoJoin: 如果是从列表页点击“立即加入”跳转过来
if (localStorage.getItem('autoJoin') === '1') {
localStorage.removeItem('autoJoin');
this.$nextTick(() => {
setTimeout(() => { this.handlejoin(); }, 600);
});
}
},
beforeDestroy() {
if (this.countdownTimer) clearInterval(this.countdownTimer);
@@ -347,7 +340,10 @@ export default {
this.pass = "";
},
join() {
joinRoll(this.id, this.pass).then((res) => {
// CDK房间传 cdkCode普通密码房间传 rollPassword
const rollPassword = this.obj.hasCdk ? "" : this.pass;
const cdkCode = this.obj.hasCdk ? this.pass : "";
joinRoll(this.id, rollPassword, cdkCode).then((res) => {
console.log("加入roll房", res);
if (res.data.code == 200) {
console.log("加入成功");
@@ -374,7 +370,14 @@ export default {
},
handlejoin() {
console.log(111);
if (this.obj.hasPW) {
// 已加入该房间则不再重复弹窗
const myUserId = this.USER_INFO && this.USER_INFO.userId;
if (myUserId && this.playerList.some(p => p.userId === myUserId)) {
this.$message({ message: '您已在该房间内,请等待开奖', type: 'info', customClass: 'log_warning' });
return;
}
// 有普通密码或有CDK都需要弹出输入框
if (this.obj.hasPW || this.obj.hasCdk) {
this.isjoin = true;
return;
}
@@ -391,8 +394,14 @@ export default {
// this.getDetial();
},
getDetial() {
// autoJoin: 如果是从列表页点击"立即加入"跳转过来,等详情加载完再触发
const autoJoin = localStorage.getItem('autoJoin') === '1';
if (autoJoin) localStorage.removeItem('autoJoin');
getRollDetial(this.id).then((res) => {
this.obj = res.data.data;
if (autoJoin) {
this.$nextTick(() => { this.handlejoin(); });
}
this.list = this.obj.jackpotOrnamentsDataList.sort((a, b) => {
return b.price - a.price;
});