作者 郭盛
1 个管道 的构建 通过 耗费 1 秒

修改购物车

@@ -2,8 +2,8 @@ @@ -2,8 +2,8 @@
2 <project version="4"> 2 <project version="4">
3 <component name="ChangeListManager"> 3 <component name="ChangeListManager">
4 <list default="true" id="e93f11c2-a7d9-4d35-8b1c-8dd18e7f5fef" name="Default" comment=""> 4 <list default="true" id="e93f11c2-a7d9-4d35-8b1c-8dd18e7f5fef" name="Default" comment="">
  5 + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
5 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/application/api/controller/User.php" afterPath="$PROJECT_DIR$/application/api/controller/User.php" /> 6 <change type="MODIFICATION" beforePath="$PROJECT_DIR$/application/api/controller/User.php" afterPath="$PROJECT_DIR$/application/api/controller/User.php" />
6 - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/api.html" afterPath="$PROJECT_DIR$/public/api.html" />  
7 </list> 7 </list>
8 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> 8 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
9 <option name="TRACKING_ENABLED" value="true" /> 9 <option name="TRACKING_ENABLED" value="true" />
@@ -17,8 +17,8 @@ @@ -17,8 +17,8 @@
17 <file leaf-file-name="User.php" pinned="false" current-in-tab="true"> 17 <file leaf-file-name="User.php" pinned="false" current-in-tab="true">
18 <entry file="file://$PROJECT_DIR$/application/api/controller/User.php"> 18 <entry file="file://$PROJECT_DIR$/application/api/controller/User.php">
19 <provider selected="true" editor-type-id="text-editor"> 19 <provider selected="true" editor-type-id="text-editor">
20 - <state relative-caret-position="394">  
21 - <caret line="797" column="19" lean-forward="true" selection-start-line="797" selection-start-column="19" selection-end-line="797" selection-end-column="19" /> 20 + <state relative-caret-position="695">
  21 + <caret line="762" column="43" lean-forward="true" selection-start-line="762" selection-start-column="43" selection-end-line="762" selection-end-column="43" />
22 <folding> 22 <folding>
23 <element signature="e#38#68#0#PHP" expanded="true" /> 23 <element signature="e#38#68#0#PHP" expanded="true" />
24 <element signature="e#337#456#0#PHP" expanded="false" /> 24 <element signature="e#337#456#0#PHP" expanded="false" />
@@ -51,18 +51,18 @@ @@ -51,18 +51,18 @@
51 <element signature="e#21466#21824#0#PHP" expanded="false" /> 51 <element signature="e#21466#21824#0#PHP" expanded="false" />
52 <element signature="e#21829#22019#0#PHP" expanded="false" /> 52 <element signature="e#21829#22019#0#PHP" expanded="false" />
53 <element signature="e#22025#23168#0#PHP" expanded="false" /> 53 <element signature="e#22025#23168#0#PHP" expanded="false" />
54 - <element signature="e#23173#25838#0#PHP" expanded="false" />  
55 - <element signature="e#26429#27864#0#PHP" expanded="false" />  
56 - <element signature="e#27870#28404#0#PHP" expanded="false" />  
57 - <element signature="e#28409#29323#0#PHP" expanded="false" />  
58 - <element signature="e#29329#29860#0#PHP" expanded="false" />  
59 - <element signature="e#29865#30784#0#PHP" expanded="false" />  
60 - <element signature="e#30790#31439#0#PHP" expanded="false" />  
61 - <element signature="e#31444#32317#0#PHP" expanded="false" />  
62 - <element signature="e#32323#32918#0#PHP" expanded="false" />  
63 - <element signature="e#32923#37572#0#PHP" expanded="false" />  
64 - <element signature="e#37578#38144#0#PHP" expanded="false" />  
65 - <element signature="e#38149#40255#0#PHP" expanded="false" /> 54 + <element signature="e#25844#26342#0#PHP" expanded="false" />
  55 + <element signature="e#26347#27434#0#PHP" expanded="false" />
  56 + <element signature="e#27440#27974#0#PHP" expanded="false" />
  57 + <element signature="e#27979#28893#0#PHP" expanded="false" />
  58 + <element signature="e#28899#29430#0#PHP" expanded="false" />
  59 + <element signature="e#29435#30354#0#PHP" expanded="false" />
  60 + <element signature="e#30360#31009#0#PHP" expanded="false" />
  61 + <element signature="e#31014#31887#0#PHP" expanded="false" />
  62 + <element signature="e#31893#32488#0#PHP" expanded="false" />
  63 + <element signature="e#32493#37142#0#PHP" expanded="false" />
  64 + <element signature="e#37148#37714#0#PHP" expanded="false" />
  65 + <element signature="e#37719#39825#0#PHP" expanded="false" />
