diff --git a/app/controller/api/Auth.php b/app/controller/api/Auth.php index 2e3a95ed..d8d25cd1 100644 --- a/app/controller/api/Auth.php +++ b/app/controller/api/Auth.php @@ -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); } diff --git a/app/controller/api/community/Community.php b/app/controller/api/community/Community.php index 154a7aa8..7a905325 100644 --- a/app/controller/api/community/Community.php +++ b/app/controller/api/community/Community.php @@ -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); } diff --git a/app/controller/api/store/product/StoreSpu.php b/app/controller/api/store/product/StoreSpu.php index b9ba36d5..6ccf1b76 100644 --- a/app/controller/api/store/product/StoreSpu.php +++ b/app/controller/api/store/product/StoreSpu.php @@ -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 diff --git a/public/index.html b/public/index.html index de8fcb30..cf010ab8 100644 --- a/public/index.html +++ b/public/index.html @@ -2,4 +2,4 @@ document.write('') if(window.location.protocol == 'https:'){ document.write('') - }