Procházet zdrojové kódy

Merge branch '2018zt' of http://svn.ouj.com:3000/FED/dwweb-pc into 2018zt

fenggang před 6 roky
rodič
revize
444dfda585

+ 4 - 5
2018专题/LOL赛事竞猜专题通用/src/_match1809.html

@@ -23,7 +23,7 @@
         data-acid => 竞猜活动ID
         data-boundlist => 是否请求获奖名单接口展示获奖名单
     -->
-    <div class="page-index" data-boundlist="" data-acid="5">
+    <div class="page-index" data-boundlist="true" data-acid="26">
         <div class="pub-main">
             <!-- 头部 -->
             <div class="page-top">
@@ -42,7 +42,7 @@
                     </div>
                 </div>
             </div>
-            <div class="page-title" id="targetRank">
+            <div class="page-title" id="targetStake">
                 <span class="red">竞猜</span><span class="blue">押注</span>
             </div>
             <!-- 押注 -->
@@ -209,9 +209,8 @@
                 <div class="page-title">
                     <span class="red">获奖</span><span class="blue">名单</span>
                 </div>
-                <div class="bonus-wrap clearfix">
-                    <div class="waiting-tips">马上公布</div>
-                </div>
+                <div class="topbar"></div>
+                <div class="bonus-wrap clearfix" id="subReward"></div>
             </div>
         </div>
      </div>

+ 20 - 1
2018专题/LOL赛事竞猜专题通用/src/modules/page/match1809.js

@@ -5,6 +5,7 @@ var userInfoTpl = __inline("/src/tpl/userInfo.tmpl"); //用户信息
 
 var rankTableTpl = __inline("/src/tpl/ranktable.tmpl"); //用户排名
 var bonusTpl = __inline("/src/tpl/bonus.tmpl"); //获奖名单
+var bonusTableTpl = __inline("/src/tpl/bonustable.tmpl"); //获奖名单table
 
 var UserInfo = {}; //用户信息
 var MatchList = []; //比赛信息
@@ -171,7 +172,8 @@ var V = {
 
         if(boundShow) {
             $('#targetReward').show()
-            M.getBonusList();
+            // M.getBonusList();
+            M.getBonusTable();
         }
     },
     screenInit: function() {
@@ -239,6 +241,11 @@ var V = {
     renderBonusList: function(obj) {
         var dom = bonusTpl({data: obj});
         $('#bonus-table').append(dom);
+    },
+    // 获奖名单table
+    renderBonusTable: function(obj) {
+        var dom = bonusTableTpl({data: obj});
+        $('#subReward').append(dom);
     }
 }
 
@@ -408,6 +415,18 @@ var M = {
             error: function() {
             }
         });
+    },
+    //获奖名单
+    getBonusTable: function(){
+        var limit = $('#subReward').attr('data-limit') ? $('#subReward').attr('data-limit') : 15
+        $.ajax({
+            dataType: 'jsonp',
+            url: API+'/encour/publicRewards?ac_id='+AC_ID+'&limit='+limit,
+            success: function(data){
+                V.renderBonusTable(data.list);
+                console.log(data);
+            }
+        });
     }
 }
 

+ 3 - 4
2018专题/LOL赛事竞猜专题通用/src/sass/match1809.scss

@@ -188,9 +188,8 @@ body{
         }
     }
 }
-
 // 排行榜
-.rank-wrap{
+.rank-wrap,.bonus-wrap{
     background-color: #36353b;
     padding: 34px 30px;
     overflow: hidden;
@@ -564,8 +563,8 @@ body{
 
 // 获奖名单
 .bonus-wrap{
-    background-color: #1d1d1d;
-    padding: 30px;
+    // background-color: #1d1d1d;
+    // padding: 30px;
     .level-box{
         float: left;
         width: 33.33%;

+ 27 - 0
2018专题/LOL赛事竞猜专题通用/src/tpl/bonustable.tmpl

@@ -0,0 +1,27 @@
+<div>
+    <table class="reward-table">
+        <thead>
+            <tr>
+                <td>ID</td>
+                <td>奖品名称</td>
+                <td>获奖日期</td>
+            </tr>
+        </thead>
+        <tbody>
+            <% if(data.length > 0) {%>
+            <% for(var i = 0; i < data.length; i++) {%>
+            <tr>
+                <td><%=data[i]["nickname"]%></td>
+                <td><%=data[i]["goods_name"]%></td>
+                <td><%=data[i]["score"]%></td>
+            </tr>
+            <%}%>
+            <%}else{%>
+            <tr>
+                <td colspan="3">暂无记录</td>
+            </tr>
+            <%}%>
+        </tbody>
+    </table>
+</div>
+<!-- <div class="rank-show-more">查看更多</div> -->