윤준석

FIX: rich menu and set default

...@@ -69,7 +69,7 @@ function handleEvent(event) { ...@@ -69,7 +69,7 @@ function handleEvent(event) {
69 }) 69 })
70 ); 70 );
71 } 71 }
72 - } else if (event.postback.data == "check") { 72 + } else if (event.postback.data == "checkItems") {
73 return Promise.resolve( 73 return Promise.resolve(
74 client.replyMessage(event.replyToken, { 74 client.replyMessage(event.replyToken, {
75 type: "flex", 75 type: "flex",
...@@ -165,52 +165,83 @@ module.exports = { handleEvent, config }; ...@@ -165,52 +165,83 @@ module.exports = { handleEvent, config };
165 165
166 /*리치메뉴 설정*/ 166 /*리치메뉴 설정*/
167 // let richMenu = { 167 // let richMenu = {
168 -// size: { 168 +// size: {
169 -// width: 2500, 169 +// width: 2006,
170 -// height: 843, 170 +// height: 827,
171 -// },
172 -// selected: false,
173 -// name: "Nice richmenu",
174 -// chatBarText: "Tap to open",
175 -// areas: [
176 -// {
177 -// bounds: {
178 -// x: 0,
179 -// y: 0,
180 -// width: 1250,
181 -// height: 843,
182 -// },
183 -// action: {
184 -// type: "postback",
185 -// label: "new",
186 -// data: "new",
187 -// displayText: "키워드 등록",
188 -// inputOption: "openKeyboard",
189 -// fillInText: "",
190 -// },
191 // }, 171 // },
192 -// { 172 +// selected: false,
193 -// bounds: { 173 +// name: "Real richMenu",
194 -// x: 1250, 174 +// chatBarText: "메뉴 열기",
195 -// y: 0, 175 +// areas: [
196 -// width: 1250, 176 +// {
197 -// height: 843, 177 +// bounds: {
198 -// }, 178 +// x: 0,
199 -// action: { 179 +// y: 0,
200 -// type: "postback", 180 +// width: 1003,
201 -// label: "check", 181 +// height: 413,
202 -// data: "check", 182 +// },
203 -// displayText: "최신 매물 확인", 183 +// action: {
204 -// inputOption: "openKeyboard", 184 +// type: "postback",
205 -// fillInText: "", 185 +// label: "new",
206 -// }, 186 +// data: "new",
207 -// }, 187 +// displayText: "키워드 추가",
208 -// ], 188 +// inputOption: "openKeyboard",
189 +// fillInText: "",
190 +// },
191 +// },
192 +// {
193 +// bounds: {
194 +// x: 1003,
195 +// y: 0,
196 +// width: 1003,
197 +// height: 413,
198 +// },
199 +// action: {
200 +// type: "postback",
201 +// label: "check",
202 +// data: "check",
203 +// displayText: "키워드 삭제",
204 +// inputOption: "openKeyboard",
205 +// fillInText: "",
206 +// },
207 +// },
208 +// {
209 +// bounds: {
210 +// x: 0,
211 +// y: 413,
212 +// width: 1003,
213 +// height: 414,
214 +// },
215 +// action: {
216 +// type: "postback",
217 +// label: "checkKeyword",
218 +// data: "checkKeyword",
219 +// displayText: "키워드 확인",
220 +// },
221 +// },
222 +// {
223 +// bounds: {
224 +// x: 1003,
225 +// y: 413,
226 +// width: 1003,
227 +// height: 414,
228 +// },
229 +// action: {
230 +// type: "postback",
231 +// label: "checkItems",
232 +// data: "checkItems",
233 +// displayText: "매물 즉시 검색",
234 +// },
235 +// },
236 +// ],
209 // }; 237 // };
210 -//// 등록 238 +
211 -// client.createRichMenu(richMenu).then((richMenuId) => console.log(richMenuId)); 239 +// 등록
240 +// client.createRichMenu(richMenu).then((richMenuId) => {
241 +// console.log(richMenuId)
242 +// });
212 // client.setRichMenuImage( 243 // client.setRichMenuImage(
213 -// "richmenu-183eff606f059b8244f0a625b54bddf1", 244 +// "richmenu-754798c14b181701c64cd7f0d37f52ec",
214 -// fs.createReadStream("./static/img/richMenu.jpg") 245 +// fs.createReadStream("./static/img/richMenu.png")
215 -// ); 246 +// );
216 -// client.setDefaultRichMenu("richmenu-183eff606f059b8244f0a625b54bddf1"); 247 +//client.setDefaultRichMenu("richmenu-754798c14b181701c64cd7f0d37f52ec");
......