66 </folding> 66 </folding>
67 </state> 67 </state>
68 </provider> 68 </provider>
@@ -141,9 +141,9 @@ @@ -141,9 +141,9 @@
141 <sorting>DEFINITION_ORDER</sorting> 141 <sorting>DEFINITION_ORDER</sorting>
142 </component> 142 </component>
143 <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" /> 143 <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
144 - <component name="ProjectFrameBounds">  
145 - <option name="x" value="196" />  
146 - <option name="y" value="50" /> 144 + <component name="ProjectFrameBounds" extendedState="1">
  145 + <option name="x" value="201" />
  146 + <option name="y" value="52" />
147 <option name="width" value="1699" /> 147 <option name="width" value="1699" />
148 <option name="height" value="1003" /> 148 <option name="height" value="1003" />
149 </component> 149 </component>
@@ -238,7 +238,7 @@ @@ -238,7 +238,7 @@
238 <workItem from="1574146994475" duration="23222000" /> 238 <workItem from="1574146994475" duration="23222000" />
239 <workItem from="1574209189943" duration="37638000" /> 239 <workItem from="1574209189943" duration="37638000" />
240 <workItem from="1574252363848" duration="8841000" /> 240 <workItem from="1574252363848" duration="8841000" />
241 - <workItem from="1574295812843" duration="9001000" /> 241 + <workItem from="1574295812843" duration="9738000" />
242 </task> 242 </task>
243 <task id="LOCAL-00001" summary="调试"> 243 <task id="LOCAL-00001" summary="调试">
244 <created>1574145133364</created> 244 <created>1574145133364</created>
@@ -251,7 +251,7 @@ @@ -251,7 +251,7 @@
251 <servers /> 251 <servers />
252 </component> 252 </component>
253 <component name="TimeTrackingManager"> 253 <component name="TimeTrackingManager">
254 - <option name="totallyTimeSpent" value="127055000" /> 254 + <option name="totallyTimeSpent" value="127792000" />
255 </component> 255 </component>
256 <component name="TodoView"> 256 <component name="TodoView">
257 <todo-panel id="selected-file"> 257 <todo-panel id="selected-file">
@@ -263,7 +263,8 @@ @@ -263,7 +263,8 @@
263 </todo-panel> 263 </todo-panel>
264 </component> 264 </component>
265 <component name="ToolWindowManager"> 265 <component name="ToolWindowManager">
266 - <frame x="196" y="50" width="1699" height="1003" extended-state="0" /> 266 + <frame x="201" y="52" width="1699" height="1003" extended-state="1" />
  267 + <editor active="true" />
267 <layout> 268 <layout>
268 <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.15253203" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" /> 269 <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.15253203" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" />
269 <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32912987" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" /> 270 <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32912987" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
@@ -272,7 +273,7 @@ @@ -272,7 +273,7 @@
272 <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> 273 <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
273 <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> 274 <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
274 <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> 275 <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
275 - <window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.14896074" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> 276 + <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.14896074" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
276 <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="true" content_ui="tabs" /> 277 <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="true" content_ui="tabs" />
277 <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> 278 <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
278 <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> 279 <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
@@ -315,7 +316,7 @@ @@ -315,7 +316,7 @@
315 </component> 316 </component>
316 <component name="XDebuggerManager"> 317 <component name="XDebuggerManager">
317 <breakpoint-manager> 318 <breakpoint-manager>
318 - <option name="time" value="6" /> 319 + <option name="time" value="7" />
319 </breakpoint-manager> 320 </breakpoint-manager>
320 <watches-manager /> 321 <watches-manager />
321 </component> 322 </component>
@@ -676,8 +677,8 @@ @@ -676,8 +677,8 @@
676 </entry> 677 </entry>
677 <entry file="file://$PROJECT_DIR$/application/api/controller/User.php"> 678 <entry file="file://$PROJECT_DIR$/application/api/controller/User.php">
678 <provider selected="true" editor-type-id="text-editor"> 679 <provider selected="true" editor-type-id="text-editor">
679 - <state relative-caret-position="394">  
680 - <caret line="797" column="19" lean-forward="true" selection-start-line="797" selection-start-column="19" selection-end-line="797" selection-end-column="19" /> 680 + <state relative-caret-position="695">
  681 + <caret line="762" column="43" lean-forward="true" selection-start-line="762" selection-start-column="43" selection-end-line="762" selection-end-column="43" />
