Browse Source

国庆首页

master
jiazhipeng 2 years ago
parent
commit
487c179bc7
  1. 2
      app.js
  2. 43
      pages/index/index.js
  3. 81
      pages/index/index.wxml
  4. 5
      pages/index/index.wxss
  5. 8
      pages/list/six/index.js
  6. 4
      pages/list/six/index.wxml
  7. 4
      pages/pbService/index.wxml
  8. 12
      project.private.config.json
  9. 4
      subPackages/index/index.wxml
  10. 2
      subPackages/indexs/index.wxml

2
app.js

@ -21,7 +21,7 @@ App({
unique_key: "wechatxcx"
}).then(res => {
let data = JSON.parse(res.data);
data.isTest = data.isTest149? true : false;
data.isTest = data.isTest148? true : false;
this.globalData.configJson = data
}).then(() => {
// 获取ui配置文件

43
pages/index/index.js

@ -101,24 +101,32 @@ Page({
icon:'https://static.ticket.sz-trip.com/uploads/20240923/15ee44a960511cdcf276b5d8df472626.png', //游 景点
url:'',
path:'/pages/list/scene/index',
list: [],
},
{
bg: 'linear-gradient(172deg, #E7F1FF, #ADD1FF);',
icon:'https://static.ticket.sz-trip.com/uploads/20240923/cd652f4bcfcef7f55863bf8587609ca4.png', //非玩不可 景点产品
path:'/pages/list/night/index',
url:'',
list: [],
},
{
bg: 'linear-gradient(172deg, #F0EBFF, #E3D9FF);',
icon:'https://static.ticket.sz-trip.com/uploads/20240923/a0b95152b87215dccbb2e5dfa1bfd145.png', //非看不可
url:'',
path:'/pages/list/theatre/index',
list: [],
},
{
bg: 'linear-gradient(172deg, #FFEDF0, #FFC9D2);',
icon:'https://static.ticket.sz-trip.com/uploads/20240923/799befa78b1d474bfb26004cc2ef817d.png', //非买不可
path:'/pages/list/techan/index',
path:'/subPackages/techanNew/index',
url:'',
list: [],
},
@ -242,11 +250,11 @@ Page({
this.getWeather()
},
gobdDetail(e) {
console.log(e);
let url = e.currentTarget.dataset.url
wx.navigateTo({
url: url
})
let item = e.currentTarget.dataset.item
// wx.navigateTo({
// url: url
// })
util.gotoDetail(item)
},
getList() {
let bdList = this.data.bdList
@ -261,7 +269,7 @@ Page({
title:'',
area_id:''
}).then(res=>{
console.log('景点', res)
console.log('景点', res)
res.data.list.map(item => {
if (item.distance || item.distance == 0) {
if (item.distance >= 1000) {
@ -271,8 +279,10 @@ Page({
}
}
})
bdList[0].list = res.data.list
this.setData({
list1:res.data.list
list1:res.data.list,
bdList: bdList
})
})
// 非买不可--文创
@ -281,8 +291,10 @@ Page({
offset: 0,
limit: 6,
}).then(res=>{
bdList[3].list = res.data.list
this.setData({
list4:res.data.list
list4:res.data.list,
bdList: bdList
})
})
// 非游不可--线路一日游
@ -293,8 +305,10 @@ Page({
limit: 6,
sort: 'weight'
}).then(res=>{
bdList[1].list = res.data.list
this.setData({
list2:res.data.list
list2:res.data.list,
bdList: bdList
})
})
// 非看不可--剧场演出
@ -308,8 +322,10 @@ Page({
lon:this.data.lon,
title:''
}).then(res=>{
bdList[2].list = res.data.list
this.setData({
list3:res.data.list
list3:res.data.list,
bdList: bdList
})
})
},
@ -373,6 +389,11 @@ Page({
lon: this.data.lon,
page_num: 5
}).then(res => {
res.data.rows.forEach(v=>{
if (!v.post_url) {
v.post_url = "https://static.ticket.sz-trip.com/uploads/20240909/c9a0029cc9426d2a17f1dbbb7a179762.jpg"
}
})
this.setData({
hdrlList:res.data.rows
})

81
pages/index/index.wxml

@ -45,7 +45,8 @@
<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="index" style="width: 593.33rpx;">
<view style="background: #fff;display: flex;border-radius: 13rpx;">
<image class="hdrlItem-img" src="{{item.post_url}}" mode="aspectFill"/>
<!-- <image class="hdrlItem-img" src="{{item.post_url}}" mode="aspectFill"/> -->
<common-image class="hdrlItem-img" width="240rpx" height='213rpx' src="{{item.post_url || item.cover}}" defaultImage="https://static.ticket.sz-trip.com/uploads/20240909/c9a0029cc9426d2a17f1dbbb7a179762.jpg" mode="aspectFill"></common-image>
<view class="hdrlItem-content">
<view class="hdrlItem-title textOver3">{{item.name}}</view>
<view class="hdrlItem-date">{{item.begin_date}}-{{item.end_date}}</view>
@ -58,8 +59,10 @@
<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="index">
<view style="background: #fff;width: 570rpx;display: flex;border-radius: 13rpx;">
<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;">
<!-- <image class="movieItem-img" src="{{item.headimg}}" mode=""/> -->
<common-image class="hdrlItem-img" width="240rpx" height='213rpx' src="{{item.headimg}}" defaultImage="https://static.ticket.sz-trip.com/uploads/20240909/c9a0029cc9426d2a17f1dbbb7a179762.jpg" mode="aspectFill"></common-image>
<view style="display: flex;flex-direction: column;justify-content: space-between;padding: 10rpx 10rpx 10rpx 0;font-size: 30rpx;font-weight: bold;width: 500rpx;box-sizing: border-box;">
<view>{{item.title}}</view>
<view style="display: flex;justify-content: flex-end;">
<view class="buyMovie">去购票 ></view>
@ -90,7 +93,7 @@
<image src="https://static.ticket.sz-trip.com/jundaosuzhou/images/holiday/yysz.png" mode="widthFix"></image>
<view class="text">夜游苏州</view>
</view>
<view bindtap="gotoPath" data-event="specialty" data-title="文创特产" data-path="/pages/list/{{isTest?'road':'techan'}}/index" class="pbservice-item">
<view bindtap="gotoPath" data-event="specialty" data-title="文创特产" data-path="/subPackages/techanNew/index" class="pbservice-item">
<image src="https://static.ticket.sz-trip.com/jundaosuzhou/images/holiday/wctc.png" mode="widthFix"></image>
<view class="text">文创特产</view>
</view>
@ -111,7 +114,7 @@
<image src="https://static.ticket.sz-trip.com/jundaosuzhou/images/holiday/yky.png" mode="widthFix"></image>
<view class="text">一卡游</view>
</view>
<view bindtap="gotoPath" data-event="legacy" data-title="非遗专卖" data-path="/pages/list/{{isTest?'scene':'feiyi'}}/index" class="pbservice-item">
<view bindtap="gotoPath" data-event="legacy" data-title="非遗专卖" data-path="/subPackages/feiyiNew/index" class="pbservice-item">
<image src="https://static.ticket.sz-trip.com/jundaosuzhou/images/holiday/fyzm.png" mode="widthFix"></image>
<view class="text">非遗专卖</view>
</view>
@ -155,7 +158,8 @@
<view>电子社保卡</view>
</view>
<view bindtap="gotoUrl" data-event="comfort_click" data-title="高峰预警"
data-url="https://wlsjzx.zdhxwl.cn/kt_h5/index.html#/morecopy" class="pbservice-item ggfw" >
data-url="https://wlsjzx.zdhxwl.cn/kt_h5/index.html#/morecopy"
class="pbservice-item ggfw" >
<image src="https://static.ticket.sz-trip.com/uploads/20240923/43f561c40ef50aafa30a0a637fb016fb.png" mode="widthFix"></image>
<view>高峰预警</view>
</view>
@ -201,14 +205,15 @@
<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个产品榜单 -->
<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="index">
<view class="bd-box" style="background:{{bdItem.bg}};" wx:for-item="bdItem" wx:for-index="i" wx:for="{{bdList}}" wx:key="i">
<!-- <image class="zz" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/holiday/zzIcon.png" mode=""/> -->
<view class="bd-top">
<image class="bd-type" src="{{item.icon}}" mode=""/>
<view bindtap="moreBtn" class="bd-more" data-item="{{item}}">更多 ></view>
<image class="bd-type" src="{{bdItem.icon}}" mode=""/>
<view bindtap="moreBtn" class="bd-more" data-item="{{bdItem}}">更多 ></view>
</view>
<view wx:if="{{index==0}}" style="position: relative;z-index: 9;">
<view data-url="/pages/info/sceneProductInfo/index?id={{item.id}}" style="display: flex;align-items: center;margin-bottom: 20rpx;" wx:for="{{list1}}" wx:key="id" bindtap="gobdDetail">
<view style="position: relative;z-index: 9;">
<view bindtap="gobdDetail" style="display: flex;align-items: center;margin-bottom: 20rpx;" wx:for="{{bdItem.list}}"
wx:key="id" data-item="{{item}}">
<view class="bd-index">{{index+1}}</view>
<view class="bd-item">
<image class="bd-item-img" src="{{item.headimg}}" mode=""/>
@ -218,63 +223,13 @@
</view>
<view class="bd-item-bottom">
<view class="bd-price">{{item.price/100}}</view>
<view class="bd-distance" wx:if="{{item.distance}}">{{item.distance}}</view>
</view>
</view>
</view>
</view>
</view>
<view wx:if="{{index==1}}" style="position: relative;z-index: 9;">
<view bindtap="gobdDetail" data-url="/pages/info/postProductInfo/index?id={{item.id}}" style="display: flex;align-items: center;margin-bottom: 20rpx;" wx:for="{{list2}}" wx:key="id">
<view class="bd-index">{{index+1}}</view>
<view class="bd-item">
<image class="bd-item-img" src="{{item.headimg}}" mode="aspectFill"/>
<view class="bd-item-content">
<view class="bd-item-title textOver2">
{{item.title}}
</view>
<view class="bd-item-bottom">
<view class="bd-price">{{item.price/100}}</view>
<view class="bd-distance" wx:if="{{item.distance}}">{{(item.distance)}}</view>
</view>
</view>
</view>
</view>
</view>
<view wx:if="{{index==2}}" style="position: relative;z-index: 9;">
<view bindtap="gobdDetail" data-url="/pages/info/roadInfo/index?id={{item.id}}" style="display: flex;align-items: center;margin-bottom: 20rpx;" wx:for="{{list3}}" wx:key="id">
<view class="bd-index">{{index+1}}</view>
<view class="bd-item">
<image class="bd-item-img" src="{{item.headimg}}" mode=""/>
<view class="bd-item-content">
<view class="bd-item-title textOver2">
{{item.title}}
</view>
<view class="bd-item-bottom">
<view class="bd-price">{{item.price/100}}</view>
<view class="bd-distance" wx:if="{{item.distance}}">{{(item.distance/1000)}}km</view>
</view>
</view>
</view>
</view>
</view>
<view wx:if="{{index==3}}" style="position: relative;z-index: 9;">
<view bindtap="gobdDetail" data-url="/pages/info/sceneProductInfo/index?id={{item.scene_id}}" style="display: flex;align-items: center;margin-bottom: 20rpx;" wx:for="{{list4}}" wx:key="id">
<view class="bd-index">{{index+1}}</view>
<view class="bd-item">
<image class="bd-item-img" src="{{item.headimg}}" mode=""/>
<view class="bd-item-content">
<view class="bd-item-title textOver2">
{{item.title}}
</view>
<view class="bd-item-bottom">
<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>
</view>

5
pages/index/index.wxss

@ -571,7 +571,7 @@ page {
/* 元旦修改 新增样式 */
.scroll-line-bg2 {
margin-left: 24rpx;
background: #078565;
background: #FF4848;
height: 8rpx;
border-radius: 4rpx;
}
@ -1208,12 +1208,13 @@ page {
background-size: 100% 100%;
}
.hdrlItem-img {
width: 280rpx;
width: 240rpx;
height: 213rpx;
background: #8C8C8C;
border-radius: 13rpx;
flex-shrink: 0;
margin-right: 12rpx;
overflow: hidden;
}
.hdrlItem-content {
display: flex;

8
pages/list/six/index.js

@ -37,6 +37,14 @@ Page({
this.getTypes()
})
},
gotoUrl: function(e) {
let url = e.currentTarget.dataset.url;
app.globalData.weburl = url;
wx.navigateTo({
// url: '/pages/pbService/web/index?weburl='+encodeURIComponent('https://m.cloud.sz-trip.com/Cloudperform2022'),
url: '/pages/pbService/web/index?weburl=' + encodeURIComponent(url),
})
},
gotoPath:function(e){
console.log(e);
if(e.currentTarget.dataset.event.area_key == 'taicang'){

4
pages/list/six/index.wxml

@ -39,10 +39,10 @@
</view>
<view class="new-title">公共服务</view>
<view class="new-icons">
<navigator url="/pages/pbService/sceneComfort/index?area_code={{areas[areaIndex].area_key}}" class="new-icon">
<view data-event="comfort_click" data-title="景区舒适度" bindtap="gotoUrl" data-url="https://wlsjzx.zdhxwl.cn/kt_h5/index.html#/morecopy" class="new-icon">
<image class="green-shadow" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/six/icon5.png" mode="widthFix"></image>
<view>景区舒适度</view>
</navigator>
</view>
<navigator url="/pages/pbService/bike/index?type=2&lat={{areas[areaIndex].lat}}&lon={{areas[areaIndex].lon}}" class="new-icon">
<image class="blue-shadow" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/six/icon6.png" mode="widthFix"></image>
<view>停车场</view>

4
pages/pbService/index.wxml

@ -9,8 +9,8 @@
<image src="https://static.ticket.sz-trip.com/xcxImages/pbservice/pb1.png" mode="widthFix"></image>
<view>苏康码</view>
</view> -->
<view class="pb-item" data-event="comfort_click" data-title="景区舒适度" bindtap="gotoPath"
data-path="/pages/pbService/sceneComfort/index">
<view class="pb-item" data-event="comfort_click" data-title="高峰预警" bindtap="gotoUrl"
data-url="https://wlsjzx.zdhxwl.cn/kt_h5/index.html#/morecopy">
<image src="https://static.ticket.sz-trip.com/xcxImages/pbservice/pb4.png" mode="widthFix"></image>
<view>高峰预警</view>
</view>

12
project.private.config.json

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

4
subPackages/index/index.wxml

@ -393,8 +393,8 @@
<view style="overflow-x:auto;background: #FFFED6;border-radius: 20rpx;background:url('https://static.ticket.sz-trip.com/uploads/20240617/e1c3f60baf65787d593c6a7c79f881c7.png');background-size: 100% 100%;height: 199.33rpx;">
<!-- 元旦修改 ggfw为新增类名 -->
<view class="pbservice ggfw-list" style="width:100%;margin-top: 43rpx;">
<!-- <view bindtap="gotoPath" data-event="comfort_click" data-title="景区舒适度"
data-path="/pages/pbService/sceneComfort/index" class="pbservice-item">
<!-- <view bindtap="gotoUrl" data-event="comfort_click" data-title="景区舒适度"
data-url="data-url="https://wlsjzx.zdhxwl.cn/kt_h5/index.html#/morecopy"" class="pbservice-item">
<image src="https://static.ticket.sz-trip.com/xcxImages/pbservice/pb4.png" mode="widthFix"></image>
<view>景区舒适度</view>
</view> -->

2
subPackages/indexs/index.wxml

@ -73,7 +73,7 @@
<view class="main-box" wx:if="{{!isTest}}">
<!-- 上面的高峰预警、实时路况 -->
<view class="main-box-top">
<image bindtap="gotoUrl" data-event="comfort_click" data-title="景区舒适度"
<image bindtap="gotoUrl" data-event="comfort_click" data-title="高峰预警"
data-url="https://wlsjzx.zdhxwl.cn/kt_h5/index.html#/morecopy" class="gfyj" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/holiday/gfyj.png" mode=""/>
<image bindtap="gotoUrl" data-url="https://jiaotonghao2.amap.com/?channel=amap&unitId=257&src=app_share#/" class="sslk" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/holiday/sslk.png" mode=""/>
</view>

Loading…
Cancel
Save