Browse Source

修改首页UI

修改首页UI
master
xuetaotao 4 years ago
parent
commit
27c0bb7eb1
  1. 2
      app.js
  2. 6
      pages/index/index.js
  3. 24
      pages/index/index.wxml

2
app.js

@ -22,7 +22,7 @@ App({
unique_key: "wechatxcx"
}).then(res => {
let data = JSON.parse(res.data);
data.isTest = data.isTest22?true:false;
data.isTest = data.isTest23?true:false;
this.globalData.configJson = data
})

6
pages/index/index.js

@ -32,7 +32,8 @@ Page({
prizeInfo: null,
otherPlat: null,
activeBannerIndex: 0,
smBannerIndex:0
smBannerIndex: 0,
indexSeason: {}
},
onLoad: function (options) {
@ -538,7 +539,8 @@ Page({
this.setData({
indexHot: app.globalData.configJson.indexHot,
isTest: app.globalData.configJson.isTest,
otherPlat:app.globalData.configJson.otherPlats
otherPlat: app.globalData.configJson.otherPlats,
indexSeason: app.globalData.configJson.indexSeason
})
console.log(app.globalData.configJson)
this.getFourProduct()

24
pages/index/index.wxml

@ -1,8 +1,9 @@
<!--index.wxml-->
<title title="君到苏州(文化旅游总入口)"></title>
<!-- <view class="old-btn">关怀模式</view> -->
<image class="top-bg-img" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/spring22/flowerbg.png" mode="widthFix"></image>
<image class="top-bg-img" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/spring22/flower.gif" mode="widthFix"></image>
<!-- <image class="top-bg-img" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/spring22/flowerbg.png" mode="widthFix"></image> -->
<!-- <image class="top-bg-img" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/spring22/flower.gif" mode="widthFix"></image> -->
<image class="top-bg-img" src="{{indexSeason.topBac}}" mode="widthFix"></image>
<view wx:if="{{weather}}" class="top-box">
<image src="{{weather.icon2}}" style="margin-left:0" mode="aspectFill"></image>
<view class="weather-num">{{weather.max_temp}}°</view>
@ -136,8 +137,7 @@
</view>
</view>
<view class="sale-road-boxes" style="margin-top:0">
<image mode="widthFix" style="width:403rpx" src="https://static.ticket.sz-trip.com/xcxImages/spring22/title1.png">
</image>
<image mode="heightFix" style="height:86rpx" src="{{indexSeason.lyzs}}"></image>
</view>
<view class="pic-list" style="margin-top:20rpx">
<image bindtap="gotoPath" data-event="food_click" data-title="街巷美食" data-path="/pages/list/{{isTest?'road':'food'}}/index"
@ -149,8 +149,7 @@
<image bindtap="city" data-event="city_click" src="https://static.ticket.sz-trip.com/xcxImages/index/pic4.png" mode="aspectFill"></image>
</view>
<view class="sale-road-boxes" style="margin-top:0;align-items:center">
<image mode="widthFix" style="width:403rpx" src="https://static.ticket.sz-trip.com/xcxImages/spring22/title2.png">
</image>
<image mode="heightFix" style="height:86rpx" src="{{indexSeason.ggfw}}"></image>
<navigator url="/pages/pbService/index" catchtap="pagePoint" data-event="public_view" class="title-more">更多<text class="iconfont icon-you"></text> </navigator>
</view>
<view style="overflow-x:auto">
@ -174,8 +173,7 @@
</view>
</view>
<view class="sale-road-boxes" style="margin-top:0">
<image mode="widthFix" style="width:403rpx" src="https://static.ticket.sz-trip.com/xcxImages/spring22/title3.png">
</image>
<image mode="heightFix" style="height:86rpx" src="{{indexSeason.wlcx}}"></image>
</view>
<scroll-view scroll-x style="height:360rpx" bindscroll="listenScroll" class="slide-box">
<view class="pbservice" style="margin-bottom:30rpx">
@ -239,8 +237,7 @@
<view class="scroll-line-bg" style="width:{{4 / 5 * 100}}%;margin-left:{{scrollLeft}}px"></view>
</view>
<view class="sale-road-boxes" style="margin-top:0">
<image mode="widthFix" style="width:403rpx" src="https://static.ticket.sz-trip.com/xcxImages/spring22/title4.png">
</image>
<image mode="heightFix" style="height:86rpx" src="{{indexSeason.sqj}}"></image>
</view>
<view class="six-box">
<image bindtap="gotoPath" data-event="{{area_ids[index]}}_click" data-title="苏城六纪" data-path="/pages/list/six/index?area={{area_ids[index]}}"
@ -248,8 +245,7 @@
</image>
</view>
<view class="sale-road-boxes" style="margin-top:0" wx:if="{{otherPlat}}">
<image mode="widthFix" style="width:403rpx" src="https://static.ticket.sz-trip.com/xcxImages/spring22/title5.png">
</image>
<image mode="heightFix" style="height:86rpx" src="{{indexSeason.csjwlpt}}"></image>
</view>
<view class="other-plats" wx:if="{{otherPlat}}">
<view class="other-plat" wx:for="{{otherPlat}}" bindtap="gotoOther" data-item="{{item}}">
@ -258,10 +254,8 @@
</view>
</view>
<view class="sale-road-boxes" style="margin-top:0">
<image mode="widthFix" style="width:403rpx" src="https://static.ticket.sz-trip.com/xcxImages/spring22/title6.png">
</image>
<image mode="heightFix" style="height:86rpx" src="{{indexSeason.rmtj}}"></image>
</view>
<view class="hot-list" wx:if="{{isTest==false}}">
<view class="hot-list-item" wx:for="{{2}}" wx:for-index="number">
<view wx:for="{{list}}" wx:if="{{index%2==number}}" bindtap="gotoDetail" data-item="{{item}}">

Loading…
Cancel
Save