diff --git a/luci-app-wizard/luasrc/controller/wizard.lua b/luci-app-wizard/luasrc/controller/wizard.lua index 31544c2dd..65d1436b3 100644 --- a/luci-app-wizard/luasrc/controller/wizard.lua +++ b/luci-app-wizard/luasrc/controller/wizard.lua @@ -4,7 +4,26 @@ local uci = luci.model.uci.cursor() local http = require "luci.http" function index() - entry({"admin", "index"}, call("landing_page"), _("Home") , 1).dependent = false + -- 1. 注册 admin/index 为纯路由跳板(无 title,不占菜单) + entry({"admin", "index"}, call("landing_page")).dependent = false + + -- 2. 核心:直接改写 admin 根节点的调度目标 + -- 这样当用户访问 /admin、登录后跳转或访问根目录时,无需经过 firstchild(),直接执行 landing_page() + local admin = node("admin") + if admin then + admin.target = call("landing_page") + end +end + +local function check_wifi() + local has_wifi = false + pcall(function() + uci:foreach("wireless", "wifi-device", function(s) + has_wifi = true + return false -- 检测到任意 wifi-device 即终止遍历 + end) + end) + return has_wifi end function landing_page() @@ -22,7 +41,13 @@ function landing_page() http.redirect(luci.dispatcher.build_url("admin","quickstart")); end else - http.redirect(luci.dispatcher.build_url("admin","status", "overview")) - end + if check_wifi() then + -- 具备无线功能,跳转至常用无线仪表盘界面 + http.redirect(luci.dispatcher.build_url("admin", "dashboard")) + else + -- 无无线设备(纯有线环境),跳转至原生状态概览 + http.redirect(luci.dispatcher.build_url("admin", "status", "overview")) + end + end end diff --git a/wwand/Makefile b/wwand/Makefile index f4857a45a..4bda827aa 100644 --- a/wwand/Makefile +++ b/wwand/Makefile @@ -50,12 +50,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=wwand -PKG_VERSION:=1.6.7_p56 -PKG_RELEASE:=49 +PKG_VERSION:=1.6.7_p58 +PKG_RELEASE:=50 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://github.com/ddimension/wwand.git -PKG_SOURCE_VERSION:=6c94f21ffc8750a6ac793f0e30d2f3b9220573aa +PKG_SOURCE_VERSION:=1b575d41dd35684e035541afe1f129da072275dd PKG_MIRROR_HASH:=skip PKG_LICENSE:=GPL-2.0-only