Browse Source

首页UI

master
chenkainan 2 months ago
parent
commit
250efb6d21
  1. 2
      app.js
  2. 12
      pages/index/index.js
  3. 2
      pages/index/index.wxml

2
app.js

@ -39,7 +39,7 @@ App({
// 获取前端配置文件 // 获取前端配置文件
commonApi._post("pbservice/Other/getClientConfig", {unique_key: "wechatxcx"}).then(res => { commonApi._post("pbservice/Other/getClientConfig", {unique_key: "wechatxcx"}).then(res => {
let data = JSON.parse(res.data); let data = JSON.parse(res.data);
data.isTest = data.isTest165? true : false; data.isTest = data.isTest166? true : false;
data.indexSeason = null data.indexSeason = null
this.globalData.configJson = data this.globalData.configJson = data
}).then(() => { }).then(() => {

12
pages/index/index.js

@ -696,7 +696,7 @@ Page({
}, },
gotoPath(e) { gotoPath(e) {
console.log(e.currentTarget.dataset.item.path) console.log(e.currentTarget)
if (e.currentTarget.dataset.item.path) { if (e.currentTarget.dataset.item.path) {
wx.navigateTo({ wx.navigateTo({
url: e.currentTarget.dataset.item.path, url: e.currentTarget.dataset.item.path,
@ -705,8 +705,14 @@ Page({
} }
}, },
gotoPaths(e) {
if (e.currentTarget.dataset.path) {
wx.navigateTo({
url: e.currentTarget.dataset.path,
})
return
}
},
// 获取系统信息 // 获取系统信息
getHeight() { getHeight() {
let systemInfo = wx.getSystemInfoSync(), let systemInfo = wx.getSystemInfoSync(),

2
pages/index/index.wxml

@ -8,7 +8,7 @@
<image lazy-load src="{{weather.icon2}}" style="margin-left:0" mode="aspectFill"></image> <image lazy-load src="{{weather.icon2}}" style="margin-left:0" mode="aspectFill"></image>
<view class="weather-num" style="color: white;">{{weather.max_temp}}°</view> <view class="weather-num" style="color: white;">{{weather.max_temp}}°</view>
<view class="weather" style="color: white;">{{weather.weather}}</view> <view class="weather" style="color: white;">{{weather.weather}}</view>
<image lazy-load style="margin: 0 30rpx;" bindtap="gotoPath" data-path="/pages/user/service/index" <image lazy-load style="margin: 0 30rpx;" bindtap="gotoPaths" data-path="/pages/user/service/index"
src="https://static.ticket.sz-trip.com/jundaosuzhou/images/indexWinter2025/kefu.png" mode="aspectFill"></image> src="https://static.ticket.sz-trip.com/jundaosuzhou/images/indexWinter2025/kefu.png" mode="aspectFill"></image>
</view> </view>
<navigator url="/pages/search/index" catchtap="pagePoint" data-event="search_click" class="search-box textOver"> <navigator url="/pages/search/index" catchtap="pagePoint" data-event="search_click" class="search-box textOver">

Loading…
Cancel
Save