From 0b8dfcdc899dfa9bf1f000dee1ed609ea515334b Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Sun, 17 Nov 2019 17:03:01 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=90=8E=E5=8F=B0?= =?UTF-8?q?=E6=97=B6=E6=97=B6=E5=AE=9E=E6=97=B6=E6=B3=A8=E5=86=8C=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Event/UserEvent.class.php | 123 +++++++++++--------- 1 file changed, 69 insertions(+), 54 deletions(-) diff --git a/Application/Admin/Event/UserEvent.class.php b/Application/Admin/Event/UserEvent.class.php index 5c039f262..e9c7c06de 100644 --- a/Application/Admin/Event/UserEvent.class.php +++ b/Application/Admin/Event/UserEvent.class.php @@ -3,10 +3,10 @@ namespace Admin\Event; use Think\Controller; /** * 后台事件控制器 - * @author 王贺 + * @author 王贺 */ class UserEvent extends BaseEvent { - + public function lists($model=null,$p=1,$extends_map=array()){ parent::custom_list($model,$p,$extends_map); } @@ -31,7 +31,7 @@ class UserEvent extends BaseEvent { } } - if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;} + if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;} //读取模型数据列表 $name = $model['m_name']; @@ -56,22 +56,22 @@ class UserEvent extends BaseEvent { ->group('tab_user.id') ->where($map) ->select(); - $count=count($count); - //分页 - - $page = set_pagination($count,$row); - if($page) {$this->assign('_page', $page);} - + $count=count($count); + //分页 + + $page = set_pagination($count,$row); + if($page) {$this->assign('_page', $page);} + $this->assign('model', $model); $this->assign('list_data', $data); $this->assign('count', $count); $this->meta_title = $model['title'].'列表'; - + $this->display($model['template_list']); } - public function user_join_($model = null, $p = 0){ + public function user_join_($model = null, $p = 0){ $model || $this->error('模型名标识必须!'); $page = intval($p); $page = $page ? $page : 1; //默认显示第一页数据 @@ -80,8 +80,8 @@ class UserEvent extends BaseEvent { // 关键字搜索 - if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;} - + if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;} + // $row = 1; //读取模型数据列表 $name = $model['m_name']; @@ -114,27 +114,27 @@ class UserEvent extends BaseEvent { /* 数据分页 */ /* 执行查询 */ ->count(); - if($model['ranking']==1){ + if($model['ranking']==1){ $i=($page-1)*$row; foreach ($data as $key => $value) { - $ss[++$i]=$value; + $ss[++$i]=$value; } - $this->assign('list_data', $ss); - }else{ - $this->assign('list_data', $data); - } - //分页 - - $page = set_pagination($count,$row); - if($page) {$this->assign('_page', $page);} - + $this->assign('list_data', $ss); + }else{ + $this->assign('list_data', $data); + } + //分页 + + $page = set_pagination($count,$row); + if($page) {$this->assign('_page', $page);} + $this->assign('model', $model); $this->meta_title = $model['title'].'列表'; $this->display($model['template_list']); } - public function user_join_v1($model = null, $p = 0){ + public function user_join_v1($model = null, $p = 0){ $model || $this->error('模型名标识必须!'); $page = intval($p); $page = $page ? $page : 1; //默认显示第一页数据 @@ -156,8 +156,8 @@ class UserEvent extends BaseEvent { } } - - if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;} + + if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 50;} //读取模型数据列表 $name = $model['m_name']; @@ -175,12 +175,27 @@ class UserEvent extends BaseEvent { ->page($page, $row) /* 执行查询 */ ->select(); - $count=count($data); - //分页 - - $page = set_pagination($count,$row); - if($page) {$this->assign('_page', $page);} - + + $count = M($name,"tab_") + ->field($model['fields']) + ->join($model['join']) + ->join($model['joins']) + ->join($model['joinss']) + // 查询条件 + ->where($model['map']) + /* 默认通过id逆序排列 */ + ->order($model['order']) + ->group($model['group']) + /* 数据分页 */ + /* 执行查询 */ + ->count(); + + //$count=count($data); + //分页 + + $page = set_pagination($count,$row); + if($page) {$this->assign('_page', $page);} + if($_REQUEST['data_order']!=''){ $data_order=reset(explode(',',$_REQUEST['data_order'])); $data_order_type=end(explode(',',$_REQUEST['data_order'])); @@ -188,10 +203,10 @@ class UserEvent extends BaseEvent { $this->assign('userarpu_order_type',$data_order_type); } $data=my_sort($data,$data_order_type,(int)$data_order); - $size=$row;//每页显示的记录数 - $pnum = ceil(count($data) / $size); //总页数,ceil()函数用于求大于数字的最小整数 + //$size=$row;//每页显示的记录数 + //$pnum = ceil(count($data) / $size); //总页数,ceil()函数用于求大于数字的最小整数 //用array_slice(array,offset,length) 函数在数组中根据条件取出一段值;array(数组),offset(元素的开始位置),length(组的长度) - $data = array_slice($data, ($arraypage-1)*$size, $size); + //$data = array_slice($data, ($arraypage-1)*$size, $size); $this->assign('model', $model); $this->assign('list_data', $data); $this->meta_title = $model['title'].'列表'; @@ -220,8 +235,8 @@ class UserEvent extends BaseEvent { } } - - if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;} + + if(isset($_REQUEST['row'])) {$row = $_REQUEST['row'];}else{$row = 10;} //读取模型数据列表 $name = $model['m_name']; @@ -239,12 +254,12 @@ class UserEvent extends BaseEvent { ->page($page, $row) /* 执行查询 */ ->select(); - $count=count($data); - //分页 - - $page = set_pagination($count,$row); - if($page) {$this->assign('_page', $page);} - + $count=count($data); + //分页 + + $page = set_pagination($count,$row); + if($page) {$this->assign('_page', $page);} + if($_REQUEST['data_order']!=''){ $data_order=reset(explode(',',$_REQUEST['data_order'])); $data_order_type=end(explode(',',$_REQUEST['data_order'])); @@ -266,19 +281,19 @@ class UserEvent extends BaseEvent { /** - *获取用户实体 - *@param int $id - *@return array - *@author 小纯洁 - */ + *获取用户实体 + *@param int $id + *@return array + *@author 小纯洁 + */ public function user_entity($id=0){ - $user = M("user","tab_"); - $map['id'] = $id; - $data = $user->where($map)->find(); + $user = M("user","tab_"); + $map['id'] = $id; + $data = $user->where($map)->find(); if(is_numeric($data['head_img'])){ $data['head_img'] = get_cover($data['head_img'],'path'); } - return $data; + return $data; } - + } From 00858df9fbdc5712e33da86c379519b5ffe9f438 Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Mon, 18 Nov 2019 16:41:43 +0800 Subject: [PATCH 2/2] =?UTF-8?q?PC=E5=AE=98=E7=BD=91=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../View/default/Article/article/detail1.html | 148 +++++++++--------- .../Media/View/default/Public/base.html | 2 +- Public/Media/css/heard.css | 1 + Public/Media/css/supervise.css | 5 +- 4 files changed, 78 insertions(+), 78 deletions(-) diff --git a/Application/Media/View/default/Article/article/detail1.html b/Application/Media/View/default/Article/article/detail1.html index f1a0c5caf..f51533fd8 100644 --- a/Application/Media/View/default/Article/article/detail1.html +++ b/Application/Media/View/default/Article/article/detail1.html @@ -63,13 +63,12 @@
- -
+
-
  • 监护工程概述
  • +
  • 监护工程概述
  • 申请服务流程
  • 监护工程概述
  • 健康提示
  • @@ -253,83 +252,82 @@
    抵制不良网页游戏,拒绝盗版游戏。注意自我保护,谨防受骗上当。适度游戏益脑,沉迷游戏伤身。合理安排时间,享受健康生活。适龄提示:适合12周岁以上使用。
    - - - + + + - - + + \ No newline at end of file diff --git a/Application/Media/View/default/Public/base.html b/Application/Media/View/default/Public/base.html index 92ea68b11..aa74b0327 100644 --- a/Application/Media/View/default/Public/base.html +++ b/Application/Media/View/default/Public/base.html @@ -90,7 +90,7 @@ - + diff --git a/Public/Media/css/heard.css b/Public/Media/css/heard.css index 74f6e5aab..1a2df43ae 100644 --- a/Public/Media/css/heard.css +++ b/Public/Media/css/heard.css @@ -19,6 +19,7 @@ } .heard_tabbar ul{ display: flex; + align-items: center; font-size: 0.24rem; color: #5B5B5B; margin-top: 0.54rem; diff --git a/Public/Media/css/supervise.css b/Public/Media/css/supervise.css index 8655ec593..0b5c91ade 100644 --- a/Public/Media/css/supervise.css +++ b/Public/Media/css/supervise.css @@ -2,6 +2,7 @@ width: 100%; height: 8rem; position: relative; + z-index: -1; } .service_swiper>img:first-child{ width: 100%; @@ -9,7 +10,7 @@ position: relative; z-index: -1; } -.service_swiper>a{ +.back_to_index{ position: absolute; width: 1.20rem; height: 0.4rem; @@ -18,7 +19,7 @@ font-size: 0.2rem; cursor: pointer; } -.service_swiper> a img{ +.back_to_index img{ width: 100%; height: 100%; }