681 <folding> 682 <folding>
682 <element signature="e#38#68#0#PHP" expanded="true" /> 683 <element signature="e#38#68#0#PHP" expanded="true" />
683 <element signature="e#337#456#0#PHP" expanded="false" /> 684 <element signature="e#337#456#0#PHP" expanded="false" />
@@ -710,18 +711,18 @@ @@ -710,18 +711,18 @@
710 <element signature="e#21466#21824#0#PHP" expanded="false" /> 711 <element signature="e#21466#21824#0#PHP" expanded="false" />
711 <element signature="e#21829#22019#0#PHP" expanded="false" /> 712 <element signature="e#21829#22019#0#PHP" expanded="false" />
712 <element signature="e#22025#23168#0#PHP" expanded="false" /> 713 <element signature="e#22025#23168#0#PHP" expanded="false" />
713 - <element signature="e#23173#25838#0#PHP" expanded="false" />  
714 - <element signature="e#26429#27864#0#PHP" expanded="false" />  
715 - <element signature="e#27870#28404#0#PHP" expanded="false" />  
716 - <element signature="e#28409#29323#0#PHP" expanded="false" />  
717 - <element signature="e#29329#29860#0#PHP" expanded="false" />  
718 - <element signature="e#29865#30784#0#PHP" expanded="false" />  
719 - <element signature="e#30790#31439#0#PHP" expanded="false" />  
720 - <element signature="e#31444#32317#0#PHP" expanded="false" />  
721 - <element signature="e#32323#32918#0#PHP" expanded="false" />  
722 - <element signature="e#32923#37572#0#PHP" expanded="false" />  
723 - <element signature="e#37578#38144#0#PHP" expanded="false" />  
724 - <element signature="e#38149#40255#0#PHP" expanded="false" /> 714 + <element signature="e#25844#26342#0#PHP" expanded="false" />
  715 + <element signature="e#26347#27434#0#PHP" expanded="false" />
  716 + <element signature="e#27440#27974#0#PHP" expanded="false" />
  717 + <element signature="e#27979#28893#0#PHP" expanded="false" />
  718 + <element signature="e#28899#29430#0#PHP" expanded="false" />
  719 + <element signature="e#29435#30354#0#PHP" expanded="false" />
  720 + <element signature="e#30360#31009#0#PHP" expanded="false" />
  721 + <element signature="e#31014#31887#0#PHP" expanded="false" />
  722 + <element signature="e#31893#32488#0#PHP" expanded="false" />
  723 + <element signature="e#32493#37142#0#PHP" expanded="false" />
  724 + <element signature="e#37148#37714#0#PHP" expanded="false" />
  725 + <element signature="e#37719#39825#0#PHP" expanded="false" />
725 </folding> 726 </folding>
726 </state> 727 </state>
727 </provider> 728 </provider>
@@ -792,7 +792,6 @@ class User extends Api @@ -792,7 +792,6 @@ class User extends Api
792 * 792 *
793 * @ApiParams (name="pic_id", type="inter", required=false, description="图片ID") 793 * @ApiParams (name="pic_id", type="inter", required=false, description="图片ID")
794 * @ApiParams (name="video_id", type="inter", required=false, description="视频ID") 794 * @ApiParams (name="video_id", type="inter", required=false, description="视频ID")
795 - * @ApiParams (name="total", type="float", required=true, description="价格")  
796 * 795 *
797 * 796 *
798 * @ApiReturn({ 797 * @ApiReturn({
@@ -806,16 +805,9 @@ class User extends Api @@ -806,16 +805,9 @@ class User extends Api
806 $user_id = $this->uid; 805 $user_id = $this->uid;
807 $pic_id = $this->request->param('pic_id'); 806 $pic_id = $this->request->param('pic_id');
808 $video_id = $this->request->param('video_id'); 807 $video_id = $this->request->param('video_id');
809 - $total = $this->request->post('total');  
810 - if(empty( $total)){  
811 - $this->error(['code'=>2,'msg'=>'缺少必要参数']);  
812 - }elseif ( $total<=0){  
813 - $this->error(['code'=>3,'msg'=>'非法操作']);  
814 - }  
815 if(empty($pic_id)){ 808 if(empty($pic_id)){
816 $param['video_id'] = $this->request->param('video_id'); 809 $param['video_id'] = $this->request->param('video_id');
817 $param['createtime'] = time(); 810 $param['createtime'] = time();
818 - $param['total'] = $this->request->param('total');  
819 $param['user_id'] = $user_id; 811 $param['user_id'] = $user_id;
820 $data = Db::name('car') 812 $data = Db::name('car')
821 ->insertGetId($param); 813 ->insertGetId($param);
@@ -827,7 +819,6 @@ class User extends Api @@ -827,7 +819,6 @@ class User extends Api
827 }elseif (empty($video_id)){ 819 }elseif (empty($video_id)){
828 $param['pic_id'] = $this->request->param('pic_id'); 820 $param['pic_id'] = $this->request->param('pic_id');
829 $param['createtime'] = time(); 821 $param['createtime'] = time();
830 - $param['total'] = $this->request->param('total');  
831 $param['user_id'] = $user_id; 822 $param['user_id'] = $user_id;
832 $data = Db::name('car') 823 $data = Db::name('car')
833 ->insertGetId($param); 824 ->insertGetId($param);