diff --git a/application/plugins/view/weixinwebauthorization/admin/admin/index.html b/application/plugins/view/weixinwebauthorization/admin/admin/index.html
new file mode 100755
index 0000000000000000000000000000000000000000..64fa0cc158dc7d6a3b99581e4d78f1e672c28c2b
--- /dev/null
+++ b/application/plugins/view/weixinwebauthorization/admin/admin/index.html
@@ -0,0 +1,48 @@
+{{include file="public/header" /}}
+
+
+
+
+
+
+
+
+
+
+ {{if !empty($data['appid'])}}
+ {{$data.appid}}
+ {{else /}}
+ 未填写
+ {{/if}}
+
+
+
+
+
+ {{if isset($data['auth_type']) and $data['auth_type'] eq 1}}
+ 弹出授权
+ {{else /}}
+ 静默授权
+ {{/if}}
+
+
+
+
+
+
编辑
+
+
+
+
+
+
+{{include file="public/footer" /}}
+
\ No newline at end of file
diff --git a/application/plugins/view/weixinwebauthorization/admin/admin/saveinfo.html b/application/plugins/view/weixinwebauthorization/admin/admin/saveinfo.html
new file mode 100755
index 0000000000000000000000000000000000000000..e91ad8e42d7c5ed7df711be97d8d448287289d37
--- /dev/null
+++ b/application/plugins/view/weixinwebauthorization/admin/admin/saveinfo.html
@@ -0,0 +1,40 @@
+{{include file="public/header" /}}
+
+
+
+
+
+
+{{include file="public/footer" /}}
+
\ No newline at end of file
diff --git a/application/plugins/view/weixinwebauthorization/index/public/auth_button.html b/application/plugins/view/weixinwebauthorization/index/public/auth_button.html
new file mode 100755
index 0000000000000000000000000000000000000000..5e6140958bc97867ecf9a67329faeb706d4243a0
--- /dev/null
+++ b/application/plugins/view/weixinwebauthorization/index/public/auth_button.html
@@ -0,0 +1 @@
+微信登录
\ No newline at end of file
diff --git a/application/plugins/view/weixinwebauthorization/index/public/auth_text.html b/application/plugins/view/weixinwebauthorization/index/public/auth_text.html
new file mode 100644
index 0000000000000000000000000000000000000000..4363c7ebc1b112fb79fedf37012fa3310166688c
--- /dev/null
+++ b/application/plugins/view/weixinwebauthorization/index/public/auth_text.html
@@ -0,0 +1 @@
+微信登录
\ No newline at end of file
diff --git a/application/plugins/weixinwebauthorization/Hook.php b/application/plugins/weixinwebauthorization/Hook.php
new file mode 100644
index 0000000000000000000000000000000000000000..b5b65d2cbdb6932785e0edb6165abd1069d195b5
--- /dev/null
+++ b/application/plugins/weixinwebauthorization/Hook.php
@@ -0,0 +1,85 @@
+ButtonHtml($params);
+ break;
+
+ // 公共顶部小导航钩子-左侧
+ case 'plugins_view_header_navigation_top_left' :
+ $ret = $this->NavTextHtml($params);
+ break;
+
+ default :
+ $ret = '';
+ }
+ return $ret;
+ }
+ }
+
+ /**
+ * 登录登录html
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2019-05-24
+ * @desc description
+ * @param array $params [description]
+ */
+ private function ButtonHtml($params = [])
+ {
+ return $this->fetch('../../../plugins/view/weixinwebauthorization/index/public/auth_button');
+ }
+
+ /**
+ * 文字登录html
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @date 2019-05-24
+ * @desc description
+ * @param array $params [description]
+ */
+ private function NavTextHtml($params = [])
+ {
+ return $this->fetch('../../../plugins/view/weixinwebauthorization/index/public/auth_text');
+ }
+}
+?>
\ No newline at end of file
diff --git a/application/plugins/weixinwebauthorization/admin/Admin.php b/application/plugins/weixinwebauthorization/admin/Admin.php
new file mode 100644
index 0000000000000000000000000000000000000000..7192552ae2d15f1125c1bcf0887bd4eadff5f7f1
--- /dev/null
+++ b/application/plugins/weixinwebauthorization/admin/Admin.php
@@ -0,0 +1,85 @@
+assign('data', $ret['data']);
+ return $this->fetch('../../../plugins/view/weixinwebauthorization/admin/admin/index');
+ } else {
+ return $ret['msg'];
+ }
+ }
+
+ /**
+ * 编辑页面
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @datetime 2019-02-07T08:21:54+0800
+ * @param [array] $params [输入参数]
+ */
+ public function saveinfo($params = [])
+ {
+ $ret = PluginsService::PluginsData('weixinwebauthorization');
+ if($ret['code'] == 0)
+ {
+ // 授权方式
+ $is_auth_type_list = [
+ 0 => array('id' => 0, 'name' => '静默授权', 'checked' => true),
+ 1 => array('id' => 1, 'name' => '弹出授权'),
+ ];
+
+ $this->assign('is_auth_type_list', $is_auth_type_list);
+ $this->assign('data', $ret['data']);
+ return $this->fetch('../../../plugins/view/weixinwebauthorization/admin/admin/saveinfo');
+ } else {
+ return $ret['msg'];
+ }
+ }
+
+ /**
+ * 数据保存
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @datetime 2019-02-07T08:21:54+0800
+ * @param [array] $params [输入参数]
+ */
+ public function save($params = [])
+ {
+ return PluginsService::PluginsDataSave(['plugins'=>'weixinwebauthorization', 'data'=>$params]);
+ }
+}
+?>
\ No newline at end of file
diff --git a/application/plugins/weixinwebauthorization/config.json b/application/plugins/weixinwebauthorization/config.json
new file mode 100644
index 0000000000000000000000000000000000000000..83f519d81d038067a14c5923aa2f1e393c919a1a
--- /dev/null
+++ b/application/plugins/weixinwebauthorization/config.json
@@ -0,0 +1,30 @@
+{
+ "base":{
+ "plugins":"weixinwebauthorization",
+ "name":"微信登录",
+ "logo":"\/static\/upload\/images\/plugins_weixinwebauthorization\/2019\/05\/24\/1558681549248354.jpg",
+ "author":"Devil",
+ "author_url":"https:\/\/shopxo.net\/",
+ "version":"1.0.0",
+ "desc":"微信授权登录、注册",
+ "apply_terminal":[
+ "pc",
+ "h5"
+ ],
+ "apply_version":[
+ "1.5.0"
+ ],
+ "is_home":false
+ },
+ "hook":{
+ "plugins_view_user_login_info_top":[
+ "app\\plugins\\weixinwebauthorization\\Hook"
+ ],
+ "plugins_view_user_reg_info_top":[
+ "app\\plugins\\weixinwebauthorization\\Hook"
+ ],
+ "plugins_view_header_navigation_top_left":[
+ "app\\plugins\\weixinwebauthorization\\Hook"
+ ]
+ }
+}
\ No newline at end of file
diff --git a/application/plugins/weixinwebauthorization/index/Auth.php b/application/plugins/weixinwebauthorization/index/Auth.php
new file mode 100644
index 0000000000000000000000000000000000000000..b23ac31a7180ddcc37d4aefa5a081336bf9bbd9a
--- /dev/null
+++ b/application/plugins/weixinwebauthorization/index/Auth.php
@@ -0,0 +1,75 @@
+assign('msg', 'appid未配置');
+ return $this->fetch('public/tips_error');
+ }
+
+ // 回调地址
+ $redirect_uri = urlencode(PluginsHomeUrl('weixinwebauthorization', 'auth', 'callback'));
+
+ // 授权方式
+ $auth_type = (isset($ret['data']['auth_type']) && $ret['data']['auth_type'] == 1) ? 'snsapi_userinfo' : 'snsapi_base';
+
+ // 授权code
+ $url = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid='.$ret['data']['appid'].'&redirect_uri='.$redirect_uri.'&response_type=code&scope='.$auth_type.'&state=login#wechat_redirect';
+ return redirect($url);
+ } else {
+ $this->assign('msg', $ret['msg']);
+ return $this->fetch('public/tips_error');
+ }
+ }
+
+ /**
+ * 回调
+ * @author Devil
+ * @blog http://gong.gg/
+ * @version 1.0.0
+ * @datetime 2019-02-07T08:21:54+0800
+ * @param [array] $params [输入参数]
+ */
+ public function callback($params = [])
+ {
+ echo '';
+ print_r($params);
+ }
+
+}
+?>
\ No newline at end of file
diff --git a/application/tags.php b/application/tags.php
index 10963e1eebf54b229ec8f971d448e3fd0250c714..cdcd9c78f9fa694d43e310aceaa773573fdeb932 100755
--- a/application/tags.php
+++ b/application/tags.php
@@ -103,10 +103,12 @@ return array (
'plugins_view_header_navigation_top_left' =>
array (
0 => 'app\\plugins\\touristbuy\\Hook',
+ 1 => 'app\\plugins\\weixinwebauthorization\\Hook',
),
'plugins_view_user_login_info_top' =>
array (
0 => 'app\\plugins\\touristbuy\\Hook',
+ 1 => 'app\\plugins\\weixinwebauthorization\\Hook',
),
'plugins_view_user_reg_info' =>
array (
@@ -154,5 +156,9 @@ return array (
array (
0 => 'app\\plugins\\wallet\\Hook',
),
+ 'plugins_view_user_reg_info_top' =>
+ array (
+ 0 => 'app\\plugins\\weixinwebauthorization\\Hook',
+ ),
);
?>
\ No newline at end of file
diff --git a/public/static/plugins/css/weixinwebauthorization/admin/admin.css b/public/static/plugins/css/weixinwebauthorization/admin/admin.css
new file mode 100755
index 0000000000000000000000000000000000000000..548dc59f4c852d3556c8f4403bcacd50f3e81f7a
--- /dev/null
+++ b/public/static/plugins/css/weixinwebauthorization/admin/admin.css
@@ -0,0 +1,11 @@
+/**
+ * 首页
+ */
+.weixinwebauthorization-content .items {
+ margin: 10px 0 20px 0;
+ border-bottom: 1px dashed #f1f1f1;
+ padding-bottom: 20px;
+}
+.weixinwebauthorization-content .edit-submit {
+ margin-bottom: 20px;
+}
\ No newline at end of file
diff --git a/public/static/upload/images/plugins_weixinwebauthorization/2019/05/24/1558681549248354.jpg b/public/static/upload/images/plugins_weixinwebauthorization/2019/05/24/1558681549248354.jpg
new file mode 100644
index 0000000000000000000000000000000000000000..a6b85d46167fb62b4d210d3a19ee39e2a911c05a
Binary files /dev/null and b/public/static/upload/images/plugins_weixinwebauthorization/2019/05/24/1558681549248354.jpg differ