唐金木 4 months ago
parent
commit
1466fe45dd
64 changed files with 3680 additions and 2218 deletions
  1. BIN
      BTS需求.docx
  2. 381 257
      php/.idea/workspace.xml
  3. 9 5
      php/adddata.sql
  4. 176 1
      php/app/admin/controller/Contents.php
  5. 126 10
      php/app/admin/controller/Finance.php
  6. 23 1
      php/app/admin/controller/Order.php
  7. 0 6
      php/app/admin/controller/Uploads.php
  8. 346 0
      php/app/common/controller/Orde.php
  9. 68 13
      php/app/common/controller/Upfile.php
  10. 115 7
      php/app/web/controller/Index.php
  11. 119 79
      php/app/web/controller/Login.php
  12. 86 20
      php/app/web/controller/My.php
  13. 33 0
      php/app/web/model/Msg.php
  14. 168 25
      php/app/web/model/Orders.php
  15. 89 0
      php/app/web/model/Team.php
  16. 7 2
      php/app/web/model/Tripartite.php
  17. 25 5
      php/app/worker/controller/User.php
  18. 2 5
      php/app/worker/controller/Worker.php
  19. 2 2
      php/config/worker.php
  20. BIN
      php/public/storage/uploads/20200604/0b0c8564134f4a92f63dad9192b3b112.png
  21. BIN
      php/public/storage/uploads/20200604/85434915092c98dfa7f74f58935106e7.png
  22. BIN
      php/public/storage/uploads/20200604/cd0c3c0ebc3556350a599c30ed75728d.png
  23. BIN
      php/public/storage/uploads/20200605/1a1f59791758db0a4190bc1397c99a73.png
  24. BIN
      php/public/storage/uploads/20200605/b52d2c1668b5981acab2241a718e310a.png
  25. BIN
      php/public/storage/uploads/20200605/b5d9bcc4e2946ca11a148e987373a11c.png
  26. BIN
      php/public/storage/uploads/20200605/e177173569c8f6a9ce7b3190404acc19.png
  27. BIN
      php/public/storage/uploads/20200605/f2726178525e3ee998b0be048110d8e6.png
  28. 0 21
      php/runtime/admin/log/202006/01.log
  29. 0 245
      php/runtime/admin/log/202006/02.log
  30. 65 0
      php/runtime/admin/log/202006/05.log
  31. 0 139
      php/runtime/admin/temp/01e433db5e5517b7a2c4587da42797aa.php
  32. 0 185
      php/runtime/admin/temp/14d50cc59972e0ab82b71f4b5f381353.php
  33. 0 147
      php/runtime/admin/temp/193b3c530962981d3a4dc850749aaa8b.php
  34. 167 0
      php/runtime/admin/temp/39d9de22916a73242cce373af9cf2c36.php
  35. 0 182
      php/runtime/admin/temp/42d182ba955a14984e138f63987ed1b0.php
  36. 183 0
      php/runtime/admin/temp/67d40489a97bd6c8b7b2927ecc1d4082.php
  37. 0 148
      php/runtime/admin/temp/a43dd06f39d809c109c800ec9d9d065a.php
  38. 0 145
      php/runtime/admin/temp/a5b87fd77913dd9b0ad9dd783203b8ce.php
  39. 0 157
      php/runtime/admin/temp/a8ba287c844b92a9904d92bc00486605.php
  40. 0 111
      php/runtime/admin/temp/a8f8b134a87427ac15fa2ed97d90c5b0.php
  41. 0 152
      php/runtime/admin/temp/b04ecd3398bf75dee5dd9dee974fadba.php
  42. 167 0
      php/runtime/admin/temp/ca2a1c6a34a40cc7108b2a51083f5651.php
  43. 0 122
      php/runtime/ap/log/202006/01.log
  44. 0 4
      php/runtime/cache/0b/dc60c1eb9bd2792cd1fa7f85d9c865.php
  45. 0 4
      php/runtime/cache/b5/0db2208db974a3bc060e4d7255aa98.php
  46. 0 4
      php/runtime/cache/ca/361393b5a02e8a62e8dd6d5373a473.php
  47. 0 0
      php/runtime/session/sess_704f72601738fb3cc6160a8139fa9ef3
  48. BIN
      php/runtime/session/sess_ab4726e650d984353a6b41b449abf891
  49. 2 0
      php/vendor/workerman/workerman.log
  50. 1 1
      php/view/admin/contents/about.html
  51. 2 3
      php/view/admin/contents/add.html
  52. 87 0
      php/view/admin/contents/addhlep.html
  53. 87 0
      php/view/admin/contents/addmsg.html
  54. 12 4
      php/view/admin/contents/feedback.html
  55. 137 0
      php/view/admin/contents/hlep.html
  56. 5 5
      php/view/admin/contents/index.html
  57. 111 0
      php/view/admin/contents/push.html
  58. 157 0
      php/view/admin/contents/sysmsg.html
  59. 141 0
      php/view/admin/finance/daili.html
  60. 157 0
      php/view/admin/finance/shenhe.html
  61. 141 0
      php/view/admin/finance/tongji.html
  62. 141 0
      php/view/admin/finance/zhengshon.html
  63. 141 0
      php/view/admin/order/buy.html
  64. 1 1
      php/view/admin/system/index.html

BIN
BTS需求.docx


+ 381 - 257
php/.idea/workspace.xml

@@ -1,7 +1,47 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project version="4">
   <component name="ChangeListManager">
-    <list default="true" id="52cc2ceb-e100-4a5f-a9e2-bb6b61bdbebd" name="Default Changelist" comment="" />
+    <list default="true" id="52cc2ceb-e100-4a5f-a9e2-bb6b61bdbebd" name="Default Changelist" comment="">
+      <change beforePath="$PROJECT_DIR$/../BTS需求.docx" beforeDir="false" afterPath="$PROJECT_DIR$/../BTS需求.docx" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/adddata.sql" beforeDir="false" afterPath="$PROJECT_DIR$/adddata.sql" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/admin/controller/Contents.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/admin/controller/Contents.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/admin/controller/Finance.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/admin/controller/Finance.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/admin/controller/Order.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/admin/controller/Order.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/admin/controller/Uploads.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/admin/controller/Uploads.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/common/controller/Upfile.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/common/controller/Upfile.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/web/controller/Index.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/web/controller/Index.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/web/controller/Login.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/web/controller/Login.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/web/controller/My.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/web/controller/My.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/web/model/Orders.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/web/model/Orders.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/web/model/Tripartite.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/web/model/Tripartite.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/worker/controller/User.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/worker/controller/User.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/app/worker/controller/Worker.php" beforeDir="false" afterPath="$PROJECT_DIR$/app/worker/controller/Worker.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/config/worker.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/worker.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/runtime/admin/log/202006/01.log" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/runtime/admin/log/202006/02.log" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/runtime/admin/temp/01e433db5e5517b7a2c4587da42797aa.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/runtime/admin/temp/14d50cc59972e0ab82b71f4b5f381353.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/runtime/admin/temp/193b3c530962981d3a4dc850749aaa8b.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/runtime/admin/temp/42d182ba955a14984e138f63987ed1b0.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/runtime/admin/temp/a43dd06f39d809c109c800ec9d9d065a.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/runtime/admin/temp/a5b87fd77913dd9b0ad9dd783203b8ce.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/runtime/admin/temp/a8ba287c844b92a9904d92bc00486605.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/runtime/admin/temp/a8f8b134a87427ac15fa2ed97d90c5b0.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/runtime/admin/temp/b04ecd3398bf75dee5dd9dee974fadba.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/runtime/ap/log/202006/01.log" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/runtime/cache/0b/dc60c1eb9bd2792cd1fa7f85d9c865.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/runtime/cache/b5/0db2208db974a3bc060e4d7255aa98.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/runtime/cache/ca/361393b5a02e8a62e8dd6d5373a473.php" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/runtime/session/sess_3f972420e5bb26ed1e69c519f52d4119" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/runtime/session/sess_ab4726e650d984353a6b41b449abf891" beforeDir="false" />
+      <change beforePath="$PROJECT_DIR$/vendor/workerman/workerman.log" beforeDir="false" afterPath="$PROJECT_DIR$/vendor/workerman/workerman.log" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/view/admin/contents/about.html" beforeDir="false" afterPath="$PROJECT_DIR$/view/admin/contents/about.html" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/view/admin/contents/add.html" beforeDir="false" afterPath="$PROJECT_DIR$/view/admin/contents/add.html" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/view/admin/contents/feedback.html" beforeDir="false" afterPath="$PROJECT_DIR$/view/admin/contents/feedback.html" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/view/admin/contents/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/view/admin/contents/index.html" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/view/admin/system/index.html" beforeDir="false" afterPath="$PROJECT_DIR$/view/admin/system/index.html" afterDir="false" />
+    </list>
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -11,39 +51,50 @@
   <component name="ComposerSettings" doNotAsk="true" synchronizationState="SYNCHRONIZE">
     <pharConfigPath>$PROJECT_DIR$/composer.json</pharConfigPath>
   </component>
-  <component name="DockManager">
-    <window id="1">
-      <content type="file-editors">
-        <state>
-          <leaf>
-            <file pinned="false" current-in-tab="true">
-              <entry file="file://$PROJECT_DIR$/adddata.sql">
-                <provider selected="true" editor-type-id="text-editor">
-                  <state relative-caret-position="976">
-                    <caret line="268" lean-forward="true" selection-start-line="268" selection-end-line="268" />
-                  </state>
-                </provider>
-              </entry>
-            </file>
-          </leaf>
-        </state>
-      </content>
-    </window>
-  </component>
   <component name="FileEditorManager">
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
-      <file pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/app/web/controller/Login.php">
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/app/admin/controller/Finance.php">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="320">
-              <caret line="21" lean-forward="true" selection-start-line="21" selection-end-line="21" />
+            <state relative-caret-position="207">
+              <caret line="145" column="7" lean-forward="true" selection-start-line="145" selection-start-column="7" selection-end-line="167" selection-end-column="29" />
               <folding>
-                <element signature="e#99#132#0#PHP" expanded="true" />
+                <element signature="e#102#133#0#PHP" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/app/admin/controller/Order.php">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="451">
+              <caret line="36" column="72" selection-start-line="36" selection-start-column="72" selection-end-line="36" selection-end-column="72" />
+              <folding>
+                <element signature="e#102#127#0#PHP" expanded="true" />
+              </folding>
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/view/admin/order/buy.html">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="368">
+              <caret line="52" column="9" lean-forward="true" selection-start-line="52" selection-start-column="9" selection-end-line="52" selection-end-column="9" />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/view/admin/contents/hlep.html">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="221">
+              <caret line="49" selection-start-line="49" selection-end-line="52" selection-end-column="9" />
+            </state>
+          </provider>
+        </entry>
+      </file>
     </leaf>
   </component>
   <component name="FileTemplateManagerImpl">
@@ -56,25 +107,6 @@
   </component>
   <component name="FindInProjectRecents">
     <findStrings>
-      <find>outvodeo</find>
-      <find>delAll</find>
-      <find>all_reject</find>
-      <find>switch</find>
-      <find>status</find>
-      <find>reject</find>
-      <find>all_agree</find>
-      <find>cancel_sign</find>
-      <find>$system</find>
-      <find>video</find>
-      <find>submit</find>
-      <find>student_id</find>
-      <find>aliyuncs/oss-sdk-php</find>
-      <find>userLevel</find>
-      <find>lay-skin</find>
-      <find>auth_open</find>
-      <find>lay-filter</find>
-      <find>search</find>
-      <find>UploadedFile</find>
       <find>addBtn</find>
       <find>factory</find>
       <find>init</find>
@@ -84,8 +116,27 @@
       <find>resultset_type</find>
       <find>main</find>
       <find>lm_finance</find>
-      <find>feedback</find>
+      <find>problem</find>
+      <find>DataHelper</find>
+      <find>add_time</find>
       <find>Message</find>
+      <find>可售额度</find>
+      <find>Problem</find>
+      <find>vendibility</find>
+      <find>Order</find>
+      <find>Mining</find>
+      <find>$user</find>
+      <find>breach_money</find>
+      <find>General</find>
+      <find>通证</find>
+      <find>enlarge_quota</find>
+      <find>order_buy</find>
+      <find>264</find>
+      <find>addbanner</find>
+      <find>form-config</find>
+      <find>logoBtn</find>
+      <find>logo</find>
+      <find>feedback</find>
     </findStrings>
     <dirStrings>
       <dir>D:\phpstudy_pro\WWW\small\syyxy\php</dir>
@@ -97,35 +148,8 @@
   <component name="IdeDocumentHistory">
     <option name="CHANGED_PATHS">
       <list>
