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

修改支付

@@ -88,8 +88,8 @@ @@ -88,8 +88,8 @@
88 <file leaf-file-name="Pay.php" pinned="false" current-in-tab="true"> 88 <file leaf-file-name="Pay.php" pinned="false" current-in-tab="true">
89 <entry file="file://$PROJECT_DIR$/application/api/controller/Pay.php"> 89 <entry file="file://$PROJECT_DIR$/application/api/controller/Pay.php">
90 <provider selected="true" editor-type-id="text-editor"> 90 <provider selected="true" editor-type-id="text-editor">
91 - <state relative-caret-position="450">  
92 - <caret line="344" column="64" lean-forward="false" selection-start-line="344" selection-start-column="64" selection-end-line="344" selection-end-column="64" /> 91 + <state relative-caret-position="129">
  92 + <caret line="195" column="41" lean-forward="true" selection-start-line="195" selection-start-column="41" selection-end-line="195" selection-end-column="41" />
93 <folding> 93 <folding>
94 <element signature="e#574#693#0#PHP" expanded="false" /> 94 <element signature="e#574#693#0#PHP" expanded="false" />
95 <element signature="e#699#1012#0#PHP" expanded="false" /> 95 <element signature="e#699#1012#0#PHP" expanded="false" />
@@ -99,18 +99,19 @@ @@ -99,18 +99,19 @@
99 <element signature="e#5512#5930#0#PHP" expanded="false" /> 99 <element signature="e#5512#5930#0#PHP" expanded="false" />
100 <element signature="e#6179#6269#0#PHP" expanded="false" /> 100 <element signature="e#6179#6269#0#PHP" expanded="false" />
101 <element signature="e#6347#6443#0#PHP" expanded="false" /> 101 <element signature="e#6347#6443#0#PHP" expanded="false" />
102 - <element signature="e#11858#13633#0#PHP" expanded="false" />  
103 - <element signature="e#13706#14126#0#PHP" expanded="false" />  
104 - <element signature="e#21801#22098#0#PHP" expanded="false" />  
105 - <element signature="e#22103#22496#0#PHP" expanded="false" />  
106 - <element signature="e#22523#26001#0#PHP" expanded="false" />  
107 - <element signature="e#26030#28935#0#PHP" expanded="false" />  
108 - <element signature="e#28964#32883#0#PHP" expanded="false" />  
109 - <element signature="e#30935#32372#0#PHP" expanded="false" />  
110 - <element signature="e#31394#32350#0#PHP" expanded="false" />  
111 - <element signature="e#32912#36995#0#PHP" expanded="false" />  
112 - <element signature="e#34762#36510#0#PHP" expanded="false" />  
113 - <element signature="e#37018#37235#0#PHP" expanded="false" /> 102 + <element signature="e#11994#13769#0#PHP" expanded="false" />
  103 + <element signature="e#13842#14262#0#PHP" expanded="false" />
  104 + <element signature="e#14267#21920#0#PHP" expanded="false" />
  105 + <element signature="e#21937#22234#0#PHP" expanded="false" />
  106 + <element signature="e#22239#22632#0#PHP" expanded="false" />
  107 + <element signature="e#22659#26137#0#PHP" expanded="false" />
  108 + <element signature="e#26166#29071#0#PHP" expanded="false" />
  109 + <element signature="e#29100#33019#0#PHP" expanded="false" />
  110 + <element signature="e#31071#32508#0#PHP" expanded="false" />
  111 + <element signature="e#31530#32486#0#PHP" expanded="false" />
  112 + <element signature="e#33048#37131#0#PHP" expanded="false" />
  113 + <element signature="e#34898#36646#0#PHP" expanded="false" />
  114 + <element signature="e#37154#37371#0#PHP" expanded="false" />
