mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
[更新]修改微信商城菜单配置
This commit is contained in:
parent
5ffe086ec1
commit
27cdcf7d05
@ -19,7 +19,7 @@ class Index
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
return 'fasdfas';
|
||||
return '微信商城---开发中...';
|
||||
}
|
||||
|
||||
public function pay()
|
||||
|
@ -17,16 +17,18 @@ use think\facade\Route;
|
||||
use think\Request;
|
||||
|
||||
/* 注册微信端路由支持 */
|
||||
Route::rule('wx-<controller>-<action>', function (Request $request, $controller, $action) {
|
||||
$params = explode('-', $request->pathinfo());
|
||||
[array_shift($params), array_shift($params), array_shift($params)];
|
||||
Route::rule('wx', function (Request $request) {
|
||||
$params = explode('-', $request->path());
|
||||
array_shift($params);
|
||||
$controller = array_shift($params) ?: config('app.default_controller');
|
||||
$action = array_shift($params) ?: config('app.default_action');
|
||||
return App::action("store/wechat.{$controller}/{$action}", $params);
|
||||
});
|
||||
|
||||
// 微信菜单链接配置
|
||||
$GLOBALS['WechatMenuLink'][] = [
|
||||
'link' => 'wx-demo-jsapi',
|
||||
'title' => '微信JSAPI支付测试',
|
||||
];
|
||||
$GLOBALS['WechatMenuLink'][] = ['link' => 'wx', 'title' => '微信JSAPI支付测试'];
|
||||
$GLOBALS['WechatMenuLink'][] = ['link' => 'wx-demo-jsapi', 'title' => '微信JSAPI支付测试'];
|
||||
|
||||
// @todo 模块处理机制将写在下面(包括模块初始化及升级)
|
||||
// @todo 模块处理机制将写在下面(包括模块初始化及升级)
|
||||
// @todo 模块权限处理,使用全局数组
|
||||
// @todo 模板菜单处理,默认放到全局数组中,然后在菜单中可以快速编辑(还要考虑下)
|
Loading…
x
Reference in New Issue
Block a user