-        <option value="$PROJECT_DIR$/config/database.php" />
-        <option value="$PROJECT_DIR$/app/common.php" />
-        <option value="$PROJECT_DIR$/app/middleware/Token.php" />
-        <option value="$PROJECT_DIR$/app/ap/route/api.php" />
-        <option value="$PROJECT_DIR$/app/ap/controller/Login.php" />
-        <option value="$PROJECT_DIR$/.env" />
-        <option value="$PROJECT_DIR$/app/admin/controller/Index.php" />
-        <option value="$PROJECT_DIR$/app/worker/controller/User.php" />
-        <option value="$PROJECT_DIR$/app/worker/controller/Worker.php" />
-        <option value="$PROJECT_DIR$/view/admin/contents/feedback.html" />
-        <option value="$PROJECT_DIR$/app/admin/controller/Contents.php" />
-        <option value="$PROJECT_DIR$/app/admin/controller/Information.php" />
-        <option value="$PROJECT_DIR$/app/admin/controller/Agent.php" />
-        <option value="$PROJECT_DIR$/app/admin/controller/Certificate.php" />
-        <option value="$PROJECT_DIR$/app/admin/controller/Order.php" />
-        <option value="$PROJECT_DIR$/app/admin/controller/Finance.php" />
-        <option value="$PROJECT_DIR$/app/admin/controller/Usermanage.php" />
-        <option value="$PROJECT_DIR$/app/common/model/User.php" />
-        <option value="$PROJECT_DIR$/app/common/model/ConfigGroup.php" />
-        <option value="$PROJECT_DIR$/app/common/model/About.php" />
-        <option value="$PROJECT_DIR$/app/common/model/Banner.php" />
-        <option value="$PROJECT_DIR$/app/common/model/Bond.php" />
-        <option value="$PROJECT_DIR$/app/common/model/BondFinance.php" />
-        <option value="$PROJECT_DIR$/app/common/model/CommissionFinance.php" />
-        <option value="$PROJECT_DIR$/app/common/model/Feedback.php" />
-        <option value="$PROJECT_DIR$/app/common/model/Finance.php" />
         <option value="$PROJECT_DIR$/app/common/model/GeneralFinance.php" />
         <option value="$PROJECT_DIR$/app/common/model/GeneralTransfer.php" />
-        <option value="$PROJECT_DIR$/app/common/model/Message.php" />
         <option value="$PROJECT_DIR$/app/common/model/Mining.php" />
         <option value="$PROJECT_DIR$/app/common/model/Notice.php" />
         <option value="$PROJECT_DIR$/app/common/model/Order.php" />
@@ -139,15 +163,42 @@
         <option value="$PROJECT_DIR$/app/common/model/VendibilityFinance.php" />
         <option value="$PROJECT_DIR$/app/web/controller/Base.php" />
         <option value="$PROJECT_DIR$/app/web/model/Code.php" />
-        <option value="$PROJECT_DIR$/app/web/model/Tripartite.php" />
         <option value="$PROJECT_DIR$/app/web/model/Back.php" />
         <option value="$PROJECT_DIR$/app/web/model/Order.php" />
+        <option value="$PROJECT_DIR$/app/web/model/Tripartite.php" />
+        <option value="$PROJECT_DIR$/app/admin/controller/Uploads.php" />
         <option value="$PROJECT_DIR$/app/common/controller/Upfile.php" />
-        <option value="$PROJECT_DIR$/app/web/controller/Login.php" />
+        <option value="$PROJECT_DIR$/app/common/model/Message.php" />
+        <option value="$PROJECT_DIR$/app/web/model/Team.php" />
+        <option value="$PROJECT_DIR$/app/web/model/Msg.php" />
         <option value="$PROJECT_DIR$/adddata.sql" />
+        <option value="$PROJECT_DIR$/app/web/controller/Login.php" />
         <option value="$PROJECT_DIR$/app/web/model/Orders.php" />
         <option value="$PROJECT_DIR$/app/web/controller/Index.php" />
+        <option value="$PROJECT_DIR$/config/worker.php" />
+        <option value="$PROJECT_DIR$/app/worker/controller/User.php" />
+        <option value="$PROJECT_DIR$/app/worker/controller/Worker.php" />
+        <option value="$PROJECT_DIR$/view/admin/contents/add.html" />
+        <option value="$PROJECT_DIR$/view/admin/contents/index.html" />
+        <option value="$PROJECT_DIR$/view/admin/contents/feedback.html" />
+        <option value="$PROJECT_DIR$/view/admin/contents/addhlep.html" />
+        <option value="$PROJECT_DIR$/view/admin/contents/hlep.html" />
+        <option value="$PROJECT_DIR$/view/admin/contents/about.html" />
         <option value="$PROJECT_DIR$/app/web/controller/My.php" />
+        <option value="$PROJECT_DIR$/view/admin/system/index.html" />
+        <option value="$PROJECT_DIR$/view/admin/contents/push.html" />
+        <option value="$PROJECT_DIR$/view/admin/contents/sysmsg.html" />
+        <option value="$PROJECT_DIR$/view/admin/contents/addmsg.html" />
+        <option value="$PROJECT_DIR$/app/admin/controller/Contents.php" />
+        <option value="$PROJECT_DIR$/view/admin/finance/tongji.html" />
+        <option value="$PROJECT_DIR$/view/admin/finance/shenhe.html" />
+        <option value="$PROJECT_DIR$/app/common/controller/Orde.php" />
+        <option value="$PROJECT_DIR$/view/admin/finance/daili.html" />
+        <option value="$PROJECT_DIR$/app/admin/controller/Finance.php" />
+        <option value="$PROJECT_DIR$/view/admin/finance/zhengshon.html" />
+        <option value="$PROJECT_DIR$/view/admin/order/daili.html" />
+        <option value="$PROJECT_DIR$/app/admin/controller/Order.php" />
+        <option value="$PROJECT_DIR$/view/admin/order/buy.html" />
       </list>
     </option>
   </component>
@@ -270,15 +321,52 @@
               <item name="php" type="b2602c69:ProjectViewProjectNode" />
               <item name="php" type="462c0819:PsiDirectoryNode" />
               <item name="app" type="462c0819:PsiDirectoryNode" />
-              <item name="web" type="462c0819:PsiDirectoryNode" />
+              <item name="admin" type="462c0819:PsiDirectoryNode" />
             </path>
             <path>
               <item name="php" type="b2602c69:ProjectViewProjectNode" />
               <item name="php" type="462c0819:PsiDirectoryNode" />
               <item name="app" type="462c0819:PsiDirectoryNode" />
-              <item name="web" type="462c0819:PsiDirectoryNode" />
+              <item name="admin" type="462c0819:PsiDirectoryNode" />
               <item name="controller" type="462c0819:PsiDirectoryNode" />
             </path>
+            <path>
+              <item name="php" type="b2602c69:ProjectViewProjectNode" />
+              <item name="php" type="462c0819:PsiDirectoryNode" />
+              <item name="public" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="php" type="b2602c69:ProjectViewProjectNode" />
+              <item name="php" type="462c0819:PsiDirectoryNode" />
+              <item name="view" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="php" type="b2602c69:ProjectViewProjectNode" />
+              <item name="php" type="462c0819:PsiDirectoryNode" />
+              <item name="view" type="462c0819:PsiDirectoryNode" />
+              <item name="admin" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="php" type="b2602c69:ProjectViewProjectNode" />
+              <item name="php" type="462c0819:PsiDirectoryNode" />
+              <item name="view" type="462c0819:PsiDirectoryNode" />
+              <item name="admin" type="462c0819:PsiDirectoryNode" />
+              <item name="contents" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="php" type="b2602c69:ProjectViewProjectNode" />
+              <item name="php" type="462c0819:PsiDirectoryNode" />
+              <item name="view" type="462c0819:PsiDirectoryNode" />
+              <item name="admin" type="462c0819:PsiDirectoryNode" />
+              <item name="finance" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="php" type="b2602c69:ProjectViewProjectNode" />
+              <item name="php" type="462c0819:PsiDirectoryNode" />
+              <item name="view" type="462c0819:PsiDirectoryNode" />
+              <item name="admin" type="462c0819:PsiDirectoryNode" />
+              <item name="order" type="462c0819:PsiDirectoryNode" />
+            </path>
           </expand>
           <select />
         </subPane>
@@ -301,19 +389,19 @@
     <property name="settings.editor.selected.configurable" value="Docker" />
   </component>
   <component name="RecentsManager">
+    <key name="CopyFile.RECENT_KEYS">
+      <recent name="D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\order" />
+      <recent name="D:\phpstudy_pro\WWW\cxy\bts\php\view\admin\finance" />
+      <recent name="D:\phpstudy_pro\WWW\cxy\bts\php\app\common\controller" />
+      <recent name="D:\phpstudy_pro\WWW\cxy\bts\php\app\admin\controller" />
+      <recent name="D:\phpstudy_pro\WWW\my\fuye\php\app\ap\config" />
+    </key>
     <key name="MoveFile.RECENT_KEYS">
       <recent name="D:\phpstudy_pro\WWW\company\any_admin\public\static\admin\images" />
       <recent name="D:\phpstudy_pro\WWW\small\syyxy\php\public\static\plugins\layui\extend\city" />
       <recent name="D:\phpstudy_pro\WWW\small\syyxy\php\app\index\controller" />
       <recent name="D:\phpstudy_pro\WWW\small\syyxy\php\public\static\plugins\selectmenu" />
     </key>
-    <key name="CopyFile.RECENT_KEYS">
-      <recent name="D:\phpstudy_pro\WWW\cxy\bts\php\app\common\controller" />
-      <recent name="D:\phpstudy_pro\WWW\cxy\bts\php\app\admin\controller" />
-      <recent name="D:\phpstudy_pro\WWW\my\fuye\php\app\ap\config" />
-      <recent name="D:\phpstudy_pro\WWW\my\fuye\php\app\ap\route" />
-      <recent name="D:\phpstudy_pro\WWW\my\fuye\php\app\ap" />
-    </key>
   </component>
   <component name="RunDashboard">
     <option name="ruleStates">
@@ -426,18 +514,20 @@
       <workItem from="1590714534675" duration="25886000" />
       <workItem from="1590983110728" duration="16565000" />
       <workItem from="1591065028261" duration="19190000" />
-      <workItem from="1591146974136" duration="25342000" />
+      <workItem from="1591146974136" duration="26205000" />
+      <workItem from="1591232554457" duration="31102000" />
+      <workItem from="1591318731601" duration="30185000" />
     </task>
     <servers />
   </component>
   <component name="TimeTrackingManager">
-    <option name="totallyTimeSpent" value="726537000" />
+    <option name="totallyTimeSpent" value="788687000" />
   </component>
   <component name="ToolWindowManager">
     <frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
     <editor active="true" />
     <layout>
-      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.22334754" />
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.22547974" />
       <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
       <window_info id="Favorites" order="2" side_tool="true" />
       <window_info anchor="bottom" id="Message" order="0" />
@@ -450,7 +540,7 @@
       <window_info anchor="bottom" id="Docker" order="7" weight="0.329718" />
       <window_info anchor="bottom" id="Database Changes" order="8" />
       <window_info anchor="bottom" id="Version Control" order="9" weight="0.3290993" />
-      <window_info anchor="bottom" id="Terminal" order="10" weight="0.22342733" />
+      <window_info anchor="bottom" id="Terminal" order="10" weight="0.28199565" />
       <window_info anchor="bottom" id="Event Log" order="11" side_tool="true" />
       <window_info anchor="bottom" id="File Transfer" order="12" visible="true" weight="0.056399133" />
       <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
@@ -511,384 +601,418 @@
           <line>6</line>
           <option name="timeStamp" value="6" />
         </line-breakpoint>
