作者 景龙

去掉进入后台index页多余的内容

... ... @@ -13,8 +13,7 @@ use cmf\controller\HomeBaseController;
use think\Cookie;
use think\Session;
use anerg\OAuth2\OAuth;
//use think\Config;
use think\facade\Config;
use think\Config;
class LoginController extends HomeBaseController
{
... ... @@ -131,4 +130,48 @@ class LoginController extends HomeBaseController
// }
// $res = $userModel->isUpdate(true)->save($data);
// }
//第三方微信登录
public function wx_login(){
$config = Config::get('wx_login');
$app_id = $config['app_id'];
$redirect_uri = $config['redirect_uri'];
$scope = $config['scope'];
$state = md5(uniqid(rand(), TRUE));
$url = 'https://open.weixin.qq.com/connect/qrconnect?appid='.$app_id.'&redirect_uri='.$redirect_uri.'&response_type=code&scope='.$scope.'&state='.$state.'#wechat_redirect';
$res = $this->http_get($url);
var_dump(11);
var_dump($res);exit;
}
//curl get请求
public function http_get($url){
$curl = curl_init();//启动一个CURL会话
curl_setopt($curl, CURLOPT_URL,$url);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); // 对认证证书来源的检查
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); // 从证书中检查SSL加密算法是否存在
curl_setopt($curl, CURLOPT_TIMEOUT, 30); // 设置超时限制防止死循环
curl_setopt($curl, CURLOPT_HEADER, false);//不开启header
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); // 获取的信息以文件流的形式返回
$result = curl_exec($curl); //执行操作
curl_close($curl);
return $result;
}
//curl post请求
public function http_post($url,$data,$headers){
$curl = curl_init();//启动一个CURL会话
curl_setopt($curl, CURLOPT_URL, $url); // 要访问的地址
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); // 对认证证书来源的检查
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false); // 从证书中检查SSL加密算法是否存在
curl_setopt($curl, CURLOPT_POST, true); // 发送一个常规的Post请求
curl_setopt($curl, CURLOPT_POSTFIELDS, $data); // Post提交的数据包
curl_setopt($curl, CURLOPT_TIMEOUT, 30); // 设置超时限制防止死循环
curl_setopt($curl, CURLOPT_HEADER, true); // 开启header
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);//请求头部
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); // 获取的信息以文件流的形式返回
$result = curl_exec($curl); //执行操作
curl_close($curl);
return $result;
}
}
... ...
... ... @@ -4,9 +4,10 @@ return array (
'cmf_admin_default_theme' => 'admin_simpleboot3',
),
'TENGXUN_KEY' => 'HGLBZ-WD66X-2H74V-TJ6NI-NHNWZ-DNBJ5',
'sns_wx' => [
'wx_login' => [
'app_id' => 'wx882ed4633b1d71fb',
'app_secret' => '00053c785b11c34e278ed8fe0f9cf484',
'scope' => 'snsapi_userinfo',//如果需要静默授权,这里改成snsapi_base,扫码登录系统会自动改为snsapi_login
'scope' => 'snsapi_login',//如果需要静默授权,这里改成snsapi_base,扫码登录系统会自动改为snsapi_login
'redirect_uri' => ''
]
);
\ No newline at end of file
... ...
<?php
return array (
'ADMIN_ABOUTUS_EDIT' => '关于我们',
'ADMIN_ABOUTUS_EDITPOST' => '编辑提交',
'ADMIN_COOPERATION_ADD' => '添加显示',
'ADMIN_COOPERATION_ADDPOST' => '添加提交',
'ADMIN_COOPERATION_DELETE' => '删除',
'ADMIN_COOPERATION_EDIT' => '编辑显示',
'ADMIN_COOPERATION_EDITPOST' => '编辑提交',
'ADMIN_COOPERATION_INDEX' => '合作伙伴',
'ADMIN_COOPERATION_TOGGLE' => '显示隐藏',
'ADMIN_FOCUS_ADD' => '添加显示',
'ADMIN_FOCUS_ADDPOST' => '添加提交',
'ADMIN_FOCUS_EDIT' => '编辑显示',
'ADMIN_FOCUS_EDITPOST' => '编辑添加',
'ADMIN_FOCUS_INDEX' => '关注我们',
'ADMIN_FOCUS_TOGGLE' => '显示隐藏',
'ADMIN_HOOK_INDEX' => '钩子管理',
'ADMIN_HOOK_PLUGINLISTORDER' => '钩子插件排序',
'ADMIN_HOOK_PLUGINS' => '钩子插件管理',
... ... @@ -122,6 +134,11 @@ return array (
'ADMIN_USER_INDEX' => '管理员',
'ADMIN_USER_USERINFO' => '个人信息',
'ADMIN_USER_USERINFOPOST' => '管理员个人信息修改提交',
'PORTAL_ADMINACTIVE_ADD' => '添加显示',
'PORTAL_ADMINACTIVE_ADDPOST' => '添加提交',
'PORTAL_ADMINACTIVE_DELETE' => '删除',
'PORTAL_ADMINACTIVE_EDIT' => '编辑显示',
'PORTAL_ADMINACTIVE_EDITPOST' => '编辑提交',
'PORTAL_ADMINACTIVE_INDEX' => '星际活动',
'PORTAL_ADMINARTICLE_ADD' => '添加文章',
'PORTAL_ADMINARTICLE_ADDPOST' => '添加文章提交',
... ... @@ -145,9 +162,29 @@ return array (
'PORTAL_ADMINDATA_INDEX' => '数据统计',
'PORTAL_ADMINDATADATA_DEFAULT' => '数据统计',
'PORTAL_ADMINENJOY_DEFAULT' => '星享体验',
'PORTAL_ADMINENJOYFEAST_ADD' => '添加显示',
'PORTAL_ADMINENJOYFEAST_ADDPOST' => '添加提交',
'PORTAL_ADMINENJOYFEAST_DELETE' => '删除',
'PORTAL_ADMINENJOYFEAST_EDIT' => '编辑显示',
'PORTAL_ADMINENJOYFEAST_EDITPOST' => '编辑提交',
'PORTAL_ADMINENJOYFEAST_INDEX' => '视听盛宴',
'PORTAL_ADMINENJOYOWN_ADD' => '添加显示',
'PORTAL_ADMINENJOYOWN_ADDPOST' => '添加提交',
'PORTAL_ADMINENJOYOWN_DELETE' => '删除',
'PORTAL_ADMINENJOYOWN_EDIT' => '编辑显示',
'PORTAL_ADMINENJOYOWN_EDITPOST' => '编辑提交',
'PORTAL_ADMINENJOYOWN_INDEX' => '亲临现场',
'PORTAL_ADMINENJOYROAM_ADD' => '添加显示',
'PORTAL_ADMINENJOYROAM_ADDPOST' => '添加提交',
'PORTAL_ADMINENJOYROAM_DELETE' => '删除',
'PORTAL_ADMINENJOYROAM_EDIT' => '编辑显示',
'PORTAL_ADMINENJOYROAM_EDITPOST' => '编辑提交',
'PORTAL_ADMINENJOYROAM_INDEX' => '市井漫游',
'PORTAL_ADMINENJOYSKY_ADD' => '添加显示',
'PORTAL_ADMINENJOYSKY_ADDPOST' => '添加提交',
'PORTAL_ADMINENJOYSKY_DELETE' => '删除',
'PORTAL_ADMINENJOYSKY_EDIT' => '编辑显示',
'PORTAL_ADMINENJOYSKY_EDITPOST' => '编辑提交',
'PORTAL_ADMINENJOYSKY_INDEX' => '户外天堂',
'PORTAL_ADMINEXE_DEFAULT' => '星际活动',
'PORTAL_ADMININDEX_DEFAULT' => '门户管理',
... ... @@ -158,23 +195,103 @@ return array (
'PORTAL_ADMINPAGE_EDITPOST' => '编辑页面提交',
'PORTAL_ADMINPAGE_INDEX' => '页面管理',
'PORTAL_ADMINREGION_DEFAULT' => '星域秀场',
'PORTAL_ADMINREGIONFUTURE_ADD' => '添加显示',
'PORTAL_ADMINREGIONFUTURE_ADDPOST' => '添加提交',
'PORTAL_ADMINREGIONFUTURE_DELETE' => '删除',
'PORTAL_ADMINREGIONFUTURE_EDIT' => '编辑显示',
'PORTAL_ADMINREGIONFUTURE_EDITPOST' => '编辑提交',
'PORTAL_ADMINREGIONFUTURE_INDEX' => '童趣未来',
'PORTAL_ADMINREGIONGALLERY_ADD' => '添加显示',
'PORTAL_ADMINREGIONGALLERY_ADDPOST' => '添加提交',
'PORTAL_ADMINREGIONGALLERY_DELETE' => '删除',
'PORTAL_ADMINREGIONGALLERY_EDIT' => '编辑显示',
'PORTAL_ADMINREGIONGALLERY_EDITPOST' => '编辑提交',
'PORTAL_ADMINREGIONGALLERY_INDEX' => '星球画廊',
'PORTAL_ADMINREGIONNEWS_ADD' => '添加显示',
'PORTAL_ADMINREGIONNEWS_ADDPOST' => '添加提交',
'PORTAL_ADMINREGIONNEWS_DELETE' => '删除',
'PORTAL_ADMINREGIONNEWS_EDIT' => '编辑显示',
'PORTAL_ADMINREGIONNEWS_EDITPOST' => '编辑提交',
'PORTAL_ADMINREGIONNEWS_INDEX' => '独角快报',
'PORTAL_ADMINREGIONNOTE_ADD' => '添加显示',
'PORTAL_ADMINREGIONNOTE_ADDPOST' => '添加提交',
'PORTAL_ADMINREGIONNOTE_DELETE' => '删除',
'PORTAL_ADMINREGIONNOTE_EDIT' => '编辑显示',
'PORTAL_ADMINREGIONNOTE_EDITPOST' => '编辑提交',
'PORTAL_ADMINREGIONNOTE_INDEX' => '独角日志',
'PORTAL_ADMINREGIONSTAR_ADD' => '添加显示',
'PORTAL_ADMINREGIONSTAR_ADDPOST' => '添加提交',
'PORTAL_ADMINREGIONSTAR_DELETE' => '删除',
'PORTAL_ADMINREGIONSTAR_EDIT' => '编辑显示',
'PORTAL_ADMINREGIONSTAR_EDITPOST' => '编辑提交',
'PORTAL_ADMINREGIONSTAR_INDEX' => '明星访谈',
'PORTAL_ADMINREGIONVIDEO_ADD' => '添加显示',
'PORTAL_ADMINREGIONVIDEO_ADDPOST' => '添加提交',
'PORTAL_ADMINREGIONVIDEO_DELETE' => '删除',
'PORTAL_ADMINREGIONVIDEO_EDIT' => '编辑显示',
'PORTAL_ADMINREGIONVIDEO_EDITPOST' => '编辑提交',
'PORTAL_ADMINREGIONVIDEO_INDEX' => '星球影院',
'PORTAL_ADMINSCOUT_DEFAULT' => '星探推荐',
'PORTAL_ADMINSCOUTDESIGN_ADD' => '添加显示',
'PORTAL_ADMINSCOUTDESIGN_ADDPOST' => '添加提交',
'PORTAL_ADMINSCOUTDESIGN_DELETE' => '删除',
'PORTAL_ADMINSCOUTDESIGN_EDIT' => '编辑显示',
'PORTAL_ADMINSCOUTDESIGN_EDITPOST' => '编辑提交',
'PORTAL_ADMINSCOUTDESIGN_INDEX' => '创意设计',
'PORTAL_ADMINSCOUTLIKE_ADD' => '添加显示',
'PORTAL_ADMINSCOUTLIKE_ADDPOST' => '添加提交',
'PORTAL_ADMINSCOUTLIKE_DELETE' => '删除',
'PORTAL_ADMINSCOUTLIKE_EDIT' => '编辑显示',
'PORTAL_ADMINSCOUTLIKE_EDITPOST' => '编辑提交',
'PORTAL_ADMINSCOUTLIKE_INDEX' => '悦己悦人',
'PORTAL_ADMINSCOUTSCENERY_ADD' => '添加显示',
'PORTAL_ADMINSCOUTSCENERY_ADDPOST' => '添加提交',
'PORTAL_ADMINSCOUTSCENERY_DELETE' => '删除',
'PORTAL_ADMINSCOUTSCENERY_EDIT' => '编辑显示',
'PORTAL_ADMINSCOUTSCENERY_EDITPOST' => '编辑提交',
'PORTAL_ADMINSCOUTSCENERY_INDEX' => '地道风物',
'PORTAL_ADMINSCOUTTRAVEL_ADD' => '添加显示',
'PORTAL_ADMINSCOUTTRAVEL_ADDPOST' => '添加提交',
'PORTAL_ADMINSCOUTTRAVEL_DELETE' => '删除',
'PORTAL_ADMINSCOUTTRAVEL_EDIT' => '编辑显示',
'PORTAL_ADMINSCOUTTRAVEL_EDITPOST' => '编辑提交',
'PORTAL_ADMINSCOUTTRAVEL_INDEX' => '旅游路线',
'PORTAL_ADMINSTAR_DEFAULT' => '星球奇境',
'PORTAL_ADMINSTARECOLOGY_ADD' => '添加显示',
'PORTAL_ADMINSTARECOLOGY_ADDPOST' => '添加提交',
'PORTAL_ADMINSTARECOLOGY_DELETE' => '删除',
'PORTAL_ADMINSTARECOLOGY_EDIT' => '编辑显示',
'PORTAL_ADMINSTARECOLOGY_EDITPOST' => '编辑提交',
'PORTAL_ADMINSTARECOLOGY_INDEX' => '活力生态',
'PORTAL_ADMINSTARFOOD_ADD' => '添加显示',
'PORTAL_ADMINSTARFOOD_ADDPOST' => '添加提交',
'PORTAL_ADMINSTARFOOD_DELETE' => '删除',
'PORTAL_ADMINSTARFOOD_EDIT' => '编辑显示',
'PORTAL_ADMINSTARFOOD_EDITPOST' => '编辑提交',
'PORTAL_ADMINSTARFOOD_INDEX' => '异域珍馐',
'PORTAL_ADMINSTARHOTEL_ADD' => '添加显示',
'PORTAL_ADMINSTARHOTEL_ADDPOST' => '添加提交',
'PORTAL_ADMINSTARHOTEL_DELETE' => '删除',
'PORTAL_ADMINSTARHOTEL_EDIT' => '编辑显示',
'PORTAL_ADMINSTARHOTEL_EDITPOST' => '编辑提交',
'PORTAL_ADMINSTARHOTEL_INDEX' => '良宿美寝',
'PORTAL_ADMINSTARSCENERY_ADD' => '添加显示',
'PORTAL_ADMINSTARSCENERY_ADDPOST' => '添加提交',
'PORTAL_ADMINSTARSCENERY_DELETE' => '删除',
'PORTAL_ADMINSTARSCENERY_EDIT' => '编辑显示',
'PORTAL_ADMINSTARSCENERY_EDITPOST' => '编辑提交',
'PORTAL_ADMINSTARSCENERY_INDEX' => '网红美景',
'PORTAL_ADMINSTARSTORY_ADD' => '添加显示',
'PORTAL_ADMINSTARSTORY_ADDPOST' => '添加提交',
'PORTAL_ADMINSTARSTORY_DELETE' => '删除',
'PORTAL_ADMINSTARSTORY_EDIT' => '编辑显示',
'PORTAL_ADMINSTARSTORY_EDITPOST' => '编辑提交',
'PORTAL_ADMINSTARSTORY_INDEX' => '星球故事',
'PORTAL_ADMINSTARTRIP_ADD' => '添加显示',
'PORTAL_ADMINSTARTRIP_ADDPOST' => '添加提交',
'PORTAL_ADMINSTARTRIP_DELETE' => '删除',
'PORTAL_ADMINSTARTRIP_EDIT' => '编辑显示',
'PORTAL_ADMINSTARTRIP_EDITPOST' => '编辑提交',
'PORTAL_ADMINSTARTRIP_INDEX' => '便利出行',
'PORTAL_ADMINTAG_ADD' => '添加文章标签',
'PORTAL_ADMINTAG_ADDPOST' => '添加文章标签提交',
... ...
<php>
if (!function_exists('_get_system_widget')) {
function _get_system_widget($name){
</php>
<php>function _get_system_widget($name){</php>
<switch name="name">
<case value="CmfHub">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">交流方式</h3>
</div>
<div class="panel-body home-info">
<ul class="list-unstyled">
<li>
<em>官网</em> <span><a href="http://www.thinkcmf.com" target="_blank">www.thinkcmf.com</a></span>
</li>
<li><em>QQ 群</em> <span>100828313,316669417</span></li>
<li><em>联系邮箱</em> <span>catman@thinkcmf.com</span></li>
</ul>
</div>
</div>
</case>
<case value="CmfDocuments">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">开发手册</h3>
</div>
<div class="panel-body home-info">
<ul class="list-unstyled">
<li>
<em>完全开发手册</em>
<span>
<a class="label label-success" href="http://www.thinkcmf.com/doc.html"
target="_blank">立即阅读</a>
</span>
</li>
<li>
<em>常见问题手册</em>
<span>
<a class="label label-success" href="http://www.thinkcmf.com/faq.html"
target="_blank">立即阅读</a>
</span>
</li>
<li>
<em>模板开发教程</em>
<span>
<a class="label label-success" href="http://www.thinkcmf.com/theme_tutorial.html"
target="_blank">立即阅读</a>
</span>
</li>
<li>
<em>API开发手册</em>
<span>
<a class="label label-success" href="http://www.thinkcmf.com/cmf5api.html"
target="_blank">立即阅读</a>
</span>
</li>
</ul>
</div>
</div>
</case>
<case value="MainContributors">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">主要贡献者</h3>
<h3 class="panel-title">技术支持</h3>
</div>
<div class="panel-body home-info">
<ul class="list-inline">
<li>老猫</li>
<li>Sam</li>
<li>Tuolaji</li>
<li>睡不醒的猪</li>
<li>小夏</li>
<li>Powerless</li>
<li>WelKinVan</li>
<li>Kane</li>
<li>iYting</li>
<li>pl125</li>
<li>五五</li>
</ul>
</div>
</div>
</case>
<case value="Contributors">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">贡献者</h3>
</div>
<div class="panel-body home-info">
<ul class="list-inline">
<li>Kin Ho</li>
<li><a href="https://www.wzxaini9.cn/" target="_blank">Powerless</a></li>
<li>Jess</li>
<li>木兰情</li>
<li>Labulaka</li>
<li><a href="http://www.syousoft.com/" target="_blank">WelKinVan</a></li>
<li><a href="http://blog.sina.com.cn/u/1918098881" target="_blank">Jeson</a></li>
<li>Yim</li>
<li><a href="http://www.jamlee.cn/" target="_blank">Jamlee</a></li>
<li>香香咸蛋黄</li>
<li><a href="http://www.xdmeng.cn" target="_blank">小凯</a></li>
<li>Co</li>
<li>Rainfer</li>
<li><a href="http://www.yaoweixiu.cn/" target="_blank">Kane</a></li>
<li>北岸的云</li>
<li>pl125</li>
<li><a href="http://www.wuwuseo.com/" target="_blank">五五</a></li>
<li>银河百荣科技</li>
</ul>
</div>
</div>
</case>
</switch>
<php>
}
}
</php>
<php>}</php>
<include file="public@header"/>
<style>
... ... @@ -152,18 +53,6 @@
</head>
<body>
<div class="wrap">
<empty name="has_smtp_setting">
<div class="grid-item col-md-12">
<div class="alert alert-danger alert-dismissible fade in" role="alert" style="margin-bottom: 0;">
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<strong>提示!</strong> 邮箱配置未完成,无法进行邮件发送!
<a href="#" data-dismiss="alert" aria-label="Close"
onclick="parent.openapp('{:url('Mailer/index')}','admin_mailer_index','邮箱配置');">现在设置</a>
</div>
</div>
</empty>
<if condition="!extension_loaded('fileinfo')">
<div class="grid-item col-md-12">
... ... @@ -176,24 +65,6 @@
</div>
</if>
<div class="grid-item col-md-12" id="thinkcmf-notices-grid" style="display:none;">
<div class="dashboard-box">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{:lang('SYSTEM_NOTIFICATIONS')}</h3>
</div>
<div class="panel-body home-info">
<ul id="thinkcmf-notices" class="list-unstyled">
<li>
<img src="__TMPL__/public/assets/images/loading.gif" style="vertical-align: middle;"/>
<span style="display: inline-block; vertical-align: middle;">加载中...</span>
</li>
</ul>
</div>
</div>
</div>
</div>
<div class="home-grid">
<!-- width of .grid-sizer used for columnWidth -->
<div class="grid-sizer"></div>
... ... @@ -218,7 +89,7 @@
<script src="__STATIC__/js/admin.js"></script>
<php>
$lang_set=defined('LANG_SET')?LANG_SET:'';
$thinkcmf_version=cmf_version();
$BRONET_VERSION=defined('BRONET_VERSION')?BRONET_VERSION:'';
</php>
<script>
... ... @@ -320,26 +191,6 @@
}
});
}
//获取官方通知
$.getJSON("//www.thinkcmf.com/service/sms_jsonp.php?lang={$lang_set}&v={$thinkcmf_version}&callback=?",
function (data) {
var tpl = '<li><em class="title"></em><span class="content"></span></li>';
var $notices = $("#thinkcmf-notices");
$notices.empty();
if (data.length > 0) {
$('#thinkcmf-notices-grid').show();
$.each(data, function (i, n) {
var $tpl = $(tpl);
$(".title", $tpl).html(n.title);
$(".content", $tpl).html(n.content);
$notices.append($tpl);
});
} else {
$notices.append("<li>^_^,{:lang('NO_NOTICE')}~~</li>");
}
});
</script>
<hook name="admin_before_body_end"/>
</body>
... ...