+ {{/if}}
{{if !empty($to_url) and !empty($to_title)}}
{{/if}}
diff --git a/application/index/view/default/public/tips_success.html b/application/index/view/default/public/tips_success.html
index c10f0825a..bab67001b 100755
--- a/application/index/view/default/public/tips_success.html
+++ b/application/index/view/default/public/tips_success.html
@@ -22,7 +22,9 @@
-
回到首页
+ {{if !isset($is_to_home) or $is_to_home eq 1}}
+
回到首页
+ {{/if}}
{{if !empty($to_url) and !empty($to_title)}}
{{$to_title}}
{{/if}}
diff --git a/application/module/FormHandleModule.php b/application/module/FormHandleModule.php
index 9df944462..01e053ba4 100644
--- a/application/module/FormHandleModule.php
+++ b/application/module/FormHandleModule.php
@@ -467,6 +467,16 @@ class FormHandleModule
$where_name = $form_name;
// 条件类型
$where_type = isset($v['search_config']['where_type']) ? $v['search_config']['where_type'] : $v['search_config']['form_type'];
+ // 条件默认值处理
+ $where_type_default_arr = [
+ 'input' => '=',
+ 'select' => 'in',
+ ];
+ if(array_key_exists($where_type, $where_type_default_arr))
+ {
+ $where_type = $where_type_default_arr[$where_type];
+ }
+
// 是否自定义条件处理
$where_custom = isset($v['search_config']['where_type_custom']) ? $v['search_config']['where_type_custom'] : '';
// 条件类型
diff --git a/application/service/UserService.php b/application/service/UserService.php
index 4504f2b27..5cca4b192 100755
--- a/application/service/UserService.php
+++ b/application/service/UserService.php
@@ -136,7 +136,7 @@ class UserService
$n = isset($params['n']) ? intval($params['n']) : 10;
// 获取用户列表
- $data = Db::name('User')->where($where)->order($order_by)->limit($m, $n)->select();
+ $data = Db::name('User')->where($where)->order($order_by)->field($field)->limit($m, $n)->select();
if(!empty($data))
{
$common_gender_list = lang('common_gender_list');
@@ -144,27 +144,43 @@ class UserService
foreach($data as &$v)
{
// 生日
- $v['birthday_text'] = empty($v['birthday']) ? '' : date('Y-m-d', $v['birthday']);
-
- // 头像
- if(!empty($v['avatar']))
+ if(array_key_exists('birthday', $v))
{
- $v['avatar'] = ResourcesService::AttachmentPathViewHandle($v['avatar']);
- } else {
- $v['avatar'] = config('shopxo.attachment_host').'/static/index/'.strtolower(MyC('common_default_theme', 'default', true)).'/images/default-user-avatar.jpg';
+ $v['birthday_text'] = empty($v['birthday']) ? '' : date('Y-m-d', $v['birthday']);
}
- // 注册时间
- $v['add_time'] = date('Y-m-d H:i:s', $v['add_time']);
+ // 头像
+ if(array_key_exists('avatar', $v))
+ {
+ if(!empty($v['avatar']))
+ {
+ $v['avatar'] = ResourcesService::AttachmentPathViewHandle($v['avatar']);
+ } else {
+ $v['avatar'] = config('shopxo.attachment_host').'/static/index/'.strtolower(MyC('common_default_theme', 'default', true)).'/images/default-user-avatar.jpg';
+ }
+ }
- // 更新时间
- $v['upd_time'] = date('Y-m-d H:i:s', $v['upd_time']);
+ // 时间
+ if(array_key_exists('add_time', $v))
+ {
+ $v['add_time'] = date('Y-m-d H:i:s', $v['add_time']);
+ }
+ if(array_key_exists('upd_time', $v))
+ {
+ $v['upd_time'] = date('Y-m-d H:i:s', $v['upd_time']);
+ }
// 性别
- $v['gender_text'] = isset($common_gender_list[$v['gender']]) ? $common_gender_list[$v['gender']]['name'] : '未知';
+ if(array_key_exists('gender', $v))
+ {
+ $v['gender_text'] = isset($common_gender_list[$v['gender']]) ? $common_gender_list[$v['gender']]['name'] : '未知';
+ }
// 状态
- $v['status_text'] = $common_user_status_list[$v['status']]['name'];
+ if(array_key_exists('status', $v))
+ {
+ $v['status_text'] = $common_user_status_list[$v['status']]['name'];
+ }
}
}
return DataReturn('处理成功', 0, $data);
@@ -433,7 +449,7 @@ class UserService
* @desc description
* @param [ array] $user [用户数据]
*/
- private static function UserHandle($user)
+ public static function UserHandle($user)
{
// 基础数据处理
if(isset($user['add_time']))