1、修复bug

2、后台栏目分模型划分
3、前台增加微信开发用户登录功能
This commit is contained in:
2017-08-15 22:09:59 +08:00
parent d6ea6c7e80
commit ded54b79ca
14 changed files with 240 additions and 81 deletions

View File

@@ -30,25 +30,23 @@ class Addons extends Base {
if (is_file($this->addon_path . 'config.php')) {
$this->config_file = $this->addon_path . 'config.php';
}
$this->template();
}
public function template($template) {
public function template() {
$mc = $this->getAddonsName();
$ac = input('ac', '', 'trim,strtolower');
$parse_str = \think\Config::get('parse_str');
$parse_str['__ADDONROOT__'] = ROOT_PATH . "/addons/{$mc}";
\think\Config::set('parse_str', $parse_str);
if ($template) {
$template = $template;
} else {
$template = $mc . "/" . $ac;
}
$this->view->engine(
array('view_path' => "addons/" . $mc . "/view/")
array(
'view_path' => "addons/" . $mc . "/view/",
'replace' => array('__ADDONROOT__'=>ROOT_PATH . "/addons/{$mc}")
)
);
echo $this->fetch($template);
}
final public function getAddonsName() {