chuweiqiang 11 月之前
父節點
當前提交
0e798ea03a
共有 3 個文件被更改,包括 85 次插入4 次删除
  1. 3 2
      .idea/workspace.xml
  2. 2 2
      application/api/controller/Datum.php
  3. 80 0
      runtime/log/single.log

+ 3 - 2
.idea/workspace.xml

@@ -2,8 +2,9 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Datum.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Datum.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/runtime/log/single.log" beforeDir="false" afterPath="$PROJECT_DIR$/runtime/log/single.log" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/runtime/log/single_sql.log" beforeDir="false" afterPath="$PROJECT_DIR$/runtime/log/single_sql.log" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -599,7 +600,7 @@
       <workItem from="1714109915098" duration="14739000" />
       <workItem from="1714177835625" duration="26205000" />
       <workItem from="1714351055428" duration="25649000" />
-      <workItem from="1714436787305" duration="20650000" />
+      <workItem from="1714436787305" duration="22487000" />
     </task>
     <servers />
   </component>

+ 2 - 2
application/api/controller/Datum.php

@@ -373,8 +373,8 @@ class Datum extends Base
     {
         $url_id = input('get.url_id');
         $detail = DatumUrl::where('id',$url_id)->find()->toArray();
-
-        if($detail['is_deleted'] == 1 || $detail['status'] == 0) $this->error('该资料已下架');
+        $is_release = UserLearn::checkRelease($this->user_id,2,$detail['datum_id']);
+        if($detail['is_deleted'] == 1 || $detail['status'] == 0 || $is_release == 0) $this->error('该资料已下架');
         $detail['series_title'] =DatumIntro::where('id',$detail['datum_id'])->value('title');
         $detail['follow_switch'] = PlatformSwitch::checkSwitch($this->user_id,$detail['datum_id'],4);
         $detail['collect_num']  = UserCollect::where(['coll_type'=>2,'coll_id'=>$detail['datum_id'],'children_id'=>$detail['id']])->count();

+ 80 - 0
runtime/log/single.log

@@ -94852,3 +94852,83 @@
   8 => 'type_arr',
   9 => 'pagehtml',
 ) ]
