Caner 2 years ago
parent
commit
f3f667070b
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/components/login.vue

+ 4 - 4
src/components/login.vue

@@ -11,7 +11,7 @@ const emit = defineEmits<{(evt: 'update:modelValue', value: string): void
 }>()
 
 function login() {
-  if (name.value && room.value && url.value && url.value.includes('mqtt://')) emit('loginBack', { name: name.value, room: room.value, url: url.value })
+  if (name.value && room.value && url.value && url.value.includes('mqtts://')) emit('loginBack', { name: name.value, room: room.value, url: url.value })
 }
 
 function titleEvent(type: string) {
@@ -56,7 +56,7 @@ watch([ name, room, url ], ([ _, __, ___ ], [ _o, __o, ___o ]) => {
           <input
             v-model="url"
             type="text"
-            placeholder="mqtt://*******"
+            placeholder="mqtts://*******"
             maxlength="50"
           >
         </div>
@@ -87,8 +87,8 @@ watch([ name, room, url ], ([ _, __, ___ ], [ _o, __o, ___o ]) => {
         <span>{{ err }}</span>
         <div>
           <button
-            :disabled="!name && !room && !url && !url.includes('mqtt://')"
-            :class="{ resetStyle: name && room && url && url.includes('mqtt://') }"
+            :disabled="!name && !room && !url && !url.includes('mqtts://')"
+            :class="{ resetStyle: name && room && url && url.includes('mqtts://') }"
             @click="login"
           >
             加入