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
a18b7532
Commit
a18b7532
authored
May 08, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
参数设置
parent
b904f575
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
12 deletions
+36
-12
Basic.php
application/api_broker/extend/Basic.php
+2
-1
Setting.php
application/index/controller/Setting.php
+18
-0
SystemConfig.php
application/model/SystemConfig.php
+1
-3
setting.js
public/resource/js/setting.js
+5
-3
setting_template_tpl.html
public/resource/template/setting_template_tpl.html
+10
-5
No files found.
application/api_broker/extend/Basic.php
View file @
a18b7532
...
@@ -44,7 +44,8 @@ class Basic extends Controller
...
@@ -44,7 +44,8 @@ class Basic extends Controller
'broker/getAddress'
,
'broker/getAddress'
,
'broker/getBroker'
,
'broker/getBroker'
,
'broker/searchAgentShop'
,
'broker/searchAgentShop'
,
'broker/forgetPwd'
'broker/forgetPwd'
,
'broker/getFeedInfo'
);
);
/**
/**
...
...
application/index/controller/Setting.php
View file @
a18b7532
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
namespace
app\index\controller
;
namespace
app\index\controller
;
use
app\api_broker\service\LookShopService
;
use
app\index\extend\Basic
;
use
app\index\extend\Basic
;
use
app\model\SystemConfig
;
use
app\model\SystemConfig
;
use
think\Cache
;
use
think\Cache
;
...
@@ -53,7 +54,24 @@ class Setting extends Basic
...
@@ -53,7 +54,24 @@ class Setting extends Basic
'day_num'
=>
$data
[
'day_num'
]
'day_num'
=>
$data
[
'day_num'
]
]);
]);
$config_data
[
1
][
'agent_id'
]
=
$this
->
userId
;
$config_data
[
1
][
'agent_id'
]
=
$this
->
userId
;
$config_data
[
2
][
'id'
]
=
3
;
$config_data
[
2
][
'config_name'
]
=
'新客户保护期有效小时数'
;
$config_data
[
2
][
'config_type'
]
=
30
;
$new_client_hours
=
$this
->
params
[
'new_client_hours'
];
$config_data
[
2
][
'rule'
]
=
json_encode
([
'new_client_hours'
=>
$new_client_hours
]);
$config_data
[
2
][
'agent_id'
]
=
$this
->
userId
;
$config_data
[
3
][
'id'
]
=
4
;
$config_data
[
3
][
'config_name'
]
=
'业务员最多可查看的商铺数量'
;
$config_data
[
3
][
'config_type'
]
=
40
;
$agent_shop_num
=
empty
(
$this
->
params
[
'agent_shop_num'
])
?
5
:
$this
->
params
[
'agent_shop_num'
];
$config_data
[
3
][
'rule'
]
=
json_encode
([
'agent_shop_num'
=>
$agent_shop_num
]);
$config_data
[
3
][
'agent_id'
]
=
$this
->
userId
;
$config
->
insertSetting
(
$config_data
,
true
);
$config
->
insertSetting
(
$config_data
,
true
);
$look
=
new
LookShopService
();
$look
->
setLookNum
(
$agent_shop_num
);
Cache
::
set
(
'Setting'
,
$data
);
Cache
::
set
(
'Setting'
,
$data
);
}
}
...
...
application/model/SystemConfig.php
View file @
a18b7532
...
@@ -36,7 +36,7 @@ class SystemConfig extends BaseModel
...
@@ -36,7 +36,7 @@ class SystemConfig extends BaseModel
$data
=
$this
->
field
(
$field
)
$data
=
$this
->
field
(
$field
)
->
where
(
$where
)
->
where
(
$where
)
->
select
();
->
select
();
$result
=
[];
if
(
$data
!=
NULL
)
{
if
(
$data
!=
NULL
)
{
foreach
(
$data
as
$k
=>
$v
)
{
foreach
(
$data
as
$k
=>
$v
)
{
$result_arr
=
json_decode
(
$v
[
'rule'
],
true
);
$result_arr
=
json_decode
(
$v
[
'rule'
],
true
);
...
@@ -44,8 +44,6 @@ class SystemConfig extends BaseModel
...
@@ -44,8 +44,6 @@ class SystemConfig extends BaseModel
$result
[
$kk
]
=
$vv
;
$result
[
$kk
]
=
$vv
;
}
}
}
}
}
else
{
$result
=
[];
}
}
return
$result
;
return
$result
;
...
...
public/resource/js/setting.js
View file @
a18b7532
...
@@ -34,9 +34,11 @@ define (['doT', 'text!temp/setting_template_tpl.html', 'css!style/home.css'], fu
...
@@ -34,9 +34,11 @@ define (['doT', 'text!temp/setting_template_tpl.html', 'css!style/home.css'], fu
//提交数据
//提交数据
saveSetting
:
function
()
{
saveSetting
:
function
()
{
var
param
=
{};
var
param
=
{};
param
.
is_privacy
=
$
(
"input[type='radio']:checked"
).
val
();
param
.
is_privacy
=
$
(
"input[type='radio']:checked"
).
val
();
param
.
day_num
=
$
(
"input[name='day_num']"
).
val
();
param
.
day_num
=
$
(
"input[name='day_num']"
).
val
();
param
.
down_time
=
$
(
"input[name='shop_day_num']"
).
val
();
param
.
down_time
=
$
(
"input[name='shop_day_num']"
).
val
();
param
.
new_client_hours
=
$
(
"input[name='new_client_hours']"
).
val
();
param
.
agent_shop_num
=
$
(
"input[name='agent_shop_num']"
).
val
();
$
.
ajax
({
$
.
ajax
({
url
:
'/admin.php/index/getSetting'
,
url
:
'/admin.php/index/getSetting'
,
type
:
'POST'
,
type
:
'POST'
,
...
...
public/resource/template/setting_template_tpl.html
View file @
a18b7532
...
@@ -19,18 +19,23 @@
...
@@ -19,18 +19,23 @@
<
/label
>
<
/label
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
div
class
=
"form-group"
>
<
label
class
=
"col-sm-3 control-label"
style
=
"text-align: right"
>
隐号绑定有效期(天数):
<
/label
>
<
label
class
=
"col-sm-3 control-label"
style
=
"text-align: right"
>
隐号绑定有效期(天数):
<
/label
>
<
div
class
=
"col-sm-9"
>
<
div
class
=
"col-sm-9"
>
<
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'] %]"
>
<
/div
>
<
/div
>
<
br
><
br
>
<
label
class
=
"col-sm-3 control-label"
style
=
"text-align: right"
>
商铺自动下架天数:
<
/label
>
<
label
class
=
"col-sm-3 control-label"
style
=
"text-align: right"
>
商铺自动下架天数:
<
/label
>
<
div
class
=
"col-sm-9"
>
<
div
class
=
"col-sm-9"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"shop_day_num"
placeholder
=
"商铺自动下架天数"
value
=
"[%= it['down_time'] %]"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"shop_day_num"
placeholder
=
"商铺自动下架天数"
value
=
"[%= it['down_time'] %]"
>
<
/div
>
<
/div
>
<
label
class
=
"col-sm-3 control-label"
style
=
"text-align: right"
>
新客户保护期有效小时数:
<
/label
>
<
div
class
=
"col-sm-9"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"new_client_hours"
placeholder
=
"新客户保护期有效小时数"
value
=
"[%= it['new_client_hours'] %]"
>
<
/div
>
<
label
class
=
"col-sm-3 control-label"
style
=
"text-align: right"
>
业务员最多可查看的商铺数量:
<
/label
>
<
div
class
=
"col-sm-9"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"agent_shop_num"
placeholder
=
"业务员最多可查看的商铺数量"
value
=
"[%= it['agent_shop_num'] %]"
>
<
/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