细节优化
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user