From 3ff42dc3c79864fece102bbf8017e03fe87ab699 Mon Sep 17 00:00:00 2001 From: mariasoo <9723maria@gmail.com> Date: Mon, 13 May 2024 17:28:09 +0900 Subject: [PATCH 001/113] #80 login: add api --- src/views/login/LoginUser.vue | 6 ++ src/views/store/StoreReview.vue | 102 ++++++++++++++++---------------- 2 files changed, 57 insertions(+), 51 deletions(-) diff --git a/src/views/login/LoginUser.vue b/src/views/login/LoginUser.vue index da53189..9de6f61 100644 --- a/src/views/login/LoginUser.vue +++ b/src/views/login/LoginUser.vue @@ -63,6 +63,7 @@ import passwordEye from '@/img/login/passwordeye.png'; import kakao from '@/img/login/kakaologo.png'; import google from '@/img/login/googlelogo.png'; import naver from '@/img/login/naverlogo.png'; +import axios from 'axios'; export default { data() { @@ -72,9 +73,14 @@ export default { kakao: kakao, google: google, naver: naver, + email : '', + password : ''. }; }, methods: { + submitForm() { + axios.post(); + }, gotoRegister() { this.$router.push('/login/register'); }, diff --git a/src/views/store/StoreReview.vue b/src/views/store/StoreReview.vue index 01a3459..3d29bd0 100644 --- a/src/views/store/StoreReview.vue +++ b/src/views/store/StoreReview.vue @@ -95,59 +95,59 @@ - + diff --git a/src/img/imoji/heart-regular.svg b/src/img/imoji/heart-regular.svg new file mode 100644 index 0000000..5b161af --- /dev/null +++ b/src/img/imoji/heart-regular.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/img/imoji/heart-solid.svg b/src/img/imoji/heart-solid.svg new file mode 100644 index 0000000..475d1bb --- /dev/null +++ b/src/img/imoji/heart-solid.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/views/store/StoreReview.vue b/src/views/store/StoreReview.vue index 567c2a1..7177583 100644 --- a/src/views/store/StoreReview.vue +++ b/src/views/store/StoreReview.vue @@ -120,7 +120,7 @@ 좋아요 순

- + @@ -128,6 +128,7 @@ - diff --git a/src/views/login/EmailCode.vue b/src/views/login/EmailCode.vue index a338328..dfee145 100644 --- a/src/views/login/EmailCode.vue +++ b/src/views/login/EmailCode.vue @@ -56,7 +56,12 @@
- +
@@ -68,6 +73,8 @@ @@ -86,6 +152,11 @@ export default { border: 0; padding-left: 10px; } +#name:focus, +#email:focus { + border: 2px solid var(--mint-color) !important; + outline: none; +} #emailcheck { box-sizing: border-box; width: 100%; @@ -116,4 +187,14 @@ export default { font-weight: bold; cursor: pointer; } +.warning { + color: #ff4057; +} +.validation-text { + margin-top: 5px; + font-size: 11px; + display: flex; + flex-direction: row-reverse; + justify-content: space-between; +} diff --git a/src/views/login/LoginUser.vue b/src/views/login/LoginUser.vue index da53189..aec1e52 100644 --- a/src/views/login/LoginUser.vue +++ b/src/views/login/LoginUser.vue @@ -16,6 +16,11 @@ placeholder="이메일을 입력해주세요" v-model="email" /> +

+ + 이메일 주소를 입력해주세요 + +

@@ -25,7 +30,6 @@ placeholder="비밀번호를 입력해주세요" v-model="password" /> -
@@ -33,19 +37,25 @@
-
- +
+
-
- +
+
-
- +
+
@@ -59,28 +69,97 @@ @@ -117,6 +196,9 @@ export default { position: relative; margin-bottom: 10px; } +/* .password-input { + margin-top: 25px; +} */ #email, #password { box-sizing: border-box; @@ -127,6 +209,11 @@ export default { border: 0; padding-left: 10px; } +#email:focus, +#password:focus { + border: 2px solid var(--mint-color) !important; + outline: none; +} .passwordeye { position: absolute; /* 이미지를 절대 위치로 설정 */ top: 50%; /* 상위 요소의 정중앙에서 시작 */ @@ -218,4 +305,14 @@ export default { font-weight: bold; cursor: pointer; } +.warning { + color: #ff4057; +} +.validation-text { + margin-top: 5px; + font-size: 11px; + display: flex; + flex-direction: row-reverse; + justify-content: space-between; +} diff --git a/src/views/login/OAuth2Callback.vue b/src/views/login/OAuth2Callback.vue new file mode 100644 index 0000000..bc22760 --- /dev/null +++ b/src/views/login/OAuth2Callback.vue @@ -0,0 +1,46 @@ + + + diff --git a/src/views/login/RegisterUser.vue b/src/views/login/RegisterUser.vue index 68c8bfe..82b725a 100644 --- a/src/views/login/RegisterUser.vue +++ b/src/views/login/RegisterUser.vue @@ -14,8 +14,14 @@ type="text" placeholder="이름을 입력해주세요" v-model="name" + @input="validateName" />
+

+ 이름을 확인해주세요 +

- +
+

+ 3자 이상 10자 이하로 문자(영어, 한국어), 숫자, 특수문자를 + 포함해주세요 + {{ + nicknameError + }} + {{ + nicknameSuccess + }} +

- +
+

+ + {{ emailError }} + +

- +
+

+ + {{ emailCodeMessage }} + +

@@ -60,8 +111,15 @@ type="password" placeholder="비밀번호를 입력해주세요" v-model="password" + @input="validatePassword" />
+

+ + 8자 이상, 숫자, 영문(대/소문자), 특수문자를 각각 하나 이상 + 포함해주세요 + +

@@ -70,8 +128,17 @@ type="password" placeholder="비밀번호를 한번 더 입력해주세요" v-model="passwordcheck" + @input="validatePasswordMatch" />
+

+ + {{ passwordMatchMessage }} + +

/ /
+

+ + {{ birthYearValidationMessage }} + + + {{ birthMonthValidationMessage }} + + + {{ birthDayValidationMessage }} + + + {{ birthValidationMessage }} + +

+

+ 핸드폰 번호를 확인해주세요 +

- - + -
- - -
- - - 내용보기 -
-
- - - 내용보기 -
-
- -
-
Or Register with
-
-
- +
+ + + 내용보기
-
- +
+ + + 내용보기
-
- +
+
-
+

+ 위에 모든 사항을 입력해주세요 +

