mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-10 01:06:45 +08:00
【银保app】修改首页实时出单榜 时间显示 以及轮播图距离顶部的高度
This commit is contained in:
@@ -243,7 +243,7 @@
|
|||||||
<span style="margin-left: 10px;font-size: 16px;font-weight: bold;">实时出单榜</span>
|
<span style="margin-left: 10px;font-size: 16px;font-weight: bold;">实时出单榜</span>
|
||||||
</span>
|
</span>
|
||||||
<span style="color: #959595;">
|
<span style="color: #959595;">
|
||||||
数据截止时间 2022-09-19 17:30
|
数据截止时间 {{currentTime}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 15px;border-radius: 10px;overflow: hidden;width: 100%;">
|
<div style="margin-top: 15px;border-radius: 10px;overflow: hidden;width: 100%;">
|
||||||
@@ -304,6 +304,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
config,
|
config,
|
||||||
currentDate:new Date(),
|
currentDate:new Date(),
|
||||||
|
currentTime:'',
|
||||||
marginTop:'80',
|
marginTop:'80',
|
||||||
getCodeValue:'',
|
getCodeValue:'',
|
||||||
png8,
|
png8,
|
||||||
@@ -325,7 +326,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
|
this.currentTime = this.getNowDate()
|
||||||
let monthNum = new Date().getMonth()+1
|
let monthNum = new Date().getMonth()+1
|
||||||
let daysNum = new Date().getUTCDate()
|
let daysNum = new Date().getUTCDate()
|
||||||
this.calendarValue = monthNum +'月'+daysNum+'日'
|
this.calendarValue = monthNum +'月'+daysNum+'日'
|
||||||
@@ -357,6 +358,35 @@ export default {
|
|||||||
this.calendarValue = monthNum+'月'+daysNum+'日'
|
this.calendarValue = monthNum+'月'+daysNum+'日'
|
||||||
this.getPremRankList()
|
this.getPremRankList()
|
||||||
},
|
},
|
||||||
|
getNowDate(){
|
||||||
|
let date = new Date();
|
||||||
|
let sign2 = ":";
|
||||||
|
let year = date.getFullYear() // 年
|
||||||
|
let month = date.getMonth() + 1; // 月
|
||||||
|
let day = date.getDate(); // 日
|
||||||
|
let hour = date.getHours(); // 时
|
||||||
|
let minutes = date.getMinutes(); // 分
|
||||||
|
let seconds = date.getSeconds() //秒
|
||||||
|
let weekArr = ['星期一', '星期二', '星期三', '星期四', '星期五', '星期六', '星期天'];
|
||||||
|
let week = weekArr[date.getDay()];
|
||||||
|
// 给一位数的数据前面加 “0”
|
||||||
|
if (month >= 1 && month <= 9) {
|
||||||
|
month = "0" + month;
|
||||||
|
}
|
||||||
|
if (day >= 0 && day <= 9) {
|
||||||
|
day = "0" + day;
|
||||||
|
}
|
||||||
|
if (hour >= 0 && hour <= 9) {
|
||||||
|
hour = "0" + hour;
|
||||||
|
}
|
||||||
|
if (minutes >= 0 && minutes <= 9) {
|
||||||
|
minutes = "0" + minutes;
|
||||||
|
}
|
||||||
|
if (seconds >= 0 && seconds <= 9) {
|
||||||
|
seconds = "0" + seconds;
|
||||||
|
}
|
||||||
|
return year + "-" + month + "-" + day + " " + hour + sign2 + minutes;
|
||||||
|
},
|
||||||
setMarginTop(){
|
setMarginTop(){
|
||||||
EWebBridge.webCallAppInJs("top_bar_height").then(data => {
|
EWebBridge.webCallAppInJs("top_bar_height").then(data => {
|
||||||
console.log(data,'top_bar_height')
|
console.log(data,'top_bar_height')
|
||||||
@@ -364,7 +394,7 @@ export default {
|
|||||||
// 获取高度成功
|
// 获取高度成功
|
||||||
let height = data.height
|
let height = data.height
|
||||||
// 设置高度
|
// 设置高度
|
||||||
this.marginTop = height
|
this.marginTop = height + 10
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user