|
@@ -170,6 +170,11 @@ function Table(x, y, z) {
|
|
|
_y[k].style.display = "none";
|
|
|
_y[k].classList.remove("active");
|
|
|
}
|
|
|
+ if(_index !== '2'){
|
|
|
+ $('.page_activitiesPage').css({display:'none'})
|
|
|
+ }else{
|
|
|
+ $('.page_activitiesPage').css({display:'block'})
|
|
|
+ }
|
|
|
if (_index == 4) {
|
|
|
timeClick = setInterval(function() {
|
|
|
$("#right").click();
|
|
@@ -1864,4 +1869,84 @@ $(function() {
|
|
|
$(".secondary-menu>div>ul>li").eq(index).click()
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ function activitiesPage1() {
|
|
|
+ $.ajax({
|
|
|
+ url: api + "/open/activity/list",
|
|
|
+ data:{
|
|
|
+ pageNo: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ },
|
|
|
+ type: "GET",
|
|
|
+ dataType: "json",
|
|
|
+ success: function(data) {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ } else {
|
|
|
+ if (data.data.list.length) {
|
|
|
+ window.sessionStorage.setItem("total", data.data.totalCount);
|
|
|
+ activitiesPage();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ function activitiesPage() {
|
|
|
+ var obj_2 = {
|
|
|
+ obj_box: ".page_activitiesPage",
|
|
|
+ total_item: +window.sessionStorage.getItem("total"), //总共数据
|
|
|
+ per_num: 5, //每页显示数据
|
|
|
+ current_page: 1, //当前页
|
|
|
+ change_content: function(per_num, current_page) {
|
|
|
+ per_num = per_num ? per_num : 10;
|
|
|
+ current_page = current_page ? current_page : 1;
|
|
|
+ $.ajax({
|
|
|
+ url: api + "/open/activity/list",
|
|
|
+ data:{
|
|
|
+ pageNo: current_page,
|
|
|
+ pageSize: per_num,
|
|
|
+ },
|
|
|
+ type: "GET",
|
|
|
+ dataType: "json",
|
|
|
+ success: function(data) {
|
|
|
+ if (data.error && data.error.length) {
|
|
|
+ alert("数据加载失败,请刷新页面");
|
|
|
+ } else {
|
|
|
+ var html = "";
|
|
|
+ if (data.data.list.length) {
|
|
|
+ let activeArrowSrc = $(".activeArrow").attr('src');
|
|
|
+ let clientStyle = document.body.clientWidth < 989 ? '' : 'display:flex;align-items: center;';
|
|
|
+ for (var i = 0; i < data.data.list.length; i++) {
|
|
|
+ var activitiesList = data.data.list[i];
|
|
|
+ var content = activitiesList.content.replace(/<.*?>/gi, "");
|
|
|
+ html +=
|
|
|
+ "<div style='padding-bottom: 30px'><div style="+clientStyle+"><span style='display:flex;align-items:center;white-space:nowrap;min-width: 297px;'><div style='font-size: 30px;color: #070707;font-weight: bolder;'>"+activitiesList.title+"</div>"+
|
|
|
+ "<img style='padding-left:20px;width: 60px;height: auto;' src="+activeArrowSrc+"></span>"+
|
|
|
+ "<div style='font-size:16px; color: #666;'>"+
|
|
|
+ content+
|
|
|
+ "</div>"+
|
|
|
+ "</div>"+
|
|
|
+ "<img style='padding-top:5px;padding-bottom:21px;width:100%;height:auto;' src="
|
|
|
+ + avatarUploadHost + activitiesList.pictureUrl +
|
|
|
+ "></div>"
|
|
|
+ }
|
|
|
+ window.sessionStorage.setItem("total", data.data.totalCount);
|
|
|
+ } else {
|
|
|
+ html =
|
|
|
+ "<h4 style='text-align:center;margin-top:90px;color:#666' >暂无团队活动</h4>";
|
|
|
+ $(".page_ctrl").css({
|
|
|
+ display: "none"
|
|
|
+ });
|
|
|
+ }
|
|
|
+ $(".group-activities").html(html);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ };
|
|
|
+ //调用分页
|
|
|
+ page_ctrl(obj_2);
|
|
|
+ }
|
|
|
+ activitiesPage1();
|
|
|
});
|