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

修改短信

... ... @@ -27,69 +27,69 @@
<file leaf-file-name="UserController.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/api/index/controller/UserController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="325">
<caret line="84" column="15" lean-forward="true" selection-start-line="84" selection-start-column="15" selection-end-line="84" selection-end-column="15" />
<state relative-caret-position="453">
<caret line="52" column="44" lean-forward="false" selection-start-line="52" selection-start-column="44" selection-end-line="52" selection-end-column="44" />
<folding>
<element signature="e#1491#1720#0#PHP" expanded="false" />
<element signature="e#3368#3608#0#PHP" expanded="false" />
<element signature="e#3613#3848#0#PHP" expanded="false" />
<element signature="e#3854#4201#0#PHP" expanded="false" />
<element signature="e#4206#4652#0#PHP" expanded="false" />
<element signature="e#4658#4918#0#PHP" expanded="false" />
<element signature="e#4923#5124#0#PHP" expanded="false" />
<element signature="e#5130#5392#0#PHP" expanded="false" />
<element signature="e#5397#5602#0#PHP" expanded="false" />
<element signature="e#5608#6087#0#PHP" expanded="false" />
<element signature="e#6092#8211#0#PHP" expanded="false" />
<element signature="e#8234#8765#0#PHP" expanded="false" />
<element signature="e#8771#9051#0#PHP" expanded="false" />
<element signature="e#9056#9448#0#PHP" expanded="false" />
<element signature="e#9454#9738#0#PHP" expanded="false" />
<element signature="e#9743#10782#0#PHP" expanded="false" />
<element signature="e#10788#11076#0#PHP" expanded="false" />
<element signature="e#11081#12116#0#PHP" expanded="false" />
<element signature="e#12122#12703#0#PHP" expanded="false" />
<element signature="e#12708#14096#0#PHP" expanded="false" />
<element signature="e#14102#14558#0#PHP" expanded="false" />
<element signature="e#14563#16526#0#PHP" expanded="false" />
<element signature="e#16549#16904#0#PHP" expanded="false" />
<element signature="e#16910#17623#0#PHP" expanded="false" />
<element signature="e#17628#19085#0#PHP" expanded="false" />
<element signature="e#19091#19552#0#PHP" expanded="false" />
<element signature="e#19557#22579#0#PHP" expanded="false" />
<element signature="e#22585#23194#0#PHP" expanded="false" />
<element signature="e#23199#24484#0#PHP" expanded="false" />
<element signature="e#24490#24847#0#PHP" expanded="false" />
<element signature="e#24852#25733#0#PHP" expanded="false" />
<element signature="e#25739#26091#0#PHP" expanded="false" />
<element signature="e#26096#27174#0#PHP" expanded="false" />
<element signature="e#27180#27535#0#PHP" expanded="false" />
<element signature="e#27540#28634#0#PHP" expanded="false" />
<element signature="e#28640#29064#0#PHP" expanded="false" />
<element signature="e#29069#29680#0#PHP" expanded="false" />
<element signature="e#29686#30182#0#PHP" expanded="false" />
<element signature="e#30187#31884#0#PHP" expanded="false" />
<element signature="e#31890#32174#0#PHP" expanded="false" />
<element signature="e#32179#32815#0#PHP" expanded="false" />
<element signature="e#32836#33155#0#PHP" expanded="false" />
<element signature="e#33161#33569#0#PHP" expanded="false" />
<element signature="e#33575#34334#0#PHP" expanded="false" />
<element signature="e#34353#35217#0#PHP" expanded="false" />
<element signature="e#35243#35643#0#PHP" expanded="false" />
<element signature="e#35666#36239#0#PHP" expanded="false" />
<element signature="e#36262#37072#0#PHP" expanded="false" />
<element signature="e#37078#37677#0#PHP" expanded="false" />
<element signature="e#37682#38646#0#PHP" expanded="false" />
<element signature="e#38652#39319#0#PHP" expanded="false" />
<element signature="e#39324#40365#0#PHP" expanded="false" />
<element signature="e#40371#41034#0#PHP" expanded="false" />
<element signature="e#41039#42066#0#PHP" expanded="false" />
<element signature="e#42073#42504#0#PHP" expanded="false" />
<element signature="e#42509#43087#0#PHP" expanded="false" />
<element signature="e#43093#43522#0#PHP" expanded="false" />
<element signature="e#43527#44129#0#PHP" expanded="false" />
<element signature="e#44135#44562#0#PHP" expanded="false" />
<element signature="e#44567#45133#0#PHP" expanded="false" />
<element signature="e#1538#1767#0#PHP" expanded="false" />
<element signature="e#3413#3653#0#PHP" expanded="false" />
<element signature="e#3658#3893#0#PHP" expanded="false" />
<element signature="e#3899#4246#0#PHP" expanded="false" />
<element signature="e#4251#4697#0#PHP" expanded="false" />
<element signature="e#4703#4963#0#PHP" expanded="false" />
<element signature="e#4968#5169#0#PHP" expanded="false" />
<element signature="e#5175#5437#0#PHP" expanded="false" />
<element signature="e#5442#5647#0#PHP" expanded="false" />
<element signature="e#5653#6132#0#PHP" expanded="false" />
<element signature="e#6137#8256#0#PHP" expanded="false" />
<element signature="e#8279#8810#0#PHP" expanded="false" />
<element signature="e#8816#9096#0#PHP" expanded="false" />
<element signature="e#9101#9493#0#PHP" expanded="false" />
<element signature="e#9499#9783#0#PHP" expanded="false" />
<element signature="e#9788#10827#0#PHP" expanded="false" />
<element signature="e#10833#11121#0#PHP" expanded="false" />
<element signature="e#11126#12161#0#PHP" expanded="false" />
<element signature="e#12167#12748#0#PHP" expanded="false" />
<element signature="e#12753#14141#0#PHP" expanded="false" />
<element signature="e#14147#14603#0#PHP" expanded="false" />
<element signature="e#14608#16571#0#PHP" expanded="false" />
<element signature="e#16594#16949#0#PHP" expanded="false" />
<element signature="e#16955#17668#0#PHP" expanded="false" />
<element signature="e#17673#19130#0#PHP" expanded="false" />
<element signature="e#19136#19597#0#PHP" expanded="false" />
<element signature="e#19602#22624#0#PHP" expanded="false" />
<element signature="e#22630#23239#0#PHP" expanded="false" />
<element signature="e#23244#24529#0#PHP" expanded="false" />
<element signature="e#24535#24892#0#PHP" expanded="false" />
<element signature="e#24897#25778#0#PHP" expanded="false" />
<element signature="e#25784#26136#0#PHP" expanded="false" />
<element signature="e#26141#27219#0#PHP" expanded="false" />
<element signature="e#27225#27580#0#PHP" expanded="false" />
<element signature="e#27585#28679#0#PHP" expanded="false" />
<element signature="e#28685#29109#0#PHP" expanded="false" />
<element signature="e#29114#29725#0#PHP" expanded="false" />
<element signature="e#29731#30227#0#PHP" expanded="false" />
<element signature="e#30232#31929#0#PHP" expanded="false" />
<element signature="e#31935#32219#0#PHP" expanded="false" />
<element signature="e#32224#32860#0#PHP" expanded="false" />
<element signature="e#32881#33200#0#PHP" expanded="false" />
<element signature="e#33206#33614#0#PHP" expanded="false" />
<element signature="e#33620#34379#0#PHP" expanded="false" />
<element signature="e#34398#35262#0#PHP" expanded="false" />
<element signature="e#35288#35688#0#PHP" expanded="false" />
<element signature="e#35711#36284#0#PHP" expanded="false" />
<element signature="e#36307#37117#0#PHP" expanded="false" />
<element signature="e#37123#37722#0#PHP" expanded="false" />
<element signature="e#37727#38691#0#PHP" expanded="false" />
<element signature="e#38697#39364#0#PHP" expanded="false" />
<element signature="e#39369#40410#0#PHP" expanded="false" />
<element signature="e#40416#41079#0#PHP" expanded="false" />
<element signature="e#41084#42111#0#PHP" expanded="false" />
<element signature="e#42118#42549#0#PHP" expanded="false" />
<element signature="e#42554#43132#0#PHP" expanded="false" />
<element signature="e#43138#43567#0#PHP" expanded="false" />
<element signature="e#43572#44174#0#PHP" expanded="false" />
<element signature="e#44180#44607#0#PHP" expanded="false" />
<element signature="e#44612#45178#0#PHP" expanded="false" />
</folding>
</state>
</provider>
... ... @@ -193,11 +193,11 @@
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" />
<component name="ProjectFrameBounds" extendedState="1">
<option name="x" value="162" />
<option name="y" value="147" />
<component name="ProjectFrameBounds">
<option name="x" value="396" />
<option name="y" value="104" />
<option name="width" value="1700" />
<option name="height" value="1037" />
<option name="height" value="1030" />
</component>
<component name="ProjectView">
<navigator currentView="ProjectPane" proportions="" version="1">
... ... @@ -351,15 +351,15 @@
<workItem from="1575444399653" duration="12810000" />
<workItem from="1575462840839" duration="250000" />
<workItem from="1575506248144" duration="15103000" />
<workItem from="1575527294268" duration="8503000" />
<workItem from="1575527294268" duration="9387000" />
</task>
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="490315000" />
<option name="totallyTimeSpent" value="491199000" />
</component>
<component name="ToolWindowManager">
<frame x="162" y="147" width="1700" height="1037" extended-state="1" />
<frame x="396" y="104" width="1700" height="1030" extended-state="0" />
<editor active="true" />
<layout>
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.16341463" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
... ... @@ -408,7 +408,7 @@
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<option name="time" value="10" />
<option name="time" value="12" />
</breakpoint-manager>
<watches-manager />
</component>
... ... @@ -908,69 +908,69 @@
</entry>
<entry file="file://$PROJECT_DIR$/api/index/controller/UserController.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="325">
<caret line="84" column="15" lean-forward="true" selection-start-line="84" selection-start-column="15" selection-end-line="84" selection-end-column="15" />
<state relative-caret-position="453">
<caret line="52" column="44" lean-forward="false" selection-start-line="52" selection-start-column="44" selection-end-line="52" selection-end-column="44" />
<folding>
<element signature="e#1491#1720#0#PHP" expanded="false" />
<element signature="e#3368#3608#0#PHP" expanded="false" />
<element signature="e#3613#3848#0#PHP" expanded="false" />
<element signature="e#3854#4201#0#PHP" expanded="false" />
<element signature="e#4206#4652#0#PHP" expanded="false" />
<element signature="e#4658#4918#0#PHP" expanded="false" />
<element signature="e#4923#5124#0#PHP" expanded="false" />
<element signature="e#5130#5392#0#PHP" expanded="false" />
<element signature="e#5397#5602#0#PHP" expanded="false" />
<element signature="e#5608#6087#0#PHP" expanded="false" />
<element signature="e#6092#8211#0#PHP" expanded="false" />
<element signature="e#8234#8765#0#PHP" expanded="false" />
<element signature="e#8771#9051#0#PHP" expanded="false" />
<element signature="e#9056#9448#0#PHP" expanded="false" />
<element signature="e#9454#9738#0#PHP" expanded="false" />
<element signature="e#9743#10782#0#PHP" expanded="false" />
<element signature="e#10788#11076#0#PHP" expanded="false" />
<element signature="e#11081#12116#0#PHP" expanded="false" />
<element signature="e#12122#12703#0#PHP" expanded="false" />
<element signature="e#12708#14096#0#PHP" expanded="false" />
<element signature="e#14102#14558#0#PHP" expanded="false" />
<element signature="e#14563#16526#0#PHP" expanded="false" />
<element signature="e#16549#16904#0#PHP" expanded="false" />
<element signature="e#16910#17623#0#PHP" expanded="false" />
<element signature="e#17628#19085#0#PHP" expanded="false" />
<element signature="e#19091#19552#0#PHP" expanded="false" />
<element signature="e#19557#22579#0#PHP" expanded="false" />
<element signature="e#22585#23194#0#PHP" expanded="false" />
<element signature="e#23199#24484#0#PHP" expanded="false" />
<element signature="e#24490#24847#0#PHP" expanded="false" />
<element signature="e#24852#25733#0#PHP" expanded="false" />
<element signature="e#25739#26091#0#PHP" expanded="false" />
<element signature="e#26096#27174#0#PHP" expanded="false" />
<element signature="e#27180#27535#0#PHP" expanded="false" />
<element signature="e#27540#28634#0#PHP" expanded="false" />
<element signature="e#28640#29064#0#PHP" expanded="false" />
<element signature="e#29069#29680#0#PHP" expanded="false" />
<element signature="e#29686#30182#0#PHP" expanded="false" />
<element signature="e#30187#31884#0#PHP" expanded="false" />
<element signature="e#31890#32174#0#PHP" expanded="false" />
<element signature="e#32179#32815#0#PHP" expanded="false" />
<element signature="e#32836#33155#0#PHP" expanded="false" />
<element signature="e#33161#33569#0#PHP" expanded="false" />
<element signature="e#33575#34334#0#PHP" expanded="false" />
<element signature="e#34353#35217#0#PHP" expanded="false" />
<element signature="e#35243#35643#0#PHP" expanded="false" />
<element signature="e#35666#36239#0#PHP" expanded="false" />
<element signature="e#36262#37072#0#PHP" expanded="false" />
<element signature="e#37078#37677#0#PHP" expanded="false" />
<element signature="e#37682#38646#0#PHP" expanded="false" />
<element signature="e#38652#39319#0#PHP" expanded="false" />
<element signature="e#39324#40365#0#PHP" expanded="false" />
<element signature="e#40371#41034#0#PHP" expanded="false" />
<element signature="e#41039#42066#0#PHP" expanded="false" />
<element signature="e#42073#42504#0#PHP" expanded="false" />
<element signature="e#42509#43087#0#PHP" expanded="false" />
<element signature="e#43093#43522#0#PHP" expanded="false" />
<element signature="e#43527#44129#0#PHP" expanded="false" />
<element signature="e#44135#44562#0#PHP" expanded="false" />
<element signature="e#44567#45133#0#PHP" expanded="false" />
<element signature="e#1538#1767#0#PHP" expanded="false" />
<element signature="e#3413#3653#0#PHP" expanded="false" />
<element signature="e#3658#3893#0#PHP" expanded="false" />
<element signature="e#3899#4246#0#PHP" expanded="false" />
<element signature="e#4251#4697#0#PHP" expanded="false" />
<element signature="e#4703#4963#0#PHP" expanded="false" />
<element signature="e#4968#5169#0#PHP" expanded="false" />
<element signature="e#5175#5437#0#PHP" expanded="false" />
<element signature="e#5442#5647#0#PHP" expanded="false" />
<element signature="e#5653#6132#0#PHP" expanded="false" />
<element signature="e#6137#8256#0#PHP" expanded="false" />
<element signature="e#8279#8810#0#PHP" expanded="false" />
<element signature="e#8816#9096#0#PHP" expanded="false" />
<element signature="e#9101#9493#0#PHP" expanded="false" />
<element signature="e#9499#9783#0#PHP" expanded="false" />
<element signature="e#9788#10827#0#PHP" expanded="false" />
<element signature="e#10833#11121#0#PHP" expanded="false" />
<element signature="e#11126#12161#0#PHP" expanded="false" />
<element signature="e#12167#12748#0#PHP" expanded="false" />
<element signature="e#12753#14141#0#PHP" expanded="false" />
<element signature="e#14147#14603#0#PHP" expanded="false" />
<element signature="e#14608#16571#0#PHP" expanded="false" />
<element signature="e#16594#16949#0#PHP" expanded="false" />
<element signature="e#16955#17668#0#PHP" expanded="false" />
<element signature="e#17673#19130#0#PHP" expanded="false" />
<element signature="e#19136#19597#0#PHP" expanded="false" />
<element signature="e#19602#22624#0#PHP" expanded="false" />
<element signature="e#22630#23239#0#PHP" expanded="false" />
<element signature="e#23244#24529#0#PHP" expanded="false" />
<element signature="e#24535#24892#0#PHP" expanded="false" />
<element signature="e#24897#25778#0#PHP" expanded="false" />
<element signature="e#25784#26136#0#PHP" expanded="false" />
<element signature="e#26141#27219#0#PHP" expanded="false" />
<element signature="e#27225#27580#0#PHP" expanded="false" />
<element signature="e#27585#28679#0#PHP" expanded="false" />
<element signature="e#28685#29109#0#PHP" expanded="false" />
<element signature="e#29114#29725#0#PHP" expanded="false" />
<element signature="e#29731#30227#0#PHP" expanded="false" />
<element signature="e#30232#31929#0#PHP" expanded="false" />
<element signature="e#31935#32219#0#PHP" expanded="false" />
<element signature="e#32224#32860#0#PHP" expanded="false" />
<element signature="e#32881#33200#0#PHP" expanded="false" />
<element signature="e#33206#33614#0#PHP" expanded="false" />
<element signature="e#33620#34379#0#PHP" expanded="false" />
<element signature="e#34398#35262#0#PHP" expanded="false" />
<element signature="e#35288#35688#0#PHP" expanded="false" />
<element signature="e#35711#36284#0#PHP" expanded="false" />
<element signature="e#36307#37117#0#PHP" expanded="false" />
<element signature="e#37123#37722#0#PHP" expanded="false" />
<element signature="e#37727#38691#0#PHP" expanded="false" />
<element signature="e#38697#39364#0#PHP" expanded="false" />
<element signature="e#39369#40410#0#PHP" expanded="false" />
<element signature="e#40416#41079#0#PHP" expanded="false" />
<element signature="e#41084#42111#0#PHP" expanded="false" />
<element signature="e#42118#42549#0#PHP" expanded="false" />
<element signature="e#42554#43132#0#PHP" expanded="false" />
<element signature="e#43138#43567#0#PHP" expanded="false" />
<element signature="e#43572#44174#0#PHP" expanded="false" />
<element signature="e#44180#44607#0#PHP" expanded="false" />
<element signature="e#44612#45178#0#PHP" expanded="false" />
</folding>
</state>
</provider>
... ...
... ... @@ -39,8 +39,6 @@ class UserController extends RestBaseController
{
$user_id = $this->getUserId();
$param = $this->request->param();
$param['create_time'] = time();
$param['user_id'] = $user_id;
$validate = new Validate([
'phone' => 'require|max:11',
'code'=>'require'
... ... @@ -50,8 +48,11 @@ class UserController extends RestBaseController
}
$code = Cache::get($param['phone']);
if($code == $param['code']){
$res['user_id'] = $user_id;
$res['create_time'] = time();
$res['phone'] = $param['phone'];
$data = Db::name('integral')
->insert($param);
->insert($res);
if($data){
$this->success('SUCCESS');
}
... ... @@ -84,7 +85,7 @@ class UserController extends RestBaseController
$number = generateCode();
//发送验证码
$data = array(
'content' => "【蓝科环保】垃圾分类,共创绿色生活,您的验证码是:" . $number.",十分钟之内有效,请勿向他人泄漏您的验证码",//短信内容
'content' => "【蓝科环保】垃圾分类,共创绿色生活,您的验证码是:" .$number.",十分钟之内有效,请勿向他人泄漏您的验证码",//短信内容
'mobile' => $phone,//手机号码
'productid' => '676767',//产品id
'xh' => ''//小号
... ... @@ -93,7 +94,7 @@ class UserController extends RestBaseController
if (substr($result, 0, strpos($result, ',')) != "1") {
$this->error(['code' => 42001, 'msg' => $result]);
}
Cache::set($phone,$number,6000);
Cache::set($phone,$number,600);
// $code = Db::name('code')
// ->where('phone',$phone)
// ->find();
... ...