细节优化

This commit is contained in:
kron
2025-06-16 12:01:11 +08:00
parent 4e522cf300
commit 3139be5412
2 changed files with 14 additions and 7 deletions

View File

@@ -6,7 +6,7 @@ import Guide from "@/components/Guide.vue";
import SButton from "@/components/SButton.vue";
import SModal from "@/components/SModal.vue";
import CreateRoom from "@/components/CreateRoom.vue";
import { getRoomAPI } from "@/apis";
import { joinRoomAPI } from "@/apis";
const showModal = ref(false);
const warnning = ref("");
@@ -17,7 +17,7 @@ const enterRoom = async () => {
warnning.value = "请输入房间号";
showModal.value = true;
} else {
const room = await getRoomAPI(roomNumber.value);
const room = await joinRoomAPI(roomNumber.value);
if (room.number) {
roomNumber.value = "";
uni.navigateTo({
@@ -48,7 +48,11 @@ const createRoom = () => {
<view class="founded-room">
<image src="../static/founded-room.png" mode="widthFix" />
<view>
<input placeholder="输入房间号" v-model="roomNumber" />
<input
placeholder="输入房间号"
v-model="roomNumber"
placeholder-style="color: #ccc"
/>
<view @click="enterRoom">进入房间</view>
</view>
</view>