作者 王晓刚
1 个管道 的构建 通过 耗费 0 秒

调试授权

... ... @@ -3,7 +3,7 @@
<component name="ChangeListManager">
<list default="true" id="309ad746-5b2a-4c29-af46-e7925a35765c" name="默认的" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/application/home/controller/Index.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/home/controller/Index.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/application/home/model/User.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/home/model/User.php" afterDir="false" />
</list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
... ... @@ -17,11 +17,11 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file leaf-file-name="Index.php" pinned="false" current-in-tab="true">
<file leaf-file-name="Index.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/home/controller/Index.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="306">
<caret line="23" column="47" selection-start-line="23" selection-start-column="47" selection-end-line="23" selection-end-column="47" />
<caret line="23" column="34" selection-start-line="23" selection-start-column="34" selection-end-line="23" selection-end-column="34" />
<folding>
<element signature="e#128#165#0#PHP" expanded="true" />
</folding>
... ... @@ -53,15 +53,6 @@
</provider>
</entry>
</file>
<file leaf-file-name="wechat.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/extra/wechat.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="306">
<caret line="18" column="50" selection-start-line="18" selection-start-column="50" selection-end-line="18" selection-end-column="50" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="Share.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/home/controller/Share.php">
<provider selected="true" editor-type-id="text-editor">
... ... @@ -107,22 +98,25 @@
</provider>
</entry>
</file>
<file leaf-file-name="Question.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/home/model/Question.php">
<file leaf-file-name="User.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/home/controller/User.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="136">
<caret line="13" column="6" selection-start-line="13" selection-start-column="6" selection-end-line="13" selection-end-column="6" />
<state relative-caret-position="623">
<caret line="84" column="34" lean-forward="true" selection-start-line="84" selection-start-column="34" selection-end-line="84" selection-end-column="34" />
<folding>
<element signature="e#128#160#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="User.php" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/application/home/controller/User.php">
<file leaf-file-name="User.php" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/application/home/model/User.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="436">
<caret line="154" column="33" selection-start-line="154" selection-start-column="20" selection-end-line="154" selection-end-column="33" />
<state relative-caret-position="493">
<caret line="34" column="17" selection-start-line="34" selection-start-column="17" selection-end-line="34" selection-end-column="17" />
<folding>
<element signature="e#128#160#0#PHP" expanded="true" />
<element signature="e#125#138#0#PHP" expanded="true" />
</folding>
</state>
</provider>
... ... @@ -143,7 +137,6 @@
<option value="$PROJECT_DIR$/application/home/model/Slide.php" />
<option value="$PROJECT_DIR$/application/home/model/Question.php" />
<option value="$PROJECT_DIR$/application/common.php" />
<option value="$PROJECT_DIR$/application/home/model/User.php" />
<option value="$PROJECT_DIR$/application/home/model/User_question_answer.php" />
<option value="$PROJECT_DIR$/application/home/model/UserQuestionAnswer.php" />
<option value="$PROJECT_DIR$/application/home/controller/Goods.php" />
... ... @@ -157,6 +150,7 @@
<option value="$PROJECT_DIR$/application/database.php" />
<option value="$PROJECT_DIR$/application/home/controller/User.php" />
<option value="$PROJECT_DIR$/application/home/controller/Index.php" />
<option value="$PROJECT_DIR$/application/home/model/User.php" />
</list>
</option>
</component>
... ... @@ -264,6 +258,13 @@
<path>
<item name="advertising" type="b2602c69:ProjectViewProjectNode" />
<item name="advertising" type="462c0819:PsiDirectoryNode" />
<item name="application" type="462c0819:PsiDirectoryNode" />
<item name="home" type="462c0819:PsiDirectoryNode" />
<item name="model" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="advertising" type="b2602c69:ProjectViewProjectNode" />
<item name="advertising" type="462c0819:PsiDirectoryNode" />
<item name="public" type="462c0819:PsiDirectoryNode" />
</path>
</expand>
... ... @@ -320,7 +321,7 @@
<workItem from="1571705047810" duration="3754000" />
<workItem from="1571790358186" duration="28939000" />
<workItem from="1571877780953" duration="28080000" />
<workItem from="1571963886703" duration="8855000" />
<workItem from="1571963886703" duration="9075000" />
</task>
<task id="LOCAL-00001" summary="数据库配置">
<created>1571972429395</created>
... ... @@ -343,11 +344,25 @@
<option name="project" value="LOCAL" />
<updated>1571972828504</updated>
</task>
<option name="localTasksCounter" value="4" />
<task id="LOCAL-00004" summary="调试授权">
<created>1571975677420</created>
<option name="number" value="00004" />
<option name="presentableId" value="LOCAL-00004" />
<option name="project" value="LOCAL" />
<updated>1571975677420</updated>
</task>
<task id="LOCAL-00005" summary="调试授权">
<created>1571975758832</created>
<option name="number" value="00005" />
<option name="presentableId" value="LOCAL-00005" />
<option name="project" value="LOCAL" />
<updated>1571975758832</updated>
</task>
<option name="localTasksCounter" value="6" />
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="79196000" />
<option name="totallyTimeSpent" value="79416000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
... ... @@ -389,16 +404,6 @@
<option name="LAST_COMMIT_MESSAGE" value="调试授权" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/application/home/controller/User.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2618">
<caret line="163" column="8" selection-start-line="163" selection-start-column="8" selection-end-line="172" selection-end-column="11" />
<folding>
<element signature="e#128#160#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/controller/Goods.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="986">
... ... @@ -584,13 +589,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/model/User.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="153">
<caret line="14" column="1" selection-start-line="14" selection-start-column="1" selection-end-line="14" selection-end-column="1" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/model/Question.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="136">
... ... @@ -680,13 +678,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/config.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-255">
<caret line="20" column="58" selection-start-line="20" selection-start-column="58" selection-end-line="20" selection-end-column="58" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/controller/Member.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1218">
... ... @@ -700,6 +691,16 @@
<entry file="file://$PROJECT_DIR$/public/MP_verify_4KFkEP03TkXO6gP2.txt">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/public/index.php">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/application/config.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="204">
<caret line="20" column="58" selection-start-line="20" selection-start-column="58" selection-end-line="20" selection-end-column="58" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/extra/wechat.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="306">
... ... @@ -717,22 +718,32 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/controller/Index.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="306">
<caret line="23" column="34" selection-start-line="23" selection-start-column="34" selection-end-line="23" selection-end-column="34" />
<folding>
<element signature="e#128#165#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/controller/User.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="436">
<caret line="154" column="33" selection-start-line="154" selection-start-column="20" selection-end-line="154" selection-end-column="33" />
<state relative-caret-position="623">
<caret line="84" column="34" lean-forward="true" selection-start-line="84" selection-start-column="34" selection-end-line="84" selection-end-column="34" />
<folding>
<element signature="e#128#160#0#PHP" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/application/home/controller/Index.php">
<entry file="file://$PROJECT_DIR$/application/home/model/User.php">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="306">
<caret line="23" column="47" selection-start-line="23" selection-start-column="47" selection-end-line="23" selection-end-column="47" />
<state relative-caret-position="493">
<caret line="34" column="17" selection-start-line="34" selection-start-column="17" selection-end-line="34" selection-end-column="17" />
<folding>
<element signature="e#128#165#0#PHP" expanded="true" />
<element signature="e#125#138#0#PHP" expanded="true" />
</folding>
</state>
</provider>
... ...
... ... @@ -9,6 +9,7 @@
namespace app\home\model;
use think\Db;
use think\Model;
class User extends Model
... ... @@ -21,4 +22,21 @@ class User extends Model
$result = $this->where($where)->update($data);
return $result;
}
public function getUserInfo($where=[]){
if(empty($where)){
$userId=get_current_user_id();
$appId=config('wx_app_id');
$where=['user_id'=>$userId,'app_id'=>$appId];
}
if(empty($where)){
redirect('/');
}
$user= Db::name("third")->alias('b')
->join('__USER__ a','a.id=b.user_id','LEFT')
->field('a.*,b.openid,b.union_id')
->where($where)
->find();
return $user;
}
}
\ No newline at end of file
... ...