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

调试授权

@@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
3 <component name="ChangeListManager"> 3 <component name="ChangeListManager">
4 <list default="true" id="309ad746-5b2a-4c29-af46-e7925a35765c" name="默认的" comment=""> 4 <list default="true" id="309ad746-5b2a-4c29-af46-e7925a35765c" name="默认的" comment="">
5 <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> 5 <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
6 - <change beforePath="$PROJECT_DIR$/application/home/controller/Index.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/home/controller/Index.php" afterDir="false" /> 6 + <change beforePath="$PROJECT_DIR$/application/home/model/User.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/home/model/User.php" afterDir="false" />
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,11 +17,11 @@ @@ -17,11 +17,11 @@
17 </component> 17 </component>
18 <component name="FileEditorManager"> 18 <component name="FileEditorManager">
19 <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> 19 <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
20 - <file leaf-file-name="Index.php" pinned="false" current-in-tab="true"> 20 + <file leaf-file-name="Index.php" pinned="false" current-in-tab="false">
21 <entry file="file://$PROJECT_DIR$/application/home/controller/Index.php"> 21 <entry file="file://$PROJECT_DIR$/application/home/controller/Index.php">
22 <provider selected="true" editor-type-id="text-editor"> 22 <provider selected="true" editor-type-id="text-editor">
23 <state relative-caret-position="306"> 23 <state relative-caret-position="306">
24 - <caret line="23" column="47" selection-start-line="23" selection-start-column="47" selection-end-line="23" selection-end-column="47" /> 24 + <caret line="23" column="34" selection-start-line="23" selection-start-column="34" selection-end-line="23" selection-end-column="34" />
25 <folding> 25 <folding>
26 <element signature="e#128#165#0#PHP" expanded="true" /> 26 <element signature="e#128#165#0#PHP" expanded="true" />
27 </folding> 27 </folding>
@@ -53,15 +53,6 @@ @@ -53,15 +53,6 @@
53 </provider> 53 </provider>
54 </entry> 54 </entry>
55 </file> 55 </file>
56 - <file leaf-file-name="wechat.php" pinned="false" current-in-tab="false">  
57 - <entry file="file://$PROJECT_DIR$/application/extra/wechat.php">  
58 - <provider selected="true" editor-type-id="text-editor">  
59 - <state relative-caret-position="306">  
60 - <caret line="18" column="50" selection-start-line="18" selection-start-column="50" selection-end-line="18" selection-end-column="50" />  
61 - </state>  
62 - </provider>  
63 - </entry>  
64 - </file>  
65 <file leaf-file-name="Share.php" pinned="false" current-in-tab="false"> 56 <file leaf-file-name="Share.php" pinned="false" current-in-tab="false">
66 <entry file="file://$PROJECT_DIR$/application/home/controller/Share.php"> 57 <entry file="file://$PROJECT_DIR$/application/home/controller/Share.php">
67 <provider selected="true" editor-type-id="text-editor"> 58 <provider selected="true" editor-type-id="text-editor">
@@ -107,22 +98,25 @@ @@ -107,22 +98,25 @@
107 </provider> 98 </provider>
108 </entry> 99 </entry>
109 </file> 100 </file>
110 - <file leaf-file-name="Question.php" pinned="false" current-in-tab="false">  
111 - <entry file="file://$PROJECT_DIR$/application/home/model/Question.php"> 101 + <file leaf-file-name="User.php" pinned="false" current-in-tab="false">
  102 + <entry file="file://$PROJECT_DIR$/application/home/controller/User.php">
112 <provider selected="true" editor-type-id="text-editor"> 103 <provider selected="true" editor-type-id="text-editor">
113 - <state relative-caret-position="136">  
114 - <caret line="13" column="6" selection-start-line="13" selection-start-column="6" selection-end-line="13" selection-end-column="6" /> 104 + <state relative-caret-position="623">
  105 + <caret line="84" column="34" lean-forward="true" selection-start-line="84" selection-start-column="34" selection-end-line="84" selection-end-column="34" />
  106 + <folding>
  107 + <element signature="e#128#160#0#PHP" expanded="true" />
  108 + </folding>
115 </state> 109 </state>
116 </provider> 110 </provider>
117 </entry> 111 </entry>
118 </file> 112 </file>
119 - <file leaf-file-name="User.php" pinned="false" current-in-tab="false">  
120 - <entry file="file://$PROJECT_DIR$/application/home/controller/User.php"> 113 + <file leaf-file-name="User.php" pinned="false" current-in-tab="true">
  114 + <entry file="file://$PROJECT_DIR$/application/home/model/User.php">