+        <line-breakpoint enabled="true" type="php">
+          <url>file://$PROJECT_DIR$/app/web/model/Team.php</url>
+          <line>66</line>
+          <option name="timeStamp" value="7" />
+        </line-breakpoint>
       </breakpoints>
     </breakpoint-manager>
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/app/admin/controller/Information.php">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="207">
-          <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$/app/admin/controller/Usermanage.php">
+    <entry file="file://$PROJECT_DIR$/app/admin/controller/Article.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="528">
-          <caret line="50" column="12" selection-start-line="50" selection-start-column="12" selection-end-line="50" selection-end-column="12" />
+        <state relative-caret-position="483">
+          <caret line="37" column="76" selection-start-line="37" selection-start-column="27" selection-end-line="37" selection-end-column="76" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/admin/controller/Agent.php">
+    <entry file="file://$PROJECT_DIR$/vendor/topthink/think-orm/src/Model.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="528">
-          <caret line="54" column="1" selection-start-line="54" selection-start-column="1" selection-end-line="54" selection-end-column="1" />
+        <state relative-caret-position="612">
+          <caret line="861" column="19" selection-start-line="861" selection-start-column="19" selection-end-line="861" selection-end-column="19" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/admin/controller/Certificate.php">
+    <entry file="file://$PROJECT_DIR$/app/common.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="390">
-          <caret line="24" column="12" selection-start-line="24" selection-start-column="12" selection-end-line="24" selection-end-column="12" />
+        <state relative-caret-position="529">
+          <caret line="238" column="49" selection-start-line="238" selection-start-column="38" selection-end-line="238" selection-end-column="49" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/admin/controller/Order.php">
+    <entry file="file://$PROJECT_DIR$/app/web/controller/Base.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="391">
-          <caret line="31" column="7" selection-start-line="31" selection-start-column="7" selection-end-line="31" selection-end-column="7" />
+        <state relative-caret-position="207">
+          <caret line="14" column="1" lean-forward="true" selection-start-line="14" selection-start-column="1" selection-end-line="14" selection-end-column="1" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/admin/controller/Finance.php">
+    <entry file="file://$PROJECT_DIR$/app/common/controller/Backend.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="137">
-          <caret line="34" column="30" lean-forward="true" selection-start-line="34" selection-start-column="30" selection-end-line="34" selection-end-column="30" />
+        <state relative-caret-position="345">
+          <caret line="33" column="32" lean-forward="true" selection-start-line="33" selection-start-column="32" selection-end-line="33" selection-end-column="32" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/FieldType.php">
+    <entry file="file://$PROJECT_DIR$/app/common/controller/Upfile.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="92">
-          <caret line="4" lean-forward="true" selection-start-line="4" selection-end-line="4" />
+        <state relative-caret-position="207">
+          <caret line="50" column="29" selection-start-line="50" selection-start-column="29" selection-end-line="50" selection-end-column="29" />
           <folding>
-            <element signature="e#37#65#0#PHP" expanded="true" />
+            <element signature="e#103#128#0#PHP" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/ConfigGroup.php">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="46">
-          <caret line="2" column="15" selection-start-line="2" selection-start-column="15" selection-end-line="2" selection-end-column="15" />
-        </state>
-      </provider>
+    <entry file="file://$PROJECT_DIR$/public/storage/uploads/20200604/0b0c8564134f4a92f63dad9192b3b112.png">
+      <provider selected="true" editor-type-id="images" />
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/Config.php">
-      <provider selected="true" editor-type-id="text-editor" />
+    <entry file="file://$PROJECT_DIR$/public/storage/uploads/20200604/85434915092c98dfa7f74f58935106e7.png">
+      <provider selected="true" editor-type-id="images" />
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/BaseModel.php">
+    <entry file="file://$PROJECT_DIR$/app/admin/controller/Uploads.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="229">
-          <caret line="13" column="41" lean-forward="true" selection-start-line="13" selection-start-column="41" selection-end-line="13" selection-end-column="41" />
-          <folding>
-            <element signature="e#37#61#0#PHP" expanded="true" />
-          </folding>
+        <state relative-caret-position="207">
+          <caret line="19" selection-start-line="19" selection-end-line="19" selection-end-column="27" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/Common.php">
+    <entry file="file://$PROJECT_DIR$/app/common/model/Problem.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="138">
-          <caret line="6" column="26" selection-start-line="6" selection-start-column="26" selection-end-line="6" selection-end-column="26" />
+        <state relative-caret-position="207">
+          <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$/app/common/model/User.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="161">
-          <caret line="7" column="26" lean-forward="true" selection-start-line="7" selection-start-column="12" selection-end-line="7" selection-end-column="26" />
+        <state relative-caret-position="207">
+          <caret line="9" selection-start-line="9" selection-end-line="12" selection-end-column="5" />
           <folding>
             <element signature="e#6#47#0#PHP" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/About.php">
+    <entry file="file://$PROJECT_DIR$/app/common/model/Message.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="184">
-          <caret line="13" lean-forward="true" selection-start-line="13" selection-end-line="13" />
+        <state relative-caret-position="253">
+          <caret line="11" column="9" selection-start-line="11" selection-start-column="9" selection-end-line="11" selection-end-column="9" />
+          <folding>
+            <element signature="e#6#65#0#PHP" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/Banner.php">
+    <entry file="file://$PROJECT_DIR$/vendor/topthink/think-orm/src/db/BaseQuery.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="138">
-          <caret line="11" column="28" selection-start-line="11" selection-start-column="28" selection-end-line="11" selection-end-column="28" />
+        <state relative-caret-position="368">
+          <caret line="594" selection-start-line="594" selection-end-line="594" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/Bond.php">
+    <entry file="file://$PROJECT_DIR$/app/web/model/Tripartite.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="138">
-          <caret line="11" column="25" selection-start-line="11" selection-start-column="25" selection-end-line="11" selection-end-column="25" />
+        <state relative-caret-position="437">
+          <caret line="27" column="14" selection-start-line="27" selection-start-column="14" selection-end-line="27" selection-end-column="14" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/BondFinance.php">
+    <entry file="file://$PROJECT_DIR$/app/web/model/Team.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="138">
-          <caret line="11" column="33" selection-start-line="11" selection-start-column="33" selection-end-line="11" selection-end-column="33" />
+        <state relative-caret-position="598">
+          <caret line="31" column="33" selection-start-line="31" selection-start-column="27" selection-end-line="31" selection-end-column="33" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/CommissionFinance.php">
+    <entry file="file://$PROJECT_DIR$/app/web/model/Back.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="138">
-          <caret line="11" column="39" selection-start-line="11" selection-start-column="39" selection-end-line="11" selection-end-column="39" />
+        <state relative-caret-position="759">
+          <caret line="40" column="48" selection-start-line="40" selection-start-column="34" selection-end-line="40" selection-end-column="48" />
+          <folding>
+            <element signature="e#95#123#0#PHP" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/Feedback.php">
+    <entry file="file://$PROJECT_DIR$/app/web/model/Msg.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="138">
-          <caret line="11" column="29" selection-start-line="11" selection-start-column="29" selection-end-line="11" selection-end-column="29" />
+        <state relative-caret-position="483">
+          <caret line="26" column="24" selection-start-line="26" selection-start-column="24" selection-end-line="26" selection-end-column="24" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/Finance.php">
+    <entry file="file://$PROJECT_DIR$/app/common/model/VendibilityFinance.php">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="138">
-          <caret line="11" column="29" selection-start-line="11" selection-start-column="29" selection-end-line="11" selection-end-column="29" />
+          <caret line="11" column="6" selection-start-line="11" selection-start-column="6" selection-end-line="11" selection-end-column="6" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/GeneralFinance.php">
+    <entry file="file://$PROJECT_DIR$/app/web/model/Orders.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="138">
-          <caret line="11" column="36" selection-start-line="11" selection-start-column="36" selection-end-line="11" selection-end-column="36" />
+        <state relative-caret-position="314">
+          <caret line="104" column="13" selection-start-line="104" selection-start-column="13" selection-end-line="104" selection-end-column="13" />
+          <folding>
+            <element signature="e#95#126#0#PHP" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/GeneralTransfer.php">
+    <entry file="file://$PROJECT_DIR$/app/web/controller/Login.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="138">
-          <caret line="11" column="37" selection-start-line="11" selection-start-column="37" selection-end-line="11" selection-end-column="37" />
+        <state relative-caret-position="23">
+          <caret line="35" selection-start-line="35" selection-end-line="36" />
+          <folding>
+            <element signature="e#99#132#0#PHP" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/Message.php">
+    <entry file="file://$PROJECT_DIR$/app/web/controller/Index.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="138">
-          <caret line="11" column="29" selection-start-line="11" selection-start-column="29" selection-end-line="11" selection-end-column="29" />
+        <state relative-caret-position="275">
+          <caret line="95" selection-start-line="95" selection-end-line="95" />
+          <folding>
+            <element signature="e#100#131#0#PHP" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/Mining.php">
+    <entry file="file://$PROJECT_DIR$/config/worker_server.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="138">
-          <caret line="11" column="28" selection-start-line="11" selection-start-column="28" selection-end-line="11" selection-end-column="28" />
+        <state relative-caret-position="276">
+          <caret line="23" column="44" lean-forward="true" selection-start-line="23" selection-start-column="8" selection-end-line="23" selection-end-column="44" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/Notice.php">
+    <entry file="file://$PROJECT_DIR$/config/worker.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="138">
-          <caret line="11" column="28" selection-start-line="11" selection-start-column="28" selection-end-line="11" selection-end-column="28" />
+        <state relative-caret-position="359">
+          <caret line="28" column="42" selection-start-line="28" selection-start-column="42" selection-end-line="28" selection-end-column="42" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/Order.php">
+    <entry file="file://$PROJECT_DIR$/composer.json">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="138">
-          <caret line="11" column="26" selection-start-line="11" selection-start-column="26" selection-end-line="11" selection-end-column="26" />
+          <caret line="18" column="6" selection-start-line="18" selection-start-column="6" selection-end-line="18" selection-end-column="6" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/OrderFrequency.php">
+    <entry file="file://$PROJECT_DIR$/app/worker/controller/User.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="138">
-          <caret line="11" column="36" selection-start-line="11" selection-start-column="36" selection-end-line="11" selection-end-column="36" />
+        <state relative-caret-position="457">
+          <caret line="43" column="24" lean-forward="true" selection-start-line="43" selection-start-column="24" selection-end-line="43" selection-end-column="24" />
+          <folding>
+            <element signature="e#132#163#0#PHP" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/PhoneCode.php">
+    <entry file="file://$PROJECT_DIR$/app/worker/controller/Worker.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="138">
-          <caret line="11" column="30" selection-start-line="11" selection-start-column="30" selection-end-line="11" selection-end-column="30" />
+        <state relative-caret-position="414">
+          <caret line="23" column="14" lean-forward="true" selection-start-line="23" selection-start-column="14" selection-end-line="23" selection-end-column="14" />
+          <folding>
+            <element signature="e#132#162#0#PHP" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/Problem.php">
+    <entry file="file://$PROJECT_DIR$/view/admin/user/index.html">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="138">
-          <caret line="11" column="29" selection-start-line="11" selection-start-column="29" selection-end-line="11" selection-end-column="29" />
+        <state relative-caret-position="414">
+          <caret line="45" column="57" selection-start-line="45" selection-start-column="21" selection-end-line="45" selection-end-column="57" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/State.php">
+    <entry file="file://$PROJECT_DIR$/view/admin/user/add.html">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="138">
-          <caret line="11" column="27" selection-start-line="11" selection-start-column="27" selection-end-line="11" selection-end-column="27" />
+        <state relative-caret-position="230">
+          <caret line="19" column="12" selection-start-line="19" selection-start-column="12" selection-end-line="27" selection-end-column="18" />
+          <folding>
+            <element signature="n#style#0;n#span#0;n#!!top" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/System.php">
+    <entry file="file://$PROJECT_DIR$/app/admin/controller/User.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="138">
-          <caret line="11" column="27" selection-start-line="11" selection-start-column="27" selection-end-line="11" selection-end-column="27" />
+        <state relative-caret-position="299">
+          <caret line="67" column="8" selection-start-line="67" selection-start-column="8" selection-end-line="72" selection-end-column="28" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/UserLevel.php">
+    <entry file="file://$PROJECT_DIR$/view/admin/contents/add.html">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="138">
-          <caret line="11" column="31" selection-start-line="11" selection-start-column="31" selection-end-line="11" selection-end-column="31" />
+        <state relative-caret-position="230">
+          <caret line="22" column="18" selection-start-line="22" selection-start-column="18" selection-end-line="22" selection-end-column="18" />
+          <folding>
+            <element signature="n#style#0;n#span#0;n#!!top" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/UserMessage.php">
+    <entry file="file://$PROJECT_DIR$/view/admin/contents/about.html">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="138">
-          <caret line="11" column="32" selection-start-line="11" selection-start-column="32" selection-end-line="11" selection-end-column="32" />
+        <state relative-caret-position="345">
+          <caret line="15" column="41" selection-start-line="15" selection-start-column="41" selection-end-line="15" selection-end-column="41" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/model/VendibilityFinance.php">
+    <entry file="file://$PROJECT_DIR$/app/web/controller/My.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="207">
-          <caret line="14" column="1" lean-forward="true" selection-start-line="14" selection-start-column="1" selection-end-line="14" selection-end-column="1" />
+        <state relative-caret-position="60">
+          <caret line="426" column="34" lean-forward="true" selection-start-line="426" selection-start-column="34" selection-end-line="426" selection-end-column="34" />
+          <folding>
+            <element signature="e#100#131#0#PHP" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/controller/Backend.php">
+    <entry file="file://$PROJECT_DIR$/view/admin/system/index.html">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="69">
-          <caret line="33" column="32" lean-forward="true" selection-start-line="33" selection-start-column="32" selection-end-line="33" selection-end-column="32" />
+        <state relative-caret-position="285">
+          <caret line="248" column="53" selection-start-line="248" selection-start-column="8" selection-end-line="248" selection-end-column="53" />
+          <folding>
+            <element signature="n#style#0;n#span#0;n#!!top" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/controller/Base.php">
+    <entry file="file://$PROJECT_DIR$/view/admin/contents/push.html">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="276">
-          <caret line="24" column="51" selection-start-line="24" selection-start-column="51" selection-end-line="24" selection-end-column="51" />
+        <state relative-caret-position="115">
+          <caret line="56" selection-start-line="56" selection-end-line="56" />
+          <folding>
+            <element signature="n#style#0;n#span#0;n#!!top" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/web/model/Code.php">
+    <entry file="file://$PROJECT_DIR$/app/admin/controller/System.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="207">
-          <caret line="14" column="4" selection-start-line="14" selection-start-column="4" selection-end-line="14" selection-end-column="4" />
+        <state relative-caret-position="276">
+          <caret line="55" column="12" selection-start-line="55" selection-start-column="12" selection-end-line="57" selection-end-column="13" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/config/database.php">
+    <entry file="file://$PROJECT_DIR$/view/admin/contents/sysmsg.html">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="183">
-          <caret line="29" column="31" lean-forward="true" selection-start-line="29" selection-start-column="31" selection-end-line="29" selection-end-column="31" />
+        <state relative-caret-position="658">
+          <caret line="103" column="47" lean-forward="true" selection-start-line="103" selection-start-column="47" selection-end-line="103" selection-end-column="47" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/web/model/Back.php">
+    <entry file="file://$PROJECT_DIR$/view/admin/contents/addhlep.html">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="575">
-          <caret line="30" column="5" lean-forward="true" selection-start-line="30" selection-start-column="5" selection-end-line="30" selection-end-column="5" />
+        <state relative-caret-position="382">
+          <caret line="26" column="48" lean-forward="true" selection-end-line="86" selection-end-column="9" />
           <folding>
