diff --git a/service/Application/Admin/Controller/AlipayLifeUserController.class.php b/service/Application/Admin/Controller/AlipayLifeUserController.class.php new file mode 100755 index 000000000..991c17b7d --- /dev/null +++ b/service/Application/Admin/Controller/AlipayLifeUserController.class.php @@ -0,0 +1,167 @@ +Is_Login(); + + // 权限校验 + $this->Is_Power(); + } + + /** + * [Index 用户列表] + * @author Devil + * @blog http://gong.gg/ + * @version 0.0.1 + * @datetime 2016-12-06T21:31:53+0800 + */ + public function Index() + { + // 参数 + $param = array_merge($_POST, $_GET); + + // 条件 + $where = $this->GetIndexWhere(); + + // 模型 + $m = M('AlipayLifeUser'); + + // 分页 + $number = MyC('admin_page_number'); + $page_param = array( + 'number' => $number, + 'total' => $m->alias('au')->where($where)->join('INNER JOIN __USER__ AS u ON u.id=au.user_id')->count(), + 'where' => $param, + 'url' => U('Admin/AlipayLifeUser/Index'), + ); + $page = new \Library\Page($page_param); + + // 获取列表 + $field = 'u.*, au.alipay_life_id'; + $list = $this->SetDataHandle($m->alias('au')->where($where)->join('INNER JOIN __USER__ AS u ON u.id=au.user_id')->field($field)->limit($page->GetPageStarNumber(), $number)->order('au.id desc')->select()); + + // 性别 + $this->assign('common_gender_list', L('common_gender_list')); + + // 参数 + $this->assign('param', $param); + + // 分页 + $this->assign('page_html', $page->GetPageHtml()); + + // 数据列表 + $this->assign('list', $list); + + $this->display('Index'); + } + + /** + * [SetDataHandle 数据处理] + * @author Devil + * @blog http://gong.gg/ + * @version 0.0.1 + * @datetime 2016-12-29T21:27:15+0800 + * @param [array] $data [用户数据] + * @return [array] [处理好的数据] + */ + private function SetDataHandle($data) + { + if(!empty($data)) + { + $common_gender_list = L('common_gender_list'); + $life_m = M('AlipayLife'); + foreach($data as &$v) + { + // 生日 + if(!empty($v['birthday'])) + { + $v['birthday_text'] = date('Y-m-d', $v['birthday']); + } else { + $v['birthday_text'] = ''; + } + + // 注册时间 + $v['add_time'] = date('Y-m-d H:i:s', $v['add_time']); + + // 更新时间 + $v['upd_time'] = date('Y-m-d H:i:s', $v['upd_time']); + + // 性别 + $v['gender_text'] = $common_gender_list[$v['gender']]['name']; + + // 所属生活号 + $v['alipay_life_name'] = $life_m->where(['id'=>$v['alipay_life_id']])->getField('name'); + } + } + return $data; + } + + /** + * [GetIndexWhere 用户列表条件] + * @author Devil + * @blog http://gong.gg/ + * @version 0.0.1 + * @datetime 2016-12-10T22:16:29+0800 + */ + private function GetIndexWhere() + { + $where = array('is_delete_time'=>0); + + // 模糊 + if(!empty($_REQUEST['keyword'])) + { + $like_keyword = array('like', '%'.I('keyword').'%'); + $where[] = array( + 'u.username' => $like_keyword, + 'u.nickname' => $like_keyword, + 'u.mobile' => $like_keyword, + '_logic' => 'or', + ); + } + + // 是否更多条件 + if(I('is_more', 0) == 1) + { + // 等值 + if(I('gender', -1) > -1) + { + $where['u.gender'] = intval(I('gender', 0)); + } + + // 表达式 + if(!empty($_REQUEST['time_start'])) + { + $where['au.add_time'][] = array('gt', strtotime(I('time_start'))); + } + if(!empty($_REQUEST['time_end'])) + { + $where['au.add_time'][] = array('lt', strtotime(I('time_end'))); + } + } + + return $where; + } +} +?> \ No newline at end of file diff --git a/service/Application/Admin/Lang/zh-cn/alipaylifeuser.php b/service/Application/Admin/Lang/zh-cn/alipaylifeuser.php new file mode 100755 index 000000000..d9b436454 --- /dev/null +++ b/service/Application/Admin/Lang/zh-cn/alipaylifeuser.php @@ -0,0 +1,37 @@ + '成员添加', + 'alipay_life_user_edit_name' => '成员编辑', + 'alipay_life_user_so_keyword_tips' => '姓名/手机/邮箱/昵称', + 'alipay_life_user_time_start_text' => '起始时间', + 'alipay_life_user_time_end_text' => '结束时间', + 'alipay_life_user_nickname_name' => '昵称', + 'alipay_life_user_birthday_name' => '生日', + 'alipay_life_user_nickname_format' => '昵称最多 16 个字符', + + 'alipay_life_user_birthday_format' => '生日格式有误', + 'alipay_life_user_accounts_param_error' => '至少填写一项手机或邮箱', + + 'alipay_life_user_login_pwd_name' => '登录密码', + 'alipay_life_user_login_pwd_format' => '登录密码格式 6~18 个字符之间', + + 'alipay_life_user_username_name' => '用户名', + 'alipay_life_user_username_format' => '用户名 2~30 个字符', + + 'alipay_life_user_integral_name' => '积分', + + 'alipay_life_user_avatar_name' => '用户头像', + 'alipay_life_user_province_name' => '所在省', + 'alipay_life_user_city_name' => '所在市', + + 'alipay_life_user_alipay_life_name_text' => '所属生活号', +); +?> \ No newline at end of file diff --git a/service/Application/Admin/View/Default/AlipayLifeUser/Index.html b/service/Application/Admin/View/Default/AlipayLifeUser/Index.html new file mode 100755 index 000000000..e9c0127ae --- /dev/null +++ b/service/Application/Admin/View/Default/AlipayLifeUser/Index.html @@ -0,0 +1,153 @@ + + + +
+
+ +
+
+ value="{{$param.organization_id}}" /> + value="{{$param.keyword}}" /> + + + +
none"> + +
+ value="{{$param.time_start}}"/> + ~ + value="{{$param.time_end}}"/> +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{{:L('alipay_life_user_avatar_name')}}{{:L('alipay_life_user_username_name')}}{{:L('common_mobile_name')}}{{:L('alipay_life_user_alipay_life_name_text')}}{{:L('common_view_gender_name')}}{{:L('alipay_life_user_birthday_name')}}{{:L('common_more_name')}}
+ + + + {{:L('common_on_fill_in_images')}} + + + {{:L('common_on_fill_in_the_text')}}{{$v.username}} + + {{:L('common_on_fill_in_the_text')}}{{$v.mobile}} + + {{:L('common_on_fill_in_the_text')}}{{$v.alipay_life_name}} + + {{:L('common_not_set_text')}}{{$v.gender_text}} + + {{:L('common_on_fill_in_the_text')}}{{$v.birthday_text}} + + {{:L('common_see_more_name')}} +
+
+
+

{{:L('common_detail_content')}}

+ × +
+
+
+
{{:L('alipay_life_user_username_name')}}
+
{{:L('common_on_fill_in_the_text')}}{{$v.username}}
+ +
{{:L('alipay_life_user_nickname_name')}}
+
{{:L('common_on_fill_in_the_text')}}{{$v.nickname}}
+ +
{{:L('common_mobile_name')}}
+
{{:L('common_on_fill_in_the_text')}}{{$v.mobile}}
+ +
{{:L('common_email_name')}}
+
{{:L('common_on_fill_in_the_text')}}{{$v.email}}
+ +
{{:L('common_view_gender_name')}}
+
{{:L('common_not_set_text')}}{{$v.gender_text}}
+ +
{{:L('alipay_life_user_birthday_name')}}
+
{{:L('common_on_fill_in_the_text')}}{{$v.birthday_text}}
+ +
{{:L('alipay_life_user_province_name')}}
+
{{:L('common_on_fill_in_the_text')}}{{$v.province}}
+ +
{{:L('alipay_life_user_city_name')}}
+
{{:L('common_on_fill_in_the_text')}}{{$v.city}}
+ +
{{:L('common_address_text')}}
+
{{:L('common_on_fill_in_the_text')}}{{$v.address}}
+ +
{{:L('alipay_life_user_integral_name')}}
+
{{:L('common_on_fill_in_the_text')}}{{$v.integral}}
+ +
{{:L('alipay_life_user_avatar_name')}}
+
+ + + + {{:L('common_on_fill_in_images')}} + +
+ +
{{:L('common_reg_time_name')}}
+
{{$v.add_time}}
+ +
{{:L('common_upd_time_name')}}
+
{{$v.upd_time}}
+
+
+
+
+
{{:L('common_not_data_tips')}}
+ + + + + {{$page_html}} + + +
+
+ + + + + \ No newline at end of file diff --git a/service/Application/Admin/View/Default/User/Index.html b/service/Application/Admin/View/Default/User/Index.html index db50b23a6..60c23b083 100755 --- a/service/Application/Admin/View/Default/User/Index.html +++ b/service/Application/Admin/View/Default/User/Index.html @@ -121,9 +121,6 @@
{{:L('user_integral_name')}}
{{:L('common_on_fill_in_the_text')}}{{$v.integral}}
-
{{:L('user_service_expire_time_name')}}
-
{{:L('common_on_fill_in_the_text')}}{{$v.service_expire_time_text}}
-
{{:L('user_avatar_name')}}
@@ -156,53 +153,6 @@ -
-
-
-