121 <provider selected="true" editor-type-id="text-editor"> 115 <provider selected="true" editor-type-id="text-editor">
122 - <state relative-caret-position="436">  
123 - <caret line="154" column="33" selection-start-line="154" selection-start-column="20" selection-end-line="154" selection-end-column="33" /> 116 + <state relative-caret-position="493">
  117 + <caret line="34" column="17" selection-start-line="34" selection-start-column="17" selection-end-line="34" selection-end-column="17" />
124 <folding> 118 <folding>
125 - <element signature="e#128#160#0#PHP" expanded="true" /> 119 + <element signature="e#125#138#0#PHP" expanded="true" />
126 </folding> 120 </folding>
127 </state> 121 </state>
128 </provider> 122 </provider>
@@ -143,7 +137,6 @@ @@ -143,7 +137,6 @@
143 <option value="$PROJECT_DIR$/application/home/model/Slide.php" /> 137 <option value="$PROJECT_DIR$/application/home/model/Slide.php" />
144 <option value="$PROJECT_DIR$/application/home/model/Question.php" /> 138 <option value="$PROJECT_DIR$/application/home/model/Question.php" />
145 <option value="$PROJECT_DIR$/application/common.php" /> 139 <option value="$PROJECT_DIR$/application/common.php" />
146 - <option value="$PROJECT_DIR$/application/home/model/User.php" />  
147 <option value="$PROJECT_DIR$/application/home/model/User_question_answer.php" /> 140 <option value="$PROJECT_DIR$/application/home/model/User_question_answer.php" />
148 <option value="$PROJECT_DIR$/application/home/model/UserQuestionAnswer.php" /> 141 <option value="$PROJECT_DIR$/application/home/model/UserQuestionAnswer.php" />
149 <option value="$PROJECT_DIR$/application/home/controller/Goods.php" /> 142 <option value="$PROJECT_DIR$/application/home/controller/Goods.php" />
@@ -157,6 +150,7 @@ @@ -157,6 +150,7 @@
157 <option value="$PROJECT_DIR$/application/database.php" /> 150 <option value="$PROJECT_DIR$/application/database.php" />
158 <option value="$PROJECT_DIR$/application/home/controller/User.php" /> 151 <option value="$PROJECT_DIR$/application/home/controller/User.php" />
159 <option value="$PROJECT_DIR$/application/home/controller/Index.php" /> 152 <option value="$PROJECT_DIR$/application/home/controller/Index.php" />
  153 + <option value="$PROJECT_DIR$/application/home/model/User.php" />
160 </list> 154 </list>
161 </option> 155 </option>
162 </component> 156 </component>
@@ -264,6 +258,13 @@ @@ -264,6 +258,13 @@
264 <path> 258 <path>
265 <item name="advertising" type="b2602c69:ProjectViewProjectNode" /> 259 <item name="advertising" type="b2602c69:ProjectViewProjectNode" />
266 <item name="advertising" type="462c0819:PsiDirectoryNode" /> 260 <item name="advertising" type="462c0819:PsiDirectoryNode" />
  261 + <item name="application" type="462c0819:PsiDirectoryNode" />
  262 + <item name="home" type="462c0819:PsiDirectoryNode" />
  263 + <item name="model" type="462c0819:PsiDirectoryNode" />
  264 + </path>
  265 + <path>
  266 + <item name="advertising" type="b2602c69:ProjectViewProjectNode" />
  267 + <item name="advertising" type="462c0819:PsiDirectoryNode" />
267 <item name="public" type="462c0819:PsiDirectoryNode" /> 268 <item name="public" type="462c0819:PsiDirectoryNode" />
268 </path> 269 </path>
269 </expand> 270 </expand>
@@ -320,7 +321,7 @@ @@ -320,7 +321,7 @@
320 <workItem from="1571705047810" duration="3754000" /> 321 <workItem from="1571705047810" duration="3754000" />
321 <workItem from="1571790358186" duration="28939000" /> 322 <workItem from="1571790358186" duration="28939000" />
322 <workItem from="1571877780953" duration="28080000" /> 323 <workItem from="1571877780953" duration="28080000" />
323 - <workItem from="1571963886703" duration="8855000" /> 324 + <workItem from="1571963886703" duration="9075000" />
324 </task> 325 </task>
325 <task id="LOCAL-00001" summary="数据库配置"> 326 <task id="LOCAL-00001" summary="数据库配置">
326 <created>1571972429395</created> 327 <created>1571972429395</created>
@@ -343,11 +344,25 @@ @@ -343,11 +344,25 @@
343 <option name="project" value="LOCAL" /> 344 <option name="project" value="LOCAL" />
344 <updated>1571972828504</updated> 345 <updated>1571972828504</updated>
345 </task> 346 </task>
346 - <option name="localTasksCounter" value="4" /> 347 + <task id="LOCAL-00004" summary="调试授权">
  348 + <created>1571975677420</created>
  349 + <option name="number" value="00004" />
  350 + <option name="presentableId" value="LOCAL-00004" />
  351 + <option name="project" value="LOCAL" />
  352 + <updated>1571975677420</updated>
  353 + </task>
  354 + <task id="LOCAL-00005" summary="调试授权">
  355 + <created>1571975758832</created>
  356 + <option name="number" value="00005" />
  357 + <option name="presentableId" value="LOCAL-00005" />
  358 + <option name="project" value="LOCAL" />
  359 + <updated>1571975758832</updated>
  360 + </task>
  361 + <option name="localTasksCounter" value="6" />