-            <element signature="e#95#123#0#PHP" expanded="true" />
+            <element signature="n#style#0;n#textarea#0;n#div#2;n#form#0;n#div#0;n#div#0;n#!!top" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/admin/controller/Article.php">
+    <entry file="file://$PROJECT_DIR$/view/admin/contents/addmsg.html">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="483">
-          <caret line="37" column="76" selection-start-line="37" selection-start-column="27" selection-end-line="37" selection-end-column="76" />
+        <state relative-caret-position="152">
+          <caret line="30" column="18" lean-forward="true" selection-start-line="30" selection-start-column="18" selection-end-line="30" selection-end-column="18" />
+          <folding>
+            <element signature="n#style#0;n#textarea#0;n#div#2;n#form#0;n#div#0;n#div#0;n#!!top" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/admin/controller/Uploads.php">
+    <entry file="file://$PROJECT_DIR$/app/admin/controller/Contents.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="-324">
-          <caret line="62" column="16" selection-start-line="62" selection-start-column="8" selection-end-line="62" selection-end-column="16" />
+        <state relative-caret-position="138">
+          <caret line="133" column="27" selection-start-line="133" selection-start-column="27" selection-end-line="133" selection-end-column="27" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common/controller/Upfile.php">
+    <entry file="file://$PROJECT_DIR$/view/admin/finance/tongji.html">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="552">
-          <caret line="29" column="9" lean-forward="true" selection-start-line="29" selection-start-column="9" selection-end-line="29" selection-end-column="9" />
+        <state relative-caret-position="152">
+          <caret line="75" column="43" selection-end-line="140" selection-end-column="9" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/web/model/Tripartite.php">
+    <entry file="file://$PROJECT_DIR$/view/admin/contents/index.html">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="451">
-          <caret line="25" column="32" selection-start-line="25" selection-start-column="28" selection-end-line="25" selection-end-column="32" />
+        <state relative-caret-position="382">
+          <caret line="99" column="84" selection-start-line="99" selection-start-column="18" selection-end-line="99" selection-end-column="84" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/vendor/topthink/think-orm/src/Model.php">
+    <entry file="file://$PROJECT_DIR$/adddata.sql">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="612">
-          <caret line="861" column="19" selection-start-line="861" selection-start-column="19" selection-end-line="861" selection-end-column="19" />
+        <state relative-caret-position="197">
+          <caret line="225" column="40" selection-start-line="225" selection-start-column="25" selection-end-line="225" selection-end-column="40" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/vendor/topthink/think-orm/src/db/BaseQuery.php">
+    <entry file="file://$PROJECT_DIR$/view/admin/finance/shenhe.html">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="666">
-          <caret line="604" column="49" selection-start-line="604" selection-start-column="40" selection-end-line="604" selection-end-column="49" />
+        <state relative-caret-position="290">
+          <caret line="77" column="20" lean-forward="true" selection-start-line="77" selection-start-column="20" selection-end-line="77" selection-end-column="20" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/common.php">
+    <entry file="file://$PROJECT_DIR$/app/common/controller/Orde.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="529">
-          <caret line="238" column="49" selection-start-line="238" selection-start-column="38" selection-end-line="238" selection-end-column="49" />
+        <state relative-caret-position="350">
+          <caret line="260" column="32" lean-forward="true" selection-start-line="260" selection-start-column="32" selection-end-line="260" selection-end-column="32" />
+          <folding>
+            <element signature="e#103#136#0#PHP" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/web/model/Orders.php">
+    <entry file="file://$PROJECT_DIR$/view/admin/finance/daili.html">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="389">
-          <caret line="88" column="9" lean-forward="true" selection-start-line="88" selection-start-column="9" selection-end-line="88" selection-end-column="9" />
-          <folding>
-            <element signature="e#95#123#0#PHP" expanded="true" />
-          </folding>
+        <state relative-caret-position="138">
+          <caret line="60" column="46" lean-forward="true" selection-start-line="60" selection-start-column="46" selection-end-line="60" selection-end-column="46" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/adddata.sql">
+    <entry file="file://$PROJECT_DIR$/view/admin/finance/zhengshon.html">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="976">
-          <caret line="268" lean-forward="true" selection-start-line="268" selection-end-line="268" />
+        <state relative-caret-position="322">
+          <caret line="29" lean-forward="true" selection-start-line="29" selection-end-line="29" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/web/controller/Base.php">
+    <entry file="file://$PROJECT_DIR$/app/admin/controller/Finance.php">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="207">
-          <caret line="14" column="1" lean-forward="true" selection-start-line="14" selection-start-column="1" selection-end-line="14" selection-end-column="1" />
+          <caret line="145" column="7" lean-forward="true" selection-start-line="145" selection-start-column="7" selection-end-line="167" selection-end-column="29" />
+          <folding>
+            <element signature="e#102#133#0#PHP" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/web/controller/Index.php">
+    <entry file="file://$PROJECT_DIR$/app/admin/controller/Order.php">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="184">
-          <caret line="22" lean-forward="true" selection-start-line="22" selection-end-line="22" />
+        <state relative-caret-position="451">
+          <caret line="36" column="72" selection-start-line="36" selection-start-column="72" selection-end-line="36" selection-end-column="72" />
           <folding>
-            <element signature="e#100#128#0#PHP" expanded="true" />
+            <element signature="e#102#127#0#PHP" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/web/controller/My.php">
+    <entry file="file://$PROJECT_DIR$/view/admin/contents/feedback.html">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="210">
-          <caret line="29" lean-forward="true" selection-start-line="29" selection-end-line="29" />
-          <folding>
-            <element signature="e#100#127#0#PHP" expanded="true" />
-          </folding>
+        <state relative-caret-position="345">
+          <caret line="54" column="6" selection-end-line="140" selection-end-column="9" />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/app/web/controller/Login.php">
+    <entry file="file://$PROJECT_DIR$/view/admin/contents/hlep.html">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="320">
-          <caret line="21" lean-forward="true" selection-start-line="21" selection-end-line="21" />
-          <folding>
-            <element signature="e#99#132#0#PHP" expanded="true" />
-          </folding>
+        <state relative-caret-position="221">
+          <caret line="49" selection-start-line="49" selection-end-line="52" selection-end-column="9" />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/view/admin/order/buy.html">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="368">
+          <caret line="52" column="9" lean-forward="true" selection-start-line="52" selection-start-column="9" selection-end-line="52" selection-end-column="9" />
         </state>
       </provider>
     </entry>

+ 9 - 5
php/adddata.sql

