Browse Source

首页改版

master
jiazhipeng 2 years ago
parent
commit
c06705afe7
  1. 4
      app.wxss
  2. 34
      pages/index/index.js
  3. 24
      pages/index/index.wxml
  4. 13
      pages/index/index.wxss
  5. 8
      project.private.config.json
  6. 2
      subPackages/indexGQ/index.wxml
  7. 2
      subPackages/indexGQ/index.wxss

4
app.wxss

@ -140,6 +140,10 @@ page{
background-repeat: no-repeat; background-repeat: no-repeat;
margin: 0 auto; margin: 0 auto;
} }
.no-scrollbar::-webkit-scrollbar{
display: none;
}
/* page { /* page {
filter: grayscale(100%); filter: grayscale(100%);
} */ } */

34
pages/index/index.js

@ -98,14 +98,14 @@ Page({
bdList:[ bdList:[
{ {
bg: 'linear-gradient(172deg, #FFF3E5, #FFD9AD);', bg: 'linear-gradient(172deg, #FFF3E5, #FFD9AD);',
icon:'https://static.ticket.sz-trip.com/uploads/20240923/15ee44a960511cdcf276b5d8df472626.png', //游 icon:'https://static.ticket.sz-trip.com/uploads/20240923/15ee44a960511cdcf276b5d8df472626.png', //游 景点
url:'https://m.cloud.sz-trip.com/OneDayTravelNew', url:'',
path:'', path:'/pages/list/scene/index',
}, },
{ {
bg: 'linear-gradient(172deg, #E7F1FF, #ADD1FF);', bg: 'linear-gradient(172deg, #E7F1FF, #ADD1FF);',
icon:'https://static.ticket.sz-trip.com/uploads/20240923/cd652f4bcfcef7f55863bf8587609ca4.png', //非玩不可 icon:'https://static.ticket.sz-trip.com/uploads/20240923/cd652f4bcfcef7f55863bf8587609ca4.png', //非玩不可 景点产品
path:'/pages/list/scene/index', path:'/pages/list/night/index',
url:'', url:'',
}, },
{ {
@ -123,10 +123,13 @@ Page({
], ],
list1:[], //非玩-景点 list1:[], //游-景点
list2:[], //非买-文创 list2:[], //非晚-夜游
list3:[], //非游-一日游 list3:[], //非看-剧场演出
list4:[], //非看-剧场演出 list4:[], //非买-文创
}, },
onLoad: function(options) { onLoad: function(options) {
this.getHeight() this.getHeight()
@ -247,7 +250,7 @@ Page({
}, },
getList() { getList() {
let bdList = this.data.bdList let bdList = this.data.bdList
// 非玩不可--景点 // --景点
commonApi._post("scene/get_scene_by_tag",{ commonApi._post("scene/get_scene_by_tag",{
tag_id:"4", tag_id:"4",
limit:6, limit:6,
@ -258,6 +261,7 @@ Page({
title:'', title:'',
area_id:'' area_id:''
}).then(res=>{ }).then(res=>{
console.log('景点', res)
res.data.list.map(item => { res.data.list.map(item => {
if (item.distance || item.distance == 0) { if (item.distance || item.distance == 0) {
if (item.distance >= 1000) { if (item.distance >= 1000) {
@ -278,19 +282,19 @@ Page({
limit: 6, limit: 6,
}).then(res=>{ }).then(res=>{
this.setData({ this.setData({
list2:res.data.list list4:res.data.list
}) })
}) })
// 非游不可--线路一日游 // 非游不可--线路一日游
commonApi._post('product/get_product_by_tag',{ commonApi._post('product/get_product_by_tag',{
type_id: 23, // type_id: 23,
tag_id:17, tag_id: "10,11,12",
offset: 0, offset: 0,
limit: 6, limit: 6,
sort: 'weight' sort: 'weight'
}).then(res=>{ }).then(res=>{
this.setData({ this.setData({
list3:res.data.list list2:res.data.list
}) })
}) })
// 非看不可--剧场演出 // 非看不可--剧场演出
@ -305,7 +309,7 @@ Page({
title:'' title:''
}).then(res=>{ }).then(res=>{
this.setData({ this.setData({
list4:res.data.list list3:res.data.list
}) })
}) })
}, },

24
pages/index/index.wxml

@ -20,14 +20,14 @@
</view> </view>
<view style="position:relative;z-index: 1;" > <view style="position:relative;z-index: 1;" >
<swiper class="swiper" autoplay="{{true}}" interval="{{5000}}" duration="{{300}}" bindchange="changeBannerIndex" circular> <swiper class="swiper" autoplay="{{true}}" interval="{{5000}}" duration="{{300}}" bindchange="changeBannerIndex" circular>
<block wx:for="{{banner}}" wx:key="this"> <block wx:for="{{banner}}" wx:key="index">
<swiper-item bindtap="bannerClick" data-item="{{item}}"> <swiper-item bindtap="bannerClick" data-item="{{item}}">
<image src="{{item.head_img}}" mode="scaleToFill"></image> <image src="{{item.head_img}}" mode="scaleToFill"></image>
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
<view class="com-flex dot-list"> <view class="com-flex dot-list">
<view class="dot{{index===activeBannerIndex?' active':''}}" wx:for="{{banner}}" wx:key="this"></view> <view class="dot{{index===activeBannerIndex?' active':''}}" wx:for="{{banner}}" wx:key="index"></view>
</view> </view>
</view> </view>
<view class="content"> <view class="content">
@ -43,9 +43,9 @@
</view> </view>
<view wx:if="{{hdrlNavIndex!=4}}"> <view wx:if="{{hdrlNavIndex!=4}}">
<view style="margin-left:16.67rpx;margin-right: 14.67rpx;display: flex;overflow-x: scroll;" class="hdrlList" wx:if="{{!isTest}}"> <view style="margin-left:16.67rpx;margin-right: 14.67rpx;display: flex;overflow-x: scroll;" class="hdrlList" wx:if="{{!isTest}}">
<view class="hdrlItem" wx:for="{{hdrlList}}" bindtap="goDetail" data-item="{{item}}" wx:key="this" style="width: 593.33rpx;"> <view class="hdrlItem" wx:for="{{hdrlList}}" bindtap="goDetail" data-item="{{item}}" wx:key="index" style="width: 593.33rpx;">
<view style="background: #fff;display: flex;border-radius: 13rpx;"> <view style="background: #fff;display: flex;border-radius: 13rpx;">
<image class="hdrlItem-img" src="{{item.post_url}}" mode=""/> <image class="hdrlItem-img" src="{{item.post_url}}" mode="aspectFill"/>
<view class="hdrlItem-content"> <view class="hdrlItem-content">
<view class="hdrlItem-title textOver3">{{item.name}}</view> <view class="hdrlItem-title textOver3">{{item.name}}</view>
<view class="hdrlItem-date">{{item.begin_date}}-{{item.end_date}}</view> <view class="hdrlItem-date">{{item.begin_date}}-{{item.end_date}}</view>
@ -56,7 +56,7 @@
</view> </view>
<view wx:else> <view wx:else>
<view style="margin-left:16.67rpx;margin-right: 14.67rpx;display: flex;overflow-x: scroll;" wx:if="{{!isTest}}" class="one"> <view style="margin-left:16.67rpx;margin-right: 14.67rpx;display: flex;overflow-x: scroll;" wx:if="{{!isTest}}" class="one">
<view class="hdrlItem" wx:for="{{hdrlList}}" bindtap="goDetail" data-item="{{item}}" wx:key="this"> <view class="hdrlItem" wx:for="{{hdrlList}}" bindtap="goDetail" data-item="{{item}}" wx:key="index">
<view style="background: #fff;width: 570rpx;display: flex;border-radius: 13rpx;"> <view style="background: #fff;width: 570rpx;display: flex;border-radius: 13rpx;">
<image class="movieItem-img" src="{{item.headimg}}" mode=""/> <image class="movieItem-img" src="{{item.headimg}}" mode=""/>
<view style="display: flex;flex-direction: column;justify-content: space-between;padding: 10rpx 10rpx 5rpx 2rpx;font-size: 30rpx;font-weight: 500;width: 500rpx;box-sizing: border-box;"> <view style="display: flex;flex-direction: column;justify-content: space-between;padding: 10rpx 10rpx 5rpx 2rpx;font-size: 30rpx;font-weight: 500;width: 500rpx;box-sizing: border-box;">
@ -80,8 +80,8 @@
</view> </view>
<!-- 下面几大板块 --> <!-- 下面几大板块 -->
<view class="slide-out-box"> <view class="slide-out-box">
<scroll-view scroll-x bindscroll="listenScroll" class="slide-box"> <scroll-view scroll-x bindscroll="listenScroll" class="slide-box no-scrollbar">
<view class="pbservice" style="margin-bottom:30rpx;width: fit-content;"> <view class="pbservice no-scrollbar" style="margin-bottom:30rpx;width: fit-content;">
<view bindtap="gotoPath" data-event="ticket_click" style="margin-left: 10rpx;" data-title="景点门票" data-path="/pages/list/scene/index" class="pbservice-item"> <view bindtap="gotoPath" data-event="ticket_click" style="margin-left: 10rpx;" data-title="景点门票" data-path="/pages/list/scene/index" class="pbservice-item">
<image src="https://static.ticket.sz-trip.com/jundaosuzhou/images/holiday/jdmp.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/jundaosuzhou/images/holiday/jdmp.png" mode="widthFix"></image>
<view class="text">景点门票</view> <view class="text">景点门票</view>
@ -127,14 +127,14 @@
<view class="small-swiper-box"> <view class="small-swiper-box">
<swiper class="small-swiper" autoplay="{{true}}" interval="{{5000}}" duration="{{300}}" <swiper class="small-swiper" autoplay="{{true}}" interval="{{5000}}" duration="{{300}}"
bindchange="changeSmBannerIndex"> bindchange="changeSmBannerIndex">
<block wx:for="{{xiaobanner}}" wx:key="*this"> <block wx:for="{{xiaobanner}}" wx:key="index">
<swiper-item bindtap="bannerClick" data-item="{{item}}"> <swiper-item bindtap="bannerClick" data-item="{{item}}">
<image style="border-radius:13rpx" src="{{item.head_img}}" mode="aspectFill"></image> <image style="border-radius:13rpx" src="{{item.head_img}}" mode="aspectFill"></image>
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
<view class="dot-list com-flex sm-dot-list"> <view class="dot-list com-flex sm-dot-list">
<view class="dot{{smBannerIndex==index?' active':''}}" wx:for="{{xiaobanner}}" wx:key="this"></view> <view class="dot{{smBannerIndex==index?' active':''}}" wx:for="{{xiaobanner}}" wx:key="index"></view>
</view> </view>
</view> </view>
<!-- 游苏州 --> <!-- 游苏州 -->
@ -150,7 +150,7 @@
<view class="ysz-box {{yszIndex==1?'ysz-box2':''}}"> <view class="ysz-box {{yszIndex==1?'ysz-box2':''}}">
<view wx:if="{{yszIndex == 0}}" style="margin: 20rpx 14rpx 0;"> <view wx:if="{{yszIndex == 0}}" style="margin: 20rpx 14rpx 0;">
<view class="pbservice ggfw-list" style="width:100%;overflow-x: auto;"> <view class="pbservice ggfw-list" style="width:100%;overflow-x: auto;">
<view bindtap="gotoPath" data-event="security_home_click" data-title="电子社保卡" data-path="/pages/pbService/security/index" class="pbservice-item ggfw"> <view bindtap="gotoUrl" data-event="sbk" data-title="电子社保卡" data-url="https://m.cloud.sz-trip.com/sbkLogin" class="pbservice-item ggfw">
<image src="https://static.ticket.sz-trip.com/uploads/20240923/4c0ee81974879d5160b932a7e526e90d.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/uploads/20240923/4c0ee81974879d5160b932a7e526e90d.png" mode="widthFix"></image>
<view>电子社保卡</view> <view>电子社保卡</view>
</view> </view>
@ -201,7 +201,7 @@
<image class="tjbd-title" style="width: 333rpx;height: 80rpx;margin-left: 26rpx;margin-bottom: 20rpx;" src="https://static.ticket.sz-trip.com/uploads/20240923/fc8d43d1ca820912aae4b2bede13235c.png" mode=""/> <image class="tjbd-title" style="width: 333rpx;height: 80rpx;margin-left: 26rpx;margin-bottom: 20rpx;" src="https://static.ticket.sz-trip.com/uploads/20240923/fc8d43d1ca820912aae4b2bede13235c.png" mode=""/>
<!-- 4个产品榜单 --> <!-- 4个产品榜单 -->
<view style="display: flex;overflow-x: scroll;padding-right: 20rpx;" class="bottom-box" wx:if="{{!isTest}}"> <view style="display: flex;overflow-x: scroll;padding-right: 20rpx;" class="bottom-box" wx:if="{{!isTest}}">
<view class="bd-box" style="background:{{item.bg}};" wx:for="{{bdList}}" wx:key="this"> <view class="bd-box" style="background:{{item.bg}};" wx:for="{{bdList}}" wx:key="index">
<!-- <image class="zz" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/holiday/zzIcon.png" mode=""/> --> <!-- <image class="zz" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/holiday/zzIcon.png" mode=""/> -->
<view class="bd-top"> <view class="bd-top">
<image class="bd-type" src="{{item.icon}}" mode=""/> <image class="bd-type" src="{{item.icon}}" mode=""/>
@ -235,7 +235,7 @@
</view> </view>
<view class="bd-item-bottom"> <view class="bd-item-bottom">
<view class="bd-price">{{item.price/100}}</view> <view class="bd-price">{{item.price/100}}</view>
<view class="bd-distance" wx:if="{{item.distance}}">{{(item.distance/1000)}}km</view> <view class="bd-distance" wx:if="{{item.distance}}">{{(item.distance)}}</view>
</view> </view>
</view> </view>
</view> </view>

13
pages/index/index.wxss

@ -1040,10 +1040,13 @@ page {
/* margin-bottom: 26.67rpx; */ /* margin-bottom: 26.67rpx; */
} }
.ggfw-list{
display: flex;
justify-content: space-around;
}
.ggfw { .ggfw {
width: 132rpx; width: auto;
margin:0 22rpx; margin:0;
} }
.ggfw image{ .ggfw image{
margin-bottom: 16.67rpx; margin-bottom: 16.67rpx;
@ -1182,7 +1185,7 @@ page {
height: 53rpx; height: 53rpx;
background: rgba(255,250,245,0.3); background: rgba(255,250,245,0.3);
border-radius: 13rpx; border-radius: 13rpx;
border: 1px solid #FFFFFF; /* border: 1px solid #FFFFFF; */
font-size: 32rpx; font-size: 32rpx;
color: #FFFFFF; color: #FFFFFF;
@ -1396,7 +1399,7 @@ page {
.buyMovie { .buyMovie {
width: 160rpx; width: 160rpx;
height: 56rpx; height: 56rpx;
background: #078565; background: #FF4848;
color: #fff; color: #fff;
border-radius: 20rpx; border-radius: 20rpx;
text-align: center; text-align: center;

8
project.private.config.json

@ -7,15 +7,15 @@
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"name": "pages/info/postProductInfo/index", "name": "subPackages/indexs/index",
"pathName": "subPackages/index/index", "pathName": "subPackages/indexs/index",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null
}, },
{ {
"name": "subPackages/indexs/index", "name": "pages/info/postProductInfo/index",
"pathName": "subPackages/indexGQ/index", "pathName": "subPackages/index/index",
"query": "", "query": "",
"launchMode": "default", "launchMode": "default",
"scene": null "scene": null

2
subPackages/indexGQ/index.wxml

@ -150,7 +150,7 @@
<view class="ysz-box {{yszIndex==1?'ysz-box2':''}}"> <view class="ysz-box {{yszIndex==1?'ysz-box2':''}}">
<view wx:if="{{yszIndex == 0}}" style="margin: 20rpx 14rpx 0;"> <view wx:if="{{yszIndex == 0}}" style="margin: 20rpx 14rpx 0;">
<view class="pbservice ggfw-list" style="width:100%;overflow-x: auto;"> <view class="pbservice ggfw-list" style="width:100%;overflow-x: auto;">
<view bindtap="gotoPath" data-event="security_home_click" data-title="电子社保卡" data-path="/pages/pbService/security/index" class="pbservice-item ggfw"> <view bindtap="gotoUrl" data-event="sbk" data-title="电子社保卡" data-url="https://m.cloud.sz-trip.com/sbkLogin" class="pbservice-item ggfw">
<image src="https://static.ticket.sz-trip.com/uploads/20240923/4c0ee81974879d5160b932a7e526e90d.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/uploads/20240923/4c0ee81974879d5160b932a7e526e90d.png" mode="widthFix"></image>
<view>电子社保卡</view> <view>电子社保卡</view>
</view> </view>

2
subPackages/indexGQ/index.wxss

@ -1396,7 +1396,7 @@ page {
.buyMovie { .buyMovie {
width: 160rpx; width: 160rpx;
height: 56rpx; height: 56rpx;
background: #078565; background: #FF4848;
color: #fff; color: #fff;
border-radius: 20rpx; border-radius: 20rpx;
text-align: center; text-align: center;

Loading…
Cancel
Save