Browse Source

优化

master
jiazhipeng 11 months ago
parent
commit
cab195341a
  1. 40
      pages/index/index.js
  2. 2
      pages/index/index.wxml
  3. 2
      pages/order/pay/index.js
  4. 36
      pages/pbService/web/index.js
  5. 10
      pages/user/order/movieOrderInfo/index.js
  6. 6
      pages/user/order/movieOrderInfo/index.wxml
  7. 13
      project.private.config.json
  8. 869
      subPackages/index/index.js
  9. 432
      subPackages/index/index.wxml
  10. 123
      subPackages/index/index.wxss
  11. 8
      utils/https.js

40
pages/index/index.js

@ -6,6 +6,7 @@ import userApi from "../../utils/https/user"
import util from "../../utils/util" import util from "../../utils/util"
Page({ Page({
data: { data: {
fullAdvTimer: null, // 全屏timer
banner: [], banner: [],
xiaobanner: [], xiaobanner: [],
height: 0, height: 0,
@ -122,6 +123,7 @@ Page({
}, },
onLoad: function(options) { onLoad: function(options) {
//全屏广告 //全屏广告
let _this = this
commonApi._post("adv/getAdv", { commonApi._post("adv/getAdv", {
position: 2, position: 2,
type_id: 3 type_id: 3
@ -148,26 +150,21 @@ Page({
this.setData({ this.setData({
showTime: true showTime: true
}) })
var timer = setInterval(() => { this.data.fullAdvTimer = setInterval(() => {
this.setData({ _this.data.time-=0.5
time: this.data.time - 1 if (Number.isInteger(_this.data.time)) {
}) _this.setData({time: _this.data.time})
if (this.data.time === 0) {
var opacityTimer = setInterval(() => {
this.setData({
opacity: this.data.opacity - 0.3
})
}, 100)
} }
if (this.data.time == -1) { if (_this.data.time <= 0) {
clearInterval(timer) // 可以css 优化
clearInterval(opacityTimer) _this.setData({opacity: 0})
}
if (_this.data.time <= -1) {
clearInterval(_this.data.fullAdvTimer)
wx.showTabBar() //倒计时结束清除定时器显示导航栏 wx.showTabBar() //倒计时结束清除定时器显示导航栏
this.setData({ _this.setData({showFullAdv: false})
showFullAdv: false
})
} }
}, 1000) }, 500)
} else { } else {
// 视频 // 视频
} }
@ -461,7 +458,8 @@ Page({
closeFullAdv: function() { closeFullAdv: function() {
this.setData({ this.setData({
showFullAdv: false showFullAdv: false
}) })
clearInterval(this.data.fullAdvTimer)
if (!this.data.alertSwipeList.length > 0) { if (!this.data.alertSwipeList.length > 0) {
wx.showTabBar({ wx.showTabBar({
animation: true, animation: true,
@ -759,9 +757,11 @@ Page({
this.setData({ this.setData({
lat: res.latitude, lat: res.latitude,
lon: res.longitude lon: res.longitude
}) })
this.getList() this.getList()
this.getHdrlList() this.getHdrlList()
let tempData = JSON.stringify({lat: res.latitude,lon: res.longitude})
wx.setStorageSync('lonAndLat', tempData)
}, },
fail: (err) => { fail: (err) => {
this.getList() this.getList()

2
pages/index/index.wxml

@ -123,7 +123,7 @@
<image src="https://static.ticket.sz-trip.com/uploads/20250429/77bf17a7cf31614720bd8b1932b32473.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/uploads/20250429/77bf17a7cf31614720bd8b1932b32473.png" mode="widthFix"></image>
<view class="text">一日游</view> <view class="text">一日游</view>
</view> </view>
<view bindtap="gotoUrl" data-url="https://m.cloud.sz-trip.com/LearningTravel" data-event="one_card" data-title="户外游" class="pbservice-item"> <view bindtap="gotoUrl" data-url="https://test.m.cloud.sz-trip.com/movies" data-event="one_card" data-title="户外游" class="pbservice-item">
<image src="https://static.ticket.sz-trip.com/uploads/20250430/4329eb909a6660062235f4a6cc7b2963.png" mode="widthFix"></image> <image src="https://static.ticket.sz-trip.com/uploads/20250430/4329eb909a6660062235f4a6cc7b2963.png" mode="widthFix"></image>
<view class="text">户外游</view> <view class="text">户外游</view>
</view> </view>

2
pages/order/pay/index.js

@ -151,7 +151,7 @@ Page({
info:res.data, info:res.data,
activePay: Object.keys(res.data.coupon_activity).length === 0 ?false:true, activePay: Object.keys(res.data.coupon_activity).length === 0 ?false:true,
SUBWALLET:res.data.coupon_activity.pay_type.includes('SUBWALLET') || !res.data.coupon_activity.pay_type, SUBWALLET:res.data.coupon_activity.pay_type.includes('SUBWALLET') || !res.data.coupon_activity.pay_type,
wxPay:res.data.coupon_activity.pay_type.includes('WEIXIN') || !res.data.coupon_activity.pay_type, wxPay:res.data.coupon_activity.pay_type.includes('ICBC_WECHAT') || !res.data.coupon_activity.pay_type,
payIndex:Object.keys(res.data.coupon_activity).length === 0 ?-1:0, payIndex:Object.keys(res.data.coupon_activity).length === 0 ?-1:0,
}) })
console.log(this.data.wxPay); console.log(this.data.wxPay);

36
pages/pbService/web/index.js

@ -85,11 +85,43 @@ Page({
} else { } else {
weburl += '?token='+token weburl += '?token='+token
} }
} }
let _this = this
try {
let lonAndLat = (wx.getStorageSync('lonAndLat'))
if (lonAndLat && JSON.parse(lonAndLat)) {
lonAndLat = JSON.parse(lonAndLat)
if (Object.keys(webParam).length>0 || token) {
weburl+=`&lon=${lonAndLat.lon}&lat=${lonAndLat.lat}`
} else {
weburl+=`?lon=${lonAndLat.lon}&lat=${lonAndLat.lat}`
}
this.setUrl(weburl)
return
} else {
wx.getLocation({
type: 'gcj02',
success: (res) => {
let lonAndLat = JSON.stringify({lat: res.latitude,lon: res.longitude})
wx.setStorageSync('lonAndLat', lonAndLat)
if (Object.keys(webParam).length>0 || token) {
weburl+=`&lon=${lonAndLat.lon}&lat=${lonAndLat.lat}`
} else {
weburl+=`?lon=${lonAndLat.lon}&lat=${lonAndLat.lat}`
}
_this.setUrl(weburl)
},
fail: (err) => {
_this.setUrl(weburl)
}
})
}
} catch(e) {
this.setUrl(weburl)
}
// this.setData({ // this.setData({
// webUrl:weburl // webUrl:weburl
// }) // })
this.setUrl(weburl)
} else { } else {
// this.setData({ // this.setData({
// webUrl:weburl // webUrl:weburl

10
pages/user/order/movieOrderInfo/index.js

@ -34,6 +34,16 @@ Page({
}) })
}, },
gotoLocation:function(){
let info = this.data.info;
if(info && info.lat && info.lon){
wx.openLocation({
latitude: Number(info.lat),
longitude: Number(info.lon)
})
}
},
getCodeImg:function(){ getCodeImg:function(){
let that = this,sys =wx.getSystemInfoSync(),radio = sys.screenWidth / 750,qrcode=this.data.info.order_product_list[0].qrcode,codeImgs=[]; let that = this,sys =wx.getSystemInfoSync(),radio = sys.screenWidth / 750,qrcode=this.data.info.order_product_list[0].qrcode,codeImgs=[];
qrcode.map((item,index)=>{ qrcode.map((item,index)=>{

6
pages/user/order/movieOrderInfo/index.wxml

@ -110,6 +110,8 @@
</view> </view>
<view class="detail-item" style="height:auto"> <view class="detail-item" style="height:auto">
<text>商家地址:{{info.order_product_list[0].scene_detail.address}}</text> <text>商家地址:{{info.order_product_list[0].scene_detail.address}}</text>
<!-- <view class="iconfont icon-daohang" style="color: red;" bindtap="gotoLocation"></view> -->
</view> </view>
</view> </view>
<view class="box" wx:if="{{info}}"> <view class="box" wx:if="{{info}}">
@ -123,8 +125,8 @@
<view class="detail-item" wx:if="{{info.pay_at}}"> <view class="detail-item" wx:if="{{info.pay_at}}">
<text>支付时间:{{info.pay_at}}</text> <text>支付时间:{{info.pay_at}}</text>
</view> </view>
<view class="detail-item" wx:if="{{info.pay_method}}"> <view class="detail-item" wx:if="{{info.pay_method_text}}">
<text>支付方式:{{pay_methods[info.pay_method]}}</text> <text>支付方式:{{info.pay_method_text}}</text>
</view> </view>
<!-- <view class="detail-item"> <!-- <view class="detail-item">
<text>付款时间:{{info.create_time}}</text> <text>付款时间:{{info.create_time}}</text>

13
project.private.config.json

@ -6,6 +6,13 @@
"condition": { "condition": {
"miniprogram": { "miniprogram": {
"list": [ "list": [
{
"name": "pages/order/joinOrder/index",
"pathName": "pages/order/pay/index",
"query": "id=28182505231709189176&token=0b62878b-b30c-41d8-a91f-119f8365d86e",
"launchMode": "default",
"scene": null
},
{ {
"name": "pages/user/order/movieOrderInfo/index", "name": "pages/user/order/movieOrderInfo/index",
"pathName": "pages/activity/year2020/index", "pathName": "pages/activity/year2020/index",
@ -108,12 +115,6 @@
"query": "", "query": "",
"scene": null "scene": null
}, },
{
"name": "pages/order/joinOrder/index",
"pathName": "pages/order/joinOrder/index",
"query": "oid=59532109231539023692&id=336&uid=24",
"scene": null
},
{ {
"name": "", "name": "",
"pathName": "pages/order/payresult/index", "pathName": "pages/order/payresult/index",

869
subPackages/index/index.js

File diff suppressed because it is too large

432
subPackages/index/index.wxml

@ -1,146 +1,60 @@
<!--index.wxml--> <!--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> -->
<!-- 后台获取的季节动图 -->
<view wx:if="{{!isTest}}"> <view wx:if="{{!isTest}}">
<image class="top-bg-img" src="{{indexSeason.topBac}}" mode="widthFix"></image>
<view wx:if="{{weather}}" class="top-box" style="height: 63rpx">
<image src="{{weather.icon2}}" style="margin-left:0" mode="aspectFill"></image>
<view class="weather-num">{{weather.max_temp}}°</view>
<view class="weather">{{weather.weather}}</view>
<image bindtap="gotoPath" style="margin-left:0" data-path="/pages/user/service/index" data-event="customer_service_click" src="https://static.ticket.sz-trip.com/uploads/20240428/7c77f3fc227acb3f15963c54fbd3d954.png" mode="aspectFill"></image>
<image bindtap="gotoPath" data-event="message_click" data-path="/pages/list/message/index" src="https://static.ticket.sz-trip.com/uploads/20240428/ae4b559db397a7b7d76b471576bfa3c0.png" mode="aspectFill"></image>
<!-- <image bindtap="gotoPath" style="margin-left:0" data-path="/pages/user/service/index"
data-event="customer_service_click" src="https://static.ticket.sz-trip.com/xcxImages/spring22/service.png"
mode="aspectFill"></image>
<image bindtap="gotoPath" data-event="message_click" data-path="/pages/list/message/index"
src="https://static.ticket.sz-trip.com/xcxImages/spring22/msg.png" mode="aspectFill"></image> -->
</view>
<view class="top-box" style="padding:0;margin-bottom:18rpx" wx:if="{{!isTest}}">
<navigator url="/pages/search/index" catchtap="pagePoint" data-event="search_click" class="search-box textOver">
<!-- <view class="iconfont icon-sousuo"></view> -->
<image src="https://static.ticket.sz-trip.com/uploads/20250312/656b4dde65f4237b2d7fe0ef65baa850.png" class="iconfont" style="width: 26rpx;height: 26rpx;"></image>
<view class="textOver" >搜索想要的旅游产品或服务</view>
</navigator>
</view>
<view style="position:relative;z-index: 1;"> <view style="position:relative;z-index: 1;">
<swiper class="swiper" autoplay="{{true}}" interval="{{bannerInterver}}" duration="{{300}}" bindchange="changeBannerIndex" circular> <swiper class="swiper" autoplay="{{true}}" interval="{{5000}}" duration="{{300}}"
<block wx:for="{{banner}}" wx:key="index"> bindchange="changeBannerIndex" data-keyname="activeBannerIndex" circular>
<swiper-item bindtap="bannerClick" data-item="{{item}}"> <block wx:for="{{banner}}" wx:key="index">
<image src="{{item.head_img}}" mode="scaleToFill"></image> <swiper-item bindtap="bannerClick" data-item="{{item}}">
</swiper-item> <image src="{{item.head_img}}" mode="scaleToFill"></image>
</block> </swiper-item>
</swiper> </block>
<view class="com-flex dot-list"> </swiper>
<view class="dot{{index===activeBannerIndex?' active':''}}" wx:for="{{banner}}" wx:key="index"></view> <!-- <view class="com-flex dot-list">
</view> <view class="dot{{index===activeBannerIndex?' active':''}}" wx:for="{{banner}}" wx:key="index"></view>
</view> </view> -->
<view class="top-box" style="top: {{systemStyle.padHeight}}px;right:{{systemStyle.right+20}}px">
<view class="top-icons" wx:if="{{!isTest}}"> <navigator url="/pages/search/index" catchtap="pagePoint" data-event="search_click" class="search-box textOver">
<view bindtap="gotoPath" data-event="activity_click" data-title="活动日历" data-path="/pages/list/activitynew/index" class="top-icon-item"> <image src="https://static.ticket.sz-trip.com/uploads/20250312/656b4dde65f4237b2d7fe0ef65baa850.png" class="iconfont" style="width: 26rpx;height: 26rpx;"></image>
<image src="{{imageSourceList.mainFunImgs[0]}}" mode="widthFix"></image> <view class="textOver" >搜索想要的旅游产品或服务</view>
<view class="top-icon-text">活动日历</view> </navigator>
</view>
<view bindtap="gotoPath" data-event="museum" data-title="场馆预约" data-path="/pages/list/{{isTest?'scene':'museum'}}/index" class="top-icon-item">
<image src="{{imageSourceList.mainFunImgs[1]}}" mode="widthFix"></image>
<view class="top-icon-text">场馆预约</view>
</view>
<view bindtap="gotoPath" data-event="legacy" data-title="非遗专卖" data-path="/subPackages/feiyiNew/index" class="top-icon-item">
<image src="{{imageSourceList.mainFunImgs[2]}}" mode="widthFix"></image>
<view class="top-icon-text">非遗专卖</view>
</view> </view>
<view bindtap="gotoPath" data-event="show" data-title="剧场演出" data-path="/pages/list/{{isTest?'activity':'theatre'}}/index" class="top-icon-item"> <view class="banner-main">
<image src="{{imageSourceList.mainFunImgs[3]}}" mode="widthFix"></image> <view catchtap="mainIconClick" class="banner-main-item" wx:for="{{bannerDataList}}" wx:key="index" data-item="{{item}}">
<view class="top-icon-text">剧场演出</view> <image src="{{item.img}}" ></image>
</view> </view>
<view bindtap="gotoPath" data-event="specialty" data-title="文创特产" data-path="/subPackages/techanNew/index" class="top-icon-item">
<image src="{{imageSourceList.mainFunImgs[4]}}" mode="widthFix"></image>
<view class="top-icon-text">文创特产</view>
</view>
<view bindtap="gotoPath" data-event="ticket_click" data-title="景点门票" data-path="/pages/list/scene/index" class="top-icon-item">
<image src="{{imageSourceList.mainFunImgs[5]}}" mode="widthFix"></image>
<view class="top-icon-text">景点门票</view>
</view>
<view bindtap="gotoPath" data-event="hotel_click" data-title="酒店住宿" data-path="{{hotelUrl}}" class="top-icon-item">
<image src="{{imageSourceList.mainFunImgs[6]}}" mode="widthFix"></image>
<view class="top-icon-text">酒店住宿</view>
</view>
<!-- 临时跳转专题页 -->
<!-- <view bindtap="gotoUrl" data-event="hotel_click" data-title="酒店住宿" data-url="https://m.cloud.sz-trip.com/carPurchase" class="top-icon-item">
<image src="{{imageSourceList.mainFunImgs[6]}}" mode="widthFix"></image>
<view class="top-icon-text">酒店住宿</view>
</view> -->
<view bindtap="gotoPath" data-event="night_sz" data-title="夜游苏州" data-path="/pages/list/night/index" class="top-icon-item">
<image src="{{imageSourceList.mainFunImgs[7]}}" mode="widthFix"></image>
<view class="top-icon-text">水上游</view>
</view>
<view bindtap="gotoUrl" data-event="card" data-title="一卡游苏州" data-url="https://m.cloud.sz-trip.com/OneDayTravelNew" class="top-icon-item">
<image src="{{imageSourceList.mainFunImgs[8]}}" mode="widthFix"></image>
<view class="top-icon-text">一日游</view>
</view>
<view bindtap="gotoUrl" data-event="movie" data-title="户外游" data-url="https://m.cloud.sz-trip.com/LearningTravel" class="top-icon-item">
<image src="{{imageSourceList.mainFunImgs[9]}}" mode="widthFix"></image>
<view class="top-icon-text">户外游</view>
</view> </view>
</view> </view>
<view class="content">
<view class="sale-road-boxes" wx:if="{{false}}">
<view class="sale-box" bindtap="gotoPath" data-event="discount_click" data-title="特惠新品" data-path="/pages/list/{{isTest==false?'sale':'scene'}}/index">
<view class="sale-title"><text>特惠新品</text>超值商品限时抢购</view> <view class="main-content">
<view class="sale-product"> <!-- 金刚区 -->
<view class="sale-product-bg"></view> <view>
<image mode="aspectFill" class="sale-img" src="https://static.ticket.sz-trip.com/uploads/20211022/0c90b027b5572b559b34c219eaf257ba.jpg"></image> <scroll-view scroll-x style="height:200rpx" bindscroll="listenScroll" data-keyname="mainTypeLeft">
<image class="sale-tip-img" src="https://static.ticket.sz-trip.com/xcxImages/spring22/sale.png" mode="aspectFill"> <view class="top-icons no-scrollbar">
</image> <view bindtap="mainIconClick" class="top-icon-item" wx:for="{{mainTypeList}}" wx:key="index" data-item="{{item}}">
<view class="sale-info"> <image src="{{imageSourceList.mainFunImgs[3]}}" mode="widthFix"></image>
<view class="sale-product-title textOver2"> <view class="top-icon-text">{{item.title}}</view>
<view>限时特惠</view> </view>
<view>新品推荐</view>
</view>
<view class="sale-price" style="color:#F44747" wx:if="{{saleProduct}}">
¥{{saleProduct.price?saleProduct.price/100:0}}起</view>
</view>
</view>
</view>
<view class="sale-box" bindtap="gotoPath" data-event="route_click" data-title="精品线路" data-path="/pages/list/road/index">
<view class="sale-title"><text>精品线路</text>带你轻松玩转苏州</view>
<view class="sale-product">
<view class="sale-product-bg road-product-bg"></view>
<common-image class="sale-img" width="173rpx" height="165rpx" src="https://static.ticket.sz-trip.com/uploads/20211022/f8d9b54fa477b9ad8bf14e119664455e.jpg" mode="aspectFill"></common-image>
<image class="sale-tip-img" src="https://static.ticket.sz-trip.com/xcxImages/spring22/road.png" mode="aspectFill">
</image>
<view class="sale-info">
<view class="sale-product-title textOver2">
<view>四季苏州</view>
<view>最是江南</view>
</view>
<view class="sale-price" style="color:rgb(0, 153, 137)" wx:if="{{roadProduct}}">
¥{{roadProduct.price?roadProduct.price/100:0}}起</view>
</view> </view>
</view> </scroll-view>
</view> <view class="scroll-line">
</view> <view class="scroll-line-bg" wx:if="{{scrollLeft <= 5}}" style="width:37rpx;"></view>
<!-- ai避高峰 --> <view class="scroll-line-bg2" wx:else style="width:37rpx;"></view>
<view style="display: flex;margin-top: 30rpx;justify-content: space-between;">
<view bindtap="gotoUrl" data-event="comfort_click" data-title="景区舒适度" data-url="https://m.cloud.sz-trip.com/aiPlay" class="jqssd">
<!-- <view bindtap="gotoUrl" data-event="comfort_click" data-title="景区舒适度" data-url="https://wlsjzx.zdhxwl.cn/kt_h5/index.html#/morecopy" class="jqssd"> -->
<image src="{{indexSeason.ai}}" mode=""/>
</view>
<view bindtap="gotoUrls" data-event="xlqc" class="sslk">
<image src="{{indexSeason.avoid}}" mode=""/>
</view> </view>
</view> </view>
</view>
<view class="content">
<!-- 小banner 五一修改 一张banner不滚动 --> <view class="small-swiper-box" >
<view class="small-swiper-box" wx:if="{{xiaobanner.length === 1}}"> <swiper class="small-swiper" autoplay="{{true}}" interval="{{5000}}" duration="{{300}}"
<image bindtap="bannerClick" data-item="{{xiaobanner[0]}}" style="border-radius:13rpx;width: 100%;height: 100%;" src="{{xiaobanner[0].head_img}}" mode="aspectFill"></image> bindchange="changeBannerIndex" data-keyname="smBannerIndex">
</view>
<view class="small-swiper-box" wx:else>
<swiper class="small-swiper" autoplay="{{true}}" interval="{{5000}}" duration="{{300}}" bindchange="changeSmBannerIndex">
<block wx:for="{{xiaobanner}}" wx:key="index"> <block wx:for="{{xiaobanner}}" wx:key="index">
<swiper-item bindtap="bannerClick" data-item="{{item}}"> <swiper-item bindtap="bannerClick" data-item="{{item}}">
<!-- 原 圆角77rpx,现改为13rpx --> <!-- 原 圆角77rpx,现改为13rpx -->
@ -148,92 +62,94 @@
</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="index"></view> <view class="dot{{smBannerIndex==index?' active':''}}" wx:for="{{xiaobanner}}" wx:key="index"></view>
</view> </view> -->
</view> </view>
<!-- 限时特惠--新版--> <!-- 限时特惠--新版-->
<view class="sale-road-boxes xpth" style="margin-bottom: 18.67rpx;margin-top: 0;padding-top: 0;" wx:if="{{false}}"> <view class="sale-road-boxes xpth" style="margin-bottom: 18.67rpx;margin-top: 0;padding-top: 0;" >
<!-- 上方标题部分 --> <!-- 上方标题部分 -->
<view class="xsth-title"> <view class="xsth-title">
<view class="xsth-left" style="display: flex;"> <view class="xsth-left" style="display: flex;">
<image mode="heightFix" style="height:100rpx" src="{{indexSeason.xpth}}"></image> <image mode="heightFix" style="height:100rpx" src="{{indexSeason.xpth}}"></image>
</view> </view>
<view class="time-box" style="z-index: 2;flex-shrink: 0;">
倒计时
<view class="xsth-time" style="margin-left: 20rpx;">{{djs.h}}</view>
<text>:</text>
<view class="xsth-time">{{djs.m}}</view>
<text>:</text>
<view class="xsth-time">{{djs.s}}</view>
</view>
</view> </view>
<!-- 商品部分 --> <!-- 商品部分 -->
<view class="xpth-product"> <view class="xpth-product">
<!-- 左边的2个产品 --> <!-- 左边的2个产品 -->
<view class="xpth-left"> <view class="xpth-left">
<view class="xpth-item" wx:for="{{xpth.list}}" bindtap="productGotoDetail" data-item="{{item}}" wx:key="id"> <view class="xpth-item" wx:for="{{xpth.list}}" bindtap="productGotoDetail" data-item="{{item}}" wx:key="id">
<image src="{{item.headimg}}" mode="" /> <image src="{{item.headimg}}" mode="" />
<view class="xpth-item-content"> <view class="xpth-item-content">
<view class="xpth-item-title textOver2">{{item.title}}</view> <view class="xpth-item-title textOver2">{{item.title}}</view>
<!-- <view class="xpth-tag">唇齿留香</view> --> <view class="xpth-item-bottom">
<view class="xpth-item-bottom"> <view class="xpth-item-price">{{item.price/100}}</view>
<view class="xpth-item-price">{{item.price/100}}</view> </view>
<!-- <view class="xpth-item-buy">立即抢购</view> --> </view>
</view> </view>
</view> </view>
<!-- 右边的banner -->
<view class="xpth-banner" wx:if="{{xpth&&xpth.adv&&xpth.adv.length>0}}">
<swiper class="xpth-banner-swiper" autoplay="{{true}}" interval="{{5000}}" duration="{{300}}"
bindchange="changeBannerIndex" data-keyname="XPathBannerIndex">
<block wx:for="{{xpth.adv}}" wx:key="index">
<swiper-item bindtap="bannerClick" data-item="{{item}}">
<image style="border-radius:13rpx" src="{{item.head_img}}"></image>
</swiper-item>
</block>
</swiper>
<view class="xpth-banner-dot-list">
<view class="dot{{XPathBannerIndex==index?' active':''}}" wx:for="{{xpth.adv}}" wx:key="index"></view>
</view>
</view> </view>
</view> </view>
<!-- 右边的banner -->
<view class="xpth-banner" wx:if="{{xpth&&xpth.adv&&xpth.adv.length>0}}">
<swiper class="xpth-banner-swiper" autoplay="{{true}}" interval="{{5000}}" duration="{{300}}" bindchange="changeXPathBannerIndex">
<block wx:for="{{xpth.adv}}" wx:key="index">
<swiper-item bindtap="bannerClick" data-item="{{item}}">
<image style="border-radius:13rpx" src="{{item.head_img}}"></image>
</swiper-item>
</block>
</swiper>
<view class="xpth-banner-dot-list">
<view class="dot{{XPathBannerIndex==index?' active':''}}" wx:for="{{xpth.adv}}" wx:key="index"></view>
</view>
</view>
<!-- <image bindtap="goBanner" class="xpth-banner" data-url="{{xpth.adv.tdata}}" src="{{xpth.adv.head_img}}" mode="aspectFill" /> -->
</view>
</view> </view>
<!-- 热门推荐--> <!-- 公共服务 -->
<view class="sale-road-boxes xpth" style="margin-bottom: 18.67rpx;margin-top: 0;padding-top: 0;" wx:if="{{!isTest}}"> <view class="sale-road-boxes" style="margin-top:0;">
<!-- 上方标题部分 --> <image mode="heightFix" style="height:100rpx" src="{{indexSeason.ggfw}}"></image>
<view class="xsth-title"> <navigator url="/pages/pbService/index" catchtap="pagePoint" data-event="public_view" class="title-more">
<view class="xsth-left" style="display: flex;"> <view style="height: 40rpx;line-height: 40rpx;">更多</view>
<image mode="heightFix" style="height:100rpx" src="{{indexSeason.xpth}}"></image> <image style="width: 20rpx;height: 20rpx;margin-left: 8rpx;" src="https://static.ticket.sz-trip.com/uploads/20241225/a59cd4103d0ba9a9de7498304bf24544.png" mode="" />
</view> </navigator>
<view class="time-box" style="z-index: 2;flex-shrink: 0;"></view> </view>
<view>
</view> <!-- 元旦修改 ggfw为新增类名 -->
<!-- 商品部分 --> <view class="ggfw-list" style="width:100%;margin-top: 43rpx;">
<view class="xpth-product" wx:if="{{xpth&&xpth.adv&&xpth.adv.length>0}}"> <view class="ggfw" wx:for="{{publicSerivce}}" wx:key="index" data-item="{{item}}" bindtap="mainIconClick">
<!-- 左边的2个产品 --> <image src="{{imageSourceList.GGFW[2]}}"></image>
<view class="xpth-left" >
<view class="xpth-item" bindtap="bannerClick" data-item="{{xpth.adv[0]}}" style="background: none;">
<image src="{{xpth.adv[0].head_img}}" mode="" style="width: 100%;border-radius: 0;object-fit: unset;"/>
</view>
<view class="xpth-item" bindtap="bannerClick" data-item="{{xpth.adv[1]}}" style="background: none;">
<image src="{{xpth.adv[1].head_img}}" mode="" style="width: 100%;border-radius: 0;object-fit: unset"/>
</view> </view>
</view> </view>
<!-- 右边的banner --> </view>
<view class="xpth-banner" style="background: none;" >
<view class="xpth-banner-swiper" bindtap="bannerClick" data-item="{{xpth.adv[2]}}" style="border-radius: 0"> <!-- 旅游助手 -->
<image src="{{xpth.adv[2].head_img}}" style="border-radius: 0;object-fit: unset"></image> <view class="sale-road-boxes" style="margin-top:0">
</view> <image mode="heightFix" style="height:100rpx" src="{{indexSeason.lyzs}}"></image>
<image class="rmtj-right" src="{{imageSourceList.CBTP[1]}}" mode="" style="width: 276rpx;height: 100rpx;"/>
</view>
<view class="pic-list" style="margin-top:20rpx" wx:if="{{!isTest}}">
<!-- <image class="new-pic" bindtap="gotoUrl" data-event="dou_click" data-title="抖in苏州" data-url="https://m.cloud.sz-trip.com/ShakeInDetailList?id=350&class_id=27&index=1"
src="{{imageSourceList.LVZS[0]}}" mode="aspectFill"></image> -->
<image class="new-pic" bindtap="gotoPath" data-path="/subPackageCheckPoint/pages/index/index"
src="{{imageSourceList.LVZS[0]}}" mode="aspectFill"></image>
<image class="new-pic" bindtap="gotoPath" data-event="food_click" data-title="街巷美食" data-path="/pages/list/{{isTest?'road':'food'}}/index"
src="{{imageSourceList.LVZS[1]}}" mode="aspectFill"></image>
<image class="new-pic" bindtap="audioGuide" data-event="voice_click"
src="{{imageSourceList.LVZS[2]}}" mode="aspectFill"></image>
<image class="new-pic" bindtap="gotoPath" data-event="guide_click" data-title="游记攻略" data-path="/pages/list/strategy/index"
src="{{imageSourceList.LVZS[3]}}" mode="aspectFill"></image>
</view>
<!-- ai避高峰 -->
<!-- <view style="display: flex;margin-top: 30rpx;justify-content: space-between;">
<view bindtap="gotoUrl" data-event="comfort_click" data-title="景区舒适度" data-url="https://m.cloud.sz-trip.com/aiPlay" class="jqssd">
<image src="{{indexSeason.ai}}" mode=""/>
</view> </view>
<!-- <image bindtap="goBanner" class="xpth-banner" data-url="{{xpth.adv.tdata}}" src="{{xpth.adv.head_img}}" mode="aspectFill" /> --> <view bindtap="gotoUrls" data-event="xlqc" class="sslk">
<image src="{{indexSeason.avoid}}" mode=""/>
</view> </view>
</view> </view> -->
<!-- 数字文旅--> <!-- 数字文旅-->
@ -307,63 +223,6 @@
</view> </view>
</view> </view>
<!-- 旅游助手 -->
<view class="sale-road-boxes" style="margin-top:0">
<image mode="heightFix" style="height:100rpx" src="{{indexSeason.lyzs}}"></image>
<image class="rmtj-right" src="{{imageSourceList.CBTP[1]}}" mode="" style="width: 276rpx;height: 100rpx;"/>
</view>
<view class="pic-list" style="margin-top:20rpx" wx:if="{{!isTest}}">
<!-- <image class="new-pic" bindtap="gotoUrl" data-event="dou_click" data-title="抖in苏州" data-url="https://m.cloud.sz-trip.com/ShakeInDetailList?id=350&class_id=27&index=1"
src="{{imageSourceList.LVZS[0]}}" mode="aspectFill"></image> -->
<image class="new-pic" bindtap="gotoPath" data-path="/subPackageCheckPoint/pages/index/index"
src="{{imageSourceList.LVZS[0]}}" mode="aspectFill"></image>
<image class="new-pic" bindtap="gotoPath" data-event="food_click" data-title="街巷美食" data-path="/pages/list/{{isTest?'road':'food'}}/index"
src="{{imageSourceList.LVZS[1]}}" mode="aspectFill"></image>
<image class="new-pic" bindtap="audioGuide" data-event="voice_click"
src="{{imageSourceList.LVZS[2]}}" mode="aspectFill"></image>
<image class="new-pic" bindtap="gotoPath" data-event="guide_click" data-title="游记攻略" data-path="/pages/list/strategy/index"
src="{{imageSourceList.LVZS[3]}}" mode="aspectFill"></image>
</view>
<!-- 公共服务 -->
<view class="sale-road-boxes" style="margin-top:0;">
<image mode="heightFix" style="height:100rpx" src="{{indexSeason.ggfw}}"></image>
<navigator url="/pages/pbService/index" catchtap="pagePoint" data-event="public_view" class="title-more">
<view style="height: 40rpx;line-height: 40rpx;">更多</view>
<image style="width: 20rpx;height: 20rpx;margin-left: 8rpx;" src="https://static.ticket.sz-trip.com/uploads/20241225/a59cd4103d0ba9a9de7498304bf24544.png" mode="" />
</navigator>
</view>
<view style="overflow-x:auto">
<!-- 元旦修改 ggfw为新增类名 -->
<view class="pbservice ggfw-list" style="width:100%;margin-top: 43rpx;">
<view bindtap="gotoUrl" data-event="comfort_click" data-title="高峰预警"
data-url="https://wlsjzx.zdhxwl.cn/kt_h5/index.html#/morecopy" class="pbservice-item ggfw" >
<image src="{{imageSourceList.GGFW[0]}}" mode="widthFix"></image>
<view>高峰预警</view>
</view>
<view bindtap="gotoUrl" data-event="xlqc"
data-url="https://jiaotonghao2.amap.com/?channel=amap&unitId=257&src=app_share#/" class="pbservice-item ggfw">
<image src="{{imageSourceList.GGFW[1]}}" mode="widthFix"></image>
<view>实时路况</view>
</view>
<view bindtap="xlzs" class="pbservice-item ggfw" >
<image src="{{imageSourceList.GGFW[2]}}" mode="widthFix"></image>
<view>行李直送</view>
</view>
<view bindtap="gotoUrl" data-event="xlqc"
data-url="https://weixin.2500sz.net/zt/2023/07/luggage_storage/" class="pbservice-item ggfw" >
<image src="{{imageSourceList.GGFW[3]}}" mode="widthFix"></image>
<view>行李寄存</view>
</view>
<view class="pbservice-item ggfw" data-event="toilet_public_click" data-title="找厕所" bindtap="gotoPath"
data-path="/pages/pbService/bike/index?type=1">
<image src="{{imageSourceList.GGFW[4]}}" mode="widthFix"></image>
<view>找厕所</view>
</view>
</view>
</view>
<!-- 十全十美 --> <!-- 十全十美 -->
<view class="sale-road-boxes"> <view class="sale-road-boxes">
<image mode="heightFix" style="height:100rpx" src="{{indexSeason.sqj}}"></image> <image mode="heightFix" style="height:100rpx" src="{{indexSeason.sqj}}"></image>
@ -447,56 +306,7 @@
<view wx:else class="more-btn-text" bindtap="getList">暂无更多推荐</view> <view wx:else class="more-btn-text" bindtap="getList">暂无更多推荐</view>
</view> </view>
<view class="mask prizeMask" wx:if="{{videoPrize}}">
<view class="mask-bg"></view>
<view class="mask-content" style="width:100%;display:flex;flex-direction:column;background:none;border-radius:0;align-items:center">
<!-- 中奖的卡券 -->
<view style="position:relative" wx:if="{{prizeInfo && prizeInfo.type=='coupon'}}">
<image bindtap="choosePrize" style="display:block;width:533rpx" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/videoprize/bg1.png" mode="widthFix"></image>
<image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/videoprize/congratulation.png" mode="widthFix" class="prize-tip-text"></image>
<view class="prize-name">{{prizeInfo.prize_name}}</view>
<view class="prize-img">
<image src="{{prizeInfo.head_img}}" mode="aspectFill"></image>
</view>
<!-- <view class="btn-box">
<image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/videoprize/btnbg.png" mode="widthFix"></image>
<navigator url="/pages/user/videoCoupon/index">前往查看</navigator>
</view> -->
</view>
<!-- 中奖的产品 -->
<view style="position:relative" wx:elif="{{prizeInfo && prizeInfo.type=='product'}}">
<image bindtap="choosePrize" style="display:block;width:533rpx" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/videoprize/bg1.png" mode="widthFix"></image>
<image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/videoprize/congratulation.png" mode="widthFix" class="prize-tip-text"></image>
<view class="prize-name">{{prizeInfo.prize_name}}</view>
<view class="prize-img">
<image src="{{prizeInfo.head_img}}" mode="aspectFill"></image>
</view>
<!-- <view class="btn-box">
<image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/videoprize/btnbg.png" mode="widthFix"></image>
<navigator url="/pages/user/videoCoupon/index">前往查看</navigator>
</view> -->
</view>
<!-- 未中奖 -->
<view style="position:relative" wx:elif="{{prizeInfo && prizeInfo.type=='none'}}">
<image bindtap="choosePrize" style="display:block;width:533rpx" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/videoprize/bg1.png" mode="widthFix"></image>
<image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/videoprize/sorrytext.png" mode="widthFix" class="prize-tip-text"></image>
<view class="prize-name">您与奖品擦肩而过期待下次参与</view>
<view class="prize-img">
<image src="{{prizeInfo.head_img}}" mode="aspectFill"></image>
</view>
<view class="btn-box">
<image src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/videoprize/btnbg.png" mode="widthFix"></image>
<view bindtap="closePrice">我知道了</view>
</view>
</view>
<!-- 未抽奖状态 -->
<view style="position:relative" wx:else>
<image bindtap="choosePrize" style="display:block;width:533rpx" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/videoprize/allbg.png" mode="widthFix"></image>
<view class="nomore-tip-btn" bindtap="noMoreTip"></view>
</view>
<image bindtap="closePrice" style="width:80rpx;margin-top:40rpx" src="https://sz-qd.oss-cn-hangzhou.aliyuncs.com/xcxImages/videoprize/allclose.png" mode="widthFix"></image>
</view>
</view>
<!-- 广告弹窗 --> <!-- 广告弹窗 -->
<view class="zzc" bindtap="closeAdv" wx:if="{{showAdv}}"></view> <view class="zzc" bindtap="closeAdv" wx:if="{{showAdv}}"></view>
<view class="alertavd" wx:if="{{showAdv}}"> <view class="alertavd" wx:if="{{showAdv}}">
@ -528,15 +338,7 @@
<image src="https://static.ticket.sz-trip.com/jundaosuzhou/images/startPage/pause.png" class="playImg" mode="widthFix" wx:else bindtap="videoPause"></image> <image src="https://static.ticket.sz-trip.com/jundaosuzhou/images/startPage/pause.png" class="playImg" mode="widthFix" wx:else bindtap="videoPause"></image>
</view> </view>
</view> </view>
<!-- <view class="topBox">
<view class="Qtop" :style="{height:height}">
<image style="width: 100%;height:{{height}}" src="{{startList.head_img}}" mode=""/>
</view>
<view class="jumpBox">
<view class="time">{{time}}s</view>
<view bind:tap="gotoIndex">跳过</view>
</view>
</view> -->
</view> </view>
<view wx:else> <view wx:else>

123
subPackages/index/index.wxss

@ -1,31 +1,22 @@
/**index.wxss**/ /**index.wxss**/
/* 元旦修改 */ /* 元旦修改 */
page { page {
/* background: #9DDCF5; */
padding-bottom: 36.67rpx; padding-bottom: 36.67rpx;
/* background-image: url('https://static.ticket.sz-trip.com/uploads/20241225/79918a9171dcf85365935419e4717519.jpg');
background-repeat: repeat-y;
background-size: 100% 100%; */
background: #F3FBFB;
} }
.swiper,.swiper image { .swiper,.swiper image {
width: 697rpx; width: 100%;
display: block; display: block;
height: 335rpx; height: 600rpx;
border-radius: 27rpx;
}
.swiper {
margin: 0 auto;
} }
.top-box { .top-box {
display: flex; display: flex;
padding: 10rpx 0; padding: 10rpx 0;
align-items: center; align-items: center;
margin: 0 30rpx;
justify-content: flex-start; justify-content: flex-start;
position: relative; position: absolute;
z-index: 1; left: 30rpx;
z-index: 2;
} }
.top-box image { .top-box image {
flex-shrink: 0; flex-shrink: 0;
@ -57,35 +48,35 @@ page {
margin-right: 20rpx; margin-right: 20rpx;
/* color: #72674E; */ /* color: #72674E; */
} }
.top-box .weather-num,.top-box .weather {
flex-shrink: 0; .banner-main{
color: #333; position: absolute;
/* color: #72674E; */ z-index: 3;
width: 100%;
left: 0;
bottom: 20rpx;
right: 0;
display: flex;
justify-content: space-between;
padding: 0 30rpx;
box-sizing: border-box;
} }
.top-box .weather-num { .banner-main image{
font-size: 29rpx; width: 150rpx;
margin-bottom: 10rpx; height: 100rpx;
margin-left: 4rpx;
} }
.top-box .weather {
font-size: 19rpx; .main-content{
margin-top: 20rpx; background: white;
margin-left: -4rpx; margin-top: -10rpx;
margin-right: 30rpx; border-radius: 20rpx;
position: relative;
z-index: 4;
} }
.top-icons { .top-icons {
border-radius: 0 0 27rpx 27rpx;
width: 697rpx;
margin: 0 auto;
position: relative;
z-index: 0;
display: flex; display: flex;
padding: 34rpx 0; padding: 20rpx;
padding-bottom: 29.33rpx;
justify-content: space-between;
flex-wrap: wrap;
margin-top: -50rpx;
padding-top: 84rpx;
} }
.top-icon-item { .top-icon-item {
margin-bottom: 20rpx; margin-bottom: 20rpx;
@ -812,40 +803,8 @@ page {
position: relative; position: relative;
flex-direction: column; flex-direction: column;
} }
/* 元旦修改新增样式 */
.time-box {
font-size: 27rpx;
font-family: DIN;
font-weight: 500;
/* color: #54504D; */
color: #000000;
display: flex;
align-items: center;
height: 37px;
margin-left: -50rpx;
z-index: 9;
flex-wrap: nowrap;
position: relative;
left: -150rpx;
}
/* 元旦修改新增样式 */
.xsth-time {
/* width: 43rpx; */
height: 43rpx;
padding: 0 7rpx;
line-height: 43rpx;
border-radius: 13rpx;
font-size: 27rpx;
font-family: DIN;
font-weight: 500;
color: #D62828;
text-align: center;
}
.time-box text {
width: 18rpx;
text-align: center;
}
/* 元旦修改新增样式 */ /* 元旦修改新增样式 */
.xpth-left { .xpth-left {
width: 393rpx; width: 393rpx;
@ -1030,19 +989,19 @@ page {
} }
.ggfw-list { .ggfw-list {
justify-content: space-around !important; display: flex;
} flex-wrap: wrap;
.ggfw-list .pbservice-item{ justify-content: space-between;
margin-right: 0;
color: #111111;
} }
.ggfw {
width: auto; .ggfw-list .ggfw {
width: 30%;
height: 70rpx;
margin-bottom: 20rpx;
} }
.ggfw image{ .ggfw image{
margin-bottom: 16.67rpx; width: 100%;
width: 93rpx !important; height: 100%;
height: 93rpx !important;
} }
.six-box-new { .six-box-new {

8
utils/https.js

@ -172,7 +172,7 @@ function user_post_new(url, data = {}, type) {
return new Promise((resolved, rejected) => { return new Promise((resolved, rejected) => {
// 判断是否登录 // 判断是否登录
// 没有登录就跳转到登录页面 // 没有登录就跳转到登录页面
if (!token || !userId) { if (!token) {
wx.hideLoading(); wx.hideLoading();
// 去登陆 // 去登陆
console.log("去登陆去登陆去登陆去登陆去登陆去登陆去登陆") console.log("去登陆去登陆去登陆去登陆去登陆去登陆去登陆")
@ -330,10 +330,8 @@ const checkLogin = () => {
appData = getApp() appData = getApp()
} }
console.log(appData,page) console.log(appData,page)
if(appData.globalData.configJson.isTest) { if(appData.globalData.configJson&&appData.globalData.configJson.isTest) {
return
return
} }

Loading…
Cancel
Save