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
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
13 deletions
+36
-13
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
+15
-8
No files found.
application/index/controller/Setting.php
View file @
2de16e25
...
@@ -114,7 +114,7 @@ class Setting extends Basic
...
@@ -114,7 +114,7 @@ class Setting extends Basic
$config
=
new
SystemConfig
();
$config
=
new
SystemConfig
();
if
(
$this
->
request
->
isGet
())
{
if
(
$this
->
request
->
isGet
())
{
//获取数据
//获取数据
$data
=
$config
->
getSetting
();
$data
=
$config
->
getSetting
V2
();
}
else
{
}
else
{
$config_name_arr
=
json_decode
(
$this
->
params
[
'config_name'
],
true
);
$config_name_arr
=
json_decode
(
$this
->
params
[
'config_name'
],
true
);
foreach
(
$config_name_arr
as
$k
=>
$v
)
{
foreach
(
$config_name_arr
as
$k
=>
$v
)
{
...
...
application/model/SystemConfig.php
View file @
2de16e25
...
@@ -48,4 +48,20 @@ class SystemConfig extends BaseModel
...
@@ -48,4 +48,20 @@ class SystemConfig extends BaseModel
return
$result
;
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
...
@@ -24,10 +24,9 @@ define (['doT', 'text!temp/setting_template_tpl.html', 'css!style/home.css'], fu
data
:
param
,
data
:
param
,
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
console
.
log
(
data
.
data
);
var
temp
=
document
.
getElementById
(
'setting_list_tpl'
).
innerHTML
;
var
temp
=
document
.
getElementById
(
'setting_list_tpl'
).
innerHTML
;
var
doTtmpl
=
doT
.
template
(
temp
);
var
doTtmpl
=
doT
.
template
(
temp
);
$
(
"#info"
).
html
(
doTtmpl
(
data
.
data
));
$
(
"#info"
).
html
(
doTtmpl
(
data
.
data
));
}
}
});
});
},
},
...
...
public/resource/template/setting_template_tpl.html
View file @
2de16e25
<script
id=
"setting_list_tpl"
type=
"text/template"
>
<script
id=
"setting_list_tpl"
type=
"text/template"
>
<
div
class
=
"form-group"
>
<
div
class
=
"form-group"
>
[
%
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
>
[
%
}
else
if
(
it
[
item
][
'config_type'
]
==
20
)
{
%
]
<
label
class
=
"col-sm-4 control-label"
style
=
"text-align: right"
>
是否使用隐号系统:
<
/label
>
<
label
class
=
"col-sm-4 control-label"
style
=
"text-align: right"
>
是否使用隐号系统:
<
/label
>
<
div
class
=
"col-sm-8"
>
<
div
class
=
"col-sm-8"
>
<
div
class
=
"radio"
style
=
"display: inline-block"
>
<
div
class
=
"radio"
style
=
"display: inline-block"
>
...
@@ -19,6 +26,7 @@
...
@@ -19,6 +26,7 @@
<
/label
>
<
/label
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
label
class
=
"col-sm-4 control-label"
style
=
"text-align: right"
>
客户隐号绑定有效期(天数):
<
/label
>
<
label
class
=
"col-sm-4 control-label"
style
=
"text-align: right"
>
客户隐号绑定有效期(天数):
<
/label
>
<
div
class
=
"col-sm-8"
>
<
div
class
=
"col-sm-8"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"day_num"
placeholder
=
"隐号绑定天数"
value
=
"[%= it['day_num'] %]"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"day_num"
placeholder
=
"隐号绑定天数"
value
=
"[%= it['day_num'] %]"
>
...
@@ -29,23 +37,22 @@
...
@@ -29,23 +37,22 @@
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"landlord_phone_day"
placeholder
=
"隐号绑定天数"
value
=
"[%= it['landlord_phone_day'] %]"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"landlord_phone_day"
placeholder
=
"隐号绑定天数"
value
=
"[%= it['landlord_phone_day'] %]"
>
<
/div
>
<
/div
>
<
label
class
=
"col-sm-4 control-label"
style
=
"text-align: right"
>
商铺自动下架天数
:
<
/label
>
<
label
class
=
"col-sm-4 control-label"
style
=
"text-align: right"
>
业务员拨打电话限制
:
<
/label
>
<
div
class
=
"col-sm-8"
>
<
div
class
=
"col-sm-8"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"shop_day_num"
placeholder
=
"商铺自动下架天数"
value
=
"[%= it['down_time'] %]"
>
<
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
>
<
/div
>
[
%
}
else
if
(
it
[
item
][
'config_type'
]
==
30
)
{
%
]
<
label
class
=
"col-sm-4 control-label"
style
=
"text-align: right"
>
新客户保护期有效小时数:
<
/label
>
<
label
class
=
"col-sm-4 control-label"
style
=
"text-align: right"
>
新客户保护期有效小时数:
<
/label
>
<
div
class
=
"col-sm-8"
>
<
div
class
=
"col-sm-8"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"new_client_hours"
placeholder
=
"新客户保护期有效小时数"
value
=
"[%= it['new_client_hours'] %]"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"new_client_hours"
placeholder
=
"新客户保护期有效小时数"
value
=
"[%= it['new_client_hours'] %]"
>
<
/div
>
<
/div
>
[
%
}
else
if
(
it
[
item
][
'config_type'
]
==
40
)
{
%
]
<
label
class
=
"col-sm-4 control-label"
style
=
"text-align: right"
>
业务员最多可查看的商铺数量:
<
/label
>
<
label
class
=
"col-sm-4 control-label"
style
=
"text-align: right"
>
业务员最多可查看的商铺数量:
<
/label
>
<
div
class
=
"col-sm-8"
>
<
div
class
=
"col-sm-8"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"agent_shop_num"
placeholder
=
"业务员最多可查看的商铺数量"
value
=
"[%= it['agent_shop_num'] %]"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"agent_shop_num"
placeholder
=
"业务员最多可查看的商铺数量"
value
=
"[%= it['agent_shop_num'] %]"
>
<
/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
=
"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
>
<
/div
>
<
/div
>
</script>
</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