Bladeren bron

AP小程序-浏览记录-(未完成)浏览记录保存

xupuyuan 11 maanden geleden
bovenliggende
commit
3f3c31e93b

+ 1 - 1
app/controller/api/store/product/Jd.php

@@ -229,7 +229,7 @@ class Jd extends BaseController
229
         }
229
         }
230
         shuffle($formatList);
230
         shuffle($formatList);
231
         $uid = $uid ?? 0;
231
         $uid = $uid ?? 0;
232
-        $repository->sproductkeywordHistory($uid, 1, 1, '用户同意用户协议记录');
232
+        $repository->sproductkeywordHistory($uid, $keyword, 2);
233
         return app("json")->success($formatList);
233
         return app("json")->success($formatList);
234
     }
234
     }
235
 
235
 

+ 3 - 2
app/controller/api/store/product/Su.php

@@ -3,6 +3,7 @@
3
 namespace app\controller\api\store\product;
3
 namespace app\controller\api\store\product;
4
 
4
 
5
 use app\common\repositories\store\product\ProductRepository;
5
 use app\common\repositories\store\product\ProductRepository;
6
+use app\common\repositories\user\UserRepository;
6
 use app\common\repositories\user\UserThirdRepository;
7
 use app\common\repositories\user\UserThirdRepository;
7
 use app\model\common\SuOrderModel;
8
 use app\model\common\SuOrderModel;
8
 use app\model\common\TbOrderModel;
9
 use app\model\common\TbOrderModel;
@@ -239,7 +240,7 @@ class Su extends BaseController
239
     }
240
     }
240
 
241
 
241
     // 数据库查询列表
242
     // 数据库查询列表
242
-    public function GoodList()
243
+    public function GoodList(UserRepository $repository)
243
     {
244
     {
244
         [$page, $limit] = $this->getPage();
245
         [$page, $limit] = $this->getPage();
245
 
246
 
@@ -286,7 +287,7 @@ class Su extends BaseController
286
             }
287
             }
287
         }
288
         }
288
         $uid = $uid ?? 0;
289
         $uid = $uid ?? 0;
289
-        //app('app\controller\api\User')->sproductkeywordHistory($uid, $keyword, 3);
290
+        $repository->sproductkeywordHistory($uid, $keyword, 4);
290
         return app('json')->success('获取苏宁商品列表成功', $goodslist);
291
         return app('json')->success('获取苏宁商品列表成功', $goodslist);
291
     }
292
     }
292
 
293
 

+ 3 - 2
app/controller/api/store/product/TaoKe.php

@@ -4,6 +4,7 @@ namespace app\controller\api\store\product;
4
 
4
 
5
 use app\common\model\user\UserThird;
5
 use app\common\model\user\UserThird;
6
 use app\common\repositories\store\product\ProductRepository;
6
 use app\common\repositories\store\product\ProductRepository;
7
+use app\common\repositories\user\UserRepository;
7
 use app\common\repositories\user\UserThirdRepository;
8
 use app\common\repositories\user\UserThirdRepository;
8
 use app\model\common\PddOrderModel;
9
 use app\model\common\PddOrderModel;
9
 use crmeb\services\JwtTokenService;
10
 use crmeb\services\JwtTokenService;
@@ -127,7 +128,7 @@ class TaoKe extends BaseController
127
 
128
 
128
 
129
 
129
     //拼多多商品列表
130
     //拼多多商品列表
130
-    public function pdd_list()
131
+    public function pdd_list(UserRepository $repository)
131
     {
132
     {
132
         $keyword=input('keyword','');
133
         $keyword=input('keyword','');
133
         $cat_id = input('cat_id','');
134
         $cat_id = input('cat_id','');
@@ -279,7 +280,7 @@ class TaoKe extends BaseController
279
         
280
         
280
         shuffle($goodsList);
281
         shuffle($goodsList);
281
         $uid = $uid ?? 0;
282
         $uid = $uid ?? 0;
282
-        //app('app\controller\api\User')->sproductkeywordHistory($uid, $keyword, 3);
283
+        $repository->sproductkeywordHistory($uid, $keyword, 3);
283
         return app('json')->success('获取拼多多商品列表成功', $goodsList);
284
         return app('json')->success('获取拼多多商品列表成功', $goodsList);
284
     }
285
     }
285
 
286
 

+ 2 - 2
app/controller/api/store/product/Vip.php

@@ -291,7 +291,7 @@ class Vip extends BaseController
291
     }
291
     }
292
 
292
 
293
     // 数据库获取列表
293
     // 数据库获取列表
294
-    public function vip_goods()
294
+    public function vip_goods(UserRepository $repository)
295
     {
295
     {
296
         [$page, $limit] = $this->getPage();
296
         [$page, $limit] = $this->getPage();
297
 
297
 
@@ -341,7 +341,7 @@ class Vip extends BaseController
341
             }
341
             }
342
         }
342
         }
343
         $uid = $uid ?? 0;
343
         $uid = $uid ?? 0;
344
-        //('app\controller\api\User')->($uid, $keyword, 3);
344
+        $repository->sproductkeywordHistory($uid, $keyword, 5);
345
         return app('json')->success('获取唯品会商品列表成功', $goodslist);
345
         return app('json')->success('获取唯品会商品列表成功', $goodslist);
346
     }
346
     }
347
 
347