347 <servers /> 362 <servers />
348 </component> 363 </component>
349 <component name="TimeTrackingManager"> 364 <component name="TimeTrackingManager">
350 - <option name="totallyTimeSpent" value="79196000" /> 365 + <option name="totallyTimeSpent" value="79416000" />
351 </component> 366 </component>
352 <component name="ToolWindowManager"> 367 <component name="ToolWindowManager">
353 <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" /> 368 <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
@@ -389,16 +404,6 @@ @@ -389,16 +404,6 @@
389 <option name="LAST_COMMIT_MESSAGE" value="调试授权" /> 404 <option name="LAST_COMMIT_MESSAGE" value="调试授权" />
390 </component> 405 </component>
391 <component name="editorHistoryManager"> 406 <component name="editorHistoryManager">
392 - <entry file="file://$PROJECT_DIR$/application/home/controller/User.php">  
393 - <provider selected="true" editor-type-id="text-editor">  
394 - <state relative-caret-position="2618">  
395 - <caret line="163" column="8" selection-start-line="163" selection-start-column="8" selection-end-line="172" selection-end-column="11" />  
396 - <folding>  
397 - <element signature="e#128#160#0#PHP" expanded="true" />  
398 - </folding>  
399 - </state>  
400 - </provider>  
401 - </entry>  
402 <entry file="file://$PROJECT_DIR$/application/home/controller/Goods.php"> 407 <entry file="file://$PROJECT_DIR$/application/home/controller/Goods.php">
403 <provider selected="true" editor-type-id="text-editor"> 408 <provider selected="true" editor-type-id="text-editor">
404 <state relative-caret-position="986"> 409 <state relative-caret-position="986">
@@ -584,13 +589,6 @@ @@ -584,13 +589,6 @@
584 </state> 589 </state>
585 </provider> 590 </provider>
586 </entry> 591 </entry>
587 - <entry file="file://$PROJECT_DIR$/application/home/model/User.php">  
588 - <provider selected="true" editor-type-id="text-editor">  
589 - <state relative-caret-position="153">  
590 - <caret line="14" column="1" selection-start-line="14" selection-start-column="1" selection-end-line="14" selection-end-column="1" />  
591 - </state>  
592 - </provider>  
593 - </entry>  
594 <entry file="file://$PROJECT_DIR$/application/home/model/Question.php"> 592 <entry file="file://$PROJECT_DIR$/application/home/model/Question.php">
595 <provider selected="true" editor-type-id="text-editor"> 593 <provider selected="true" editor-type-id="text-editor">
596 <state relative-caret-position="136"> 594 <state relative-caret-position="136">
@@ -680,13 +678,6 @@ @@ -680,13 +678,6 @@
680 </state> 678 </state>
681 </provider> 679 </provider>
682 </entry> 680 </entry>
683 - <entry file="file://$PROJECT_DIR$/application/config.php">  
684 - <provider selected="true" editor-type-id="text-editor">  
685 - <state relative-caret-position="-255">  
686 - <caret line="20" column="58" selection-start-line="20" selection-start-column="58" selection-end-line="20" selection-end-column="58" />  
687 - </state>  
688 - </provider>  
689 - </entry>  
690 <entry file="file://$PROJECT_DIR$/application/home/controller/Member.php"> 681 <entry file="file://$PROJECT_DIR$/application/home/controller/Member.php">
691 <provider selected="true" editor-type-id="text-editor"> 682 <provider selected="true" editor-type-id="text-editor">
692 <state relative-caret-position="1218"> 683 <state relative-caret-position="1218">
@@ -700,6 +691,16 @@ @@ -700,6 +691,16 @@
700 <entry file="file://$PROJECT_DIR$/public/MP_verify_4KFkEP03TkXO6gP2.txt"> 691 <entry file="file://$PROJECT_DIR$/public/MP_verify_4KFkEP03TkXO6gP2.txt">
701 <provider selected="true" editor-type-id="text-editor" /> 692 <provider selected="true" editor-type-id="text-editor" />
702 </entry> 693 </entry>
  694 + <entry file="file://$PROJECT_DIR$/public/index.php">
  695 + <provider selected="true" editor-type-id="text-editor" />
  696 + </entry>
  697 + <entry file="file://$PROJECT_DIR$/application/config.php">
  698 + <provider selected="true" editor-type-id="text-editor">
  699 + <state relative-caret-position="204">
  700 + <caret line="20" column="58" selection-start-line="20" selection-start-column="58" selection-end-line="20" selection-end-column="58" />
  701 + </state>
  702 + </provider>
  703 + </entry>
