313392073 5 vuotta sitten
vanhempi
commit
ce259c3b1f
3 muutettua tiedostoa jossa 179 lisäystä ja 88 poistoa
  1. 29 1
      css/common.css
  2. 38 1
      js/common.js
  3. 112 86
      page/user/articles.html

+ 29 - 1
css/common.css

@@ -152,6 +152,12 @@ a {
 .layui-side-scroll .layui-nav .layui-nav-item dd a{
     padding: 0 20px 0 48px!important;
 }
+.layui-side-scroll .layui-nav-tree .layui-nav-child a.active:before{
+    background-color: #ffffff;
+}
+.layui-side-scroll .layui-nav .layui-nav-item dd a.active{
+    color: #ffffff!important;
+}
 .layui-layout-admin .layui-sideact{
     width: 70px;
     overflow-x: initial;
@@ -234,4 +240,26 @@ a {
 .layui-table-cell{
     line-height: 29px;
     height: 29px;
-}
+}
+
+.ball{
+    display: inline-block;
+    width: 20px;;
+    height: 20px;
+    line-height: 20px;
+    border-radius: 50%;
+    background-color: #f66f6c;
+    color: #ffffff;
+    margin-right: 5px;
+    font-size: 12px;
+    text-align: center;
+  }
+  .bball{
+    background-color: #7cc8fa;
+  }
+  .redball{
+    background-color: #eb110d;
+  }
+  .blueball{
+    background-color: #0877c0;
+  }

+ 38 - 1
js/common.js

@@ -18,7 +18,28 @@ $(document).ready(function () {
             $(".layui-body").addClass('layui-bodyact')
         }
     })
+
+    var urlStr = GetUrlRelativePath()
+    $(".layui-nav-tree .layui-nav-item .layui-nav-child a").each(function(index,item) {
+        if($(item).attr('href') == urlStr) {
+            $(item).addClass('active')
+            $(item).closest('.layui-nav-item').addClass('layui-nav-itemed')
+        }
+    })
 })
+
+//获取相对路径
+function GetUrlRelativePath() {
+  var url = document.location.toString();
+  var arrUrl = url.split("//");
+  var start = arrUrl[1].indexOf("/");
+  var relUrl = arrUrl[1].substring(start);
+  if (relUrl.indexOf("?") != -1) {
+     relUrl = relUrl.split("?")[0];
+  }
+  return relUrl;
+}
+
 // 时间标准格式的转换
 function isZero(m){
   return m<10?'0'+m:m
@@ -155,4 +176,20 @@ layui.use('form', function () {
       })
       return false;
   });
-});
+});
+
+//中奖号码变红
+function getRepeat(arr1, arr2) {
+    if(arr1 && arr1.length>0 && arr2 && arr2.length>0) {
+        for (let i = 0; i < arr2.length; i++) {
+            arr2[i] = arr2[i].indexOf('+')>-1?arr2[i].replace('+',''):arr2[i]
+            for (let j = 0; j < arr1.length; j++) {
+                arr1[j] = arr1[j].indexOf('+')>-1?arr1[j].replace('+',''):arr1[j]
+                if(arr1[j] === arr2[i]){
+                    arr1[j] = ':'+(arr1[j].indexOf('+')>-1?arr1[j].replace('+',''):arr1[j])
+                }
+            }
+        }
+    }
+    return arr1;
+}

+ 112 - 86
page/user/articles.html

