feat: api创建

This commit is contained in:
zhangyh
2025-10-24 17:37:15 +08:00
parent 21384516ce
commit 5fe30c82c8
14 changed files with 197 additions and 86 deletions

View File

@@ -26,11 +26,11 @@
<div class="glass-form">
<div class="form-field">
<label class="field-label">Customer Name</label>
<input type="text" placeholder="Name" class="form-input" />
<input v-model="customeData.name" type="text" placeholder="Name" class="form-input" />
</div>
<div class="form-field email">
<label class="field-label">Customer Email</label>
<input type="email" placeholder="Email" class="form-input" />
<input v-model="customeData.email" type="email" placeholder="Email" class="form-input" />
</div>
<button class="confirm-btn" @click="handleConfirm">Confirm</button>
</div>
@@ -42,6 +42,9 @@
<script setup lang="ts">
import { ref } from 'vue'
import { useRouter } from 'vue-router'
import { useUserInfoStore } from '@/stores'
import { showToast } from 'vant'
const userInfoStore = useUserInfoStore()
const router = useRouter()
type PageMode = 'form' | 'entry'
@@ -51,8 +54,20 @@ const handleChangeMode = (mode: PageMode) => {
pageMode.value = mode
}
const handleConfirm = () => {
console.log('handleConfirm')
const customeData = ref({
name: '',
email: ''
})
const handleConfirm = async () => {
if (customeData.value.name === '' || customeData.value.email === '') {
showToast('please input name and email')
return
}
// await 查找顾客ID
// userInfoStore.setCustomerId('')
router.push('/stylist/index')
}
</script>