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
d102899b
Commit
d102899b
authored
Mar 26, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设置
parent
558ceb98
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
81 deletions
+11
-81
Setting.php
application/index/controller/Setting.php
+2
-80
JobTask.php
application/task/controller/JobTask.php
+3
-1
setting_template_tpl.html
public/resource/template/setting_template_tpl.html
+6
-0
No files found.
application/index/controller/Setting.php
View file @
d102899b
...
...
@@ -25,86 +25,6 @@ class Setting extends Basic
$this
->
m_config
=
new
SystemConfig
();
}
/**
* 显示视图,新增和编辑设置数据
*
* @return \think\Response|\think\response\View
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getSetting
()
{
if
(
$this
->
request
->
isAjax
())
{
$data
=
[];
if
(
$this
->
request
->
isGet
())
{
//获取数据
$data
=
$this
->
m_config
->
getSetting
();
}
else
{
//新增或编辑数据
$data
[
'is_privacy'
]
=
(
int
)
$this
->
params
[
'is_privacy'
];
$data
[
'day_num'
]
=
(
int
)
$this
->
params
[
'day_num'
];
$data
[
'down_time'
]
=
$this
->
params
[
'down_time'
];
$data
[
'landlord_phone_day'
]
=
(
int
)
$this
->
params
[
'landlord_phone_day'
];
$data
[
'agent_call_day'
]
=
(
int
)
$this
->
params
[
'agent_call_day'
];
$data
[
'agent_call_number'
]
=
(
int
)
$this
->
params
[
'agent_call_number'
];
$config_data
=
[];
$config_data
[
0
][
'id'
]
=
1
;
$config_data
[
0
][
'config_name'
]
=
'商铺自动下架天数'
;
$config_data
[
0
][
'config_type'
]
=
10
;
$config_data
[
0
][
'rule'
]
=
json_encode
([
'down_time'
=>
$data
[
'down_time'
]]);
$config_data
[
0
][
'agent_id'
]
=
$this
->
userId
;
$config_data
[
1
][
'id'
]
=
2
;
$config_data
[
1
][
'config_name'
]
=
'隐私号码'
;
$config_data
[
1
][
'config_type'
]
=
20
;
$config_data
[
1
][
'rule'
]
=
json_encode
([
'is_privacy'
=>
$data
[
'is_privacy'
],
'day_num'
=>
$data
[
'day_num'
],
'landlord_phone_day'
=>
$data
[
'landlord_phone_day'
],
'agent_call_day'
=>
$data
[
'agent_call_day'
],
'agent_call_number'
=>
$data
[
'agent_call_number'
]
]);
$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
;
$this
->
m_config
->
insertSetting
(
$config_data
,
true
);
$look
=
new
LookShopService
();
$look
->
setLookNum
(
$agent_shop_num
);
$redis
=
RedisExt
::
getRedis
();
$redis
->
set
(
's_down_time'
,
$data
[
'down_time'
]);
//商铺自动下架天数
$redis
->
set
(
's_is_privacy'
,
$data
[
'is_privacy'
]);
//是否使用隐号系统
$redis
->
set
(
's_day_num'
,
$data
[
'day_num'
]);
//客户隐号绑定有效期(天数):
$redis
->
set
(
's_landlord_phone_day'
,
$data
[
'landlord_phone_day'
]);
//房东隐号绑定有效期(天数):
$redis
->
set
(
's_new_client_hours'
,
$new_client_hours
);
//新客户保护期有效小时数
$redis
->
set
(
's_lookNum'
,
$agent_shop_num
);
//业务员最多可查看的商铺数量
$redis
->
set
(
's_agent_call_day'
,
$data
[
'agent_call_day'
]);
//业务员多少天可以打多少电话
$redis
->
set
(
's_agent_call_number'
,
$data
[
'agent_call_number'
]);
//业务员多少天可以打多少电话
}
return
$this
->
response
(
200
,
''
,
$data
);
}
else
{
//视图显示
return
view
(
'setting/index'
);
}
}
/**
* 系统设置
*
...
...
@@ -169,6 +89,8 @@ class Setting extends Basic
$redis
->
set
(
's_agent_call_day'
,
$data
[
'agent_call_day'
]);
//业务员多少天可以打多少电话
$redis
->
set
(
's_agent_call_number'
,
$data
[
'agent_call_number'
]);
//业务员多少天可以打多少电话
$redis
->
set
(
's_agent_suspend'
,
$data
[
'agent_suspend'
]);
//业务员多少天可以打多少电话
$redis
->
set
(
's_video_start_time'
,
$data
[
'video_start_time'
]);
//视频开始秒数
$redis
->
set
(
's_video_end_time'
,
$data
[
'video_end_time'
]);
//视频结束秒数
return
;
}
...
...
application/task/controller/JobTask.php
View file @
d102899b
...
...
@@ -207,10 +207,12 @@ class JobTask
$pageTotal
=
ceil
(
$total
/
$pageSize
);
$path
=
ROOT_PATH
.
'public/resource/lib/Attachments/video/'
;
for
(
$pageNo
=
1
;
$pageNo
<=
$pageTotal
;
$pageNo
++
)
{
$data
=
$m_house_video
->
getList
(
$pageNo
,
$pageSize
,
''
,
'id,video_name'
,
$where
);
$data
=
$m_house_video
->
getList
(
$pageNo
,
$pageSize
,
''
,
'id,video_name
,video_images
'
,
$where
);
foreach
(
$data
as
$k
=>
$v
)
{
$del_file
=
$path
.
$v
[
'video_name'
];
$del_file_img
=
$path
.
$v
[
'video_images'
];
@
unlink
(
$del_file
);
@
unlink
(
$del_file_img
);
if
(
!
file_exists
(
$del_file
))
{
$m_house_video
->
updateData
([
'is_del'
=>
2
],
[
'id'
=>
$v
[
'id'
]]);
}
...
...
public/resource/template/setting_template_tpl.html
View file @
d102899b
...
...
@@ -57,6 +57,12 @@
<
div
class
=
"col-sm-8"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"agent_suspend"
placeholder
=
"帐号自动冻结,客户跟进数量"
value
=
"[%= JSON.parse(it[item]['rule']).agent_suspend %]"
>
<
/div
>
[
%
}
else
if
(
it
[
item
][
'params'
]
==
'video_time'
)
{
%
]
<
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
=
"video_start_time"
placeholder
=
"帐号自动冻结,客户跟进数量"
value
=
"[%= JSON.parse(it[item]['rule']).video_start_time %]"
>
<
input
type
=
"number"
class
=
"form-control btn5"
name
=
"video_end_time"
placeholder
=
"帐号自动冻结,客户跟进数量"
value
=
"[%= JSON.parse(it[item]['rule']).video_end_time %]"
>
<
/div
>
[
%
}
%
]
[
%
}
%
]
<
/div
>
...
...
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