diff --git a/Song.Extend/Login/Accounts.cs b/Song.Extend/Login/Accounts.cs index c2cdc7299..d892442ad 100644 --- a/Song.Extend/Login/Accounts.cs +++ b/Song.Extend/Login/Accounts.cs @@ -142,6 +142,7 @@ public Song.Entities.Accounts CurrentUser for (int i = list.Count - 1; i >= 0; i--) { Song.Entities.Accounts em = list[i]; + if (em == null) continue; if (em.Ac_ID == acid) { //如果不是在微信中,同一账号不能同时登录 @@ -292,6 +293,7 @@ private void _register(Song.Entities.Accounts acc) List list = this.OnlineUser; for (int i = 0; i < list.Count; i++) { + if (list[i] == null) continue; if (list[i].Ac_ID == acc.Ac_ID) { list[i] = acc; @@ -317,6 +319,7 @@ public void Refresh(Song.Entities.Accounts st) { for (int i = 0; i < list.Count; i++) { + if (list[i] == null) continue; if (list[i].Ac_ID == st.Ac_ID) { //登录时间,该时间不入数据库,仅为临时使用 @@ -376,6 +379,7 @@ public int CleanOut() for (int i = list.Count - 1; i >= 0; i--) { Song.Entities.Accounts em = list[i]; + if (em == null) continue; if (DateTime.Now > em.Ac_LastTime.AddMinutes(outTimeNumer)) { list.RemoveAt(i); @@ -396,6 +400,7 @@ public void CleanOut(int accid) { for (int i = list.Count - 1; i >= 0; i--) { + if (list[i] == null) continue; if (list[i].Ac_ID == accid) { list.RemoveAt(i); diff --git a/Song.ServiceImpls/AccountsCom.cs b/Song.ServiceImpls/AccountsCom.cs index 787576ce7..e5021c654 100644 --- a/Song.ServiceImpls/AccountsCom.cs +++ b/Song.ServiceImpls/AccountsCom.cs @@ -85,11 +85,17 @@ public int AccountsAdd(Accounts entity) //如果身份证不为空,则解析生日 if (!string.IsNullOrWhiteSpace(entity.Ac_IDCardNumber)) { - IDCardNumber card = IDCardNumber.Get(entity.Ac_IDCardNumber); - entity.Ac_Age = card.Birthday.Year; - entity.Ac_Sex = card.Sex; - entity.Ac_Birthday = card.Birthday; - entity.Ac_Native = card.Province + "," + card.Area + "," + card.City; + try + { + IDCardNumber card = IDCardNumber.Get(entity.Ac_IDCardNumber); + entity.Ac_Age = card.Birthday.Year; + entity.Ac_Sex = card.Sex; + entity.Ac_Birthday = card.Birthday; + entity.Ac_Native = card.Province + "," + card.Area + "," + card.City; + } + catch + { + } } else { @@ -125,11 +131,17 @@ public void AccountsSave(Accounts entity) //如果身份证不为空,则解析生日 if (!string.IsNullOrWhiteSpace(entity.Ac_IDCardNumber)) { - IDCardNumber card = IDCardNumber.Get(entity.Ac_IDCardNumber); - entity.Ac_Age = card.Birthday.Year; - entity.Ac_Sex = card.Sex; - entity.Ac_Birthday = card.Birthday; - entity.Ac_Native = card.Province + "," + card.Area + "," + card.City; + try + { + IDCardNumber card = IDCardNumber.Get(entity.Ac_IDCardNumber); + entity.Ac_Age = card.Birthday.Year; + entity.Ac_Sex = card.Sex; + entity.Ac_Birthday = card.Birthday; + entity.Ac_Native = card.Province + "," + card.Area + "," + card.City; + } + catch + { + } } else { diff --git a/Song.ServiceImpls/CourseCom.cs b/Song.ServiceImpls/CourseCom.cs index 116a3810f..37091ef8a 100644 --- a/Song.ServiceImpls/CourseCom.cs +++ b/Song.ServiceImpls/CourseCom.cs @@ -670,6 +670,7 @@ public List CoursePager(int orgid, string sbjid, bool? isUse, bool? isLi wc.And(wcSbjid); } if (isUse != null) wc.And(Course._.Cou_IsUse == (bool)isUse); + if (order == "live") isLive = true; if (isLive != null) wc.And(Course._.Cou_ExistLive == (bool)isLive); if (!string.IsNullOrWhiteSpace(searTxt)) wc.And(Course._.Cou_Name.Like("%" + searTxt.Trim() + "%")); countSum = Gateway.Default.Count(wc); @@ -684,6 +685,7 @@ public List CoursePager(int orgid, string sbjid, bool? isUse, bool? isLi wc.And(Course._.Cou_IsFree == true); wcOrder = Course._.Cou_IsFree.Desc & Course._.Cou_Tax.Desc; } + //if (order == "live") wc.And(); return Gateway.Default.From().Where(wc).OrderBy(wcOrder).ToList(size, (index - 1) * size); } /// diff --git a/Song.ServiceImpls/StudentCom.cs b/Song.ServiceImpls/StudentCom.cs index a1cc4b12c..14aafc6bc 100644 --- a/Song.ServiceImpls/StudentCom.cs +++ b/Song.ServiceImpls/StudentCom.cs @@ -952,6 +952,27 @@ FROM [LogForStudentStudy] where {acid} group by ol_id DataTable dt = ds.Tables[0]; if (dt.Rows.Count > 0) { + //*****如果没有购买的,则去除 + //购买的课程(含概试用的) + List cous = Business.Do().CourseForStudent(acid, null, 1, null, -1); + for (int i = 0; i < dt.Rows.Count; i++) + { + bool isExist = false; + for (int j = 0; j < cous.Count; j++) + { + if (dt.Rows[i]["Cou_ID"].ToString() == cous[j].Cou_ID.ToString()) + { + isExist = true; + break; + } + } + if (!isExist) + { + dt.Rows.RemoveAt(i); + i--; + } + } + //计算完成度 foreach (DataRow dr in dt.Rows) { //课程的累计完成度 diff --git a/Song.Site/Manage/Content/News.aspx b/Song.Site/Manage/Content/News.aspx index fed37394a..2cdaeb1a0 100644 --- a/Song.Site/Manage/Content/News.aspx +++ b/Song.Site/Manage/Content/News.aspx @@ -54,7 +54,12 @@ - + + +预览 + + + diff --git a/Song.Site/Manage/Student/Archives.aspx b/Song.Site/Manage/Student/Archives.aspx index 6d3b085b4..35cfb9973 100644 --- a/Song.Site/Manage/Student/Archives.aspx +++ b/Song.Site/Manage/Student/Archives.aspx @@ -46,8 +46,9 @@ - &stid=<%# Eval("Ac_Id")%>','<%# Eval("Exam_Title","考试回顾:《{0}》")%>',980,95);return false;"> - 回顾 + <%-- &stid=<%# Eval("Ac_Id")%>','<%# Eval("Exam_Title","考试回顾:《{0}》")%>',980,95);return false;"> + 回顾--%> + 回顾 <%-- diff --git a/Song.Site/Manage/Student/CouponDetails.aspx.cs b/Song.Site/Manage/Student/CouponDetails.aspx.cs index ef670d324..836b23173 100644 --- a/Song.Site/Manage/Student/CouponDetails.aspx.cs +++ b/Song.Site/Manage/Student/CouponDetails.aspx.cs @@ -17,6 +17,9 @@ public partial class CouponDetails : Extend.CustomPage Song.Entities.Accounts st = null; protected void Page_Load(object sender, EventArgs e) { + Song.Entities.Accounts st = this.Master.Account; + if (st == null) return; + this.Form.DefaultButton = this.btnSear.UniqueID; st = this.Master.Account; //获取总积分 diff --git a/Song.Site/Manage/Student/Course_Study.aspx.cs b/Song.Site/Manage/Student/Course_Study.aspx.cs index 967001595..2d7ceb7d5 100644 --- a/Song.Site/Manage/Student/Course_Study.aspx.cs +++ b/Song.Site/Manage/Student/Course_Study.aspx.cs @@ -65,7 +65,7 @@ protected void BindData(object sender, EventArgs e) Song.Entities.Accounts st = this.Master.Account; if (st == null) return; //����Ŀγ�(�������õģ� - List cous = Business.Do().CourseForStudent(st.Ac_ID, null, 1,null,-1); + List cous = Business.Do().CourseForStudent(st.Ac_ID, null, 0,null,-1); foreach (Song.Entities.Course c in cous) { //�γ�ͼƬ diff --git a/Song.Site/Manage/Student/Learningcard.aspx.cs b/Song.Site/Manage/Student/Learningcard.aspx.cs index 3de9ee02f..e22154ed3 100644 --- a/Song.Site/Manage/Student/Learningcard.aspx.cs +++ b/Song.Site/Manage/Student/Learningcard.aspx.cs @@ -26,7 +26,8 @@ public partial class Learningcard : Extend.CustomPage protected int cardcount, usecount; protected void Page_Load(object sender, EventArgs e) { - + Song.Entities.Accounts st = Extend.LoginState.Accounts.CurrentUser; + if (st == null) return; if (Request.ServerVariables["REQUEST_METHOD"] == "GET") { diff --git a/Song.Site/Manage/Student/Online.aspx.cs b/Song.Site/Manage/Student/Online.aspx.cs index 879fbdded..cc23eb4df 100644 --- a/Song.Site/Manage/Student/Online.aspx.cs +++ b/Song.Site/Manage/Student/Online.aspx.cs @@ -24,6 +24,8 @@ public partial class Online : Extend.CustomPage Song.Entities.Organization org; protected void Page_Load(object sender, EventArgs e) { + Song.Entities.Accounts st = this.Master.Account; + if (st == null) return; this.Form.DefaultButton = this.btnSear.UniqueID; org = Business.Do().OrganCurrent(); if (!this.IsPostBack) diff --git a/Song.Site/Manage/Student/Share.aspx.cs b/Song.Site/Manage/Student/Share.aspx.cs index 9cc65ebf0..0c1cfc896 100644 --- a/Song.Site/Manage/Student/Share.aspx.cs +++ b/Song.Site/Manage/Student/Share.aspx.cs @@ -18,7 +18,7 @@ public partial class Share : Extend.CustomPage protected void Page_Load(object sender, EventArgs e) { Song.Entities.Accounts acc = this.Master.Account; - + if (acc == null) return; //分享链接 string url = "http://{0}{1}/default.ashx?sharekeyid={2}"; //端口 diff --git a/Song.Site/Manage/Student/Subordinates.aspx.cs b/Song.Site/Manage/Student/Subordinates.aspx.cs index 68f3a6dbd..4d49f30d9 100644 --- a/Song.Site/Manage/Student/Subordinates.aspx.cs +++ b/Song.Site/Manage/Student/Subordinates.aspx.cs @@ -17,6 +17,8 @@ public partial class Subordinates : Extend.CustomPage Song.Entities.Organization org = null; protected void Page_Load(object sender, EventArgs e) { + Song.Entities.Accounts st = this.Master.Account; + if (st == null) return; this.Form.DefaultButton = this.btnSear.UniqueID; org = Business.Do().OrganCurrent(); if (!IsPostBack) diff --git a/Song.Site/Manage/Student/TestArchives.aspx b/Song.Site/Manage/Student/TestArchives.aspx index ceabda705..e20c69132 100644 --- a/Song.Site/Manage/Student/TestArchives.aspx +++ b/Song.Site/Manage/Student/TestArchives.aspx @@ -41,7 +41,8 @@ - &tpid=<%# Eval("tp_Id")%>','<%# Eval("Tp_Name","测试回顾:《{0}》")%>',980,100);return false;">回顾 + <%-- &tpid=<%# Eval("tp_Id")%>','<%# Eval("Tp_Name","测试回顾:《{0}》")%>',980,100);return false;">回顾--%> + 回顾 diff --git a/Song.Site/Properties/AssemblyInfo.cs b/Song.Site/Properties/AssemblyInfo.cs index 41d6da178..9e64f8e8a 100644 --- a/Song.Site/Properties/AssemblyInfo.cs +++ b/Song.Site/Properties/AssemblyInfo.cs @@ -5,7 +5,7 @@ // 有关程序集的常规信息通过下列属性集 // 控制。更改这些属性值可修改 // 与程序集关联的信息。 -[assembly: AssemblyTitle("ReleaseDate 2020-3-3")] +[assembly: AssemblyTitle("ReleaseDate 2020-3-23")] [assembly: AssemblyDescription("集“学、练、考”与一体的在线学习系统")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("微厦科技")] diff --git a/Song.Site/Song.Site.csproj b/Song.Site/Song.Site.csproj index 4a9bfb571..63cd17196 100644 --- a/Song.Site/Song.Site.csproj +++ b/Song.Site/Song.Site.csproj @@ -1292,7 +1292,6 @@ - @@ -1839,7 +1838,6 @@ - @@ -2046,7 +2044,6 @@ - diff --git a/Song.Site/Templates/Mobi/Default2019/Courses.htm b/Song.Site/Templates/Mobi/Default2019/Courses.htm index 911bc806c..931a21358 100644 --- a/Song.Site/Templates/Mobi/Default2019/Courses.htm +++ b/Song.Site/Templates/Mobi/Default2019/Courses.htm @@ -20,7 +20,7 @@

推荐 最新 最热 + href="#" order="live">直播 最热 免费
diff --git a/Song.Site/Templates/Mobi/Default2019/Inc/CourseStudyFooter.html b/Song.Site/Templates/Mobi/Default2019/Inc/CourseStudyFooter.html index ae384dd34..608f954b6 100644 --- a/Song.Site/Templates/Mobi/Default2019/Inc/CourseStudyFooter.html +++ b/Song.Site/Templates/Mobi/Default2019/Inc/CourseStudyFooter.html @@ -52,7 +52,7 @@ } //显示视频 var video = document.querySelector("video"); - video.style.display = ""; + if (video.size() > 0) video.style.display = ""; }); } \ No newline at end of file diff --git a/Song.Site/Templates/Mobi/Default2019/Scripts/CourseStudy.js b/Song.Site/Templates/Mobi/Default2019/Scripts/CourseStudy.js index 5d63d1897..6eea724a1 100644 --- a/Song.Site/Templates/Mobi/Default2019/Scripts/CourseStudy.js +++ b/Song.Site/Templates/Mobi/Default2019/Scripts/CourseStudy.js @@ -176,16 +176,24 @@ var vdata = new Vue({ for (var i = 0; i < setbtn.length; i++) { //setbtn[i].style.display = "none"; } + window.setInterval(function() { + var video = document.querySelector("video"); + + video.setAttribute("x5-playsinline", "true"); + video.setAttribute("playsinline", "true"); + video.setAttribute("webkit-playsinline", "true"); + // + //video.setAttribute("x-webkit-airplay",true); + //video.setAttribute("x5-video-player-type","h5"); + // + video.removeAttribute("controls"); + video.setAttribute("x5-video-player-fullscreen", "true"); + video.setAttribute("x5-video-orientation", "portraint"); + video.setAttribute("controlsList", "nodownload"); + }, 6000); //给video对象增加属性 var video = document.querySelector("video"); - /**/ - video.setAttribute("x5-playsinline", ""); - video.setAttribute("playsinline", true); - video.setAttribute("webkit-playsinline", ""); - //video.setAttribute("x-webkit-airplay",true); - //video.setAttribute("x5-video-player-type","h5"); - video.setAttribute("x5-video-player-fullscreen", "true"); - video.setAttribute("x5-video-orientation", "portraint"); + }, //章节列表的点击事件 outlineClick: function(olid, event) { diff --git a/Song.Site/Templates/Mobi/Default2019/Styles/CourseStudy.css b/Song.Site/Templates/Mobi/Default2019/Styles/CourseStudy.css index 0ffef635e..2a81590c1 100644 --- a/Song.Site/Templates/Mobi/Default2019/Styles/CourseStudy.css +++ b/Song.Site/Templates/Mobi/Default2019/Styles/CourseStudy.css @@ -35,15 +35,18 @@ html,body } video::-internal-media-controls-download-button { - display: none; + display: none !important; } video::-webkit-media-controls-enclosure { - overflow: hidden; + overflow: hidden !important; +} +video::-webkit-media-controls { + overflow: hidden !important; } - video::-webkit-media-controls-panel { - width: calc(100% + 30px); + width: calc(100% + 30px) !important; + margin-left: auto; } /*返回首页*/ diff --git a/Song.Site/Templates/Mobi/Default2019/Styles/Courses.css b/Song.Site/Templates/Mobi/Default2019/Styles/Courses.css index ae2af4f2f..3969527da 100644 --- a/Song.Site/Templates/Mobi/Default2019/Styles/Courses.css +++ b/Song.Site/Templates/Mobi/Default2019/Styles/Courses.css @@ -45,7 +45,7 @@ input { content: "\e620"; } .btnBar .new:before { - content: "\e61e"; + content: "\e73e"; } .btnBar .hot:before { content: "\e6be"; diff --git a/Song.Site/Templates/Mobi/Default2019/Teachers.htm b/Song.Site/Templates/Mobi/Default2019/Teachers.htm index 8e8c271f8..3e693d897 100644 --- a/Song.Site/Templates/Mobi/Default2019/Teachers.htm +++ b/Song.Site/Templates/Mobi/Default2019/Teachers.htm @@ -13,7 +13,11 @@
-
{$:#.data.th_name}{$:#.data.Th_PhoneMobi}
+
{$:#.data.th_name} + + {$:#.data.Th_PhoneMobi} + +
diff --git a/Song.Site/Templates/Web/Gov/Inc/Footer.html b/Song.Site/Templates/Web/Gov/Inc/Footer.html index ef09ab406..e358f348c 100644 --- a/Song.Site/Templates/Web/Gov/Inc/Footer.html +++ b/Song.Site/Templates/Web/Gov/Inc/Footer.html @@ -17,7 +17,7 @@
地址:{$:#.org.Org_Address}    电话:{$:#.org.Org_Phone}
Copyright © 2016-2018 {$:#.org.Org_AbbrEnName} All rights reserved   - {$:#.org.Org_ICP} + {$:#.org.Org_ICP}  {$:#.org.Org_GonganBeian} diff --git a/Song.Site/Templates/Web/Gov/Training.htm b/Song.Site/Templates/Web/Gov/Training.htm deleted file mode 100644 index d825854b3..000000000 --- a/Song.Site/Templates/Web/Gov/Training.htm +++ /dev/null @@ -1,195 +0,0 @@ - - - - 试题练习 - {$:#.org.org_platformname} - - - - - - - - -
-
- 试题范围选择
- -
-
-
- 已经选条件:
-
-
-
-
-
-
- 专业:
- -
- -
-
课程:
- -
-
- -
-
章节:
- -
-
-
-
- 题型:
-
- - - -
-
-
-
- 难度:
-
- - - -
-
-
-
- 题量:
-
- - - - -
(未购买,最多练习10道)
-
-
-
-
-
- -
-
-
- 试题练习 -
-
- {$index}/{$sumCount} - 正确 0 - 正确率 0 % -
-
- -
-
参考答案
-
试题解析
-
学习资料
-
-
-
<< 上一题
-
下一题 >>
-
-
-
- -
- -
学员登录后才可以学习(学员必须通)!
-
- - -
请选择要练习的课程!
-
- - -
- - - - -
-
- - -
{$qindex}、[{$:#.typeName}题] {$:#.q.qus_title}
- -
- - - - - -
󰃆{$:tax}、{$:ans.Ans_Context}
-
-
- - - - - -
{$:tax}、{$:ans.Ans_Context}
-
-
- - - - -
A、 正确
-
B、 错误
- -
A、 正确
-
B、 错误
-
-
- -
-
回答:
- -
-
- - - - - -
{$:tax}、 - -
-
-
-
-
-
-
- - -
当前选择范围没有供学习的试题!
- 请选择其它的选项。
- -
- -
-
- - - diff --git a/Song.Site/Templates/Web/Neimeng/Inc/Footer.html b/Song.Site/Templates/Web/Neimeng/Inc/Footer.html index 422f2c4b2..c11bc24cf 100644 --- a/Song.Site/Templates/Web/Neimeng/Inc/Footer.html +++ b/Song.Site/Templates/Web/Neimeng/Inc/Footer.html @@ -55,7 +55,7 @@ {$:#.org.Org_Name}   Tel:{$:#.org.Org_Phone}
Copyright © 2014 {$:#.org.Org_AbbrEnName} All rights reserved   - {$:#.org.Org_ICP} + {$:#.org.Org_ICP} diff --git a/Song.Site/Templates/Web/Neimeng/Training.htm b/Song.Site/Templates/Web/Neimeng/Training.htm deleted file mode 100644 index 82e2f77b8..000000000 --- a/Song.Site/Templates/Web/Neimeng/Training.htm +++ /dev/null @@ -1,195 +0,0 @@ - - - - 试题练习 - {$:#.org.org_platformname} - - - - - - - - -
-
- 试题范围选择
- -
-
-
- 已经选条件:
-
-
-
-
- - -
-
课程:
- -
-
- -
-
章节:
- -
-
-
-
- 题型:
-
- - - -
-
-
-
- 难度:
-
- - - -
-
-
-
- 题量:
-
- - - - -
(未购买,最多练习10道)
-
-
-
-
-
- -
-
-
- 试题练习 -
-
- {$index}/{$sumCount} - 正确 0 - 正确率 0 % -
-
- -
-
参考答案
-
试题解析
-
学习资料
-
-
-
<< 上一题
-
下一题 >>
-
-
-
- -
- -
学员登录后才可以学习(学员必须通)!
-
- - -
请选择要练习的课程!
-
- - -
- - - - -
-
- - -
{$qindex}、[{$:#.typeName}题] {$:#.q.qus_title}
- -
- - - - - -
󰃆{$:tax}、{$:ans.Ans_Context}
-
-
- - - - - -
{$:tax}、{$:ans.Ans_Context}
-
-
- - - - -
A、 正确
-
B、 错误
- -
A、 正确
-
B、 错误
-
-
- -
-
回答:
- -
-
- - - - - -
{$:tax}、 - -
-
-
-
-
-
-
- - -
当前选择范围没有供学习的试题!
- 请选择其它的选项。
- -
- -
-
- - - diff --git a/Song.Site/Templates/Web/NetSchool/Inc/Footer.html b/Song.Site/Templates/Web/NetSchool/Inc/Footer.html index 70ac75650..3b743dc67 100644 --- a/Song.Site/Templates/Web/NetSchool/Inc/Footer.html +++ b/Song.Site/Templates/Web/NetSchool/Inc/Footer.html @@ -9,7 +9,7 @@
{$:#.org.Org_Name}   Tel:{$:#.org.Org_Phone}
Copyright © {$:#.org.Org_AbbrEnName} All rights reserved   - {$:#.org.Org_ICP} + {$:#.org.Org_ICP} diff --git a/Song.Site/Templates/Web/NetSchool/Styles/Article.css b/Song.Site/Templates/Web/NetSchool/Styles/Article.css index 72ec2daef..b8c134aeb 100644 --- a/Song.Site/Templates/Web/NetSchool/Styles/Article.css +++ b/Song.Site/Templates/Web/NetSchool/Styles/Article.css @@ -29,7 +29,7 @@ } #artArea #artBox { margin-top: 20px; - min-height: 400px; + min-height: 1000px; padding: 50px; width: 850px; float: left; @@ -139,6 +139,7 @@ border-top-style: solid; border-top-color: #CCCCCC; padding-top: 20px; + width:952px; } .artNavi *, .artNavi a{ font-size: 15px; @@ -160,7 +161,6 @@ float: left; height: 160px; width: 220px; - margin-left: 25px; margin-bottom: 50px; } .cour-img{ diff --git a/Song.Site/Templates/Web/School/Inc/Footer.html b/Song.Site/Templates/Web/School/Inc/Footer.html index 33efb2fe2..bd4a8be2d 100644 --- a/Song.Site/Templates/Web/School/Inc/Footer.html +++ b/Song.Site/Templates/Web/School/Inc/Footer.html @@ -19,7 +19,7 @@
Tel:{$:#.org.Org_Phone}
Copyright © {$:#.org.Org_AbbrEnName} All rights reserved
-
{$:#.org.Org_ICP}
+
{$:#.org.Org_ICP}
diff --git a/Song.Site/Templates/Web/School/Training.htm b/Song.Site/Templates/Web/School/Training.htm deleted file mode 100644 index d14c1414a..000000000 --- a/Song.Site/Templates/Web/School/Training.htm +++ /dev/null @@ -1,196 +0,0 @@ - - - - 试题练习 - {$:#.org.org_platformname} - - - - - - - - - -
-
- 试题范围选择
- -
-
-
- 已经选条件:
-
-
-
-
- - -
-
课程:
- -
-
- -
-
章节:
- -
-
-
-
- 题型:
-
- - - -
-
-
-
- 难度:
-
- - - -
-
-
-
- 题量:
-
- - - - -
(未购买,最多练习10道)
-
-
-
-
-
- -
-
-
- 试题练习 -
-
- {$index}/{$sumCount} 正确 - 0 正确率 0 % -
-
- -
-
参考答案
-
试题解析
-
学习资料
-
-
-
<< 上一题
-
下一题 >>
-
-
-
- -
- -
学员登录后才可以学习(学员必须通)!
-
- - -
请选择要练习的课程!
-
- - - - - - - -
-
- - -
{$qindex}、[{$:#.typeName}题] {$:#.q.qus_title}
- -
- - - - - -
󰃆{$:tax}、{$:ans.Ans_Context}
-
-
- - - - - -
{$:tax}、{$:ans.Ans_Context}
-
-
- - - - -
A、 正确
-
B、 错误
- -
A、 正确
-
B、 错误
-
-
- -
-
回答:
- -
-
- - - - - -
{$:tax}、 - -
-
-
-
-
-
-
- - -
当前选择范围没有供学习的试题!
- 请选择其它的选项。
- -
-
-
-
- - - diff --git a/Song.Site/Templates/Web/_Public/Help/API.htm b/Song.Site/Templates/Web/_Public/Help/API.htm index 81b3970bd..7a5789740 100644 --- a/Song.Site/Templates/Web/_Public/Help/API.htm +++ b/Song.Site/Templates/Web/_Public/Help/API.htm @@ -33,11 +33,14 @@
- 特性: - [{{item.Name}} - (Ignore={{item.Ignore}})] + 特性: + [{{item.Name}} + + (Ignore={{item.Ignore}}) + + (Expires={{item.Expires}})] - + {{method.ClassName +'.'+method.Name}}{{parameter}} 摘要:{{method.Intro}} diff --git a/Song.Site/Templates/Web/_Public/Help/Styles/API.css b/Song.Site/Templates/Web/_Public/Help/Styles/API.css index 9eab5466f..465a862d9 100644 --- a/Song.Site/Templates/Web/_Public/Help/Styles/API.css +++ b/Song.Site/Templates/Web/_Public/Help/Styles/API.css @@ -184,7 +184,11 @@ context { font-size: 16px; line-height: 30px; } - +.method attr i +{ + font-style:normal; + font-size: 11px; +} .method name { font-weight: bold; font-size: 30px; diff --git a/Song.Site/Templates/Web/_Public/Inc/Footer.html b/Song.Site/Templates/Web/_Public/Inc/Footer.html index 05d2064e5..96637a344 100644 --- a/Song.Site/Templates/Web/_Public/Inc/Footer.html +++ b/Song.Site/Templates/Web/_Public/Inc/Footer.html @@ -3,7 +3,7 @@
{$:#.org.Org_Name}   Tel:{$:#.org.Org_Phone}
Copyright © {$:#.org.Org_AbbrEnName} All rights reserved   - {$:#.org.Org_ICP} + {$:#.org.Org_ICP} diff --git a/Song.Site/Templates/Web/_Public/Scripts/CourseStudy.js b/Song.Site/Templates/Web/_Public/Scripts/CourseStudy.js index edb7566ab..12822b222 100644 --- a/Song.Site/Templates/Web/_Public/Scripts/CourseStudy.js +++ b/Song.Site/Templates/Web/_Public/Scripts/CourseStudy.js @@ -118,12 +118,12 @@ var vdata = new Vue({ confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' - }).then(() => { + }).then(function() { vdata.videoSeek(vdata.state.PlayTime / 1000); window.setTimeout(function() { if (vdata.playready()) vdata.player.play(); }, 500); - }).catch(() => { + }).catch(function() { }); } @@ -445,7 +445,7 @@ var vdata = new Vue({ } }); //定时刷新(加载)咨询留言 - window.setInterval('vdata.msgGet()', 1000 * 10); + window.setInterval('vdata.msgGet()', 1000 * 20); }, mounted: function() { //视频上面的漂浮信息(学员姓名和电话),防录屏 diff --git a/Song.Site/db.config b/Song.Site/db.config index 8d22fbb67..6151e641f 100644 --- a/Song.Site/db.config +++ b/Song.Site/db.config @@ -7,7 +7,7 @@ - diff --git a/Song.Site/license.txt b/Song.Site/license.txt index 88ebbb109..fbdaa9946 100644 --- a/Song.Site/license.txt +++ b/Song.Site/license.txt @@ -1,15 +1,15 @@ 软件名称:学习平台 软件版本:1.0 版本等级:至尊版 -授权对象:192.168.0.101:80 +授权对象:192.168.0.104:80 授权类型:IP -起始时间:2020年01月30日 -结束时间:3020年01月30日 +起始时间:2020年03月16日 +结束时间:3020年03月16日 ================WEISHAKEJI_LICENSE================ -00600096005401010067007800580092012500860075008901 -20003200990059006301090067011000900065009500600110 -01100110007400780117005400760098007001040096010501 -07012401030125010600640090007201190108006201270121 -00860060009700650120010400730125008900990057006201 -2701270103 +00600118008500910069012501170120006100590118006800 +61005801080054005900610070006801010088007800610074 +00990089012001030122007100860118012600870127012101 +06011700760092005500880077007200950057012500860058 +00570071009100750058005500550060009201210099011700 +5701200076 diff --git a/Song.Template/Tags/ListTag/Teacher.cs b/Song.Template/Tags/ListTag/Teacher.cs index 4508a7179..6716023b5 100644 --- a/Song.Template/Tags/ListTag/Teacher.cs +++ b/Song.Template/Tags/ListTag/Teacher.cs @@ -33,10 +33,10 @@ public override void DataBind() Business.Do().TeacherSave(t); } } - if (!string.IsNullOrWhiteSpace(t.Th_Photo)) - { + if (!string.IsNullOrWhiteSpace(t.Th_Photo)) t.Th_Photo = Upload.Get["Teacher"].Virtual + t.Th_Photo; - } + //是否显示电话 + } tag.DataSourse = teachers; } diff --git a/Song.ViewData/Attri/CacheAttribute.cs b/Song.ViewData/Attri/CacheAttribute.cs new file mode 100644 index 000000000..8f8b370f0 --- /dev/null +++ b/Song.ViewData/Attri/CacheAttribute.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Reflection; +using System.Web; + +namespace Song.ViewData.Attri +{ + /// + /// 方法是否支持缓存 + /// + [AttributeUsage(AttributeTargets.Method)] + public class CacheAttribute : WeishaAttr + { + private int _expires = 10; + /// + /// 失效时间 + /// + public int Expires + { + get { return _expires; } + set + { + _expires = value; + } + } + /// + /// 获取缓存 + /// + /// + /// + /// + public static object GetResult(MethodInfo method, Letter letter) + { + string cacheName = string.Format("ViewData_{0}_[{1}]", method.Name, letter.ToString()); + return HttpRuntime.Cache.Get(cacheName); + } + /// + /// + /// + /// + /// + /// + /// + public static void Insert(int expires, MethodInfo method, Letter letter, object result) + { + //缓存名称 + string cacheName = string.Format("ViewData_{0}_[{1}]", method.Name, letter.ToString()); + //过期时间 + DateTime expTime = DateTime.Now.AddMinutes(expires); + HttpRuntime.Cache.Insert(cacheName, result, null, expTime, TimeSpan.Zero); + } + } +} diff --git a/Song.ViewData/ExecuteMethod.cs b/Song.ViewData/ExecuteMethod.cs index 2cc7b4c96..0517d4bc9 100644 --- a/Song.ViewData/ExecuteMethod.cs +++ b/Song.ViewData/ExecuteMethod.cs @@ -98,7 +98,24 @@ public static object Exec(Letter letter) //4.构建执行该方法所需要的参数 object[] parameters = getInvokeParam(method, letter); //5.执行方法,返回结果 - object objResult = method.Invoke(execObj, parameters); + object objResult = null; //结果 + //只有get方式时,才使用缓存 + CacheAttribute cache = null; + if (letter.HTTP_METHOD == "GET") + cache = CacheAttribute.GetAttr(method); + if (cache != null) + { + objResult = CacheAttribute.GetResult(method, letter); + if (objResult == null) + { + objResult = method.Invoke(execObj, parameters); + CacheAttribute.Insert(cache.Expires, method, letter, objResult); + } + } + else + { + objResult = method.Invoke(execObj, parameters); + } //将执行结果写入日志 LoginAttribute.LogWrite(loginattr, objResult); return objResult; diff --git a/Song.ViewData/Methods/Course.cs b/Song.ViewData/Methods/Course.cs index c79abb848..4bc6d68c7 100644 --- a/Song.ViewData/Methods/Course.cs +++ b/Song.ViewData/Methods/Course.cs @@ -23,6 +23,7 @@ public class Course : IViewAPI ///

/// /// + [Cache(Expires = 60)] public Song.Entities.Course ForID(int id) { Song.Entities.Course cur = Business.Do().CourseSingle(id); diff --git a/Song.ViewData/Methods/Helper.cs b/Song.ViewData/Methods/Helper.cs index 62919a79d..30a29343b 100644 --- a/Song.ViewData/Methods/Helper.cs +++ b/Song.ViewData/Methods/Helper.cs @@ -259,8 +259,8 @@ public static string GetParaString(MethodInfo method) public class Helper_API_Method_Attr { public string Name { get; set; } //特性名称 - public bool Ignore { get; set; } - + public bool Ignore { get; set; } + public int Expires { get; set; } //缓存的过期时效 public static Helper_API_Method_Attr[] GetAttrs(MethodInfo method) { //所有特性 @@ -297,21 +297,23 @@ public static Helper_API_Method_Attr[] GetAttrs(MethodInfo method) } } } - //ignore为true的全部移除 + //ignore为true的全部移除,不输出 for (int i = 0; i < list.Count; i++) { - if (list[i].Ignore) list.RemoveAt(i); + WeishaAttr attr = list[i] as WeishaAttr; + if (attr == null) continue; + if (attr.Ignore) list.RemoveAt(i); } - //去除Attribute + //去除"Attribute"字样 Helper_API_Method_Attr[] arr = new Helper_API_Method_Attr[list.Count]; for (int i = 0; i < arr.Length; i++) { arr[i] = new Helper_API_Method_Attr(); arr[i].Name = list[i].GetType().Name.Replace("Attribute", ""); - if (list[i] is WeishaAttr) - { + if (list[i] is WeishaAttr) arr[i].Ignore = ((WeishaAttr)list[i]).Ignore; - } + if (list[i] is CacheAttribute) + arr[i].Expires = ((CacheAttribute)list[i]).Expires; } return arr; } diff --git a/Song.ViewData/Methods/Outline.cs b/Song.ViewData/Methods/Outline.cs index bf69c9c2c..bf80e1afe 100644 --- a/Song.ViewData/Methods/Outline.cs +++ b/Song.ViewData/Methods/Outline.cs @@ -29,6 +29,7 @@ public class Outline : IViewAPI /// /// [HttpGet] + [Cache(Expires = 20)] public Song.Entities.Outline ForID(int id) { return Business.Do().OutlineSingle(id); @@ -40,6 +41,7 @@ public Song.Entities.Outline ForID(int id) /// 上级id /// [HttpGet(Ignore = true)] + [Cache(Expires = 20)] public Song.Entities.Outline[] List(int couid, int pid) { return Business.Do().OutlineCount(couid, pid, true, 0); @@ -51,16 +53,14 @@ public Song.Entities.Outline[] List(int couid, int pid) /// 所属课程的id /// [HttpGet,HttpPost] + [Cache(Expires=20)] public DataTable Tree(int couid) { - // 当前课程的所有章节 + // 当前课程的所有章节 Song.Entities.Outline[] outlines = Business.Do().OutlineAll(couid, true); if (outlines.Length > 0) { - foreach (Song.Entities.Outline ol in outlines) - { - ol.Ol_Intro = string.Empty; - } + foreach (Song.Entities.Outline ol in outlines) ol.Ol_Intro = string.Empty; //树形章节输出 DataTable dt = Business.Do().OutlineTree(outlines); return dt; @@ -72,6 +72,7 @@ public DataTable Tree(int couid) /// /// 章节的uid /// + [Cache(Expires = 20)] public List Accessory(string uid) { //先判断是否购买课程 @@ -94,7 +95,7 @@ public DataTable Tree(int couid) ac.As_FileName = Upload.Get["Course"].Virtual + ac.As_FileName; return access; } - + [Cache(Expires = 20)] public OutlineEvent[] VideoEvents(int olid) { OutlineEvent[] events = Business.Do().EventAll(-1, olid, -1, true); diff --git a/Song.ViewData/ResultCache.cs b/Song.ViewData/ResultCache.cs new file mode 100644 index 000000000..304f21949 --- /dev/null +++ b/Song.ViewData/ResultCache.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace Song.ViewData +{ + /// + /// API接口的返回结果的缓存 + /// 当参数名称一样,参数值一样时,采用缓存值 + /// + public class ResultCache + { + } +} diff --git a/Song.ViewData/Song.ViewData.csproj b/Song.ViewData/Song.ViewData.csproj index 597cb6ace..85ca5f9d1 100644 --- a/Song.ViewData/Song.ViewData.csproj +++ b/Song.ViewData/Song.ViewData.csproj @@ -64,6 +64,7 @@ + @@ -114,6 +115,7 @@ +