{{:L('common_operation_audit')}}

- × -
-
-
-
{{:L('user_username_name')}}
-
- -
{{:L('common_mobile_name')}}
-
- -
{{:L('common_view_gender_name')}}
-
- -
{{:L('user_organization_name')}}
-
- -
{{:L('user_birthday_name')}}
-
- -
{{:L('user_user_type_name')}}
-
- -
{{:L('user_salary_type_name')}}
-
-
- -
-
- - -
- -
- - - -            - -
-
-
-
-
diff --git a/service/Application/Library/AlipayLife.class.php b/service/Application/Library/AlipayLife.class.php index 48f491b0a..85dc2ddbd 100644 --- a/service/Application/Library/AlipayLife.class.php +++ b/service/Application/Library/AlipayLife.class.php @@ -225,6 +225,7 @@ class AlipayLife break; // 关注/进入生活号 + case 'follow' : case 'enter' : $status = AlipayLifeService::UserEnter($data); break; diff --git a/service/Application/Runtime/Temp/a58f8070835be94249ea77f3601c6647.php b/service/Application/Runtime/Temp/a58f8070835be94249ea77f3601c6647.php index 488fc9a71..b35566a46 100644 --- a/service/Application/Runtime/Temp/a58f8070835be94249ea77f3601c6647.php +++ b/service/Application/Runtime/Temp/a58f8070835be94249ea77f3601c6647.php @@ -1,3 +1,3 @@ \ No newline at end of file diff --git a/service/Public/Admin/Default/Css/AlipayLifeUser.css b/service/Public/Admin/Default/Css/AlipayLifeUser.css new file mode 100755 index 000000000..150222433 --- /dev/null +++ b/service/Public/Admin/Default/Css/AlipayLifeUser.css @@ -0,0 +1,18 @@ +/** + * 列表 + */ +.form-keyword { width: 55% !important; display: initial !important; } +.more-submit input { display: none; } +.param-where, .param-date input { display: initial !important; } +@media only screen and (max-width: 641px) { + .param-where { width: 100% !important; margin-left: 0px !important; } + .param-date input { width: 47% !important; } +} +@media only screen and (min-width: 641px) { + .param-where { width: 32% !important; float: left; } + .param-date input { width: 45% !important; } + .param-where:nth-child(1), .param-where:nth-child(4) { margin-left: 0px !important; } +} +@media only screen and (max-width: 321px) { + .view-operation button { margin: 2px 0px; } +} \ No newline at end of file