From 97269bea42ec4c441d5852ee0f9ed6f37366d0f4 Mon Sep 17 00:00:00 2001 From: Devil Date: Thu, 4 Mar 2021 21:50:30 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=90=8E=E5=8F=B0=E3=80=81=E5=89=8D=E7=AB=AF?= =?UTF-8?q?=E7=99=BB=E5=BD=95=E6=94=AF=E6=8C=81=E5=B8=90=E5=8F=B7=E5=AF=86?= =?UTF-8?q?=E7=A0=81=EF=BC=8C=E9=82=AE=E7=AE=B1=E9=AA=8C=E8=AF=81=E7=A0=81?= =?UTF-8?q?=EF=BC=8C=E6=89=8B=E6=9C=BA=E9=AA=8C=E8=AF=81=E7=A0=81=E3=80=82?= =?UTF-8?q?2.=E5=BE=AE=E4=BF=A1=E5=B0=8F=E7=A8=8B=E5=BA=8F=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E6=96=B0=E8=A7=84=E9=80=82=E9=85=8D=E3=80=823.api?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=B8=90=E5=8F=B7=E5=AF=86=E7=A0=81=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E9=AA=8C=E8=AF=81=E7=A0=81=E7=99=BB=E5=BD=95=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E3=80=824.=E9=83=A8=E5=88=86=E7=BB=86=E8=8A=82?= =?UTF-8?q?=E4=BC=98=E5=8C=96+bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/Admin.php | 147 +++-- application/admin/controller/Config.php | 38 +- application/admin/controller/Site.php | 18 +- application/admin/form/Admin.php | 10 + application/admin/lang/zh-cn.php | 48 +- .../admin/view/default/admin/login_info.html | 159 +++++- .../admin/view/default/admin/save_info.html | 20 +- .../admin/view/default/config/index.html | 121 +++-- .../admin/view/default/email/message.html | 55 +- .../admin/view/default/lib/gender.html | 2 +- .../orderaftersale/module/operate.html | 4 +- .../admin/view/default/site/base/index.html | 10 +- .../admin/view/default/site/cache/index.html | 4 +- .../view/default/site/extends/index.html | 10 +- .../view/default/site/forgetpwd/index.html | 6 +- .../admin/view/default/site/login/index.html | 50 +- .../view/default/site/register/index.html | 72 +-- .../view/default/site/siteset/extends.html | 18 +- .../view/default/site/siteset/index.html | 10 +- .../view/default/site/siteset/search.html | 10 +- .../view/default/site/sitetype/index.html | 10 +- .../admin/view/default/site/verify/index.html | 10 +- .../admin/view/default/sms/message.html | 55 +- application/api/controller/User.php | 56 +- application/common.php | 32 ++ application/index/controller/Common.php | 4 + application/index/controller/User.php | 178 +++--- .../index/view/default/index/index.html | 6 +- .../index/view/default/public/header_nav.html | 4 +- .../view/default/public/header_top_nav.html | 4 +- .../index/view/default/safety/email_info.html | 2 +- .../view/default/safety/mobile_info.html | 2 +- .../view/default/safety/new_email_info.html | 2 +- .../view/default/safety/new_mobile_info.html | 2 +- .../view/default/user/forget_pwd_info.html | 22 +- .../view/default/user/images_verify.html | 17 + .../view/default/user/login_content.html | 114 ++++ .../index/view/default/user/login_info.html | 54 +- .../view/default/user/modal_login_info.html | 64 +-- .../index/view/default/user/reg_info.html | 59 +- application/lang/zh-cn.php | 512 +++++++++--------- application/service/AdminService.php | 393 +++++++++++++- application/service/BaseService.php | 7 + application/service/ConfigService.php | 30 +- application/service/SafetyService.php | 2 +- application/service/UserService.php | 376 ++++++++++--- application/tags.php | 119 ++++ changelog.txt | 10 +- config/shopxo.sql | 293 +++++++--- extend/base/Wechat.php | 7 +- extend/payment/Weixin.php | 2 +- .../admin/default/css/admin.logininfo.css | 52 +- .../admin/default/css/appmini.config.css | 3 - public/static/admin/default/css/common.css | 8 + public/static/admin/default/css/config.css | 1 - public/static/admin/default/css/goods.css | 8 - public/static/admin/default/css/site.css | 8 - public/static/admin/default/js/admin.js | 136 +++++ public/static/admin/default/js/email.js | 3 +- .../static/admin/default/js/orderaftersale.js | 3 + public/static/common/css/common.css | 26 +- .../static/common/lib/ueditor/ueditor.all.js | 7 +- public/static/index/default/css/common.css | 37 +- public/static/index/default/css/user.css | 50 +- public/static/index/default/js/common.js | 2 +- public/static/index/default/js/user.js | 3 +- sourcecode/weixin/default/app.js | 27 +- .../weixin/default/pages/login/login.js | 9 +- .../weixin/default/pages/login/login.wxml | 2 +- 69 files changed, 2551 insertions(+), 1094 deletions(-) create mode 100644 application/index/view/default/user/images_verify.html create mode 100644 application/index/view/default/user/login_content.html delete mode 100644 public/static/admin/default/css/appmini.config.css delete mode 100755 public/static/admin/default/css/config.css diff --git a/application/admin/controller/Admin.php b/application/admin/controller/Admin.php index bae968032..c9f3ae3b6 100755 --- a/application/admin/controller/Admin.php +++ b/application/admin/controller/Admin.php @@ -23,12 +23,13 @@ use app\service\AdminService; class Admin extends Common { /** - * 构造方法 - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2016-12-03T12:39:08+0800 - */ + * 构造方法 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2021-03-03 + * @desc description + */ public function __construct() { // 调用父类前置方法 @@ -36,11 +37,12 @@ class Admin extends Common } /** - * [Index 管理员列表] - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2016-12-06T21:31:53+0800 + * 管理员列表 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2021-03-03 + * @desc description */ public function Index() { @@ -81,10 +83,11 @@ class Admin extends Common /** * 详情 - * @author Devil - * @blog http://gong.gg/ - * @version 1.0.0 - * @datetime 2019-08-05T08:21:54+0800 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2021-03-03 + * @desc description */ public function Detail() { @@ -109,11 +112,12 @@ class Admin extends Common } /** - * [SaveInfo 管理员添加/编辑页面] - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2016-12-06T21:31:53+0800 + * 管理员添加/编辑页面 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2021-03-03 + * @desc description */ public function SaveInfo() { @@ -178,11 +182,12 @@ class Admin extends Common } /** - * [Save 管理员添加/编辑] - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2016-12-07T21:58:19+0800 + * 管理员添加/编辑 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2021-03-03 + * @desc description */ public function Save() { @@ -211,12 +216,13 @@ class Admin extends Common } /** - * [Delete 管理员删除] - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2016-12-09T21:13:47+0800 - */ + * 管理员删除 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2021-03-03 + * @desc description + */ public function Delete() { // 是否ajax @@ -238,11 +244,12 @@ class Admin extends Common } /** - * [LoginInfo 登录页面] - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2016-12-03T12:55:53+0800 + * 登录页面 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2021-03-03 + * @desc description */ public function LoginInfo() { @@ -252,6 +259,9 @@ class Admin extends Common return redirect(MyUrl('admin/index/index')); } + // 登录方式 + $this->assign('admin_login_type', MyC('admin_login_type', [], true)); + // 背景图片 $host = config('shopxo.attachment_host'); $bg_images_list = [ @@ -285,12 +295,13 @@ class Admin extends Common } /** - * [Login 管理员登录] - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2016-12-03T21:46:49+0800 - */ + * 管理员登录 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2021-03-03 + * @desc description + */ public function Login() { // 是否ajax @@ -304,13 +315,53 @@ class Admin extends Common return AdminService::Login($params); } + /** + * 验证码显示 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2021-03-03 + * @desc description + */ + public function AdminVerifyEntry() + { + $params = [ + 'width' => 100, + 'height' => 26, + 'key_prefix' => 'admin_login', + ]; + $verify = new \base\Verify($params); + $verify->Entry(); + } + + /** + * 登录验证码发送 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2021-03-03 + * @desc description + */ + public function LoginVerifySend() + { + // 是否ajax请求 + if(!IS_AJAX) + { + return $this->error('非法访问'); + } + + // 调用服务层 + return AdminService::LoginVerifySend($this->data_post); + } + /** - * [Logout 退出] - * @author Devil - * @blog http://gong.gg/ - * @version 0.0.1 - * @datetime 2016-12-05T14:31:23+0800 - */ + * 退出 + * @author Devil + * @blog http://gong.gg/ + * @version 1.0.0 + * @date 2021-03-03 + * @desc description + */ public function Logout() { AdminService::LoginLogout(); diff --git a/application/admin/controller/Config.php b/application/admin/controller/Config.php index 1d4e51ae4..4b70f998c 100755 --- a/application/admin/controller/Config.php +++ b/application/admin/controller/Config.php @@ -52,6 +52,8 @@ class Config extends Common // 静态数据 $this->assign('common_excel_charset_list', lang('common_excel_charset_list')); $this->assign('common_is_enable_list', lang('common_is_enable_list')); + $this->assign('common_login_type_list', lang('common_login_type_list')); + $this->assign('common_close_open_list', lang('common_close_open_list')); // 配置信息 $this->assign('data', ConfigService::ConfigList()); @@ -83,15 +85,41 @@ class Config extends Common */ public function Save() { - // 数据处理 - // 商店二维码 - if(!isset($_POST['common_customer_store_qrcode'])) + // 参数 + $params = $_POST; + + // 字段不存在赋值 + $empty_value_field_list = [ + 'common_customer_store_qrcode'=>'', + ]; + if(!empty($empty_value_field_list)) { - $_POST['common_customer_store_qrcode'] = ''; + foreach($empty_value_field_list as $fk=>$fv) + { + if(!isset($params[$fk])) + { + $params[$fk] = $fv; + } + } + } + + // 默认值字段处理 + $default_value_field_list = [ + 'admin_login_type'=>'username', + ]; + if(!empty($default_value_field_list)) + { + foreach($default_value_field_list as $fk=>$fv) + { + if(empty($params[$fk])) + { + $params[$fk] = $fv; + } + } } // 保存 - return ConfigService::ConfigSave($_POST); + return ConfigService::ConfigSave($params); } } ?> \ No newline at end of file diff --git a/application/admin/controller/Site.php b/application/admin/controller/Site.php index af4a473e1..06b4f57b0 100755 --- a/application/admin/controller/Site.php +++ b/application/admin/controller/Site.php @@ -148,17 +148,14 @@ class Site extends Common // 时区 $this->assign('site_timezone_list', lang('site_timezone_list')); - // 站点状态 - $this->assign('site_site_state_list', lang('site_site_state_list')); + // 关闭开启 + $this->assign('common_close_open_list', lang('common_close_open_list')); + + // 登录方式 + $this->assign('common_login_type_list', lang('common_login_type_list')); // 用户注册类型列表 - $this->assign('common_user_reg_state_list', lang('common_user_reg_state_list')); - - // 是否开启用户登录 - $this->assign('site_user_login_state_list', lang('site_user_login_state_list')); - - // 获取验证码-开启图片验证码 - $this->assign('site_img_verify_state_list', lang('site_img_verify_state_list')); + $this->assign('common_user_reg_type_list', lang('common_user_reg_type_list')); // 图片验证码规则 $this->assign('site_images_verify_rules_list', lang('site_images_verify_rules_list')); @@ -276,12 +273,13 @@ class Site extends Common { // 用户注册 case 'register' : - $field_list[] = 'home_user_reg_state'; + $field_list[] = 'home_user_reg_type'; $field_list[] = 'home_site_user_register_bg_images'; break; // 用户登录 case 'login' : + $field_list[] = 'home_user_login_type'; $field_list[] = 'home_site_user_login_ad1_images'; $field_list[] = 'home_site_user_login_ad2_images'; $field_list[] = 'home_site_user_login_ad3_images'; diff --git a/application/admin/form/Admin.php b/application/admin/form/Admin.php index 716acaa58..03ad62886 100644 --- a/application/admin/form/Admin.php +++ b/application/admin/form/Admin.php @@ -110,6 +110,16 @@ class Admin 'where_type' => 'like', ], ], + [ + 'label' => '邮箱', + 'view_type' => 'field', + 'view_key' => 'email', + 'is_sort' => 1, + 'search_config' => [ + 'form_type' => 'input', + 'where_type' => 'like', + ], + ], [ 'label' => '角色组', 'view_type' => 'field', diff --git a/application/admin/lang/zh-cn.php b/application/admin/lang/zh-cn.php index b6d6ea03d..115c589c2 100755 --- a/application/admin/lang/zh-cn.php +++ b/application/admin/lang/zh-cn.php @@ -16,35 +16,17 @@ * @version 0.0.1 * @datetime 2016-12-01T21:51:08+0800 */ -return array( - // 站点关闭状态列表 - 'site_site_state_list' => array( - 0 => array('value' => 0, 'name' => '关闭', 'checked' => true), - 1 => array('value' => 1, 'name' => '开启'), - ), - - // 是否开启用户登录 - 'site_user_login_state_list' => array( - 0 => array('value' => 0, 'name' => '关闭'), - 1 => array('value' => 1, 'name' => '开启', 'checked' => true), - ), - - // 获取验证码-强制使用图片验证码状态列表 - 'site_img_verify_state_list' => array( - 0 => array('value' => 0, 'name' => '关闭'), - 1 => array('value' => 1, 'name' => '开启', 'checked' => true), - ), - +return [ // 图片验证码 - 'site_images_verify_rules_list' => array( - 0 => array('value' => 'bgcolor', 'name' => '彩色背景'), - 1 => array('value' => 'textcolor', 'name' => '彩色文本'), - 2 => array('value' => 'point', 'name' => '干扰点'), - 3 => array('value' => 'line', 'name' => '干扰线'), - ), + 'site_images_verify_rules_list' => [ + 0 => ['value' => 'bgcolor', 'name' => '彩色背景'], + 1 => ['value' => 'textcolor', 'name' => '彩色文本'], + 2 => ['value' => 'point', 'name' => '干扰点'], + 3 => ['value' => 'line', 'name' => '干扰线'], + ], // 时区 - 'site_timezone_list' => array( + 'site_timezone_list' => [ 'Pacific/Pago_Pago' => '(标准时-11:00) 中途岛、萨摩亚群岛', 'Pacific/Rarotonga' => '(标准时-10:00) 夏威夷', 'Pacific/Gambier' => '(标准时-9:00) 阿拉斯加', @@ -69,15 +51,15 @@ return array( 'Australia/Adelaide' => '(标准时+10:00) 悉尼、关岛', 'Australia/Currie' => '(标准时+11:00) 马加丹、索罗门群岛', 'Pacific/Fiji' => '(标准时+12:00) 奥克兰、惠灵顿、堪察加半岛' - ), + ], // seo // url模式列表 - 'seo_url_model_list' => array( - 0 => array('value' => 0, 'name' => '兼容模式', 'checked' => true), - 1 => array('value' => 1, 'name' => 'PATHINFO模式'), - 2 => array('value' => 2, 'name' => 'PATHINFO模式+短地址'), - ), + 'seo_url_model_list' => [ + 0 => ['value' => 0, 'name' => '兼容模式', 'checked' => true], + 1 => ['value' => 1, 'name' => 'PATHINFO模式'], + 2 => ['value' => 2, 'name' => 'PATHINFO模式+短地址'], + ], // 用户excel导出标题列表 'excel_user_title_list' => [ @@ -126,5 +108,5 @@ return array( 'type' => 'string', ], ], -); +]; ?> \ No newline at end of file diff --git a/application/admin/view/default/admin/login_info.html b/application/admin/view/default/admin/login_info.html index 65a742421..825decbf5 100755 --- a/application/admin/view/default/admin/login_info.html +++ b/application/admin/view/default/admin/login_info.html @@ -6,31 +6,152 @@
-
-
-
-
-
- -
-
- -
-
- + +
+ {{else /}} +
暂时关闭了登录
+ {{/if}}
+{{if MyC('common_img_verify_state') eq 1}} + +
+
+
+ × +
+
+
+ + +
+ +
+
+
+ +{{/if}} + {{if MyC('admin_login_info_bg_images_rand') eq 1 and !empty($bg_images_list) and is_array($bg_images_list)}}
diff --git a/application/admin/view/default/admin/save_info.html b/application/admin/view/default/admin/save_info.html index 1d4350e8a..706e50896 100755 --- a/application/admin/view/default/admin/save_info.html +++ b/application/admin/view/default/admin/save_info.html @@ -10,22 +10,26 @@ 返回
- - + +
- - + +
- - + +
+
+ + +
{{include file="lib/gender" /}} {{if !isset($data['id']) or $admin['id'] neq $data['id']}}
- + {{foreach :lang('common_admin_status_list') as $v}} diff --git a/application/admin/view/default/config/index.html b/application/admin/view/default/config/index.html index 269c8ecdc..c1013c1b6 100755 --- a/application/admin/view/default/config/index.html +++ b/application/admin/view/default/config/index.html @@ -5,44 +5,93 @@
-
- - -
- -
- - -
-

1. 默认背景图片位于[ public/static/admin/default/images/login ]目录下

-

2. 变更图片后、需要在[ application/admin/controller/Admin.php ]文件中[ LoginInfo ]方法中修改[ bg_images_list ]变量

+ +
+
+

基础配置

-
- -
- - -
-
- - -
- -
- - -
- 请到百度地图开放平台申请,查看配置教程 +
+
+ + +
+
+ + +
-
+
+ + +
+
+

登录

+
+
+
+ + +
+

1. 默认背景图片位于[ public/static/admin/default/images/login ]目录下

+

2. 变更图片后、需要在[ application/admin/controller/Admin.php ]文件中[ LoginInfo ]方法中修改[ bg_images_list ]变量

+
+
+
+ + +
+
+ + +
+
+
+ + +
+
+

商品

+
+
+
+ + +
+
+
+ + +
+
+

扩展

+
+
+
+ + +
+ 请到百度地图开放平台申请,查看配置教程 +
+
+
+
+
diff --git a/application/admin/view/default/email/message.html b/application/admin/view/default/email/message.html index 38f651237..08a37b9d8 100755 --- a/application/admin/view/default/email/message.html +++ b/application/admin/view/default/email/message.html @@ -9,21 +9,46 @@
-
- - -
-
- - -
-
- - -
-
- - + +
+
+

后台

+
+
+
+ + +
+
+
+ + +
+
+

前端

+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
diff --git a/application/admin/view/default/lib/gender.html b/application/admin/view/default/lib/gender.html index 0144104ea..4ec3c0fa9 100755 --- a/application/admin/view/default/lib/gender.html +++ b/application/admin/view/default/lib/gender.html @@ -1,6 +1,6 @@
- +
{{foreach :lang('common_gender_list') as $v}}