api test complete
Showing
3 changed files
with
151 additions
and
6 deletions
This diff is collapsed.
Click to expand it.
... | @@ -89,7 +89,7 @@ if (! class_exists("ApiStatic")){ | ... | @@ -89,7 +89,7 @@ if (! class_exists("ApiStatic")){ |
89 | //탑차 분류별 리스트 | 89 | //탑차 분류별 리스트 |
90 | function getListOfVehicle(){ | 90 | function getListOfVehicle(){ |
91 | $vehicleType=$this->req["vehicleType"]; | 91 | $vehicleType=$this->req["vehicleType"]; |
92 | 92 | $vehicleType="IS"; | |
93 | $sql=" | 93 | $sql=" |
94 | SELECT vehicleNo, name, imgPathVehicle | 94 | SELECT vehicleNo, name, imgPathVehicle |
95 | FROM tblVehicle | 95 | FROM tblVehicle |
... | @@ -103,13 +103,14 @@ if (! class_exists("ApiStatic")){ | ... | @@ -103,13 +103,14 @@ if (! class_exists("ApiStatic")){ |
103 | //탑차 정보 | 103 | //탑차 정보 |
104 | function getInfoOfVehicle(){ | 104 | function getInfoOfVehicle(){ |
105 | $vehicleNo=$this->req["vehicleNo"]; | 105 | $vehicleNo=$this->req["vehicleNo"]; |
106 | 106 | $vehicleNo=1; | |
107 | echo $vehicleNo; | ||
107 | $sql=" | 108 | $sql=" |
108 | SELECT * | 109 | SELECT * |
109 | FROM tblVehicle | 110 | FROM tblVehicle |
110 | WHERE vehicleNo='{$vehicleNo}' | 111 | WHERE vehicleNo='{$vehicleNo}' |
111 | "; | 112 | "; |
112 | $reusult=$this->getRow($sql); | 113 | $result=$this->getRow($sql); |
113 | return $this->makeResultJson("1", "", $result); | 114 | return $this->makeResultJson("1", "", $result); |
114 | } | 115 | } |
115 | 116 | ... | ... |
... | @@ -10,6 +10,16 @@ | ... | @@ -10,6 +10,16 @@ |
10 | $event = $obj2->getListOfEvent(); | 10 | $event = $obj2->getListOfEvent(); |
11 | $board = $obj2->getListOfBoard(); | 11 | $board = $obj2->getListOfBoard(); |
12 | $comment= $obj2->getInfoOfBoard(); | 12 | $comment= $obj2->getInfoOfBoard(); |
13 | $CS = $obj2->getListOfCS(); | ||
14 | $CSInfo = $obj2->getInfoOfCS(); | ||
15 | $AS = $obj2->getListOfCompany(); | ||
16 | $ASInfo = $obj2->getInfoOfCompany(); | ||
17 | $myProductionSpec=$obj2->getListOfMyProductionSpec(); | ||
18 | $productionSpec=$obj2->getListOfProductionSpec(); | ||
19 | $productionSpecInfo=$obj2->getInfoOfProductionSpec(); | ||
20 | $vehicleList=$obj->getListOfVehicle(); | ||
21 | $vehicleInfo=$obj->getInfoOfVehicle(); | ||
22 | |||
13 | 23 | ||
14 | //$vnum = $obj->virtualNum ; | 24 | //$vnum = $obj->virtualNum ; |
15 | ?> | 25 | ?> |
... | @@ -58,11 +68,105 @@ $(document).ready(function(){ | ... | @@ -58,11 +68,105 @@ $(document).ready(function(){ |
58 | async : false, | 68 | async : false, |
59 | cache : false, | 69 | cache : false, |
60 | data:{ | 70 | data:{ |
61 | "commentType" : "FB", | 71 | "commentType" : "CS", |
62 | "targetFk" : 1, | 72 | "targetFk" : 2, |
63 | "userFk" : 1, | 73 | "userFk" : 1, |
64 | "content" : "세 번째 부모" | 74 | "content" : "test 대댓글2", |
75 | "parentNo" : 62 | ||
76 | }, | ||
77 | success : function(data){ | ||
78 | alert(data.returnmessage); | ||
79 | }, | ||
80 | error : function(req, res, error){ | ||
81 | alert(req+res+error); | ||
82 | } | ||
83 | }); | ||
84 | }) ; | ||
65 | 85 | ||
86 | $(".saveBoard").click2(function(){ | ||
87 | $.ajax({ | ||
88 | type: 'post', | ||
89 | url : "/action_front.php?cmd=ApiBoard.saveBoard", | ||
90 | async : false, | ||
91 | cache : false, | ||
92 | data:{ | ||
93 | "title" : "제목제목제목", | ||
94 | "userFk" : 1, | ||
95 | "imgPathBoard1" : "경로1", | ||
96 | "imgPathBoard2" : "경로2", | ||
97 | "imgPathBoard3" : "경로3", | ||
98 | "content" : "내용내용내용" | ||
99 | }, | ||
100 | success : function(data){ | ||
101 | alert(data.returnmessage); | ||
102 | }, | ||
103 | error : function(req, res, error){ | ||
104 | alert(req+res+error); | ||
105 | } | ||
106 | }); | ||
107 | }) ; | ||
108 | |||
109 | $(".saveCS").click2(function(){ | ||
110 | $.ajax({ | ||
111 | type: 'post', | ||
112 | url : "/action_front.php?cmd=ApiBoard.saveCS", | ||
113 | async : false, | ||
114 | cache : false, | ||
115 | data:{ | ||
116 | "title" : "제목제목제목", | ||
117 | "userFk" : 1, | ||
118 | "imgPathBoard1" : "경로1", | ||
119 | "imgPathBoard2" : "경로2", | ||
120 | "imgPathBoard3" : "경로3", | ||
121 | "content" : "내용내용내용" | ||
122 | }, | ||
123 | success : function(data){ | ||
124 | alert(data.returnmessage); | ||
125 | }, | ||
126 | error : function(req, res, error){ | ||
127 | alert(req+res+error); | ||
128 | } | ||
129 | }); | ||
130 | }) ; | ||
131 | |||
132 | $(".saveProductionSpec").click2(function(){ | ||
133 | $.ajax({ | ||
134 | type: 'post', | ||
135 | url : "/action_front.php?cmd=ApiBoard.saveProductionSpec", | ||
136 | async : false, | ||
137 | cache : false, | ||
138 | data:{ | ||
139 | "userFk" : 1, | ||
140 | "requestDate" : "2017-10-18", | ||
141 | "companyName" : "리치", | ||
142 | "vehicleTON" : "123123", | ||
143 | "vehicleText" : "vehicleText", | ||
144 | "vehicleType" : "HY", | ||
145 | "productName" : "wtf", | ||
146 | "telephone" : "01001011", | ||
147 | "managerFk" : "1", | ||
148 | "type" : "R", | ||
149 | "internalLength" : 108, | ||
150 | "internalHeight" : 120, | ||
151 | "internalWidth" : 32, | ||
152 | "alCoil" : "G", | ||
153 | "floor" : "C", | ||
154 | "floorValue" : 22, | ||
155 | "tent" : 0, | ||
156 | "sideBoard" : 1, | ||
157 | "windStopper" : 1, | ||
158 | "freezer" : 0, | ||
159 | "gate" : 2, | ||
160 | "load" : "S", | ||
161 | "eTrackGate" : 0, | ||
162 | "eTrackWing" : 1, | ||
163 | "turnBuckle" : "rkskek", | ||
164 | "toolBucket" : 2, | ||
165 | "bumberFootHold" : 1, | ||
166 | "wingProtector" : 2, | ||
167 | "axis" : 1, | ||
168 | "axisValue" : "302", | ||
169 | "specialAddition" : "special" | ||
66 | }, | 170 | }, |
67 | success : function(data){ | 171 | success : function(data){ |
68 | alert(data.returnmessage); | 172 | alert(data.returnmessage); |
... | @@ -124,6 +228,9 @@ $(document).ready(function(){ | ... | @@ -124,6 +228,9 @@ $(document).ready(function(){ |
124 | <div id="Contents" class="notice" style="width:1000px;" > | 228 | <div id="Contents" class="notice" style="width:1000px;" > |
125 | <form name=test1 method=POST> | 229 | <form name=test1 method=POST> |
126 | <span class="button bigrounded blue saveComment btnleft_y">댓글 저장 </span> | 230 | <span class="button bigrounded blue saveComment btnleft_y">댓글 저장 </span> |
231 | <span class="button bigrounded blue saveBoard btnleft_y">게시물 저장 </span> | ||
232 | <span class="button bigrounded blue saveCS btnleft_y">고객센터 게시물 저장 </span> | ||
233 | <span class="button bigrounded blue saveProductionSpec btnleft_y">제작사양서 저장 </span> | ||
127 | </form> | 234 | </form> |
128 | <div class="data"> | 235 | <div class="data"> |
129 | <table class="datacList" id="datacList"> | 236 | <table class="datacList" id="datacList"> |
... | @@ -157,6 +264,43 @@ $(document).ready(function(){ | ... | @@ -157,6 +264,43 @@ $(document).ready(function(){ |
157 | <td class="center">Comment</td> | 264 | <td class="center">Comment</td> |
158 | <td class=""><?echo $comment;?></td> | 265 | <td class=""><?echo $comment;?></td> |
159 | </tr> | 266 | </tr> |
267 | <tr> | ||
268 | <td class="center">CS</td> | ||
269 | <td class=""><?echo $CS;?></td> | ||
270 | </tr> | ||
271 | <tr> | ||
272 | <td class="center">CSInfo</td> | ||
273 | <td class=""><?echo $CSInfo;?></td> | ||
274 | </tr> | ||
275 | <tr> | ||
276 | <td class="center">AS</td> | ||
277 | <td class=""><?echo $AS;?></td> | ||
278 | </tr> | ||
279 | <tr> | ||
280 | <td class="center">ASInfo</td> | ||
281 | <td class=""><?echo $ASInfo;?></td> | ||
282 | </tr> | ||
283 | |||
284 | <tr> | ||
285 | <td class="center">MyProductionSpec</td> | ||
286 | <td class=""><?echo $myProductionSpec;?></td> | ||
287 | </tr> | ||
288 | <tr> | ||
289 | <td class="center">ProductionSpecList</td> | ||
290 | <td class=""><?echo $productionSpec;?></td> | ||
291 | </tr> | ||
292 | <tr> | ||
293 | <td class="center">ProductionSpecInfo</td> | ||
294 | <td class=""><?echo $productionSpecInfo;?></td> | ||
295 | </tr> | ||
296 | <tr> | ||
297 | <td class="center">vehicleList</td> | ||
298 | <td class=""><?echo $vehicleList;?></td> | ||
299 | </tr> | ||
300 | <tr> | ||
301 | <td class="center">vehicleInfo</td> | ||
302 | <td class=""><?echo $vehicleInfo;?></td> | ||
303 | </tr> | ||
160 | </table> | 304 | </table> |
161 | </div> | 305 | </div> |
162 | <br> | 306 | <br> | ... | ... |
-
Please register or sign in to post a comment