Commit 5d3bfb1f authored by 黄奎's avatar 黄奎

页面修改

parent 8143c125
......@@ -24,15 +24,16 @@ namespace Edu.Common.Plugin
GetDirectoryAndFile(path, leval, fileList);
foreach (var item in fileList)
{
string str = @"录音 [0123456789]*";
string str = @"录音";
Regex reg = new Regex(str);
var fileNameArray = Regex.Split(item.FileName, str);
string newFileName = item.FileName;
string newFileName = Regex.Replace(item.FileName, @"\d", "");
var fileNameArray = Regex.Split(newFileName, str);
if (fileNameArray != null && fileNameArray.Length > 0)
{
newFileName = fileNameArray.Length > 1 ? fileNameArray[1] : fileNameArray[0];
newFileName = (fileNameArray.Length > 1 ? fileNameArray[1] : fileNameArray[0]).TrimStart().TrimEnd();
}
string newPathFileName = savePath + @"\" + newFileName.TrimStart().TrimEnd();
string newPathFileName = savePath + @"\" + newFileName.TrimStart('.')+"3";
File.Copy(item.FileUrl, newPathFileName, true);
item.FileUrl = newPathFileName;
}
......
......@@ -1209,9 +1209,11 @@ namespace Edu.Module.Course
if (list != null && list.Count > 0 && fileList != null && fileList.Count > 0)
{
Dictionary<string, object> fileds = new Dictionary<string, object>();
foreach (var item in list)
foreach (var item in list.Where(qitem=>string.IsNullOrEmpty(qitem.FileUrl)))
{
if (string.IsNullOrEmpty(item.FileUrl))
{
var tempWords = fileList.Where(qitem => qitem.FileName == item.WordContent + ".mp3")?.FirstOrDefault();
var tempWords = fileList.Where(qitem => (qitem.FileName.Replace("。","") == item.WordContent.ToUpper() + ".mp3") || (qitem.FileName.Replace("。", "") == item.WordContent.ToLower() + ".mp3") || (qitem.FileName.Replace("。", "") == item.WordWrite + ".mp3") || (qitem.FileName.Replace("。", "") == item.ChineseMean + ".mp3"))?.FirstOrDefault();
if (tempWords != null)
{
fileds.Clear();
......@@ -1221,6 +1223,7 @@ namespace Edu.Module.Course
}
}
}
}
/// <summary>
/// 获取课程章节列表
......
......@@ -13,11 +13,11 @@ namespace Edu.Test
//filePath = @"C:/Users/qiaoyajun/Desktop/EduWordTemplate.doc";
//var data = Common.Data.QuestionHelper.GetWordQuestionData(filePath);
//string newPath = @"G:\NewWords";
//string filePath = @"G:\Words";
//var list = Common.Plugin.FileHelper.GetFileAllPath(filePath, newPath);
//string str = Common.Plugin.JsonHelper.Serialize(list);
// Console.WriteLine(str);
string newPath = @"G:\NewWords";
string filePath = @"G:\Words";
var list = Common.Plugin.FileHelper.GetFileAllPath(filePath, newPath);
string str = Common.Plugin.JsonHelper.Serialize(list);
Console.WriteLine(str);
Console.ReadKey();
}
}
......
......@@ -38,6 +38,7 @@
"IncomeFinanceApi": "http://192.168.10.65:8083/api/Mall/InsertFinanceBatchForMallIn",
"sTenpayNotifyUrl": "http://eduapi.oytour.com/api/WeChatPay/WxPayCallback", //下单回调地址
"sTenpayNotifyRefundUrl": "http://eduapi.oytour.com/api/WeChatPay/Refunds", //退款回调地址
"SellFinanceApi": "http://127.0.0.1/api/Mall/InsertFinanceBatchForEduOut",
"FinanceDateBase": "reborn_finance",
"EduDateBase": "reborn_edu",
"JHTenantId": "15",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment