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
e9333fcb
Commit
e9333fcb
authored
Dec 13, 2018
by
zw
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/1210-v3.0.2' into 1210-v3.0.2
parents
3b8ec0cd
1ae6507b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
10 deletions
+61
-10
Setting.php
application/index/controller/Setting.php
+10
-5
pkWeekListCon.html
application/index/view/pkList/pkWeekListCon.html
+2
-2
pkWeekList.js
public/resource/js/pkWeekList.js
+49
-3
No files found.
application/index/controller/Setting.php
View file @
e9333fcb
...
...
@@ -177,20 +177,25 @@ class Setting extends Basic
* @return \think\Response
*/
public
function
configWeek
()
{
if
(
empty
(
$this
->
params
[
'site_id'
])
||
empty
(
$this
->
params
[
'total_date_start'
])
||
empty
(
$this
->
params
[
'total_date_end'
])
||
empty
(
$this
->
params
[
'sort_date_start'
])
||
empty
(
$this
->
params
[
'sort_date_end'
]))
{
return
$this
->
response
(
101
,
'参数错误'
);
}
try
{
$code
=
200
;
$msg
=
''
;
$data
=
[];
$where
[
'params'
]
=
'week_competition_'
.
$this
->
params
[
'site_id'
];
if
(
empty
(
$this
->
params
[
'site_id'
]))
{
return
$this
->
response
(
101
,
'参数错误'
);
}
$id
=
$this
->
m_config
->
getSettingV2
(
$where
,
'id,rule'
);
if
(
$this
->
request
->
isPost
())
{
if
(
empty
(
$this
->
params
[
'total_date_start'
])
||
empty
(
$this
->
params
[
'total_date_end'
])
||
empty
(
$this
->
params
[
'sort_date_start'
])
||
empty
(
$this
->
params
[
'sort_date_end'
]))
{
return
$this
->
response
(
101
,
'参数错误'
);
}
$rule
[
'total_date_start'
]
=
$this
->
params
[
'total_date_start'
];
$rule
[
'total_date_end'
]
=
$this
->
params
[
'total_date_end'
];
$rule
[
'sort_date_start'
]
=
$this
->
params
[
'sort_date_start'
];
...
...
application/index/view/pkList/pkWeekListCon.html
View file @
e9333fcb
...
...
@@ -194,9 +194,9 @@
<span
class=
"fore-span ld-Marheight"
>
-
</span>
<input
class=
"btn4-pk ld-Marheight input-pk-style"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"create_time_end"
name=
"end_date1"
type=
"date"
>
<span
class=
"fore-span ld-Marheight"
>
分档根据时间:
</span>
<input
class=
"btn4-pk ld-Marheight input-pk-style"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"
create
_time_start"
name=
"start_date1"
type=
"date"
>
<input
class=
"btn4-pk ld-Marheight input-pk-style"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"
sort
_time_start"
name=
"start_date1"
type=
"date"
>
<span
class=
"fore-span ld-Marheight"
>
-
</span>
<input
class=
"btn4-pk ld-Marheight input-pk-style"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"
create
_time_end"
name=
"end_date1"
type=
"date"
>
<input
class=
"btn4-pk ld-Marheight input-pk-style"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"
sort
_time_end"
name=
"end_date1"
type=
"date"
>
<span
class=
"produce-pk fore-span ld-Marheight"
>
生成
</span>
</div>
<img
src=
"/resource/image/gold@1x.png"
class=
"img-gold"
/>
...
...
public/resource/js/pkWeekList.js
View file @
e9333fcb
...
...
@@ -21,8 +21,7 @@ define(['doT', 'text!temp/pk_week_list_template_tpl.html.html', 'css!style/home.
var
day_end
=
y
+
'.'
+
(
m
<
10
?
(
'0'
+
m
)
:
m
)
+
'.'
+
(
d
<
10
?
(
'0'
+
d
)
:
d
);
$
(
'#start_date'
).
html
(
day_start
);
$
(
'#end_date'
).
html
(
day_end
);
// pkList.getCitySite();
pkList
.
getTime
();
pkList
.
getTeamList
(
0
);
pkList
.
event
();
},
...
...
@@ -87,7 +86,10 @@ define(['doT', 'text!temp/pk_week_list_template_tpl.html.html', 'css!style/home.
$
(
"#pk_list"
).
html
(
doTtmpl
(
pkList
.
mainTabArr
[
pkList
.
mainTabIndexTwo
]));
});
//生成pk榜
_doc
.
on
(
'click'
,
'.produce-pk'
,
function
(
e
){
pkList
.
setTime
();
});
$
(
".export-pk"
).
click
(
function
()
{
//导出列表
if
(
pkList
.
mainTabIndexTeam
){
pkList
.
exportTeamList
();
...
...
@@ -217,6 +219,50 @@ define(['doT', 'text!temp/pk_week_list_template_tpl.html.html', 'css!style/home.
}
});
},
//显示 隐藏城市 默认显示 当前账号 所在城市
getTime
:
function
(){
$
.
ajax
({
url
:
'/index/configWeek'
,
type
:
'GET'
,
async
:
true
,
data
:
{
'site_id'
:
user_info_obj
.
site_id
,
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
console
.
log
(
data
.
data
.
total_date_start
)
var
data_
=
JSON
.
parse
(
data
.
data
);
$
(
'#create_time_start'
).
val
(
data_
.
total_date_start
);
$
(
'#create_time_end'
).
val
(
data_
.
total_date_end
);
$
(
'#sort_time_start'
).
val
(
data_
.
sort_date_start
);
$
(
'#sort_time_end'
).
val
(
data_
.
sort_date_end
);
}
}
});
},
//设置时间
setTime
:
function
(){
$
.
ajax
({
url
:
'/index/configWeek'
,
type
:
'POST'
,
async
:
true
,
data
:
{
'site_id'
:
user_info_obj
.
site_id
,
'total_date_start'
:
$
(
'#create_time_start'
).
val
(),
'total_date_end'
:
$
(
'#create_time_end'
).
val
(),
'sort_date_start'
:
$
(
'#sort_time_start'
).
val
(),
'sort_date_end'
:
$
(
'#sort_time_end'
).
val
()
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
}
}
});
},
};
return
pkList
;
...
...
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