703 <entry file="file://$PROJECT_DIR$/application/extra/wechat.php"> 704 <entry file="file://$PROJECT_DIR$/application/extra/wechat.php">
704 <provider selected="true" editor-type-id="text-editor"> 705 <provider selected="true" editor-type-id="text-editor">
705 <state relative-caret-position="306"> 706 <state relative-caret-position="306">
@@ -717,22 +718,32 @@ @@ -717,22 +718,32 @@
717 </state> 718 </state>
718 </provider> 719 </provider>
719 </entry> 720 </entry>
  721 + <entry file="file://$PROJECT_DIR$/application/home/controller/Index.php">
  722 + <provider selected="true" editor-type-id="text-editor">
  723 + <state relative-caret-position="306">
  724 + <caret line="23" column="34" selection-start-line="23" selection-start-column="34" selection-end-line="23" selection-end-column="34" />
  725 + <folding>
  726 + <element signature="e#128#165#0#PHP" expanded="true" />
  727 + </folding>
  728 + </state>
  729 + </provider>
  730 + </entry>
720 <entry file="file://$PROJECT_DIR$/application/home/controller/User.php"> 731 <entry file="file://$PROJECT_DIR$/application/home/controller/User.php">
721 <provider selected="true" editor-type-id="text-editor"> 732 <provider selected="true" editor-type-id="text-editor">
722 - <state relative-caret-position="436">  
723 - <caret line="154" column="33" selection-start-line="154" selection-start-column="20" selection-end-line="154" selection-end-column="33" /> 733 + <state relative-caret-position="623">
  734 + <caret line="84" column="34" lean-forward="true" selection-start-line="84" selection-start-column="34" selection-end-line="84" selection-end-column="34" />
724 <folding> 735 <folding>
725 <element signature="e#128#160#0#PHP" expanded="true" /> 736 <element signature="e#128#160#0#PHP" expanded="true" />
726 </folding> 737 </folding>
727 </state> 738 </state>
728 </provider> 739 </provider>
729 </entry> 740 </entry>
730 - <entry file="file://$PROJECT_DIR$/application/home/controller/Index.php"> 741 + <entry file="file://$PROJECT_DIR$/application/home/model/User.php">
731 <provider selected="true" editor-type-id="text-editor"> 742 <provider selected="true" editor-type-id="text-editor">
732 - <state relative-caret-position="306">  
733 - <caret line="23" column="47" selection-start-line="23" selection-start-column="47" selection-end-line="23" selection-end-column="47" /> 743 + <state relative-caret-position="493">
  744 + <caret line="34" column="17" selection-start-line="34" selection-start-column="17" selection-end-line="34" selection-end-column="17" />
734 <folding> 745 <folding>
735 - <element signature="e#128#165#0#PHP" expanded="true" /> 746 + <element signature="e#125#138#0#PHP" expanded="true" />
736 </folding> 747 </folding>
737 </state> 748 </state>
738 </provider> 749 </provider>
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 namespace app\home\model; 9 namespace app\home\model;
10 10
11 11
  12 +use think\Db;
12 use think\Model; 13 use think\Model;
13 14
14 class User extends Model 15 class User extends Model
@@ -21,4 +22,21 @@ class User extends Model @@ -21,4 +22,21 @@ class User extends Model
21 $result = $this->where($where)->update($data); 22 $result = $this->where($where)->update($data);
22 return $result; 23 return $result;
23 } 24 }
  25 + public function getUserInfo($where=[]){
  26 + if(empty($where)){
  27 + $userId=get_current_user_id();
  28 + $appId=config('wx_app_id');
  29 + $where=['user_id'=>$userId,'app_id'=>$appId];
  30 + }
  31 +
  32 + if(empty($where)){
  33 + redirect('/');
  34 + }
  35 + $user= Db::name("third")->alias('b')
  36 + ->join('__USER__ a','a.id=b.user_id','LEFT')
  37 + ->field('a.*,b.openid,b.union_id')
  38 + ->where($where)
  39 + ->find();
  40 + return $user;
  41 + }
24 } 42 }