From 424551fcb2f5e86b77d15ea949388dbd4151b082 Mon Sep 17 00:00:00 2001 From: hchangjae Date: Thu, 28 Nov 2019 23:46:07 +0900 Subject: [PATCH 1/3] add: seperate dev env --- package.json | 5 ++++- src/pages/index.vue | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 20f84bc..3d7ab69 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,10 @@ "restart-dev": "npm run stop-dev && npm run start-dev", "start-dev-hcj": "pm2 start npm --name 'web-dev-hcj' -- run dev-hcj", "stop-dev-hcj": "pm2 delete web-dev-hcj", - "restart-dev-hcj": "npm run stop-dev-hcj && npm run start-dev-hcj" + "restart-dev-hcj": "npm run stop-dev-hcj && npm run start-dev-hcj", + "start-dev-wsj": "pm2 start npm --name 'web-dev-wsj' -- run dev-wsj", + "stop-dev-wsj": "pm2 delete web-dev-wsj", + "restart-dev-wsj": "npm run stop-dev-wsj && npm run start-dev-wsj" }, "dependencies": { "axios": "^0.19.0", diff --git a/src/pages/index.vue b/src/pages/index.vue index 784df77..748096b 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -10,7 +10,7 @@
{{ quiz.title }}
-
{{ quiz.money }}
+
{{ quiz.money }} ₩
From ccd22adbd5320c73d6360ae571bd26cacacdca2c Mon Sep 17 00:00:00 2001 From: hchangjae Date: Thu, 28 Nov 2019 23:47:19 +0900 Subject: [PATCH 2/3] fix: add 3020 port --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 3d7ab69..d8e4fa8 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "scripts": { "dev": "cross-env HOST=0.0.0.0 PORT=3000 nuxt", "dev-hcj": "cross-env HOST=0.0.0.0 PORT=3010 nuxt", + "dev-wsj": "cross-env HOST=0.0.0.0 PORT=3020 nuxt", "build": "nuxt build", "start": "nuxt start", "generate": "nuxt generate", From 3953e5320b8795f1d1682b52804d55a3fc041ddd Mon Sep 17 00:00:00 2001 From: hchangjae Date: Thu, 28 Nov 2019 23:54:39 +0900 Subject: [PATCH 3/3] feature: complete infinite scroll --- src/pages/index.vue | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/pages/index.vue b/src/pages/index.vue index 748096b..80a3577 100644 --- a/src/pages/index.vue +++ b/src/pages/index.vue @@ -159,7 +159,6 @@ export default { await axios.post(url, body) }, async moreComments(){ - console.log('more') this.busy = true const url = `${this.baseURL['db']}/comment/more` const body = { @@ -171,9 +170,16 @@ export default { this.loading = true const result = await axios.get(url, body) this.loading = false - this.comments = this.comments.concat(result.data) - this.numOfComments += 20 - this.busy = false + if(result.data.length != 0){ + this.comments = this.comments.concat(result.data) + this.numOfComments += 20 + this.busy = false + } + else{ + setTimeout(()=>{ + this.busy = false + },10000) + } }, async postAnswer(){ const url = `${this.baseURL['db']}/quiz/${this.quiz.quizID}/${this.answerTextarea}`