增加客户端测试小工具,完善数据脚本

This commit is contained in:
Argo-Lenovo 2016-11-19 20:08:02 +08:00
parent 467f9f9ab1
commit 453df71404
5 changed files with 110 additions and 7 deletions

View File

@ -194,7 +194,7 @@
<Content Include="Content\js\Longbow.Common.js" />
<Content Include="Content\js\messages_zh.js" />
<Content Include="Content\js\messages_zh.min.js" />
<Content Include="DeviceTest.htm" />
<Content Include="Content\html\DeviceTest.htm" />
<Content Include="Scripts\Content.js" />
<Content Include="Scripts\Dicts.js" />
<Content Include="Scripts\Exceptions.js" />
@ -318,6 +318,7 @@
<Content Include="Views\Admin\Exceptions.cshtml" />
<Content Include="Views\Admin\Messages.cshtml" />
<Content Include="Views\Admin\Tasks.cshtml" />
<Content Include="Views\Admin\Mobile.cshtml" />
<None Include="Web.Debug.config">
<DependentUpon>Web.config</DependentUpon>
</None>

View File

@ -3,8 +3,8 @@
<head>
<title></title>
<meta charset="utf-8" />
<script src="Content/js/jquery-1.10.2.js"></script>
<script src="Content/js/Longbow.Common.js"></script>
<script src="../js/jquery-1.10.2.js"></script>
<script src="../js/Longbow.Common.js"></script>
<script>
var browser = $.browser;
document.writeln("语言版本:" + browser.language + "</br>");

View File

@ -127,10 +127,24 @@ namespace Bootstrap.Admin.Controllers
var v = new NavigatorBarModel("~/Admin/Messages");
return View(v);
}
/// <summary>
///
/// </summary>
/// <returns></returns>
public ActionResult Tasks()
{
var v = new NavigatorBarModel("~/Admin/Tasks");
return View(v);
}
/// <summary>
///
/// </summary>
/// <returns></returns>
[AllowAnonymous]
public ActionResult Mobile()
{
var v = new NavigatorBarModel("~/Admin/Mobile");
return View(v);
}
}
}

View File

@ -0,0 +1,74 @@
@model NavigatorBarModel
@{
ViewBag.Title = "客户端测试";
Layout = "~/Views/Shared/_Admin.cshtml";
}
@section css {
<style type="text/css">
label {
word-break: break-all;
}
</style>
}
@section Javascript {
<script>
$(function () {
var browser = $.browser;
$('#language').text(browser.language);
$('#mobile').text(browser.versions.mobile);
$('#webapp').text(browser.versions.webApp);
$('#webkit').text(browser.versions.webKit);
$('#ios').text(browser.versions.ios);
$('#android').text(browser.versions.android);
$('#iphone').text(browser.versions.iPhone);
$('#ipad').text(browser.versions.iPad);
$('#useragent').text(navigator.userAgent);
$('#versions').text(JSON.stringify(browser.versions));
});
</script>
}
@section header {
@Html.Partial("Header", Model)
}
@section navigator {
@Html.Partial("Navigator", Model)
}
<div class="form-group">
<label class="control-label">语言版本:</label>
<label id="language" class="form-control-static"></label>
</div>
<div class="form-group">
<label class="control-label">是否为移动终端:</label>
<label id="mobile" class="form-control-static"></label>
</div>
<div class="form-group">
<label class="control-label">webApp</label>
<label id="webapp" class="form-control-static"></label>
</div>
<div class="form-group">
<label class="control-label">webKit</label>
<label id="webkit" class="form-control-static"></label>
</div>
<div class="form-group">
<label class="control-label">ios终端</label>
<label id="ios" class="form-control-static"></label>
</div>
<div class="form-group">
<label class="control-label">android终端</label>
<label id="android" class="form-control-static"></label>
</div>
<div class="form-group">
<label class="control-label">是否为iPhone</label>
<label id="iphone" class="form-control-static"></label>
</div>
<div class="form-group">
<label class="control-label">是否iPad</label>
<label id="ipad" class="form-control-static"></label>
</div><div class="form-group">
<label class="control-label">userAgent</label>
<label id="useragent" class="form-control-static"></label>
</div>
<div class="form-group">
<label class="control-label">versions</label>
<label id="versions" class="form-control-static"></label>
</div>

View File

