Commit 332ee410 authored by 박상호's avatar 박상호 🎼
Browse files

Merge remote-tracking branch 'origin/jiwon' into sangho

parents e6a926ac 523a4677
......@@ -210,6 +210,7 @@ function Payment({ match, location }) {
cancel_url: 'http://localhost:3000/shoppingcart',
})
})
console.log(response.data)
const data = await response.json()
window.location.href = data.redirect_url
} else {
......@@ -313,7 +314,7 @@ function Payment({ match, location }) {
{paymentWay}
</div>
<div className="text-center">
<Button type="button" onClick={paymentCompleted} className="px-5" style={{ background: "#91877F", borderColor: '#91877F' }} block>결제완료</Button>
<Button type="button" onClick={paymentCompleted} className="px-5" style={{ background: "#91877F", borderColor: '#91877F' }} block>주문하기</Button>
</div>
</Container>
)
......
......@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react';
import axios from 'axios';
import { isAuthenticated } from '../utils/auth';
import catchErrors from '../utils/catchErrors';
import { Card, Row, Col, Button } from 'react-bootstrap';
import { Card, Row, Col, Button, Container } from 'react-bootstrap';
function PaymentCompleted() {
const user = isAuthenticated()
......@@ -30,7 +30,7 @@ function PaymentCompleted() {
}
return (
<div>
<Container>
<div className="mx-3 my-5 text-center px-3 py-4 border">
<div className="mb-1">
<h5 className=" font-weight-bold" style={{ display: 'inline' }}>고객님의 </h5>
......@@ -84,7 +84,7 @@ function PaymentCompleted() {
<Button href="/" className="mx-1" style={{ background: "#91877F", borderColor: '#91877F', width: "7rem" }}>홈으로</Button>
<Button href="/account" className="mx-1" style={{ background: "#91877F", borderColor: '#91877F', width: "7rem" }}>마이페이지</Button>
</div>
</div>
</Container>
)
}
......
......@@ -272,7 +272,7 @@ function Product({ match, location }) {
</Col>
</Row>
<Row className="justify-content-center mx-0 pt-3 px-2" style={{ position: "fixed", bottom: "0", width: "100%", backgroundColor: "#fff" }}>
<Col sm={12} md={9}>
<Col sm={12} md={8}>
<h6 style={{ borderBottom: "1px solid", paddingBottom: "5px", marginBottom: "1em" }}>회원님이 선호할만한 상품 추천
<a className="close float-right" onClick={(e) => handleClick(e)} style={{ fontSize: "1rem", cursor: "pointer" }}>X</a>
</h6>
......
......@@ -97,38 +97,13 @@ function ProductsList({ match }) {
}
async function handleSort(method) {
// const response = await axios.get(`/api/product/sortingproduct/sub?subname=${}&page=${currentPage}&sorting=${method}`)
if (method === "purchase") {
productlist.sort(function (a, b) {
if (a.purchase > b.purchase) {
return -1;
}
if (a.purchase < b.purchase) {
return 1;
}
return 0;
});
setSortingName("인기상품")
} else if (method === "newest") {
productlist.sort(function (a, b) {
if (a.createdAt > b.createdAt) {
return -1;
}
if (a.createdAt < b.createdAt) {
return 1;
}
return 0;
});
setSortingName("신상품")
} else if (method === "lowest") {
productlist.sort(function (a, b) {
if (a.price > b.price) {
return 1;
}
if (a.price < b.price) {
return -1;
}
return 0;
});
setSortingName("낮은가격")
} else {
productlist.sort(function (a, b) {
......
[{
"_id": {
"$oid": "6013ede5cb134f5168612014"
},
"userId": {
"$oid": "6013ede5cb134f5168612013"
},
"products": [],
"__v": 0
},{
"_id": {
"$oid": "6013ef22cb134f5168612016"
},
"userId": {
"$oid": "6013ef22cb134f5168612015"
},
"products": [],
"__v": 0
},{
"_id": {
"$oid": "6013ef67cb134f5168612018"
},
"userId": {
"$oid": "6013ef67cb134f5168612017"
},
"products": [],
"__v": 0
},{
"_id": {
"$oid": "6013f00ccb134f516861201a"
},
"userId": {
"$oid": "6013f00ccb134f5168612019"
},
"products": [],
"__v": 0
}]
\ No newline at end of file
[{
"_id": {
"$oid": "60012520ef00cccb01601824"
},
"DRESS": [
"LONG DRESS",
"SHORT DRESS",
"KNIT DRESS",
"SHIRT DRESS",
"PATTERN DRESS",
"BUSTIER DRESS",
"TWO-PIECE DRESS"
],
"OUTER": [
"PADDED JACKET",
"JACKET",
"JUMPER",
"COAT",
"FLEECE",
"CARDIGAN / VEST"
],
"TOP": [
"KNIT",
"HOODY",
"BLOUSE",
"SHIRT",
"SWEATSHIRT",
"LONG SLEEVE SHIRT",
"SHORT SLEEVE / SLEEVELESS SHIRT"
],
"PANTS": [
"JEANS",
"SKINNY JEANS",
"BANDING PANTS",
"WIDE-FIT PANTS",
"BOOT-CUT PANTS",
"STRAIGHT-FIT PANTS",
"SHORTS",
"TROUSERS",
"LEGGINGS",
"JUMPSUIT / OVERALLS"
],
"SKIRT": [
"LONG SKIRT",
"MIDI SKIRT",
"MINI SKIRT"
],
"SHOES": [
"SNEAKERS / SLIP-ON",
"FLAT / LOAFER",
"HEEL / PUMP",
"BOOTS",
"SANDAL / SLIPPER"
]
}]
\ No newline at end of file
This diff is collapsed.
[{
"_id": {
"$oid": "6013ede5cb134f5168612013"
},
"role": "admin",
"name": "관리자",
"number1": "010101",
"number2": "4",
"id": "admin0000",
"password": "$2a$10$3iEijIPm8n/1qV92M/Imp.rZyYuKeitttUfJJ.IxBlTC.ovaEDA.S",
"tel": "010-1234-1234",
"email": "admin0000@naver.com",
"createdAt": {
"$date": "2021-01-29T11:13:41.499Z"
},
"updatedAt": {
"$date": "2021-01-29T11:13:41.499Z"
},
"__v": 0
},{
"_id": {
"$oid": "6013ef22cb134f5168612015"
},
"role": "user",
"name": "윤지원",
"number1": "991027",
"number2": "2",
"id": "jiwon5393",
"password": "$2a$10$mfdd/qO1Q6tKZfEo4asVse5acFOKBZDsRWNg.Ff0jzpnG4Jamr8cG",
"tel": "010-5134-5825",
"email": "jiwon5393@naver.com",
"createdAt": {
"$date": "2021-01-29T11:18:58.844Z"
},
"updatedAt": {
"$date": "2021-01-29T11:18:58.844Z"
},
"__v": 0
},{
"_id": {
"$oid": "6013ef67cb134f5168612017"
},
"role": "user",
"name": "김수빈",
"number1": "991025",
"number2": "2",
"id": "ksbin1025",
"password": "$2a$10$IbM9GhPOQm0TQtwYgXmzueR4jP29h530JM73cKuNj...ON/rUO5Rm",
"tel": "010-8310-0170",
"email": "ksbin1025@korea.ac.kr",
"createdAt": {
"$date": "2021-01-29T11:20:07.945Z"
},
"updatedAt": {
"$date": "2021-01-29T11:20:07.945Z"
},
"__v": 0
},{
"_id": {
"$oid": "6013f00ccb134f5168612019"
},
"role": "user",
"name": "이재연",
"number1": "000428",
"number2": "4",
"id": "wodus2854",
"password": "$2a$10$U8Fr883V2UdwYwog0eojh.xzz/CoAKEq8yZnFHgyfAXx4mnVHfcLe",
"tel": "010-2854-4649",
"email": "wodus2854@naver.com",
"createdAt": {
"$date": "2021-01-29T11:22:52.944Z"
},
"updatedAt": {
"$date": "2021-01-29T11:22:52.944Z"
},
"__v": 0
}]
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment