From e4f427425d0794b881197db461925e027c12b073 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期六, 01 一月 2022 16:32:52 +0800
Subject: [PATCH] 音频
---
WebTM/WebTM.csproj.user | 2 +-
WebTM/views/user/login.html | 23 +++++++++++++++--------
WebTM/views/video/jingbao.wav | 0
WebTM/WebTM.csproj | 1 +
4 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj
index e44b8e8..abaa193 100644
--- a/WebTM/WebTM.csproj
+++ b/WebTM/WebTM.csproj
@@ -124,6 +124,7 @@
<Content Include="views\PublicPage\transfer.html" />
<Content Include="views\ReportHtml.html" />
<Content Include="views\test\testRenderAutomationList.html" />
+ <Content Include="views\video\jingbao.wav" />
<Content Include="views\浠撳瓨绠$悊\浠撳簱璋冩嫧\Kf_MoveStockStepOutBill_Fast.html" />
<Content Include="views\浠撳瓨绠$悊\鍒嗘寮忚皟鍏ュ崟\Fb_StepFoldinBillList.html" />
<Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Add_Edit_Gy_OrderBackInfo.html" />
diff --git a/WebTM/WebTM.csproj.user b/WebTM/WebTM.csproj.user
index c6cc746..a1d4016 100644
--- a/WebTM/WebTM.csproj.user
+++ b/WebTM/WebTM.csproj.user
@@ -2,7 +2,7 @@
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<NameOfLastUsedPublishProfile>D:\鏅轰簯MES\MESWMS-LayUI\WebTM\Properties\PublishProfiles\JFTM.pubxml</NameOfLastUsedPublishProfile>
- <ProjectView>ProjectFiles</ProjectView>
+ <ProjectView>ShowAllFiles</ProjectView>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
diff --git a/WebTM/views/user/login.html b/WebTM/views/user/login.html
index a4c05e0..f32fc94 100644
--- a/WebTM/views/user/login.html
+++ b/WebTM/views/user/login.html
@@ -18,6 +18,9 @@
</style>
</head>
<body>
+ <!--<audio id="cs" hidden controls>
+ <source src="../video/jingbao.wav" type="audio/ogg">
+ </audio>-->
<div class="layadmin-user-login layadmin-user-display-show" id="LAY-user-login" style="display: none;background-image:url(../userfiles/images/2.jpg);background-size: 100%;">
<div class="layadmin-user-login-main" style="margin: -5.8% auto;">
<div class="layadmin-user-login-box layadmin-user-login-header">
@@ -39,6 +42,7 @@
<input type="password" name="password" id="LAY-user-login-password" lay-verify="required" placeholder="瀵嗙爜" class="layui-input" style="background-color:transparent;color:white" autocomplete="off">
</div>
<div class="layui-form-item">
+ <!--<input type="button" onclick="playSound('wavFileId');" value="play" />-->
<button type="button" lay-submit="" class="layui-btn layui-btn-fluid" id="LAY-user-login-submit" name="LAY-user-login-submit" lay-filter="LAY-user-login-submit">鐧� 鍏�</button>
</div>
</div>
@@ -125,21 +129,18 @@
form.on("submit(LAY-user-login-submit)", function (obj) {
loging();
})
-
//瀵嗙爜妗嗗洖杞︽墽琛岀櫥褰�
$('#LAY-user-login-password').on('keydown', function (e) {
if (e.keyCode == 13) {
- loging();
+ playSound();
}
});
-
//鐢ㄦ埛鍚嶆鍥炶溅鍏夋爣绉诲埌瀵嗙爜妗�
$('#LAY-user-login-username').on('keydown', function (e) {
if (e.keyCode == 13) {
$("#LAY-user-login-password").focus();
}
})
-
//鐧诲綍
function loging() {
if ($("#Organization").val() == 0) {
@@ -153,7 +154,7 @@
type: "get",
//url: "http://61.130.49.162:9090/WMSAPI///Web/GetUser",
url: GetWEBURL() + "/Web/GetUser",
- data: { "UserName": UserName, "PassWord": PassWord, "HOrgName": $("#Organization").val()},
+ data: { "UserName": UserName, "PassWord": PassWord, "HOrgName": $("#Organization").val() },
success: function (result) {
if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
layer.msg(result.Message, { icon: 1 });
@@ -189,7 +190,7 @@
sessionStorage["HProcName"] = result.data[0].HProcName;
sessionStorage["HProcID"] = result.data[0].HProcID;
sessionStorage["login"] = "login";
- sessionStorage["OrganizationID"] = $("#Organization").val();
+ sessionStorage["OrganizationID"] = $("#Organization").val();
sessionStorage["Organization"] = $("#Organization option:selected").text();
//sessionStorage["IP"] = System.Configuration.ConfigurationSettings.AppSettings("name");
if (!judgeMorPCflag) {//绉诲姩绔�
@@ -211,8 +212,14 @@
}
})
}
-
-
+ function playSound() {
+ var audio = document.getElementById("cs");
+ if (audio == null)
+ $("body").append('<audio id="cs" hidden controls> <source src = "../video/jingbao.wav" type = "audio/ogg"> </audio >');
+ var audio = document.getElementById("cs");
+ audio.play();
+ }
+
});
</script>
</body>
diff --git a/WebTM/views/video/jingbao.wav b/WebTM/views/video/jingbao.wav
new file mode 100644
index 0000000..093bc4c
--- /dev/null
+++ b/WebTM/views/video/jingbao.wav
Binary files differ
--
Gitblit v1.9.1