@ -42,9 +42,13 @@ INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [C
INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (12, 0, N'通知管理', 120, N'fa fa-bell', N'~/Admin/Notifications', N'0')
INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (13, 0, N'系统日志', 130, N'fa fa-gears', N'~/Admin/Logs', N'0')
INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (14, 0, N'程序异常', 140, N'fa fa-cubes', N'~/Admin/Exceptions', N'0')
INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (15, 0, N'锁定屏幕', 150, N'fa fa-lock', N'~/Home/Lock', N'0')
INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (15, 0, N'锁定屏幕', 10, N'fa fa-lock', N'~/Home/Lock', N'0')
INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (16, 0, N'锁定屏幕', 10, N'fa fa-lock', N'~/Home/Lock', N'1')
INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (17, 16, N'锁定屏幕', 10, N'fa fa-lock', N'~/Home/Lock', N'1')
INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (18, 0, N'工具集合', 160, N'fa fa-gavel', N'#', N'0')
INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (19, 18, N'客户端测试', 10, N'fa fa-wrench', N'~/Admin/Mobile', N'0')
INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (20, 0, N'工具集合', 20, N'fa fa-gavel', N'#', N'1')
INSERT [dbo].[Navigations] ([ID], [ParentId], [Name], [Order], [Icon], [Url], [Category]) VALUES (21, 20, N'客户端测试', 10, N'fa fa-wrench', N'../Content/html/DeviceTest.htm', N'1')
SET IDENTITY_INSERT [dbo].[Navigations] OFF
DELETE FROM GROUPS WHERE ID = 1
@ -58,17 +62,17 @@ INSERT [dbo].[Roles] ([ID], [RoleName], [Description]) VALUES (1, N'Administrato
INSERT [dbo].[Roles] ([ID], [RoleName], [Description]) VALUES (2, N'Default', N'默认用户,可访问前台页面')
SET IDENTITY_INSERT [dbo].[Roles] OFF
DELETE FROM RoleGroup where ID in (1)
DELETE FROM RoleGroup
SET IDENTITY_INSERT [dbo].[RoleGroup] ON
INSERT [dbo].[RoleGroup] ([ID], [RoleID], [GroupID]) VALUES (1, 1, 1)
SET IDENTITY_INSERT [dbo].[RoleGroup] OFF
DELETE FROM UserGroup where ID in (1)
DELETE FROM UserGroup
SET IDENTITY_INSERT [dbo].[UserGroup] ON
INSERT [dbo].[UserGroup] ([ID], [UserID], [GroupID]) VALUES (1, 1, 1)
SET IDENTITY_INSERT [dbo].[UserGroup] OFF
DELETE FROM UserRole where ID in (1)
DELETE FROM UserRole
SET IDENTITY_INSERT [dbo].[UserRole] ON
INSERT [dbo].[UserRole] ([ID], [UserID], [RoleID]) VALUES (1, 1, 1)
SET IDENTITY_INSERT [dbo].[UserRole] OFF
@ -97,4 +101,14 @@ INSERT [dbo].[NavigationRole] ([ID], [NavigationID], [RoleID]) VALUES (19, 2, 2)
INSERT [dbo].[NavigationRole] ([ID], [NavigationID], [RoleID]) VALUES (20, 3, 2)
INSERT [dbo].[NavigationRole] ([ID], [NavigationID], [RoleID]) VALUES (21, 16, 2)
INSERT [dbo].[NavigationRole] ([ID], [NavigationID], [RoleID]) VALUES (22, 17, 2)
INSERT [dbo].[NavigationRole] ([ID], [NavigationID], [RoleID]) VALUES (23, 18, 1)
INSERT [dbo].[NavigationRole] ([ID], [NavigationID], [RoleID]) VALUES (24, 19, 1)
INSERT [dbo].[NavigationRole] ([ID], [NavigationID], [RoleID]) VALUES (25, 18, 2)
INSERT [dbo].[NavigationRole] ([ID], [NavigationID], [RoleID]) VALUES (26, 19, 2)
INSERT [dbo].[NavigationRole] ([ID], [NavigationID], [RoleID]) VALUES (27, 20, 1)
INSERT [dbo].[NavigationRole] ([ID], [NavigationID], [RoleID]) VALUES (28, 21, 1)
INSERT [dbo].[NavigationRole] ([ID], [NavigationID], [RoleID]) VALUES (29, 20, 2)
INSERT [dbo].[NavigationRole] ([ID], [NavigationID], [RoleID]) VALUES (30, 21, 2)
INSERT [dbo].[NavigationRole] ([ID], [NavigationID], [RoleID]) VALUES (31, 10, 2)
INSERT [dbo].[NavigationRole] ([ID], [NavigationID], [RoleID]) VALUES (32, 15, 2)
SET IDENTITY_INSERT [dbo].[NavigationRole] OFF