Browse Source

首页改版

master
jiazhipeng 7 months ago
parent
commit
adfcf61634
  1. 4
      app.json
  2. BIN
      images/ai.png
  3. BIN
      images/ai_seld.png
  4. BIN
      images/aindex_seld.png
  5. BIN
      images/amap_seld.png
  6. BIN
      images/auser_seld.png
  7. BIN
      images/index.png
  8. BIN
      images/index_seld.png
  9. BIN
      images/map.png
  10. BIN
      images/map_seld.png
  11. BIN
      images/user.png
  12. BIN
      images/user_seld.png
  13. 20
      pages/index/index.js
  14. 34
      pages/index/index.wxml
  15. 103
      pages/index/index.wxss
  16. 4
      utils/https.js

4
app.json

@ -249,8 +249,8 @@
"style": "v2", "style": "v2",
"sitemapLocation": "sitemap.json", "sitemapLocation": "sitemap.json",
"tabBar": { "tabBar": {
"color": "#999999", "color": "#000000",
"selectedColor": "#22A3CD", "selectedColor": "#000000",
"borderStyle": "white", "borderStyle": "white",
"list": [ "list": [
{ {

BIN
images/ai.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 17 KiB

BIN
images/ai_seld.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 25 KiB

BIN
images/aindex_seld.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

BIN
images/amap_seld.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

BIN
images/auser_seld.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

BIN
images/index.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

BIN
images/index_seld.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 7.1 KiB

BIN
images/map.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 11 KiB

BIN
images/map_seld.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 13 KiB

BIN
images/user.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
images/user_seld.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 11 KiB

20
pages/index/index.js

@ -405,6 +405,9 @@ Page({
urltopage: {}, urltopage: {},
cityIndex: 0,
scrollItem: "scrollItem-0",
// ---------------2025-5-26改版没用到的------------------ // ---------------2025-5-26改版没用到的------------------
fourProduct: [], fourProduct: [],
hotIndex: 0, hotIndex: 0,
@ -520,7 +523,7 @@ Page({
}) })
} else { } else {
// 小程序是3 // 小程序是3
commonApi._post("adv/get_home_ui", {type_id: 3}).then(res => { commonApi._post("adv/get_home_ui", {type_id: 15}).then(res => {
let obj = {}; let obj = {};
(res.data.content||[]).forEach(item => { (res.data.content||[]).forEach(item => {
obj[item.id] = item.image obj[item.id] = item.image
@ -1012,6 +1015,21 @@ Page({
}) })
}, },
changeSimpleVal (e) {
let keyname = e.currentTarget.dataset.keyname;
let val = e.currentTarget.dataset.val;
let param = {}
param[keyname] = val
if (keyname == "cityIndex") {
let scrollIndex = val-2
if (scrollIndex<0) { scrollIndex = 0 }
param.scrollItem = "scrollItem-"+scrollIndex
}
this.setData(param)
console.log(this.data)
},
onShow: function() { onShow: function() {
this.pagePoint({event: 'home_view'}, 1) this.pagePoint({event: 'home_view'}, 1)
// 修复 首页广告点击后返回首页 tabbar不显示 // 修复 首页广告点击后返回首页 tabbar不显示

34
pages/index/index.wxml

@ -11,7 +11,7 @@
src="https://static.ticket.sz-trip.com/uploads/20250714/1f3ac6a7144c6e6849edad89289061cc.png" mode="aspectFill"></image> src="https://static.ticket.sz-trip.com/uploads/20250714/1f3ac6a7144c6e6849edad89289061cc.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">
<image lazy-load src="https://static.ticket.sz-trip.com/uploads/20250526/f7cbe782688db5e39d30a24e4a2724b6.png" class="iconfont" style="width: 26rpx;height: 26rpx;"></image> <image lazy-load src="https://static.ticket.sz-trip.com/uploads/20250916/7d6a5865ffc145ba762fb5a977e4bb37.png" class="iconfont" style="width: 26rpx;height: 26rpx;"></image>
<view class="textOver" style="color:#000000">搜索您想要的</view> <view class="textOver" style="color:#000000">搜索您想要的</view>
</navigator> </navigator>
</view> </view>
@ -104,7 +104,7 @@
<view class="season-hot"> <view class="season-hot">
<view class="season-item" wx:for="{{list}}" wx:key="index" bind:tap="productGotoDetail" data-item="{{item}}" data-source="当季热门"> <view class="season-item" wx:for="{{list}}" wx:key="index" bind:tap="productGotoDetail" data-item="{{item}}" data-source="当季热门">
<image lazy-load src="{{item.headimg}}"></image> <image lazy-load src="{{item.headimg}}"></image>
<view class="season-content" style="padding:6rpx 12rpx;min-height: 130rpx;"> <view class="season-content" style="padding:0 12rpx 6rpx;min-height: 130rpx;">
<view class="textOver2">{{item.title}}</view> <view class="textOver2">{{item.title}}</view>
<view class="tags textOver" wx:if="{{item.display_tags}}"> <view class="tags textOver" wx:if="{{item.display_tags}}">
<view class="tag" wx:for="{{item.display_tags_arr}}" wx:key="index" wx:for-item="tag">{{tag}}</view> <view class="tag" wx:for="{{item.display_tags_arr}}" wx:key="index" wx:for-item="tag">{{tag}}</view>
@ -187,10 +187,10 @@
<!-- 旅游助手 --> <!-- 旅游助手 -->
<view class="sale-road-boxes" style="margin-top:36rpx" wx:if="{{func_data.helper_travel}}"> <view class="sale-road-boxes" style="margin-top:36rpx" wx:if="{{func_data.helper_travel}}">
<image lazy-load mode="heightFix" class="common-header-img" src="{{indexSeason.lyzs}}"></image> <image lazy-load mode="widthFix" class="common-header-img" src="{{indexSeason.lyzs}}"></image>
<!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[1]}}" mode="" style="width: 276rpx;height: 100rpx;"/> --> <!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[1]}}" mode="" style="width: 276rpx;height: 100rpx;"/> -->
</view> </view>
<view class="pic-list" style="margin-top:30rpx" wx:if="{{func_data.helper_travel}}"> <view class="pic-list" style="margin-top:-40rpx;position: relative;z-index: 1;" wx:if="{{func_data.helper_travel}}">
<image lazy-load class="new-pic" wx:for="{{travelData}}" wx:key="index" data-item="{{item}}" bindtap="mainNavClick" <image lazy-load class="new-pic" wx:for="{{travelData}}" wx:key="index" data-item="{{item}}" bindtap="mainNavClick"
src="{{item.icon}}" mode="aspectFill"></image> src="{{item.icon}}" mode="aspectFill"></image>
</view> </view>
@ -208,7 +208,7 @@
<!-- 数字文旅--> <!-- 数字文旅-->
<view class="sale-road-boxes" style="margin-top:30rpx" wx:if="{{func_data.culture_digital}}"> <view class="sale-road-boxes" style="margin-top:30rpx" wx:if="{{func_data.culture_digital}}">
<image lazy-load mode="heightFix" class="common-header-img" src="{{indexSeason.wlcx}}"></image> <image lazy-load mode="widthFix" class="common-header-img" src="{{indexSeason.wlcx}}"></image>
<!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[0]}}" mode="" style="width: 276rpx;height: 100rpx;"/> --> <!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[0]}}" mode="" style="width: 276rpx;height: 100rpx;"/> -->
</view> </view>
<view class="slide-out-box" wx:if="{{func_data.culture_digital}}"> <view class="slide-out-box" wx:if="{{func_data.culture_digital}}">
@ -230,16 +230,30 @@
<!-- 十全十美 --> <!-- 十全十美 -->
<view class="sale-road-boxes" wx:if="{{func_data.scenery_ten}}"> <view class="sale-road-boxes" wx:if="{{func_data.scenery_ten}}">
<image lazy-load mode="heightFix" class="common-header-img" src="{{indexSeason.sqj}}"></image> <image lazy-load mode="widthFix" class="common-header-img" src="{{indexSeason.sqj}}"></image>
<!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[2]}}" mode="" /> --> <!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[2]}}" mode="" /> -->
</view> </view>
<view class="six-box-new" wx:if="{{func_data.scenery_ten}}" > <view class="six-box-new" wx:if="{{func_data.scenery_ten}}" >
<image lazy-load wx:for="{{SQSM}}" src="{{item.icon}}" data-item="{{item}}" bindtap="mainNavClick" mode="aspectFill" wx:key="index"></image> <view class="big-image-box">
<image lazy-load src="{{SQSM[cityIndex].icon}}" mode="aspectFill" bindtap="mainNavClick" data-item="{{SQSM[cityIndex]}}"></image>
<!-- <view class="text-container">
<view style="font-weight: bold;font-size: 32rpx;">昆山市</view>
<view>小昆山势卧麒麟,独角撑空甓塔新</view>
</view> -->
</view>
<scroll-view scroll-x enable-flex scroll-with-animation class="small-image-box" scroll-into-view="{{scrollItem}}">
<view id="scrollItem-{{index}}" class="small-image-item {{cityIndex==index?'active':''}}" wx:for="{{SQSM}}" bind:tap="changeSimpleVal"
data-keyname="cityIndex" data-val="{{index}}" mode="aspectFill" wx:key="index">
<image lazy-load src="{{item.icon}}" mode="aspectFill"></image>
<view class="text-box">{{item.menu_name}}</view>
</view>
</scroll-view>
</view> </view>
<!-- 长三角文旅平台 --> <!-- 长三角文旅平台 -->
<view class="sale-road-boxes" style="margin-top:0" wx:if="{{otherPlat &&func_data.platform_nearby}}"> <view class="sale-road-boxes" style="margin-top:0" wx:if="{{otherPlat &&func_data.platform_nearby}}">
<image lazy-load mode="heightFix" class="common-header-img" src="{{indexSeason.csjwlpt}}"></image> <image lazy-load mode="widthFix" class="common-header-img" src="{{indexSeason.csjwlpt}}"></image>
<!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[3]}}" mode="" style="width: 276rpx;height: 100rpx;"/> --> <!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[3]}}" mode="" style="width: 276rpx;height: 100rpx;"/> -->
</view> </view>
<view class="other-plats" wx:if="{{otherPlat &&func_data.platform_nearby}}"> <view class="other-plats" wx:if="{{otherPlat &&func_data.platform_nearby}}">
@ -251,10 +265,10 @@
<!-- 热门推荐 --> <!-- 热门推荐 -->
<view class="sale-road-boxes" style="margin-top:0" wx:if="{{repurchaseList.length>0 &&func_data.repurchase }}"> <view class="sale-road-boxes" style="margin-top:0" wx:if="{{repurchaseList.length>0 &&func_data.repurchase }}">
<image lazy-load mode="heightFix" class="common-header-img" src="{{indexSeason.rmtj}}"></image> <image lazy-load mode="widthFix" class="common-header-img" src="{{indexSeason.rmtj}}"></image>
<!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[4]}}" mode="" style="width: 276rpx;height: 100rpx;"/> --> <!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[4]}}" mode="" style="width: 276rpx;height: 100rpx;"/> -->
</view> </view>
<view class="hot-list" wx:if="{{func_data.repurchase}}"> <view class="hot-list" style="margin-top: -40rpx;position: relative;z-index: 1;" wx:if="{{func_data.repurchase}}">
<view class="hot-list-item" wx:for="{{2}}" wx:for-index="number" wx:key="number"> <view class="hot-list-item" wx:for="{{2}}" wx:for-index="number" wx:key="number">
<view wx:for="{{repurchaseList}}" wx:if="{{index%2==number}}" bindtap="gotoDetail" data-item="{{item}}" data-source="回购榜" wx:key="id"> <view wx:for="{{repurchaseList}}" wx:if="{{index%2==number}}" bindtap="gotoDetail" data-item="{{item}}" data-source="回购榜" wx:key="id">
<view class="hot-item"> <view class="hot-item">

103
pages/index/index.wxss

@ -99,6 +99,7 @@
flex-wrap: wrap; flex-wrap: wrap;
border-radius: 20rpx; border-radius: 20rpx;
background: #FFEEAD; background: #FFEEAD;
padding-top: 13rpx;
} }
.top-icon-item { .top-icon-item {
margin-bottom: 37rpx; margin-bottom: 37rpx;
@ -117,8 +118,8 @@
margin-right: 0; margin-right: 0;
} }
.top-icon-item image { .top-icon-item image {
width: 93.33rpx; width: 66.33rpx;
height: 93.33rpx; height: 66.33rpx;
display: block; display: block;
transition: all 0.2s; transition: all 0.2s;
/* margin: 0 auto; */ /* margin: 0 auto; */
@ -163,7 +164,7 @@
.sale-road-boxes { .sale-road-boxes {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top: 40rpx; margin-top: 48rpx;
position: relative; position: relative;
align-items: flex-end; align-items: flex-end;
} }
@ -423,9 +424,8 @@
flex-wrap: wrap; flex-wrap: wrap;
} }
.new-pic { .new-pic {
width: 340rpx; width: 157.33rpx;
height: 146.67rpx; height: 226.67rpx;
margin-bottom: 20rpx;
} }
.title-more { .title-more {
@ -805,23 +805,92 @@
width: 697rpx; width: 697rpx;
/* background: linear-gradient(-90deg, #FF9B6A, #D02E25); */ /* background: linear-gradient(-90deg, #FF9B6A, #D02E25); */
border-radius: 20rpx; border-radius: 20rpx;
display: flex; margin: -40rpx 0 53.33rpx;
justify-content: space-between;
align-items: center;
overflow: scroll;
margin: 32rpx 0 53.33rpx;
z-index: 1; z-index: 1;
position: relative; position: relative;
} }
.six-box-new image { .six-box-new .big-image-box {
width: 333.33rpx; width: 100%;
height: 200rpx !important; height: 346rpx;
/* background: #FFE7C0; */ position: relative;
border-radius: 20rpx;
}
.six-box-new .big-image-box image{
width: 100%;
height: 100%;
border-radius: 20rpx 20rpx 0 0;
}
.six-box-new .big-image-box .text-container{
width: 100%;
height: 100%;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
font-weight: 500;
font-size: 24rpx;
color: #FFFFFF;
display: flex;
flex-direction: column;
justify-content: flex-end;
padding: 16rpx;
box-sizing: border-box;
}
.six-box-new .small-image-box{
width: 100%;
padding: 10rpx 16rpx;
overflow-x: auto;
background: white;
display: flex;
flex-wrap: nowrap;
border-radius: 0 0 20rpx 20rpx;
box-sizing: border-box;
height: 120rpx;
}
.six-box-new .small-image-box .small-image-item{
width: 120rpx;
height: 100rpx;
background: #FF8623;
border-radius: 13rpx;
flex-shrink: 0; flex-shrink: 0;
margin-right: 13.33rpx; margin-right: 27rpx;
position: relative;
box-sizing: border-box;
overflow: hidden;
}
.six-box-new .small-image-box .small-image-item.active{
border: 2px solid #000;
}
.six-box-new .small-image-box .small-image-item:last-of-type{
margin-right: 0rpx;
}
.six-box-new .small-image-box image{
width: 100%;
height: 100%;
border-radius: 13rpx;
} }
.six-box-new .small-image-box .small-image-item .text-box{
width: 100%;
height: 40rpx;
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: #FFC543;
font-weight: 500;
font-size: 23rpx;
color: #000000;
text-align: center;
line-height: 40rpx;
border-radius: 0 0 13rpx 13rpx;
}
.six-box-new .small-image-box .small-image-item.active .text-box{
background: #FF8623;
color: #FFFFFF;
}
/* 春节金刚区字体颜色样式更换 */ /* 春节金刚区字体颜色样式更换 */
.top-icon-text { .top-icon-text {
color: #111111; color: #111111;

4
utils/https.js

@ -1,8 +1,8 @@
var app = getApp(); var app = getApp();
import util from "../utils/util" import util from "../utils/util"
// import userApi from "../utils/https/user.js"; // import userApi from "../utils/https/user.js";
const baseUrl = "https://test.api.cloud.sz-trip.com/api/"; // const baseUrl = "https://test.api.cloud.sz-trip.com/api/";
// let baseUrl = "https://api.cloud.sz-trip.com/api/"; let baseUrl = "https://api.cloud.sz-trip.com/api/";
const env = wx.getAccountInfoSync().miniProgram.envVersion const env = wx.getAccountInfoSync().miniProgram.envVersion
if (env == 'develop1') { if (env == 'develop1') {
baseUrl = "https://test.api.cloud.sz-trip.com/api/" baseUrl = "https://test.api.cloud.sz-trip.com/api/"

Loading…
Cancel
Save