Browse Source

pref: 修改首页计数器文案和样式

wangcz 6 years ago
parent
commit
bab63178df

+ 0 - 1
jpress-web-template-mallcms/src/main/webapp/templates/mallcms/assets/css/index.css

@@ -2426,7 +2426,6 @@ a.x_gray_text.x_more{
     color:#3E85F6;
     color:#3E85F6;
     text-align: center;
     text-align: center;
     margin-bottom:32px;
     margin-bottom:32px;
-    padding-left:10px;
 }
 }
 #statistic .count-list .items .title{
 #statistic .count-list .items .title{
     line-height: 40px;
     line-height: 40px;

+ 9 - 7
jpress-web-template-mallcms/src/main/webapp/templates/mallcms/assets/js/index.js

@@ -214,7 +214,9 @@ $(function () {
         return (count + unit)
         return (count + unit)
     }
     }
 
 
-    var userspaceCount, userCount, lastYearTraderCount, thisYearTraderCount;
+    var userspaceCount, userCount, lastYearTraderCount, thisYearTraderCount, yearDate, upYearDate;
+    yearDate = new Date().getFullYear();
+    upYearDate = yearDate - 1;
     // 企业用户数量
     // 企业用户数量
     $.ajax({
     $.ajax({
         type: "GET",
         type: "GET",
@@ -263,16 +265,16 @@ $(function () {
                         lastYearTraderCount = data[m].count;
                         lastYearTraderCount = data[m].count;
                     }
                     }
                 }
                 }
-                $('.last-year-trader-count').html('年' + toFinxedNum(lastYearTraderCount, 3))
-                $('.this-year-trader-count').html('年' + toFinxedNum(thisYearTraderCount, 3))
+                $('.last-year-trader-count').html(upYearDate + '年' + toFinxedNum(lastYearTraderCount, 3))
+                $('.this-year-trader-count').html(yearDate + '年' + toFinxedNum(thisYearTraderCount, 3))
             } else {
             } else {
-                $('.last-year-trader-count').html('年' + toFinxedNum(11728286832.86, 3))
-                $('.this-year-trader-count').html('年' + toFinxedNum(15322057199.72, 3))
+                $('.last-year-trader-count').html(upYearDate + '年' + toFinxedNum(11728286832.86, 3))
+                $('.this-year-trader-count').html(yearDate + '年' + toFinxedNum(15322057199.72, 3))
             }
             }
         },
         },
         error: function() {
         error: function() {
-            $('.last-year-trader-count').html('年' + toFinxedNum(11728286832.86, 3))
-            $('.this-year-trader-count').html('年' + toFinxedNum(15322057199.72, 3))
+            $('.last-year-trader-count').html(upYearDate + '年' + toFinxedNum(11728286832.86, 3))
+            $('.this-year-trader-count').html(yearDate + '年' + toFinxedNum(15322057199.72, 3))
         }
         }
     })
     })
     // 首页计数器END
     // 首页计数器END