diff --git a/app/admin/controller/Addons.php b/app/admin/controller/Addons.php index 4249af2..edcd226 100644 --- a/app/admin/controller/Addons.php +++ b/app/admin/controller/Addons.php @@ -26,7 +26,7 @@ class Addons extends AdminController } /** - * 插件列表 + * 插件动态列表 * @return Json */ public function addonsList() @@ -57,10 +57,10 @@ class Addons extends AdminController ['field'=> 'version','title'=> '版本', 'templet' => '
{{d.version}}
', 'width'=> 60], ['field' => 'author','title'=> '作者', 'width'=> 80], ['field' => 'description','title'=> '简介', 'minWidth'=> 200], - ['field' => 'show','title'=> '状态', 'width'=> 100], ['field' => 'install','title'=> '安装', 'width'=> 100], ['field' => 'ctime','title'=> '到期时间', 'width'=> 100], - ['title' => '操作', 'width'=> 200, 'align'=>'center', 'toolbar'=> '#addons-installed-tool'] + ['field' => 'status','title'=> '状态', 'width'=> 95, 'templet' => '#buttonStatus'], + ['title' => '操作', 'width'=> 150, 'align'=>'center', 'toolbar'=> '#addons-installed-tool'] ]; } else { $res = ['code'=>-1,'msg'=>'没有安装任何插件']; @@ -119,10 +119,10 @@ class Addons extends AdminController ['field' => 'title','title'=> '插件', 'width'=> 200], ['field' => 'description','title'=> '简介', 'minWidth'=> 200], ['field' => 'author','title'=> '作者', 'width'=> 100], - ['field' => 'price','title'=> '价格(元)','width'=> 80], + ['field' => 'price','title'=> '价格(元)','width'=> 85], ['field' => 'downloads','title'=> '下载', 'width'=> 70], - ['field' => 'version','title'=> '版本', 'templet' => '
{{d.version}} {{# if(d.have_newversion == 1){ }}{{# } }}
','width'=> 70], - ['field' => 'status','title'=> '状态', 'width'=> 70], + ['field' => 'version','title'=> '版本', 'templet' => '
{{d.version}} {{# if(d.have_newversion == 1){ }}{{# } }}
','width'=> 75], + ['field' => 'status','title'=> '在线', 'width'=> 70], ['title' => '操作', 'width'=> 150, 'align'=>'center', 'toolbar'=> '#addons-tool'] ]; } else { @@ -151,34 +151,6 @@ class Addons extends AdminController } return json($res); } - - return View::fetch(); - } - - - /** - * 编辑版本 - * @param $id - * @return string|Json - * @throws \think\db\exception\DataNotFoundException - * @throws \think\db\exception\DbException - * @throws \think\db\exception\ModelNotFoundException - */ - public function edit($id) - { - $addons = AddonsModel::find($id); - - if(Request::isAjax()){ - $data = Request::only(['id','addons_name','addons_version','addons_auther','addons_resume','addons_price','addons_src']); - $result = $addons->where('id',$id)->save($data); - if($result){ - $res = ['code'=>0,'msg'=>'编辑成功']; - }else{ - $res = ['code'=>-1,'msg'=>'编辑失败']; - } - return json($res); - } - View::assign('addons',$addons); return View::fetch(); } @@ -219,17 +191,22 @@ class Addons extends AdminController return $this->uploadFiles($type); } - //安装插件 + /** + * 安装插件 + * @return Json + * @throws \Exception + */ public function install() { $data = Request::param(); $url = $this->getSystem()['api_url'].'/v1/getaddons'; $data = ['name'=>$data['name'], 'version'=>$data['version'], 'uid'=>$data['uid'], 'token'=>$data['token']]; $addons = Api::urlPost($url,$data); - if( $addons->code == -1) { + if( $addons->code < 0) { return json(['code'=>$addons->code,'msg'=>$addons->msg]); } - //是否安装? + //$this->pay($name,$extend); + //版本判断,是否能够安装? $addInstalledVersion = get_addons_info($data['name']); if(!empty($addInstalledVersion)){ $verRes = version_compare($data['version'],$addInstalledVersion['version'],'>'); @@ -325,7 +302,6 @@ class Addons extends AdminController $menu = get_addons_menu($name); if(!empty($menu)){ $menu_arr[] = $menu['menu']; -// halt( $menu_arr); $this->delAddonMenu($menu_arr); } @@ -361,7 +337,11 @@ class Addons extends AdminController return json(['code' => 0, 'msg' => '插件卸载成功']); } - // 启用禁用插件 + /** + * 启用禁用插件 + * @return Json + * @throws Exception + */ public function status(){ $name = input('name'); $info = get_addons_info($name); @@ -381,8 +361,13 @@ class Addons extends AdminController return json($res); } - - //配置插件 + + /** + * 配置插件 + * @param $name + * @return string|Json + * @throws \Exception + */ public function config($name) { $name = input('name'); @@ -426,6 +411,14 @@ class Addons extends AdminController } + /** + * 添加菜单 + * @param array $menu + * @param int $pid + * @param int $type + * @return void + * @throws \Exception + */ public function addAddonMenu(array $menu,int $pid = 0, int $type = 1) { foreach ($menu as $v){ @@ -451,7 +444,13 @@ class Addons extends AdminController } - //循环删除菜单 + /** + * 循环删除菜单 + * @param array $menu + * @param string $module + * @return void + * @throws \Exception + */ public function delAddonMenu(array $menu,string $module = 'addon') { foreach ($menu as $k=>$v){ @@ -473,6 +472,10 @@ class Addons extends AdminController } + /** + * 用户登录 + * @return mixed|Json + */ public function userLogin() { $data = Request::param(); @@ -485,4 +488,44 @@ class Addons extends AdminController } } + /** + * 订单 + * @return string|Json + */ + public function pay() + { + $data = Request::only(['id','name','version','uid','price']); + $url = $this->getSystem()['api_url'].'/v1/createOrder'; + $order = Api::urlPost($url,$data); + + if ($order->code == 0) { + $orderData = json_decode(json_encode($order->data),TRUE); + View::assign('orderData',$orderData); + return View::fetch(); + } else { + return json(['code'=>-1,'msg'=>$order->msg]); + } + } + + /** + * 支付查询 + * @return Json + */ + public function isPay() + { + $param = Request::only(['name','userinfo']); + //halt($data); + $data = [ + 'name'=>$param['name'], + 'uid'=> $param['userinfo']['uid'], + ]; + $url = $this->getSystem()['api_url'].'/v1/ispay'; + $res = Api::urlPost($url,$data); + if($res->code == 0) { + return json(['code'=>0,'msg'=>'payed']); + } else { + return json(['code'=>-1,'msg'=>'no pay']); + } + } + } diff --git a/app/admin/view/addons/index.html b/app/admin/view/addons/index.html index aca6a32..289a53c 100644 --- a/app/admin/view/addons/index.html +++ b/app/admin/view/addons/index.html @@ -3,30 +3,18 @@ {block name="body"}
-
-
-
-
插件分类
-
- -
-
- +
+ - - - +
-
{include file="public/user_login" /} {/block} {block name="js"} +{/block} \ No newline at end of file diff --git a/app/admin/view/forum/replys.html b/app/admin/view/forum/replys.html index 5f3cad9..2fa771c 100644 --- a/app/admin/view/forum/replys.html +++ b/app/admin/view/forum/replys.html @@ -127,7 +127,7 @@ var forumList = "{:url('Forum/list')}", //监听回贴审核 form.on('switch(recheck)', function(data){ var data= data.elem; - status = data.checked ? 1 : -1; + var status = data.checked ? 1 : -1; //执行回帖审核 $.ajax({ type:'post', @@ -148,7 +148,6 @@ var forumList = "{:url('Forum/list')}", adim:6 }) } - table.reload('LAY-app-forumreply-list'); } }); diff --git a/composer.lock b/composer.lock index 34273bd..6081e77 100644 --- a/composer.lock +++ b/composer.lock @@ -2130,16 +2130,16 @@ }, { "name": "symfony/var-dumper", - "version": "v4.4.46", + "version": "v4.4.47", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "90425fd98d1ecad98e4b2dca9f54f62069193b15" + "reference": "1069c7a3fca74578022fab6f81643248d02f8e63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/90425fd98d1ecad98e4b2dca9f54f62069193b15", - "reference": "90425fd98d1ecad98e4b2dca9f54f62069193b15", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/1069c7a3fca74578022fab6f81643248d02f8e63", + "reference": "1069c7a3fca74578022fab6f81643248d02f8e63", "shasum": "" }, "require": { @@ -2199,7 +2199,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v4.4.46" + "source": "https://github.com/symfony/var-dumper/tree/v4.4.47" }, "funding": [ { @@ -2215,7 +2215,7 @@ "type": "tidelift" } ], - "time": "2022-09-03T23:07:25+00:00" + "time": "2022-10-03T15:15:11+00:00" }, { "name": "symfony/var-exporter", @@ -2292,16 +2292,16 @@ }, { "name": "taoser/think-addons", - "version": "v1.0.6", + "version": "v1.0.8", "source": { "type": "git", "url": "https://github.com/taoser/think-addons.git", - "reference": "e6e35bfd8b93dc469ebb5c5530ba350131bd7541" + "reference": "570367e8d4904842625427f132d23c93f5edfc68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/taoser/think-addons/zipball/e6e35bfd8b93dc469ebb5c5530ba350131bd7541", - "reference": "e6e35bfd8b93dc469ebb5c5530ba350131bd7541", + "url": "https://api.github.com/repos/taoser/think-addons/zipball/570367e8d4904842625427f132d23c93f5edfc68", + "reference": "570367e8d4904842625427f132d23c93f5edfc68", "shasum": "" }, "require": { @@ -2343,9 +2343,9 @@ "description": "The ThinkPHP6 Addons Package", "support": { "issues": "https://github.com/taoser/think-addons/issues", - "source": "https://github.com/taoser/think-addons/tree/v1.0.6" + "source": "https://github.com/taoser/think-addons/tree/v1.0.8" }, - "time": "2022-10-06T13:11:38+00:00" + "time": "2022-10-15T06:21:17+00:00" }, { "name": "taoser/think-auth", diff --git a/config/taoler.php b/config/taoler.php index 17c9df7..a0c1e0e 100644 --- a/config/taoler.php +++ b/config/taoler.php @@ -16,7 +16,7 @@ return [ // 应用名,此项不可更改 'appname' => 'TaoLer', // 版本配置 - 'version' => '2.0.4', + 'version' => '2.0.5', // 加盐 'salt' => 'taoler', // 数据库备份目录 diff --git a/public/static/admin/modules/addons.js b/public/static/admin/modules/addons.js index 32da7e7..f2d99f4 100644 --- a/public/static/admin/modules/addons.js +++ b/public/static/admin/modules/addons.js @@ -73,25 +73,50 @@ layui.define(["table", "form", "upload","notify","hxNav"], function (exports) { var event = obj.event; var url = $(this).data('url') - //安装插件 - if (event === "install") { - // 检测权限 - var userinfo = api.userinfo.get(); - var userLoginUrl = $(this).data('userlogin'); + // 安装 + var install = function (data,url,userLoginUrl,userIsPayUrl){ + var userinfo = api.userinfo.get(); // 检测权限 if(userinfo) { notify.confirm("确认安装吗?", "vcenter",function(){ var index = layer.load(1); $.post(url, { name: data.name, version: data.version, uid: userinfo.uid, token: userinfo.token }, function (res) { - if (res.code == 0) { + // 需要支付 + if (res.code === -2) { + layer.close(index); + layer.open({ + type: 2, + area: ['700px', '650px'], + fixed: false, //不固定 + maxmin: true, + content: 'pay.html'+ "?id=" + data.id+ "&name=" + data.name + "&version=" + data.version + "&uid=" + userinfo.uid + "&price=" + data.price, + success: function (layero, index){ + // 订单沦陷 + var intervalPay = setInterval(function() { + $.post(userIsPayUrl,{name:data.name, userinfo:userinfo},function (res){ + if(res.code === 0) { + layer.close(index); + clearInterval(intervalPay); + install(data,url,userLoginUrl,userIsPayUrl); + } + }); + },3000); + } + }); + } + // 安装成功 + if (res.code === 0) { + layer.close(index); notify.success(res.msg, "topRight"); - } else { + } + // 安装失败 + if (res.code === -1) { + layer.close(index); notify.error(res.msg, "topRight"); } - layer.close(index); }); }); } else { - // 登录 + // 未登录时 layer.confirm('你当前还未登录TaoLer社区账号,请登录后操作!', { title : '温馨提示', btnAlign: 'c', @@ -146,21 +171,13 @@ layui.define(["table", "form", "upload","notify","hxNav"], function (exports) { }); }); } - } - // 启用禁用 - if(event == 'status') { - notify.confirm("确认框", "vcenter", function(){ - $.post(url,{ name: data.name },function(res){ - if (res.code == 0) { - notify.success(res.msg, "topRight"); - } else { - notify.error(res.msg, "topRight"); - } - table.reloadData("addons-list",{},'deep'); - }); - }); + //安装插件 + if (event === "install") { + var userLoginUrl = $(this).data('userlogin'); + var userIsPayUrl = $(this).data('ispay'); + install(data,url,userLoginUrl,userIsPayUrl); } // 卸载插件 @@ -168,7 +185,7 @@ layui.define(["table", "form", "upload","notify","hxNav"], function (exports) { notify.confirm("确认框", "vcenter",function() { var index = layer.load(1); $.post(url, { name: data.name }, function (res) { - if (res.code == 0) { + if (res.code === 0) { notify.success(res.msg, "topRight"); } else { notify.error(res.msg, "topRight"); @@ -183,7 +200,7 @@ layui.define(["table", "form", "upload","notify","hxNav"], function (exports) { if (event === "config") { $.post(url,{name:data.name},function (res){ // 无配置项拦截 - if (res.code == -1) { + if (res.code === -1) { notify.alert(res.msg); return false; } @@ -195,9 +212,7 @@ layui.define(["table", "form", "upload","notify","hxNav"], function (exports) { area: ["780px", "90%"], btn: ["确定", "取消"], yes: function (index, layero) { - var iframeWindow = window["layui-layer-iframe" + index], - submitID = "LAY-addons-config-submit", - submit = layero.find("iframe").contents().find("#" + submitID); + var iframeWindow = window["layui-layer-iframe" + index], submitID = "LAY-addons-config-submit", submit = layero.find("iframe").contents().find("#" + submitID); //监听提交 iframeWindow.layui.form.on("submit(" + submitID + ")", function (data) { @@ -208,7 +223,7 @@ layui.define(["table", "form", "upload","notify","hxNav"], function (exports) { data: field, daType: "json", success: function (res) { - if (res.code == 0) { + if (res.code === 0) { notify.success(res.msg, "topRight"); } else { notify.error(res.msg, "topRight"); @@ -251,60 +266,6 @@ layui.define(["table", "form", "upload","notify","hxNav"], function (exports) { } - if (event === "edit") { - var tr = $(obj.tr); - layer.open({ - type: 2, - title: "编辑插件", - content: addonsEdit + "?id=" + data.id, - maxmin: true, - area: ["400px", "620px"], - btn: ["确定", "取消"], - yes: function (index, layero) { - var iframeWindow = window["layui-layer-iframe" + index], - submitID = "LAY-addons-submit", - submit = layero - .find("iframe") - .contents() - .find("#" + submitID); - - //监听提交 - iframeWindow.layui.form.on( - "submit(" + submitID + ")", - function (data) { - var field = data.field; //获取提交的字段 - - //提交 Ajax 成功后,静态更新表格中的数据 - $.ajax({ - type: "post", - url: addonsEdit, - data: field, - daType: "json", - success: function (res) { - if (res.code == 0) { - layer.msg(res.msg, { icon: 6, time: 2000 }); - } else { - layer.open({ - tiele: "修改失败", - content: res.msg, - icon: 5, - anim: 6, - }); - } - }, - }); - - table.reload("addons-list"); //数据刷新 - layer.close(index); //关闭弹层 - } - ); - - submit.trigger("click"); - }, - success: function (layero, index) {}, - }); - } - }); exports("addons", {}); diff --git a/public/static/res/images/alipay-logo.png b/public/static/res/images/alipay-logo.png new file mode 100644 index 0000000..77343fa Binary files /dev/null and b/public/static/res/images/alipay-logo.png differ diff --git a/public/static/res/images/alipay.jpg b/public/static/res/images/alipay.jpg new file mode 100644 index 0000000..dfff39a Binary files /dev/null and b/public/static/res/images/alipay.jpg differ diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 7307fa2..936e06d 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -15,7 +15,7 @@ return array( 'think\\app\\' => array($vendorDir . '/topthink/think-multi-app/src'), 'think\\' => array($vendorDir . '/topthink/framework/src/think', $vendorDir . '/topthink/think-helper/src', $vendorDir . '/topthink/think-orm/src', $vendorDir . '/topthink/think-template/src'), 'taoser\\think\\' => array($vendorDir . '/taoser/think-auth/src'), - 'taoser\\' => array($vendorDir . '/taoser/think-addons/src', $vendorDir . '/taoser/think-setarr/src'), + 'taoser\\' => array($vendorDir . '/taoser/think-setarr/src', $vendorDir . '/taoser/think-addons/src'), 'phpspirit\\databackup\\' => array($vendorDir . '/lotofbadcode/phpspirit_databackup/src'), 'liliuwei\\social\\' => array($vendorDir . '/liliuwei/thinkphp-social/src'), 'app\\' => array($baseDir . '/app'), diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 619065f..6c7c833 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -184,8 +184,8 @@ class ComposerStaticInit1b32198725235c8d6500c87262ef30c2 ), 'taoser\\' => array ( - 0 => __DIR__ . '/..' . '/taoser/think-addons/src', - 1 => __DIR__ . '/..' . '/taoser/think-setarr/src', + 0 => __DIR__ . '/..' . '/taoser/think-setarr/src', + 1 => __DIR__ . '/..' . '/taoser/think-addons/src', ), 'phpspirit\\databackup\\' => array ( diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index a9d64a9..d93b9c9 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -2264,17 +2264,17 @@ }, { "name": "symfony/var-dumper", - "version": "v4.4.46", - "version_normalized": "4.4.46.0", + "version": "v4.4.47", + "version_normalized": "4.4.47.0", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "90425fd98d1ecad98e4b2dca9f54f62069193b15" + "reference": "1069c7a3fca74578022fab6f81643248d02f8e63" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/90425fd98d1ecad98e4b2dca9f54f62069193b15", - "reference": "90425fd98d1ecad98e4b2dca9f54f62069193b15", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/1069c7a3fca74578022fab6f81643248d02f8e63", + "reference": "1069c7a3fca74578022fab6f81643248d02f8e63", "shasum": "" }, "require": { @@ -2298,7 +2298,7 @@ "ext-intl": "To show region name in time zone dump", "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" }, - "time": "2022-09-03T23:07:25+00:00", + "time": "2022-10-03T15:15:11+00:00", "bin": [ "Resources/bin/var-dump-server" ], @@ -2336,7 +2336,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v4.4.46" + "source": "https://github.com/symfony/var-dumper/tree/v4.4.47" }, "funding": [ { @@ -2432,17 +2432,17 @@ }, { "name": "taoser/think-addons", - "version": "v1.0.6", - "version_normalized": "1.0.6.0", + "version": "v1.0.8", + "version_normalized": "1.0.8.0", "source": { "type": "git", "url": "https://github.com/taoser/think-addons.git", - "reference": "e6e35bfd8b93dc469ebb5c5530ba350131bd7541" + "reference": "570367e8d4904842625427f132d23c93f5edfc68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/taoser/think-addons/zipball/e6e35bfd8b93dc469ebb5c5530ba350131bd7541", - "reference": "e6e35bfd8b93dc469ebb5c5530ba350131bd7541", + "url": "https://api.github.com/repos/taoser/think-addons/zipball/570367e8d4904842625427f132d23c93f5edfc68", + "reference": "570367e8d4904842625427f132d23c93f5edfc68", "shasum": "" }, "require": { @@ -2452,7 +2452,7 @@ "topthink/think-helper": "^3.0.0", "topthink/think-view": "^1.0" }, - "time": "2022-10-06T13:11:38+00:00", + "time": "2022-10-15T06:21:17+00:00", "type": "library", "extra": { "think": { @@ -2486,7 +2486,7 @@ "description": "The ThinkPHP6 Addons Package", "support": { "issues": "https://github.com/taoser/think-addons/issues", - "source": "https://github.com/taoser/think-addons/tree/v1.0.6" + "source": "https://github.com/taoser/think-addons/tree/v1.0.8" }, "install-path": "../taoser/think-addons" }, diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index c8b63a6..d8d10d0 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -3,7 +3,7 @@ 'name' => 'taoser/taoler', 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '0c44db5a5d56d4f62656d0fdad68f82c27235469', + 'reference' => 'ad4f215470c0da087a55d6ee63199988a4d216bd', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), @@ -347,9 +347,9 @@ 'dev_requirement' => false, ), 'symfony/var-dumper' => array( - 'pretty_version' => 'v4.4.46', - 'version' => '4.4.46.0', - 'reference' => '90425fd98d1ecad98e4b2dca9f54f62069193b15', + 'pretty_version' => 'v4.4.47', + 'version' => '4.4.47.0', + 'reference' => '1069c7a3fca74578022fab6f81643248d02f8e63', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/var-dumper', 'aliases' => array(), @@ -367,16 +367,16 @@ 'taoser/taoler' => array( 'pretty_version' => 'dev-master', 'version' => 'dev-master', - 'reference' => '0c44db5a5d56d4f62656d0fdad68f82c27235469', + 'reference' => 'ad4f215470c0da087a55d6ee63199988a4d216bd', 'type' => 'project', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => false, ), 'taoser/think-addons' => array( - 'pretty_version' => 'v1.0.6', - 'version' => '1.0.6.0', - 'reference' => 'e6e35bfd8b93dc469ebb5c5530ba350131bd7541', + 'pretty_version' => 'v1.0.8', + 'version' => '1.0.8.0', + 'reference' => '570367e8d4904842625427f132d23c93f5edfc68', 'type' => 'library', 'install_path' => __DIR__ . '/../taoser/think-addons', 'aliases' => array(), diff --git a/vendor/services.php b/vendor/services.php index e2ad916..11a5640 100644 --- a/vendor/services.php +++ b/vendor/services.php @@ -1,5 +1,5 @@ 'taoser\\addons\\Service', diff --git a/vendor/symfony/var-dumper/Resources/bin/var-dump-server b/vendor/symfony/var-dumper/Resources/bin/var-dump-server index 98c813a..f398fce 100644 --- a/vendor/symfony/var-dumper/Resources/bin/var-dump-server +++ b/vendor/symfony/var-dumper/Resources/bin/var-dump-server @@ -10,6 +10,10 @@ * file that was distributed with this source code. */ +if ('cli' !== PHP_SAPI) { + throw new Exception('This script must be run from the command line.'); +} + /** * Starts a dump server to collect and output dumps on a single place with multiple formats support. * diff --git a/vendor/taoser/think-addons/src/helper.php b/vendor/taoser/think-addons/src/helper.php index b84612b..6646946 100644 --- a/vendor/taoser/think-addons/src/helper.php +++ b/vendor/taoser/think-addons/src/helper.php @@ -317,7 +317,4 @@ if (!function_exists('get_addons_list')) { return $list; } - - -} - +} \ No newline at end of file diff --git a/view/taoler/index/article/add.html b/view/taoler/index/article/add.html index eb5a76b..03c9d34 100644 --- a/view/taoler/index/article/add.html +++ b/view/taoler/index/article/add.html @@ -1,6 +1,6 @@ {extend name="public/base" /} {block name="title"}发表帖子{/block} -{block name="link"}{/block} +{block name="link"} {/block} {block name="column"}{/block} {block name="content"}
@@ -149,13 +149,12 @@ {:hook('taonyeditor')} diff --git a/view/taoler/index/article/ask/detail.html b/view/taoler/index/article/ask/detail.html index 06a2958..af1ac74 100644 --- a/view/taoler/index/article/ask/detail.html +++ b/view/taoler/index/article/ask/detail.html @@ -11,7 +11,7 @@ {/block} -{block name="link"}{/block} +{block name="link"} {/block} {block name="column"}
{include file="/public/column" /}
{/block} {block name="content"}
@@ -183,8 +183,11 @@
{include file="public/menu" /} {/block} + {block name="script"} + {:hook('taonyeditor')} + + +{:hook('taoplyr')} + {//图片点击放大} {include file="/public/images-click" /} {:hook('markdownhook')} diff --git a/view/taoler/index/article/blog/detail.html b/view/taoler/index/article/blog/detail.html index 90fe37c..0205512 100644 --- a/view/taoler/index/article/blog/detail.html +++ b/view/taoler/index/article/blog/detail.html @@ -15,7 +15,6 @@ {/block} {block name="link"} - @@ -287,7 +286,9 @@ {/block} {block name="script"} + {:hook('taonyeditor')} + +{:hook('taoplyr')} {:hook('markdownhook')} + {include file="/public/qr-read" /} {volist name="push_js" id="vo"} diff --git a/view/taoler/index/article/edit.html b/view/taoler/index/article/edit.html index 21d8eea..4655137 100644 --- a/view/taoler/index/article/edit.html +++ b/view/taoler/index/article/edit.html @@ -1,7 +1,7 @@ {extend name="public/base" /} {block name="title"}编辑帖子{/block} -{block name="link"}{/block} +{block name="link"} {/block} {block name="column"}{/block} {block name="content"}
@@ -140,7 +140,9 @@ {/block} {block name="script"} + {:hook('taonyeditor')} + diff --git a/view/taoler/index/article/news/detail.html b/view/taoler/index/article/news/detail.html index 2218afc..b0e2985 100644 --- a/view/taoler/index/article/news/detail.html +++ b/view/taoler/index/article/news/detail.html @@ -10,7 +10,7 @@ {/block} -{block name="link"}{/block} +{block name="link"} {/block} {block name="column"}
{include file="/public/column" /}
{/block} {block name="content"}
@@ -64,7 +64,9 @@ {/block} {block name="script"} + {:hook('taonyeditor')} + +{:hook('taoplyr')} + {//图片点击放大} {include file="/public/images-click" /} {:hook('markdownhook')} diff --git a/view/taoler/index/article/posts/detail.html b/view/taoler/index/article/posts/detail.html index 17dcf06..e1047f0 100644 --- a/view/taoler/index/article/posts/detail.html +++ b/view/taoler/index/article/posts/detail.html @@ -12,7 +12,7 @@ {/block} -{block name="link"}{/block} +{block name="link"} {/block} {block name="column"}
{include file="/public/column" /}
{/block} {block name="content"}
@@ -203,7 +203,11 @@ {include file="public/menu" /} {/block} {block name="script"} + {:hook('taonyeditor')} + +{:hook('taoplayer')} + +{:hook('taoplyr')} + {//图片点击放大} {include file="/public/images-click" /} {:hook('markdownhook')} diff --git a/view/taoler/index/login/login.html b/view/taoler/index/login/login.html index 139b4e4..3167bd4 100644 --- a/view/taoler/index/login/login.html +++ b/view/taoler/index/login/login.html @@ -81,16 +81,16 @@ daType:"json", success:function (data){ if (data.code == 0) { - layer.msg(data.msg,{icon:6,time:2000}, function(){ + notify.success(data.msg,function(){ location.href = data.url; - }); + }) } else { - layer.open({title:'登陆失败',content:data.msg,icon:5,anim:6}); + notify.error(data.msg); layui.jquery('#captcha').attr('src', '{:captcha_src()}?'+Math.random()); } } }); - return false; + return false; }); }); diff --git a/view/taoler/index/public/base.html b/view/taoler/index/public/base.html index b972de6..b00f822 100644 --- a/view/taoler/index/public/base.html +++ b/view/taoler/index/public/base.html @@ -30,6 +30,7 @@ {block name="meta"}{/block} + @@ -53,6 +54,8 @@ {include file="public/footer" /} {include file="public/js" /} {block name="script"}{/block} diff --git a/view/taoler/index/public/user.html b/view/taoler/index/public/user.html index cccfb27..57315f6 100644 --- a/view/taoler/index/public/user.html +++ b/view/taoler/index/public/user.html @@ -20,6 +20,7 @@ {block name="css"}{/block} + {include file="public/header" /} @@ -32,6 +33,7 @@
{include file="public/footer" /}