@@ -128,15 +128,17 @@ CREATE TABLE `lm_mining`  (
   `num` int (11)  DEFAULT 0 COMMENT '数量',
   `mining` int (11)  DEFAULT 0 COMMENT '矿池数量',
   `enlarge_quota` int (11)  DEFAULT 0 COMMENT '放大额度',
-   `ensure_money` decimal (20,2)  DEFAULT '0' COMMENT '保证金',
-   `breach_money` decimal (20,2)  DEFAULT '0' COMMENT '违约金',
-   `out_game` decimal (20,2)  DEFAULT '0' COMMENT '出局手续费',
+   `ensure_money` decimal (20,2)  DEFAULT '0' COMMENT '保证金 买入人缴费',
+   `breach_money` decimal (20,2)  DEFAULT '0' COMMENT '违约金 买入人缴费',
+   `tong_money` decimal (20,2)  DEFAULT '0' COMMENT '手续费 通证卖出人缴费',
+   `out_game` decimal (20,2)  DEFAULT '0' COMMENT '出局通证卖出人手续费',
    `direct_push` decimal (20,2)  DEFAULT '0' COMMENT '直推获得',
    `second_push` decimal (20,2)  DEFAULT '0' COMMENT '次推获得',
    `create_time` varchar (20)DEFAULT '' COMMENT '创建时间',
    `status` int (1)DEFAULT 0 COMMENT '0 进行中 1 暂停中',
   PRIMARY KEY (`id`) USING BTREE
 ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '矿区' ROW_FORMAT = Compact;
+
 DROP TABLE IF EXISTS `lm_order`;
 CREATE TABLE `lm_order`  (
   `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
@@ -153,8 +155,9 @@ CREATE TABLE `lm_order`  (
   `end_time` varchar (20)  DEFAULT '' COMMENT '完成时间',
   `msg` varchar (255)  DEFAULT '' COMMENT '失败原因',
   `image`text  DEFAULT '' COMMENT '上传图片,拼接',
-  `breach_money` decimal (20,2)  DEFAULT '0' COMMENT '违约金',
+    `ensure_money` decimal (20,2)  DEFAULT '0' COMMENT '保证金 买入人缴费',
    `out_game` decimal (20,2)  DEFAULT '0' COMMENT '出局手续费',
+     `tong_money` decimal (20,2)  DEFAULT '0' COMMENT '通证',
   PRIMARY KEY (`id`) USING BTREE
 ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci COMMENT = '发布订单' ROW_FORMAT = Compact;
 
@@ -173,6 +176,7 @@ CREATE TABLE `lm_vendibility_finance`  (
   `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
   `user_id` int (11)  DEFAULT 0 COMMENT '用户id',
   `mining_id` int (11)  DEFAULT 0 COMMENT '区块id',
+  `order_id` int (11)  DEFAULT 0 COMMENT '订单id',
   `money` decimal (20,2)  DEFAULT 0 COMMENT '获得交易区块',
   `pool` int(11)  DEFAULT 0 COMMENT '矿池数量',
   `push_money` decimal (20,2)  DEFAULT 0 COMMENT '可售额度',
@@ -249,7 +253,7 @@ DROP TABLE IF EXISTS `lm_finance`;
 CREATE TABLE `lm_finance`  (
   `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
   `user_id` int (11)  DEFAULT 0 COMMENT '用户id',
-  `name` varchar (255)  DEFAULT 0 COMMENT '金额',
+  `name` varchar (255)  DEFAULT 0 COMMENT '说明',
   `money` decimal (20,2)  DEFAULT 0 COMMENT '金额',
   `status` int (1)  DEFAULT 0 COMMENT '0 增加 1减少',
   `add_time` varchar (20) DEFAULT 0 COMMENT '添加时间',

+ 176 - 1
php/app/admin/controller/Contents.php

@@ -5,6 +5,8 @@ namespace app\admin\controller;
 
 
 use app\common\controller\Backend;
+use app\common\model\Notice;
+use app\common\model\Problem;
 use think\facade\Db;
 use think\facade\Request;
 use think\facade\View;
@@ -39,10 +41,12 @@ class Contents extends Backend
     {
         $name=input("text");
         $img=input("img")?:"";
+        $text=input("text")?:"";
         $id=input("id");
 
         $add["text"]=$name;
-        $add["img"]=$img;
+        $add["image"]=$img;
+        $add["text"]=$text;
 //        $add["centos"]=$centos;
 
         if ($id){
@@ -125,6 +129,15 @@ class Contents extends Backend
 //                $where["name"]=["like","% $name %"];
 //            }
             $list=Db::name("feedback")->order("id desc")->where($where)->paginate(["list_row"=>$limit,"page"=>$page])->each(function ($item){
+
+                $user=\app\common\model\User::where(["id"=>$item["user_id"]])->field("name")->find();
+                $item["name"]=$user->name;
+                if ($item["image"]){
+                    $item["image"]=explode(",",$item["image"]);
+                }else{
+                    $item["image"]="";
+                }
+
                 return $item;
 
             })->toArray();
@@ -137,4 +150,166 @@ class Contents extends Backend
 
 
     }
+
+    //
+    public function hlep()
+    {
+
+        if (Request::isPost()){
+            $name=input("name");
+            $page=input("page")?:1;
+            $limit=input("limit")?:10;
+            $where=[];
+            $list=Db::name("problem")->order("id desc")->where($where)->paginate(["list_row"=>$limit,"page"=>$page])->each(function ($item){
+                return $item;
+
+            })->toArray();
+            return  $result = ['code' => 0, 'msg' => lang('get info success'), 'data' => $list['data']?:[], 'count' => $list['total']?:0];
+
+        }
+        return View::fetch();
+    }
+
+    // 删除常见问题
+    public function del_hlep()
+    {
+     $id=input("id");
+     Problem::where(["id"=>$id])->delete();
+     json_result(200,"删除成功");
+    }
+
+// 添加修改
+    public function addhlep()
+    {
+        if (Request::isPost()){
+            $id=input("id");
+            $add["name"]=input("name");
+            $add["text"]=input("text");
+            if ($id){
+                Problem::update($add,["id"=>$id]);
+            }else{
+                Problem::create($add);
+            }
+            json_result(200,"操作成功");
+        }else{
+            $id=input("id");
+            if ($id){
+                $da=Problem::where(["id"=>$id])->find();
+                $info["name"]=$da->name;
+                $info["text"]=$da->text;
+                $info["id"]=$id;
+            }else{
+                $info["name"]="";
+                $info["text"]="";
+                $info["id"]=0;
+            }
+
+            $view = [
+                'info' => $info,
+                'title' => lang('add'),
+            ];
+            View::assign($view);
+            return View::fetch();
+        }
+
+    }
+
+
+    // 收款信息
+
+    public function push()
+    {
+        if (Request::isPost()){
+            $data = Request::post();
+            foreach ($data as $k=>$v){
+                $res =  Db::name('system')->where('name',$k)->update(['value'=>$v]);
+            }
+            json_result(200,"修改成功",$data);
+        }
+
+        $list = Db::name('system')
+            ->where(["type"=>"shouk"])
+            ->field('name,value')
+            ->column('value','name');
+        View::assign('config',json_encode($list));
+        $view = [
+            'info' => $list,
+            'title' => lang('add'),
+        ];
+        View::assign($view);
+        return View::fetch();
+    }
+
+
+    //系统消息管理
+    public function sysmsg()
+    {
+
+        if (Request::isPost()){
+            $name=input("name");
+            $page=input("page")?:1;
+            $limit=input("limit")?:10;
+            $where=[];
+            $list=Db::name("notice")->order("id desc")->where($where)->paginate(["list_row"=>$limit,"page"=>$page])->each(function ($item){
+                return $item;
+
+            })->toArray();
+            return  $result = ['code' => 0, 'msg' => lang('get info success'), 'data' => $list['data']?:[], 'count' => $list['total']?:0];
+
+        }
+        return View::fetch();
+    }
+
+    // 更新是否显示消息
+    public function update_nocice_status()
+    {
+        $id=input("id");
+        $status=input("status")?:0;
+        Notice::update(["status"=>$status],["id"=>$id]);
+        json_result(200,"操作成功");
+    }
+
+    public function del_msg()
+    {
+        $id=input("id");
+        Notice::where(["id"=>$id])->delete();
+        json_result(200,"删除成功");
+    }
+
+    // 添加消息
+    public function addmsg()
+    {
+
+        if (Request::isPost()){
+            $id=input("id");
+            $add["name"]=input("name");
+            $add["text"]=input("text");
+            if ($id){
+                Notice::update($add,["id"=>$id]);
+            }else{
+                Notice::create($add);
+            }
+            json_result(200,"操作成功");
+        }else{
+            $id=input("id");
+            if ($id){
+                $da=Problem::where(["id"=>$id])->find();
+                $info["name"]=$da->name;
+                $info["text"]=$da->text;
+                $info["id"]=$id;
+            }else{
+                $info["name"]="";
+                $info["text"]="";
+                $info["id"]=0;
+            }
+
+            $view = [
+                'info' => $info,
+                'title' => lang('add'),
+            ];
+            View::assign($view);
+            return View::fetch();
+        }
+
+    }
 }

+ 126 - 10
php/app/admin/controller/Finance.php

@@ -9,6 +9,12 @@
 namespace app\admin\controller;
 
 
+use app\common\controller\Orde;
+use app\common\model\Bond;
+use app\common\model\GeneralFinance;
+use think\facade\Request;
+use think\facade\View;
+
 class Finance
 {
 // 财务管理
@@ -18,39 +24,149 @@ class Finance
      */
     public function tongji()
     {
+        if (Request::isPost()) {
+            $name = input("name");
+            $page = input("page") ?: 1;
+            $limit = input("limit") ?: 10;
+            $where = [];
+//            if ($name){
+//                $where["name"]=["like","% $name %"];
+//            }
+
+            $where["daili"]=0;
+            $list = \app\common\model\Finance::where($where)->order("id desc")->paginate(["list_row" => $limit, "page" => $page])->each(function ($item) {
+
+                $user = \app\common\model\User::where(["id" => $item["user_id"]])->field("name")->find();
+                $item["user_name"] = $user->name;
+
+                return $item;
+
+            })->toArray();
+            return $result = ['code' => 0, 'msg' => lang('get info success'), 'data' => $list['data'] ?: [], 'count' => $list['total'] ?: 0];
+
+        }
 
-}
+        return View::fetch();
+    }
 
     /**
      * 充值审核
      */
     public function shenhe()
     {
+        if (Request::isPost()) {
+            $name = input("name");
+            $page = input("page") ?: 1;
+            $limit = input("limit") ?: 10;
+            $where = [];
+//            if ($name){
+//                $where["name"]=["like","% $name %"];
+//            }
+//            $where["type"]=0;
+            $list = GeneralFinance::where($where)->order("status asc,id desc")->paginate(["list_row" => $limit, "page" => $page])->each(function ($item) {
+                $user = \app\common\model\User::where(["id" => $item["user_id"]])->field("name")->find();
+                $item["user_name"] = $user->name;
+                $item["add_time"]=date("Y-m-d H:i:s",$item["add_time"]);
+                if ($item["status"]==0){
+                    $item["status"]="审核中";
+                }elseif($item["status"]==1){
+                    $item["status"]="已通过";
+                }else{
+                    $item["status"]="已拒绝";
+                }
+                return $item;
 
-}
+            })->toArray();
+            return $result = ['code' => 0, 'msg' => lang('get info success'), 'data' => $list['data'] ?: [], 'count' => $list['total'] ?: 0];
 
-    /**
-     * 充值记录
-     */
-    public function chongzjl()
+        }
+
+        return View::fetch();
+    }
+
+    // 审核拒绝general_finance
+    public function jujue()
+    {
+        $id=input("id");
+        GeneralFinance::update(["status"=>2],["id"=>$id]);
+        json_result(200,"设置成功");
+    }
+// 充值成功
+    public function czcg()
     {
-        
-}
+        $id=input("id");
+        $bond=GeneralFinance::where(["id"=>$id])->find();
+        // 给用户加钱
+        $user=\app\common\model\User::where(["id"=>$bond->user_id])->find();
+        $money=$user->money+$bond->actual_money;
+        \app\common\model\User::update(["money"=>$money],["id"=>$bond->user_id]);
+        GeneralFinance::update(["status"=>1],["id"=>$id]);
+
+        // 添加财务日记
+        Orde::Finance($bond->user_id,"您的充值申请审核通过",$bond->actual_money,0);
+        json_result(200,"设置成功");
+
+    }
+
 
     /**
      * 代理收入
      */
     public function daili()
     {
+        if (Request::isPost()) {
+            $name = input("name");
+            $page = input("page") ?: 1;
+            $limit = input("limit") ?: 10;
+            $where = [];
+//            if ($name){
+//                $where["name"]=["like","% $name %"];
+//            }
+            $where["daili"]=1;
+            $list = \app\common\model\Finance::where($where)->order("id desc")->paginate(["list_row" => $limit, "page" => $page])->each(function ($item) {
+
+                $user = \app\common\model\User::where(["id" => $item["user_id"]])->field("name")->find();
+                $item["user_name"] = $user->name;
+
+                return $item;
+
+            })->toArray();
+            return $result = ['code' => 0, 'msg' => lang('get info success'), 'data' => $list['data'] ?: [], 'count' => $list['total'] ?: 0];
+
+        }
 
-}
+        return View::fetch();
+    }
 
     /**
      * 赠送记录
      */
     public function zhengshon()
     {
+        if (Request::isPost()) {
+            $name = input("name");
+            $page = input("page") ?: 1;
+            $limit = input("limit") ?: 10;
+            $where = [];
+//            if ($name){
+//                $where["name"]=["like","% $name %"];
+//            }
+
+            $where["daili"]=2;
+            $list = \app\common\model\Finance::where($where)->order("id desc")->paginate(["list_row" => $limit, "page" => $page])->each(function ($item) {
+
+                $user = \app\common\model\User::where(["id" => $item["user_id"]])->field("name")->find();
+                $item["user_name"] = $user->name;
+
+                return $item;
+
+            })->toArray();
+            return $result = ['code' => 0, 'msg' => lang('get info success'), 'data' => $list['data'] ?: [], 'count' => $list['total'] ?: 0];
+
+        }
+
+        return View::fetch();
+    }
 
-}
 
 }

+ 23 - 1
php/app/admin/controller/Order.php

@@ -9,6 +9,9 @@
 namespace app\admin\controller;
 
 
+use think\facade\Request;
+use think\facade\View;
+
 class Order
 {
  // 订单管理
@@ -18,7 +21,26 @@ class Order
      */
     public function buy()
     {
-        
+        if (Request::isPost()) {
+            $name = input("name");
+            $page = input("page") ?: 1;
+            $limit = input("limit") ?: 10;
+            $where = [];
+//            if ($name){
+//                $where["name"]=["like","% $name %"];
+//            }
+            $where["status"]=0;
+            $list = \app\common\model\Order::where($where)->order("id desc")->paginate(["list_row" => $limit, "page" => $page])->each(function ($item) {
+
+                $user = \app\common\model\User::where(["id" => $item["buy_user"]])->field("name")->find();
+                $item["user_name"] = $user->name;
+                $item["add_time"]=date("Y-m-d H:i:s",$item["add_time"]);
+                return $item;
+
+            })->toArray();
+            return $result = ['code' => 0, 'msg' => lang('get info success'), 'data' => $list['data'] ?: [], 'count' => $list['total'] ?: 0];
+        }
+        return View::fetch();
     }
 
     /**

+ 0 - 6
php/app/admin/controller/Uploads.php

@@ -53,12 +53,6 @@ class Uploads extends Backend{
      * @return false|string
      */
     public function Uploads(){
-//        ini_set("upload_max_filesize","9M");//即允许上传文件大小的最大值
-//        ini_set("post_max_size","9M");//指通过表单POST给PHP的所能接收的最大值
-//        ini_set("memory_limit","9M");//;每个PHP页面所吃掉的最大内存
-//        ini_set("max_execution_time","3600");//每个PHP页面运行的最大时间值(秒)
-//        ini_set("max_input_time","3600");//每个PHP页面接收数据所需的最大时间(秒)
-
         //获取上传文件表单字段名
         $fileKey = array_keys(request()->file());
 

+ 346 - 0
php/app/common/controller/Orde.php

@@ -0,0 +1,346 @@
+<?php
+/**
+ *
+ * User: anyluck
+ * Date: 2020/6/4
+ * Time: 13:29
+ */
+
+namespace app\common\controller;
+
+
+use app\common\model\BondFinance;
+use app\common\model\Finance;
+use app\common\model\Mining;
+use app\common\model\Order;
+use app\common\model\OrderFrequency;
+use app\common\model\User;
+use app\common\model\VendibilityFinance;
+use app\web\model\Msg;
+
+class Orde
+{
+    // 订单处理 前后台通用
+    /**卖出处理
+     * @param $order_id 订单id
+     * @param $push_user_id 购买用户
+     * @param $order 交易订单
+     * @param $count_order 已购买次数
+     */
+    public static function push_order($user, $order_id, $push_user_id, $order, $count_order, $sxf_money = 0)
+    {
+        // 修改订单信息
+
+//减去账号通证 和可售额度
+        if ($count_order + 1 == 5) {
+            $money = $user->money - $order->out_game;// 通行证
+        } else {
+            $money = $user->money - $order->tong_money;// 通行证
+        }
+
+        $push_money = $user->push_money - $order->number;// 可售额度
+        User::update(["money" => $money, "push_money" => $push_money], ["id" => $push_user_id]);
+
+        $where["id"] = $order_id;
+        $update["push_user"] = $push_user_id;
+        $update["sxf_money"] = $money;//卖出已交手续费
+        $update["status"] = 1;
+        $update["stat_time"] = time() + 4 * 3600;
+        Order::where($where)->update($update);
+        // 添加财务记录
+        self::Finance($push_user_id, "卖出BTS", $money, 1);
+
+        // 给买家发短信或邮件
+        $buy_user_id = $order->buy_user;// 买入人
+        $buy_user = User::where(["id" => $buy_user_id])->field("id,phone,mail")->find();
+        // 发送通知用户 短信和邮件
+        $content = "其他对您卖出BTS,请登录前去查看";
+        if ($buy_user->phone) {
+            Msg::phone($content, $user->phone);
+        } else {
+            Msg::mail($content, $user->mail);
+        }
+    }
+
+//    /**买入 减去对应的保证金
+//     * @param $buy_user_id 用户id
+//     * @param $money // 剩余多少钱
+//     * @param $jmoney // 减去多少钱
+//     * @param $ensure_money // 减去保证金
+//     */
+//    public static function buy_order($buy_user_id, $ensure_money, $jensure_money)
+//    {
+//        User::update(["ensure_money" => $ensure_money], ["id" => $buy_user_id]);// 更新用户金额
+//        // 添加保证金记录
+//        self::bond_finance($buy_user_id, "发起购买BTS交易", $jensure_money, 1);
+//    }
+
+
+    // 转账处理
+    public static function transfer($user_id, $puser_id, $money, $jmoney, $name)
+    {
+        // 给转账人减钱
+        User::update(["money" => $jmoney], ["id" => $user_id]);
+        // 给接受人加钱
+        $where["id"] = $puser_id;
+        $user = User::where($where)->field("money,name,phone,mail")->find();
+        $zong_money = $user->money + $money;
+        User::update(["money" => $zong_money], ["id" => $puser_id]);
+        self::Finance($user_id, "您给用户" . $user->name . "转账", $money, 1);// 转账人减钱
+        self::Finance($puser_id, "用户" . $name . "给您转账", $money, 0);// 收账人加钱
+
+        // 发送通知用户 短信和邮件
+        $content = "用户" . $name . "给你转账" . $money . "BTS";
+        if ($user->phone) {
+            Msg::phone($content, $user->phone);
+        } else {
+            Msg::mail($content, $user->mail);
+        }
+    }
+
+
+    // 保证金操作
+    public static function bond_transfer($user, $user_id, $money, $ensure_money, $type)
+    {
+
+        if ($type == 0) {//0 充值 1 提现
+            $money = $user->money - $money;// 通证
+            $ensure_moneys = $user->ensure_money + $ensure_money;// 加保证金
+            User::update(["money" => $money, "ensure_money" => $ensure_moneys], ["id" => $user_id]);
+            // 添加财务记录
+            self::Finance($user_id, "保证金充值", $money, 1);
+            self::bond_finance($user_id, "保证金充值", $money, 0);
+        } else {
+            $money = $user->money + $money;// 通证
+            $ensure_moneys = $user->ensure_money - $ensure_money;// 加保证金
+            User::update(["money" => $money, "ensure_money" => $ensure_moneys], ["id" => $user_id]);
+            // 添加财务记录
+            self::Finance($user_id, "保证金提现", $money, 0);
+            self::bond_finance($user_id, "保证金提现", $money, 1);
+
+        }
+
+    }
+
+// 后台充值
+    public static function admin_Recharge($user_id, $money)
+    {
+        $where["id"] = $user_id;
+        $user = User::where($where)->field("money,name,phone,mail")->find();
+        $zong_money = $user->money + $money;
+        User::update(["money" => $zong_money], ["id" => $user_id]);// 更新账号金额
+        self::Finance($user_id, "充值成功", $money, 0);
+        // 发送通知用户 短信和邮件
+        $content = "充值" . $money . "BTS已处理";
+        if ($user->phone) {
+            Msg::phone($content, $user->phone);
+        } else {
+            Msg::mail($content, $user->mail);
+        }
+    }
+
+
+    // 订单失败处理,全局使用
+    public static function order_fail($msg, $order)
+    {
+        // 查找交易区块
+        $mining = Mining::where(["id" => $order->mining_id])->find();
+        // 扣除买入人的违约金
+        $ensure_money = $mining->breach_money;
+        $where["id"] = $order->buy_user;
+        $user = User::where($where)->find();
+        $update["ensure_money"] = $user->ensure_money - $ensure_money;
+        // 添加违约金记录
+        self::bond_finance($order->buy_user, "交易失败扣除保证金", $ensure_money, 1);
+        User::update($update, $where);
+        // 给卖出人加钱
+        $push_user = User::where(["id" => $order->push_user])->find();
+        $push_money = $push_user->push_money + $order->number;// 加回可售额度
+        // 加上违约金 加入通证 和手续费
+        $add_money = $ensure_money + $order->sxf_money;// 总获得多少钱
+        $money = $push_user->money + $add_money;// 账号变动
+        User::update(["money" => $money, "push_money" => $push_money], ["id" => $order->push_user]);
+        // 添加记录
+        self::Finance($order->push_user, "交易失败退回手续费", $order->sxf_money, 0);
+        self::Finance($order->push_user, "交易失败获得违约金", $ensure_money, 0);
+
+        // 更新订单状态
+        $where_order["id"] = $order->id;
+        $update_order["msg"] = $msg;
+        $update_order["status"] = 5;
+        Order::update($update_order, $where_order);
+
+        return 1;
+    }
+
+
+    /** 交易成功全局使用
+     * @param $order 订单数据
+     */
+    public static function order_success($order)
+    {
+
+        // 更新订单状态
+        $update_order["status"]=3;
+        Order::update($update_order,["id"=>$order->id]);
+
+        $buy_user = $order->buy_user;// 买入人
+        $push_user = $order->push_user;// 卖出人
+        $mining_id = $order->mining_id;// 交易区
+        $mining = Mining::where(["id" => $mining_id])->find();// 交易区
+        if (!$mining){
+            json_result(400,"价格区已经不存在了,无法计算");
+        }
+
+        // 统计交易次数
+        // todo   买入人处理
+        $buy_order_frequency = OrderFrequency::where(["user_id" => $buy_user, "mining_id" => $mining_id])->find();
+        if (!$buy_order_frequency) {//不存在
+            $buy_count = 1;
+            $buy_number = 1;
+            $push_number = 0;
+            $add_buy["user_id"] = $buy_user;
+            $add_buy["mining_id"] = $mining_id;
+            $add_buy["buy"] = 1;
+            $add_buy["push"] = 0;
+            OrderFrequency::create($add_buy);
+        } else {
+            $buy_count = $buy_order_frequency->buy + 1;
+            $buy_number = $buy_count;
+            $push_number = $buy_order_frequency->push;
+            OrderFrequency::update(["buy" => $buy_count], ["id" => $buy_order_frequency->id]);// 更新次数
+        }
+
+
+        $buy_user_data = User::where(["id" => $buy_user])->find();
+
+        $keshou_money = $mining->enlarge_quota;// 可售额度
+        // 第一次交易给用户加矿池金
+        if ($buy_count == 1) {
+            $pool_money = $mining->mining;
+            $update_buy["pool_money"] = $buy_user_data->pool_money + $pool_money;// 加矿池金
+            self::VendonolotyFinance($buy_user, $mining_id, $order->id, $order->number, $mining->mining, $keshou_money, $buy_number, $push_number, 1);
+        }
+        $enlarge_quota = $keshou_money + $buy_user_data->push_money;//可售额度
+        // 给账号加相应数据
+        $update_buy["push_money"] = $enlarge_quota;
+        User::update($update_buy, ["id" => $buy_user]);
+
+
+        // TODO 卖出处理
+
+
+        $push_order_frequency = OrderFrequency::where(["user_id" => $push_user, "mining_id" => $mining_id])->find();
+
+        if (!$push_order_frequency) {
+            $push_count = 1;
+            $add_push["user_id"] = $push_user;
+            $add_push["mining_id"] = $mining_id;
+            $add_push["buy"] = 0;
+            $add_push["push"] = 1;
+            OrderFrequency::create($add_push);
+        } else {
+            $push_count = $push_order_frequency->push + 1;
+
+            OrderFrequency::update(["push" => $push_count], ["id" => $push_order_frequency->id]);// 更新次数
+        }
+
+        // 减少账号的矿金
+        $push_user_data = User::where(["id" => $push_user])->find();
+        $kuangjine = $push_user_data->pool_money - $mining->num;
+        User::update(["pool_money" => $kuangjine], ["id" => $push_user]);
+        if ($push_count == 5) {// 第五次 代理结算
+            $direct_push = $mining->direct_push;//直推获得
+            $second_push = $mining->second_push;//次推获得
+            // 查找直接上级
+            if ($push_user_data->pid) {// 是否存在直接上级
+                $zhitui_push_user = User::where(["id" => $push_user_data->pid])->find();
+                if ($zhitui_push_user) {
+                    // 直推奖励
+                    if ($direct_push) {// 直推奖励设置不小于0
+                        // 查看活跃度
+                        $zhitui_time =strtotime($zhitui_push_user->update_time)  + (24 * 3600);
+                        if ($zhitui_time >= time()) {// 在活跃度里面就计算奖励
+                            $update_zhitui["money"] = $zhitui_push_user->money + $direct_push;
+                            User::update($update_zhitui, ["id" => $push_user_data->pid]);
+                            // 添加财务记录
+                            self::Finance($push_user_data->pid, "获得直推奖励", $direct_push, 0,1);
+                        }
+                    }
+                    if ($zhitui_push_user->pid) {// 是否存在次级上级
+                        // 次级上级
+                        if ($second_push) {// 次级奖励不小于0
+                            // 查询次级用户
+                            $ciji_push_user = User::where(["id" => $zhitui_push_user->pid])->find();
+                            if ($ciji_push_user) {
+                                $ciji_time = (int)strtotime($ciji_push_user->update_time) + 24 * 3600;
+                                if ($ciji_time >= time()) {// 给次级上级发奖励
+                                    $update_ciji["money"] = $ciji_push_user->money - $second_push;
+                                    User::update($update_ciji, ["id" => $zhitui_push_user->pid]);
+                                    // 添加财务记录
+                                    self::Finance($zhitui_push_user->pid, "获得次推奖励", $second_push, 0,1);
+                                }
+                            }
+                        }
+                    }
+
+
+                }
+
+
+            }
+        }
+
+    }
+
+    //资产明细
+    public static function Finance($user_id, $name, $money, $status,$daili=0)
+    {
+        $add["user_id"] = $user_id;
+        $add["name"] = $name;
+        $add["money"] = $money;
+        $add["status"] = $status;
+        $add["daili"] = $daili;
+        $add["add_time"] = time();
+        Finance::create($add);
+    }
+
+
+    // 保证金处理
+    public static function bond_finance($user_id, $name, $money, $status)
+    {
+        $add["user_id"] = $user_id;
+        $add["name"] = $name;
+        $add["money"] = $money;
+        $add["status"] = $status;
+        $add["add_time"] = time();
+        BondFinance::create($add);
+
+    }
+
+    /**可售余额 记录
+     * @param $user_id 用户id
+     * @param $mining_id 区块id
+     * @param $order_id 订单id
+     * @param $money  获得交易区块
+     * @param $pool  矿池数量
+     * @param $push_money  可售额度
+     * @param $buy 当前买入次数
+     * @param $push  当前卖出次数
+     * @param $status 0 增加 1 减少
+     */
+    public static function VendonolotyFinance($user_id, $mining_id, $order_id, $money, $pool, $push_money, $buy, $push, $status)
+    {
+        $add["user_id"] = $user_id;
+        $add["mining_id"] = $mining_id;
+        $add["order_id"] = $order_id;
+        $add["money"] = $money;
+        $add["pool"] = $pool;
+        $add["push_money"] = $push_money;
+        $add["buy"] = $buy;
+        $add["push"] = $push;
+        $add["status"] = $status;
+        $add["add_time"] = time();
+        VendibilityFinance::create($add);
+    }
+}

+ 68 - 13
php/app/common/controller/Upfile.php

@@ -9,25 +9,80 @@
 namespace app\common\controller;
 
 
+use think\facade\Request;
+use lemo\helper\DataHelper;
 class Upfile
 {
 
+    //上传验证规则
+    protected $uploadValidate = [
+        'image' => 'filesize:102400|fileExt:jpg,png,gif,jpeg,rar,zip,avi,mp4,rmvb,3gp,flv,mp3,txt,doc,xls,ppt,pdf,xls,docx,xlsx,doc,wmv'
+    ];
+    protected $imageValidate = [
+        'image' => 'filesize:10240|fileExt:jpg,png,gif,jpeg,bmp,svg,wmv'
+
+    ];
+    protected $videoValidate = [
+        'file' => 'filesize:10240|avi,rmvb,3gp,flv,mp4,wmv'
+
+    ];
+    protected $voiceValidate = [
+        'file' => 'filesize:2048|mp3,wma,wav,amr,wmv'
+
+    ];
+
+    public function initialize()
+
+    {
+        $fileExt = getConfigByCode('upload_file_type');
+        $filemax = getConfigByCode('upload_file_max') * 1024;
+        $this->uploadValidate = ['image' =>
+            'filesize' . $filemax . '|' . $fileExt,
+        ];
+        parent::initialize(); // TODO: Change the autogenerated stub
+    }
 
     // TODO 文件类处理
 
-    //上传服务器文件
-    public  static function uploadone($files){
-        $wheatpic = '';
-        // 移动到框架应用根目录/public/uploads/ 目录下
-        $info = $files->validate(['size'=>1567800,'ext'=>'jpg,png,gif,jpeg,pdf,word,excel,xls,ppt,zip,rar,doc,docx'])->move(ROOT_PATH . 'public' . DS . 'uploads');
-        if($info){
-            // 成功上传后 获取上传信息
-            // 输出 jpg
-            $wheatpic = '/uploads/' . str_replace('\\', '/', $info->getsaveName ());
-        }else{
-            // 上传失败获取错误信息
-            self::error($files->getError());
+    /**
+     * 文件上传
+     * @return false|string
+     */
+    public function Uploads()
+    {
+        //获取上传文件表单字段名
+        $fileKey = array_keys(request()->file());
+
+        for ($i = 0; $i < count($fileKey); $i++) {
+            //获取表单上传文件
+            $file = request()->file($fileKey[$i]);
+            try {
+                validate($this->uploadValidate)->check(DataHelper::objToArray($file));
+                $savename = \think\facade\Filesystem::disk('public')->putFile('uploads', $file);
+                $savename = str_replace('\\', "/", $savename);
+                $path[] = '/storage/' . $savename;
+            } catch (\think\exception\ValidateException $e) {
+                $path = '';
+                $error = $e->getMessage();
+            }
+        }
+
+        if (!empty($path)) {
+            $result['code'] = 1;
+            //分辨是否截图上传,截图上传只能上传一个,非截图上传可以上传多个
+            if (Request::param('responseType') == 'json') {
+                $result["url"] = $path[0];
+            } else {
+                $result["url"] = $path;
+            }
+            $result['msg'] = lang('upload success');
+            return $result;
+        } else {
+            //上传失败获取错误信息
+            $result['url'] = '';
+            $result['msg'] = $error;
+            $result['code'] = 0;
+            return $result;
         }
-        return $wheatpic;
     }
 }

+ 115 - 7
php/app/web/controller/Index.php

@@ -9,11 +9,16 @@
 namespace app\web\controller;
 
 
+use app\common\controller\Orde;
 use app\common\model\Banner;
+use app\common\model\Message;
 use app\common\model\Mining;
 use app\common\model\Notice;
+use app\common\model\Order;
 use app\common\model\State;
+use app\common\model\User;
 use app\web\model\Back;
+use app\web\model\Msg;
 use app\web\model\Orders;
 
 class Index extends Base
@@ -25,18 +30,28 @@ class Index extends Base
     public function index()
     {
         $data=[];
-        $banner=Banner::where(["status"=>0])->select();
+        $message_count=Message::where(["status"=>0,"user_id"=>$this->user_id])->count();
+        $data["message_count"]=$message_count;// 未读消息
+        $banner=Banner::where(["status"=>0])->field("id,image")->select();
         $data["banner"]=$banner;// 轮播图
+        // 公告
+        $notice=Notice::where(["status"=>0])->field("id,name")->select();
+        $data["notice"]=$notice;
         // 交易区块
         $back=Back::back();
         $data["back"]=$back;
-        // 公告
-        $notice=Notice::where(["status"=>0])->select();
-        $data["notice"]=$notice;
         json_result(200,"",$data);
 
+    }
 
 
+    // 轮播图详情
+    public function banner_show()
+    {
+        $id=input("id");
+        $where["id"]=$id;
+        $data=Banner::where($where)->find();
+        json_result(200,"",$data);
 
     }
 
@@ -60,10 +75,12 @@ class Index extends Base
     {
         $page=input("page")?:1;
         $limit=input("limit")?:10;
-        $type=input("type")?:0;//0买入数据 1卖出数据 2我的购买数据 3我的卖出数据
-        $status=input("status");//0 未匹配 1 已匹配或待支付 2已上传数据 3 已完成 4 已撤销 5 交易失败
+
+        $type=input("type")?:0;// 0是查看交易中心求购数据 1我的购买数据 2我的卖出数据
+        $status=input("status");//0 不根据状态查询 1 查找进行中的 2 已完成的  配合上面的type 一起使用
+        $num=input("num")?:0;// 查看交易中心是传的区块数量 0 是全部
         $user_id=$this->user_id;
-        $res=Orders::order_list($type,$user_id,$status,$page,$limit);
+        $res=Orders::order_list($type,$user_id,$status,$page,$limit,$num);
         json_result(200,"",$res);
     }
 
@@ -75,7 +92,98 @@ class Index extends Base
         $mining_id=input("mining_id")?:0;
         $order_id=input("order_id");
         Orders::push_order($this->user,$this->user_id,$type,$order_id,$mining_id);
+    }
+
+    // 订单详情
+    public function order_show()
+    {
+        $id=input("id");if (!$id)json_result(400,"请上传订单id");
+        $order=Order::where(["id"=>$id])->find();
+        if (!$order){
+            json_result(400,"订单不存在");
+        }
+        if ($order->buy_user&&$order->push_user){
+            Orders::order_show($order,$this->user_id);
+        }else{
+            json_result(400,"当前订单未卖出无法查询卖出人信息");
+        }
+
+    }
+
+    //上传凭证
+    public function order_voucher()
+    {
+        $id=input("id");if (!$id)json_result(400,"订单id 没有上传");
+        $image=input("image");if ($image)json_result(400,"请上传凭证");
+        $where["id"]=$id;
+        $order=Order::where($where)->find();
+        if (!$order){
+            json_result(400,"订单id错误");
+        }
+        if ($order->status!=1){
+            json_result(400,"当前状态无法上传凭证");
+        }
+
+        // 给用户短信或者邮件通知
+        $where_user["id"]=$order->push_user;
+        $user=User::where($where_user)->find();
+        $content="您的订单买家已经打款请前去查看";
+//dump($user);die();
+        Order::update(["image"=>$image,"status"=>2],$where);
+        if ($user->phone){
+            Msg::phone($content,$user->phone);
+        }else{
+            Msg::mail($content,$user->mail);
+        }
+        json_result(200,"操作成功");
+
+    }
+
 
+    // 审核成功
+    public function order_success()
+    {
+        $id=input("id");
+
+        $where["id"]=$id;
+        $order=Order::where($where)->find();
+        if (!$order){
+            json_result(400,"订单id错误");
+        }
+        if ($order->status==3){
+            json_result(400,"订单已经完成");
+        }
+        if ($order->status!=2){
+            json_result(400,"还没有上传证明");
+        }
+
+        Orde::order_success($order);
+        json_result(200,"处理成功");
+    }
+    
+    // 审核失败
+    public function order_fail()
+    {
+        $id=input("id");if (!$id)json_result(400,"请上传订单id");
+        $msg=input("msg");if (!$msg)json_result(400,"请添加失败原因");
+        Orders::order_fail($msg,$id);
+    }
+
+    // 取消交易
+    public function Order_Cancel ()
+    {
+        $id=input("id");
+        $where["id"]=$id;
+        $order=Order::where(["id"=>$id])->find();
+        if ($order->status==0){
+            // 修改订单状态
+            $update["status"]=4;
+            Order::update($update,["id"=>$id]);
+            json_result(200,"取消成功");
+        }else{
+            json_result(400,"不能取消");
+        }
+        
     }
 
     // 申述

+ 119 - 79
php/app/web/controller/Login.php

@@ -12,143 +12,183 @@ namespace app\web\controller;
 use app\common\controller\Upfile;
 use app\common\model\PhoneCode;
 
+use app\common\model\System;
 use app\common\model\User;
+use app\web\model\Team;
 use app\web\model\Tripartite;
 use Ramsey\Uuid\Uuid;
 
 class Login
 {
- // todo 登录注册
+    // todo 登录注册
 
     // 登录
     public function in_login()
     {
-        $phone=input("phone");if (!$phone)json_result(400,"请输入手机号码或者邮箱账号");
-        $pwd=input("pwd");if (!$pwd)json_result(400,"请输入登录密码");
-        $where["phone|mail"]=$phone;
-        $user=User::where($where)->find();
-        if (!$user){
-            json_result(400,"账号不存在");
+        $phone = input("phone");
+        if (!$phone) json_result(400, "请输入手机号码或者邮箱账号");
+        $pwd = input("pwd");
+        if (!$pwd) json_result(400, "请输入登录密码");
+        $where["phone|mail"] = $phone;
+        $user = User::where($where)->find();
+        if (!$user) {
+            json_result(400, "账号不存在");
         }
-        if (!password_verify($pwd,$user->pwd)){
-            json_result(400,"密码错误");
+        if (!password_verify($pwd, $user->pwd)) {
+            json_result(400, "密码错误");
         }
-        json_result(200,"登录成功",$user);
+        if ($user->status == 1) {// 禁止登录
+            if ($user->status_time > time()) {
+                json_result(400, "该账号已经封号");
+            } else {// 解除禁止登陸
+                User::update(["status" => 0, "status_time" => ""], ["id" => $user->id]);
+            }
+        }
+        // 给账号加活跃度
+        $update["update_time"]=time();
+        User::update($update,["id"=>$user->id]);
+        json_result(200, "登录成功", $user);
     }
 
 
     // 获取验证码
     public function code()
     {
-        $phone=input("phone");if (!$phone)json_result(400,"请输入手机号或者邮箱");
-        $type=input("type")?:0;
-        
+        $phone = input("phone");
+        if (!$phone) json_result(400, "请输入手机号或者邮箱");
+        $type = input("type") ?: 0;
+
         // 查询是否重复发送
-        $where["phone"]=$phone;
-        $where["add_time"]=["<",time()-(1*60)];
-        $phone_code=PhoneCode::where($where)->find();
-        if ($phone_code){
-            json_result(400,"验证码已发送请稍后再发送");
+        $where["phone"] = $phone;
+        $where["add_time"] = ["<", time() - (1 * 60)];
+        $phone_code = PhoneCode::where($where)->find();
+        if ($phone_code) {
+            json_result(400, "验证码已发送请稍后再发送");
         }
-        $res=Tripartite::send_code($phone,$type);
-        json_result(200,"验证码发送成功",$res);
-        
+        $res = Tripartite::send_code($phone, $type);
+        json_result(200, "验证码发送成功", $res);
+
     }
 
     // 注册
     public function register()
     {
-        $phone=input("phone");if (!$phone)json_result(400,"请输入手机号或者邮箱");
-        $code=input("code");if (!$code)json_result(400,"请输入验证码");
-        $name=input("name");if (!$name)json_result(400,"请输入账户呢称");
-        $type=input("type")?:0;
-        $pwd=input("pwd");if (!$pwd)json_result(400,"请输入密码");
-        $pid=input("pid");
+        $phone = input("phone");
+        if (!$phone) json_result(400, "请输入手机号或者邮箱");
+        $code = input("code");
+        if (!$code) json_result(400, "请输入验证码");
+        $name = input("name");
+        if (!$name) json_result(400, "请输入账户呢称");
+        $type = input("type") ?: 0;
+        $pwd = input("pwd");
+        if (!$pwd) json_result(400, "请输入密码");
+        $pid = input("pid");
 
         // 查看账号是存在
-        $where["phone|mail"]=$phone;
-        $user=User::where($where)->find();
-        if ($user){
-            json_result(400,"账号已注册,请前去登录");
+        $where["phone|mail"] = $phone;
+        $user = User::where($where)->find();
+        if ($user) {
+            json_result(400, "账号已注册,请前去登录");
         }
 
         // 验证码
-        $phone_code=Tripartite::push_code($phone);
-        if ($phone_code!=$code){
-            json_result(400,"验证码错误");
+        $phone_code = Tripartite::push_code($phone);
+        if ($phone_code != $code) {
+            json_result(400, "验证码错误");
         }
 
-        if ($pid){
-            $where["code"]=$pid;
-            $pid_user=User::where($where)->find();
-            if (!$pid_user){
-                json_result(400,"上级账号不存在");
+        if ($pid) {
+            $where["code"] = $pid;
+            $pid_user = User::where($where)->find();
+            if (!$pid_user) {
+                json_result(400, "上级账号不存在");
             }
-            $add["pid"]=$pid_user->id;
+            $add["pid"] = $pid_user->id;
+//            Team::all_tem($pid_user->id);
         }
-        $add["code"]=uniqid();
-        if ($type==0){
-            $add["phone"]=$phone;
-        }else{
-            $add["mail"]=$phone;
+        $add["code"] = uniqid();
+        if ($type == 0) {
+            $add["phone"] = $phone;
+        } else {
+            $add["mail"] = $phone;
         }
-        $add["name"]=$name;
-        $uuid=Uuid::uuid1();
-        $add["token"]=$uuid->getHex();;
-        $add["add_time"]=time();
-        $add["pwd"]= password_hash($pwd, PASSWORD_DEFAULT);;
+
+        $add["name"] = $name;
+        $add["uuid"] = uniqid();// 收款ID
+        $uuid = Uuid::uuid1();
+        $add["token"] = $uuid->getHex();;
+        $add["add_time"] = time();
+        $add["pwd"] = password_hash($pwd, PASSWORD_DEFAULT);;
+
+//        dump($add);die();
         User::create($add);
-        json_result(200,"测试成功");
+        json_result(200, "注册成功");
 
     }
 
     // 忘记密码 第一部
     public function forget_password()
     {
-        $phone=input("phone");if(!$phone)json_result(400,"请输入手机号码或者邮箱");
-        $type=input("type")?:0;
-        $code=input("code");if (!$code)json_result(400,"请输入验证码");
-        $name=input("name");
+        $phone = input("phone");
+        if (!$phone) json_result(400, "请输入手机号码或者邮箱");
+        $type = input("type") ?: 0;
+        $code = input("code");
+        if (!$code) json_result(400, "请输入验证码");
+        $name = input("name");
         // 查看账号是存在
-        $where["phone|mail"]=$phone;
-        $user=User::where($where)->find();
-        if (!$user){
-            json_result(400,"账号不存在");
+        $where["phone|mail"] = $phone;
+        $user = User::where($where)->find();
+        if (!$user) {
+            json_result(400, "账号不存在");
         }
         // 验证码
-        $phone_code=Tripartite::push_code($phone,$type);
-        if ($phone_code!=$code){
-            json_result(400,"验证码错误");
+        $phone_code = Tripartite::push_code($phone, $type);
+        if ($phone_code != $code) {
+            json_result(400, "验证码错误");
         }
-        json_result(200,"验证码成功");
+        json_result(200, "验证码成功");
     }
 
     // 修改密码--第二步
     public function update_password()
     {
-        $pwd=input("pwd");if (!$pwd)json_result(400,"请输入密码");
-        $phone=input("phone");if(!$phone)json_result(400,"请输入手机号码或者邮箱");
+        $pwd = input("pwd");
+        if (!$pwd) json_result(400, "请输入密码");
+        $phone = input("phone");
+        if (!$phone) json_result(400, "请输入手机号码或者邮箱");
         // 查看账号是存在
-        $where["phone|mail"]=$phone;
-        $user=User::where($where)->find();
-        if (!$user){
-            json_result(400,"账号不存在");
+        $where["phone|mail"] = $phone;
+        $user = User::where($where)->find();
+        if (!$user) {
+            json_result(400, "账号不存在");
         }
-        $add["pwd"]= password_hash($pwd, PASSWORD_DEFAULT);;
-        User::where(["id"=>$user->id])->update($add);
-        json_result(200,"设置密码成功");
+        $add["pwd"] = password_hash($pwd, PASSWORD_DEFAULT);;
+        User::where(["id" => $user->id])->update($add);
+        json_result(200, "设置密码成功");
     }
 
     // 上传图片
     public function up_image()
     {
-          $img = request()->file('image');
-        if ($img){
-            $up['image']=Upfile::uploadone($img);
-            json_result(1,"成功",$up['image']);
-        }else{
-            json_result(2,"请上传图片");
-        }
+        $upfile = new Upfile();
+        $ret = $upfile->Uploads();
+        json_result(200, "", $ret["url"]);
+    }
+
+    // 会员协议
+    public function Membership()
+    {
+        $where["name"]="Membership";
+        $data=System::where($where)->field("value")->find();
+        json_result(200,"",$data->value?:"");
+
+    }
+
+    // 测试接口
+    public function test()
+    {
+        Team::father(2,8);
+
     }
 
 }

+ 86 - 20
php/app/web/controller/My.php

@@ -9,6 +9,7 @@
 namespace app\web\controller;
 
 
+use app\common\controller\Orde;
 use app\common\model\About;
 use app\common\model\Bond;
 use app\common\model\BondFinance;
@@ -19,10 +20,15 @@ use app\common\model\GeneralTransfer;
 use app\common\model\Message;
 use app\common\model\Notice;
 use app\common\model\Problem;
+use app\common\model\System;
 use app\common\model\User;
+use app\common\model\UserLevel;
 use app\common\model\UserMessage;
+use app\common\model\VendibilityFinance;
+use app\web\model\Team;
 use app\web\model\Tripartite;
-use think\Db;
+use think\facade\Db;
+
 
 class My extends Base
 {
@@ -108,7 +114,7 @@ class My extends Base
             UserMessage::create($add);
             $user_message = UserMessage::where($where)->find();
         }
-        json_result(200, $user_message);
+        json_result(200,"",$user_message);
 
     }
 
@@ -135,12 +141,14 @@ class My extends Base
     // 消息 获取最新的三条数据
     public function notice()
     {
-        $notice = Message::where(["type" => 0])->order("id desc")->find(); // 公告
-        $message_jiaoyi = Message::where(["type" => 2])->order("id desc")->find();// 交易
-        $message_zijin = Message::where(["type" => 1])->order("id desc")->find();// 资金
-        $data["notice"] = $notice;
-        $data["message_jiaoyi"] = $message_jiaoyi;
-        $data["message_zijin"] = $message_zijin;
+
+        $notice = Message::where(["type" => 0,"user_id"=>$this->user_id])->order("id desc")->find(); // 公告
+
+        $message_jiaoyi = Message::where(["type" => 2,"user_id"=>$this->user_id])->order("id desc")->find();// 交易
+        $message_zijin = Message::where(["type" => 1,"user_id"=>$this->user_id])->order("id desc")->find();// 资金
+        $data["notice"] = $notice?:new \ArrayObject();
+        $data["message_jiaoyi"] = $message_jiaoyi?:new \ArrayObject();
+        $data["message_zijin"] = $message_zijin?:new \ArrayObject();
         json_result(200, "", $data);
     }
 
@@ -192,7 +200,7 @@ class My extends Base
         $page = input("page") ?: 1;
         $limit = input("limit") ?: 10;
 
-        $list = Problem::order("id desc")->paginate(['list_rows' => $limit, 'page' => $page]);
+        $list = Problem::order("id desc")->field("id,name")->paginate(['list_rows' => $limit, 'page' => $page]);
 
         json_result(200, "", $list);
     }
@@ -218,9 +226,17 @@ class My extends Base
         $where["id"] = $this->user_id;
         $update["pwd"] = password_hash($pwd, PASSWORD_DEFAULT);;
         $user = User::where($where)->find();
-        if ($user->pwd == $update["pwd"]) {
-            json_result(400, "原密码不能和新密码一样");
+
+        // 查看原密码是否错误
+        if (!password_verify($yuan, $user->pwd)) {
+            json_result(400, "原密码错误");
         }
+
+
+//        if ($user->pwd == $update["pwd"]) {
+//            json_result(400, "原密码不能和新密码一样");
+//        }
+
         User::update($update, $where);
         json_result(200, "设置成功");
     }
@@ -238,9 +254,8 @@ class My extends Base
     {
         $where["pid"] = $this->user_id;
         $count = User::where($where)->count();
-
         $data["push"] = $count;
-        $data["team"] = $this->user["team"];
+        $data["team"] = Team::all_tem($this->user_id);
         json_result(200, "", $data);
 
     }
@@ -257,7 +272,7 @@ class My extends Base
         } else {
             $where["pid"] = $this->user_id;
         }
-        $list = Problem::where($where)->order("id desc")->field("id,image,phone,name,mail,add_time")->paginate(['list_rows' => $limit, 'page' => $page])->each(function ($item) {
+        $list = User::where($where)->order("id desc")->field("id,image,phone,name,mail,add_time")->paginate(['list_rows' => $limit, 'page' => $page])->each(function ($item) {
             // 统计人数
             $where["pid"] = $item["id"];
             $count = User::where($where)->count();
@@ -272,11 +287,11 @@ class My extends Base
 
     // 可售额度
     public function vendibility_list()
-    {
+    {//lm_vendibility_finance
         $page = input("page") ?: 1;
         $limit = input("limit") ?: 10;
         $where["user_id"]=$this->user_id;
-        $list = Problem::where($where)->order("id desc")->paginate(['list_rows' => $limit, 'page' => $page])->each(function ($item) {
+        $list = VendibilityFinance::where($where)->order("id desc")->paginate(['list_rows' => $limit, 'page' => $page])->each(function ($item) {
             if ($item["add_time"]) {
                 $item["add_time"] = date("Y-m-d H:i", $item["add_time"]);
             }
@@ -321,10 +336,20 @@ class My extends Base
         $money=input("money");if (!$money)json_result(400,"请输入提现金额");
         $type=input("type")?:0;//0 充值 1 提现
 
-        // 查看账号余额
-        if ($this->user->ensure_money<$money){
-            json_result(400,"账号保证金不足");
+        // 直接处理转账成功
+        if ($type==0){
+            if ($this->user->money<$money){
+                json_result(400,"当前账号通证余额不足");
+            }
+        }else{
+            // 查看账号余额
+            if ($this->user->ensure_money<$money){
+                json_result(400,"账号保证金不足");
+            }
         }
+        // 直接转账操作
+        Orde::bond_transfer($this->user,$this->user_id,$money,$this->user->ensure_money,$type);
+        // 添加记录
         $add["money"]=$money;
         $add["type"]=$type;
         $add["status"]=0;
@@ -348,6 +373,8 @@ class My extends Base
         $add["status"]=0;
         $add["add_time"]=time();
         GeneralFinance::create($add);
+        // 添加转账操作
+
         json_result(200,"申请成功");
     }
 
@@ -364,6 +391,11 @@ class My extends Base
         if (!$user){
             json_result(200,"账号不存在");
         }
+        // 查找无限级
+        $team=Team::father($this->user_id,$user->id);
+        if (!$team){
+            json_result(400,"非同一个直推链不能转账");
+        }
         $add["user_id"]=$this->user_id;
         $add["puser_id"]=$user->id;
         $add["account"]=$account;
@@ -371,10 +403,44 @@ class My extends Base
         $add["status"]=0;
         $add["add_time"]=time();
         GeneralTransfer::create($add);
-        json_result(200,"申请成功");
+        $jmoney=$this->user["money"]-$money;
+        $name=$this->user["name"];
+        Orde::transfer($this->user_id,$user->id,$money,$jmoney,$name);
+        json_result(200,"转账成功");
+    }
+
+
+    // 转账验证密码
+    public function transfer_pwd()
+    {
+        $pwd=input("pwd");if (!$pwd)json_result(400,"请输入密码");
+
+        if (!password_verify($pwd,$this->user->pwd)){
+            json_result(400,"密码错误");
+        }
+        json_result(200,"密码正确");
 
     }
 
 
+    // 购买通证显示页面
+    public function general_show()
+    {
+        $where["level"]=$this->user["vip_level"];
+        $level=UserLevel::where($where)->find();
+
+        $data["vip_level"]=$this->user["vip_level"];
+        $data["vip_bili"]=$level->bili;
+        $data["tong_money"]=$this->user->money;
+        $system=System::where(["type"=>"shouk"])->field("name,value")->select();
+        foreach ($system as $v){
+            if ($v->name=="usdt"){
+                $data["usdt"]=$v->value?:"";
+            }else{
+                $data["code"]=$v->value?:"";
+            }
+        }
+        json_result(200,"",$data);
+    }
 
 }

+ 33 - 0
php/app/web/model/Msg.php

@@ -0,0 +1,33 @@
+<?php
+/**
+ *
+ * User: anyluck
+ * Date: 2020/6/4
+ * Time: 15:28
+ */
+
+namespace app\web\model;
+
+
+class Msg
+{
+ // 第三方通知
+
+    /** 短信通知
+     * @param $content 内容
+     * @param $phone 手机号码
+     */
+    public static function phone($content,$phone)
+    {
+
+    }
+
+    /** 邮件通知
+     * @param $content 内容
+     * @param $mail 邮件地址
+     */
+    public static function mail($content,$mail)
+    {
+
+    }
+}

+ 168 - 25
php/app/web/model/Orders.php

@@ -9,10 +9,13 @@
 namespace app\web\model;
 
 
+use app\common\controller\Orde;
 use app\common\model\Mining;
 use app\common\model\Order;
 use app\common\model\OrderFrequency;
+use app\common\model\User;
 use app\common\model\UserMessage;
+use app\common\model\VendibilityFinance;
 use Ramsey\Uuid\Uuid;
 
 class Orders
@@ -25,29 +28,36 @@ class Orders
      * @param int $status 0 未匹配 1 已匹配或待支付 2已上传数据 3 已完成 4 已撤销 5 交易失败