重新修改背景音乐的功能实现,原来的功能不起作用

This commit is contained in:
2025-12-23 14:33:40 +08:00
parent 63c79e1235
commit 53cb2e9239
9 changed files with 125 additions and 27 deletions

View File

@@ -172,6 +172,7 @@ namespace WebSite.Controllers
return Json(new { IsSuccess = true, Message = HttpContext.InnerLanguage("SaveSuccess") });
}
/// <summary>
/// 上传BGM
/// </summary>
@@ -215,6 +216,7 @@ namespace WebSite.Controllers
}
sysHotel.WelcomeBGM = NewFileName;
SysHotelManager.Update(sysHotel);
return Json(new { IsSuccess = true, FileName = NewFileName }, JsonRequestBehavior.AllowGet);
}
@@ -232,6 +234,22 @@ namespace WebSite.Controllers
[Authorize()]
public ActionResult DeleteBGM()
{
try
{
var sysHotel = SysHotelManager.Get(CurrentHotelID);
sysHotel.WelcomeBGM = "";
SysHotelManager.Update(sysHotel);
return Json(new { IsSuccess = true }, JsonRequestBehavior.AllowGet);
}
catch (Exception ex)
{
return Json(new { IsSuccess = false, Message = ex.Message }, JsonRequestBehavior.AllowGet);
}
}
/// <summary>
/// 保存第三方对接信息
/// </summary>
@@ -282,6 +300,12 @@ namespace WebSite.Controllers
//sysHotel.TCLAppSecret = entity.TCLAppSecret;
SysHotelManager.Update(sysHotel);
if (!string.IsNullOrEmpty(entity.WelcomeBGM))
{
string ffg = "https://www.boonlive-rcu.com/welcomebgm/" + entity.WelcomeBGM;
TianMaoOperation.PostWebRequestToTianMao("AddOrUpdateWelcomeText",
Newtonsoft.Json.JsonConvert.SerializeObject(new { HotelId = CurrentHotelID, MusicUrl = ffg, WelcomeText = entity.WelcomeSpeech }), CurrentHotelCode, "");//通知天猫精灵播放欢迎词
}
if (sysHotel.IsUseQianLiMa)
{
QianLiMa_PMS.QiYong(sysHotel.Code, "add");