This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 브라우저 뒤로가기 눌렀을 때 발생하는 이벤트 | |
| addEventListeners() { | |
| window.onpopstate = () => { | |
| this.isLoungeVisible = false | |
| window.scrollTo(0, this.scrollY) | |
| } | |
| }, | |
| fetchLounges() { | |
| const options = { | |
| method: 'get', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module.exports = session => { | |
| const RedisStore = require('connect-redis')(session) | |
| const { REDIS_HOST, REDIS_PORT, REDIS_SECRET } = process.env | |
| return { | |
| resave: false, | |
| saveUninitialized: false, | |
| secret: REDIS_SECRET || 'YOUR_SERCERT_KEY', | |
| name: 'YOUR_REDIS_NAME', | |
| cookie: { httpOnly: true, secure: false }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const AWS = require('aws-sdk') | |
| AWS.config.update({ | |
| region: process.env.AWS_REGION || 'ap-northeast-2', | |
| accessKeyId: process.env.AWS_ACCESS_KEY, | |
| secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY | |
| }) | |
| const s3 = new AWS.S3() | |
| module.exports = s3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| DATE_FORMAT(r.createdDate, '%Y%m%d') AS date, | |
| count(r.id) AS total | |
| FROM | |
| reviews r | |
| WHERE | |
| DATE_FORMAT(r.createdDate, '%Y%m%d') > DATE_ADD(NOW(), INTERVAL -7 DAY) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const nFormatter = (num, digits) => { | |
| const si = [ | |
| { value: 1, symbol: '' }, | |
| { value: 1e3, symbol: 'k' }, | |
| { value: 1e6, symbol: 'M' }, | |
| { value: 1e9, symbol: 'G' }, | |
| { value: 1e12, symbol: 'T' }, | |
| { value: 1e15, symbol: 'P' }, | |
| { value: 1e18, symbol: 'E' } | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function setFixedContainer() { | |
| const handleScroll = () => { | |
| const $container = this.$refs.contactSupplier | |
| const { y } = $container.getBoundingClientRect() | |
| console.log(y) | |
| } | |
| window.addEventListener('scroll', handleScroll) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <template> | |
| <textarea | |
| id="textarea" | |
| :placeholder="placeholder" | |
| :value="value" | |
| name="textarea" | |
| @input="input($event.target.value)"/> | |
| </template> | |
| <script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const serialize = obj => { | |
| return ( | |
| '?' + | |
| Object.keys(obj) | |
| .reduce(function(a, k) { | |
| a.push(k + '=' + encodeURIComponent(obj[k])) | |
| return a | |
| }, []) | |
| .join('&') | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| l3.id AS locationId, | |
| l1.name AS name1, | |
| l2.name AS name2, | |
| l3.name AS name3, | |
| CONCAT_WS(" ", l1.name, l2.name, l3.name) AS location | |
| FROM | |
| static_locations l1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| LEFT JOIN | |
| news n | |
| ON | |
| n.salonId = s.id AND | |
| n.date = ( | |
| SELECT | |
| MAX(date) | |
| FROM | |
| news | |
| WHERE |
NewerOlder