+
Or Register with
+
+
+ +
+
+ +
+
+ +
+
+
이미 계정이 있으시다구요? @@ -172,29 +281,300 @@ import passwordEye from '@/img/login/passwordeye.png'; import kakao from '@/img/login/kakaologo.png'; import google from '@/img/login/googlelogo.png'; import naver from '@/img/login/naverlogo.png'; +import { registerUser } from '@/api/index'; +import { + checkNicknameDuplicate, + checkEmailDuplicate, + sendAuthCode, + verifyAuthCode, +} from '@/api/index'; +import { + validateName, + validateNickname, + validateEmail, + validatePassword, + validatePhone, + validateYear, + validateMonth, + validateDay, + validateBirth, +} from '@/utils/validation'; export default { data() { return { + name: '', + nickname: '', + nicknameError: '', + nicknameSuccess: '', + isNicknameDuplicate: false, + nicknameChecked: false, + email: '', + emailError: '', + isEmailDuplicate: false, + emailcode: '', + emailCodeMessage: '', + emailCodeVerified: false, + password: '', + passwordcheck: '', + passwordMatchMessage: '', passwordEye: passwordEye, birthYear: '', birthMonth: '', birthDay: '', + birthYearValid: true, + birthMonthValid: true, + birthDayValid: true, + birthYearValidationMessage: '', + birthMonthValidationMessage: '', + birthDayValidationMessage: '', + birthValidationMessage: '', + isBirthValid: true, + phone: '', + gender: 'choice', + agreecheck1: false, + agreecheck2: false, + formSubmitted: false, + formErrorMessage: '', kakao: kakao, google: google, naver: naver, }; }, + computed: { + isNameValid() { + return validateName(this.name); + }, + isNicknameValid() { + return validateNickname(this.nickname); + }, + isEmailValid() { + return validateEmail(this.email); + }, + isPasswordValid() { + return validatePassword(this.password); + }, + isPasswordMatch() { + return this.password === this.passwordcheck; + }, + isPhoneValid() { + return validatePhone(this.phone); + }, + isFormValid() { + return ( + this.isNameValid && + this.isEmailValid && + this.isNicknameValid && + this.isPasswordValid && + this.isPasswordMatch && + this.isBirthValid && + this.isPhoneValid && + this.gender !== 'choice' && + this.agreecheck1 && + this.agreecheck2 && + !this.nicknameError && + !this.emailError + ); + }, + }, + watch: { + name() { + this.validateName(); + }, + nickname() { + this.validateNickname(); + }, + email() { + this.validateEmailWatcher(); + }, + password() { + this.validatePassword(); + }, + passwordcheck() { + this.validatePasswordMatch(); + }, + birthYear() { + this.validateBirthYear(); + }, + birthMonth() { + this.validateBirthMonth(); + }, + birthDay() { + this.validateBirthDay(); + }, + phone() { + this.validatePhone(); + }, + }, methods: { - validateBirthInput(event) { - // 입력 검증 로직을 여기에 추가하세요. - // 예: 연도가 4자리인지, 월이 01-12 범위 내에 있는지, 일이 01-31 범위 내에 있는지 등 - const yearInput = event.target.value; // 현재 입력된 연도 - this.birthYearValid = yearInput.length === 4; // 연도가 4자리인지 확인 + validateName() { + return validateName(this.name); + }, + validateNickname() { + this.nicknameChecked = false; + if (!validateNickname(this.nickname)) { + this.nicknameError = + '3자 이상 10자 이하로 문자(영어, 한국어), 숫자, 특수문자를 포함해주세요'; + } else { + this.nicknameError = ''; + } + }, + async validateAndCheckNickname() { + this.validateNickname(); + if (this.nicknameError) { + this.nicknameSuccess = ''; + this.isNicknameDuplicate = false; + return; + } + this.nicknameChecked = true; + this.nicknameError = ''; + this.nicknameSuccess = ''; + try { + const response = await checkNicknameDuplicate(this.nickname); + if (response.data) { + this.nicknameError = '중복된 닉네임입니다'; + this.isNicknameDuplicate = true; + } else { + this.nicknameSuccess = '사용 가능한 닉네임입니다'; + this.isNicknameDuplicate = false; + } + } catch (error) { + this.nicknameError = '닉네임 중복 체크 중 오류가 발생했습니다'; + this.isNicknameDuplicate = true; + } + }, + validateEmailWatcher() { + return validateEmail(this.email); + }, + async validateAndCheckEmail() { + if (!validateEmail(this.email)) { + this.emailError = '이메일 주소를 확인해주세요'; + this.isEmailDuplicate = false; + return; + } + this.emailError = ''; + try { + const response = await checkEmailDuplicate(this.email); + if (response.data) { + this.emailError = '중복된 이메일입니다'; + this.isEmailDuplicate = true; + } else { + this.emailError = '인증 코드가 전송되었습니다'; + this.isEmailDuplicate = false; + await sendAuthCode(this.email); + } + } catch (error) { + this.emailError = '이메일 중복 체크 중 오류가 발생했습니다'; + this.isEmailDuplicate = true; + } + }, + async verifyEmailCode() { + try { + const response = await verifyAuthCode(this.email, this.emailcode); + if (response.data) { + this.emailCodeMessage = '이메일 인증이 완료되었습니다'; + this.emailCodeVerified = true; + this.emailError = ''; + } else { + this.emailCodeMessage = '인증 코드가 올바르지 않습니다'; + this.emailCodeVerified = false; + } + } catch (error) { + this.emailCodeMessage = '이메일 인증 코드 검증 중 오류가 발생했습니다'; + this.emailCodeVerified = false; + } + }, + validatePassword() { + return validatePassword(this.password); + }, + validatePasswordMatch() { + if (this.password === this.passwordcheck) { + this.passwordMatchMessage = '비밀번호가 일치합니다'; + } else { + this.passwordMatchMessage = '비밀번호가 일치하지 않습니다'; + } + return this.password === this.passwordcheck; + }, + validateBirthYear() { + const isValid = validateYear(this.birthYear); + this.birthYearValid = isValid; + this.updateBirthValidationMessage(); + return isValid; + }, + validateBirthMonth() { + const isValid = validateMonth(this.birthMonth); + this.birthMonthValid = isValid; + this.updateBirthValidationMessage(); + return isValid; + }, + validateBirthDay() { + const isValid = validateDay(this.birthDay); + this.birthDayValid = isValid; + this.updateBirthValidationMessage(); + return isValid; + }, + updateBirthValidationMessage() { + const isValid = validateBirth( + this.birthYear, + this.birthMonth, + this.birthDay, + ); + this.birthValidationMessage = isValid ? '' : '유효한 날짜를 입력해주세요'; + this.isBirthValid = isValid; + }, + validatePhone() { + return validatePhone(this.phone); }, gotoLogin() { this.$router.push('/login'); }, + async submitForm() { + this.formSubmitted = true; + console.log(this.isFormValid); + console.log(this.isNameValid); + console.log(this.isEmailValid); + console.log(this.isNicknameValid); + console.log(this.isPasswordValid); + console.log(this.isPasswordMatch); + console.log(this.isBirthValid); + console.log(this.isPhoneValid); + console.log(this.isNicknameValid); + console.log(this.gender); + console.log(this.agreecheck1); + console.log(this.agreecheck2); + console.log(this.nicknameError); + console.log(this.emailError); + if (this.isFormValid) { + try { + const userData = { + name: this.name, + nickname: this.nickname, + email: this.email, + password: this.password, + birth: `${this.birthYear}-${this.birthMonth}-${this.birthDay}`, + phone: this.phone, + gender: this.gender.toUpperCase(), + provider_type: 'LOCAL', + agreecheck1: this.agreecheck1, + agreecheck2: this.agreecheck2, + }; + + const response = await registerUser(userData); + if (response.status === 200) { + console.log('회원가입 성공'); + this.$router.push('/main'); // 회원가입 성공 후 메인 페이지로 이동 + } else { + console.log('회원가입 실패'); + this.formErrorMessage = '회원가입에 실패했습니다.'; + } + } catch (error) { + console.log('API 호출 오류:', error); + this.formErrorMessage = '회원가입 중 오류가 발생했습니다.'; + } + } else { + this.formErrorMessage = '위에 모든 사항을 입력해주세요'; + } + }, }, }; @@ -211,6 +591,9 @@ export default { position: relative; width: 350px; } +.input.my-input:focus { + border-color: var(--mint-color); /* 원하는 색상으로 변경 */ +} .nameinput, .passwordinput, .passwordcheckinput, @@ -303,6 +686,20 @@ export default { border: 0; padding-left: 10px; } +#name:focus, +#nickname:focus, +#email:focus, +#emailcode:focus, +#password:focus, +#passwordcheck:focus, +#birthYear:focus, +#birthMonth:focus, +#birthDay:focus, +#phone:focus, +#gender:focus { + border: 2px solid var(--mint-color) !important; + outline: none; +} #registerclear { box-sizing: border-box; width: 100%; @@ -394,4 +791,17 @@ export default { font-weight: bold; cursor: pointer; } +.success { + color: var(--mint-color); +} +.warning { + color: #ff4057; +} +.validation-text { + margin-top: 5px; + font-size: 12.5px; + display: flex; + flex-direction: row-reverse; + justify-content: space-between; +} diff --git a/src/views/mypage/MypageEdit.vue b/src/views/mypage/MypageEdit.vue index 8f987bc..43205f0 100644 --- a/src/views/mypage/MypageEdit.vue +++ b/src/views/mypage/MypageEdit.vue @@ -2,8 +2,8 @@
프로필 수정
-
-
+
+
이미지
+
- +
+

+ 3자 이상 10자 이하로 문자(영어, 한국어), 숫자, 특수문자를 + 포함해주세요 + {{ + nicknameError + }} + {{ + nicknameSuccess + }} +

+
+
+

+ + 8자 이상, 숫자, 영문(대/소문자), 특수문자를 각각 하나 이상 + 포함해주세요 + +

+
+

+ + {{ passwordMatchMessage }} + +

+
- +
@@ -66,6 +105,13 @@ diff --git a/src/views/store/StoreReview.vue b/src/views/store/StoreReview.vue index eeaa27e..330eedf 100644 --- a/src/views/store/StoreReview.vue +++ b/src/views/store/StoreReview.vue @@ -7,6 +7,10 @@ 전화 걸기 + + + + {{ storeReview.contents }}
+

매장위치 {{ storeReview.floor }}층

@@ -27,23 +32,26 @@

이런점이 좋았어요!!

-
- - - - - - - - - - - - - - - - +
+ + + + + + + + + + + + + + + + + + +>>>>>>> 6469ff4ac46c00fe8a61e2e23fcb61ad7db6410d
@@ -96,6 +104,7 @@
+
@@ -107,11 +116,16 @@ import reviewcard from '@/components/store/ReviewCard.vue'; import ProgressBar from '@/components/store/ProgressBar.vue'; import reviewbutton from '@/components/review/ReviewButton.vue'; import scrollToTopButton from '@/components/store/ScrollToTopButton.vue'; + import { Swiper, SwiperSlide } from 'swiper/vue'; import 'swiper/css'; export default { data() { + + const postData = data.timelinePost; + console.log('postData:', postData); // 데이터를 콘솔에 출력합니다. + return { storeReview: { reviews: [], commonReviewStats: {} }, likeReview, @@ -212,6 +226,7 @@ export default { \ No newline at end of file diff --git a/src/views/review/ReviewWrite.vue b/src/views/review/ReviewWrite.vue index c26abb1..68e8fd5 100644 --- a/src/views/review/ReviewWrite.vue +++ b/src/views/review/ReviewWrite.vue @@ -87,13 +87,8 @@ export default { this.paymentType = this.$route.query.paymentType || ''; this.approvalNumber = this.$route.query.approvalNumber || ''; this.purchaseDate = this.$route.query.purchaseDate || ''; - this.shopName = this.$route.query.shopName || ''; - this.paymentType = this.$route.query.paymentType || ''; - // approvalNumber가 필요하다면, confirmReceipt에서 이를 보내는 로직 추가 필요 - // this.approvalNumber = this.$route.query.approvalNumber || ''; - this.purchaseDate = this.$route.query.selectedDate || ''; this.selectedTime = this.$route.query.selectedTime || ''; - this.fetchSurveyOptions(); // fetchSurveyOptions 메서드 호출 + this.fetchSurveyOptions(); }, computed: { currentLength() { @@ -110,7 +105,7 @@ export default { this.surveyOptions = response.map(selection => ({ text: selection, selected: false })); - console.log("surveyOptions updated:", this.surveyOptions); // 추가된 로그 + console.log("surveyOptions updated:", this.surveyOptions); } else { console.error('Review selections not found in the response.'); @@ -123,7 +118,14 @@ export default { const files = event.target.files; const maxFiles = 3; - if (files.length > maxFiles) { + // 현재 업로드된 이미지의 개수를 확인 + const currentImageCount = this.uploadedImages.length; + + // 추가로 선택된 이미지 파일 개수를 확인 + const newFilesCount = files.length; + + // 현재 업로드된 이미지 개수와 추가로 선택된 이미지 파일 개수의 합이 최대 개수를 초과할 경우 경고 메시지 표시 + if (currentImageCount + newFilesCount > maxFiles) { alert(`최대 ${maxFiles}개까지 선택할 수 있습니다.`); event.target.value = ''; return; @@ -138,9 +140,8 @@ export default { img.src = reader.result; img.onload = () => { const resizedImage = this.resizeImage(img); - this.uploadedImages.push({ preview: resizedImage }); + this.uploadedImages.push({ file, preview: resizedImage.toDataURL() }); }; - console.log("uploadimages : " + this.uploadedImages); }; } }, @@ -156,71 +157,57 @@ export default { } }, resizeImage(img) { - const MAX_SIZE = 357.85; + const canvas = document.createElement('canvas'); + const max_size = 357.85; let width = img.width; let height = img.height; - let ratio = 1; if (width > height) { - ratio = MAX_SIZE / width; + if (width > max_size) { + height *= max_size / width; + width = max_size; + } } else { - ratio = MAX_SIZE / height; + if (height > max_size) { + width *= max_size / height; + height = max_size; + } } - width *= ratio; - height *= ratio; - - const canvas = document.createElement('canvas'); canvas.width = width; canvas.height = height; const ctx = canvas.getContext('2d'); ctx.drawImage(img, 0, 0, width, height); - return canvas.toDataURL('image/jpeg'); + return canvas; }, async confirmUpload() { try { - // 선택된 필수 설문과 선택 설문 항목들을 필터링해서 배열로 만듭니다. - const selectedEssentialItems = this.surveyEssential.filter(item => item.selected).map(item => item.text); - const selectedOptionalItems = this.surveyOptions.filter(item => item.selected).map(item => item.text); - - // FormData 객체를 생성합니다. const formData = new FormData(); - // 리뷰 데이터를 하나의 객체로 묶습니다. + // 리뷰 데이터 객체 생성 const reviewData = { userNickname: this.userNickname, contents: this.reviewText, shopName: this.shopName, - // paymentType: this.paymentType, paymentNum: this.approvalNumber, purchaseDate: this.purchaseDate, selectedTime: this.selectedTime, surveyData: { - essential: selectedEssentialItems, - optional: selectedOptionalItems + essential: this.surveyEssential.filter(item => item.selected).map(item => item.text), + optional: this.surveyOptions.filter(item => item.selected).map(item => item.text) } }; - // 리뷰 데이터를 문자열화하여 FormData에 추가합니다. formData.append('review', JSON.stringify(reviewData)); - this.uploadedImages.forEach((image, index) => { - - // 이미지 데이터를 File 객체로 변환 - const imageFile = new File([image.preview], `image_${index}.jpg`); - - // FormData에 File로 첨부 - formData.append('images', imageFile); + // 업로드할 이미지 파일 추가 + this.uploadedImages.forEach((image) => { + formData.append('images', image.file); }); - // FormData의 내용을 확인합니다. - for (let pair of formData.entries()) { - console.log(pair[0] + ': ' + pair[1]); - } - // submitSurvey 함수를 호출하여 FormData를 전송합니다. const response = await submitSurvey(formData); @@ -240,6 +227,7 @@ export default { }, }; + \ No newline at end of file + From 017125ca133e742c1adfbd6b3e9bb66fda916096 Mon Sep 17 00:00:00 2001 From: HRiver Date: Mon, 27 May 2024 12:12:14 +0900 Subject: [PATCH 023/113] fix: api email --- .env.development | 6 +- src/api/index.js | 92 ++++++++++++++++-------------- src/router/index.js | 9 +-- src/views/mypage/MypageCoupon.vue | 8 ++- src/views/mypage/MypageEdit.vue | 6 +- src/views/mypage/MypageEditimg.vue | 17 ++++-- src/views/mypage/MypageFollow.vue | 15 +++-- src/views/mypage/MypageMain.vue | 13 +++-- src/views/reward/RewardGetstar.vue | 10 +++- src/views/reward/RewardMain.vue | 10 +++- src/views/reward/RewardMystar.vue | 4 +- src/views/reward/RewardSelect.vue | 15 +++-- 12 files changed, 124 insertions(+), 81 deletions(-) diff --git a/.env.development b/.env.development index b9b805c..5c43877 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,3 @@ -# VUE_APP_API_URL=http://localhost:8081 -VUE_APP_DEVTOOLS=true -VUE_APP_API_URL=http://223.130.155.196:8080/api \ No newline at end of file +VUE_APP_API_URL=http://localhost:8081 +# VUE_APP_DEVTOOLS=true +# VUE_APP_API_URL=http://223.130.155.196:8080/api \ No newline at end of file diff --git a/src/api/index.js b/src/api/index.js index cb4d3f2..f47a86d 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -21,32 +21,32 @@ const instance = createInstance(); // Reward API // 특정 사용자의 보상 프로세스를 시작하는 함수입니다. -function rewardStart(userId) { +function rewardStart(email) { // 환경 변수에서 가져온 기본 URL을 로깅합니다. console.log('Base URL:', process.env.VUE_APP_API_URL); // 특정 사용자의 보상 프로세스를 시작하는 요청 URL을 로깅합니다. - console.log('Request URL:', `/reward-process/${userId}/start`); + console.log('Request URL:', `/reward-process/${email}/start`); // 사용자의 보상 프로세스를 시작하기 위해 GET 요청을 보냅니다. - return instance.get(`/reward-process/${userId}/start`); + return instance.get(`/reward-process/${email}/start`); } -function issueCouponAPI(userId, couponId) { +function issueCouponAPI(email, couponId) { // 특정 사용자와 쿠폰 ID에 대한 쿠폰 발급 시도를 로깅합니다. - console.log('Attempting to issue coupon:', { userId, couponId }); + console.log('Attempting to issue coupon:', { email, couponId }); // 사용자에게 쿠폰을 발급하기 위해 POST 요청을 보냅니다. return instance.post(`/coupon/issue`, { - userId, + email, couponId, }); } // 사용자의 쿠폰 목록을 검색하는 함수입니다. -function myCouponList(userId) { +function myCouponList(email) { // 사용자의 쿠폰 목록을 검색하기 위해 GET 요청을 보냅니다. - return instance.get(`/coupon/${userId}/coupon/list`); + return instance.get(`/coupon/${email}/coupon/list`); } // 쿠폰을 사용 처리하는 함수입니다. @@ -55,27 +55,27 @@ function CouponUse(couponHistoryId) { return instance.get(`/coupon-history/${couponHistoryId}/use`); } -function RewardProcessCheck(userId) { - return instance.get(`/reward-process/${userId}/get`); +function RewardProcessCheck(email) { + return instance.get(`/reward-process/${email}/get`); } -function ReviewCount(userId) { - return instance.patch(`/reward-process/${userId}/review`); +function ReviewCount(email) { + return instance.patch(`/reward-process/${email}/review`); } -function resetStatus(userId) { - return instance.patch(`/reward-process/${userId}/new`); +function resetStatus(email) { + return instance.patch(`/reward-process/${email}/new`); } -function rewardFinish(userId) { - return instance.patch(`/reward-process/${userId}/completed`); +function rewardFinish(email) { + return instance.patch(`/reward-process/${email}/completed`); } -function rewardList(userId) { - return instance.get(`/reward-history/user/${userId}/list`); +function rewardList(email) { + return instance.get(`/reward-history/user/${email}/list`); } -function rewardAdd(userId) { +function rewardAdd(email) { const today = new Date().getMonth() + 1; return instance.post(`/rewards/obtain`, { - member_id: userId, + member_email: email, reward_id: today, }); } @@ -84,8 +84,6 @@ function likeReview(reviewId, userId) { return instance.post(`/review-likes/${reviewId}/${userId}`); } - - // 백엔드에서 보내는 매장 목록을 받아오는 fetchStoreList 함수를 추가합니다. async function fetchStoreList() { try { @@ -95,10 +93,16 @@ async function fetchStoreList() { throw new Error('Error fetching store list: ' + error.message); } } -async function selectStore(storeId, userEmail, page = 0, size = 10, filter = '') { +async function selectStore( + storeId, + userEmail, + page = 0, + size = 10, + filter = '', +) { try { const response = await instance.get(`/store/${storeId}/reviews`, { - params: { userEmail, page, size, filter } + params: { userEmail, page, size, filter }, }); if (response.status === 200) { const storeWithReviewData = response.data; @@ -280,32 +284,36 @@ async function fetchReviewSelections(shopName) { } //Mypage -function mypageData(userId) { - return instance.get(`/user/mypage/${userId}`); +function mypageData(email) { + return instance.get(`/user/mypage/${email}`); } -function followData(userId) { - return instance.get(`/follow/mycount/${userId}`); +function followData(email) { + return instance.get(`/follow/mycount/${email}`); } -function myfollowingData(userId) { - return instance.get(`/follow/from/${userId}`); +function myfollowingData(email) { + return instance.get(`/follow/from/${email}`); } -function myfollowerData(userId) { - return instance.get(`/follow/to/${userId}`); +function myfollowerData(email) { + return instance.get(`/follow/to/${email}`); } -function deletemyfollowingData(userId, id) { - return instance.delete(`/follow/${id}/deletefrom/${userId}`); +function deletemyfollowingData(email, id) { + return instance.delete(`/follow/${id}/deletefrom/${email}`); } -function deletemyfollowerData(userId, id) { - return instance.delete(`/follow/${id}/deleteto/${userId}`); +function deletemyfollowerData(email, id) { + return instance.delete(`/follow/${id}/deleteto/${email}`); } -function uploadProfileimg(userId, formData, config) { - return instance.post(`/user/profile/upload/img/${userId}`, formData, config); +function uploadProfileimg(email, formData, config) { + return instance.post( + `/user/profile/upload/img/${this.email}`, + formData, + config, + ); } -function readProfileimg(userId) { - return instance.get(`/user/profile/get/img/${userId}`); +function readProfileimg(email) { + return instance.get(`/user/profile/get/img/${email}`); } -function deleteProfileimg(userId) { - return instance.delete(`/user/profile/delete/img/${userId}`); +function deleteProfileimg(email) { + return instance.delete(`/user/profile/delete/img/${email}`); } export { diff --git a/src/router/index.js b/src/router/index.js index bc8141a..4892bec 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -42,9 +42,10 @@ const routes = [ path: '/reward/main', component: () => import('@/views/reward/RewardMain.vue'), beforeEnter: async (to, from, next) => { - const userId = 1; // 사용자 ID 설정 + const email = store.getters.userEmail; + // const userId = 1; // 사용자 ID 설정 try { - const response = await RewardProcessCheck(userId); + const response = await RewardProcessCheck(email); const { couponCount, reviewCount, @@ -58,14 +59,14 @@ const routes = [ if (rewardStatus == true) { next('/reward/completed'); } - await rewardFinish(userId); + await rewardFinish(email); // 리워드 지급 api 필요 (rewardFinish 하도록할것) next('/reward/getstar'); } else { if (usageStatus === false && issueStatus === true) { next('/reward/search'); } else { - await resetStatus(userId); + await resetStatus(email); next('/reward/select'); } } diff --git a/src/views/mypage/MypageCoupon.vue b/src/views/mypage/MypageCoupon.vue index e0d02d3..2794263 100644 --- a/src/views/mypage/MypageCoupon.vue +++ b/src/views/mypage/MypageCoupon.vue @@ -43,6 +43,7 @@ diff --git a/src/views/reward/RewardGetstar.vue b/src/views/reward/RewardGetstar.vue index 925d2fe..2d7f315 100644 --- a/src/views/reward/RewardGetstar.vue +++ b/src/views/reward/RewardGetstar.vue @@ -9,6 +9,8 @@ @@ -131,7 +149,8 @@ export default { .feedback-icons { display: flex; flex-wrap: wrap; - gap: 8px; /* 아이콘과 텍스트 간격 조정 */ + gap: 8px; + /* 아이콘과 텍스트 간격 조정 */ } .feedback { diff --git a/src/views/review/ReviewFollowing.vue b/src/views/review/ReviewFollowing.vue index 5c5698a..da54921 100644 --- a/src/views/review/ReviewFollowing.vue +++ b/src/views/review/ReviewFollowing.vue @@ -102,16 +102,19 @@
로딩 중...
데이터가 없습니다.
- +
From 8daa3ea3fde6796d264c7462200520fd139c4ae9 Mon Sep 17 00:00:00 2001 From: choijh9023 Date: Mon, 27 May 2024 17:49:13 +0900 Subject: [PATCH 035/113] Hotfix modify StoreGuideMap link Change --- .env.development | 4 ++-- .env.production | 4 ++-- src/views/store/StoreReview.vue | 9 +++++++-- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.env.development b/.env.development index 8b30ceb..b9b805c 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,3 @@ -VUE_APP_API_URL=http://localhost:8081 +# VUE_APP_API_URL=http://localhost:8081 VUE_APP_DEVTOOLS=true -# VUE_APP_API_URL=http://223.130.155.196:8080/api \ No newline at end of file +VUE_APP_API_URL=http://223.130.155.196:8080/api \ No newline at end of file diff --git a/.env.production b/.env.production index 9f18f9c..d3c48cd 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,3 @@ -# VUE_APP_API_URL=http://223.130.155.196:8080/api +VUE_APP_API_URL=http://223.130.155.196:8080/api # VUE_APP_ENABLE_DEVTOOLS=true -VUE_APP_API_URL=http://localhost:8081 \ No newline at end of file +# VUE_APP_API_URL=http://localhost:8081 \ No newline at end of file diff --git a/src/views/store/StoreReview.vue b/src/views/store/StoreReview.vue index d2e306e..87b296b 100644 --- a/src/views/store/StoreReview.vue +++ b/src/views/store/StoreReview.vue @@ -127,6 +127,7 @@ + + diff --git a/src/components/TermsModal.vue b/src/components/TermsModal.vue new file mode 100644 index 0000000..eb45f62 --- /dev/null +++ b/src/components/TermsModal.vue @@ -0,0 +1,208 @@ + + + + + diff --git a/src/components/review/ReviewButton.vue b/src/components/review/ReviewButton.vue index 2c51042..2b9c108 100644 --- a/src/components/review/ReviewButton.vue +++ b/src/components/review/ReviewButton.vue @@ -9,13 +9,13 @@ export default { methods: { navigateToWritePage() { - console.log("button Click"); + console.log('button Click'); this.$router.push('/review/ocr'); }, }, name: 'reviewbutton', -} +}; \ No newline at end of file + diff --git a/src/components/review/ReviewCard.js b/src/components/review/ReviewCard.js index 34483f3..fef00d9 100644 --- a/src/components/review/ReviewCard.js +++ b/src/components/review/ReviewCard.js @@ -1,19 +1,39 @@ export default { - storeReview: { - profilePic: require('@/img/review/profile_default_v2.png'), - username: "review-username", - userInfo: "유저의 리뷰 작성 갯수 ", - galleryImage: "https://ugc-images.catchtable.co.kr/rv/s3cSNdEyRL50KeKUYvOAJug/7e90e1e517c7438db576ac208d8d233b?detail750", - reviewContent: "review-content", - reviewdate: "review-date", - likecount : 5, - feedback: [ - { emoji: "https://ssl.pstatic.net/static/pup/emoji/face_savoring_food20220119222022.png", text: "review_feedback" }, - { emoji: "https://ssl.pstatic.net/static/pup/emoji/green_heart20220119222224.png", text: "review_feedback" }, - { emoji: "https://ssl.pstatic.net/static/pup/emoji/couch_and_lamp20220119222025.png", text: "review_feedback" }, - { emoji: "https://ssl.pstatic.net/static/pup/emoji/rice_ball20220119222026.png", text: "review_feedback" }, - { emoji: "https://ssl.pstatic.net/static/pup/emoji/light_bulb20220119222315.png", text: "review_feedback" } - ], - - } - }; \ No newline at end of file + storeReview: { + profilePic: require('@/img/review/profile_default_v2.png'), + username: 'review-username', + userInfo: '유저의 리뷰 작성 갯수 ', + galleryImage: + 'https://ugc-images.catchtable.co.kr/rv/s3cSNdEyRL50KeKUYvOAJug/7e90e1e517c7438db576ac208d8d233b?detail750', + reviewContent: 'review-content', + reviewdate: 'review-date', + likecount: 5, + feedback: [ + { + emoji: + 'https://ssl.pstatic.net/static/pup/emoji/face_savoring_food20220119222022.png', + text: 'review_feedback', + }, + { + emoji: + 'https://ssl.pstatic.net/static/pup/emoji/green_heart20220119222224.png', + text: 'review_feedback', + }, + { + emoji: + 'https://ssl.pstatic.net/static/pup/emoji/couch_and_lamp20220119222025.png', + text: 'review_feedback', + }, + { + emoji: + 'https://ssl.pstatic.net/static/pup/emoji/rice_ball20220119222026.png', + text: 'review_feedback', + }, + { + emoji: + 'https://ssl.pstatic.net/static/pup/emoji/light_bulb20220119222315.png', + text: 'review_feedback', + }, + ], + }, +}; diff --git a/src/components/review/ReviewCard.vue b/src/components/review/ReviewCard.vue index b936c67..10b8adc 100644 --- a/src/components/review/ReviewCard.vue +++ b/src/components/review/ReviewCard.vue @@ -1,12 +1,25 @@ - diff --git a/src/components/store/ProgressBar.vue b/src/components/store/ProgressBar.vue index a568ee4..095a852 100644 --- a/src/components/store/ProgressBar.vue +++ b/src/components/store/ProgressBar.vue @@ -1,7 +1,7 @@ @@ -22,6 +26,7 @@ import { getAllReview, addFollowUser, fetchAllUser } from '@/api/index'; import ReviewButton from "@/components/review/ReviewButton.vue"; import reviewcard from '@/components/review/ReviewCard.vue'; +import { mapState, mapGetters } from 'vuex'; export default { @@ -32,7 +37,6 @@ export default { pageSize: 10, hasNextPage: true, loading: false, - userEmail: 'ekmbjh@naver.com', users: [], } }, @@ -52,6 +56,13 @@ export default { console.error('Error fetching store review:', error); } }, + computed: { + ...mapState(['email']), + ...mapGetters(['isLogin']), + userEmail() { + return this.email; // Vuex 스토어의 email을 userEmailComputed로 매핑합니다. + } + }, components: { ReviewButton, reviewcard, @@ -68,8 +79,8 @@ export default { const windowHeight = window.innerHeight; const documentHeight = document.documentElement.scrollHeight; - // 페이지 하단에서 300px 이내에 도달하면 추가 데이터 요청 - if (scrollPosition + windowHeight >= documentHeight - 300) { + // 페이지 하단에서 100px 이내에 도달하면 추가 데이터 요청 + if (scrollPosition + windowHeight >= documentHeight - 100) { this.loadMoreReviews(); console.log("locadMoreReviews 호출"); } @@ -87,7 +98,7 @@ export default { console.log("!this.hasNextPage : " + !this.hasNextPage); if (this.loading || !this.hasNextPage) { console.log("loadMoreReviews 리턴"); - return; + return; } console.log("loadMoreReviews 통과"); this.loading = true; @@ -148,4 +159,19 @@ export default { margin: auto; /* padding-bottom: 120px; */ } + +.container { + display: flex; + justify-content: center; + align-items: center; + height: 50vh; + /* 화면 전체 높이 */ + text-align: center; + /* 텍스트 중앙 정렬 */ +} + +.message { + font-size: 1.5em; + /* 글자 크기 조정 */ +} diff --git a/src/views/review/ReviewWrite.vue b/src/views/review/ReviewWrite.vue index 68e8fd5..2dde756 100644 --- a/src/views/review/ReviewWrite.vue +++ b/src/views/review/ReviewWrite.vue @@ -50,7 +50,7 @@
@@ -64,7 +64,7 @@ import { submitSurvey, fetchReviewSelections } from '@/api/index'; export default { data() { return { - userNickname: "hklee", + userEmail: "ekmbjh@naver.com", uploadedImages: [], surveyEssential: [ { text: "재방문하고 싶어요", selected: false }, @@ -189,7 +189,7 @@ export default { // 리뷰 데이터 객체 생성 const reviewData = { - userNickname: this.userNickname, + userEmail: this.userEmail, contents: this.reviewText, shopName: this.shopName, paymentNum: this.approvalNumber, @@ -222,6 +222,7 @@ export default { } else { alert('리뷰 데이터 업로드에 실패하였습니다. 다시 시도해주세요.'); } + this.$router.push('/review/recommended'); } }, }, From 7ddd0cd35a3879e27fad25d0a0754d4b51ef659a Mon Sep 17 00:00:00 2001 From: HRiver Date: Wed, 29 May 2024 20:53:01 +0900 Subject: [PATCH 072/113] hotfix : fix review vue --- .env.development | 4 +- .env.production | 4 +- src/App.vue | 26 +++- src/components/review/ReviewCard.vue | 36 ++++-- src/css/common.css | 2 +- src/views/login/ForgotPassword.vue | 2 +- src/views/login/LoginUser.vue | 3 +- src/views/login/RegisterUser.vue | 1 + src/views/review/ReviewCheck.vue | 185 +++++++++++++++------------ src/views/review/ReviewFollowing.vue | 76 ++++++++--- 10 files changed, 215 insertions(+), 124 deletions(-) diff --git a/.env.development b/.env.development index 33ac780..97d2968 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,3 @@ -# VUE_APP_API_URL=http://localhost:8081 +VUE_APP_API_URL=http://localhost:8081 VUE_APP_DEVTOOLS=true -VUE_APP_API_URL=http://223.130.155.196:8080/api +# VUE_APP_API_URL=http://223.130.155.196:8080/api diff --git a/.env.production b/.env.production index 13c4e1e..b596d9f 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,3 @@ -VUE_APP_API_URL=http://223.130.155.196:8080/api +# VUE_APP_API_URL=http://223.130.155.196:8080/api VUE_APP_ENABLE_DEVTOOLS=true -# VUE_APP_API_URL=http://localhost:8081 +VUE_APP_API_URL=http://localhost:8081 diff --git a/src/App.vue b/src/App.vue index 327a523..b85bb5e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,14 +1,15 @@ diff --git a/src/components/review/ReviewCard.vue b/src/components/review/ReviewCard.vue index 6c0182a..9a17324 100644 --- a/src/components/review/ReviewCard.vue +++ b/src/components/review/ReviewCard.vue @@ -25,12 +25,20 @@ {{ review.userNickname }} 리뷰 수 {{ review.reviewcount }}
- - + +
- - + +
@@ -123,9 +133,9 @@ export default { }, users: { type: Array, - default: () => [] + default: () => [], }, - follow: Function + follow: Function, }, async created() { this.feedbackImageMap = await this.fetchFeedbackImageMap(); @@ -203,7 +213,11 @@ export default { const data = await addFollowUser(username, this.userEmail); if (data.status === 200) { user.isFollowed = !user.isFollowed; - console.log(username + '님을 팔로우했습니다: ' + (user.isFollowed ? 'true' : 'false')); + console.log( + username + + '님을 팔로우했습니다: ' + + (user.isFollowed ? 'true' : 'false'), + ); } } }, diff --git a/src/css/common.css b/src/css/common.css index de01c71..3d28a70 100644 --- a/src/css/common.css +++ b/src/css/common.css @@ -90,7 +90,7 @@ body { min-height: 100%; top: 60px; height: auto; - padding: 0 20px 120px; + padding: 0 20px 0px; /* background-color: gray; */ } diff --git a/src/views/login/ForgotPassword.vue b/src/views/login/ForgotPassword.vue index 8b9394d..5fb628e 100644 --- a/src/views/login/ForgotPassword.vue +++ b/src/views/login/ForgotPassword.vue @@ -124,7 +124,7 @@ export default { display: flex; /* Flexbox 레이아웃 사용 */ flex-direction: column; /* 자식 요소들을 세로로 정렬 */ align-items: center; /* 수평 방향 중앙 정렬 */ - height: 100vh; /* 뷰포트 높이를 전체 크기로 설정 */ + /* height: 100vh; 뷰포트 높이를 전체 크기로 설정 */ } .forgotpwform { margin-top: 40px; diff --git a/src/views/login/LoginUser.vue b/src/views/login/LoginUser.vue index d47cd18..63793e4 100644 --- a/src/views/login/LoginUser.vue +++ b/src/views/login/LoginUser.vue @@ -173,8 +173,9 @@ export default { display: flex; /* Flexbox 레이아웃 사용 */ flex-direction: column; /* 자식 요소들을 세로로 정렬 */ align-items: center; /* 수평 방향 중앙 정렬 */ - height: 100vh; /* 뷰포트 높이를 전체 크기로 설정 */ + /* height: 100vh; 뷰포트 높이를 전체 크기로 설정 */ padding-top: 60px; + padding-bottom: 0px; } .login-logo { width: 130px; /* 로고의 크기를 조정합니다. */ diff --git a/src/views/login/RegisterUser.vue b/src/views/login/RegisterUser.vue index 1184be0..fec7738 100644 --- a/src/views/login/RegisterUser.vue +++ b/src/views/login/RegisterUser.vue @@ -610,6 +610,7 @@ export default { flex-direction: column; /* 자식 요소들을 세로로 정렬 */ align-items: center; /* 수평 방향 중앙 정렬 */ height: 100vh; /* 뷰포트 높이를 전체 크기로 설정 */ + padding-bottom: 0px; } .registerform { text-align: center; diff --git a/src/views/review/ReviewCheck.vue b/src/views/review/ReviewCheck.vue index 6fdbe3b..7d485d4 100644 --- a/src/views/review/ReviewCheck.vue +++ b/src/views/review/ReviewCheck.vue @@ -1,57 +1,33 @@ - - diff --git a/src/views/review/ReviewCheck.vue b/src/views/review/ReviewCheck.vue index 6fdbe3b..1cc09a7 100644 --- a/src/views/review/ReviewCheck.vue +++ b/src/views/review/ReviewCheck.vue @@ -44,7 +44,7 @@
- - - - - + + + + +
-
-
+
+
방문하신 날짜와 시간을 확인해 주세요. -
-
-
+
+ - + -
- + - @@ -206,8 +200,8 @@ export default { @import '@/css/review/review.css'; .contents { - width: 400px; - margin: auto; - /* padding-bottom: 120px; */ + width: 400px; + margin: auto; + /* padding-bottom: 120px; */ } diff --git a/src/views/review/ReviewWrite.vue b/src/views/review/ReviewWrite.vue index 8a1e5e6..60ef7cb 100644 --- a/src/views/review/ReviewWrite.vue +++ b/src/views/review/ReviewWrite.vue @@ -1,4 +1,7 @@ From 8cbc7f15d2c84b29fca1d230ea2ef836442d8304 Mon Sep 17 00:00:00 2001 From: ekmbjh Date: Thu, 30 May 2024 11:02:24 +0900 Subject: [PATCH 077/113] =?UTF-8?q?review=20isFollowed=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=A1=B0=EC=B9=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/review/ReviewCard.vue | 149 +++++++++------------------ src/views/review/ReviewFollowing.vue | 13 ++- 2 files changed, 55 insertions(+), 107 deletions(-) diff --git a/src/components/review/ReviewCard.vue b/src/components/review/ReviewCard.vue index 9a17324..415d03a 100644 --- a/src/components/review/ReviewCard.vue +++ b/src/components/review/ReviewCard.vue @@ -1,44 +1,30 @@ diff --git a/src/views/store/StoreReview.vue b/src/views/store/StoreReview.vue index 4d69382..23592d2 100644 --- a/src/views/store/StoreReview.vue +++ b/src/views/store/StoreReview.vue @@ -126,7 +126,7 @@ @@ -145,6 +145,7 @@ import ProgressBar from '@/components/store/ProgressBar.vue'; import reviewbutton from '@/components/review/ReviewButton.vue'; import scrollToTopButton from '@/components/store/ScrollToTopButton.vue'; import { Swiper, SwiperSlide } from 'swiper/vue'; +import { EventBus } from '@/eventBus'; import 'swiper/css'; export default { @@ -184,10 +185,13 @@ export default { }, }, async created() { + EventBus.emit('loading', true); try { await this.loadReviews(); } catch (error) { console.error('Error fetching store review:', error); + } finally { + EventBus.emit('loading', false); // 데이터 로드 완료 후 로딩 상태를 false로 설정합니다. } }, components: { @@ -225,7 +229,7 @@ export default { this.currentPage, this.pageSize, this.selectedButton, - this.selectedSort // 정렬 방식을 전달 + this.selectedSort, // 정렬 방식을 전달 ); if (this.currentPage === 0) { this.storeReview = response; From e633a3e69eb1a4c91b7083d116b9206edd9d8aca Mon Sep 17 00:00:00 2001 From: StarRoad <159003240+SSGProjectStarRoad@users.noreply.github.com> Date: Thu, 30 May 2024 12:35:00 +0900 Subject: [PATCH 080/113] Update .env.development --- .env.development | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.development b/.env.development index 97d2968..33ac780 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,3 @@ -VUE_APP_API_URL=http://localhost:8081 +# VUE_APP_API_URL=http://localhost:8081 VUE_APP_DEVTOOLS=true -# VUE_APP_API_URL=http://223.130.155.196:8080/api +VUE_APP_API_URL=http://223.130.155.196:8080/api From 92213f9ac0dde25c8abf551b13cef14ca9aa0fc2 Mon Sep 17 00:00:00 2001 From: StarRoad <159003240+SSGProjectStarRoad@users.noreply.github.com> Date: Thu, 30 May 2024 12:35:38 +0900 Subject: [PATCH 081/113] Update .env.development --- .env.development | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.development b/.env.development index 97d2968..33ac780 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,3 @@ -VUE_APP_API_URL=http://localhost:8081 +# VUE_APP_API_URL=http://localhost:8081 VUE_APP_DEVTOOLS=true -# VUE_APP_API_URL=http://223.130.155.196:8080/api +VUE_APP_API_URL=http://223.130.155.196:8080/api From 8c43fa26cc9a483f8420f1562ac2ca3c0a638799 Mon Sep 17 00:00:00 2001 From: StarRoad <159003240+SSGProjectStarRoad@users.noreply.github.com> Date: Thu, 30 May 2024 12:35:54 +0900 Subject: [PATCH 082/113] Update .env.production --- .env.production | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.production b/.env.production index b596d9f..13c4e1e 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,3 @@ -# VUE_APP_API_URL=http://223.130.155.196:8080/api +VUE_APP_API_URL=http://223.130.155.196:8080/api VUE_APP_ENABLE_DEVTOOLS=true -VUE_APP_API_URL=http://localhost:8081 +# VUE_APP_API_URL=http://localhost:8081 From a62a3e309405ee4baef630f478c5bc337f0c76c9 Mon Sep 17 00:00:00 2001 From: HRiver Date: Thu, 30 May 2024 13:51:30 +0900 Subject: [PATCH 083/113] hotfix : fix review merge css and add spinner --- .env.development | 4 ++-- src/api/index.js | 53 +++++++++++++++--------------------------------- 2 files changed, 18 insertions(+), 39 deletions(-) diff --git a/.env.development b/.env.development index 33ac780..97d2968 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,3 @@ -# VUE_APP_API_URL=http://localhost:8081 +VUE_APP_API_URL=http://localhost:8081 VUE_APP_DEVTOOLS=true -VUE_APP_API_URL=http://223.130.155.196:8080/api +# VUE_APP_API_URL=http://223.130.155.196:8080/api diff --git a/src/api/index.js b/src/api/index.js index 4a7ce75..57cd07a 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -80,23 +80,22 @@ function rewardAdd(email) { }); } // axios 인스턴스가 'instance'로 정의되어 있다고 가정합니다. -function getStoreKeywords(storeId){ - return instance.get(`/store/${storeId}/keywords`) +function getStoreKeywords(storeId) { + return instance.get(`/store/${storeId}/keywords`); } - - - - function likeReview(reviewId, userId) { return instance.post(`/review-likes/${reviewId}/${userId}`); } - async function addFollowUser(userName, userEmail) { - console.log("username : " + userName); + console.log('username : ' + userName); try { - const response = await instance.post(`/reviews/addFollowUser?userName=${encodeURIComponent(userName)}&userEmail=${encodeURIComponent(userEmail)}`); + const response = await instance.post( + `/reviews/addFollowUser?userName=${encodeURIComponent( + userName, + )}&userEmail=${encodeURIComponent(userEmail)}`, + ); if (response.status === 200) { console.log(response); @@ -109,7 +108,6 @@ async function addFollowUser(userName, userEmail) { } } - // 백엔드에서 보내는 매장 목록을 받아오는 fetchStoreList 함수를 추가합니다. async function fetchStoreList() { try { @@ -126,11 +124,11 @@ async function selectStore( size = 10, filter = '', sort, - keyword ='' + keyword = '', ) { try { const response = await instance.get(`/store/${storeId}/reviews`, { - params: { userEmail, page, size, filter ,sort,keyword }, + params: { userEmail, page, size, filter, sort, keyword }, }); if (response.status === 200) { const storeWithReviewData = response.data; @@ -319,10 +317,9 @@ async function submitSurvey(surveyData) { async function fetchRankUser(userEmail) { try { - const response = await instance.get( - `/reviews/rank`, { - params: { userEmail }, - }); + const response = await instance.get(`/reviews/rank`, { + params: { userEmail }, + }); if (response.status === 200) { const RankData = response.data; @@ -338,10 +335,9 @@ async function fetchRankUser(userEmail) { async function fetchAllUser(userEmail) { try { - const response = await instance.get( - `/reviews/allUser`, { - params: { userEmail }, - }); + const response = await instance.get(`/reviews/allUser`, { + params: { userEmail }, + }); if (response.status === 200) { const RankData = response.data; @@ -355,22 +351,6 @@ async function fetchAllUser(userEmail) { } } -async function addFollowUser(userName, userEmail) { - console.log("username : " + userName); - try { - const response = await instance.post(`/reviews/addFollowUser?userName=${encodeURIComponent(userName)}&userEmail=${encodeURIComponent(userEmail)}`); - - if (response.status === 200) { - console.log(response); - return response; - } else { - throw new Error('팔로우하는데 실패했습니다.'); - } - } catch (error) { - console.error('오류:', error); - } -} - async function fetchReviewSelections(shopName) { try { const response = await instance.post('/review-selections/selection', { @@ -466,5 +446,4 @@ export { addFollowUser, getMyReview, getStoreKeywords, - addFollowUser }; From 7af11111d03b792ec89212570fcb246ca6f887f0 Mon Sep 17 00:00:00 2001 From: StarRoad <159003240+SSGProjectStarRoad@users.noreply.github.com> Date: Thu, 30 May 2024 13:53:42 +0900 Subject: [PATCH 084/113] Update .env.development --- .env.development | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.development b/.env.development index 97d2968..33ac780 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,3 @@ -VUE_APP_API_URL=http://localhost:8081 +# VUE_APP_API_URL=http://localhost:8081 VUE_APP_DEVTOOLS=true -# VUE_APP_API_URL=http://223.130.155.196:8080/api +VUE_APP_API_URL=http://223.130.155.196:8080/api From 69703d37f938060ebed49a1545fe4bd2a7a048c4 Mon Sep 17 00:00:00 2001 From: HRiver Date: Thu, 30 May 2024 15:50:18 +0900 Subject: [PATCH 085/113] hotfix : fix myreview follow --- src/components/review/ReviewCard.vue | 103 ++++++++++++++++++------- src/views/mypage/MypageFollow.vue | 109 ++++++++++++++++++++++----- src/views/mypage/MypageReview.vue | 1 + 3 files changed, 168 insertions(+), 45 deletions(-) diff --git a/src/components/review/ReviewCard.vue b/src/components/review/ReviewCard.vue index 415d03a..8af689e 100644 --- a/src/components/review/ReviewCard.vue +++ b/src/components/review/ReviewCard.vue @@ -1,30 +1,46 @@ @@ -130,8 +135,8 @@ export default { if (user) { const data = await addFollowUser(username, this.userEmail); if (data.status === 200) { - user.isFollowed = !user.isFollowed; - console.log(username + '님을 팔로우했습니다: ' + (user.isFollowed ? 'true' : 'false')); + user.followed = !user.followed; + console.log(username + '님을 팔로우했습니다: ' + (user.followed ? 'true' : 'false')); } } }, @@ -140,7 +145,6 @@ export default { const data = await fetchAllUser(this.userEmail); this.users = data.map(user => ({ ...user, - isFollowed: false, // isFollowed 속성을 기본적으로 추가합니다. })); } catch (error) { console.error("사용자 목록을 불러오는 중 오류가 발생했습니다:", error); From 52026bf6426ccef59a97ed2bcbf3b5afe1a3b3e2 Mon Sep 17 00:00:00 2001 From: HRiver <55684709+sanscout1@users.noreply.github.com> Date: Thu, 30 May 2024 16:49:17 +0900 Subject: [PATCH 088/113] Update .env.development --- .env.development | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.development b/.env.development index 8b30ceb..33ac780 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,3 @@ -VUE_APP_API_URL=http://localhost:8081 +# VUE_APP_API_URL=http://localhost:8081 VUE_APP_DEVTOOLS=true -# VUE_APP_API_URL=http://223.130.155.196:8080/api \ No newline at end of file +VUE_APP_API_URL=http://223.130.155.196:8080/api From 7e542accacb10af4f6a105e2b1a67f2e496cdbe1 Mon Sep 17 00:00:00 2001 From: HRiver <55684709+sanscout1@users.noreply.github.com> Date: Thu, 30 May 2024 16:49:31 +0900 Subject: [PATCH 089/113] Update .env.production --- .env.production | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.production b/.env.production index b596d9f..13c4e1e 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,3 @@ -# VUE_APP_API_URL=http://223.130.155.196:8080/api +VUE_APP_API_URL=http://223.130.155.196:8080/api VUE_APP_ENABLE_DEVTOOLS=true -VUE_APP_API_URL=http://localhost:8081 +# VUE_APP_API_URL=http://localhost:8081 From ef7c1100e659cd10a0a2c52af81979b340ec10eb Mon Sep 17 00:00:00 2001 From: HRiver Date: Thu, 30 May 2024 17:22:59 +0900 Subject: [PATCH 090/113] hotfix : fix myreward getstar --- src/views/reward/RewardGetstar.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/reward/RewardGetstar.vue b/src/views/reward/RewardGetstar.vue index 2d7f315..5850c32 100644 --- a/src/views/reward/RewardGetstar.vue +++ b/src/views/reward/RewardGetstar.vue @@ -21,7 +21,7 @@ export default { this.getReward(); // 페이지 로드 시 getReward 메서드 호출 setTimeout(() => { this.redirectToCompleted(); - }, 3000); + }, 2000); }, computed: { ...mapState(['email']), @@ -30,7 +30,7 @@ export default { methods: { getCurrentMonthImage() { const month = new Date().getMonth() + 1; // 현재 월 가져오기 - return require(`@/img/reward/mystar${month}.png`); + return `https://kr.object.ncloudstorage.com/ssg-starroad/ssg/starroad/rewards/mystar${month}.png`; }, async getReward() { // const userId = 1; From 9ec92c57a17783673cb11930f3a2acf0fbcd9f9f Mon Sep 17 00:00:00 2001 From: ekmbjh Date: Thu, 30 May 2024 18:02:10 +0900 Subject: [PATCH 091/113] =?UTF-8?q?=EB=A6=AC=EB=B7=B0=20=ED=8E=98=EC=9D=B4?= =?UTF-8?q?=EC=A7=80=20=EB=AC=B4=ED=95=9C=20=EC=8A=A4=ED=81=AC=EB=A1=A4=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/index.js | 2 +- src/views/review/ReviewFollowing.vue | 81 ++++++++++++-------------- src/views/review/ReviewRecommended.vue | 64 +++++++++----------- 3 files changed, 66 insertions(+), 81 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index 57cfca0..affff76 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -186,7 +186,7 @@ async function getAllReview(userEmail, page = 0, size = 10) { }); if (response.status === 200) { const ReviewData = response.data; - console.log(ReviewData); + console.log("getAllReivew : " + JSON.stringify(ReviewData)); return ReviewData; } else { throw new Error('리뷰를 가져오는데 실패했습니다.'); diff --git a/src/views/review/ReviewFollowing.vue b/src/views/review/ReviewFollowing.vue index 55c2eef..8208f7e 100644 --- a/src/views/review/ReviewFollowing.vue +++ b/src/views/review/ReviewFollowing.vue @@ -132,29 +132,17 @@ export default { async created() { try { this.loadFollowingUser(); - const initialData = await getFollowingReview( - this.userEmail, - this.currentPage, - this.pageSize, - ); - console.log('userEmail : ' + this.userEmail); - if (initialData) { - console.log('Initial data:', initialData); // 데이터를 콘솔에 출력하여 확인합니다. - this.reviews = initialData.reviews; - console.log('this.reviews : ' + this.reviews); - this.hasNextPage = initialData.hasNext; - console.log('created - this.hasNextPage : ' + this.hasNextPage); - this.totalReviewCount = initialData.totalReviewCount || 0; - } + await this.loadReviews(); } catch (error) { console.error('Error fetching store review:', error); } }, async mounted() { console.log("mounted() users:", this.users); + window.addEventListener('scroll', this.handleScroll) }, beforeUnmount() { - window.removeEventListener('scroll', this.handleScroll); + window.removeEventListener('scroll', this.handleScroll) }, methods: { handleScroll() { @@ -163,10 +151,8 @@ export default { const windowHeight = window.innerHeight; const documentHeight = document.documentElement.scrollHeight; - // 페이지 하단에서 100px 이내에 도달하면 추가 데이터 요청 - if (scrollPosition + windowHeight >= documentHeight - 300) { + if (scrollPosition + windowHeight >= documentHeight - 50) { this.loadMoreReviews(); - console.log('locadMoreReviews 호출'); } this.showScrollToTopButton = scrollPosition > 300; @@ -178,35 +164,12 @@ export default { }); }, async loadMoreReviews() { - console.log('this.loading : ' + this.loading); - console.log('!this.hasNextPage : ' + !this.hasNextPage); - if (this.loading || !this.hasNextPage) { - console.log('loadMoreReviews 리턴'); - return; - } - console.log('loadMoreReviews 통과'); - this.loading = true; - const nextPage = this.currentPage + 1; + if (this.loading || !this.hasNextPage) return; + this.loading = true; try { - const response = await getFollowingReview( - this.id, - nextPage, - this.pageSize, - ); - if (response && response.reviews) { - console.log('this revies : ' + this.reviews); - console.log('loadMoreRevies response: ' + response); - console.log('loadMoreRevies response.reviews: ' + response.reviews); - this.reviews = [...this.reviews, ...response.reviews]; - console.log('more Reviews : ' + this.reviews); - this.currentPage = nextPage; - console.log('currentPage : ' + this.currentPage); - this.hasNextPage = response.hasNext; - console.log('hasNextPage : ' + this.hasNextPage); - } else { - console.error('Invalid response data:', response); - } + this.currentPage += 1; + await this.loadReviews(); } catch (error) { console.error('Error loading more reviews:', error); } finally { @@ -242,6 +205,34 @@ export default { this.users = []; } }, + async loadReviews() { + this.loading = true; + try { + console.log("loadReviews 시작 "); + const response = await getFollowingReview( + this.userEmail, + this.currentPage, + this.pageSize, + ); + console.log("loadReviews response : " + JSON.stringify(response)); + if (this.currentPage === 0) { + this.reviews = response.reviews; + console.log("loadMoreReview + 1"); + } else { + console.log("loadMoreReview else"); + this.reviews = [ + ...this.reviews, + ...response.reviews, + ]; + } + this.hasNextPage = response.hasNext; + this.totalReviewCount = response.totalReviewCount || 0; + } catch (error) { + console.error('Error loading more reviews:', error); + } finally { + this.loading = false; + } + }, }, }; diff --git a/src/views/review/ReviewRecommended.vue b/src/views/review/ReviewRecommended.vue index 93d7331..f0a9f11 100644 --- a/src/views/review/ReviewRecommended.vue +++ b/src/views/review/ReviewRecommended.vue @@ -48,15 +48,7 @@ export default { async created() { try { this.loadAllUser(); - const initialData = await getAllReview(this.userEmail, this.currentPage, this.pageSize); - if (initialData) { - console.log('Initial data:', initialData); // 데이터를 콘솔에 출력하여 확인합니다. - this.reviews = initialData.reviews; - console.log("this.reviews : " + this.reviews); - this.hasNextPage = initialData.hasNext; - console.log("created - this.hasNextPage : " + this.hasNextPage); - this.totalReviewCount = initialData.totalReviewCount || 0; - } + await this.loadReviews(); } catch (error) { console.error('Error fetching store review:', error); } @@ -80,14 +72,13 @@ export default { }, methods: { handleScroll() { - const scrollPosition = window.pageYOffset || document.documentElement.scrollTop; + const scrollPosition = + window.pageYOffset || document.documentElement.scrollTop; const windowHeight = window.innerHeight; const documentHeight = document.documentElement.scrollHeight; - // 페이지 하단에서 100px 이내에 도달하면 추가 데이터 요청 if (scrollPosition + windowHeight >= documentHeight - 100) { this.loadMoreReviews(); - console.log("locadMoreReviews 호출"); } this.showScrollToTopButton = scrollPosition > 100; @@ -99,31 +90,12 @@ export default { }); }, async loadMoreReviews() { - console.log("this.loading : " + this.loading); - console.log("!this.hasNextPage : " + !this.hasNextPage); - if (this.loading || !this.hasNextPage) { - console.log("loadMoreReviews 리턴"); - return; - } - console.log("loadMoreReviews 통과"); - this.loading = true; - const nextPage = this.currentPage + 1; + if (this.loading || !this.hasNextPage) return; + this.loading = true; try { - const response = await getAllReview(nextPage, this.pageSize); - if (response && response.reviews) { - console.log("this revies : " + this.reviews); - console.log("loadMoreRevies response: " + response); - console.log("loadMoreRevies response.reviews: " + response.reviews); - this.reviews = [...this.reviews, ...response.reviews]; - console.log("more Reviews : " + this.reviews); - this.currentPage = nextPage; - console.log("currentPage : " + this.currentPage); - this.hasNextPage = response.hasNext; - console.log("hasNextPage : " + this.hasNextPage); - } else { - console.error('Invalid response data:', response); - } + this.currentPage += 1; + await this.loadReviews(); } catch (error) { console.error('Error loading more reviews:', error); } finally { @@ -151,6 +123,28 @@ export default { this.users = []; } }, + async loadReviews() { + this.loading = true; + try { + console.log("loadReviews 시작 "); + const response = await getAllReview(this.userEmail, this.currentPage, this.pageSize); + console.log("loadReviews response : " + response); + if (this.currentPage === 0) { + this.reviews = response.reviews; + } else { + this.reviews = [ + ...this.reviews, + ...response.reviews, + ]; + } + this.hasNextPage = response.hasNext; + this.totalReviewCount = response.totalReviewCount || 0; + } catch (error) { + console.error('Error loading more reviews:', error); + } finally { + this.loading = false; + } + }, }, }; From bccfe0dd8e1dbaca300702b2dd8a3c07f5b60185 Mon Sep 17 00:00:00 2001 From: HRiver Date: Thu, 30 May 2024 18:36:42 +0900 Subject: [PATCH 092/113] hotfix : fix mymape edit --- .env.development | 4 +- .env.production | 4 +- src/views/mypage/MypageEdit.vue | 84 ++++++++++++++++++++++++++++++--- 3 files changed, 82 insertions(+), 10 deletions(-) diff --git a/.env.development b/.env.development index 33ac780..97d2968 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,3 @@ -# VUE_APP_API_URL=http://localhost:8081 +VUE_APP_API_URL=http://localhost:8081 VUE_APP_DEVTOOLS=true -VUE_APP_API_URL=http://223.130.155.196:8080/api +# VUE_APP_API_URL=http://223.130.155.196:8080/api diff --git a/.env.production b/.env.production index 13c4e1e..b596d9f 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,3 @@ -VUE_APP_API_URL=http://223.130.155.196:8080/api +# VUE_APP_API_URL=http://223.130.155.196:8080/api VUE_APP_ENABLE_DEVTOOLS=true -# VUE_APP_API_URL=http://localhost:8081 +VUE_APP_API_URL=http://localhost:8081 diff --git a/src/views/mypage/MypageEdit.vue b/src/views/mypage/MypageEdit.vue index 258618e..3d59c69 100644 --- a/src/views/mypage/MypageEdit.vue +++ b/src/views/mypage/MypageEdit.vue @@ -101,6 +101,25 @@
계정 탈퇴하기
+ + + @@ -202,4 +222,42 @@ export default { flex-direction: row-reverse; justify-content: space-between; } +.notification { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + padding: 10px; + color: white; + background-color: var(--navy-color); + border-radius: 8px; + text-align: center; + width: 230px; + z-index: 2000; + opacity: 0.9; + animation: fadeIn 0.5s, fadeOut 0.5s 1.5s; +} + +@keyframes fadeIn { + from { + opacity: 0; + } + to { + opacity: 0.9; + } +} +@keyframes fadeOut { + from { + opacity: 0.9; + } + to { + opacity: 0; + } +} +.fade-in { + animation: fadeIn 0.5s forwards; +} +.fade-out { + animation: fadeOut 0.5s forwards; +} diff --git a/src/views/login/EmailCode.vue b/src/views/login/EmailCode.vue index dfee145..ba8fb9f 100644 --- a/src/views/login/EmailCode.vue +++ b/src/views/login/EmailCode.vue @@ -64,6 +64,9 @@ /> +
+ {{ notification }} +
코드를 받지 못하셨다구요? @@ -83,6 +86,7 @@ export default { code3: '', code4: '', email: '', + notification: '', }; }, mounted() { @@ -121,6 +125,41 @@ export default { alert('오류가 발생했습니다.'); } }, + async verifyCode() { + const code = this.code1 + this.code2 + this.code3 + this.code4; + try { + const response = await verifyAuthCode(this.email, code); + if (response.data) { + this.showNotification('인증이 완료되었습니다.', () => { + // 이메일 값을 쿼리 파라미터로 전달하여 라우팅 + this.$router.push({ + path: '/login/newpw', + query: { email: this.email }, + }); + }); + } else { + this.showNotification('인증 코드가 올바르지 않습니다.'); + } + } catch (error) { + console.error(error); + this.showNotification('오류가 발생했습니다.'); + } + }, + showNotification(message, callback) { + this.notification = message; + this.$nextTick(() => { + const notificationElement = this.$refs.notification; + notificationElement.classList.add('fade-in'); + setTimeout(() => { + notificationElement.classList.remove('fade-in'); + notificationElement.classList.add('fade-out'); + setTimeout(() => { + this.notification = ''; + if (callback) callback(); + }, 500); + }, 1500); + }); + }, gotoForgotPassword() { this.$router.push('/login/forgotpw'); }, @@ -185,7 +224,7 @@ export default { font-size: 18px; /* 글씨 크기를 18px로 조정 */ cursor: pointer; /* 버튼 위에 마우스를 올렸을 때 커서 모양을 손가락 모양으로 변경 */ text-align: center; /* 텍스트 중앙 정렬 */ - margin-bottom: 250px; + margin-bottom: 150px; box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2); /* 테두리 대신 그림자를 추가합니다. */ } .forgotpwback { @@ -202,4 +241,42 @@ export default { font-weight: bold; cursor: pointer; } +.notification { + position: fixed; + top: 40%; + left: 50%; + transform: translate(-50%, -50%); + padding: 10px; + color: white; + background-color: var(--navy-color); + border-radius: 8px; + text-align: center; + width: 220px; + z-index: 2000; + opacity: 0.9; + animation: fadeIn 0.5s, fadeOut 0.5s 1.5s; +} + +@keyframes fadeIn { + from { + opacity: 0; + } + to { + opacity: 0.9; + } +} +@keyframes fadeOut { + from { + opacity: 0.9; + } + to { + opacity: 0; + } +} +.fade-in { + animation: fadeIn 0.5s forwards; +} +.fade-out { + animation: fadeOut 0.5s forwards; +} diff --git a/src/views/login/ForgotPassword.vue b/src/views/login/ForgotPassword.vue index 5fb628e..c02d585 100644 --- a/src/views/login/ForgotPassword.vue +++ b/src/views/login/ForgotPassword.vue @@ -52,6 +52,9 @@ />
+
+ {{ notification }} +
비밀번호가 기억나신다구요? @@ -69,6 +72,7 @@ export default { return { name: '', email: '', + notification: '', }; }, computed: { @@ -101,20 +105,38 @@ export default { if (response.data === true) { // 이메일이 데이터베이스에 존재하면 인증 코드 전송 await sendAuthCode(this.email); - alert('인증 코드가 발송되었습니다.'); - this.$router.push({ - path: '/login/email', - query: { email: this.email }, + this.showNotification('인증 코드가 발송되었습니다.', () => { + this.$router.push({ + path: '/login/email', + query: { email: this.email }, + }); }); } else { console.log(this.email); - alert('이메일이 존재하지 않습니다.'); + this.showNotification('이메일이 존재하지 않습니다.'); } } catch (error) { console.error(error); - alert('오류가 발생했습니다.'); + this.showNotification('오류가 발생했습니다.'); } }, + showNotification(message, callback) { + console.log('showNotification called with message:', message); // Debugging log + this.notification = message; + this.$nextTick(() => { + const notificationElement = this.$refs.notification; + console.log('notificationElement:', notificationElement); // Debugging log + notificationElement.classList.add('fade-in'); + setTimeout(() => { + notificationElement.classList.remove('fade-in'); + notificationElement.classList.add('fade-out'); + setTimeout(() => { + this.notification = ''; + if (callback) callback(); + }, 500); + }, 1500); + }); + }, }, }; @@ -170,7 +192,7 @@ export default { cursor: pointer; /* 버튼 위에 마우스를 올렸을 때 커서 모양을 손가락 모양으로 변경 */ text-align: center; margin-top: 45px; - margin-bottom: 250px; + margin-bottom: 100px; box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2); /* 테두리 대신 그림자를 추가합니다. */ } .loginback { @@ -197,4 +219,42 @@ export default { flex-direction: row-reverse; justify-content: space-between; } +.notification { + position: fixed; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + padding: 10px; + color: white; + background-color: var(--navy-color); + border-radius: 8px; + text-align: center; + width: 220px; + z-index: 2000; + opacity: 0.9; + animation: fadeIn 0.5s, fadeOut 0.5s 1.5s; +} + +@keyframes fadeIn { + from { + opacity: 0; + } + to { + opacity: 0.9; + } +} +@keyframes fadeOut { + from { + opacity: 0.9; + } + to { + opacity: 0; + } +} +.fade-in { + animation: fadeIn 0.5s forwards; +} +.fade-out { + animation: fadeOut 0.5s forwards; +} From 5270611f37ff8913184afee0aa3938764d5f8aee Mon Sep 17 00:00:00 2001 From: StarRoad <159003240+SSGProjectStarRoad@users.noreply.github.com> Date: Thu, 30 May 2024 22:29:45 +0900 Subject: [PATCH 097/113] Update .env.development --- .env.development | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.development b/.env.development index 97d2968..33ac780 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,3 @@ -VUE_APP_API_URL=http://localhost:8081 +# VUE_APP_API_URL=http://localhost:8081 VUE_APP_DEVTOOLS=true -# VUE_APP_API_URL=http://223.130.155.196:8080/api +VUE_APP_API_URL=http://223.130.155.196:8080/api From 7980171404e75bbc5b85eebd457cb323171e226e Mon Sep 17 00:00:00 2001 From: StarRoad <159003240+SSGProjectStarRoad@users.noreply.github.com> Date: Thu, 30 May 2024 22:29:58 +0900 Subject: [PATCH 098/113] Update .env.production --- .env.production | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.env.production b/.env.production index b596d9f..13c4e1e 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,3 @@ -# VUE_APP_API_URL=http://223.130.155.196:8080/api +VUE_APP_API_URL=http://223.130.155.196:8080/api VUE_APP_ENABLE_DEVTOOLS=true -VUE_APP_API_URL=http://localhost:8081 +# VUE_APP_API_URL=http://localhost:8081 From f69b94814a5337d608db56128af8379ad2ee946b Mon Sep 17 00:00:00 2001 From: choijh9023 Date: Fri, 31 May 2024 00:17:50 +0900 Subject: [PATCH 099/113] Create follow in StoreReview --- .env.development | 4 +- .env.production | 5 +- src/components/store/ReviewCard.vue | 117 ++++++++++------------------ src/views/store/StoreMain.vue | 42 +++++----- src/views/store/StoreReview.vue | 34 +++++--- 5 files changed, 91 insertions(+), 111 deletions(-) diff --git a/.env.development b/.env.development index 33ac780..97d2968 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,3 @@ -# VUE_APP_API_URL=http://localhost:8081 +VUE_APP_API_URL=http://localhost:8081 VUE_APP_DEVTOOLS=true -VUE_APP_API_URL=http://223.130.155.196:8080/api +# VUE_APP_API_URL=http://223.130.155.196:8080/api diff --git a/.env.production b/.env.production index 13c4e1e..1a3d9ce 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,4 @@ -VUE_APP_API_URL=http://223.130.155.196:8080/api +VUE_APP_API_URL=http://localhost:8081 +# VUE_APP_API_URL=http://223.130.155.196:8080/api VUE_APP_ENABLE_DEVTOOLS=true -# VUE_APP_API_URL=http://localhost:8081 + diff --git a/src/components/store/ReviewCard.vue b/src/components/store/ReviewCard.vue index d5929ca..1468bc7 100644 --- a/src/components/store/ReviewCard.vue +++ b/src/components/store/ReviewCard.vue @@ -18,98 +18,50 @@
{{ review.userNickname }} 리뷰 수 {{ review.reviewcount }} -
- +
+ +
- @@ -171,7 +172,7 @@ - - + \ No newline at end of file diff --git a/src/views/review/ReviewFollowing.vue b/src/views/review/ReviewFollowing.vue index 0d0df26..9dfb0e3 100644 --- a/src/views/review/ReviewFollowing.vue +++ b/src/views/review/ReviewFollowing.vue @@ -10,61 +10,33 @@ -
-