配置修改

This commit is contained in:
2026-07-13 16:33:09 +08:00
parent 9998f4651b
commit d1a15a4c42
15 changed files with 348 additions and 38 deletions

View File

@ -4,12 +4,13 @@ namespace app\api\controller;
use app\common\basics\Api;
use app\api\logic\IndexLogic;
use app\common\logic\ChatLogic;
use app\common\logic\CityLogic;
use app\common\logic\RegionLogic;
use app\common\server\JsonServer;
class Index extends Api
{
public $like_not_need_login = ['index','hotCity', 'indexCategory', 'config','copyright','city','geocoder'];
public $like_not_need_login = ['index','hotCity', 'indexCategory', 'config','copyright','city','geocoder','getEntryCity'];
// 首页
public function index()
@ -114,4 +115,18 @@ class Index extends Api
}
return JsonServer::success('',$result);
}
/**
* 小程序进入时获取应展示的城市商城
* 未扫码:上海总部;扫码:码主人所属城市
*/
public function getEntryCity()
{
$params = [
'invite_code' => $this->request->get('invite_code', ''),
'user_id' => $this->request->get('user_id/d', 0),
];
$data = CityLogic::getEntryCity($params);
return JsonServer::success('获取成功', $data);
}
}

View File

@ -51,8 +51,7 @@ class Shop extends Api
public function getShopCityInfo()
{
if($this->request->isGet()) {
$city_id = $this->request->get('city_id', 0);
$data = ShopLogic::getShopCityInfo($city_id, $this->user_id, input());
$data = ShopLogic::getShopCityInfo(0, $this->user_id, input());
return JsonServer::success('获取店铺信息成功', $data);
}else{
return JsonServer::error('请求类型错误');

View File

@ -46,8 +46,7 @@ class ShopGoodsCategory extends Api
public function getCityGoodsCategory()
{
if($this->request->isGet()) {
$city_id = $this->request->get('city_id', 0);
$data = ShopGoodsCategoryLogic::getCityGoodsCategory($city_id);
$data = ShopGoodsCategoryLogic::getCityGoodsCategory(0, input());
return JsonServer::success('获取店铺分类成功', $data);
}else{
return JsonServer::error('请求类型错误');