wupengfei 2 年之前
父節點
當前提交
e95f84fcd4
共有 2 個文件被更改,包括 26 次插入2 次删除
  1. 1 2
      .idea/workspace.xml
  2. 25 0
      application/api/controller/Mall.php

+ 1 - 2
.idea/workspace.xml

@@ -4,7 +4,6 @@
     <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/Mall.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Mall.php" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/mall/view/store_goods/form.html" beforeDir="false" afterPath="$PROJECT_DIR$/application/mall/view/store_goods/form.html" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -222,7 +221,7 @@
       <workItem from="1665189429149" duration="5358000" />
       <workItem from="1665206979508" duration="7749000" />
       <workItem from="1665276346161" duration="19728000" />
-      <workItem from="1665362529961" duration="17306000" />
+      <workItem from="1665362529961" duration="19915000" />
     </task>
     <servers />
   </component>

+ 25 - 0
application/api/controller/Mall.php

@@ -263,5 +263,30 @@ class Mall extends Base
     }
 
 
+    /**
+     * @title 获取我发布的商品列表
+     * @desc  获取我发布的商品列表
+     * @author  qc
+     * @url /api/Mall/getOwnGoodsList
+     * @method GET
+     * @header name:Authorization require:1 desc:Token
+     * @param  name:page type:int default:1 desc:页数
+     * @param  name:page_num type:int default:20 desc:每页数
+     * @param  name:name type:string require:0  default:-- desc:商品名称
+     * @return name:name type:string default:-- desc:商品名称
+     * @return name:cover type:string default:-- desc:商品封面图
+     * @return name:desc type:string default:-- desc:商品简述(副标题)
+     * @return name:low_price type:float default:-- desc:最低售价
+     */
+    public function getOwnGoodsList()
+    {
+        $list = StoreGoods::field('id,name,desc,create_at,low_price')
+            ->where(['user_id'=>$this->user_id])
+            ->order(['sort'=>'desc','id'=>'desc'])
+            ->limit($this->off_set,$this->page_num)
+            ->select()->toArray();
+        $this->success('ok',['list'=>$list]);
+    }
+
 
 }