Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
starsw001
ShopXO
提交
d61dd141
ShopXO
项目概览
starsw001
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d61dd141
编写于
12月 17, 2020
作者:
D
Devil
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
细节优化
上级
c6e12784
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
51 addition
and
17 deletion
+51
-17
application/index/view/default/public/module/base_form.html
application/index/view/default/public/module/base_form.html
+5
-1
application/index/view/default/public/tips_error.html
application/index/view/default/public/tips_error.html
+3
-1
application/index/view/default/public/tips_success.html
application/index/view/default/public/tips_success.html
+3
-1
application/module/FormHandleModule.php
application/module/FormHandleModule.php
+10
-0
application/service/UserService.php
application/service/UserService.php
+30
-14
未找到文件。
application/index/view/default/public/module/base_form.html
浏览文件 @
d61dd141
{{block name="form_header"}}{{/block}}
<!-- content top start -->
<div
class=
"content-top"
>
{{block name="form_content_top"}}{{/block}}
...
...
@@ -52,4 +54,6 @@
<!-- extend start -->
{{block name="form_extend"}}{{/block}}
<!-- extend end -->
</div>
\ No newline at end of file
</div>
{{block name="form_footer"}}{{/block}}
\ No newline at end of file
application/index/view/default/public/tips_error.html
浏览文件 @
d61dd141
...
...
@@ -22,7 +22,9 @@
<i
class=
"am-icon-times-circle am-icon-lg"
></i>
<span
class=
"msg"
>
{{$msg}}
</span>
<div
class=
"tips-nav"
>
<a
href=
"{{$Think.__MY_URL__}}"
class=
"am-btn am-btn-secondary am-radius"
>
回到首页
</a>
{{if !isset($is_to_home) or $is_to_home eq 1}}
<a
href=
"{{$Think.__MY_URL__}}"
class=
"am-btn am-btn-secondary am-radius"
>
回到首页
</a>
{{/if}}
{{if !empty($to_url) and !empty($to_title)}}
<a
href=
"{{$to_url}}"
class=
"am-btn am-btn-primary am-radius"
>
{{$to_title}}
</a>
{{/if}}
...
...
application/index/view/default/public/tips_success.html
浏览文件 @
d61dd141
...
...
@@ -22,7 +22,9 @@
<i
class=
"am-icon-check-circle am-icon-lg"
></i>
<span
class=
"msg"
>
{{$msg}}
</span>
<div
class=
"tips-nav"
>
<a
href=
"{{$Think.__MY_URL__}}"
class=
"am-btn am-btn-secondary am-radius"
>
回到首页
</a>
{{if !isset($is_to_home) or $is_to_home eq 1}}
<a
href=
"{{$Think.__MY_URL__}}"
class=
"am-btn am-btn-secondary am-radius"
>
回到首页
</a>
{{/if}}
{{if !empty($to_url) and !empty($to_title)}}
<a
href=
"{{$to_url}}"
class=
"am-btn am-btn-primary am-radius"
>
{{$to_title}}
</a>
{{/if}}
...
...
application/module/FormHandleModule.php
浏览文件 @
d61dd141
...
...
@@ -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'
]
:
''
;
// 条件类型
...
...
application/service/UserService.php
浏览文件 @
d61dd141
...
...
@@ -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
(
array_key_exists
(
'birthday'
,
$v
))
{
$v
[
'birthday_text'
]
=
empty
(
$v
[
'birthday'
])
?
''
:
date
(
'Y-m-d'
,
$v
[
'birthday'
]);
}
// 头像
if
(
!
empty
(
$v
[
'avatar'
]
))
if
(
array_key_exists
(
'avatar'
,
$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'
;
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
[
'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'
]);
// 时间
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 [用户数据]
*/
p
rivate
static
function
UserHandle
(
$user
)
p
ublic
static
function
UserHandle
(
$user
)
{
// 基础数据处理
if
(
isset
(
$user
[
'add_time'
]))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录