From 9adc51e11b6da45cf5e776815d3393f0dcd08aad Mon Sep 17 00:00:00 2001 From: weishakeji <10522779@qq.com> Date: Wed, 25 Mar 2020 17:55:22 +0800 Subject: [PATCH 01/21] =?UTF-8?q?=E4=BC=98=E5=8C=96API=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=89=A7=E8=A1=8C=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E7=9A=84=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Templates/Web/_Public/Help/Scripts/API.js | 6 ++--- Song.Site/Utility/CoreScripts/api.js | 25 ++++++++++++++++++- Song.ViewData/DataResult.cs | 12 +++++++++ Song.ViewData/ExecuteMethod.cs | 15 +++++++++-- 4 files changed, 52 insertions(+), 6 deletions(-) diff --git a/Song.Site/Templates/Web/_Public/Help/Scripts/API.js b/Song.Site/Templates/Web/_Public/Help/Scripts/API.js index 64d77b353..29a065bcc 100644 --- a/Song.Site/Templates/Web/_Public/Help/Scripts/API.js +++ b/Song.Site/Templates/Web/_Public/Help/Scripts/API.js @@ -144,9 +144,10 @@ var rvue = new Vue({ message: '没有获取到返回值,可能是服务器端错误' }; if (req.config.returntype == "json") - ele.innerText = $api.trim(rvue.jsonformat(unescape(req.text), true)); + ele.innerText = $api.trim(rvue.jsonformat(unescape(JSON.stringify(req.data)), true)); if (req.config.returntype == "xml") ele.innerText = $api.trim(rvue.xmlformat(unescape(req.text))); + }).catch(function(ex) { //alert(ex.message); var ele = document.getElementById("testResult"); @@ -299,5 +300,4 @@ var rvue = new Vue({ } }); -rvue.$mount('context'); - +rvue.$mount('context'); \ No newline at end of file diff --git a/Song.Site/Utility/CoreScripts/api.js b/Song.Site/Utility/CoreScripts/api.js index 7bfd37a46..70c701971 100644 --- a/Song.Site/Utility/CoreScripts/api.js +++ b/Song.Site/Utility/CoreScripts/api.js @@ -247,6 +247,9 @@ var url = methods.url(this.version, way); if (arguments.length < 2 || parameters == null) parameters = {}; if (arguments.length < 3 || method == null || method == '') method = 'get'; + //开始时间 + var startTime = new Date(); + //console.log(startTime); //创建axiso对象 var instance = axios.create({ method: method != 'get' ? 'post' : 'get', @@ -320,6 +323,10 @@ response.data.result = methods.unescape(response.data.result); } } + //计算执行耗时 + if (response.data) { + response.data['webspan'] = new Date() - startTime; + } //执行加载完成后的方法 if (loaded == null) loaded = self.loadeffect.after; if (loaded != null) loaded(response, null); @@ -390,4 +397,20 @@ Date.prototype.format = function(fmt) { fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length))); return fmt; -} \ No newline at end of file +} +//添加加载前后的事件 +$api.effect(function() { + +}, function(response, err) { + //请求网址 + var url = response.config.url; + url=url.substring(url.indexOf('/v1/')+3); + //请求参数 + var para = JSON.stringify(response.config.params); + para = para == undefined ? '' : para; + //时长 + var exec = response.data.execspan; + var span = response.data.webspan; + console.log(url + '' + para + ' 用时 ' + span + ' 毫秒,服务端 ' + exec + ' 毫秒'); + //console.log(response); +}); \ No newline at end of file diff --git a/Song.ViewData/DataResult.cs b/Song.ViewData/DataResult.cs index 88dfe3e13..0062224c0 100644 --- a/Song.ViewData/DataResult.cs +++ b/Song.ViewData/DataResult.cs @@ -35,6 +35,14 @@ public class DataResult /// public DateTime DateTime { get; set; } /// + /// 执行耗时(单位:毫秒) + /// + public double ExecSpan { get; set; } + /// + /// web端执行耗时(单位:毫秒) + /// + public double WebSpan { get; set; } + /// /// 执行时间的时间戳 /// public long Timestamp { get; set; } @@ -63,6 +71,9 @@ public DataResult(object obj) Timestamp = (long)(DateTime.Now - TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1))).TotalMilliseconds; Message = obj != null ? "" : "未查询到数据"; } + public DataResult(object obj,double span):this(obj){ + this.ExecSpan = span; + } /// /// /// @@ -83,6 +94,7 @@ public DataResult(Exception exc) } State = 0; } + /// /// /// diff --git a/Song.ViewData/ExecuteMethod.cs b/Song.ViewData/ExecuteMethod.cs index 0517d4bc9..cb5007a97 100644 --- a/Song.ViewData/ExecuteMethod.cs +++ b/Song.ViewData/ExecuteMethod.cs @@ -129,12 +129,23 @@ public static DataResult ExecToResult(Letter letter) { try { + DateTime time = DateTime.Now; + if (!"weishakeji".Equals(letter.HTTP_Mark)) return new Song.ViewData.DataResult(new Exception("请求标识不正确")); object res = Exec(letter); - if (res is ListResult) return (ListResult)res; //如果是分页数据 - return new Song.ViewData.DataResult(res); //普通数据 + //计算耗时 + double span = ((TimeSpan)(DateTime.Now - time)).TotalMilliseconds; + // + //如果是分页数据 + if (res is ListResult) + { + ListResult list = (ListResult)res; + list.ExecSpan = span; + return list; + } + return new Song.ViewData.DataResult(res, span); //普通数据 } catch (Exception ex) { From d13e3c6ba84f5b4973ee2afc0d7287f2c67a5143 Mon Sep 17 00:00:00 2001 From: weishakeji <10522779@qq.com> Date: Thu, 2 Apr 2020 16:55:57 +0800 Subject: [PATCH 02/21] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=EF=BC=9A=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E5=8F=98=E6=9B=B4=E4=B8=93=E4=B8=9A=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E6=89=80=E5=B1=9E=E8=AF=95=E9=A2=98=E6=B2=A1=E6=9C=89=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E5=8F=98=E6=9B=B4=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Song.ServiceImpls/CourseCom.cs | 16 ++++++++++++---- Song.Site/Manage/Questions/List.aspx.cs | 4 ++-- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/Song.ServiceImpls/CourseCom.cs b/Song.ServiceImpls/CourseCom.cs index 37091ef8a..e20537d98 100644 --- a/Song.ServiceImpls/CourseCom.cs +++ b/Song.ServiceImpls/CourseCom.cs @@ -122,10 +122,18 @@ public void CourseSave(Course entity) new Field[] { Student_Course._.Stc_EndTime }, new object[] { DateTime.Now }, Student_Course._.Cou_ID == entity.Cou_ID && Student_Course._.Stc_IsFree == true); } - tran.Update( - new Field[] { TestPaper._.Cou_Name, TestPaper._.Sbj_ID, TestPaper._.Sbj_Name }, - new object[] { entity.Cou_Name, entity.Sbj_ID, entity.Sbj_Name }, - TestPaper._.Cou_ID == entity.Cou_ID); + //如果课程更改了专业 + if (old.Sbj_ID != entity.Sbj_ID) + { + tran.Update( + new Field[] { Questions._.Sbj_ID, Questions._.Sbj_Name }, + new object[] { entity.Sbj_ID, entity.Sbj_Name }, Questions._.Cou_ID == entity.Cou_ID); + tran.Update(new Field[] { Outline._.Sbj_ID }, new object[] { entity.Sbj_ID }, Outline._.Cou_ID == entity.Cou_ID); + tran.Update( + new Field[] { TestPaper._.Cou_Name, TestPaper._.Sbj_ID, TestPaper._.Sbj_Name }, + new object[] { entity.Cou_Name, entity.Sbj_ID, entity.Sbj_Name }, + TestPaper._.Cou_ID == entity.Cou_ID); + } tran.Save(entity); tran.Commit(); } diff --git a/Song.Site/Manage/Questions/List.aspx.cs b/Song.Site/Manage/Questions/List.aspx.cs index 2c3d1c330..6a54e5bff 100644 --- a/Song.Site/Manage/Questions/List.aspx.cs +++ b/Song.Site/Manage/Questions/List.aspx.cs @@ -61,9 +61,9 @@ private void InitBind() ListItem liDdlType = ddlType.Items.FindByValue(type.ToString()); if (liDdlType != null) liDdlType.Selected = true; } - // - this.SearchBind(this.searchBox); + // ddlSubject_SelectedIndexChanged(null, null); + //this.SearchBind(this.searchBox); } /// /// רҵѡ�����¼� From 0603cf845aeb3aeffde800c25c48da25cccc8a39 Mon Sep 17 00:00:00 2001 From: weishakeji <10522779@qq.com> Date: Thu, 2 Apr 2020 18:18:40 +0800 Subject: [PATCH 03/21] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=EF=BC=9A=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E5=8F=98=E6=9B=B4=E4=B8=93=E4=B8=9A=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E6=89=80=E5=B1=9E=E8=AF=95=E9=A2=98=E6=B2=A1=E6=9C=89=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E5=8F=98=E6=9B=B4=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Song.ServiceImpls/QuestionsCom.cs | 12 +++++++++++- Song.ServiceInterfaces/IQuestions.cs | 7 +++++++ Song.Site/Manage/Questions/Questions_Edit1.aspx.cs | 2 +- Song.Site/Manage/Questions/Questions_Edit2.aspx.cs | 2 +- Song.Site/Manage/Questions/Questions_Edit3.aspx.cs | 2 +- Song.Site/Manage/Questions/Questions_Edit4.aspx.cs | 2 +- Song.Site/Manage/Questions/Questions_Edit5.aspx.cs | 2 +- Song.Site/Manage/Questions/Questions_Edit6.aspx.cs | 2 +- 8 files changed, 24 insertions(+), 7 deletions(-) diff --git a/Song.ServiceImpls/QuestionsCom.cs b/Song.ServiceImpls/QuestionsCom.cs index fa7320fc8..00ec15289 100644 --- a/Song.ServiceImpls/QuestionsCom.cs +++ b/Song.ServiceImpls/QuestionsCom.cs @@ -167,7 +167,17 @@ public Questions QuesSingle(int identify) return qus; } - + /// + /// 获取单一实体对象,按主键ID; + /// + /// + /// 是否来自缓存 + /// + public Questions QuesSingle(int identify, bool cache) + { + if (cache) return this.QuesSingle(identify); + return Gateway.Default.From().Where(Questions._.Qus_ID == identify).ToFirst(); + } public Questions QuesSingle(string uid) { if (uid == string.Empty) return null; diff --git a/Song.ServiceInterfaces/IQuestions.cs b/Song.ServiceInterfaces/IQuestions.cs index 9d1536785..1631e2f32 100644 --- a/Song.ServiceInterfaces/IQuestions.cs +++ b/Song.ServiceInterfaces/IQuestions.cs @@ -47,6 +47,13 @@ public interface IQuestions : WeiSha.Common.IBusinessInterface /// Questions QuesSingle(int identify); /// + /// ��ȡ��һʵ����󣬰�����ID�� + /// + /// + /// �Ƿ����Ի��� + /// + Questions QuesSingle(int identify,bool cache); + /// /// ��ȡ��һʵ����󣬰�UID /// /// ȫ��Ψһid diff --git a/Song.Site/Manage/Questions/Questions_Edit1.aspx.cs b/Song.Site/Manage/Questions/Questions_Edit1.aspx.cs index 35da98516..133e654f0 100644 --- a/Song.Site/Manage/Questions/Questions_Edit1.aspx.cs +++ b/Song.Site/Manage/Questions/Questions_Edit1.aspx.cs @@ -84,7 +84,7 @@ void fill() Song.Entities.Questions mm; if (id != 0) { - mm = Business.Do().QuesSingle(id); + mm = Business.Do().QuesSingle(id, false); cbIsUse.Checked = mm.Qus_IsUse; //唯一标识 ViewState["UID"] = mm.Qus_UID; diff --git a/Song.Site/Manage/Questions/Questions_Edit2.aspx.cs b/Song.Site/Manage/Questions/Questions_Edit2.aspx.cs index 4cb2a469c..669fd11ae 100644 --- a/Song.Site/Manage/Questions/Questions_Edit2.aspx.cs +++ b/Song.Site/Manage/Questions/Questions_Edit2.aspx.cs @@ -83,7 +83,7 @@ void fill() Song.Entities.Questions mm; if (id != 0) { - mm = Business.Do().QuesSingle(id); + mm = Business.Do().QuesSingle(id, false); cbIsUse.Checked = mm.Qus_IsUse; //唯一标识 ViewState["UID"] = mm.Qus_UID; diff --git a/Song.Site/Manage/Questions/Questions_Edit3.aspx.cs b/Song.Site/Manage/Questions/Questions_Edit3.aspx.cs index 49dd62e6a..e3346d492 100644 --- a/Song.Site/Manage/Questions/Questions_Edit3.aspx.cs +++ b/Song.Site/Manage/Questions/Questions_Edit3.aspx.cs @@ -83,7 +83,7 @@ void fill() Song.Entities.Questions mm; if (id != 0) { - mm = Business.Do().QuesSingle(id); + mm = Business.Do().QuesSingle(id, false); cbIsUse.Checked = mm.Qus_IsUse; //唯一标识 ViewState["UID"] = mm.Qus_UID; diff --git a/Song.Site/Manage/Questions/Questions_Edit4.aspx.cs b/Song.Site/Manage/Questions/Questions_Edit4.aspx.cs index ef0d89f83..437cbfaa0 100644 --- a/Song.Site/Manage/Questions/Questions_Edit4.aspx.cs +++ b/Song.Site/Manage/Questions/Questions_Edit4.aspx.cs @@ -83,7 +83,7 @@ void fill() Song.Entities.Questions mm; if (id != 0) { - mm = Business.Do().QuesSingle(id); + mm = Business.Do().QuesSingle(id, false); cbIsUse.Checked = mm.Qus_IsUse; //唯一标识 ViewState["UID"] = mm.Qus_UID; diff --git a/Song.Site/Manage/Questions/Questions_Edit5.aspx.cs b/Song.Site/Manage/Questions/Questions_Edit5.aspx.cs index 09091c6ba..a4f0b82dd 100644 --- a/Song.Site/Manage/Questions/Questions_Edit5.aspx.cs +++ b/Song.Site/Manage/Questions/Questions_Edit5.aspx.cs @@ -85,7 +85,7 @@ void fill() Song.Entities.Questions mm; if (id != 0) { - mm = Business.Do().QuesSingle(id); + mm = Business.Do().QuesSingle(id, false); cbIsUse.Checked = mm.Qus_IsUse; //唯一标识 ViewState["UID"] = mm.Qus_UID; diff --git a/Song.Site/Manage/Questions/Questions_Edit6.aspx.cs b/Song.Site/Manage/Questions/Questions_Edit6.aspx.cs index 33c324d0e..a10e642b9 100644 --- a/Song.Site/Manage/Questions/Questions_Edit6.aspx.cs +++ b/Song.Site/Manage/Questions/Questions_Edit6.aspx.cs @@ -85,7 +85,7 @@ void fill() Song.Entities.Questions mm; if (id != 0) { - mm = Business.Do().QuesSingle(id); + mm = Business.Do().QuesSingle(id, false); cbIsUse.Checked = mm.Qus_IsUse; //唯一标识 ViewState["UID"] = mm.Qus_UID; From 3ecc00144bda4b62bf527d9deae7b9cbac5eccd5 Mon Sep 17 00:00:00 2001 From: weishakeji <10522779@qq.com> Date: Tue, 28 Apr 2020 17:49:48 +0800 Subject: [PATCH 04/21] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=AB=A0=E8=8A=82?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E4=B8=AD=E7=9A=84=E6=89=B9=E9=87=8F=E6=93=8D?= =?UTF-8?q?=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Song.ServiceImpls/OutlineCom.cs | 20 +++--- .../Manage/Course/Courses_Outline.aspx.cs | 4 +- Song.Site/Manage/Course/Courses_Outlines.aspx | 13 +++- .../Manage/Course/Courses_Outlines.aspx.cs | 64 +++++++++++++++++++ .../Course/Courses_Outlines.aspx.designer.cs | 36 +++++++++++ Song.Site/Manage/Course/Outline_Edit.aspx | 3 + Song.Site/Manage/Course/Outline_Edit.aspx.cs | 14 +++- .../Course/Outline_Edit.aspx.designer.cs | 9 +++ .../Manage/Course/Styles/Courses_Outlines.css | 19 ++++++ Song.Site/Properties/AssemblyInfo.cs | 2 +- .../Templates/Mobi/Default2019/Article.htm | 2 +- .../Mobi/Default2019/Styles/Article.css | 8 ++- Song.Site/license.txt | 21 +++--- 13 files changed, 189 insertions(+), 26 deletions(-) diff --git a/Song.ServiceImpls/OutlineCom.cs b/Song.ServiceImpls/OutlineCom.cs index e22ac7a58..66ee9da2d 100644 --- a/Song.ServiceImpls/OutlineCom.cs +++ b/Song.ServiceImpls/OutlineCom.cs @@ -36,7 +36,7 @@ public void OutlineAdd(Outline entity) { Song.Entities.Organization org = Business.Do().OrganCurrent(); if (org != null) entity.Org_ID = org.Org_ID; - } + } //所属专业 if (entity.Sbj_ID <= 0 && entity.Cou_ID > 0) { @@ -46,8 +46,14 @@ public void OutlineAdd(Outline entity) //计算排序号 object obj = tran.Max(Outline._.Ol_Tax, Outline._.Cou_ID == entity.Cou_ID && Outline._.Ol_PID == entity.Ol_PID); entity.Ol_Tax = obj is int ? (int)obj + 1 : 1; - if (string.IsNullOrWhiteSpace(entity.Ol_UID)) - entity.Ol_UID = WeiSha.Common.Request.UniqueID(); + //唯一id + string uid = string.IsNullOrWhiteSpace(entity.Ol_UID) ? WeiSha.Common.Request.UniqueID() : entity.Ol_UID; + do + { + uid = WeiSha.Common.Request.UniqueID(); + } while (Gateway.Default.Count(Outline._.Ol_UID == uid) > 0); + entity.Ol_UID = uid; + ////层级 //entity.Ol_Level = _ClacLevel(entity); //entity.Ol_XPath = _ClacXPath(entity); @@ -60,13 +66,13 @@ public void OutlineAdd(Outline entity) pili_sdk.pili.Stream stream = Business.Do().StreamCreat(liveid); entity.Ol_LiveID = stream.Title; } - catch(Exception ex) + catch (Exception ex) { throw new Exception("无法创建直播流," + ex.Message); - } + } tran.Update(Course._.Cou_ExistLive, true, Course._.Cou_ID == entity.Cou_ID); } - tran.Save(entity); + tran.Save(entity); tran.Commit(); this.OnSave(null, EventArgs.Empty); @@ -80,9 +86,7 @@ public void OutlineAdd(Outline entity) { tran.Close(); } - } - } /// /// 批量添加章节,可用于导入时 diff --git a/Song.Site/Manage/Course/Courses_Outline.aspx.cs b/Song.Site/Manage/Course/Courses_Outline.aspx.cs index fd03f11b7..6a769ee54 100644 --- a/Song.Site/Manage/Course/Courses_Outline.aspx.cs +++ b/Song.Site/Manage/Course/Courses_Outline.aspx.cs @@ -195,8 +195,8 @@ protected void btnEnter_Click(object sender, EventArgs e) ol.Cou_ID = couid; Song.Entities.Course cou = Business.Do().CourseSingle(couid); if (cou != null) ol.Sbj_ID = cou.Sbj_ID; - //全局唯一ID - ol.Ol_UID = getUID(); + ////全局唯一ID + //ol.Ol_UID = getUID(); try { if (olid < 1) diff --git a/Song.Site/Manage/Course/Courses_Outlines.aspx b/Song.Site/Manage/Course/Courses_Outlines.aspx index 053f1e005..1394a21da 100644 --- a/Song.Site/Manage/Course/Courses_Outlines.aspx +++ b/Song.Site/Manage/Course/Courses_Outlines.aspx @@ -11,10 +11,15 @@ + + + + + <%-- --%>
+ ShowSelectBox="true" IsEncrypt="False">
当前课程还没有添加章节
@@ -28,6 +33,12 @@ + + + <%# Eval("Ol_Tax")%> + + + diff --git a/Song.Site/Manage/Course/Courses_Outlines.aspx.cs b/Song.Site/Manage/Course/Courses_Outlines.aspx.cs index bc26b9e4e..d8e5c333e 100644 --- a/Song.Site/Manage/Course/Courses_Outlines.aspx.cs +++ b/Song.Site/Manage/Course/Courses_Outlines.aspx.cs @@ -252,5 +252,69 @@ protected void btnAddSub_Click(object sender, EventArgs e) GridView1.DataBind(); } #endregion + + #region 上方的按钮事件 + /// + /// 批量启用章节 + /// + /// + /// + protected void btnModfiy_Click(object sender, EventArgs e) + { + string keys = GridView1.GetKeyValues; + foreach (string s in keys.Split(',')) + { + int id = 0; + int.TryParse(s, out id); + Song.Entities.Outline entity = Business.Do().OutlineSingle(id); + if (entity == null) continue; + entity.Ol_IsUse = !entity.Ol_IsUse; + Business.Do().OutlineSave(entity); + } + BindData(null, null); + } + protected void btnFinish_Click(object sender, EventArgs e) + { + string keys = GridView1.GetKeyValues; + foreach (string s in keys.Split(',')) + { + int id = 0; + int.TryParse(s, out id); + Song.Entities.Outline entity = Business.Do().OutlineSingle(id); + if (entity == null) continue; + entity.Ol_IsFinish = !entity.Ol_IsFinish; + Business.Do().OutlineSave(entity); + } + BindData(null, null); + } + protected void btnFree_Click(object sender, EventArgs e) + { + string keys = GridView1.GetKeyValues; + foreach (string s in keys.Split(',')) + { + int id = 0; + int.TryParse(s, out id); + Song.Entities.Outline entity = Business.Do().OutlineSingle(id); + if (entity == null) continue; + entity.Ol_IsFree = true; + Business.Do().OutlineSave(entity); + } + BindData(null, null); + } + protected void btnNofree_Click(object sender, EventArgs e) + { + string keys = GridView1.GetKeyValues; + foreach (string s in keys.Split(',')) + { + int id = 0; + int.TryParse(s, out id); + Song.Entities.Outline entity = Business.Do().OutlineSingle(id); + if (entity == null) continue; + entity.Ol_IsFree = false; + Business.Do().OutlineSave(entity); + } + BindData(null, null); + } + #endregion } } \ No newline at end of file diff --git a/Song.Site/Manage/Course/Courses_Outlines.aspx.designer.cs b/Song.Site/Manage/Course/Courses_Outlines.aspx.designer.cs index 1f5754dfe..7970e195b 100644 --- a/Song.Site/Manage/Course/Courses_Outlines.aspx.designer.cs +++ b/Song.Site/Manage/Course/Courses_Outlines.aspx.designer.cs @@ -21,6 +21,42 @@ public partial class Courses_Outlines { /// protected global::Song.Site.Manage.Utility.toolsBar ToolsBar1; + /// + /// btnUse 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Button btnUse; + + /// + /// btnFinish 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Button btnFinish; + + /// + /// btnFree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Button btnFree; + + /// + /// btnNofree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Button btnNofree; + /// /// GridView1 控件。 /// diff --git a/Song.Site/Manage/Course/Outline_Edit.aspx b/Song.Site/Manage/Course/Outline_Edit.aspx index af0b8ee1d..3a20c0733 100644 --- a/Song.Site/Manage/Course/Outline_Edit.aspx +++ b/Song.Site/Manage/Course/Outline_Edit.aspx @@ -28,6 +28,9 @@ +   排序号: + diff --git a/Song.Site/Manage/Course/Outline_Edit.aspx.cs b/Song.Site/Manage/Course/Outline_Edit.aspx.cs index c1dc119d7..0ccaf127c 100644 --- a/Song.Site/Manage/Course/Outline_Edit.aspx.cs +++ b/Song.Site/Manage/Course/Outline_Edit.aspx.cs @@ -77,6 +77,8 @@ private void fill() cbIsLive.Checked = mm.Ol_IsLive; tbLiveTime.Text = mm.Ol_LiveTime < DateTime.Now.AddYears(-100) ? "" : mm.Ol_LiveTime.ToString("yyyy-MM-dd HH:mm"); tbLiveSpan.Text = mm.Ol_LiveSpan == 0 ? "" : mm.Ol_LiveSpan.ToString(); + //����� + Ol_Tax.Text = mm.Ol_Tax.ToString(); } else { @@ -86,6 +88,7 @@ private void fill() } //���� Ol_Name.Text = mm.Ol_Name; + //��� Ol_Intro.Text = mm.Ol_Intro; } @@ -120,8 +123,15 @@ protected void btnEnter_Click(object sender, EventArgs e) int liveSpan = 0; //ֱ���ƻ�ʱ�� int.TryParse(tbLiveSpan.Text, out liveSpan); ol.Ol_LiveSpan = liveSpan; - //ȫ��ΨһID - ol.Ol_UID = getUID(); + //����� + int tax = 0; + if (Ol_Tax.Text.Trim() != "") + { + int.TryParse(Ol_Tax.Text, out tax); + ol.Ol_Tax = tax; + } + ////ȫ��ΨһID + //ol.Ol_UID = getUID(); try { if (id < 1) diff --git a/Song.Site/Manage/Course/Outline_Edit.aspx.designer.cs b/Song.Site/Manage/Course/Outline_Edit.aspx.designer.cs index cb6ce0eb6..a7578a6dc 100644 --- a/Song.Site/Manage/Course/Outline_Edit.aspx.designer.cs +++ b/Song.Site/Manage/Course/Outline_Edit.aspx.designer.cs @@ -66,6 +66,15 @@ public partial class Outline_Edit { /// protected global::WeiSha.WebControl.DropDownTree ddlOutline; + /// + /// Ol_Tax 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.TextBox Ol_Tax; + /// /// cbIsLive 控件。 /// diff --git a/Song.Site/Manage/Course/Styles/Courses_Outlines.css b/Song.Site/Manage/Course/Styles/Courses_Outlines.css index ba8b59652..77cb9c041 100644 --- a/Song.Site/Manage/Course/Styles/Courses_Outlines.css +++ b/Song.Site/Manage/Course/Styles/Courses_Outlines.css @@ -23,4 +23,23 @@ l{ width:24px; height:24px; display:inline-block; +} +.toolsBar +{ + width:auto; + float:left; +} +.btnarea input[type=submit] +{ + LINE-HEIGHT: 26px; + text-indent: 0px; + margin-top: 0px; + height: 25px; + width: 65px; + cursor: pointer; + text-align: right; + border: 1px solid #CCCCCC; + margin-right: 2px; + padding-right: 4px; + margin-bottom: 5px; } \ No newline at end of file diff --git a/Song.Site/Properties/AssemblyInfo.cs b/Song.Site/Properties/AssemblyInfo.cs index 9e64f8e8a..b569e4e6a 100644 --- a/Song.Site/Properties/AssemblyInfo.cs +++ b/Song.Site/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ // 有关程序集的常规信息通过下列属性集 // 控制。更改这些属性值可修改 // 与程序集关联的信息。 -[assembly: AssemblyTitle("ReleaseDate 2020-3-23")] +[assembly: AssemblyTitle("ReleaseDate 2020-4-18")] [assembly: AssemblyDescription("集“学、练、考”与一体的在线学习系统")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("微厦科技")] diff --git a/Song.Site/Templates/Mobi/Default2019/Article.htm b/Song.Site/Templates/Mobi/Default2019/Article.htm index 1b96f3f2e..788a40885 100644 --- a/Song.Site/Templates/Mobi/Default2019/Article.htm +++ b/Song.Site/Templates/Mobi/Default2019/Article.htm @@ -8,7 +8,7 @@ -
+
diff --git a/Song.Site/Templates/Mobi/Default2019/Styles/Article.css b/Song.Site/Templates/Mobi/Default2019/Styles/Article.css index 4bde99e63..dc7602804 100644 --- a/Song.Site/Templates/Mobi/Default2019/Styles/Article.css +++ b/Song.Site/Templates/Mobi/Default2019/Styles/Article.css @@ -1,9 +1,15 @@ body{ - padding: 10px; + padding: 20px; + width:calc(100% - 40px); } body,p,div,td,*{ color:#333 !important; } +.context{ + margin:0px; + overflow-x:hidden; + overflow:hidden; +} .artTitle { font-size: 18px; diff --git a/Song.Site/license.txt b/Song.Site/license.txt index fbdaa9946..384952bb1 100644 --- a/Song.Site/license.txt +++ b/Song.Site/license.txt @@ -1,15 +1,16 @@ -软件名称:学习平台 +软件名称:学习平台 软件版本:1.0 版本等级:至尊版 -授权对象:192.168.0.104:80 +授权对象:127.0.0.1:85 授权类型:IP -起始时间:2020年03月16日 -结束时间:3020年03月16日 +起始时间:2015年07月15日 +结束时间:2315年07月15日 ================WEISHAKEJI_LICENSE================ -00600118008500910069012501170120006100590118006800 -61005801080054005900610070006801010088007800610074 -00990089012001030122007100860118012600870127012101 -06011700760092005500880077007200950057012500860058 -00570071009100750058005500550060009201210099011700 -5701200076 +00600067005900780070008901100086006701100121012000 +66009801010072010201250103007601170102008801190086 +00900065008501070090011700680073006800700036005900 +77005701000064006000600123010501240060009400720096 +00910074007000890102007000660076005800550071010601 +2600320104 + From 447a0887164dc5516c8e8ba6cb6ce56f75591734 Mon Sep 17 00:00:00 2001 From: weishakeji <10522779@qq.com> Date: Tue, 28 Apr 2020 18:19:43 +0800 Subject: [PATCH 05/21] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=EF=BC=9A=E5=AD=A6?= =?UTF-8?q?=E5=91=98=E5=AD=A6=E4=B9=A0=E8=AF=BE=E7=A8=8B=E6=97=B6=EF=BC=8C?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E6=9C=AA=E7=99=BB=E5=BD=95=EF=BC=8C=E7=BB=99?= =?UTF-8?q?=E5=87=BA=E5=87=86=E7=A1=AE=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Song.Site/Templates/Web/_Public/CourseStudy.htm | 5 ++++- Song.Site/Templates/Web/_Public/Styles/CourseStudy.css | 10 ++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Song.Site/Templates/Web/_Public/CourseStudy.htm b/Song.Site/Templates/Web/_Public/CourseStudy.htm index 29b5730b9..31504a626 100644 --- a/Song.Site/Templates/Web/_Public/CourseStudy.htm +++ b/Song.Site/Templates/Web/_Public/CourseStudy.htm @@ -62,7 +62,10 @@
-
没有内容,或无权查看!
+
+ 没有内容,或无权查看!
+
直播已经结束
diff --git a/Song.Site/Templates/Web/_Public/Styles/CourseStudy.css b/Song.Site/Templates/Web/_Public/Styles/CourseStudy.css index 98ca1a851..e81c571e6 100644 --- a/Song.Site/Templates/Web/_Public/Styles/CourseStudy.css +++ b/Song.Site/Templates/Web/_Public/Styles/CourseStudy.css @@ -227,12 +227,8 @@ video::-webkit-media-controls-panel { position: absolute; width: 320px; height: 180px; - line-height: 180px; color: #333; - font-weight: bold; background-color: rgba(128, 128, 128, 0.5); - font-size: 25px; - text-align: center; top: 30%; left: calc(50% - 160px); border: 1px solid #999; @@ -240,6 +236,12 @@ video::-webkit-media-controls-panel { box-shadow: 3px 3px 3px #aaa; cursor: default; } +#liveStopbox .liveStop_Tit, .noSelect, .noSelect a{ + line-height: 180px; + font-weight: bold; + font-size: 25px; + text-align: center; +} /*背景图,带渐变效果*/ .bgPicture{ opacity:0.4; From 61d8f2cd8435efe94378b7c6cc0a956e6f43ddfe Mon Sep 17 00:00:00 2001 From: weishakeji <10522779@qq.com> Date: Thu, 30 Apr 2020 11:02:40 +0800 Subject: [PATCH 06/21] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=EF=BC=9A=E6=89=8B?= =?UTF-8?q?=E6=9C=BA=E7=AB=AF=E8=A7=86=E9=A2=91=E6=92=AD=E6=94=BE=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E5=85=A8=E5=B1=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Mobi/Default2019/CoreScripts/Extend.js | 11 ++++++++ .../Mobi/Default2019/CourseStudy.htm | 5 +++- .../Default2019/Inc/CourseStudyFooter.html | 4 +-- .../Mobi/Default2019/Scripts/CourseStudy.js | 26 +++++++++---------- .../Mobi/Default2019/Styles/CourseStudy.css | 4 +-- Song.Site/db.config | 2 +- 6 files changed, 33 insertions(+), 19 deletions(-) diff --git a/Song.Site/Templates/Mobi/Default2019/CoreScripts/Extend.js b/Song.Site/Templates/Mobi/Default2019/CoreScripts/Extend.js index 856da43d4..7f17e95c3 100644 --- a/Song.Site/Templates/Mobi/Default2019/CoreScripts/Extend.js +++ b/Song.Site/Templates/Mobi/Default2019/CoreScripts/Extend.js @@ -377,3 +377,14 @@ jQuery.fn.isWeixinApp = function () { var ua = window.navigator.userAgent.toLowerCase(); return ua.match(/miniProgram/i) == 'miniprogram'; }; +//是否处于QQ浏览器 +jQuery.fn.isQQBrowser = function () { + var ua = window.navigator.userAgent.toLowerCase(); + return ua.match(/MQQBrowser/i) == 'mqqbrowser'; +}; +jQuery.fn.ua = function () { + var ua = window.navigator.userAgent.toLowerCase(); + console.log(ua); + return ua; + //return ua.match(/miniProgram/i) == 'miniprogram'; +}; diff --git a/Song.Site/Templates/Mobi/Default2019/CourseStudy.htm b/Song.Site/Templates/Mobi/Default2019/CourseStudy.htm index 58b39f8e2..b1060bf9a 100644 --- a/Song.Site/Templates/Mobi/Default2019/CourseStudy.htm +++ b/Song.Site/Templates/Mobi/Default2019/CourseStudy.htm @@ -28,7 +28,10 @@
- 没有视频资源 + + 未登录,点击此处登录! + + 没有视频资源
+ ShowSelectBox="true"> 没有满足条件的信息! From c2eb57b58d2ab9749f50b8cf3d56f593c8921208 Mon Sep 17 00:00:00 2001 From: weishakeji <10522779@qq.com> Date: Tue, 12 May 2020 16:48:22 +0800 Subject: [PATCH 11/21] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=EF=BC=9A=E5=AF=BC?= =?UTF-8?q?=E5=85=A5=E8=AF=95=E9=A2=98=E6=97=B6=EF=BC=8C=E7=AB=A0=E8=8A=82?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E6=80=80=E7=96=91=E6=9C=89=E5=88=B6=E8=A1=A8?= =?UTF-8?q?=E4=BD=8D=E3=80=81=E5=9B=9E=E8=BD=A6=E7=AC=A6=E3=80=81=E6=8D=A2?= =?UTF-8?q?=E8=A1=8C=E7=AC=A6=E7=AD=89=E4=B8=8D=E5=8F=AF=E8=A7=81=E5=AD=97?= =?UTF-8?q?=E7=AC=A6=EF=BC=8C=E5=A2=9E=E5=8A=A0=E4=BA=86=E6=B8=85=E7=90=86?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Song.ServiceImpls/CourseCom.cs | 5 ++++- Song.ServiceImpls/OutlineCom.cs | 7 +++++-- Song.ServiceImpls/SubjectCom.cs | 7 +++++-- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Song.ServiceImpls/CourseCom.cs b/Song.ServiceImpls/CourseCom.cs index e20537d98..a8b60dd09 100644 --- a/Song.ServiceImpls/CourseCom.cs +++ b/Song.ServiceImpls/CourseCom.cs @@ -47,8 +47,11 @@ public Course CourseBatchAdd(int orgid, int sbjid, string names) //整理名称信息 names = names.Replace(",", ","); List listName = new List(); - foreach (string s in names.Split(',')) + foreach (string str in names.Split(',')) + { + string s = str.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", ""); if (s.Trim() != "") listName.Add(s.Trim()); + } // int pid = 0; Song.Entities.Course last = null; diff --git a/Song.ServiceImpls/OutlineCom.cs b/Song.ServiceImpls/OutlineCom.cs index 66ee9da2d..11989adc3 100644 --- a/Song.ServiceImpls/OutlineCom.cs +++ b/Song.ServiceImpls/OutlineCom.cs @@ -101,8 +101,11 @@ public Outline OutlineBatchAdd(int orgid, int sbjid, int couid, string names) //整理名称信息 names = names.Replace(",", ","); List listName = new List(); - foreach (string s in names.Split(',')) + foreach (string str in names.Split(',')) + { + string s = str.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", ""); if (s.Trim() != "") listName.Add(s.Trim()); + } // int pid = 0; Song.Entities.Outline last = null; @@ -112,7 +115,7 @@ public Outline OutlineBatchAdd(int orgid, int sbjid, int couid, string names) if (current == null) { current = new Outline(); - current.Ol_Name = listName[i].Trim(); + current.Ol_Name = listName[i]; current.Ol_IsUse = true; current.Org_ID = orgid; current.Sbj_ID = sbjid; diff --git a/Song.ServiceImpls/SubjectCom.cs b/Song.ServiceImpls/SubjectCom.cs index a6e3e7cf5..86c0b04af 100644 --- a/Song.ServiceImpls/SubjectCom.cs +++ b/Song.ServiceImpls/SubjectCom.cs @@ -47,8 +47,11 @@ public Subject SubjectBatchAdd(int orgid, string names) //整理名称信息 names = names.Replace(",", ","); List listName = new List(); - foreach (string s in names.Split(',')) + foreach (string str in names.Split(',')) + { + string s = str.Replace("\n", "").Replace(" ", "").Replace("\t", "").Replace("\r", ""); if (s.Trim() != "") listName.Add(s.Trim()); + } // int pid = 0; Song.Entities.Subject last = null; @@ -58,7 +61,7 @@ public Subject SubjectBatchAdd(int orgid, string names) if (current == null) { current = new Subject(); - current.Sbj_Name = listName[i].Trim(); + current.Sbj_Name = listName[i]; current.Sbj_IsUse = true; current.Org_ID = orgid; current.Sbj_PID = pid; From b241d618b9739f237562dd6e08acce7e7fb38180 Mon Sep 17 00:00:00 2001 From: weishakeji <10522779@qq.com> Date: Tue, 12 May 2020 16:56:17 +0800 Subject: [PATCH 12/21] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=EF=BC=9A=E7=A6=81?= =?UTF-8?q?=E7=94=A8=E2=80=9C=E4=BB=8E=E4=B8=8A=E6=AC=A1=E8=BF=9B=E5=BA=A6?= =?UTF-8?q?=E6=92=AD=E6=94=BE=E2=80=9D=E7=9A=84=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Song.Site/Templates/Mobi/Default2019/Scripts/CourseStudy.js | 4 ++-- Song.Site/Templates/Web/_Public/Scripts/CourseStudy.js | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Song.Site/Templates/Mobi/Default2019/Scripts/CourseStudy.js b/Song.Site/Templates/Mobi/Default2019/Scripts/CourseStudy.js index afdb684ba..f06b7a141 100644 --- a/Song.Site/Templates/Mobi/Default2019/Scripts/CourseStudy.js +++ b/Song.Site/Templates/Mobi/Default2019/Scripts/CourseStudy.js @@ -214,12 +214,12 @@ var vdata = new Vue({ vdata.outline = ol.data.result; vdata.state = state.data.result; if (!vdata.state.isLive && vdata.state.PlayTime > 0) { - //if (window.confirm("是否从上次进度播放?")) { + /*if (window.confirm("是否从上次进度播放?")) { vdata.videoSeek(vdata.state.PlayTime / 1000); window.setTimeout(function() { if (vdata.playready()) vdata.player.play(); }, 500); - //} + }*/ } //视频播放记录 var result = state.data.result; diff --git a/Song.Site/Templates/Web/_Public/Scripts/CourseStudy.js b/Song.Site/Templates/Web/_Public/Scripts/CourseStudy.js index 12822b222..008255b41 100644 --- a/Song.Site/Templates/Web/_Public/Scripts/CourseStudy.js +++ b/Song.Site/Templates/Web/_Public/Scripts/CourseStudy.js @@ -111,9 +111,7 @@ var vdata = new Vue({ vdata.outline = ol.data.result; vdata.state = state.data.result; if (!vdata.state.isLive && vdata.state.PlayTime / 1000 > 0) { - /*if (window.confirm("是否从上次进放播放?")) { - vdata.videoSeek(vdata.state.PlayTime); - }*/ + /* vdata.$confirm('是否从上次进度播放?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -125,7 +123,7 @@ var vdata = new Vue({ }, 500); }).catch(function() { - }); + });*/ } //视频播放记录 var result = state.data.result; From 5f932bdbb4e298c2ef3445149e775b36a19e3623 Mon Sep 17 00:00:00 2001 From: weishakeji <10522779@qq.com> Date: Tue, 12 May 2020 18:05:40 +0800 Subject: [PATCH 13/21] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=EF=BC=9A=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E9=A1=B5=E2=80=9C=E5=AD=A6=E4=B9=A0=E7=9B=AE=E6=A0=87?= =?UTF-8?q?=E2=80=9D=E5=9B=BE=E7=89=87=E6=9C=AA=E6=98=BE=E7=A4=BA=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Song.Site/Manage/Student/StudyLog_Details.aspx | 2 +- Song.Site/Manage/Student/StudyLog_Details.aspx.cs | 2 +- Song.Site/Templates/Web/_Public/Module/Course/Sheet.htm | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Song.Site/Manage/Student/StudyLog_Details.aspx b/Song.Site/Manage/Student/StudyLog_Details.aspx index e7d6358e4..1f92d135d 100644 --- a/Song.Site/Manage/Student/StudyLog_Details.aspx +++ b/Song.Site/Manage/Student/StudyLog_Details.aspx @@ -21,7 +21,7 @@ <%# Eval("Tree")%> - <%# Eval("Ol_IsVideo", "{0}") == "True" ? Eval("Ol_Name","{0}") : Eval("Ol_Name")%> + <%# Eval("Ol_IsVideo", "{0}") == "True" ? Eval("Ol_Name","{0}") : Eval("Ol_Name")%> diff --git a/Song.Site/Manage/Student/StudyLog_Details.aspx.cs b/Song.Site/Manage/Student/StudyLog_Details.aspx.cs index ae4c6af37..3a1ee818e 100644 --- a/Song.Site/Manage/Student/StudyLog_Details.aspx.cs +++ b/Song.Site/Manage/Student/StudyLog_Details.aspx.cs @@ -18,7 +18,7 @@ namespace Song.Site.Manage.Student public partial class StudyLog_Details : Extend.CustomPage { //�γ�id - private int couid = WeiSha.Common.Request.QueryString["couid"].Int32 ?? 0; + public int couid = WeiSha.Common.Request.QueryString["couid"].Int32 ?? 0; //ѧԱid private int acid = WeiSha.Common.Request.QueryString["acid"].Int32 ?? Extend.LoginState.Accounts.UserID; protected void Page_Load(object sender, EventArgs e) diff --git a/Song.Site/Templates/Web/_Public/Module/Course/Sheet.htm b/Song.Site/Templates/Web/_Public/Module/Course/Sheet.htm index 10d6c61cd..bf257df3d 100644 --- a/Song.Site/Templates/Web/_Public/Module/Course/Sheet.htm +++ b/Song.Site/Templates/Web/_Public/Module/Course/Sheet.htm @@ -114,7 +114,7 @@ 学习目标: -
{$:#.intro}
+
{$course.Cou_Target}
{$course.cou_intro}
From 43a99a661ee1c64d128256a105b8f3683a137eba Mon Sep 17 00:00:00 2001 From: weishakeji <10522779@qq.com> Date: Tue, 12 May 2020 18:12:26 +0800 Subject: [PATCH 14/21] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=EF=BC=9A=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E6=97=B6=E9=95=BF=E6=98=BE=E7=A4=BA=E7=9A=84=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Song.Site/Manage/Student/StudyLog_Details.aspx.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Song.Site/Manage/Student/StudyLog_Details.aspx.cs b/Song.Site/Manage/Student/StudyLog_Details.aspx.cs index 3a1ee818e..3bc950fe8 100644 --- a/Song.Site/Manage/Student/StudyLog_Details.aspx.cs +++ b/Song.Site/Manage/Student/StudyLog_Details.aspx.cs @@ -91,7 +91,7 @@ protected string CaleTotalTime(string time,string format) int hh = num / 60; int mm = num % 60; // - return string.Format(format, string.Format(tm, hh, num, ss)); + return string.Format(format, string.Format(tm, hh, mm, ss)); } } From a8efe19f0c2a35afc7b35b83b4e40db2cfeff3a3 Mon Sep 17 00:00:00 2001 From: weishakeji <10522779@qq.com> Date: Wed, 13 May 2020 09:04:13 +0800 Subject: [PATCH 15/21] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=EF=BC=9Aapi.js?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=8A=B6=E6=80=81=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Song.Site/Utility/CoreScripts/api.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Song.Site/Utility/CoreScripts/api.js b/Song.Site/Utility/CoreScripts/api.js index 70c701971..7a4898fc2 100644 --- a/Song.Site/Utility/CoreScripts/api.js +++ b/Song.Site/Utility/CoreScripts/api.js @@ -403,7 +403,11 @@ $api.effect(function() { }, function(response, err) { //请求网址 - var url = response.config.url; + var url = response ? response.config.url : err.config.url; + if(response==null){ + alert('"'+url+'",请求失败。message:'+err.message); + return; + } url=url.substring(url.indexOf('/v1/')+3); //请求参数 var para = JSON.stringify(response.config.params); From 38062ff9b6159d62d25d68fb7858b70f26be6192 Mon Sep 17 00:00:00 2001 From: weishakeji <10522779@qq.com> Date: Wed, 13 May 2020 12:17:11 +0800 Subject: [PATCH 16/21] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9Arestful?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E=E5=A2=9E=E5=8A=A0=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E4=BF=A1=E6=81=AF=EF=BC=8C=E6=96=B9=E4=BE=BF=E8=B0=83?= =?UTF-8?q?=E8=AF=95=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Templates/Web/_Public/Help/Scripts/API.js | 2 +- Song.ViewData/Attri/CacheAttribute.cs | 3 ++- Song.ViewData/DataResult.cs | 17 ++++++++++++++--- Song.ViewData/ExecuteMethod.cs | 7 +++---- 4 files changed, 20 insertions(+), 9 deletions(-) diff --git a/Song.Site/Templates/Web/_Public/Help/Scripts/API.js b/Song.Site/Templates/Web/_Public/Help/Scripts/API.js index 29a065bcc..480a0b4a2 100644 --- a/Song.Site/Templates/Web/_Public/Help/Scripts/API.js +++ b/Song.Site/Templates/Web/_Public/Help/Scripts/API.js @@ -150,7 +150,7 @@ var rvue = new Vue({ }).catch(function(ex) { //alert(ex.message); - var ele = document.getElementById("testResult"); + var ele = document.getElementById("testresult"); ele.innerText = ex.message; }); }, diff --git a/Song.ViewData/Attri/CacheAttribute.cs b/Song.ViewData/Attri/CacheAttribute.cs index 8f8b370f0..569a47b4a 100644 --- a/Song.ViewData/Attri/CacheAttribute.cs +++ b/Song.ViewData/Attri/CacheAttribute.cs @@ -46,10 +46,11 @@ public static object GetResult(MethodInfo method, Letter letter) /// public static void Insert(int expires, MethodInfo method, Letter letter, object result) { + if (result == null) return; //缓存名称 string cacheName = string.Format("ViewData_{0}_[{1}]", method.Name, letter.ToString()); //过期时间 - DateTime expTime = DateTime.Now.AddMinutes(expires); + DateTime expTime = DateTime.Now.AddMinutes(expires); HttpRuntime.Cache.Insert(cacheName, result, null, expTime, TimeSpan.Zero); } } diff --git a/Song.ViewData/DataResult.cs b/Song.ViewData/DataResult.cs index 0062224c0..74e80100f 100644 --- a/Song.ViewData/DataResult.cs +++ b/Song.ViewData/DataResult.cs @@ -51,6 +51,10 @@ public class DataResult ///
public Exception Exception { get; set; } /// + /// 堆栈跟踪信息 + /// + public string StackTrace { get; set; } + /// /// 实际返回的数据 /// public object Result { get; set; } @@ -78,7 +82,7 @@ public DataResult(object obj,double span):this(obj){ /// ///
/// - public DataResult(Exception exc) + public DataResult(Exception exc, DateTime time) { Success = false; DateTime = DateTime.Now; @@ -87,11 +91,15 @@ public DataResult(Exception exc) if (exc.InnerException != null) { Message = exc.InnerException.Message; + StackTrace = exc.InnerException.StackTrace; } else { Message = exc.Message; + StackTrace = exc.StackTrace; } + //执行时间 + ExecSpan = ((TimeSpan)(DateTime.Now - time)).TotalMilliseconds; State = 0; } @@ -165,6 +173,7 @@ private string _json_property(string typename, object value) case "String": str = value == null ? "" : value.ToString(); str = str.Replace(Environment.NewLine, ""); + str = str.Replace("\n", " ").Replace("\t", " ").Replace("\r", " "); str = string.Format("\"{0}\"", str); break; case "Int32": @@ -202,11 +211,13 @@ private string _json_property(string typename, object value) break; case "Exception": Exception ex = (Exception)value; - str = ex == null ? "" : ex.Message; - str = string.Format("\"{0}\"", str); + str = ex == null ? "" : ex.StackTrace; + str = str.Replace("\n", " ").Replace("\t", " ").Replace("\r", " "); + str = string.Format("\"{0}\"", str.Trim()); break; default: str = value == null ? "" : value.ToString(); + str = str.Replace("\n", " ").Replace("\t", " ").Replace("\r", " "); str = string.Format("\"{0}\"", str); break; } diff --git a/Song.ViewData/ExecuteMethod.cs b/Song.ViewData/ExecuteMethod.cs index cb5007a97..9bd67579d 100644 --- a/Song.ViewData/ExecuteMethod.cs +++ b/Song.ViewData/ExecuteMethod.cs @@ -127,10 +127,9 @@ public static object Exec(Letter letter) /// public static DataResult ExecToResult(Letter letter) { + DateTime time = DateTime.Now; try - { - DateTime time = DateTime.Now; - + { if (!"weishakeji".Equals(letter.HTTP_Mark)) return new Song.ViewData.DataResult(new Exception("请求标识不正确")); @@ -149,7 +148,7 @@ public static DataResult ExecToResult(Letter letter) } catch (Exception ex) { - return new Song.ViewData.DataResult(ex); + return new Song.ViewData.DataResult(ex,time); } } /// From 71855da25d338085dbad6570bdb26639fded3849 Mon Sep 17 00:00:00 2001 From: weishakeji <10522779@qq.com> Date: Wed, 13 May 2020 16:48:57 +0800 Subject: [PATCH 17/21] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9Arestful?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=BF=94=E5=9B=9E=E5=A2=9E=E5=8A=A0=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E4=BF=A1=E6=81=AF=EF=BC=8C=E6=96=B9=E4=BE=BF=E8=B0=83?= =?UTF-8?q?=E8=AF=95=E7=A8=8B=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Song.ViewData/DataResult.cs | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/Song.ViewData/DataResult.cs b/Song.ViewData/DataResult.cs index 74e80100f..9266571bd 100644 --- a/Song.ViewData/DataResult.cs +++ b/Song.ViewData/DataResult.cs @@ -49,11 +49,7 @@ public class DataResult /// /// 详细的异常信息 /// - public Exception Exception { get; set; } - /// - /// 堆栈跟踪信息 - /// - public string StackTrace { get; set; } + public Exception Exception { get; set; } /// /// 实际返回的数据 /// @@ -90,13 +86,11 @@ public DataResult(Exception exc, DateTime time) Exception = exc; if (exc.InnerException != null) { - Message = exc.InnerException.Message; - StackTrace = exc.InnerException.StackTrace; + Message = exc.InnerException.Message; } else { - Message = exc.Message; - StackTrace = exc.StackTrace; + Message = exc.Message; } //执行时间 ExecSpan = ((TimeSpan)(DateTime.Now - time)).TotalMilliseconds; @@ -209,12 +203,12 @@ private string _json_property(string typename, object value) } } break; - case "Exception": - Exception ex = (Exception)value; - str = ex == null ? "" : ex.StackTrace; - str = str.Replace("\n", " ").Replace("\t", " ").Replace("\r", " "); - str = string.Format("\"{0}\"", str.Trim()); - break; + //case "Exception": + // Exception ex = (Exception)value; + // str = ex == null ? "" : ((ex.InnerException == null) ? ex.Message : ex.InnerException.Message); + // str = str.Replace("\n", ";").Replace("\t", " ").Replace("\r", ";"); + // str = string.Format("\"{0}\"", str.Trim()); + // break; default: str = value == null ? "" : value.ToString(); str = str.Replace("\n", " ").Replace("\t", " ").Replace("\r", " "); From f07f9011f9d5ea1f1b43d74f4fdc17ef4bf8d013 Mon Sep 17 00:00:00 2001 From: weishakeji <10522779@qq.com> Date: Wed, 13 May 2020 17:36:30 +0800 Subject: [PATCH 18/21] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E8=AF=95?= =?UTF-8?q?=E9=A2=98=E7=BB=83=E4=B9=A0=E5=A2=9E=E5=8A=A0=E2=80=9C=E6=8A=98?= =?UTF-8?q?=E5=8F=A0/=E5=B1=95=E5=BC=80=E2=80=9D=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Song.Site/Templates/Web/_Public/Exercises.htm | 1 + Song.Site/Templates/Web/_Public/Scripts/Exercises.js | 4 ++++ Song.Site/Templates/Web/_Public/Styles/Exercises.css | 9 +++++++++ 3 files changed, 14 insertions(+) diff --git a/Song.Site/Templates/Web/_Public/Exercises.htm b/Song.Site/Templates/Web/_Public/Exercises.htm index 7c296246f..aa0c8d139 100644 --- a/Song.Site/Templates/Web/_Public/Exercises.htm +++ b/Song.Site/Templates/Web/_Public/Exercises.htm @@ -13,6 +13,7 @@
+
折叠/展开
已经选条件:
所有
diff --git a/Song.Site/Templates/Web/_Public/Scripts/Exercises.js b/Song.Site/Templates/Web/_Public/Scripts/Exercises.js index 4ffd6318e..5bb382c8f 100644 --- a/Song.Site/Templates/Web/_Public/Scripts/Exercises.js +++ b/Song.Site/Templates/Web/_Public/Scripts/Exercises.js @@ -3,6 +3,10 @@ subjectEvent(); //各种选择按钮的事件 setButtonEvent(); _quesSelectEvent(); + //折叠选择区域 + $("#btnShow").click(function(){ + $("#subject").toggle(); + }); }); diff --git a/Song.Site/Templates/Web/_Public/Styles/Exercises.css b/Song.Site/Templates/Web/_Public/Styles/Exercises.css index d937cec35..0d56fe721 100644 --- a/Song.Site/Templates/Web/_Public/Styles/Exercises.css +++ b/Song.Site/Templates/Web/_Public/Styles/Exercises.css @@ -16,6 +16,15 @@ body{ #Context #selectArea { margin-bottom: 10px; padding-bottom: 10px; + position:relative; +} +#btnShow{ + position:absolute; + top:5px; + right:10px; + width:auto; + height:30px; + cursor:pointer; } .selectBar { display: table; From bae502a65fe3e4b4b21213a4dea29ce2db253fcf Mon Sep 17 00:00:00 2001 From: weishakeji <10522779@qq.com> Date: Wed, 13 May 2020 18:09:31 +0800 Subject: [PATCH 19/21] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=EF=BC=9A=E7=BD=91?= =?UTF-8?q?=E6=A0=A1=E7=89=88=E5=8F=B3=E4=B8=8A=E8=A7=92=E5=AD=A6=E5=91=98?= =?UTF-8?q?=E5=A7=93=E5=90=8D=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Song.Site/Templates/Web/NetSchool/CoreStyles/public.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Song.Site/Templates/Web/NetSchool/CoreStyles/public.css b/Song.Site/Templates/Web/NetSchool/CoreStyles/public.css index b53cad153..d1092b0be 100644 --- a/Song.Site/Templates/Web/NetSchool/CoreStyles/public.css +++ b/Song.Site/Templates/Web/NetSchool/CoreStyles/public.css @@ -167,7 +167,7 @@ img { #header .topright { float: right; height: 35px; - width: 150px; + width: 160px; text-align: right; margin-top: 10px; } From 3b513cd4064f54d903523694338e20e90b634bf7 Mon Sep 17 00:00:00 2001 From: weishakeji <10522779@qq.com> Date: Thu, 14 May 2020 15:13:24 +0800 Subject: [PATCH 20/21] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=EF=BC=9A=E7=BD=91?= =?UTF-8?q?=E6=A0=A1=E7=89=88=E5=8F=B3=E4=B8=8A=E8=A7=92=E5=AD=A6=E5=91=98?= =?UTF-8?q?=E5=A7=93=E5=90=8D=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Song.Site/Properties/AssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Song.Site/Properties/AssemblyInfo.cs b/Song.Site/Properties/AssemblyInfo.cs index c6aafa774..d95d233c4 100644 --- a/Song.Site/Properties/AssemblyInfo.cs +++ b/Song.Site/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ // 有关程序集的常规信息通过下列属性集 // 控制。更改这些属性值可修改 // 与程序集关联的信息。 -[assembly: AssemblyTitle("ReleaseDate 2020-5-7")] +[assembly: AssemblyTitle("ReleaseDate 2020-5-14")] [assembly: AssemblyDescription("集“学、练、考”与一体的在线学习系统")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("微厦科技")] From 5c900d3e6ec042eb3737bdd5e2ac0cac80c8a169 Mon Sep 17 00:00:00 2001 From: weishakeji <10522779@qq.com> Date: Thu, 14 May 2020 15:47:03 +0800 Subject: [PATCH 21/21] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=EF=BC=9A=E8=A7=86?= =?UTF-8?q?=E9=A2=91=E5=AD=A6=E4=B9=A0=E6=97=B6=E7=95=99=E8=A8=80=E6=97=B6?= =?UTF-8?q?=E5=AE=9E=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Mobi/Default2019/Scripts/CourseStudy.js | 10 +++-- .../Web/_Public/Scripts/CourseChat.js | 38 ++++++++++++------- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/Song.Site/Templates/Mobi/Default2019/Scripts/CourseStudy.js b/Song.Site/Templates/Mobi/Default2019/Scripts/CourseStudy.js index f06b7a141..ecd435af5 100644 --- a/Song.Site/Templates/Mobi/Default2019/Scripts/CourseStudy.js +++ b/Song.Site/Templates/Mobi/Default2019/Scripts/CourseStudy.js @@ -186,9 +186,9 @@ var vdata = new Vue({ //video.setAttribute("x5-video-player-fullscreen", "true"); video.setAttribute("x5-video-orientation", "portraint"); video.setAttribute("controlsList", "nodownload"); - }else{ - video.setAttribute("x-webkit-airplay",true); - video.setAttribute("x5-video-player-type","h5"); + } else { + video.setAttribute("x-webkit-airplay", true); + video.setAttribute("x5-video-player-type", "h5"); } }, 3000); //给video对象增加属性 @@ -337,7 +337,7 @@ var vdata = new Vue({ } }).catch(function(err) { //alert(err); - }); + }); } }, created: function() { @@ -362,6 +362,8 @@ var vdata = new Vue({ })).catch(function(err) { alert(err); }); + //定时刷新(加载)咨询留言 + window.setInterval('vdata.msgGet()', 1000 * 20); } }); vdata.$mount('#context-box'); diff --git a/Song.Site/Templates/Web/_Public/Scripts/CourseChat.js b/Song.Site/Templates/Web/_Public/Scripts/CourseChat.js index 880edc1cd..f5b007935 100644 --- a/Song.Site/Templates/Web/_Public/Scripts/CourseChat.js +++ b/Song.Site/Templates/Web/_Public/Scripts/CourseChat.js @@ -1,22 +1,22 @@ //章节id,学员账号 var olid = $api.querystring("olid"); -var acc=$api.querystring("acc"); +var acc = $api.querystring("acc"); // var vdata = new Vue({ data: { //数据实体 - messages: [], //咨询留言 + messages: [], //咨询留言 //状态 - state: {}, //课程状态 + state: {}, //课程状态 olid: $api.querystring("olid"), - loading: false //加载中 + loading: false //加载中 }, watch: { }, methods: { //发送消息 - msgSend: function () { + msgSend: function() { var msg = document.getElementById("messageinput").value; if ($api.trim(msg) == '') return; var span = Date.now() - Number($api.cookie("msgtime")); @@ -28,7 +28,13 @@ var vdata = new Vue({ return; } $api.cookie("msgtime", Date.now()); - $api.post("message/add", {acc:acc, msg: msg, playtime: 0, couid: 0, olid: olid }).then(function (req) { + $api.post("message/add", { + acc: acc, + msg: msg, + playtime: 0, + couid: 0, + olid: olid + }).then(function(req) { var d = req.data; if (d.success) { document.getElementById("messageinput").value = ''; @@ -38,34 +44,38 @@ var vdata = new Vue({ } }); }, - msgGet: function () { + msgGet: function() { if (!olid || olid < 1) return; - $api.post("message/All", { olid: olid, order: 'asc' }).then(function (req) { + $api.post("message/All", { + olid: olid, + order: 'asc' + }).then(function(req) { var d = req.data; if (d.success) { vdata.messages = d.result; - window.setTimeout(function () { + window.setTimeout(function() { var dl = document.getElementById("chatlistdl"); document.getElementById("chatlist").scrollTop = dl.offsetHeight; }, 1000); } else { alert("留言信息加载异常!详情:\r" + d.message); } - }).catch(function (err) { + }).catch(function(err) { //alert("msgGet方法存在错误:"+err); }); } }, - created: function () { - + created: function() { + //定时刷新(加载)咨询留言 + window.setInterval('vdata.msgGet()', 1000 * 20); }, - mounted: function () { + mounted: function() { this.msgGet(); } }); vdata.$mount('#vue-app'); //全局过滤器,日期格式化 -Vue.filter('date', function (value, fmt) { +Vue.filter('date', function(value, fmt) { if ($api.getType(value) != 'Date') return value; var o = { "M+": value.getMonth() + 1,