This commit is contained in:
尖叫 2023-12-11 10:07:19 +08:00
parent 94451168b2
commit 400dc08f29

View File

@ -1,4 +1,5 @@
<?php
namespace app\store\controller\food;
use app\store\model\Setting as SettingModel;
@ -52,7 +53,7 @@ class Controller extends \app\BaseController
{
// 控制器名称
$this->controller = uncamelize($this->request->controller());
$controller = str_replace($this->app_type . '.','',$this->controller); //取消掉 'food.'
$controller = str_replace($this->app_type . '.', '', $this->controller); //取消掉 'food.'
// 方法名称
$this->action = $this->request->action();
// 控制器分组 (用于定义所属模块)
@ -84,7 +85,7 @@ class Controller extends \app\BaseController
$this->shop_mode = $this->user['applet']['shop_mode']['value'];//门店模式
$this->applet_id = $this->user['applet']['applet_id'];//应用ID
//如果是单门店
if($this->shop_mode == 10){
if ($this->shop_mode == 10) {
$shop = Shop::getShop();
$this->shop_id = $shop['shop_id'];
}
@ -100,7 +101,7 @@ class Controller extends \app\BaseController
// 输出到view
View::assign([
'base_url' => base_url(), // 当前站点域名
'web' => SettingModel::getItem('web',0), //站点设置
'web' => SettingModel::getItem('web', 0), //站点设置
'store_url' => '/store/' . $this->app_type . '.', // 后台模块url
'group' => $this->group,
'menus' => $this->menus(), // 后台菜单
@ -108,7 +109,7 @@ class Controller extends \app\BaseController
'app_type' => $this->app_type, //小程序类型
'applet_id' => $this->applet_id, //小程序ID
'logout' => 'applet', //退出登录方式 applet=小程序退出 logout=其他管理端退出
'app_name' => '河马点单',//后台管理菜单名称
'app_name' => '点单',//后台管理菜单名称
'version' => $info['version']
]);
}