浏览代码

页面适配修改

Zhangbw 2 月之前
父节点
当前提交
564b698011
共有 2 个文件被更改,包括 5 次插入1 次删除
  1. 4 1
      src/pages/admin/shortPool.vue
  2. 1 0
      src/pages/history/history.vue

+ 4 - 1
src/pages/admin/shortPool.vue

@@ -207,7 +207,9 @@ const getChangeClass = (changePercent) => {
 // 判断是否是当天加入的股票
 const isAddedToday = (addDate) => {
   if (!addDate) return false
-  const today = new Date().toISOString().split('T')[0]
+  // 使用本地时间而不是UTC时间
+  const now = new Date()
+  const today = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, '0')}-${String(now.getDate()).padStart(2, '0')}`
   return addDate === today
 }
 
@@ -585,6 +587,7 @@ const handleDeleteStock = (item) => {
   font-size: 22rpx;
   color: #c0c4cc;
   margin-top: 6rpx;
+  white-space: nowrap;
 }
 
 .stock-center {

+ 1 - 0
src/pages/history/history.vue

@@ -422,6 +422,7 @@ onLoad((options) => {
   font-size: 20rpx;
   color: #5d55e8;
   margin-top: 4rpx;
+  white-space: nowrap;
 }
 
 .td-close {