Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
jcy2004x
ShopXO
提交
3f7a7d0a
ShopXO
项目概览
jcy2004x
/
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,体验更适合开发者的 AI 搜索 >>
提交
3f7a7d0a
编写于
2月 26, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新增用户审核开关
上级
8c48bc44
变更
13
展开全部
隐藏空白更改
内联
并排
Showing
13 changed file
with
135 addition
and
15 deletion
+135
-15
application/admin/controller/User.php
application/admin/controller/User.php
+3
-0
application/admin/lang/zh-cn.php
application/admin/lang/zh-cn.php
+4
-0
application/admin/view/default/config/index.html
application/admin/view/default/config/index.html
+8
-0
application/admin/view/default/lib/user_status.html
application/admin/view/default/lib/user_status.html
+2
-2
application/admin/view/default/user/index.html
application/admin/view/default/user/index.html
+22
-0
application/admin/view/default/user/save_info.html
application/admin/view/default/user/save_info.html
+16
-0
application/index/view/default/config.json
application/index/view/default/config.json
+1
-1
application/lang/zh-cn.php
application/lang/zh-cn.php
+2
-0
application/service/UserService.php
application/service/UserService.php
+53
-2
config/shopxo.sql
config/shopxo.sql
+21
-7
public/appmini/old/alipay/pages/common/copyright.axml
public/appmini/old/alipay/pages/common/copyright.axml
+1
-1
public/appmini/old/weixin/pages/common/copyright.wxml
public/appmini/old/weixin/pages/common/copyright.wxml
+1
-1
public/core.php
public/core.php
+1
-1
未找到文件。
application/admin/controller/User.php
浏览文件 @
3f7a7d0a
...
...
@@ -81,6 +81,9 @@ class User extends Common
// 性别
$this
->
assign
(
'common_gender_list'
,
lang
(
'common_gender_list'
));
// 用户状态
$this
->
assign
(
'common_user_status_list'
,
lang
(
'common_user_status_list'
));
// Excel地址
$this
->
assign
(
'excel_url'
,
MyUrl
(
'admin/user/excelexport'
,
$params
));
...
...
application/admin/lang/zh-cn.php
浏览文件 @
3f7a7d0a
...
...
@@ -123,6 +123,10 @@ return array(
'name'
=>
'生日'
,
'type'
=>
'string'
,
],
'status_text'
=>
[
'name'
=>
'状态'
,
'type'
=>
'string'
,
],
'mobile'
=>
[
'name'
=>
'手机号码'
,
'type'
=>
'int'
,
...
...
application/admin/view/default/config/index.html
浏览文件 @
3f7a7d0a
...
...
@@ -17,6 +17,14 @@
<label>
{{$data.admin_page_number.name}}
<span
class=
"fs-12 fw-100 cr-999"
>
({{$data.admin_page_number.describe}})
</span></label>
<input
type=
"number"
name=
"{{$data.admin_page_number.only_tag}}"
placeholder=
"{{$data.admin_page_number.name}}"
pattern=
"{{:lang('common_regex_page_number')}}"
data-validation-message=
"{{$data.admin_page_number.error_tips}}"
class=
"am-radius"
{{
if
!
empty
($
data
)}}
value=
"{{$data.admin_page_number.value}}"
{{/
if
}}
required
/>
</div>
<div
class=
"am-form-group"
>
<label>
{{$data.common_register_is_enable_audit.name}}
<span
class=
"fs-12 fw-100 cr-999"
>
({{$data.common_register_is_enable_audit.describe}})
</span></label>
<select
name=
"{{$data.common_register_is_enable_audit.only_tag}}"
class=
"am-radius chosen-select c-p"
data-validation-message=
"{{$data.common_register_is_enable_audit.error_tips}}"
required
>
{{foreach $common_is_text_list as $v}}
<option
value=
"{{$v.id}}"
{{
if
isset
($
data
['
common_register_is_enable_audit
']['
value
'])
and
$
data
['
common_register_is_enable_audit
']['
value
']
eq
$
v
['
id
']}}
selected
{{/
if
}}
>
{{$v.name}}
</option>
{{/foreach}}
</select>
</div>
<div
class=
"am-form-group"
>
<label>
{{$data.common_is_deduction_inventory.name}}
<span
class=
"fs-12 fw-100 cr-999"
>
({{$data.common_is_deduction_inventory.describe}})
</span></label>
<select
name=
"{{$data.common_is_deduction_inventory.only_tag}}"
class=
"am-radius chosen-select c-p"
data-validation-message=
"{{$data.common_is_deduction_inventory.error_tips}}"
required
>
...
...
application/admin/view/default/lib/user_status.html
浏览文件 @
3f7a7d0a
<!-- 用户状态 开始 -->
<div
class=
"am-form-group"
>
<label>
{{:lang('common_view_user_status_name')}}
</label>
<select
name=
"status"
class=
"am-radius c
-p"
data-validation-message=
"{{:lang('common_user_status_format')}}
"
required
>
<label>
用户状态
</label>
<select
name=
"status"
class=
"am-radius c
hosen-select c-p"
data-validation-message=
"请选择用户状态
"
required
>
{{foreach :lang('common_user_status_list') as $v}}
<option
value=
"{{$v.id}}"
{{
if
isset
($
data
['
status
'])
and
$
data
['
status
']
eq
$
v
['
id
']}}
selected
{{
else
/}}{{
if
!
isset
($
data
['
status
'])
and
isset
($
v
['
checked
'])
and
$
v
['
checked
']
eq
true
}}
selected
{{/
if
}}{{/
if
}}
>
{{$v.name}}
</option>
{{/foreach}}
...
...
application/admin/view/default/user/index.html
浏览文件 @
3f7a7d0a
...
...
@@ -21,6 +21,12 @@
<option
value=
"{{$v.id}}"
{{
if
isset
($
params
['
gender
'])
and
$
params
['
gender
']
eq
$
v
['
id
']}}
selected
{{/
if
}}
>
{{$v.name}}
</option>
{{/foreach}}
</select>
<select
name=
"status"
class=
"am-radius c-p m-t-10 m-l-5 param-where"
>
<option
value=
"-1"
>
状态
</option>
{{foreach $common_user_status_list as $v}}
<option
value=
"{{$v.id}}"
{{
if
isset
($
params
['
status
'])
and
$
params
['
status
']
eq
$
v
['
id
']}}
selected
{{/
if
}}
>
{{$v.name}}
</option>
{{/foreach}}
</select>
<div
class=
"param-date param-where m-l-5"
>
<input
type=
"text"
autocomplete=
"off"
name=
"time_start"
class=
"Wdate am-radius m-t-10"
placeholder=
"起始时间"
onclick=
"WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd HH:mm:ss'})"
{{
if
isset
($
params
['
time_start
'])}}
value=
"{{$params.time_start}}"
{{/
if
}}
/>
<span>
~
</span>
...
...
@@ -49,6 +55,7 @@
<th
class=
"am-hide-sm-only"
>
手机号码
</th>
<th
class=
"am-hide-sm-only"
>
积分
</th>
<th
class=
"am-hide-sm-only"
>
性别
</th>
<th
class=
"am-hide-sm-only"
>
状态
</th>
<th
class=
"am-hide-sm-only"
>
生日
</th>
<th>
更多
</th>
<th>
操作
</th>
...
...
@@ -77,6 +84,9 @@
<td
class=
"am-hide-sm-only"
>
{{if empty($v['gender_text'])}}
<span
class=
"cr-ddd"
>
未设置
</span>
{{else /}}{{$v.gender_text}}{{/if}}
</td>
<td
class=
"am-hide-sm-only"
>
{{if empty($v['status_text'])}}
<span
class=
"cr-ddd"
>
未知
</span>
{{else /}}{{$v.status_text}}{{/if}}
</td>
<td
class=
"am-hide-sm-only"
>
{{if empty($v['birthday_text'])}}
<span
class=
"cr-ddd"
>
未填写
</span>
{{else /}}{{$v.birthday_text}}{{/if}}
</td>
...
...
@@ -102,6 +112,18 @@
<dt>
电子邮箱
</dt>
<dd>
{{if empty($v['email'])}}
<span
class=
"cr-ddd"
>
未填写
</span>
{{else /}}{{$v.email}}{{/if}}
</dd>
<dt>
状态
</dt>
<dd>
{{if empty($v['status_text'])}}
<span
class=
"cr-ddd"
>
未知
</span>
{{else /}}{{$v.status_text}}{{/if}}
</dd>
<dt>
支付宝openid
</dt>
<dd>
{{if empty($v['alipay_openid'])}}
<span
class=
"cr-ddd"
>
未知
</span>
{{else /}}{{$v.alipay_openid}}{{/if}}
</dd>
<dt>
微信openid
</dt>
<dd>
{{if empty($v['weixin_openid'])}}
<span
class=
"cr-ddd"
>
未知
</span>
{{else /}}{{$v.weixin_openid}}{{/if}}
</dd>
<dt>
百度openid
</dt>
<dd>
{{if empty($v['baidu_openid'])}}
<span
class=
"cr-ddd"
>
未知
</span>
{{else /}}{{$v.baidu_openid}}{{/if}}
</dd>
<dt>
性别
</dt>
<dd>
{{if empty($v['gender_text'])}}
<span
class=
"cr-ddd"
>
未设置
</span>
{{else /}}{{$v.gender_text}}{{/if}}
</dd>
...
...
application/admin/view/default/user/save_info.html
浏览文件 @
3f7a7d0a
...
...
@@ -32,6 +32,20 @@
<label>
电子邮箱
</label>
<input
type=
"email"
name=
"email"
class=
"am-radius"
placeholder=
"电子邮箱"
data-validation-message=
"电子邮箱格式错误"
{{
if
!
empty
($
data
)}}
value=
"{{$data.email}}"
{{/
if
}}
/>
</div>
<div
class=
"am-form-group"
>
<label>
支付宝openid
</label>
<input
type=
"text"
name=
"alipay_openid"
class=
"am-radius"
placeholder=
"支付宝openid"
data-validation-message=
"请填写支付宝openid"
{{
if
!
empty
($
data
)}}
value=
"{{$data.alipay_openid}}"
{{/
if
}}
/>
</div>
<div
class=
"am-form-group"
>
<label>
微信openid
</label>
<input
type=
"text"
name=
"weixin_openid"
class=
"am-radius"
placeholder=
"微信openid"
data-validation-message=
"请填写微信openid"
{{
if
!
empty
($
data
)}}
value=
"{{$data.weixin_openid}}"
{{/
if
}}
/>
</div>
<div
class=
"am-form-group"
>
<label>
百度openid
</label>
<input
type=
"text"
name=
"baidu_openid"
class=
"am-radius"
placeholder=
"百度openid"
data-validation-message=
"请填写百度openid"
{{
if
!
empty
($
data
)}}
value=
"{{$data.baidu_openid}}"
{{/
if
}}
/>
</div>
<div
class=
"am-form-group"
>
<label>
生日
</label>
<input
type=
"text"
name=
"birthday"
class=
"am-radius Wdate"
placeholder=
"生日"
pattern=
"{{:lang('common_regex_date')}}"
data-validation-message=
"生日格式有误"
{{
if
!
empty
($
data
)}}
value=
"{{$data.birthday_text}}"
{{/
if
}}
onclick=
"WdatePicker({firstDayOfWeek:1,dateFmt:'yyyy-MM-dd'})"
/>
...
...
@@ -46,6 +60,8 @@
<input
type=
"number"
placeholder=
"积分"
name=
"integral"
data-validation-message=
"详细地址2~60 个字符"
class=
"am-radius"
{{
if
!
empty
($
data
)}}
value=
"{{$data.integral}}"
{{/
if
}}
/>
</div>
{{include file="lib/user_status" /}}
<div
class=
"am-form-group"
>
<label>
登录密码
</label>
<input
type=
"text"
placeholder=
"登录密码"
name=
"pwd"
pattern=
"{{:lang('common_regex_pwd')}}"
data-validation-message=
"登录密码格式 6~18 个字符之间"
class=
"am-radius"
value=
""
/>
...
...
application/index/view/default/config.json
浏览文件 @
3f7a7d0a
{
"name"
:
"默认模板"
,
"ver"
:
"1.
3
.0"
,
"ver"
:
"1.
4
.0"
,
"author"
:
"Devil"
,
"home"
:
"http://shopxo.net/"
}
\ No newline at end of file
application/lang/zh-cn.php
浏览文件 @
3f7a7d0a
...
...
@@ -22,6 +22,7 @@ return array(
'1.1.0'
=>
array
(
'value'
=>
'1.1.0'
,
'name'
=>
'v1.1.0'
),
'1.2.0'
=>
array
(
'value'
=>
'1.2.0'
,
'name'
=>
'v1.2.0'
),
'1.3.0'
=>
array
(
'value'
=>
'1.3.0'
,
'name'
=>
'v1.3.0'
),
'1.4.0'
=>
array
(
'value'
=>
'1.4.0'
,
'name'
=>
'v1.4.0'
),
),
// 性别
...
...
@@ -210,6 +211,7 @@ return array(
0
=>
array
(
'id'
=>
0
,
'name'
=>
'正常'
,
'checked'
=>
true
),
1
=>
array
(
'id'
=>
1
,
'name'
=>
'禁止发言'
,
'tips'
=>
'用户被禁止发言'
),
2
=>
array
(
'id'
=>
2
,
'name'
=>
'禁止登录'
,
'tips'
=>
'用户被禁止登录'
),
3
=>
array
(
'id'
=>
3
,
'name'
=>
'待审核'
,
'tips'
=>
'用户等待审核中'
),
),
// 是否已评价
...
...
application/service/UserService.php
浏览文件 @
3f7a7d0a
...
...
@@ -45,6 +45,7 @@ class UserService
if
(
!
empty
(
$data
))
{
$common_gender_list
=
lang
(
'common_gender_list'
);
$common_user_status_list
=
lang
(
'common_user_status_list'
);
foreach
(
$data
as
&
$v
)
{
// 生日
...
...
@@ -66,6 +67,9 @@ class UserService
// 性别
$v
[
'gender_text'
]
=
$common_gender_list
[
$v
[
'gender'
]][
'name'
];
// 状态
$v
[
'status_text'
]
=
$common_user_status_list
[
$v
[
'status'
]][
'name'
];
}
}
return
DataReturn
(
'处理成功'
,
0
,
$data
);
...
...
@@ -96,6 +100,12 @@ class UserService
$where
[]
=
[
'gender'
,
'='
,
intval
(
$params
[
'gender'
])];
}
// 状态
if
(
isset
(
$params
[
'status'
])
&&
$params
[
'status'
]
>
-
1
)
{
$where
[]
=
[
'status'
,
'='
,
intval
(
$params
[
'status'
])];
}
// 时间
if
(
!
empty
(
$params
[
'time_start'
]))
{
...
...
@@ -170,9 +180,15 @@ class UserService
[
'checked_type'
=>
'in'
,
'key_name'
=>
'gender'
,
'checked_data'
=>
[
0
,
1
,
2
]
,
'checked_data'
=>
array_column
(
lang
(
'common_gender_list'
),
'id'
)
,
'error_msg'
=>
'性别值范围不正确'
,
],
[
'checked_type'
=>
'in'
,
'key_name'
=>
'status'
,
'checked_data'
=>
array_column
(
lang
(
'common_user_status_list'
),
'id'
),
'error_msg'
=>
'状态值范围不正确'
,
],
[
'checked_type'
=>
'length'
,
'key_name'
=>
'address'
,
...
...
@@ -203,6 +219,10 @@ class UserService
'address'
=>
isset
(
$params
[
'address'
])
?
$params
[
'address'
]
:
''
,
'gender'
=>
intval
(
$params
[
'gender'
]),
'integral'
=>
intval
(
$params
[
'integral'
]),
'status'
=>
intval
(
$params
[
'status'
]),
'alipay_openid'
=>
isset
(
$params
[
'alipay_openid'
])
?
$params
[
'alipay_openid'
]
:
''
,
'weixin_openid'
=>
isset
(
$params
[
'weixin_openid'
])
?
$params
[
'weixin_openid'
]
:
''
,
'baidu_openid'
=>
isset
(
$params
[
'baidu_openid'
])
?
$params
[
'baidu_openid'
]
:
''
,
'birthday'
=>
empty
(
$params
[
'birthday'
])
?
0
:
strtotime
(
$params
[
'birthday'
]),
'upd_time'
=>
time
(),
];
...
...
@@ -799,8 +819,9 @@ class UserService
{
return
DataReturn
(
'帐号不存在'
,
-
3
);
}
// 用户状态
if
(
$user
[
'status'
]
==
2
)
if
(
in_array
(
$user
[
'status'
],
[
2
,
3
])
)
{
return
DataReturn
(
lang
(
'common_user_status_list'
)[
$user
[
'status'
]][
'tips'
],
-
10
);
}
...
...
@@ -918,12 +939,17 @@ class UserService
return
DataReturn
(
'验证码错误'
,
-
11
);
}
// 是否需要审核
$common_register_is_enable_audit
=
MyC
(
'common_register_is_enable_audit'
,
0
);
// 用户数据
$salt
=
GetNumberCode
(
6
);
$data
=
[
'add_time'
=>
time
(),
'upd_time'
=>
time
(),
'salt'
=>
$salt
,
'pwd'
=>
LoginPwdEncryption
(
$params
[
'pwd'
],
$salt
),
'status'
=>
(
$common_register_is_enable_audit
==
1
)
?
3
:
0
,
];
if
(
$params
[
'type'
]
==
'sms'
)
{
...
...
@@ -939,6 +965,13 @@ class UserService
// 清除验证码
$obj
->
Remove
();
// 是否需要审核
if
(
$common_register_is_enable_audit
==
1
)
{
return
DataReturn
(
'注册成功,请等待审核'
);
}
// 用户登录session纪录
if
(
self
::
UserLoginRecord
(
$user_id
))
{
return
DataReturn
(
'注册成功'
,
0
);
...
...
@@ -1401,6 +1434,12 @@ class UserService
$user
=
self
::
UserInfo
(
$field
,
$params
[
'openid'
]);
if
(
!
empty
(
$user
))
{
// 用户状态
if
(
in_array
(
$user
[
'status'
],
[
2
,
3
]))
{
return
DataReturn
(
lang
(
'common_user_status_list'
)[
$user
[
'status'
]][
'tips'
],
-
10
);
}
$data
=
$user
;
}
...
...
@@ -1488,9 +1527,15 @@ class UserService
{
return
DataReturn
(
'用户openid不能为空'
,
-
20
);
}
// 是否需要审核
$common_register_is_enable_audit
=
MyC
(
'common_register_is_enable_audit'
,
0
);
// 用户数据
$data
=
array
(
$accounts_field
=>
$params
[
$accounts_field
],
'mobile'
=>
$params
[
'mobile'
],
'status'
=>
(
$common_register_is_enable_audit
==
1
)
?
3
:
0
,
);
// 获取用户信息
...
...
@@ -1538,6 +1583,12 @@ class UserService
// 清除验证码
$obj
->
Remove
();
// 是否需要审核
if
(
$common_register_is_enable_audit
==
1
)
{
return
DataReturn
(
'绑定成功、等待审核'
,
-
101
);
}
return
DataReturn
(
'绑定成功'
,
0
,
self
::
UserLoginRecord
(
$user_id
,
true
));
}
else
{
return
DataReturn
(
'绑定失败'
,
-
100
);
...
...
config/shopxo.sql
浏览文件 @
3f7a7d0a
此差异已折叠。
点击以展开。
public/appmini/old/alipay/pages/common/copyright.axml
浏览文件 @
3f7a7d0a
<template name="copyright">
<view class="copyright">
<view class="text">Powered by ShopXO v1.
3
.0</view>
<view class="text">Powered by ShopXO v1.
4
.0</view>
</view>
</template>
\ No newline at end of file
public/appmini/old/weixin/pages/common/copyright.wxml
浏览文件 @
3f7a7d0a
<template name="copyright">
<view class="copyright">
<view class="text">Powered by ShopXO v1.
3
.0</view>
<view class="text">Powered by ShopXO v1.
4
.0</view>
</view>
</template>
\ No newline at end of file
public/core.php
浏览文件 @
3f7a7d0a
...
...
@@ -13,7 +13,7 @@
if
(
version_compare
(
PHP_VERSION
,
'5.6.0'
,
'<'
))
die
(
'PHP版本最低 5.6.0'
);
// 系统版本
define
(
'APPLICATION_VERSION'
,
'v1.
3
.0'
);
define
(
'APPLICATION_VERSION'
,
'v1.
4
.0'
);
// 定义系统目录分隔符
define
(
'DS'
,
'/'
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录