김예미

Edit Template 2

Showing 1 changed file with 31 additions and 18 deletions
...@@ -15,21 +15,21 @@ exports.greetingTemplate = () => { ...@@ -15,21 +15,21 @@ exports.greetingTemplate = () => {
15 "title":greetingTitle[0], 15 "title":greetingTitle[0],
16 "payload":"CHOICE_BY_PROF", 16 "payload":"CHOICE_BY_PROF",
17 "stat":"stat_0", 17 "stat":"stat_0",
18 - "rate":{}; 18 + "rate":{}
19 }, 19 },
20 { 20 {
21 "type":"postback", 21 "type":"postback",
22 "title":greetingTitle[1], 22 "title":greetingTitle[1],
23 - "payload":"CHOICE_BY_LECT" 23 + "payload":"CHOICE_BY_LECT",
24 "stat":"stat_0", 24 "stat":"stat_0",
25 - "rate":{}; 25 + "rate":{}
26 }, 26 },
27 { 27 {
28 "type":"postback", 28 "type":"postback",
29 "title":greetingTitle[2], 29 "title":greetingTitle[2],
30 - "payload":"HELP" 30 + "payload":"HELP",
31 "stat":"stat_0", 31 "stat":"stat_0",
32 - "rate":{}; 32 + "rate":{}
33 } 33 }
34 ] 34 ]
35 } 35 }
...@@ -39,44 +39,57 @@ exports.greetingTemplate = () => { ...@@ -39,44 +39,57 @@ exports.greetingTemplate = () => {
39 39
40 //payload === 'CHOICE_BY_PROF' 40 //payload === 'CHOICE_BY_PROF'
41 exports.getProfNameTemplate = (received) => { 41 exports.getProfNameTemplate = (received) => {
42 - 42 + return {
43 + "attachment":{
44 + "type":"template",
45 + "payload":{
46 + "template_type":"button",
47 + "text": "교수명을 입력하세요.",
48 + "buttons":[
49 + {
50 + "type":"postback",
51 + "title":"처음으로",
52 + "payload":'Greeting',
53 + "stat": 'stat_0',
54 + "rate":{}
55 + }
56 + ]
57 + }
58 + }
59 + }
43 } 60 }
44 61
45 exports.choiceLectOfProfTemplate = (received) => { 62 exports.choiceLectOfProfTemplate = (received) => {
46 - 63 +//메세지
47 } 64 }
48 65
49 exports.rateTemplate = (received) => { 66 exports.rateTemplate = (received) => {
50 - 67 +//버튼
51 } 68 }
52 69
53 //payload === 'CHOICE_BY_LECT' 70 //payload === 'CHOICE_BY_LECT'
54 exports.getLectNameTemplate = (received) => { 71 exports.getLectNameTemplate = (received) => {
55 - 72 +//버튼
56 } 73 }
57 74
58 exports.choiceLectTemplate= (received) => { 75 exports.choiceLectTemplate= (received) => {
59 - 76 +//메세지
60 } 77 }
61 78
62 exports.choiceProfOfLectTemplate= (received) => { 79 exports.choiceProfOfLectTemplate= (received) => {
63 - 80 +//버튼
64 -}
65 -
66 -exports.rateTemplate= (received) => {
67 -
68 } 81 }
69 82
70 exports.goToChoiceByProfTemplate= (received) => { 83 exports.goToChoiceByProfTemplate= (received) => {
71 - 84 +//버튼
72 } 85 }
73 86
74 //payload === 'HELP' 87 //payload === 'HELP'
75 exports.howToTemplate= (received) => { 88 exports.howToTemplate= (received) => {
76 - 89 +//버튼
77 } 90 }
78 91
79 exports.goToGreetTemplate = (received) => { 92 exports.goToGreetTemplate = (received) => {
80 - 93 +//버튼
81 } 94 }
82 95
......