This commit is contained in:
cun-nan 2024-03-06 13:15:40 +08:00
parent c7e78cc1c5
commit 1fcefbc2c0
2 changed files with 14 additions and 2 deletions

View File

@ -9,7 +9,7 @@
<view class="my-icons"></view>
</view>
<!-- 顶部区域 -->
<view class="tap-box">
<view class="tap-box" v-if="actinput == 0">
<view class="box-tap" :class="{ 'act' :types == index }" v-for="(item,index) in taplist" :key="index"
@click="getindex(index)">
<view class="title">{{item.title}}</view>

View File

@ -9,7 +9,7 @@
</view>
<!-- 顶部区域 -->
<view class="top-box">
<view style="font-size: 18px; font-weight: bold;">11月20号</view>
<view style="font-size: 18px; font-weight: bold;">{{getTime()}}</view>
<view style="font-size: 14px;">对比上次价格波动</view>
<view class="tupian"></view>
</view>
@ -65,6 +65,18 @@
},
methods: {
//
getTime(){
let date = new Date();
let y = date.getFullYear() + "-";
let mon = ((date.getMonth() + 1 < 10) ? ('0' + (+date.getMonth() + 1)) : (+date.getMonth() + 1)) + "月";
let d = ((date.getDate() < 10) ? ('0' + date.getDate()) : date.getDate()) + "号";
let h = ((date.getHours() < 10) ? ('0' + date.getHours()) : date.getHours()) + ":";
let m = ((date.getMinutes() < 10) ? ('0' + date.getMinutes()) : date.getMinutes()) + ":";
let s = ((date.getSeconds() < 10) ? ('0' + date.getSeconds()) : date.getSeconds());
// return new Date(y , mon , d , h , m , s);
return mon+d;
},
//
getTodayOilPriceList() {
let params = {