|
|
@@ -4,7 +4,7 @@ namespace app\api\controller\v1\activity;
|
|
|
|
|
|
use app\Request;
|
|
|
use app\services\activity\integral\StoreIntegralServices;
|
|
|
-
|
|
|
+use app\services\user\UserWechatuserServices;
|
|
|
class StoreIntegralController
|
|
|
{
|
|
|
protected $services;
|
|
|
@@ -21,11 +21,15 @@ class StoreIntegralController
|
|
|
* @throws \think\db\exception\DbException
|
|
|
* @throws \think\db\exception\ModelNotFoundException
|
|
|
*/
|
|
|
- public function index()
|
|
|
+ public function index(Request $request)
|
|
|
{
|
|
|
$data['banner'] = sys_data('integral_shop_banner') ?? [];//TODO 积分商城banner
|
|
|
$where = ['is_show' => 1];
|
|
|
$where['is_host'] = 1;
|
|
|
+ $uid = (int)$request->uid();
|
|
|
+ $userInfo = app()->make(UserWechatuserServices::class)->getUserByUid($uid);
|
|
|
+ $goods_user_type = $userInfo['goods_user_type'];
|
|
|
+ $where['goods_user_type'] = $goods_user_type;
|
|
|
$data['list'] = $this->services->getIntegralList($where);
|
|
|
return app('json')->success(get_thumb_water($data, 'big'));
|
|
|
}
|
|
|
@@ -43,6 +47,10 @@ class StoreIntegralController
|
|
|
['salesOrder', ''],
|
|
|
]);
|
|
|
$where['is_show'] = 1;
|
|
|
+ $uid = (int)$request->uid();
|
|
|
+ $userInfo = app()->make(UserWechatuserServices::class)->getUserByUid($uid);
|
|
|
+ $goods_user_type = $userInfo['goods_user_type'];
|
|
|
+ $where['goods_user_type'] = $goods_user_type;
|
|
|
$list = $this->services->getIntegralList($where);
|
|
|
return app('json')->success(get_thumb_water($list, 'mid'));
|
|
|
}
|