Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
2de16e25
Commit
2de16e25
authored
Dec 13, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
系统设置
parent
cc358130
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
48 deletions
+71
-48
Setting.php
application/index/controller/Setting.php
+1
-1
SystemConfig.php
application/model/SystemConfig.php
+17
-0
setting.js
public/resource/js/setting.js
+3
-4
setting_template_tpl.html
public/resource/template/setting_template_tpl.html
+50
-43
No files found.
application/index/controller/Setting.php
View file @
2de16e25
...
...
@@ -114,7 +114,7 @@ class Setting extends Basic
$config
=
new
SystemConfig
();
if
(
$this
->
request
->
isGet
())
{
//获取数据
$data
=
$config
->
getSetting
();
$data
=
$config
->
getSetting
V2
();
}
else
{
$config_name_arr
=
json_decode
(
$this
->
params
[
'config_name'
],
true
);
foreach
(
$config_name_arr
as
$k
=>
$v
)
{
...
...
application/model/SystemConfig.php
View file @
2de16e25
...
...
@@ -48,4 +48,20 @@ class SystemConfig extends BaseModel
return
$result
;
}
/**
* 获取参数设置
*
* @param array $where
* @param string $field
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getSettingV2
(
$where
=
[],
$field
=
'id,config_name,config_type,rule'
)
{
return
$this
->
field
(
$field
)
->
where
(
$where
)
->
select
();
}
}
\ No newline at end of file
public/resource/js/setting.js
View file @
2de16e25
...
...
@@ -24,10 +24,9 @@ define (['doT', 'text!temp/setting_template_tpl.html', 'css!style/home.css'], fu
data
:
param
,
dataType
:
'json'
,
success
:
function
(
data
)
{
console
.
log
(
data
.
data
);
var
temp
=
document
.
getElementById
(
'setting_list_tpl'
).
innerHTML
;
var
doTtmpl
=
doT
.
template
(
temp
);
$
(
"#info"
).
html
(
doTtmpl
(
data
.
data
));
var
temp
=
document
.
getElementById
(
'setting_list_tpl'
).
innerHTML
;
var
doTtmpl
=
doT
.
template
(
temp
);
$
(
"#info"
).
html
(
doTtmpl
(
data
.
data
));
}
});
},
...
...
public/resource/template/setting_template_tpl.html
View file @
2de16e25
<script
id=
"setting_list_tpl"
type=
"text/template"
>
<
div
class
=
"form-group"
>
<
label
class
=
"col-sm-4 control-label"
style
=
"text-align: right"
>
是否使用隐号系统:
<
/label
>
<
div
class
=
"col-sm-8"
>
<
div
class
=
"radio"
style
=
"display: inline-block"
>
<
label
>
<
input
type
=
"radio"
name
=
"optionsRadios"
id
=
"optionsRadios1"
value
=
"0"
[
%
if
(
it
.
is_privacy
==
0
)
{
%
]
checked
[
%
}
%
]
>
关闭
<
/label
>
[
%
for
(
var
item
in
it
){
%
]
[
%
if
(
it
[
item
][
'config_type'
]
==
10
)
{
%
]
<
label
class
=
"col-sm-4 control-label"
style
=
"text-align: right"
>
商铺自动下架天数:
<
/label
>
<
div
class
=
"col-sm-8"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"shop_day_num"
placeholder
=
"商铺自动下架天数"
value
=
"[%= it[item]['rule'] %]"
>
<
/div
>
<
div
class
=
"radio"
style
=
"display: inline-block"
>
<
label
>
<
input
type
=
"radio"
name
=
"optionsRadios"
id
=
"optionsRadios2"
value
=
"1"
[
%
if
(
it
.
is_privacy
==
1
)
{
%
]
checked
[
%
}
%
]
>
阿里云
<
/label
>
[
%
}
else
if
(
it
[
item
][
'config_type'
]
==
20
)
{
%
]
<
label
class
=
"col-sm-4 control-label"
style
=
"text-align: right"
>
是否使用隐号系统:
<
/label
>
<
div
class
=
"col-sm-8"
>
<
div
class
=
"radio"
style
=
"display: inline-block"
>
<
label
>
<
input
type
=
"radio"
name
=
"optionsRadios"
id
=
"optionsRadios1"
value
=
"0"
[
%
if
(
it
.
is_privacy
==
0
)
{
%
]
checked
[
%
}
%
]
>
关闭
<
/label
>
<
/div
>
<
div
class
=
"radio"
style
=
"display: inline-block"
>
<
label
>
<
input
type
=
"radio"
name
=
"optionsRadios"
id
=
"optionsRadios2"
value
=
"1"
[
%
if
(
it
.
is_privacy
==
1
)
{
%
]
checked
[
%
}
%
]
>
阿里云
<
/label
>
<
/div
>
<
div
class
=
"radio"
style
=
"display: inline-block"
>
<
label
>
<
input
type
=
"radio"
name
=
"optionsRadios"
id
=
"optionsRadios3"
value
=
"2"
[
%
if
(
it
.
is_privacy
==
2
)
{
%
]
checked
[
%
}
%
]
>
容联云
<
/label
>
<
/div
>
<
/div
>
<
div
class
=
"radio"
style
=
"display: inline-block"
>
<
label
>
<
input
type
=
"radio"
name
=
"optionsRadios"
id
=
"optionsRadios3"
value
=
"2"
[
%
if
(
it
.
is_privacy
==
2
)
{
%
]
checked
[
%
}
%
]
>
容联云
<
/label
>
<
/div
>
<
/div
>
<
label
class
=
"col-sm-4 control-label"
style
=
"text-align: right"
>
客户隐号绑定有效期(天数):
<
/label
>
<
div
class
=
"col-sm-8"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"day_num"
placeholder
=
"隐号绑定天数"
value
=
"[%= it['day_num'] %]"
>
<
/div
>
<!--
房东隐号绑定有效期
-->
<
label
class
=
"col-sm-4 control-label"
style
=
"text-align: right"
>
房东隐号绑定有效期(天数):
<
/label
>
<
div
class
=
"col-sm-8"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"landlord_phone_day"
placeholder
=
"隐号绑定天数"
value
=
"[%= it['landlord_phone_day'] %]"
>
<
/div
>
<
label
class
=
"col-sm-4 control-label"
style
=
"text-align: right"
>
商铺自动下架天数:
<
/label
>
<
div
class
=
"col-sm-8"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"shop_day_num"
placeholder
=
"商铺自动下架天数"
value
=
"[%= it['down_time'] %]"
>
<
/div
>
<
label
class
=
"col-sm-4 control-label"
style
=
"text-align: right"
>
客户隐号绑定有效期(天数):
<
/label
>
<
div
class
=
"col-sm-8"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"day_num"
placeholder
=
"隐号绑定天数"
value
=
"[%= it['day_num'] %]"
>
<
/div
>
<!--
房东隐号绑定有效期
-->
<
label
class
=
"col-sm-4 control-label"
style
=
"text-align: right"
>
房东隐号绑定有效期(天数):
<
/label
>
<
div
class
=
"col-sm-8"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"landlord_phone_day"
placeholder
=
"隐号绑定天数"
value
=
"[%= it['landlord_phone_day'] %]"
>
<
/div
>
<
label
class
=
"col-sm-4 control-label"
style
=
"text-align: right"
>
新客户保护期有效小时数:
<
/label
>
<
div
class
=
"col-sm-8"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"new_client_hours"
placeholder
=
"新客户保护期有效小时数"
value
=
"[%= it['new_client_hours'] %]"
>
<
/div
>
<
label
class
=
"col-sm-4 control-label"
style
=
"text-align: right"
>
业务员最多可查看的商铺数量:
<
/label
>
<
div
class
=
"col-sm-8"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"agent_shop_num"
placeholder
=
"业务员最多可查看的商铺数量"
value
=
"[%= it['agent_shop_num'] %]"
>
<
/div
>
<
label
class
=
"col-sm-4 control-label"
style
=
"text-align: right"
>
业务员拨打电话限制:
<
/label
>
<
div
class
=
"col-sm-8"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"agent_call_day"
placeholder
=
"天数"
value
=
"[%= it['agent_call_day'] %]"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"agent_call_number"
placeholder
=
"次数"
value
=
"[%= it['agent_call_number'] %]"
>
<
/div
>
<
label
class
=
"col-sm-4 control-label"
style
=
"text-align: right"
>
业务员拨打电话限制:
<
/label
>
<
div
class
=
"col-sm-8"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"agent_call_day"
placeholder
=
"天数"
value
=
"[%= it['agent_call_day'] %]"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"agent_call_number"
placeholder
=
"次数"
value
=
"[%= it['agent_call_number'] %]"
>
<
/div
>
[
%
}
else
if
(
it
[
item
][
'config_type'
]
==
30
)
{
%
]
<
label
class
=
"col-sm-4 control-label"
style
=
"text-align: right"
>
新客户保护期有效小时数:
<
/label
>
<
div
class
=
"col-sm-8"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"new_client_hours"
placeholder
=
"新客户保护期有效小时数"
value
=
"[%= it['new_client_hours'] %]"
>
<
/div
>
[
%
}
else
if
(
it
[
item
][
'config_type'
]
==
40
)
{
%
]
<
label
class
=
"col-sm-4 control-label"
style
=
"text-align: right"
>
业务员最多可查看的商铺数量:
<
/label
>
<
div
class
=
"col-sm-8"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"agent_shop_num"
placeholder
=
"业务员最多可查看的商铺数量"
value
=
"[%= it['agent_shop_num'] %]"
>
<
/div
>
[
%
}
%
]
[
%
}
%
]
<
/div
>
</script>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment