From 666646943502ddf5ca21e0a02e877e2619de2d20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AD=89=E9=A3=8E=E6=9D=A5?= <136327134@qq.com> Date: Mon, 15 Oct 2018 15:39:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=93=8D=E4=BD=9C=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E5=AE=9A=E4=BD=8D=E4=BD=8D=E7=BD=AE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/view/store/store_product/index.php | 13 +++++----- .../admin/view/ump/store_bargain/index.php | 25 +++++++++++++------ .../view/ump/store_combination/index.php | 25 +++++++++++++------ .../admin/view/ump/store_seckill/index.php | 25 +++++++++++++------ extend/service/PHPExcelService.php | 2 -- 5 files changed, 57 insertions(+), 33 deletions(-) diff --git a/application/admin/view/store/store_product/index.php b/application/admin/view/store/store_product/index.php index 230d38b5..52c4a79f 100644 --- a/application/admin/view/store/store_product/index.php +++ b/application/admin/view/store/store_product/index.php @@ -222,27 +222,26 @@ var oEvent = arguments.callee.caller.arguments[0] || event; oEvent.stopPropagation(); var offset = $(that).offset(); + var top=offset.top-$(window).scrollTop(); var index = $(that).parents('tr').data('index'); $('.layui-nav-child').each(function (key) { if (key != index) { $(this).hide(); } }) - if($(document).height() < offset.top+$(that).next('ul').height()){ + if($(document).height() < top+$(that).next('ul').height()){ $(that).next('ul').css({ 'padding': 10, - 'top': offset.top-$(that).next('ul').height()-30, + 'top': - ($(that).parent('td').height() / 2 + $(that).height() + $(that).next('ul').height()/2), 'min-width': 'inherit', - 'left': offset.left - $(that).width() / 2, - 'position': 'fixed' + 'position': 'absolute' }).toggle(); }else{ $(that).next('ul').css({ 'padding': 10, - 'top': offset.top + 30, + 'top':$(that).parent('td').height() / 2 + $(that).height(), 'min-width': 'inherit', - 'left': offset.left - $(that).width() / 2, - 'position': 'fixed' + 'position': 'absolute' }).toggle(); } } diff --git a/application/admin/view/ump/store_bargain/index.php b/application/admin/view/ump/store_bargain/index.php index ed815ccc..66d5b675 100644 --- a/application/admin/view/ump/store_bargain/index.php +++ b/application/admin/view/ump/store_bargain/index.php @@ -198,23 +198,32 @@ $(document).click(function (e) { $('.layui-nav-child').hide(); }) - function dropdown(that) { + function dropdown(that){ var oEvent = arguments.callee.caller.arguments[0] || event; oEvent.stopPropagation(); var offset = $(that).offset(); + var top=offset.top-$(window).scrollTop(); var index = $(that).parents('tr').data('index'); $('.layui-nav-child').each(function (key) { if (key != index) { $(this).hide(); } }) - $(that).next('ul').css({ - 'padding': 10, - 'top': offset.top + 30, - 'min-width': 'inherit', - 'left': offset.left - $(that).width() / 2, - 'position': 'fixed' - }).toggle(); + if($(document).height() < top+$(that).next('ul').height()){ + $(that).next('ul').css({ + 'padding': 10, + 'top': - ($(that).parent('td').height() / 2 + $(that).height() + $(that).next('ul').height()/2), + 'min-width': 'inherit', + 'position': 'absolute' + }).toggle(); + }else{ + $(that).next('ul').css({ + 'padding': 10, + 'top':$(that).parent('td').height() / 2 + $(that).height(), + 'min-width': 'inherit', + 'position': 'absolute' + }).toggle(); + } } {/block} diff --git a/application/admin/view/ump/store_combination/index.php b/application/admin/view/ump/store_combination/index.php index d8cd37e9..ba6bba8c 100644 --- a/application/admin/view/ump/store_combination/index.php +++ b/application/admin/view/ump/store_combination/index.php @@ -214,23 +214,32 @@ $(document).click(function (e) { $('.layui-nav-child').hide(); }) - function dropdown(that) { + function dropdown(that){ var oEvent = arguments.callee.caller.arguments[0] || event; oEvent.stopPropagation(); var offset = $(that).offset(); + var top=offset.top-$(window).scrollTop(); var index = $(that).parents('tr').data('index'); $('.layui-nav-child').each(function (key) { if (key != index) { $(this).hide(); } }) - $(that).next('ul').css({ - 'padding': 10, - 'top': offset.top + 30, - 'min-width': 'inherit', - 'left': offset.left - $(that).width() / 2, - 'position': 'fixed' - }).toggle(); + if($(document).height() < top+$(that).next('ul').height()){ + $(that).next('ul').css({ + 'padding': 10, + 'top': - ($(that).parent('td').height() / 2 + $(that).height() + $(that).next('ul').height()/2), + 'min-width': 'inherit', + 'position': 'absolute' + }).toggle(); + }else{ + $(that).next('ul').css({ + 'padding': 10, + 'top':$(that).parent('td').height() / 2 + $(that).height(), + 'min-width': 'inherit', + 'position': 'absolute' + }).toggle(); + } } $('.js-group-btn').on('click',function(){ $('.js-group-btn').css({zIndex:1}); diff --git a/application/admin/view/ump/store_seckill/index.php b/application/admin/view/ump/store_seckill/index.php index cfebdc0f..c8f1bea9 100644 --- a/application/admin/view/ump/store_seckill/index.php +++ b/application/admin/view/ump/store_seckill/index.php @@ -139,23 +139,32 @@ $(document).click(function (e) { $('.layui-nav-child').hide(); }) - function dropdown(that) { + function dropdown(that){ var oEvent = arguments.callee.caller.arguments[0] || event; oEvent.stopPropagation(); var offset = $(that).offset(); + var top=offset.top-$(window).scrollTop(); var index = $(that).parents('tr').data('index'); $('.layui-nav-child').each(function (key) { if (key != index) { $(this).hide(); } }) - $(that).next('ul').css({ - 'padding': 10, - 'top': offset.top + 30, - 'min-width': 'inherit', - 'left': offset.left - $(that).width() / 2, - 'position': 'fixed' - }).toggle(); + if($(document).height() < top+$(that).next('ul').height()){ + $(that).next('ul').css({ + 'padding': 10, + 'top': - ($(that).parent('td').height() / 2 + $(that).height() + $(that).next('ul').height()/2), + 'min-width': 'inherit', + 'position': 'absolute' + }).toggle(); + }else{ + $(that).next('ul').css({ + 'padding': 10, + 'top':$(that).parent('td').height() / 2 + $(that).height(), + 'min-width': 'inherit', + 'position': 'absolute' + }).toggle(); + } } layList.search('search',function(where){ layList.reload(where); diff --git a/extend/service/PHPExcelService.php b/extend/service/PHPExcelService.php index a52368ec..c16bde80 100644 --- a/extend/service/PHPExcelService.php +++ b/extend/service/PHPExcelService.php @@ -87,7 +87,6 @@ class PHPExcelService */ public function setExcelContent($list=null) { - self::$PHPExcel = new \PHPExcel(); $sheet=self::$PHPExcel->getActiveSheet(); foreach(self::$data as $key=>$val){ $row=self::$cellKey[$key]; @@ -178,7 +177,6 @@ class PHPExcelService self::$title=$title; if(empty($Name)) $Name=time(); //设置Excel属性 - self::$PHPExcel = new \PHPExcel(); self::$PHPExcel ->getProperties() ->setCreator("Neo") ->setLastModifiedBy("Neo")