@@ -401,14 +401,17 @@
                 }
                 
                 var cols1 = [[
-                    { title: 'ID', align: 'center', type: 'numbers' },
-                    { field: 'qi', title: '期数' },
-                    { field: 'opentime', title: '开奖时间' },
-                    { field: 'iskj', title: '是否开奖',templet: function (res) {
+                    { title: 'ID', align: 'center', type: 'numbers',fixed:true },
+                    { field: 'qi', title: '期数',fixed:true },
+                    { field: 'opentime', title: '开奖时间',fixed:true,width:150,templet: function (res) {
+                            return formatDate(res.opentime)
+                        }
+                    },
+                    { field: 'iskj', title: '是否开奖',fixed:true,templet: function (res) {
                             return res['iskj']?'已开奖':'未开奖';
                         } 
                     },
-                    { field: 'opencode', title: '开奖号码',width:200,templet: function (res) {
+                    { field: 'opencode', title: '开奖号码',fixed:true,width:95,templet: function (res) {
                             var str = ''
                             if(res.opencode) {
                                 if(res.opencode.indexOf('+')>-1) { //开奖号有篮球
@@ -480,6 +483,25 @@
                             return str
                         }
                     },
+                    {
+                        field: 'type', title: '文章类型', templet: function (res) {
+                            var str = '';
+                            switch (res['type']) {
+                                case 1:
+                                    str = '免费文章';
+                                    break;
+                                case 2:
+                                    str = '购买文章'
+                                    break;
+                                case 3:
+                                    str = '保障贴'
+                                    break;
+                            }
+                            return str
+                        }
+                    },
+                    { field: 'zux', title: '组选' },
+                    { field: 'zx', title: '直选' },
                     { field: 'title', title: '标题' },
                     { field: 'authorname', title: '作者名称' },
                     { field: 'dm1', title: '独胆' },
@@ -496,31 +518,12 @@
                     { field: 'sk3', title: '杀三跨' },
                     { field: 'fs5m', title: '五码复试' },
                     { field: 'fs6m', title: '六码复试' },
-                    { field: 'zux', title: '组选' },
-                    { field: 'zx', title: '直选' },
                     { field: 'dmmoney', title: '胆码金额' },
                     { field: 'smmoney', title: '杀码金额' },
                     { field: 'swmoney', title: '杀尾金额' },
                     { field: 'skmoney', title: '杀跨金额' },
                     { field: 'fsmoney', title: '复试金额' },
                     { field: 'dzmoney', title: '单注金额' },
-                    {
-                        field: 'type', title: '文章类型', templet: function (res) {
-                            var str = '';
-                            switch (res['type']) {
-                                case 1:
-                                    str = '免费文章';
-                                    break;
-                                case 2:
-                                    str = '购买文章'
-                                    break;
-                                case 3:
-                                    str = '保障贴'
-                                    break;
-                            }
-                            return str
-                        }
-                    },
                     { field: 'istj', title: '单注金额',templet: function (res) {
                             var str = '';
                             if(res.istj) {
@@ -533,14 +536,17 @@
                     }
                 ]]
                 var cols2 = [[
-                    { title: 'ID', align: 'center', type: 'numbers' },
-                    { field: 'qi', title: '期数' },
-                    { field: 'opentime', title: '开奖时间' },
-                    { field: 'iskj', title: '是否开奖',templet: function (res) {
+                    { title: 'ID', align: 'center', type: 'numbers',fixed:true },
+                    { field: 'qi', title: '期数',fixed:true },
+                    { field: 'opentime', title: '开奖时间',fixed:true,width:150,templet: function (res) {
+                            return formatDate(res.opentime)
+                        }
+                    },
+                    { field: 'iskj', title: '是否开奖',fixed:true,templet: function (res) {
                             return res['iskj']?'已开奖':'未开奖';
                         } 
                     },
-                    { field: 'opencode', title: '开奖号码',width:200,templet: function (res) {
+                    { field: 'opencode', title: '开奖号码',fixed:true,width:95,templet: function (res) {
                             var str = ''
                             if(res.opencode) {
                                 if(res.opencode.indexOf('+')>-1) { //开奖号有篮球
@@ -612,6 +618,24 @@
                             return str
                         }
                     },
+                    {field: 'type', title: '文章类型', templet: function (res) {
+                            var str = '';
+                            switch (res['type']) {
+                                case 1:
+                                    str = '免费文章';
+                                    break;
+                                case 2:
+                                    str = '购买文章'
+                                    break;
+                                case 3:
+                                    str = '保障贴'
+                                    break;
+                            }
+                            return str
+                        }
+                    },
+                    { field: 'zux', title: '组选' },
+                    { field: 'zx', title: '直选' },
                     { field: 'title', title: '标题' },
                     { field: 'authorname', title: '作者名称' },
                     { field: 'dm1', title: '独胆' },
@@ -628,31 +652,12 @@
                     { field: 'sk3', title: '杀三跨' },
                     { field: 'fs5m', title: '五码复试' },
                     { field: 'fs6m', title: '六码复试' },
-                    { field: 'zux', title: '组选' },
-                    { field: 'zx', title: '直选' },
                     { field: 'dmmoney', title: '胆码金额' },
                     { field: 'smmoney', title: '杀码金额' },
                     { field: 'swmoney', title: '杀尾金额' },
                     { field: 'skmoney', title: '杀跨金额' },
                     { field: 'fsmoney', title: '复试金额' },
                     { field: 'dzmoney', title: '单注金额' },
-                    {
-                        field: 'type', title: '文章类型', templet: function (res) {
-                            var str = '';
-                            switch (res['type']) {
-                                case 1:
-                                    str = '免费文章';
-                                    break;
-                                case 2:
-                                    str = '购买文章'
-                                    break;
-                                case 3:
-                                    str = '保障贴'
-                                    break;
-                            }
-                            return str
-                        }
-                    },
                     { field: 'istj', title: '单注金额',templet: function (res) {
                             var str = '';
                             if(res.istj) {
@@ -666,14 +671,17 @@
                 ]]
 
                 var cols3 = [[
-                    { title: 'ID', align: 'center', type: 'numbers' },
-                    { field: 'qi', title: '期数' },
-                    { field: 'opentime', title: '开奖时间' },
-                    { field: 'iskj', title: '是否开奖',templet: function (res) {
+                    { title: 'ID', align: 'center', type: 'numbers',fixed:true },
+                    { field: 'qi', title: '期数',fixed:true },
+                    { field: 'opentime', title: '开奖时间',fixed:true,width:150,templet: function (res) {
+                            return formatDate(res.opentime)
+                        }
+                    },
+                    { field: 'iskj', title: '是否开奖',fixed:true,templet: function (res) {
                             return res['iskj']?'已开奖':'未开奖';
                         } 
                     },
-                    { field: 'opencode', title: '开奖号码',width:200,templet: function (res) {
+                    { field: 'opencode', title: '开奖号码',fixed:true,width:180,templet: function (res) {
                             var str = ''
                             if(res.opencode) {
                                 if(res.opencode.indexOf('+')>-1) { //开奖号有篮球
@@ -745,6 +753,22 @@
                             return str
                         }
                     },
+                    {field: 'type', title: '文章类型', templet: function (res) {
+                            var str = '';
+                            switch (res['type']) {
+                                case 1:
+                                    str = '免费文章';
+                                    break;
+                                case 2:
+                                    str = '购买文章'
+                                    break;
+                                case 3:
+                                    str = '保障贴'
+                                    break;
+                            }
+                            return str
+                        }
+                    },
                     { field: 'title', title: '标题' },
                     { field: 'authorname', title: '作者名称' },
                     { field: 'sm2_r', title: '红球杀二' },
@@ -761,23 +785,6 @@
                     { field: 'dmmoney_r', title: '红球定胆金额' },
                     { field: 'smmoney_b', title: '蓝球杀码金额' },
                     { field: 'dmmoney_b', title: '蓝球定胆金额' },
-                    {
-                        field: 'type', title: '文章类型', templet: function (res) {
-                            var str = '';
-                            switch (res['type']) {
-                                case 1:
-                                    str = '免费文章';
-                                    break;
-                                case 2:
-                                    str = '购买文章'
-                                    break;
-                                case 3:
-                                    str = '保障贴'
-                                    break;
-                            }
-                            return str
-                        }
-                    },
                     { field: 'istj', title: '单注金额',templet: function (res) {
                             var str = '';
                             if(res.istj) {
@@ -791,14 +798,17 @@
                 ]]
 
                 var cols4 = [[
-                    { title: 'ID', align: 'center', type: 'numbers' },
-                    { field: 'qi', title: '期数' },
-                    { field: 'opentime', title: '开奖时间' },
-                    { field: 'iskj', title: '是否开奖',templet: function (res) {
+                { title: 'ID', align: 'center', type: 'numbers',fixed:true },
+                    { field: 'qi', title: '期数',fixed:true },
+                    { field: 'opentime', title: '开奖时间',fixed:true,width:150,templet: function (res) {
+                            return formatDate(res.opentime)
+                        }
+                    },
+                    { field: 'iskj', title: '是否开奖',fixed:true,templet: function (res) {
                             return res['iskj']?'已开奖':'未开奖';
                         } 
                     },
-                    { field: 'opencode', title: '开奖号码',width:200,templet: function (res) {
+                    { field: 'opencode', title: '开奖号码',fixed:true,width:180,templet: function (res) {
                             var str = ''
                             if(res.opencode) {
                                 if(res.opencode.indexOf('+')>-1) { //开奖号有篮球
@@ -870,6 +880,22 @@
                             return str
                         }
                     },
+                    {field: 'type', title: '文章类型', templet: function (res) {
+                            var str = '';
+                            switch (res['type']) {
+                                case 1:
+                                    str = '免费文章';
+                                    break;
+                                case 2:
+                                    str = '购买文章'
+                                    break;
+                                case 3:
+                                    str = '保障贴'
+                                    break;
+                            }
+                            return str
+                        }
+                    },
                     { field: 'title', title: '标题' },
                     { field: 'authorname', title: '作者名称'},
                     { field: 'sm3_r', title: '前区杀三' },
@@ -931,7 +957,7 @@
                             articlename: '哈哈哈哈哈',
                             authorname:'老李',
                             money:'100',
-                            qi: '20200426',
+                            qi: '2020034',
                             type_cz: 1, //彩种类型
                             type:1, //打赏类型
                             type_article:1, //文章类型
@@ -940,7 +966,7 @@
                             iskj:true,
                             opencode:'02,08,15',
                             zjcode:'08,03',
-                            opentime: '每天下午6.30',
+                            opentime: '2020-05-09T14:53:01',
                         },
                         {
                             id: 2,
@@ -948,7 +974,7 @@
                             articlename: '哈哈哈哈哈',
                             authorname:'老李01',
                             money:'500',
-                            qi: '20200425',
+                            qi: '2020035',
                             type_cz:2, //彩种类型
                             type:3, //打赏类型
                             type_article:2, //文章类型
@@ -957,7 +983,7 @@
                             iskj:true,
                             opencode:'07,19,20,31,34+05,08',
                             zjcode:'+03,05',
-                            opentime: '每天下午6.30',
+                            opentime: '2020-05-09T14:53:01',
                         },
                         {
                             id: 3,
@@ -965,7 +991,7 @@
                             articlename: '哈哈哈哈哈sssss',
                             authorname:'老李03',
                             money:'300',
-                            qi: '20200424',
+                            qi: '2020036',
                             type_cz:3, //彩种类型
                             type:2, //打赏类型
                             type_article:3, //文章类型
@@ -974,7 +1000,7 @@
                             iskj:true,
                             opencode:'02,08,15,16,26,32+03',
                             zjcode:'01,08,32+04',
-                            opentime: '每天下午6.30',
+                            opentime: '2020-05-09T14:53:01',
                         },
                         {
                             id: 4,
@@ -982,7 +1008,7 @@
                             articlename: '哈哈哈哈哈',
                             authorname:'老李04',
                             money:'400',
-                            qi: '20200423',
+                            qi: '2020034',
                             type_cz:4, //彩种类型
                             type:2, //打赏类型
                             type_article:3, //文章类型
@@ -991,7 +1017,7 @@
                             iskj:true,
                             opencode:'02,08,15,16,26,32+03',
                             zjcode:'',
-                            opentime: '每天下午6.30',
+                            opentime: '2020-05-09T14:53:01',
                         },
                         {
                             id: 5,
@@ -999,7 +1025,7 @@
                             articlename: '哈哈哈哈哈',
                             authorname:'老李01',
                             money:'500',
-                            qi: '20200425',
+                            qi: '2020036',
                             type_cz:2, //彩种类型
                             type:3, //打赏类型
                             type_article:2, //文章类型
@@ -1008,11 +1034,11 @@
                             iskj:true,
                             opencode:'07,19,20,31,34+05,08',
                             zjcode:'34+05,08',
-                            opentime: '每天下午6.30',
+                            opentime: '2020-05-09T14:53:01',
                         },
                     ],
                     title: '彩种文章列表',
-                    cellMinWidth: 80,
+                    cellMinWidth: 60,
                     cols: params,
                     page: true,
                     id: 'searchReload',