114 </folding> 115 </folding>
115 </state> 116 </state>
116 </provider> 117 </provider>
@@ -203,8 +204,8 @@ @@ -203,8 +204,8 @@
203 </component> 204 </component>
204 <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" /> 205 <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
205 <component name="ProjectFrameBounds" extendedState="7"> 206 <component name="ProjectFrameBounds" extendedState="7">
206 - <option name="x" value="124" />  
207 - <option name="y" value="48" /> 207 + <option name="x" value="307" />
  208 + <option name="y" value="132" />
208 <option name="width" value="1700" /> 209 <option name="width" value="1700" />
209 <option name="height" value="1000" /> 210 <option name="height" value="1000" />
210 </component> 211 </component>
@@ -334,7 +335,7 @@ @@ -334,7 +335,7 @@
334 <workItem from="1575541798312" duration="2359000" /> 335 <workItem from="1575541798312" duration="2359000" />
335 <workItem from="1575592025964" duration="640000" /> 336 <workItem from="1575592025964" duration="640000" />
336 <workItem from="1575599624364" duration="95000" /> 337 <workItem from="1575599624364" duration="95000" />
337 - <workItem from="1575680867057" duration="12355000" /> 338 + <workItem from="1575680867057" duration="12522000" />
338 </task> 339 </task>
339 <task id="LOCAL-00001" summary="调试"> 340 <task id="LOCAL-00001" summary="调试">
340 <created>1574145133364</created> 341 <created>1574145133364</created>
@@ -347,7 +348,7 @@ @@ -347,7 +348,7 @@
347 <servers /> 348 <servers />
348 </component> 349 </component>
349 <component name="TimeTrackingManager"> 350 <component name="TimeTrackingManager">
350 - <option name="totallyTimeSpent" value="322254000" /> 351 + <option name="totallyTimeSpent" value="322421000" />
351 </component> 352 </component>
352 <component name="TodoView"> 353 <component name="TodoView">
353 <todo-panel id="selected-file"> 354 <todo-panel id="selected-file">
@@ -360,6 +361,7 @@ @@ -360,6 +361,7 @@
360 </component> 361 </component>
361 <component name="ToolWindowManager"> 362 <component name="ToolWindowManager">
362 <frame x="-8" y="-8" width="1936" height="1056" extended-state="7" /> 363 <frame x="-8" y="-8" width="1936" height="1056" extended-state="7" />
  364 + <editor active="true" />
363 <layout> 365 <layout>
364 <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.1705757" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" /> 366 <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.1705757" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" />
365 <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" /> 367 <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" />
@@ -368,7 +370,7 @@ @@ -368,7 +370,7 @@
368 <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" /> 370 <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" />
369 <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" /> 371 <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" />
370 <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" /> 372 <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" />
371 - <window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.15669206" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> 373 + <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.16685979" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
372 <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" /> 374 <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" />
373 <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" /> 375 <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" />
374 <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" /> 376 <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" />
@@ -855,8 +857,8 @@ @@ -855,8 +857,8 @@
855 </entry> 857 </entry>
856 <entry file="file://$PROJECT_DIR$/application/api/controller/Pay.php"> 858 <entry file="file://$PROJECT_DIR$/application/api/controller/Pay.php">
857 <provider selected="true" editor-type-id="text-editor"> 859 <provider selected="true" editor-type-id="text-editor">
858 - <state relative-caret-position="450">  
859 - <caret line="344" column="64" lean-forward="false" selection-start-line="344" selection-start-column="64" selection-end-line="344" selection-end-column="64" /> 860 + <state relative-caret-position="129">
  861 + <caret line="195" column="41" lean-forward="true" selection-start-line="195" selection-start-column="41" selection-end-line="195" selection-end-column="41" />