+---------------------------------------------------------------
+
+[2024-04-30T17:00:47+08:00] 127.0.0.1 GET gaoyx.com/apidoc/config
+[运行时间:0.111087s] [吞吐率:9.00req/s] [内存消耗:335.79kb] [文件加载:130]
+[ info ] [ LANG ] D:\project\gyx\gaoyixia\vendor\zoujingli\think-library\src/lang/zh-cn.php
+[ info ] [ LANG ] D:\project\gyx\gaoyixia\vendor\zoujingli\think-library\src/lang/en-us.php
+[ info ] [ LANG ] D:\project\gyx\gaoyixia\thinkphp\lang\zh-cn.php
+[ info ] [ ROUTE ] array (
+  'rule' => 'apidoc/config',
+  'route' => '\\hg\\apidoc\\Controller@getConfig',
+  'option' => 
+  array (
+    'merge_rule_regex' => false,
+  ),
+  'var' => 
+  array (
+  ),
+)
+[ info ] [ HEADER ] array (
+  'cookie' => 'PHPSESSID=dm3pu3g138khtocrb0pn2kd3f6; SECKEY_ABVK=5REnkKF3MDpo+lZPEvPfM+zwzFDAIoJPVCk/R1RWXszSb1Wee6JF793uvqtNZtI4p9xjwyg0w8ewbx40P5Dctw%3D%3D; BMAP_SECKEY=5REnkKF3MDpo-lZPEvPfM-zwzFDAIoJPVCk_R1RWXsw5fvGkKH_C0A4s5-PiIBuQAvwpsAkDfgkuzf-M3UdzUKUFjO8OuHwxWcbMfnBa9q5gcNSc4Y8qyYLy3u66ujOH_GR-tx9OR1mBeQQWG_ydqX_xJt0pvS0uhyy2wReWJtXMWTrw0bEiRrQHMzcdVMGb850S1AITE1KdHw43lu6x2YloCWeK_DuXTd64swWWKsY',
+  'accept-language' => 'zh-CN,zh;q=0.9',
+  'accept-encoding' => 'gzip, deflate, br, zstd',
+  'referer' => 'https://gaoyx.com/apidoc/?appKey=V1.0',
+  'sec-fetch-dest' => 'empty',
+  'sec-fetch-mode' => 'cors',
+  'sec-fetch-site' => 'same-origin',
+  'sec-ch-ua-platform' => '"Windows"',
+  'user-agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36',
+  'sec-ch-ua-mobile' => '?0',
+  'accept' => 'application/json, text/plain, */*',
+  'sec-ch-ua' => '"Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"',
+  'connection' => 'keep-alive',
+  'host' => 'gaoyx.com',
+  'content-length' => '',
+  'content-type' => '',
+)
+[ info ] [ PARAM ] array (
+)
+---------------------------------------------------------------
+
+[2024-04-30T17:00:47+08:00] 127.0.0.1 GET gaoyx.com/apidoc/data?appKey=V1.0&version=V1.0&cacheFileName=&reload=false
+[运行时间:0.209497s] [吞吐率:4.77req/s] [内存消耗:1,368.63kb] [文件加载:169]
+[ info ] [ LANG ] D:\project\gyx\gaoyixia\vendor\zoujingli\think-library\src/lang/zh-cn.php
+[ info ] [ LANG ] D:\project\gyx\gaoyixia\vendor\zoujingli\think-library\src/lang/en-us.php
+[ info ] [ LANG ] D:\project\gyx\gaoyixia\thinkphp\lang\zh-cn.php
+[ info ] [ ROUTE ] array (
+  'rule' => 'apidoc/data',
+  'route' => '\\hg\\apidoc\\Controller@getList',
+  'option' => 
+  array (
+    'merge_rule_regex' => false,
+  ),
+  'var' => 
+  array (
+  ),
+)
+[ info ] [ HEADER ] array (
+  'cookie' => 'PHPSESSID=dm3pu3g138khtocrb0pn2kd3f6; SECKEY_ABVK=5REnkKF3MDpo+lZPEvPfM+zwzFDAIoJPVCk/R1RWXszSb1Wee6JF793uvqtNZtI4p9xjwyg0w8ewbx40P5Dctw%3D%3D; BMAP_SECKEY=5REnkKF3MDpo-lZPEvPfM-zwzFDAIoJPVCk_R1RWXsw5fvGkKH_C0A4s5-PiIBuQAvwpsAkDfgkuzf-M3UdzUKUFjO8OuHwxWcbMfnBa9q5gcNSc4Y8qyYLy3u66ujOH_GR-tx9OR1mBeQQWG_ydqX_xJt0pvS0uhyy2wReWJtXMWTrw0bEiRrQHMzcdVMGb850S1AITE1KdHw43lu6x2YloCWeK_DuXTd64swWWKsY',
+  'accept-language' => 'zh-CN,zh;q=0.9',
+  'accept-encoding' => 'gzip, deflate, br, zstd',
+  'referer' => 'https://gaoyx.com/apidoc/?appKey=V1.0',
+  'sec-fetch-dest' => 'empty',
+  'sec-fetch-mode' => 'cors',
+  'sec-fetch-site' => 'same-origin',
+  'sec-ch-ua-platform' => '"Windows"',
+  'user-agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36',
+  'sec-ch-ua-mobile' => '?0',
+  'accept' => 'application/json, text/plain, */*',
+  'sec-ch-ua' => '"Google Chrome";v="123", "Not:A-Brand";v="8", "Chromium";v="123"',
+  'connection' => 'keep-alive',
+  'host' => 'gaoyx.com',
+  'content-length' => '',
+  'content-type' => '',
+)
+[ info ] [ PARAM ] array (
+  'appKey' => 'V1.0',
+  'version' => 'V1.0',
+  'cacheFileName' => '',
+  'reload' => 'false',
+)