切换导航条
此项目
正在载入...
登录
root
/
jyht
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
刘晓艳
6 years ago
提交
02bf2da04ca2e5fbd349c9649176963a1f29f8ff
1 个父辈
a5d5a43c
测试
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
75 行增加
和
79 行删除
public/themes/simpleboot3/portal/inquiry/index.html
public/themes/simpleboot3/portal/inquiry/index.html
查看文件 @
02bf2da
...
...
@@ -358,30 +358,86 @@
})
//倒计时
var
times
=
"60"
;
//倒计时总秒数量
var
time
=
""
;
function
countDown
(
times
)
{
var
timer
=
null
;
timer
=
setInterval
(
function
()
{
var
day
=
0
,
hour
=
0
,
minute
=
0
,
second
=
0
;
//时间默认值
if
(
times
>
0
)
{
day
=
Math
.
floor
(
times
/
(
60
*
60
*
24
));
hour
=
Math
.
floor
(
times
/
(
60
*
60
))
-
(
day
*
24
);
minute
=
Math
.
floor
(
times
/
60
)
-
(
day
*
24
*
60
)
-
(
hour
*
60
);
second
=
Math
.
floor
(
times
)
-
(
day
*
24
*
60
*
60
)
-
(
hour
*
60
*
60
)
-
(
minute
*
60
);
}
if
(
day
<=
9
)
day
=
'0'
+
day
;
if
(
hour
<=
9
)
hour
=
'0'
+
hour
;
if
(
minute
<=
9
)
minute
=
'0'
+
minute
;
if
(
second
<=
9
)
second
=
'0'
+
second
;
//添加一条新语音
var
num
=
0
;
$
(
'.voice_module'
).
on
(
'click'
,
'.add_voice'
,
function
()
{
// $('.voice_module').append($('.voice_list').html());
// $('.voice_list .voice_first').show()
// $('.add_icon').show()
$
(
'#hour_show'
).
html
(
'<text id="h"></text>'
+
hour
+
':'
);
$
(
'#minute_show'
).
html
(
'<text></text>'
+
minute
+
':'
);
$
(
'#second_show'
).
html
(
'<text></text>'
+
second
+
''
);
$
(
'#second_test'
).
html
(
'<text></text>'
+
second
+
''
);
//
// console.log(day + "天:" + hour + "小时:" + minute + "分钟:" + second + "秒");
times
--
;
// var parent = $(this).parents('.voice_module')
// parent.append($('.temp_list').clone());
},
1000
);
// if (times <= 0) {
// clearInterval(timer);
// }
$
(
'.pause'
).
click
(
function
()
{
// timer(intDiff);
clearInterval
(
timer
);
localStorage
.
setItem
(
"times"
,
times
)
})
$
(
'.stop'
).
click
(
function
()
{
clearInterval
(
timer
);
times
=
0
;
})
$
(
'.stopping'
).
click
(
function
()
{
clearInterval
(
timer
);
localStorage
.
clear
()
})
}
// var videolist = $(".voice_module");
// for (var i = 0; i < videolist.length; i++) {
//
// var videoid = $(videolist[i]).attr("video-id");
// if (videoid == title_id) {
// $(videolist[i]).show();
// $(videolist[i]).append($('.voice_list').html());
// $(videolist[i]).children('.voice_list .voice_first').show();
// $('.icon_cancle').show()
// }
// }
$
(
'.start'
).
click
(
function
()
{
time
=
localStorage
.
getItem
(
"times"
)
if
(
time
==
null
){
times
=
parseInt
(
60
)
}
else
{
times
=
time
;
}
console
.
log
(
time
)
// myTimer(intDiff);
countDown
(
times
);
localStorage
.
setItem
(
"times"
,
times
)
})
//添加一条新语音
var
num
=
0
;
$
(
'.voice_module'
).
on
(
'click'
,
'.add_voice'
,
function
()
{
times
=
60
// clearInterval(timer);
var
day
=
0
,
hour
=
0
,
minute
=
0
,
second
=
0
;
//时间默认值
if
(
day
<=
9
)
day
=
'0'
+
day
;
if
(
hour
<=
9
)
hour
=
'0'
+
hour
;
if
(
minute
<=
9
)
minute
=
'0'
+
minute
;
if
(
second
<=
9
)
second
=
'0'
+
second
;
$
(
'#hour_show'
).
html
(
'<text id="h"></text>'
+
hour
+
':'
);
$
(
'#minute_show'
).
html
(
'<text></text>'
+
minute
+
':'
);
$
(
'#second_show'
).
html
(
'<text></text>'
+
second
+
''
);
num
=
num
+
1
...
...
@@ -695,67 +751,7 @@
</script>
<script
type=
"text/javascript"
>
var
times
=
"60"
;
//倒计时总秒数量
var
time
=
""
;
function
countDown
(
times
)
{
var
timer
=
null
;
timer
=
setInterval
(
function
()
{
var
day
=
0
,
hour
=
0
,
minute
=
0
,
second
=
0
;
//时间默认值
if
(
times
>
0
)
{
day
=
Math
.
floor
(
times
/
(
60
*
60
*
24
));
hour
=
Math
.
floor
(
times
/
(
60
*
60
))
-
(
day
*
24
);
minute
=
Math
.
floor
(
times
/
60
)
-
(
day
*
24
*
60
)
-
(
hour
*
60
);
second
=
Math
.
floor
(
times
)
-
(
day
*
24
*
60
*
60
)
-
(
hour
*
60
*
60
)
-
(
minute
*
60
);
}
if
(
day
<=
9
)
day
=
'0'
+
day
;
if
(
hour
<=
9
)
hour
=
'0'
+
hour
;
if
(
minute
<=
9
)
minute
=
'0'
+
minute
;
if
(
second
<=
9
)
second
=
'0'
+
second
;
$
(
'#hour_show'
).
html
(
'<text id="h"></text>'
+
hour
+
':'
);
$
(
'#minute_show'
).
html
(
'<text></text>'
+
minute
+
':'
);
$
(
'#second_show'
).
html
(
'<text></text>'
+
second
+
''
);
$
(
'#second_test'
).
html
(
'<text></text>'
+
second
+
''
);
//
// console.log(day + "天:" + hour + "小时:" + minute + "分钟:" + second + "秒");
times
--
;
},
1000
);
// if (times <= 0) {
// clearInterval(timer);
// }
$
(
'.pause'
).
click
(
function
()
{
// timer(intDiff);
clearInterval
(
timer
);
localStorage
.
setItem
(
"times"
,
times
)
})
$
(
'.stop'
).
click
(
function
()
{
clearInterval
(
timer
);
times
=
0
;
})
$
(
'.stopping'
).
click
(
function
()
{
clearInterval
(
timer
);
localStorage
.
clear
()
})
}
$
(
'.start'
).
click
(
function
()
{
time
=
localStorage
.
getItem
(
"times"
)
if
(
time
==
null
){
times
=
parseInt
(
60
)
}
else
{
times
=
time
;
}
console
.
log
(
time
)
// myTimer(intDiff);
countDown
(
times
);
localStorage
.
setItem
(
"times"
,
times
)
})
</script>
...
...
请
注册
或
登录
后发表评论