860 <folding> 862 <folding>
861 <element signature="e#574#693#0#PHP" expanded="false" /> 863 <element signature="e#574#693#0#PHP" expanded="false" />
862 <element signature="e#699#1012#0#PHP" expanded="false" /> 864 <element signature="e#699#1012#0#PHP" expanded="false" />
@@ -866,18 +868,19 @@ @@ -866,18 +868,19 @@
866 <element signature="e#5512#5930#0#PHP" expanded="false" /> 868 <element signature="e#5512#5930#0#PHP" expanded="false" />
867 <element signature="e#6179#6269#0#PHP" expanded="false" /> 869 <element signature="e#6179#6269#0#PHP" expanded="false" />
868 <element signature="e#6347#6443#0#PHP" expanded="false" /> 870 <element signature="e#6347#6443#0#PHP" expanded="false" />
869 - <element signature="e#11858#13633#0#PHP" expanded="false" />  
870 - <element signature="e#13706#14126#0#PHP" expanded="false" />  
871 - <element signature="e#21801#22098#0#PHP" expanded="false" />  
872 - <element signature="e#22103#22496#0#PHP" expanded="false" />  
873 - <element signature="e#22523#26001#0#PHP" expanded="false" />  
874 - <element signature="e#26030#28935#0#PHP" expanded="false" />  
875 - <element signature="e#28964#32883#0#PHP" expanded="false" />  
876 - <element signature="e#30935#32372#0#PHP" expanded="false" />  
877 - <element signature="e#31394#32350#0#PHP" expanded="false" />  
878 - <element signature="e#32912#36995#0#PHP" expanded="false" />  
879 - <element signature="e#34762#36510#0#PHP" expanded="false" />  
880 - <element signature="e#37018#37235#0#PHP" expanded="false" /> 871 + <element signature="e#11994#13769#0#PHP" expanded="false" />
  872 + <element signature="e#13842#14262#0#PHP" expanded="false" />
  873 + <element signature="e#14267#21920#0#PHP" expanded="false" />
  874 + <element signature="e#21937#22234#0#PHP" expanded="false" />
  875 + <element signature="e#22239#22632#0#PHP" expanded="false" />
  876 + <element signature="e#22659#26137#0#PHP" expanded="false" />
  877 + <element signature="e#26166#29071#0#PHP" expanded="false" />
  878 + <element signature="e#29100#33019#0#PHP" expanded="false" />
  879 + <element signature="e#31071#32508#0#PHP" expanded="false" />
  880 + <element signature="e#31530#32486#0#PHP" expanded="false" />
  881 + <element signature="e#33048#37131#0#PHP" expanded="false" />
  882 + <element signature="e#34898#36646#0#PHP" expanded="false" />
  883 + <element signature="e#37154#37371#0#PHP" expanded="false" />
881 </folding> 884 </folding>
882 </state> 885 </state>
883 </provider> 886 </provider>
@@ -189,6 +189,9 @@ class Pay extends Api @@ -189,6 +189,9 @@ class Pay extends Api
189 } 189 }
190 $money = $res['money'] - $data['total']; 190 $money = $res['money'] - $data['total'];
191 $uid = $this->uid; 191 $uid = $this->uid;
  192 + $login = Db::name('user')
  193 + ->where('id',$uid)
  194 + ->find();
192 // 启动事务 195 // 启动事务
193 Db::startTrans(); 196 Db::startTrans();
194 try{ 197 try{
@@ -199,7 +202,7 @@ class Pay extends Api @@ -199,7 +202,7 @@ class Pay extends Api
199 $pic = Db::name('pic')->field('id,title,url,code')->where('id',$v)->find(); 202 $pic = Db::name('pic')->field('id,title,url,code')->where('id',$v)->find();
200 $str .= "图片标题:$pic[title],云盘地址:$pic[url],提取码:$pic[code],"; 203 $str .= "图片标题:$pic[title],云盘地址:$pic[url],提取码:$pic[code],";
201 //非会员 204 //非会员
202 - if($user['is_vip'] == 0){ 205 + if($login['is_vip'] == 0){
203 $money = $pic['money'] + $pic['price']; 206 $money = $pic['money'] + $pic['price'];
204 Db::name('pic')->where('id',$pic['id'])->update(['buy_num'=>$pic['buy_num']+1,'money'=>$money]); 207 Db::name('pic')->where('id',$pic['id'])->update(['buy_num'=>$pic['buy_num']+1,'money'=>$money]);
205 }else{ 208 }else{