From 53984c3a34ca405a9a2c7eb8a3cabaed4fbaeb97 Mon Sep 17 00:00:00 2001 From: guosheng <gs@bronet.cn> Date: Wed, 27 Nov 2019 19:19:02 +0800 Subject: [PATCH] 绑定用户手机号 --- .idea/workspace.xml | 32 +++++++++++++++++--------------- application/api/controller/User.php | 7 ++++++- public/api.html | 2 +- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index e2e76fe..ed54c26 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,7 +2,7 @@ <project version="4"> <component name="ChangeListManager"> <list default="true" id="e93f11c2-a7d9-4d35-8b1c-8dd18e7f5fef" name="Default" comment=""> - <change type="MODIFICATION" beforePath="$PROJECT_DIR$/public/api.html" afterPath="$PROJECT_DIR$/public/api.html" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/application/api/controller/User.php" afterPath="$PROJECT_DIR$/application/api/controller/User.php" /> </list> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="TRACKING_ENABLED" value="true" /> @@ -16,8 +16,8 @@ <file leaf-file-name="User.php" pinned="false" current-in-tab="true"> <entry file="file://$PROJECT_DIR$/application/api/controller/User.php"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="-446"> - <caret line="1637" column="64" lean-forward="true" selection-start-line="1637" selection-start-column="64" selection-end-line="1637" selection-end-column="64" /> + <state relative-caret-position="665"> + <caret line="1711" column="55" lean-forward="false" selection-start-line="1711" selection-start-column="55" selection-end-line="1711" selection-end-column="55" /> <folding> <element signature="e#365#484#0#PHP" expanded="false" /> <element signature="e#490#1228#0#PHP" expanded="false" /> @@ -79,8 +79,9 @@ <element signature="e#54259#55211#0#PHP" expanded="false" /> <element signature="e#55235#55808#0#PHP" expanded="false" /> <element signature="e#55814#56413#0#PHP" expanded="false" /> + <element signature="e#56418#57345#0#PHP" expanded="false" /> + <element signature="e#57351#58065#0#PHP" expanded="false" /> <element signature="e#58071#58498#0#PHP" expanded="false" /> - <element signature="e#58503#58768#0#PHP" expanded="false" /> </folding> </state> </provider> @@ -172,9 +173,9 @@ <sorting>DEFINITION_ORDER</sorting> </component> <component name="PhpWorkspaceProjectConfiguration" backward_compatibility_performed="true" /> - <component name="ProjectFrameBounds"> - <option name="x" value="437" /> - <option name="y" value="30" /> + <component name="ProjectFrameBounds" extendedState="7"> + <option name="x" value="351" /> + <option name="y" value="-15" /> <option name="width" value="1776" /> <option name="height" value="1077" /> </component> @@ -278,7 +279,7 @@ <workItem from="1574759184313" duration="4793000" /> <workItem from="1574814989178" duration="1007000" /> <workItem from="1574831367903" duration="17171000" /> - <workItem from="1574849431656" duration="2870000" /> + <workItem from="1574849431656" duration="3930000" /> </task> <task id="LOCAL-00001" summary="调试"> <created>1574145133364</created> @@ -291,7 +292,7 @@ <servers /> </component> <component name="TimeTrackingManager"> - <option name="totallyTimeSpent" value="273698000" /> + <option name="totallyTimeSpent" value="274758000" /> </component> <component name="TodoView"> <todo-panel id="selected-file"> @@ -303,16 +304,16 @@ </todo-panel> </component> <component name="ToolWindowManager"> - <frame x="437" y="30" width="1776" height="1077" extended-state="0" /> + <frame x="-8" y="-8" width="1936" height="1056" extended-state="7" /> <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.14801864" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" /> + <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.13539445" sideWeight="0.5" order="1" side_tool="false" content_ui="combo" /> <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" /> <window_info id="Event Log" 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="0" side_tool="true" content_ui="tabs" /> <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> <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" /> <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" /> <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" /> - <window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.12021276" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> + <window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.11969532" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <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" /> <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" /> <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" /> @@ -699,8 +700,8 @@ </entry> <entry file="file://$PROJECT_DIR$/application/api/controller/User.php"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="-446"> - <caret line="1637" column="64" lean-forward="true" selection-start-line="1637" selection-start-column="64" selection-end-line="1637" selection-end-column="64" /> + <state relative-caret-position="665"> + <caret line="1711" column="55" lean-forward="false" selection-start-line="1711" selection-start-column="55" selection-end-line="1711" selection-end-column="55" /> <folding> <element signature="e#365#484#0#PHP" expanded="false" /> <element signature="e#490#1228#0#PHP" expanded="false" /> @@ -762,8 +763,9 @@ <element signature="e#54259#55211#0#PHP" expanded="false" /> <element signature="e#55235#55808#0#PHP" expanded="false" /> <element signature="e#55814#56413#0#PHP" expanded="false" /> + <element signature="e#56418#57345#0#PHP" expanded="false" /> + <element signature="e#57351#58065#0#PHP" expanded="false" /> <element signature="e#58071#58498#0#PHP" expanded="false" /> - <element signature="e#58503#58768#0#PHP" expanded="false" /> </folding> </state> </provider> diff --git a/application/api/controller/User.php b/application/api/controller/User.php index 9fe7d85..a0ab78c 100644 --- a/application/api/controller/User.php +++ b/application/api/controller/User.php @@ -1706,6 +1706,11 @@ class User extends Api $data = Db::name('user') ->where('id',$user_id) ->update(['mobile'=>$phone]); - $this->success('SUCCESS',$data); + if(!empty($data)){ + $this->success('SUCCESS',$data); + }else{ + $this->error(['code'=>2,'msg'=>'sql运行失败']); + } + } } diff --git a/public/api.html b/public/api.html index 37ccb84..0530fa3 100644 --- a/public/api.html +++ b/public/api.html @@ -6482,7 +6482,7 @@ <div class="row mt0 footer"> <div class="col-md-6" align="left"> - Generated on 2019-11-27 19:00:52 </div> + Generated on 2019-11-27 19:18:46 </div> <div class="col-md-6" align="right"> <a href="https://www.fastadmin.net" target="_blank">FastAdmin</a> </div> -- libgit2 0.24.0