Merge pull request 'dev' (#1) from dev into master

Reviewed-on: #1
This commit is contained in:
mkm 2023-09-02 11:41:12 +08:00
commit 02d0833b9f
4 changed files with 51 additions and 1 deletions

View File

@ -218,6 +218,19 @@ class Auth extends BaseController
$data['community_num'] = Db::name('community')->where('uid', $user->uid)->whereIn('is_type', '1,2')->count();
$thirdparty = Db::name('user_thirdparty_token')->where('user_id', $user->uid)->select();
$thirdList = [];
foreach($thirdparty as $v) {
$temp = [
'account' => $v['account'],
'user_type' => $v['user_type'],
'token' => $v['token']
];
if ($v['expires_time'] <= date('Y-m-d H:i:s')) {
$temp['token'] = '';
}
$thirdList[] = $temp;
}
$data['thirdparty'] = $thirdList;
return app('json')->success($data);
}

View File

@ -149,7 +149,6 @@ class Community extends BaseController
}
$where['is_del'] = 0;
$where['community_id'] = $this->request->param('community_id','');
$data = $this->repository->getApiVideoList($where, $page, $limit, $this->user,$is_start);
return app('json')->success($data);
}

View File

@ -69,6 +69,42 @@ class StoreSpu extends BaseController
return app('json')->success($data);
}
/**
* TODO 商品搜索列表
* @return mixed
* @author Qinii
* @day 12/24/20
*/
public function streetLst($id)
{
[$page, $limit] = $this->getPage();
$where = $this->request->params([
'keyword',
'cate_id',
'cate_pid',
'order',
'price_on',
'price_off',
'brand_id',
'pid',
'mer_cate_id',
'product_type',
'action',
'common',
'is_trader',
'product_ids',
'mer_id'
]);
$where['is_gift_bag'] = 0;
$where['product_type'] = 0;
$where['order'] = $where['order'] ?: 'star';
$where['mer_ids'] = Merchant::getInstance()->where('type_id', Merchant::TypeStore)->where('street_id', $id)
->where(['status' => 1, 'mer_state' => 1, 'is_del' => 0])->column('mer_id');
if ($where['is_trader'] != 1) unset($where['is_trader']);
$data = $this->repository->getApiSearch($where, $page, $limit, $this->userInfo);
return app('json')->success($data);
}
/**
* TODO 商户的商品搜索列表
* @param $id

View File

@ -475,6 +475,8 @@ Route::group('api/', function () {
Route::group('product/spu', function () {
//礼包 product/spu/bag
Route::get('/bag', 'StoreSpu/bag');
//商品 product/spu/street/:id
Route::get('/street/:id', 'StoreSpu/streetLst');
//商品 product/spu/lst
Route::get('/lst', 'StoreSpu/lst');
//热门 product/spu/hot/:type