|
|
@@ -214,7 +214,42 @@ $(function () {
|
|
|
return (count + unit)
|
|
|
}
|
|
|
|
|
|
- var countHtml = ''
|
|
|
+ var countHtml = '', userspaceCount, userCount, lastYearTraderCount, thisYearTraderCount;
|
|
|
+ // 企业用户数量
|
|
|
+ $.ajax({
|
|
|
+ type: "GET",
|
|
|
+ url: "https://sso.ubtob.com/api/userspace/count",
|
|
|
+ dataType: "json",
|
|
|
+ success: function (data) {
|
|
|
+ if(data.count) {
|
|
|
+ userspaceCount = data.count
|
|
|
+ } else {
|
|
|
+ userspaceCount = 10458;
|
|
|
+ }
|
|
|
+ $('.userspace-count').html(toFinxedNum(data.count, 1))
|
|
|
+ },
|
|
|
+ error: function () {
|
|
|
+ $('.userspace-count').html(toFinxedNum(10458, 1))
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // 个人用户数量
|
|
|
+ $.ajax({
|
|
|
+ type: "GET",
|
|
|
+ url: "https://sso.ubtob.com/api/user/count",
|
|
|
+ dataType: "json",
|
|
|
+ success: function (data) {
|
|
|
+ if(data.count) {
|
|
|
+ userCount = data.count
|
|
|
+ } else {
|
|
|
+ userCount = 41697;
|
|
|
+ }
|
|
|
+ $('.user-count').html(toFinxedNum(userCount, 2))
|
|
|
+ },
|
|
|
+ error: function () {
|
|
|
+ $('.user-count').html(toFinxedNum(41697, 2))
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
url: "https://mall.usoftchina.com/api/product/commoncount?usedFor=usoftchina_home_counter&_status=actived",
|
|
|
@@ -222,41 +257,24 @@ $(function () {
|
|
|
success: function(data) {
|
|
|
if(data) {
|
|
|
for(var m = 0; m < data.length; m++) {
|
|
|
- if(data[m].detno == 1) {
|
|
|
- countHtml += '<div class="items"><p class="title">企业用户</p><span class="count-item">' + toFinxedNum(data[m].count, 1) + '</span></div>';
|
|
|
- } else if(data[m].detno == 2) {
|
|
|
- countHtml += '<div class="items"><p class="title">个人用户</p><span class="count-item">' + toFinxedNum(data[m].count, 2) + '</span></div>';
|
|
|
- } else if(data[m].detno == 3) {
|
|
|
- countHtml += '<div class="items"><p class="title two_item">交易金额</p><span class="count-item">本年' + toFinxedNum(data[m].count, 3) + '</span><br/>';
|
|
|
+ if(data[m].detno == 3) {
|
|
|
+ thisYearTraderCount = data[m].count;
|
|
|
} else if(data[m].detno == 4) {
|
|
|
- countHtml += '<span class="count-item">上年' + toFinxedNum(data[m].count, 3) + '</span></div>';
|
|
|
- } else if(data[m].detno == 5) {
|
|
|
- countHtml += '<div class="items"><p class="title two_item">研发需求</p><span class="count-item">本年' + toFinxedNum(data[m].count, 4) + '</span><br/>';
|
|
|
- } else if(data[m].detno == 6) {
|
|
|
- countHtml += '<span class="count-item">上年' + toFinxedNum(data[m].count, 4) + '</span></div>';
|
|
|
+ lastYearTraderCount = data[m].count;
|
|
|
}
|
|
|
}
|
|
|
+ $('.last-year-trader-count').html('上年' + toFinxedNum(lastYearTraderCount, 3))
|
|
|
+ $('.this-year-trader-count').html('本年' + toFinxedNum(thisYearTraderCount, 3))
|
|
|
} else {
|
|
|
- countHtml += '<div class="items"><p class="title">企业用户</p><span class="count-item">' + toFinxedNum(10428, 1) + '</span></div>';
|
|
|
- countHtml += '<div class="items"><p class="title">个人用户</p><span class="count-item">' + toFinxedNum(41282, 2) + '</span></div>';
|
|
|
- countHtml += '<div class="items"><p class="title two_item">交易金额</p><span class="count-item">本年' + toFinxedNum(15283268864.27, 3) + '</span><br/>';
|
|
|
- countHtml += '<span class="count-item">上年' + toFinxedNum(11728286832.86, 3) + '</span></div>';
|
|
|
- countHtml += '<div class="items"><p class="title two_item">研发需求</p><span class="count-item">本年' + toFinxedNum(383, 4) + '</span><br/>';
|
|
|
- countHtml += '<span class="count-item">上年' + toFinxedNum(1, 4) + '</span></div>';
|
|
|
+ $('.last-year-trader-count').html('上年' + toFinxedNum(11728286832.86, 3))
|
|
|
+ $('.this-year-trader-count').html('本年' + toFinxedNum(15322057199.72, 3))
|
|
|
}
|
|
|
- $('#statistic .count-list').html(countHtml)
|
|
|
},
|
|
|
error: function() {
|
|
|
- countHtml += '<div class="items"><p class="title">企业用户</p><span class="count-item">' + toFinxedNum(10428, 1) + '</span></div>';
|
|
|
- countHtml += '<div class="items"><p class="title">个人用户</p><span class="count-item">' + toFinxedNum(41282, 2) + '</span></div>';
|
|
|
- countHtml += '<div class="items"><p class="title two_item">交易金额</p><span class="count-item">本年' + toFinxedNum(15283268864.27, 3) + '</span><br/>';
|
|
|
- countHtml += '<span class="count-item">上年' + toFinxedNum(11728286832.86, 3) + '</span></div>';
|
|
|
- countHtml += '<div class="items"><p class="title two_item">研发需求</p><span class="count-item">本年' + toFinxedNum(383, 4) + '</span><br/>';
|
|
|
- countHtml += '<span class="count-item">上年' + toFinxedNum(1, 4) + '</span></div>';
|
|
|
- $('#statistic .count-list').html(countHtml)
|
|
|
+ $('.last-year-trader-count').html('上年' + toFinxedNum(11728286832.86, 3))
|
|
|
+ $('.this-year-trader-count').html('本年' + toFinxedNum(15322057199.72, 3))
|
|
|
}
|
|
|
})
|
|
|
-
|
|
|
// 首页计数器END
|
|
|
|
|
|
|