mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-09 05:16:44 +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>
|
||||
<span style="color: #959595;">
|
||||
数据截止时间 2022-09-19 17:30
|
||||
数据截止时间 {{currentTime}}
|
||||
</span>
|
||||
</div>
|
||||
<div style="margin-top: 15px;border-radius: 10px;overflow: hidden;width: 100%;">
|
||||
@@ -304,6 +304,7 @@ export default {
|
||||
return {
|
||||
config,
|
||||
currentDate:new Date(),
|
||||
currentTime:'',
|
||||
marginTop:'80',
|
||||
getCodeValue:'',
|
||||
png8,
|
||||
@@ -325,7 +326,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
|
||||
this.currentTime = this.getNowDate()
|
||||
let monthNum = new Date().getMonth()+1
|
||||
let daysNum = new Date().getUTCDate()
|
||||
this.calendarValue = monthNum +'月'+daysNum+'日'
|
||||
@@ -357,6 +358,35 @@ export default {
|
||||
this.calendarValue = monthNum+'月'+daysNum+'日'
|
||||
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(){
|
||||
EWebBridge.webCallAppInJs("top_bar_height").then(data => {
|
||||
console.log(data,'top_bar_height')
|
||||
@@ -364,7 +394,7 @@ export default {
|
||||
// 获取高度成功
|
||||
let height = data.height
|
||||
// 设置高度
|
||||
this.marginTop = height
|
||||
this.marginTop = height + 10
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user