비밀번호 힌트 공통에서 받아오는 걸로 변경
This commit is contained in:
parent
ffd23da7f4
commit
0a91dbef09
@ -58,9 +58,11 @@
|
|||||||
:is-essential="true"
|
:is-essential="true"
|
||||||
:is-row="false"
|
:is-row="false"
|
||||||
:is-label="true"
|
:is-label="true"
|
||||||
|
:is-common="true"
|
||||||
:data="pwhintList"
|
:data="pwhintList"
|
||||||
@update:data="pwhint = $event"
|
@update:data="pwhint = $event"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<UserFormInput
|
<UserFormInput
|
||||||
title="답변"
|
title="답변"
|
||||||
name="pwhintRes"
|
name="pwhintRes"
|
||||||
@ -152,8 +154,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted } from 'vue';
|
import { ref } from 'vue';
|
||||||
import $api from '@api';
|
import $api from '@api';
|
||||||
|
import commonApi from '@/common/commonApi'
|
||||||
import UserFormInput from '@c/input/UserFormInput.vue';
|
import UserFormInput from '@c/input/UserFormInput.vue';
|
||||||
import FormSelect from '@c/input/FormSelect.vue';
|
import FormSelect from '@c/input/FormSelect.vue';
|
||||||
import ArrInput from '@c/input/ArrInput.vue';
|
import ArrInput from '@c/input/ArrInput.vue';
|
||||||
@ -161,8 +164,6 @@
|
|||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import { useToastStore } from '@s/toastStore';
|
import { useToastStore } from '@s/toastStore';
|
||||||
|
|
||||||
const pwhintList = ['현재 살고 있는 동네', '가장 기억에 남는 책', '좋아하는 음식'];
|
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
const profile = ref(null);
|
const profile = ref(null);
|
||||||
@ -173,7 +174,6 @@
|
|||||||
const password = ref('');
|
const password = ref('');
|
||||||
const passwordcheck = ref('');
|
const passwordcheck = ref('');
|
||||||
const passwordcheckError = ref('');
|
const passwordcheckError = ref('');
|
||||||
const pwhint = ref(0);
|
|
||||||
const pwhintRes = ref('');
|
const pwhintRes = ref('');
|
||||||
const name = ref('');
|
const name = ref('');
|
||||||
const birth = ref('');
|
const birth = ref('');
|
||||||
@ -181,10 +181,9 @@
|
|||||||
const detailAddress = ref('');
|
const detailAddress = ref('');
|
||||||
const postcode = ref(''); // 우편번호
|
const postcode = ref(''); // 우편번호
|
||||||
const phone = ref('');
|
const phone = ref('');
|
||||||
const colorList = ref([]);
|
|
||||||
const mbtiList = ref([]);
|
|
||||||
const color = ref(''); // 선택된 color
|
const color = ref(''); // 선택된 color
|
||||||
const mbti = ref(''); // 선택된 MBTI
|
const mbti = ref(''); // 선택된 MBTI
|
||||||
|
const pwhint = ref(''); // 선택된 pwhint
|
||||||
|
|
||||||
const profilAlert = ref(false);
|
const profilAlert = ref(false);
|
||||||
const idAlert = ref(false);
|
const idAlert = ref(false);
|
||||||
@ -252,27 +251,8 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const Colors = async () => {
|
// 컬러, mbti, 비밀번호 힌트 목록 불러오기
|
||||||
const response = await $api.get('/user/color');
|
const { colorList, mbtiList, pwhintList } = commonApi();
|
||||||
colorList.value = response.data.data.map(item => ({
|
|
||||||
label: item.CMNCODNAM,
|
|
||||||
value: item.CMNCODVAL
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
|
|
||||||
const Mbtis = async () => {
|
|
||||||
const response = await $api.get('/user/mbti');
|
|
||||||
mbtiList.value = response.data.data.map(item => ({
|
|
||||||
label: item.CMNCODNAM,
|
|
||||||
value: item.CMNCODVAL
|
|
||||||
}));
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
Colors();
|
|
||||||
Mbtis();
|
|
||||||
});
|
|
||||||
|
|
||||||
// 주소 업데이트 핸들러
|
// 주소 업데이트 핸들러
|
||||||
const handleAddressUpdate = (addressData) => {
|
const handleAddressUpdate = (addressData) => {
|
||||||
@ -321,7 +301,7 @@
|
|||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('memberIds', id.value);
|
formData.append('memberIds', id.value);
|
||||||
formData.append('memberPwd', password.value);
|
formData.append('memberPwd', password.value);
|
||||||
formData.append('memberPwh', pwhintList[pwhint.value]);
|
formData.append('memberPwh', pwhint.value);
|
||||||
formData.append('memberPwr', pwhintRes.value);
|
formData.append('memberPwr', pwhintRes.value);
|
||||||
formData.append('memberNam', name.value);
|
formData.append('memberNam', name.value);
|
||||||
formData.append('memberArr', address.value);
|
formData.append('memberArr', address.value);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user