From f0dcaf98fc641bb4d784f1a225658a5f5e14f49a Mon Sep 17 00:00:00 2001 From: taoser Date: Wed, 3 Nov 2021 17:23:20 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=8F=91=E5=B8=96=E9=87=8D=E5=A4=8D=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=EF=BC=8C2.=E5=8D=87=E7=BA=A7=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E5=A4=9A=E4=BD=99=E6=96=87=E4=BB=B6=EF=BC=8C3.=E5=90=8E?= =?UTF-8?q?=E5=8F=B0=E9=A6=96=E9=A1=B5=E7=89=88=E6=9C=AC=E5=BC=82=E6=AD=A5?= =?UTF-8?q?=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 +- app/admin/controller/AuthRule.php | 2 +- app/admin/controller/Index.php | 32 +- app/admin/controller/Upgrade.php | 30 +- app/admin/view/index/home.html | 10 +- config/taoler.php | 2 +- public/json/signin.js | 1 - view/taoler/index/article/add.html | 2 + view/taoler/index/article/ask/detail.html | 1 + view/taoler/index/article/detail.html | 1 + view/taoler/index/article/posts/detail.html | 1 + view/taoler/index/article/posts/detail.html- | 315 ------------------- 12 files changed, 61 insertions(+), 340 deletions(-) delete mode 100644 public/json/signin.js delete mode 100644 view/taoler/index/article/posts/detail.html- diff --git a/README.md b/README.md index eb1df3f..85524ea 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ * 后台:http://adm.aieok.com:888 * 账号:test * 密码:test123 - * 版本:TaoLer 1.8.10 - * 日期:2021.11.2 + * 版本:TaoLer 1.8.11 + * 日期:2021.11.3 #### 项目地址 diff --git a/app/admin/controller/AuthRule.php b/app/admin/controller/AuthRule.php index 169a277..c3c0ffd 100644 --- a/app/admin/controller/AuthRule.php +++ b/app/admin/controller/AuthRule.php @@ -43,7 +43,7 @@ class AuthRule extends AdminController /* 支持获取三级菜单 */ - $result = $this->getMenus(); + $result = $this->getMenus(1); $count = count($result); $tree = []; diff --git a/app/admin/controller/Index.php b/app/admin/controller/Index.php index a6bc42c..aee74a5 100644 --- a/app/admin/controller/Index.php +++ b/app/admin/controller/Index.php @@ -58,22 +58,13 @@ class Index extends AdminController public function home() { - //版本检测 - $verCheck = Api::urlPost($this->sys['upcheck_url'],['pn'=>$this->pn,'ver'=>$this->sys_version]); - if($verCheck->code !== -1){ - $versions = $verCheck->code ? "有{$verCheck->up_num}个版本需更新,当前可更新至{$verCheck->version}" : $verCheck->msg; - View::assign('versions',$versions); - }else{ - View::assign('versions','版本检测暂时不可服务'); - } - - //评论、帖子状态 + // 评论、帖子状态 $comm = Db::name('comment')->field('id')->where(['delete_time'=>0,'status'=>0])->select(); $forum = Db::name('article')->field('id')->where(['delete_time'=>0,'status'=>0])->select(); $comms = count($comm); $forums = count($forum); - //用户注册数据 + // 用户注册数据 $monthTime = Cache::get('monthTime'); if(!$monthTime){ $time = Db::name('user')->where('delete_time',0)->whereMonth('create_time')->order('create_time','asc')->column('create_time'); @@ -101,6 +92,18 @@ class Index extends AdminController return View::fetch(); } + //版本检测 + public function getVersion(){ + + $verCheck = Api::urlPost($this->sys['upcheck_url'],['pn'=>$this->pn,'ver'=>$this->sys_version]); + if($verCheck->code !== -1){ + $versions = $verCheck->code ? "有{$verCheck->up_num}个版本需更新,当前可更新至{$verCheck->version}" : $verCheck->msg; + return $versions; + } else { + return lang('No new messages'); + } + } + //本周发帖 public function forums() { @@ -132,7 +135,7 @@ class Index extends AdminController //本周评论 public function replys() { - if(Request::isAjax()) { + if(Request::isAjax()){ $replys = Db::name('comment') ->alias('a') @@ -155,7 +158,7 @@ class Index extends AdminController $res = ['code'=>-1,'msg'=>'本周还没评论']; } return json($res); - } + } } //动态信息 @@ -245,8 +248,7 @@ class Index extends AdminController - public function layout(){ - + public function layout(){ return view(); } } \ No newline at end of file diff --git a/app/admin/controller/Upgrade.php b/app/admin/controller/Upgrade.php index 43b6a2b..4062327 100644 --- a/app/admin/controller/Upgrade.php +++ b/app/admin/controller/Upgrade.php @@ -82,7 +82,7 @@ class Upgrade extends AdminController if(empty($data['key'])){ return json(['code'=>-1,'msg'=>'请正确填写申请到的key']); } - $res = Db::name('system')->update(['key'=>$data['key'],'upcheck_url'=>$data['upcheck_url'],'upgrade_url'=>$data['upgrade_url'],'id'=>1]); + $res = Db::name('system')->cache('system')->update(['key'=>$data['key'],'upcheck_url'=>$data['upcheck_url'],'upgrade_url'=>$data['upgrade_url'],'id'=>1]); if($res){ $res = ['code'=>0,'msg'=>'修改成功']; } else { @@ -187,6 +187,30 @@ class Upgrade extends AdminController return json(['code'=>-1,'msg'=>$upDate['msg']]); } + //清除 + Files::delDirAndFile($this->upload_dir); + Files::delDirAndFile($this->backup_dir); + + //清除无用目录和文件 + $delFiles = '../runtime/remove.txt'; + if(file_exists($delFiles)){ + $str = file_get_contents($delFiles); //将整个文件内容读入到一个字符串中 + $str = str_replace("\r\n",",",$str); + $delArr = explode(',',$str); + foreach($delArr as $v){ + if(is_dir($v)){ + //删除文件夹 + Files::delDirAndFile($v.'/'); + } else { + //删除文件 + if(file_exists($v)){ + unlink($v); + } + } + } + unlink($delFiles); + } + //清理缓存 $this->clearSysCache(); @@ -267,9 +291,7 @@ class Upgrade extends AdminController } Log::channel('update')->info('update:{type} {progress} {msg}',['type'=>'success','progress'=>'70%','msg'=>'升级文件执行成功!']); - //清除 - Files::delDirAndFile($this->upload_dir); - Files::delDirAndFile($this->backup_dir); + } //升级sql操作 diff --git a/app/admin/view/index/home.html b/app/admin/view/index/home.html index c82d457..33609b5 100644 --- a/app/admin/view/index/home.html +++ b/app/admin/view/index/home.html @@ -7,7 +7,7 @@
-
{$versions}
+
@@ -430,6 +430,14 @@ }); } }); + + //加载版本检测 + (function(){ + $.get("{:url('Index/getVersion')}",function(data){ + $('#up_version').html(data); + }) + + })(); $('.layui-btn.layuiadmin-btn-oiltank').on('click', function(){ diff --git a/config/taoler.php b/config/taoler.php index 51d81de..5911823 100644 --- a/config/taoler.php +++ b/config/taoler.php @@ -7,7 +7,7 @@ return [ //应用名,此项不可更改 'appname' => 'TaoLer', //版本配置 - 'version' => '1.8.10', + 'version' => '1.8.11', //加盐 'salt' => 'taoler', //数据库备份目录 diff --git a/public/json/signin.js b/public/json/signin.js deleted file mode 100644 index bd58380..0000000 --- a/public/json/signin.js +++ /dev/null @@ -1 +0,0 @@ -{"status":0,"data":[[{"uid":7635600,"days":8,"time":"2017-11-30T06:26:31.000Z","msec":1512023191068,"token":"4fe3fcffeaf265d66cbb660f5f5494a98ea5cbb1","info":"{\"ip\":\"222.137.16.169\",\"type\":\"\"}","user":{"username":"猜不透的想念","avatar":"//res.layui.com/images/fly/avatar/9.jpg"}},{"uid":7332360,"days":1,"time":"2017-11-30T06:25:26.000Z","msec":1512023125504,"token":"010ae2db1178a5bbfb6624afe5fc2292f21480f3","info":"{\"ip\":\"42.94.6.67\",\"type\":\"\"}","user":{"username":"JasonF","avatar":"//q.qlogo.cn/qqapp/101235792/BDBEF7D3437B5AD803B29FDB5BDC93E9/100"}},{"uid":4419408,"days":1,"time":"2017-11-30T06:25:13.000Z","msec":1512023113068,"token":"2c44f46ad7d74b108facb4a76731942e0654ccb3","info":"{\"ip\":\"110.96.88.211\",\"type\":\"\"}","user":{"username":"旧轩0","avatar":"//q.qlogo.cn/qqapp/101235792/DEE1D7EDC7AE84E1723BB6BE2B7EA03C/100"}},{"uid":8018304,"days":2,"time":"2017-11-30T06:22:43.000Z","msec":1512022963217,"token":"387ac2520e0eab5d0dbdfd70fa92251c7b799659","info":"{\"ip\":\"122.226.183.94\",\"type\":\"\"}","user":{"username":"Web_er","avatar":"//res.layui.com/images/fly/avatar/5.jpg"}},{"uid":7765632,"days":1,"time":"2017-11-30T06:22:43.000Z","msec":1512022963144,"token":"5a7dba0a5dbb1c670184b9d7da28095fcd0d12df","info":"{\"ip\":\"1.83.125.49\",\"type\":\"\"}","user":{"username":"墨程","avatar":"//res.layui.com/images/fly/avatar/11.jpg"}},{"uid":1632624,"days":1,"time":"2017-11-30T06:18:58.000Z","msec":1512022738247,"token":"f1fac688acb32ca8467a20a5bc024ff88b5ebc0d","info":"{\"ip\":\"123.161.192.221\",\"type\":\"\"}","user":{"username":"吊儿","avatar":"http://q.qlogo.cn/qqapp/101235792/0406215CD4BBB9E29C2CA061D85F66F9/100"}},{"uid":6552840,"days":1,"time":"2017-11-30T06:18:10.000Z","msec":1512022689817,"token":"fd1eb04d910e4ce88f36be20345b487728a78fcc","info":"{\"ip\":\"180.169.109.130\",\"type\":\"\"}","user":{"username":"ycyzharry","avatar":"//res.layui.com/images/fly/avatar/2.jpg"}},{"uid":6977376,"days":3,"time":"2017-11-30T06:16:08.000Z","msec":1512022567809,"token":"e7b2920f6093f60f3d79bab563e018be592fae4c","info":"{\"ip\":\"116.22.165.226\",\"type\":\"\"}","user":{"username":"狼孩yannis","avatar":"//q.qlogo.cn/qqapp/101235792/24E1A3A3C1C77C482B4E57644BAB7478/100"}},{"uid":5843040,"days":4,"time":"2017-11-30T06:10:54.000Z","msec":1512022254134,"token":"fde6327c8f97f837c5e32bd509030dcb8d69a33d","info":"{\"ip\":\"218.19.137.215\",\"type\":\"\"}","user":{"username":"wonderfuiiy","avatar":"//q.qlogo.cn/qqapp/101235792/2E9BD2778AA3C1F8D73673FC3FD6D241/100"}},{"uid":4789512,"days":1,"time":"2017-11-30T06:08:11.000Z","msec":1512022091479,"token":"848d33b9cb03230d64576721d487e8931739a490","info":"{\"ip\":\"101.96.134.180\",\"type\":\"\"}","user":{"username":"下划线加点","avatar":"//cdn.layui.com/avatar/4789512.jpg?t=1499677666982"}},{"uid":7948584,"days":1,"time":"2017-11-30T06:07:28.000Z","msec":1512022047832,"token":"84a11da7855941e01b41d2c5eb4194f39b09a7b6","info":"{\"ip\":\"61.185.224.115\",\"type\":\"\"}","user":{"username":"凡人一枚?","avatar":"//q.qlogo.cn/qqapp/101235792/A982418B508045D5AF53966E9DA39B68/100"}},{"uid":6044640,"days":2,"time":"2017-11-30T06:07:08.000Z","msec":1512022027996,"token":"ce99ac3dd37369388cee57107e46b131d001fdde","info":"{\"ip\":\"123.233.117.195\",\"type\":\"\"}","user":{"username":"平常心i","avatar":"//res.layui.com/images/fly/avatar/11.jpg"}},{"uid":8046192,"days":1,"time":"2017-11-30T06:05:47.000Z","msec":1512021947463,"token":"7560400ebadfc1c296031e2be8755ad10e870fa6","info":"{\"ip\":\"171.216.152.226\",\"type\":\"\"}","user":{"username":"黑猫","avatar":"//cdn.layui.com/avatar/8046192.jpg?t=1511972966161"}},{"uid":7187208,"days":6,"time":"2017-11-30T06:03:41.000Z","msec":1512021820608,"token":"8a5b3fde3015d32e8cc83a69235b91eb584a394d","info":"{\"ip\":\"114.224.27.134\",\"type\":\"\"}","user":{"username":"书生29","avatar":"//q.qlogo.cn/qqapp/101235792/32BBCA4626A9F394283EFED537AE761B/100"}},{"uid":6127632,"days":3,"time":"2017-11-30T06:01:08.000Z","msec":1512021667649,"token":"1dacd8f37182556235eab47a76196b6727b85030","info":"{\"ip\":\"113.111.10.122\",\"type\":\"\"}","user":{"username":"Oreki","avatar":"//q.qlogo.cn/qqapp/101235792/9E17530C6505003BFB7A40A523A10C9B/100"}},{"uid":3405696,"days":4,"time":"2017-11-30T05:59:05.000Z","msec":1512021545011,"token":"39df8388517c45bd2fbf3ef9893d3a7b2d65953e","info":"{\"ip\":\"221.226.125.130\",\"type\":\"\"}","user":{"username":"丿咖啡","avatar":"/avatar/3405696.jpg"}},{"uid":8011080,"days":1,"time":"2017-11-30T05:57:18.000Z","msec":1512021438177,"token":"aae408ece771aa06b1e7af281e25181a7a4ea0bd","info":"{\"ip\":\"120.39.60.15\",\"type\":\"\"}","user":{"username":"JohnMaple","avatar":"//q.qlogo.cn/qqapp/101235792/A04D215752C0F5F369BFDF7B416AAAD5/100"}},{"uid":6064968,"days":4,"time":"2017-11-30T05:57:10.000Z","msec":1512021429820,"token":"88153e8caa85ff2ccac5946574890ffea456306e","info":"{\"ip\":\"123.166.22.229\",\"type\":\"\"}","user":{"username":"用个名字真难","avatar":"//q.qlogo.cn/qqapp/101235792/21F0961A7243DC371D026180CDF40095/100"}},{"uid":7320600,"days":1,"time":"2017-11-30T05:56:16.000Z","msec":1512021375735,"token":"af869c12a263e10baf305017a04d36b5292c8160","info":"{\"ip\":\"219.147.26.62\",\"type\":\"\"}","user":{"username":"Reckless","avatar":"//q.qlogo.cn/qqapp/101235792/7D77205095DDD48ABE9F12BCB2D0F345/100"}},{"uid":7590408,"days":1,"time":"2017-11-30T05:55:33.000Z","msec":1512021332871,"token":"5e923e5a37177f4748b1916c20a133d3d3e5dc19","info":"{\"ip\":\"210.76.125.20\",\"type\":\"\"}","user":{"username":"Guardian322","avatar":"//q.qlogo.cn/qqapp/101235792/DFF021DEEBCB73397C671E68EF084CBC/100"}}],[{"uid":1331232,"days":51,"time":"2017-11-29T16:00:01.000Z","msec":1511971200955,"token":"ccc0f2aec60497687068240a683725b5c5330d12","info":"{\"ip\":\"171.216.152.209\",\"type\":\"\"}","user":{"username":"一讯","avatar":"//cdn.layui.com/avatar/1331232.png?t=1504957365294"}},{"uid":3226440,"days":64,"time":"2017-11-29T16:00:05.000Z","msec":1511971204657,"token":"1a4ba7fc38cf53eff01f2a0f47e8fc0da059c111","info":"{\"ip\":\"61.144.119.194\",\"type\":\"\"}","user":{"username":"志远有18CM","avatar":"http://q.qlogo.cn/qqapp/101235792/3C039374444019CF9C93F6AA00D5A66E/100"}},{"uid":2699592,"days":63,"time":"2017-11-29T16:00:05.000Z","msec":1511971205403,"token":"26ea175c9e10166aefa5f488436d62860d36473e","info":"{\"ip\":\"10.72.189.166\",\"type\":\"\"}","user":{"username":"孤独木木","avatar":"http://q.qlogo.cn/qqapp/101235792/636C3988F5102FFE645AA6DAD1523117/100"}},{"uid":2680104,"days":58,"time":"2017-11-29T16:00:08.000Z","msec":1511971207505,"token":"ab9cf9ba7e98a5920b86b5b03fb088edeffb8347","info":"{\"ip\":\"14.204.90.147\",\"type\":\"\"}","user":{"username":"龙焱","avatar":"//cdn.layui.com/avatar/2680104.gif?t=1503590050825"}},{"uid":7374528,"days":32,"time":"2017-11-29T16:00:35.000Z","msec":1511971234542,"token":"3e072e3eb55eb692963802632ef65b1deaccfbd2","info":"{\"ip\":\"223.211.78.208\",\"type\":\"\"}","user":{"username":"从零开始90","avatar":"//q.qlogo.cn/qqapp/101235792/5F5E73CA839B3235ABA6A269028ACFCC/100"}},{"uid":168,"days":64,"time":"2017-11-29T16:00:35.000Z","msec":1511971234679,"token":"1fefd5f5de05cafbaadf86be3bc997c5624cc3b7","info":"{\"ip\":\"106.6.175.105\",\"type\":\"\"}","user":{"username":"贤心","avatar":"//cdn.layui.com/avatar/168.jpg?t=1507143496817"}},{"uid":7399392,"days":26,"time":"2017-11-29T16:00:49.000Z","msec":1511971249412,"token":"71444e8a5043b58d37ab84f881d07d660436528f","info":"{\"ip\":\"121.69.48.132\",\"type\":\"\"}","user":{"username":"冬日温暖","avatar":"//q.qlogo.cn/qqapp/101235792/DA0095E5D41F668D310E9A23AB20E514/100"}},{"uid":2462040,"days":5,"time":"2017-11-29T16:01:33.000Z","msec":1511971292679,"token":"b9ad2f27633e2662f7fd686f8e2c80ea65d0fefe","info":"{\"ip\":\"39.155.134.200\",\"type\":\"\"}","user":{"username":"歌谣i","avatar":"//cdn.layui.com/avatar/2462040.gif?t=1510229835444"}},{"uid":6950160,"days":1,"time":"2017-11-29T16:01:34.000Z","msec":1511971293873,"token":"ffde5a83e3ba98651b6f4bac72217f328b73c566","info":"{\"ip\":\"27.211.156.108\",\"type\":\"\"}","user":{"username":"贝那雷斯","avatar":"//q.qlogo.cn/qqapp/101235792/8DD228ED772F2D774CE42A3269EC8F1A/100"}},{"uid":5484024,"days":18,"time":"2017-11-29T16:01:37.000Z","msec":1511971297435,"token":"a8971701ad5f4999b66be9366dac39bb7d3310c0","info":"{\"ip\":\"59.42.121.88\",\"type\":\"\"}","user":{"username":"奈佑","avatar":"//q.qlogo.cn/qqapp/101235792/ECE9E0AEA4338FB6852972194462BFE6/100"}},{"uid":5393304,"days":64,"time":"2017-11-29T16:02:18.000Z","msec":1511971337867,"token":"fb04c7df4887f318d2d3d4a413ae31b7a2831413","info":"{\"ip\":\"223.73.110.249\",\"type\":\"\"}","user":{"username":"indifferent","avatar":"//cdn.layui.com/avatar/5393304.jpg?t=1503634102116"}},{"uid":7096152,"days":17,"time":"2017-11-29T16:02:28.000Z","msec":1511971347797,"token":"3f8b3b935bbb87f93e631088d082bb8c2a36330c","info":"{\"ip\":\"14.153.124.6\",\"type\":\"\"}","user":{"username":"骑着猪去兜风","avatar":"//q.qlogo.cn/qqapp/101235792/7F319249F9FC6F0BD242F79F91003D2C/100"}},{"uid":1599864,"days":53,"time":"2017-11-29T16:03:17.000Z","msec":1511971397217,"token":"00011506325781ce300a532af4b9aeeab33a1f7e","info":"{\"ip\":\"115.236.91.18\",\"type\":\"\"}","user":{"username":"xinconan","avatar":"http://tva3.sinaimg.cn/crop.0.0.180.180.180/59943e42jw1e8qgp5bmzyj2050050aa8.jpg"}},{"uid":2492616,"days":56,"time":"2017-11-29T16:03:30.000Z","msec":1511971409532,"token":"e7062b575d2c52cf19bc8a6fb4e7be1fbc451c81","info":"{\"ip\":\"58.60.118.158\",\"type\":\"\"}","user":{"username":"chenug","avatar":"http://q.qlogo.cn/qqapp/101235792/197D29B8AE1BCB8013BD300CBE8E1BAD/100"}},{"uid":6021288,"days":19,"time":"2017-11-29T16:03:43.000Z","msec":1511971422673,"token":"19667d09b0fa8539833f1b265bf90a4509000a3e","info":"{\"ip\":\"113.201.48.117\",\"type\":\"\"}","user":{"username":"考拉","avatar":"//res.layui.com/images/fly/avatar/2.jpg"}},{"uid":2300592,"days":4,"time":"2017-11-29T16:04:00.000Z","msec":1511971439799,"token":"07c2901dadb2488b916236f345372906b4d3d405","info":"{\"ip\":\"119.129.118.27\",\"type\":\"\"}","user":{"username":"伟大的脚丫","avatar":"//cdn.layui.com/avatar/2300592.jpg?t=1506492675031"}},{"uid":7325304,"days":6,"time":"2017-11-29T16:05:14.000Z","msec":1511971514001,"token":"a5bb34bee7bae1af608e1ec3899e6281a7534905","info":"{\"ip\":\"123.132.122.210\",\"type\":\"\"}","user":{"username":"superrayman","avatar":"//res.layui.com/images/fly/avatar/0.jpg"}},{"uid":5041176,"days":49,"time":"2017-11-29T16:05:22.000Z","msec":1511971522296,"token":"36e6519a86476b5f958aeea5b32e09a1ba2193a9","info":"{\"ip\":\"121.205.210.196\",\"type\":\"\"}","user":{"username":"烟波垂钓","avatar":"//res.layui.com/images/fly/avatar/4.jpg"}},{"uid":1350384,"days":27,"time":"2017-11-29T16:05:42.000Z","msec":1511971542260,"token":"ba385c77900c98f49a2f59e7d183b01bb37bf5ee","info":"{\"ip\":\"123.10.146.229\",\"type\":\"\"}","user":{"username":"ErrorCode","avatar":"/avatar/1350384.png"}},{"uid":270816,"days":18,"time":"2017-11-29T16:07:30.000Z","msec":1511971649506,"token":"29585fdecec79925adb24b6963935728f2fab3e4","info":"{\"ip\":\"223.104.20.97\",\"type\":\"\"}","user":{"username":"林子夕","avatar":"http://q.qlogo.cn/qqapp/101235792/C62B7AC75D179C95BC8AAC03C3FB21E0/100"}}],[{"uid":3226440,"days":64,"time":"2017-11-29T16:00:05.000Z","msec":1511971204657,"token":"1a4ba7fc38cf53eff01f2a0f47e8fc0da059c111","info":"{\"ip\":\"61.144.119.194\",\"type\":\"\"}","user":{"username":"志远有18CM","avatar":"http://q.qlogo.cn/qqapp/101235792/3C039374444019CF9C93F6AA00D5A66E/100"}},{"uid":168,"days":64,"time":"2017-11-29T16:00:35.000Z","msec":1511971234679,"token":"1fefd5f5de05cafbaadf86be3bc997c5624cc3b7","info":"{\"ip\":\"106.6.175.105\",\"type\":\"\"}","user":{"username":"贤心","avatar":"//cdn.layui.com/avatar/168.jpg?t=1507143496817"}},{"uid":5393304,"days":64,"time":"2017-11-29T16:02:18.000Z","msec":1511971337867,"token":"fb04c7df4887f318d2d3d4a413ae31b7a2831413","info":"{\"ip\":\"223.73.110.249\",\"type\":\"\"}","user":{"username":"indifferent","avatar":"//cdn.layui.com/avatar/5393304.jpg?t=1503634102116"}},{"uid":914256,"days":64,"time":"2017-11-29T22:06:27.000Z","msec":1511993187206,"token":"a0c86e3aadcde010cfc0e58dd45f2d86ce05141f","info":"{\"ip\":\"49.95.206.133\",\"type\":\"\"}","user":{"username":"luoye","avatar":"//cdn.layui.com/avatar/914256.jpg?t=1509407524833"}},{"uid":4925424,"days":64,"time":"2017-11-30T00:23:02.000Z","msec":1512001382321,"token":"a996df02cd30fabce5d91a07570081417f7152e7","info":"{\"ip\":\"58.253.37.218\",\"type\":\"\"}","user":{"username":"天外飞仙","avatar":"//q.qlogo.cn/qqapp/101235792/0645B6F031DC075395CF6628FE25CC06/100"}},{"uid":2493120,"days":64,"time":"2017-11-30T01:22:10.000Z","msec":1512004930357,"token":"943e516d851dcadf1bed873ada06de04181516c7","info":"{\"ip\":\"101.81.128.187\",\"type\":\"\"}","user":{"username":"易墨","avatar":"/avatar/2493120.png"}},{"uid":109200,"days":64,"time":"2017-11-30T01:26:20.000Z","msec":1512005180413,"token":"58227621bd87e7e52ccdd650c74ee14fa8c3d65d","info":"{\"ip\":\"58.48.79.22\",\"type\":\"\"}","user":{"username":"larry","avatar":"http://q.qlogo.cn/qqapp/101235792/5BAD5EBBDBBA45FC5166AD2CD0C785EC/100"}},{"uid":5427912,"days":64,"time":"2017-11-30T01:38:17.000Z","msec":1512005897416,"token":"c44803cd35d315598f67cccd3760ca502b51f5ca","info":"{\"ip\":\"113.116.52.106\",\"type\":\"\"}","user":{"username":"一根燃烧的胸毛","avatar":"//cdn.layui.com/avatar/5427912.jpg?t=1508423979257"}},{"uid":3033744,"days":64,"time":"2017-11-30T03:25:36.000Z","msec":1512012335818,"token":"1737a23536479677879cd4f187b53d056bf5e3de","info":"{\"ip\":\"125.69.79.26\",\"type\":\"\"}","user":{"username":"lxxt","avatar":"http://res.layui.com/images/fly/avatar/1.jpg"}},{"uid":625632,"days":64,"time":"2017-11-30T05:20:00.000Z","msec":1512019199595,"token":"8cb74adc91c54bb816390ab789b32010b0cea2cb","info":"{\"ip\":\"114.235.181.180\",\"type\":\"\"}","user":{"username":"單克拉的眼淚","avatar":"/avatar/625632.png"}},{"uid":2699592,"days":63,"time":"2017-11-29T16:00:05.000Z","msec":1511971205403,"token":"26ea175c9e10166aefa5f488436d62860d36473e","info":"{\"ip\":\"10.72.189.166\",\"type\":\"\"}","user":{"username":"孤独木木","avatar":"http://q.qlogo.cn/qqapp/101235792/636C3988F5102FFE645AA6DAD1523117/100"}},{"uid":3483480,"days":60,"time":"2017-11-30T00:41:16.000Z","msec":1512002475560,"token":"37d65b0daf5b2dc31e27a7a64f0e2977f04ddc35","info":"{\"ip\":\"180.169.184.238\",\"type\":\"\"}","user":{"username":"finder","avatar":"//cdn.layui.com/avatar/3483480.jpg?t=1505177911465"}},{"uid":38976,"days":60,"time":"2017-11-30T00:54:40.000Z","msec":1512003280371,"token":"612c1dcf536691c74ec11a403106ecf13f3423bc","info":"{\"ip\":\"119.136.199.115\",\"type\":\"\"}","user":{"username":"小马","avatar":"//cdn.layui.com/avatar/38976.jpg?t=1510234056859"}},{"uid":2680104,"days":58,"time":"2017-11-29T16:00:08.000Z","msec":1511971207505,"token":"ab9cf9ba7e98a5920b86b5b03fb088edeffb8347","info":"{\"ip\":\"14.204.90.147\",\"type\":\"\"}","user":{"username":"龙焱","avatar":"//cdn.layui.com/avatar/2680104.gif?t=1503590050825"}},{"uid":88368,"days":58,"time":"2017-11-30T01:49:34.000Z","msec":1512006573923,"token":"aa1573dc264b044b1cc9d2b7c23d3a982468e628","info":"{\"ip\":\"124.127.111.214\",\"type\":\"\"}","user":{"username":"飘飘雨下","avatar":"http://res.layui.com/images/fly/avatar/5.jpg"}},{"uid":4237464,"days":57,"time":"2017-11-29T23:40:05.000Z","msec":1511998804815,"token":"1400696b0b3cd88831dee9ca76696b0cf8e41793","info":"{\"ip\":\"223.104.249.246\",\"type\":\"\"}","user":{"username":"じ辰╆紫天せ","avatar":"http://q.qlogo.cn/qqapp/101235792/D06E5B3B3417FB5FDD44FB49A7FC497D/100"}},{"uid":6631968,"days":57,"time":"2017-11-30T01:22:55.000Z","msec":1512004975386,"token":"7b80ad75654631d1eaa892e611fb8ab8e216fd26","info":"{\"ip\":\"117.136.89.157\",\"type\":\"\"}","user":{"username":"wxm4252","avatar":"//res.layui.com/images/fly/avatar/3.jpg"}},{"uid":2492616,"days":56,"time":"2017-11-29T16:03:30.000Z","msec":1511971409532,"token":"e7062b575d2c52cf19bc8a6fb4e7be1fbc451c81","info":"{\"ip\":\"58.60.118.158\",\"type\":\"\"}","user":{"username":"chenug","avatar":"http://q.qlogo.cn/qqapp/101235792/197D29B8AE1BCB8013BD300CBE8E1BAD/100"}},{"uid":5308464,"days":56,"time":"2017-11-30T00:44:45.000Z","msec":1512002684935,"token":"4bd672b0fa54b1270c0448155b3a8b5d94515058","info":"{\"ip\":\"113.0.88.47\",\"type\":\"\"}","user":{"username":"愿得一人心丶","avatar":"//q.qlogo.cn/qqapp/101235792/69C5A2BF33C09CE64AF4C9DA964549E7/100"}},{"uid":6930504,"days":56,"time":"2017-11-30T00:47:38.000Z","msec":1512002857500,"token":"96abdb48128609f881ef28167bf5542f2e2cb1ae","info":"{\"ip\":\"119.123.152.119\",\"type\":\"\"}","user":{"username":"创意","avatar":"//q.qlogo.cn/qqapp/101235792/2E753B9E1D6221F0DA2ACBADA94FF600/100"}}]]} \ No newline at end of file diff --git a/view/taoler/index/article/add.html b/view/taoler/index/article/add.html index 35be0bb..6b4c0c5 100644 --- a/view/taoler/index/article/add.html +++ b/view/taoler/index/article/add.html @@ -195,6 +195,7 @@ numArr.push($(this).val());//添加至数组 }); tags = numArr.lenth ? '' : numArr.join(','); + var index = layer.load(1); $.ajax({ type:"post", url:"{:url('article/add')}", @@ -209,6 +210,7 @@ layer.open({title:'发布失败',content:data.msg,icon:5,anim:6}); layui.jquery('#captcha').attr('src', '{:captcha_src()}?'+Math.random()); } + layer.close(index); } }); return false; diff --git a/view/taoler/index/article/ask/detail.html b/view/taoler/index/article/ask/detail.html index 12bef3b..c8dc89a 100644 --- a/view/taoler/index/article/ask/detail.html +++ b/view/taoler/index/article/ask/detail.html @@ -255,6 +255,7 @@ layui.use(['fly', 'face','colorpicker','plyr'], function(){ //评论需要登陆 form.on('submit(user-comment)',function (data){ + var index = layer.load(1); var filed = data.field; if (uid == -1) { layer.msg('请先登陆',{icon:5,time:2000},function(){ diff --git a/view/taoler/index/article/detail.html b/view/taoler/index/article/detail.html index 7389d07..ae92721 100644 --- a/view/taoler/index/article/detail.html +++ b/view/taoler/index/article/detail.html @@ -240,6 +240,7 @@ layui.use(['fly', 'face','colorpicker','plyr'], function(){ //评论需要登陆 form.on('submit(user-comment)',function (data){ + var index = layer.load(1); var filed = data.field; if (uid == -1) { layer.msg('请先登陆',{icon:5,time:2000},function(){ diff --git a/view/taoler/index/article/posts/detail.html b/view/taoler/index/article/posts/detail.html index 13a9b79..6d5f6be 100644 --- a/view/taoler/index/article/posts/detail.html +++ b/view/taoler/index/article/posts/detail.html @@ -232,6 +232,7 @@ layui.use(['fly', 'face','colorpicker','plyr'], function(){ //评论需要登陆 form.on('submit(user-comment)',function (data){ + var index = layer.load(1); var filed = data.field; if (uid == -1) { layer.msg('请先登陆',{icon:5,time:2000},function(){ diff --git a/view/taoler/index/article/posts/detail.html- b/view/taoler/index/article/posts/detail.html- deleted file mode 100644 index 459e790..0000000 --- a/view/taoler/index/article/posts/detail.html- +++ /dev/null @@ -1,315 +0,0 @@ -{extend name="public/base" /} - -{block name="title"}{$article.title}-{$sysInfo.webname}{/block} -{block name="keywords"}{$article.title},{$article.tags}{/block} -{block name="description"}{$article.title},{:getArtContent($article.content)}{/block} -{block name="link"}{/block} -{block name="column"}
{include file="/public/column" /}
{/block} -{block name="content"} -
-
-
-
- {//标题} -

{$article.title} -
-

- {//图标} -
- {:cookie('think_lang') == 'en-us' ? $article.cate.ename : $article.cate.catename} - {if ($article.is_top == 1)}{:lang('top')}{/if} - {if ($article.is_hot == 1)}{:lang('hot')}{/if} - - - {$comments->count()}{$pv} - -
- {//作者} - -
{$article.content|raw}
- {//管理} - {if (($article.upzip !== '') || (session('user_id')==$article.user_id) OR ($user.auth ?? ''))} -
- {notempty name="$article.upzip"} - - {/notempty} -
- {if ($user.auth ?? '')} - - {if($article.is_top == 0)} - {else /}{:lang('cancel topping')}{/if} - {if($article.is_hot == 0)} - - {else /} - {:lang('cancel hoting')} - {/if} - {if($article.is_reply == 1)} - - {else /} - {:lang('enable reply')} - {/if} - {:lang('title color')} - {/if} - {if(session('user_name')==$article.user.name || ($user.auth ?? ''))} - {:lang('edit')} - {/if} -
-
- {/if} -
- {//评论} -
- 评论 {$comments->count()} - -
{$comments|raw}
- {if condition="$article.is_reply == 1"} -
-
- -
- -
-
-
- - - -
-
- {else /} -
本帖已设置禁止回复
- {/if} -
-
-
-
-
{:lang('sponsor')}- - {:lang('i want to join')} -
-
- {volist name="ad_comm" id="vo"} - {$vo.slid_name} - {/volist} -
-
-
-
{:lang('hot post list')}
- {volist name="artHot" id="vo"} -
- {$vo.title} - {$vo.comments_count} -
- {/volist} -
-
- {volist name="ad_art" id="vo"} - - {/volist} -
-
-
- -
-
-
-
-{include file="public/menu" /} -{/block} -{block name="script"} - -{/block} \ No newline at end of file