diff --git a/pages/index/index.js b/pages/index/index.js index ffb6fd7..0d7ca12 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -445,7 +445,7 @@ Page({ this.getList() // 回购榜 this.getRepurchaseList() - // this.getWeather() // 2025-5-26首页改版不需要天气了 + this.getWeather() // 2025-5-26首页改版不需要天气了 // this.getFourProduct() // 活动日历 wx.getLocation({ @@ -475,6 +475,17 @@ Page({ } }, + gotoPath(e) { + if (e.currentTarget.dataset.path){ + wx.navigateTo({ + url: e.currentTarget.dataset.path, + }) + return + } + + }, + + // 获取系统信息 getHeight() { let systemInfo = wx.getSystemInfoSync(), @@ -577,6 +588,8 @@ Page({ }) }, + + // --------------------banner 相关--------------------------- // 获取banner 和开屏广告 getBanner: function() { diff --git a/pages/index/index.wxml b/pages/index/index.wxml index daf77b6..903cac2 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -17,10 +17,17 @@ --> - + + + + {{weather.max_temp}}° + {{weather.weather}} + + - 搜一搜您想要的 + 搜索您想要的 diff --git a/pages/index/index.wxss b/pages/index/index.wxss index d59b467..1921768 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -38,7 +38,7 @@ flex: 1; width: 100%; height: 64rpx; - border-radius: 27rpx; + border-radius: 36rpx; color: #666666; display: flex; align-items: center; @@ -925,4 +925,20 @@ border-radius: 13rpx; padding: 15rpx 10rpx; box-sizing: border-box; -} \ No newline at end of file +} + +.top-box .weather-num,.top-box .weather { + flex-shrink: 0; + color: #333; + } + .top-box .weather-num { + font-size: 29rpx; + margin-bottom: 10rpx; + margin-left: 4rpx; + } + .top-box .weather { + font-size: 19rpx; + margin-top: 20rpx; + margin-left: -6rpx; + margin-right: 0rpx; + } \ No newline at end of file