wupengfei 2 年之前
父節點
當前提交
c65dcf2d98
共有 3 個文件被更改,包括 20 次插入7 次删除
  1. 4 3
      .idea/workspace.xml
  2. 5 4
      application/api/controller/Article.php
  3. 11 0
      application/common/model/UserLearn.php

+ 4 - 3
.idea/workspace.xml

@@ -2,6 +2,7 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
+      <change afterPath="$PROJECT_DIR$/application/common/model/UserLearn.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/application/api/controller/Article.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Article.php" afterDir="false" />
     </list>
@@ -124,7 +125,7 @@
     <property name="WebServerToolWindowPanel.toolwindow.show.date" value="false" />
     <property name="WebServerToolWindowPanel.toolwindow.show.permissions" value="false" />
     <property name="WebServerToolWindowPanel.toolwindow.show.size" value="false" />
-    <property name="last_opened_file_path" value="$PROJECT_DIR$/application/nutrition/controller" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/application/common/model" />
     <property name="node.js.detected.package.eslint" value="true" />
     <property name="node.js.detected.package.tslint" value="true" />
     <property name="node.js.path.for.package.eslint" value="project" />
@@ -135,11 +136,11 @@
   </component>
   <component name="RecentsManager">
     <key name="CopyFile.RECENT_KEYS">
+      <recent name="D:\zs\gaoyixia\application\common\model" />
       <recent name="D:\zs\gaoyixia\application\nutrition\controller" />
       <recent name="D:\zs\gaoyixia\application\nutrition\view" />
       <recent name="D:\zs\gaoyixia\application\operate\controller" />
       <recent name="D:\zs\gaoyixia\application\operate\view" />
-      <recent name="D:\zs\gaoyixia\application\common\model" />
     </key>
   </component>
   <component name="SvnConfiguration">
@@ -220,7 +221,7 @@
       <workItem from="1664498426748" duration="13957000" />
       <workItem from="1665189429149" duration="5358000" />
       <workItem from="1665206979508" duration="7749000" />
-      <workItem from="1665276346161" duration="6073000" />
+      <workItem from="1665276346161" duration="6358000" />
     </task>
     <servers />
   </component>

+ 5 - 4
application/api/controller/Article.php

@@ -9,6 +9,7 @@ use app\common\model\ArticleLike;
 use app\common\model\SeriesArticleCate;
 use app\common\model\UserCollect;
 use app\common\model\UserArticle;
+use app\common\model\UserLearn;
 use app\common\model\UserMessage;
 use app\common\model\UserSearch;
 use app\common\model\UserTrack;
@@ -733,11 +734,11 @@ class Article extends Base
         $title = input('get.title');
         if($title)  $sel_where[]  = ['r.title','like','%'.$title.'%'];
         $sel_where[]  = ['t.user_id','=',$this->user_id];
-        $sel_where[]  = ['t.coll_type','=',3];
-        $list = UserCollect::where($sel_where)
+        $sel_where[]  = ['t.type','=',3];
+        $list = UserLearn::where($sel_where)
             ->alias('t')
-            ->field('t.id,t.create_at,t.coll_id article_id,t.children_id item_id,i.title,i.cover')
-            ->leftJoin('ArticleItem i','t.children_id = i.id')
+            ->field('t.id,t.create_at,t.first_id article_id,t.second_id item_id,i.title,i.cover')
+            ->leftJoin('ArticleItem i','t.second_id = i.id')
             ->order('id desc')
             ->limit($this->off_set,$this->page_num)
             ->select()->toArray();

+ 11 - 0
application/common/model/UserLearn.php

@@ -0,0 +1,11 @@
+<?php
+namespace app\common\model;
+use think\Model;
+// 会员视频资料,图文学习服务
+class UserLearn extends Model
+{
+    static $type_desc = [
+        1=>'平台视频', 2=>'资料', 3=>'图文'
+    ];
+
+}