diff --git a/app.js b/app.js index aa78b14..3034935 100644 --- a/app.js +++ b/app.js @@ -21,7 +21,7 @@ App({ unique_key: "wechatxcx" }).then(res => { let data = JSON.parse(res.data); - data.isTest = data.isTest120? true : false; + data.isTest = data.isTest121? true : false; this.globalData.configJson = data }).then(() => { // 获取ui配置文件 diff --git a/app.json b/app.json index e5d7717..fa14c57 100644 --- a/app.json +++ b/app.json @@ -219,26 +219,26 @@ "sitemapLocation": "sitemap.json", "tabBar": { "color": "#999", - "selectedColor": "#3FB87F", + "selectedColor": "#4285F4", "borderStyle": "white", "list": [ { "pagePath": "pages/index/index", "iconPath": "/images/home.png", - "selectedIconPath": "/images/index-selds_1.png", + "selectedIconPath": "/images/index_seld.png", "text": "首页", "shareTimeline": true }, { "pagePath": "pages/map/index", "iconPath": "/images/map.png", - "selectedIconPath": "/images/tuyou-selds_1.png", + "selectedIconPath": "/images/map_seld.png", "text": "图游" }, { "pagePath": "pages/user/user", "iconPath": "/images/user.png", - "selectedIconPath": "/images/my-selds_1.png", + "selectedIconPath": "/images/user_seld.png", "text": "我的" } ] diff --git a/images/index-selds.png b/images/index-selds.png deleted file mode 100644 index 496bc7e..0000000 Binary files a/images/index-selds.png and /dev/null differ diff --git a/images/index_seld.png b/images/index_seld.png new file mode 100644 index 0000000..a2d2381 Binary files /dev/null and b/images/index_seld.png differ diff --git a/images/map_seld.png b/images/map_seld.png new file mode 100644 index 0000000..6c7632c Binary files /dev/null and b/images/map_seld.png differ diff --git a/images/my-selds.png b/images/my-selds.png deleted file mode 100644 index 5b4f4c9..0000000 Binary files a/images/my-selds.png and /dev/null differ diff --git a/images/tuyou-selds.png b/images/tuyou-selds.png deleted file mode 100644 index 4b4bddc..0000000 Binary files a/images/tuyou-selds.png and /dev/null differ diff --git a/images/user_seld.png b/images/user_seld.png new file mode 100644 index 0000000..4a87d31 Binary files /dev/null and b/images/user_seld.png differ diff --git a/pages/index/index.js b/pages/index/index.js index 409e869..31c027a 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -51,11 +51,11 @@ Page({ djsTime: null, sqjNew: [ 'https://static.ticket.sz-trip.com/uploads/20240428/faede304469bb3e7b9bbf7001008d09a.png', - 'https://static.ticket.sz-trip.com/uploads/20240428/77c3bd6c3f44ee0e3cc483557c1c7462.png', + 'https://static.ticket.sz-trip.com/uploads/20240607/3acf736c1dc9c7af08d3363833669896.png', 'https://static.ticket.sz-trip.com/uploads/20240428/ad2324005ba1ed0cabe990ec62bfec76.png', 'https://static.ticket.sz-trip.com/uploads/20240428/a90f3ce4519a585cc5cebfe62d8d4043.png', 'https://static.ticket.sz-trip.com/uploads/20240428/e6fa6cdef2971c8abdb670be1f36d1ca.png', - 'https://static.ticket.sz-trip.com/uploads/20240428/9c8186b8249bf81a2ef4fe4a4194cf2b.png', + 'https://static.ticket.sz-trip.com/uploads/20240607/56ccaab57aaf050bb6feccc3a70983bb.png', 'https://static.ticket.sz-trip.com/uploads/20240428/755ee01ac248aeda8812b025f483a869.png', 'https://static.ticket.sz-trip.com/uploads/20240428/2d29f0d14e634b0a78d4ef91b28d5999.png', 'https://static.ticket.sz-trip.com/uploads/20240428/71f7b558c7ca6d42728d48508d01819c.png', @@ -63,68 +63,7 @@ Page({ ], viewHeight: "0px", isMuted: true, - videoPlay: false, - hdrlNavList:[ - { - type:null, - title:'全部' - }, - { - type:'scene', - title:'景区活动' - }, - { - type:'show', - title:'演出' - }, - { - type:'exhibition', - title:'展览' - }, - { - type:'movie', - title:'电影' - }, - { - type:'other', - title:'其他' - } - ], //活动日历板块导航分类 - hdrlNavIndex:0,//活动日历默认选中第一个全部分类 - today:null, - hdrlList:[], - yszNav:['公共服务','旅游助手'], - yszIndex:0, - bdList:[ - { - bg: 'linear-gradient(-8deg, #B9E1F0, #F4F9FF)', - icon:'https://static.ticket.sz-trip.com/jundaosuzhou/images/holiday/feiwan.png', //非玩不可 - path:'/pages/list/scene/index', - url:'', - }, - { - bg: 'linear-gradient(-8deg, #F3FFC4, #F9FFE3)', - icon:'https://static.ticket.sz-trip.com/jundaosuzhou/images/holiday/feimai.png', //非买不可 - path:'/pages/list/techan/index', - url:'', - }, - { - bg: 'linear-gradient(-8deg, #A0F292, #E0F7DC)', - icon:'https://static.ticket.sz-trip.com/jundaosuzhou/images/holiday/feiyou.png', //非游不可 - url:'https://m.cloud.sz-trip.com/OneDayTravelNew', - path:'', - }, - { - bg: 'linear-gradient(-8deg, #E3D9FF, #F6F2FF)', - icon:'https://static.ticket.sz-trip.com/jundaosuzhou/images/holiday/feikan.png', //非看不可 - url:'', - path:'/pages/list/theatre/index', - }, - ], - list1:[], //非玩-景点 - list2:[], //非买-文创 - list3:[], //非游-一日游 - list4:[], //非看-剧场演出 + videoPlay: false, }, onLoad: function(options) { this.getHeight() @@ -185,21 +124,7 @@ Page({ }) if (options.from) { app.globalData.from = options.from; - } - // 获取今天的日期 - let today = new Date(); - this.setData({ - month: (this.data.months[today.getMonth()]).toUpperCase(), - date: today.getDate() - }) - let d = new Date(); - let month = d.getMonth() + 1, - day = d.getDate(); - month = month > 10 ? month : ("0" + month); - day = day > 10 ? day : ("0" + day); - this.setData({ - today: d.getFullYear() + "-" + month + "-" + day - }) + } let systemInfo = wx.getSystemInfoSync(), rect = wx.getMenuButtonBoundingClientRect(); let height = (rect.top - systemInfo.statusBarHeight) * 2 + rect.height; @@ -210,12 +135,10 @@ Page({ lat: res.latitude, lon: res.longitude }) - this.getList() - this.getHdrlList() + this.getList() }, fail: (err) => { - this.getList() - this.getHdrlList() + this.getList() } }) this.setData({ @@ -234,164 +157,16 @@ Page({ }) this.getTwoProduct() this.getBanner() - this.getWeather() - }, - gobdDetail(e) { - console.log(e); - let url = e.currentTarget.dataset.url - wx.navigateTo({ - url: url - }) - }, - getList() { - let bdList = this.data.bdList - // 非玩不可--景点 - commonApi._post("scene/get_scene_by_tag",{ - tag_id:"4", - limit:6, - lon:this.data.lon, - lat:this.data.lat, - offset:0, - sort:"weight", - title:'', - area_id:'' - }).then(res=>{ - res.data.list.map(item => { - if (item.distance || item.distance == 0) { - if (item.distance >= 1000) { - item.distance = (item.distance / 1000).toFixed(2) + 'km'; - } else { - item.distance = (item.distance).toFixed(2) + 'm'; - } - } - }) - this.setData({ - list1:res.data.list - }) - }) - // 非买不可--文创 - commonApi._post('product/get_product_by_tag',{ - tag_id: 326, - offset: 0, - limit: 6, - }).then(res=>{ - this.setData({ - list2:res.data.list - }) - }) - // 非游不可--线路一日游 - commonApi._post('product/get_product_by_tag',{ - type_id: 23, - tag_id:17, - offset: 0, - limit: 6, - sort: 'weight' - }).then(res=>{ - this.setData({ - list3:res.data.list - }) - }) - // 非看不可--剧场演出 - commonApi._post("product/get_product_by_tag",{ - tag_id:"6", - offset:0, - limit:6, - sort:'', - order:'', - lat:this.data.lat, - lon:this.data.lon, - title:'' - }).then(res=>{ - this.setData({ - list4:res.data.list - }) - }) - }, - goDetail(e) { - let item = e.currentTarget.dataset.item; - let type = this.data.hdrlNavList[this.data.hdrlNavIndex].type - if (type == 'movie') { - wx.navigateTo({ - url: '/pages/list/movieticket/list/info/index?id=' + item.third_id - }) - }else { - wx.navigateTo({ - url: '/pages/info/activityInfo/index?id=' + item.id, - }) - } - }, - // 分类为电影时调这个接口 - getMovieList() { - let service = "Cinema/getHotMovieList"; - let data = { - page: 1, - pageSize: 5 - }; - commonApi._post(service, data).then(res => { - console.log(res.data); - this.setData({ - hdrlList: res.data - }) - }) - console.log(this.data.hdrlList); - }, - // 推荐榜单更多跳转 - moreBtn(e) { - let item = e.currentTarget.dataset.item - if (item.path!='') { - wx.navigateTo({ - url: item.path, - }) - } else { - // if (e.currentTarget.dataset.event) { - // this.pagePoint({ - // event: e.currentTarget.dataset.event - // }, 1) - // } - let url = item.url; - app.globalData.weburl = url; - wx.navigateTo({ - url: '/pages/pbService/web/index?weburl=' + encodeURIComponent(url), - }) - } - }, - // 活动日历下的列表 - getHdrlList() { - commonApi._post('pbservice/Actcalendar/getActList', { - page_no: 1, - date: this.data.today, - category: this.data.hdrlNavList[this.data.hdrlNavIndex].type, - keywords: '', - area_key: '', - lat: this.data.lat, - lon: this.data.lon, - page_num: 5 - }).then(res => { - this.setData({ - hdrlList:res.data.rows - }) - }) - }, - // 切换活动日历分类 - changeHdrlNav(e) { - console.log(e.currentTarget.dataset); - this.setData({ - hdrlList:[], - hdrlNavIndex:e.currentTarget.dataset.index, - }) - if (this.data.hdrlNavIndex == 4) { - this.getMovieList() - } else { - this.getHdrlList() //切换分类重新获取活动日历列表 - } - }, - // 游苏州下的公共服务和旅游助手切换 - changeType(e) { - this.setData({ - yszIndex:e.currentTarget.dataset.index, - }) - }, - // 获取导航栏项目标题高度 + this.getWeather() + // 获取今天的日期 + let today = new Date(); + this.setData({ + month: (this.data.months[today.getMonth()]).toUpperCase(), + date: today.getDate() + }) + this.getVideoPrize() + this.getXpthList() + }, getHeight() { let that = this wx.getSystemInfo({ @@ -404,62 +179,59 @@ Page({ } }) }, - // getXpthList: function() { - // // 元旦新增 新品特惠 - // commonApi._post("product/get_product_indulgence", { - // tag_id: 275, - // typeId: 3, - // }).then(res => { - // console.log('data', res.data); - // this.setData({ - // xpth: res.data, - // djsTime: res.data.time - // }) - // let time = setInterval(() => { - // this.setData({ - // djsTime: this.data.djsTime - 1 - // }) - // this.formatDate(this.data.djsTime) - // }, 1000) - // if (this.data.djsTime == 0) { - // clearInterval(time) - // } - // }) - // }, + getXpthList: function() { + // 元旦新增 新品特惠 + commonApi._post("product/get_product_indulgence", { + tag_id: 275, + typeId: 3, + }).then(res => { + console.log('data', res.data); + this.setData({ + xpth: res.data, + djsTime: res.data.time + }) + let time = setInterval(() => { + this.setData({ + djsTime: this.data.djsTime - 1 + }) + this.formatDate(this.data.djsTime) + }, 1000) + if (this.data.djsTime == 0) { + clearInterval(time) + } + }) + }, // 元旦新品特惠 倒计时 - // formatDate: function(oTime) { - // let h = parseInt(oTime / 3600) - // let m = parseInt((oTime % 3600) / 60) - // let s = parseInt(oTime % 60) - // h = h < 10 ? "0" + h : h; - // m = m < 10 ? "0" + m : m; - // s = s < 10 ? "0" + s : s; - // this.setData({ - // djs: { - // h: h, - // m: m, - // s: s - // } - // }) - // return - // }, - // 非遗跳转 - // goFeiyi: function() { - // app.globalData.weburl = 'https://m.cloud.sz-trip.com/mlgCoupons' - // wx.navigateTo({ - // url: "/pages/pbService/web/index" - // }) - // }, - // onTabItemTap: function(e) { - // console.log(e, 99999999) - // }, - // 大轮播的监听方法 + formatDate: function(oTime) { + let h = parseInt(oTime / 3600) + let m = parseInt((oTime % 3600) / 60) + let s = parseInt(oTime % 60) + h = h < 10 ? "0" + h : h; + m = m < 10 ? "0" + m : m; + s = s < 10 ? "0" + s : s; + this.setData({ + djs: { + h: h, + m: m, + s: s + } + }) + return + }, + goFeiyi: function() { + app.globalData.weburl = 'https://m.cloud.sz-trip.com/mlgCoupons' + wx.navigateTo({ + url: "/pages/pbService/web/index" + }) + }, + onTabItemTap: function(e) { + console.log(e, 99999999) + }, changeBannerIndex: function(e) { this.setData({ activeBannerIndex: e.detail.current }) - }, - // 小轮播监听方法 + }, changeSmBannerIndex: function(e) { this.setData({ smBannerIndex: e.detail.current @@ -689,7 +461,7 @@ Page({ util.gotoDetail(item) }, gotoPath: function(e) { - console.log(e) + console.log(e) // if (e.currentTarget.dataset.event) { // if (e.currentTarget.dataset.event=='gongyeyuanqu_click') { // wx.navigateToMiniProgram({ @@ -826,33 +598,33 @@ Page({ }) }, // 热门推荐 去掉经纬度 接口排序方式变更(韩阳) - // getList: function() { - // if (!this.data.listMore) return; - // commonApi._post("search/recommend", { - // offset: this.data.list.length, - // limit: 16 - // }).then(res => { - // res.data.map(item => { - // if (item.ext.display_tags) { - // item.ext.display_tags = item.ext.display_tags.split(",").splice(0, 2) - // } else { - // item.ext.display_tags = [] - // } - // }) - // if (res.data.length < 15) { - // this.setData({ - // listMore: false - // }) - // } - // this.setData({ - // list: this.data.list.concat(res.data) - // }) - // }) - // }, + getList: function() { + if (!this.data.listMore) return; + commonApi._post("search/recommend", { + offset: this.data.list.length, + limit: 16 + }).then(res => { + res.data.map(item => { + if (item.ext.display_tags) { + item.ext.display_tags = item.ext.display_tags.split(",").splice(0, 2) + } else { + item.ext.display_tags = [] + } + }) + if (res.data.length < 15) { + this.setData({ + listMore: false + }) + } + this.setData({ + list: this.data.list.concat(res.data) + }) + }) + }, onReachBottom: function() { - // if (this.data.list.length < 30) { - // this.getList() - // } + if (this.data.list.length < 30) { + this.getList() + } }, gotoDetail: function(e) { let item = e.currentTarget.dataset.item; @@ -980,186 +752,186 @@ Page({ url: '/pages/pbService/web/index?weburl=' + encodeURIComponent(weburl), }) }, - // bannerClick2: function(e) { - // let item = e.currentTarget.dataset.item; - // if (item.action == 'href') { - // if (item.href.indexOf(",") != -1) { - // let info = item.href.split(","); - // wx.navigateToMiniProgram({ - // appId: info[0], - // path: info[1] - // }) - // } else if (item.href.indexOf('map/index') != -1) { - // wx.reLaunch({ - // url: item.href - // }) - // } else { - // wx.navigateTo({ - // url: item.href, - // }) - // } - // } else if (item.action == "web") { - // app.globalData.weburl = item.href; - // wx.navigateTo({ - // url: "/pages/pbService/web/index?weburl=" + encodeURIComponent(item.href), - // }) - // } - // }, + bannerClick2: function(e) { + let item = e.currentTarget.dataset.item; + if (item.action == 'href') { + if (item.href.indexOf(",") != -1) { + let info = item.href.split(","); + wx.navigateToMiniProgram({ + appId: info[0], + path: info[1] + }) + } else if (item.href.indexOf('map/index') != -1) { + wx.reLaunch({ + url: item.href + }) + } else { + wx.navigateTo({ + url: item.href, + }) + } + } else if (item.action == "web") { + app.globalData.weburl = item.href; + wx.navigateTo({ + url: "/pages/pbService/web/index?weburl=" + encodeURIComponent(item.href), + }) + } + }, // 监听文旅查询的scroll listenScroll(e) { this.setData({ scrollLeft: e.detail.scrollLeft }) }, - // // 获取短视频大赛是否中奖 中奖详情 - // getVideoPrize() { - // let user_id = wx.getStorageSync('jstrip_userid'); - // if (!user_id || wx.getStorageSync('indexPriceNoTip')) return; - // commonApi.user_post('actonline/video_act/getRaffle', { - // act_id: 5 - // }).then(res => { - // this.setData({ - // videoPrize: res.data - // }) - // }) - // }, - // noMoreTip() { - // wx.setStorageSync('indexPriceNoTip', true) - // this.closePrice() - // }, - // closePrice() { - // this.setData({ - // videoPrize: false, - // prizeInfo: null - // }) - // }, + // 获取短视频大赛是否中奖 中奖详情 + getVideoPrize() { + let user_id = wx.getStorageSync('jstrip_userid'); + if (!user_id || wx.getStorageSync('indexPriceNoTip')) return; + commonApi.user_post('actonline/video_act/getRaffle', { + act_id: 5 + }).then(res => { + this.setData({ + videoPrize: res.data + }) + }) + }, + noMoreTip() { + wx.setStorageSync('indexPriceNoTip', true) + this.closePrice() + }, + closePrice() { + this.setData({ + videoPrize: false, + prizeInfo: null + }) + }, // 抽奖 - // choosePrize() { - // commonApi.user_post('actonline/video_act/luckyDraw', { - // act_id: 5 - // }).then(res => { - // this.setData({ - // prizeInfo: res.data - // }) - // if (res.data.type != 'none') { - // // 抽奖成功的话 弹框 - // wx.showModal({ - // title: "提示", - // content: "中奖人员请联系君到苏州客服,领奖方式以客服通知为准", - // showCancel: false - // }) - // } - // }) - // }, - // bannerJumpNew(item) { - // let that = this - // item = item.currentTarget.dataset.item - // if (item.tdata == '') return - // that.pagePoint({ - // event: "banner_click", - // type: 'banner' - // }, 1) - // switch (item.jump_type) { - // case 0: - // break; - // case 1: - // util.gotoDetail(item.product_model) - // break; - // case 2: - // if (item.front_model && item.front_model.mini) { - // wx.navigateTo({ - // url: "/" + item.front_model.mini - // }) - // } - // break; - // case 3: - // if ((item.tdata.url.indexOf('http://') != -1 || item.tdata.url.indexOf('https://') != -1) && - // item.tdata.url.indexOf('m.cloud.sz-trip.com') == -1) { - // // 外部h5 - // console.log(item.tdata) - // app.globalData.weburl = item.tdata.url; - // wx.navigateTo({ - // url: "/pages/pbService/web/index" - // }) - // } else { - // let page = item.tdata.url.split("/"); - // page = page[page.length - 1].split("?") - // console.log(page[0]) - // let url = this.data.urltopage[page[0]]; - // if (url && url.indexOf('map') != -1) { - // let types = ['', 'scenic', 'venue', 'post', 'restaurant', 'relic', 'tenscenic', - // 'cinema', 'academes' - // ], - // type = page[1] ? page[1].split("=") : []; - // wx.reLaunch({ - // url: url + "?type=" + (type[1] ? types.findIndex(t => t == type[1]) : null) - // }) - // } else if (url) { - // wx.navigateTo({ - // url: url, - // }) - // } else { - // app.globalData.weburl = item.tdata.url; - // wx.navigateTo({ - // url: "/pages/pbService/web/index" - // }) - // } - // } - // break; - // case 4: - // if (item.tdata.appid == 'wxe5ca0f71e918e352' && wx.getStorageSync('jstrip_userid')) { - // // 如果是苏心游的小程序 直接把authCode带过去 - // userApi.user_post("user/getJumpThirdAppCode", {}).then(res => { - // let weburl = item.tdata.page - // if (weburl.indexOf('?') != -1) { - // weburl += '&authCode=' + res.data; - // } else { - // weburl += '?authCode=' + res.data - // } - // wx.navigateToMiniProgram({ - // appId: item.tdata.appid, - // path: weburl - // }) - // }).catch(err => { - // wx.navigateToMiniProgram({ - // appId: item.tdata.appid, - // path: item.tdata.page - // }) - // }) - // } else { - // wx.navigateToMiniProgram({ - // appId: item.tdata.appid, - // path: item.tdata.page - // }) - // } - // break; - // default: - // break; - // } - // return - // }, + choosePrize() { + commonApi.user_post('actonline/video_act/luckyDraw', { + act_id: 5 + }).then(res => { + this.setData({ + prizeInfo: res.data + }) + if (res.data.type != 'none') { + // 抽奖成功的话 弹框 + wx.showModal({ + title: "提示", + content: "中奖人员请联系君到苏州客服,领奖方式以客服通知为准", + showCancel: false + }) + } + }) + }, + bannerJumpNew(item) { + let that = this + item = item.currentTarget.dataset.item + if (item.tdata == '') return + that.pagePoint({ + event: "banner_click", + type: 'banner' + }, 1) + switch (item.jump_type) { + case 0: + break; + case 1: + util.gotoDetail(item.product_model) + break; + case 2: + if (item.front_model && item.front_model.mini) { + wx.navigateTo({ + url: "/" + item.front_model.mini + }) + } + break; + case 3: + if ((item.tdata.url.indexOf('http://') != -1 || item.tdata.url.indexOf('https://') != -1) && + item.tdata.url.indexOf('m.cloud.sz-trip.com') == -1) { + // 外部h5 + console.log(item.tdata) + app.globalData.weburl = item.tdata.url; + wx.navigateTo({ + url: "/pages/pbService/web/index" + }) + } else { + let page = item.tdata.url.split("/"); + page = page[page.length - 1].split("?") + console.log(page[0]) + let url = this.data.urltopage[page[0]]; + if (url && url.indexOf('map') != -1) { + let types = ['', 'scenic', 'venue', 'post', 'restaurant', 'relic', 'tenscenic', + 'cinema', 'academes' + ], + type = page[1] ? page[1].split("=") : []; + wx.reLaunch({ + url: url + "?type=" + (type[1] ? types.findIndex(t => t == type[1]) : null) + }) + } else if (url) { + wx.navigateTo({ + url: url, + }) + } else { + app.globalData.weburl = item.tdata.url; + wx.navigateTo({ + url: "/pages/pbService/web/index" + }) + } + } + break; + case 4: + if (item.tdata.appid == 'wxe5ca0f71e918e352' && wx.getStorageSync('jstrip_userid')) { + // 如果是苏心游的小程序 直接把authCode带过去 + userApi.user_post("user/getJumpThirdAppCode", {}).then(res => { + let weburl = item.tdata.page + if (weburl.indexOf('?') != -1) { + weburl += '&authCode=' + res.data; + } else { + weburl += '?authCode=' + res.data + } + wx.navigateToMiniProgram({ + appId: item.tdata.appid, + path: weburl + }) + }).catch(err => { + wx.navigateToMiniProgram({ + appId: item.tdata.appid, + path: item.tdata.page + }) + }) + } else { + wx.navigateToMiniProgram({ + appId: item.tdata.appid, + path: item.tdata.page + }) + } + break; + default: + break; + } + return + }, onReady: function() { }, - // gotoOther: function(e) { - // let item = e.currentTarget.dataset.item; - // if (item.type == 'h5') { - // app.globalData.weburl = item.url - // wx.navigateTo({ - // url: "/pages/pbService/web/index?weburl=" + encodeURIComponent(item.url) - // }) - // } else if (item.type == 'mini') { - // wx.navigateToMiniProgram({ - // appId: item.appid, - // path: item.path - // }) - // } else if (item.type == 'page') { - // wx.navigateTo({ - // url: item.page, - // }) - // } - // }, + gotoOther: function(e) { + let item = e.currentTarget.dataset.item; + if (item.type == 'h5') { + app.globalData.weburl = item.url + wx.navigateTo({ + url: "/pages/pbService/web/index?weburl=" + encodeURIComponent(item.url) + }) + } else if (item.type == 'mini') { + wx.navigateToMiniProgram({ + appId: item.appid, + path: item.path + }) + } else if (item.type == 'page') { + wx.navigateTo({ + url: item.page, + }) + } + }, pagePoint: function(e, type) { util.pagePoint(e, type) }, diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 4af909c..59e3171 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -1,7 +1,10 @@ - + + + + - + {{weather.max_temp}}° @@ -11,6 +14,11 @@ mode="aspectFill"> + @@ -20,7 +28,7 @@ - + @@ -30,103 +38,144 @@ - - - - - 更多 > + + + + + + + + 活动日历 - - - {{item.title}} - + + + + + 场馆预约 - - - - - - - {{item.name}} - {{item.begin_date}}-{{item.end_date}} - - - - + + + + + + + 非遗专卖 - - - - - - - {{item.title}} - - 去购票 > - + + + + + 剧场演出 + + + + + + 文创特产 + + + + + + 景点门票 + + + + + + 酒店住宿 + + + + + + 夜游苏州 + + + + + + 一日游 + + + + + + 研学游 + + + + + + 特惠新品超值商品限时抢购 + + + + + + + + 限时特惠 + 新品推荐 + + ¥{{saleProduct.price?saleProduct.price/100:0}}起 - - - - - - - - - - - - - - - 景点门票 - - - - 夜游苏州 - - - - 文创特产 - - - - 场馆预约 - - - - 剧场演出 - - - - 一日游 - - - - 一卡游 - - - - 非遗专卖 + + 精品线路带你轻松玩转苏州 + + + + + + + + 四季苏州 + 最是江南 + + ¥{{roadProduct.price?roadProduct.price/100:0}}起 - - - - - - + + + + + + @@ -135,145 +184,464 @@ - - - - - - {{item}} + + + + + + + + + + + + + + 倒计时 + {{djs.h}} + : + {{djs.m}} + : + {{djs.s}} + + + + + + + + + + + + {{item.title}} + + + {{item.price/100}} + + + + + + - - - - - - - 安全服务 + + + + + + + + + + + + + + 非遗鉴赏 - - - 高峰预警 + + + + + 数字博物馆 - - - 行李寄存 + + + + + 公共文化资源库 + + + + + + 云上文博会 + + + + + + 云上观展 + + + + + + 精彩回顾 - - - 实时路况 + + + + + 文旅单位 + + + + + 书仓 + + + + + + 苏影通 + + + + + + 视觉中心 + + + + + + + 文化场馆查询 + + + + + + + + 投资导引图 + + + + + + + - - 查看更多 > - + + + + + + - - - - - - - + + + + + + + + + + + + + + + + + + + + + 查看全部 + + + + + + + + + + + + 安全服务 + + + + + 景区舒适度 + + + + + + 行李寄存 + + + + + + 实时路况 + + + + - - - - - - - - - 更多 > + + + + + + + + + + + + + + + + + + {{item.name}} - - - {{index+1}} - - - - - {{item.title}} - - - {{item.price/100}} - {{item.distance}} - + + + + + + + + + + + + + {{date}} {{month}} + + + {{item.ext.display_tags[0]}} + {{item.title}} - - - - - {{index+1}} - - - - - {{item.title}} - - - {{item.price/100}} - {{(item.distance/1000)}}km + + + + {{item.ext.subtitle}} + + + {{item.title}} + + + + {{item.ext.like_number}} + + + + {{item.ext.view_number}} + - - - - - {{index+1}} - - - - - {{item.title}} - - - {{item.price/100}} - {{(item.distance/1000)}}km - + + + + + + + {{item.title}} + + + {{item.ext.price/100}} - - - {{index+1}} - - - - - {{item.title}} - - - {{item.price/100}} - {{(item.distance/1000)}}km - - - + + 查看更多 + 暂无更多推荐 + + + + + + + + + {{prizeInfo.prize_name}} + + + + + + + + + + {{prizeInfo.prize_name}} + + + + + + + + + + 您与奖品擦肩而过期待下次参与 + + + + + 我知道了 + + + + + + + - - - - - - + + + + + + + + + + + + + {{time}}s跳过 @@ -304,4 +672,12 @@ - + diff --git a/pages/index/index.wxss b/pages/index/index.wxss index e25c5f0..6195ca8 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -1,11 +1,12 @@ -/* pages/indexs/index.wxss */ +/**index.wxss**/ /* 元旦修改 */ page { - background: #f5f2ed; + /* background: #9DDCF5; */ padding-bottom: 36.67rpx; - background: url("https://static.ticket.sz-trip.com/jundaosuzhou/images/holiday/bg.png"); - background-size: 100% 100%; - background-repeat: round; + /* background: url("https://static.ticket.sz-trip.com/uploads/20240606/f92942021f97786a25c1cd51de779c7c.png"); */ + background: #9DDCF5 url('https://static.ticket.sz-trip.com/uploads/20240606/f92942021f97786a25c1cd51de779c7c.png'); + background-repeat: repeat-y; + background-size: contain; } .swiper,.swiper image { width: 697rpx; @@ -38,10 +39,18 @@ page { .search-box { flex: 1; width: 100%; + /* height: 64rpx; */ + /* background: rgba(255, 255, 255, 0.6); */ + /* border-radius: 32rpx; */ + /* color: #666; */ + /* height: 70.67rpx; */ height: 64rpx; background: rgba(255,255,255,0.7); border-radius: 32rpx; - color: #000; + /* color: #72674E; */ + color: #333333; + /* background-image: url("https://static.ticket.sz-trip.com//uploads/20240228/10b93c1389ef5dfc02d07c4091af8f2d.png"); + background-size: 100% 100%; */ display: flex; align-items: center; font-size: 25rpx; @@ -50,7 +59,7 @@ page { font-size: 30rpx; margin-left: 20rpx; margin-right: 10rpx; - color: #000; + /* color: #72674E; */ } .top-box .weather-num,.top-box .weather { flex-shrink: 0; @@ -72,18 +81,20 @@ page { /* background: #FFFFFF; */ /* box-shadow: 0px 3rpx 26rpx 0px rgba(6, 0, 1, 0.13); */ border-radius: 0 0 27rpx 27rpx; - width: 697rpx; + width: 710rpx; margin: 0 auto; position: relative; z-index: 0; display: flex; padding: 34rpx 0; - padding-bottom: 7rpx; + padding-bottom: 29.33rpx; justify-content: space-between; flex-wrap: wrap; - background: #FFFED6; - margin-top: -20rpx; - padding-top: 54rpx; + /* background: #FFFED6; */ + margin-top: -50rpx; + padding-top: 84rpx; + background: url('https://static.ticket.sz-trip.com/uploads/20240606/80bc185bf83b276b114415d670eaa57f.png'); + background-size: 100% 100%; } .top-icon-item { margin-bottom: 20rpx; @@ -104,8 +115,7 @@ page { margin-bottom: 10rpx; } .content { - /* margin: 0 25rpx; */ - margin-top: 20.67rpx; + margin: 0 25rpx; } .sale-road-boxes { display: flex; @@ -195,11 +205,13 @@ page { height: 154rpx; } .small-swiper-box { - margin: 24rpx 26.67rpx 26.67rpx; - /* width: 100%; */ + margin: 50rpx 0; + width: 100%; height: 154rpx; border-radius: 20rpx; + /* border-radius: 77rpx; */ overflow: hidden; + margin-bottom: 33rpx; position: relative; } .product-tags { @@ -307,15 +319,12 @@ page { } */ /* 元旦修改 以上两个样式为注释掉的 下面的.pic-list是新改的 */ .pic-list { - /* width: 100%; + width: 100%; display: flex; margin-right: 26rpx; display: flex; justify-content: space-between; - flex-wrap: wrap; */ - display: flex; - justify-content: space-between; - margin: 0 28rpx; + flex-wrap: wrap; } .title-more { font-size: 24rpx; @@ -334,29 +343,36 @@ page { font-size: 22rpx; } .slide-out-box { - /* margin-top: 20rpx; + margin-top: 20rpx; background: #FFFED6; - box-shadow: 0rpx 0rpx 3rpx 0rpx rgba(103,103,103,0.2); */ + box-shadow: 0rpx 0rpx 3rpx 0rpx rgba(103,103,103,0.2); border-radius: 27rpx; padding-bottom: 1rpx; - /* margin-bottom: 40rpx; */ + margin-bottom: 40rpx; + background: url('https://static.ticket.sz-trip.com/uploads/20240606/88feacc675386ac7c8144633ccbd6f76.png'); + background-size: 100% 100%; } .pbservice { - width: calc(160rpx * 8); + /* width: calc(175rpx * 6); */ + /* 元旦修改 */ + width: calc(190rpx * 8); display: flex; - margin-top: 5rpx; - /* flex-wrap: wrap; */ - flex-wrap: nowrap; - /* padding-left: 12rpx; */ - /* overflow-x: scroll; */ + margin-top: 20rpx; + flex-wrap: wrap; + /* margin-bottom: 60rpx; */ + /* 元旦修改 注释margin-bottom */ } .pbservice-item { + /* 元旦修改 截止到注释的width*/ width: 120rpx; - margin-bottom: 25rpx; - margin-right: 32.33rpx; + margin-bottom: 33.33rpx; + margin-right: 62.33rpx; + /* width: 175rpx; */ text-align: center; - font-size: 27rpx; - color: #000; + font-size: 25rpx; + /* color: #333; */ + /* 春节调整颜色改版 */ + color: #54504D; line-height: 24rpx; display: flex; align-items: center; @@ -371,7 +387,7 @@ page { margin-bottom: 20rpx; margin-top: 50rpx; */ /* 元旦修改 以上都是之前的*/ - width: 80rpx; + width: 106rpx; margin-bottom: 10rpx; } .six-box { @@ -555,24 +571,29 @@ page { overflow: hidden; margin: 30rpx auto; */ /* 元旦修改 以上为注释部分 下面为新内容*/ - width: 48rpx !important; - height: 8rpx; + width: 73rpx !important; + height: 7rpx; /* background: #DDCEAC; */ background: #fff; - border-radius: 4rpx; - margin: 0 auto 25rpx; + border-radius: 3rpx; + margin: 33.33rpx auto; } .scroll-line-bg { - height: 8rpx; - background: #078565; - border-radius: 4rpx; + /* width: 300rpx; + height: 6rpx; + border-radius: 3rpx; + background: #0B898E; */ + /* 元旦修改 以上为注释部分 下面为新内容*/ + height: 7rpx; + background: #56A5EA; + border-radius: 3rpx; } /* 元旦修改 新增样式 */ .scroll-line-bg2 { - margin-left: 24rpx; - background: #078565; - height: 8rpx; - border-radius: 4rpx; + margin-left: 37.33rpx; + background: #56A5EA; + height: 7rpx; + border-radius: 3rpx; } .nomore-tip-btn { position: absolute; @@ -684,6 +705,8 @@ page { box-shadow: 0rpx 0rpx 3rpx 0rpx rgba(103,103,103,0.2); border-radius: 27rpx; align-items: center; + background: url('https://static.ticket.sz-trip.com/uploads/20240606/e1c3f60baf65787d593c6a7c79f881c7.png'); + background-size: 100% 100%; } .other-plats image { width: 80rpx; @@ -841,23 +864,16 @@ page { } /* 元旦修改新增样式 */ .xsth-time { - /* margin: 0 5rpx; */ - /* width: 50rpx; */ - /* height: 33rpx; */ width: 43rpx; height: 43rpx; line-height: 43rpx; - background: #4AB648; - /* background: #F9F1DB; */ - /* border-radius: 5rpx; */ + background: #FFEF47; border-radius: 13rpx; font-size: 25rpx; font-family: DIN; font-weight: 500; - /* color: #D62828; */ - color: white; + color: #000; text-align: center; - /* line-height: 33rpx; */ } .time-box text { width: 18rpx; @@ -904,18 +920,20 @@ page { /* 元旦修改新增样式 */ .xpth-product { /* position: absolute; */ - width: 697rpx; + width: 700rpx; height: 373rpx; - background: #FFFED6; + /* background: #FFFED6; */ box-shadow: 0rpx 0rpx 3rpx 0rpx rgba(103,103,103,0.2); border-radius: 27rpx; - padding: 25rpx 15rpx; + padding: 25rpx; box-sizing: border-box; /* left: 0; bottom: 15.33rpx; /* width: 710rpx; */ display: flex; justify-content: space-between; + background-image: url('https://static.ticket.sz-trip.com/uploads/20240606/88feacc675386ac7c8144633ccbd6f76.png'); + background-size: 100% 100%; } /* 元旦修改新增样式 */ .xpth-banner { @@ -1034,9 +1052,9 @@ page { } /* 元旦修改新增样式 */ .new-pic { - width: 160rpx !important; - height: 255rpx !important; - /* margin-bottom: 26.67rpx; */ + width: 158.67rpx !important; + height: 218.67rpx !important; + margin-bottom: 26.67rpx; } .ggfw-list { @@ -1047,8 +1065,8 @@ page { } .ggfw image{ margin-bottom: 16.67rpx; - width: 113.33rpx !important; - height: 113.33rpx !important; + width: 70rpx !important; + height: 70rpx !important; } .six-box-new { @@ -1156,290 +1174,18 @@ page { left: 56.67rpx; bottom: 64rpx; } - -.right-more { - width: 120rpx; - height: 47rpx; - background-color: rgba(255,255,255,.7); - border-radius: 23rpx; - font-weight: 500; - font-size: 27rpx; - color: #078565; - text-align: center; - line-height: 47rpx; -} - -.hdrlNavList { - display: flex; - margin: 28rpx 26.67rpx 10rpx; - overflow-x: scroll; - flex-wrap: nowrap; -} -.hdrlNav { - flex-shrink: 0; - /* width: 160rpx; */ - padding: 0 20rpx; - height: 53rpx; - background: #F8FFDB; - border-radius: 13rpx; - font-size: 32rpx; - color: #078565; - text-align: center; - line-height: 53rpx; - margin-right: 14rpx; -} -.hdrlNavActive { - background-color: #078565; - font-size: 32rpx; - color: #FFFFFF; -} -.hdrlItem { - flex-shrink: 0; - padding: 26.67rpx 22rpx 26.67rpx 20rpx; - /* width: 593.33rpx; */ - display: flex; - background: url("https://static.ticket.sz-trip.com/jundaosuzhou/images/holiday/calendarBg.png"); +.jqssd { + background: url("https://static.ticket.sz-trip.com/uploads/20240606/20c06c5bf8d5e498667ebd954a1d95f8.png"); background-size: 100% 100%; -} -.hdrlItem-img { - width: 280rpx; - height: 213rpx; - background: #8C8C8C; - border-radius: 13rpx; - flex-shrink: 0; - margin-right: 12rpx; -} -.hdrlItem-content { - display: flex; - flex-direction: column; - justify-content: space-between; - height: 213rpx; -} -.hdrlItem-title { - font-weight: bold; - font-size: 28rpx; - color: #000000; - margin-top: 15.33rpx; -} -.hdrlItem-date { - font-weight: 500; - font-size: 23rpx; - color: #000000; - margin-bottom: 19.33rpx; -} - -.main-box { - background-image: url("https://static.ticket.sz-trip.com/uploads/20240603/8ddceea4612d2cfb46d1a0203f4b55ac.png"); - background-size: 100% 100%; - padding: 27.67rpx 20.67rpx 40rpx 20rpx; - margin: 0 8rpx; -} -.main-box-top { - display: flex; - margin-bottom: 5.33rpx; -} -.gfyj,.sslk { - width: 369.33rpx; - height: 146rpx; + width: 365.33rpx; + height: 166rpx; flex-shrink: 0; } .sslk { - margin-left: -48rpx; -} - -.movieItem { - padding: 26.67rpx 26rpx 26.67rpx 20rpx; - background: url("https://static.ticket.sz-trip.com/jundaosuzhou/images/holiday/calendarBg.png"); + background: url("https://static.ticket.sz-trip.com/uploads/20240606/eec4af8edf598dc7c440cff8a5fdbe98.png"); background-size: 100% 100%; + width: 365.33rpx; + height: 166rpx; flex-shrink: 0; - height: 206.67rpx; -} -.movieItem-img { - width: 213rpx; - height: 213rpx; - border-radius: 18rpx; - margin-right: 18rpx; - flex-shrink: 0; -} -.ysz-box { - margin: 0 8rpx 15.33rpx; - background-image: url("https://static.ticket.sz-trip.com/uploads/20240604/d59d35c02ced0da92a366971a63a2476.png"); - /* padding: 43.33rpx 59rpx 46.67rpx 58rpx; */ - background-size: 100% 100%; - width: 733.33rpx; - height: 320rpx; - padding-top: 33.33rpx; -} -.ysz-more { - width: 333rpx; - height: 53rpx; - background: #FFFFFF; - border-radius: 27rpx; - margin: 23rpx auto 0; - text-align: center; - line-height: 53rpx; - font-weight: 500; - font-size: 27rpx; - color: #078565; -} -.ysz-box2 { - /* padding: 20rpx 35rpx; */ - padding-top: 23.33rpx; -} -.tjbd-title { - width: 286.67rpx; - height: 80rpx; -} - -.bd-box { - position: relative; - padding: 36rpx 30.67rpx 44.67rpx 28.67rpx; - margin-left: 26.67rpx; - width: 582rpx; - /* height: 1133rpx; */ - background: linear-gradient(-8deg, #F4F9FF, #B9E1F0); - box-shadow: 0rpx 7rpx 20rpx 0rpx rgba(27,128,97,0.56); - border-radius: 20rpx 80rpx 20rpx 20rpx; -} -.bd-top { - display: flex; - justify-content: space-between; - margin-bottom: 30rpx; - position: relative; -} -.zz { - width: 236.67rpx; - height: 206.67rpx; - position: absolute; - right: 0; - top: 0; - z-index: 2; -} -.bd-type { - width: 167.33rpx; - height: 38.67rpx; -} -.bd-more { - width: 120rpx; - height: 47rpx; - background: rgba(255,255,255,.7); - border-radius: 23rpx; - font-weight: 500; - font-size: 27rpx; - color: #078565; - z-index: 9; - text-align: center; - line-height: 47rpx; -} -.bd-index { - font-weight: bold; - font-size: 40rpx; - color: #000000; -} -.bd-item { - margin-left: 45.33rpx; - width: 453rpx; - height: 147rpx; - background: #FFFFFF; - border-radius: 13rpx; - display: flex; -} -.bd-item-img { - width: 147rpx; - height: 147rpx; - background: #D9D9D9; - border-radius: 13rpx; - flex-shrink: 0; - margin-right: 12.67rpx; -} -.bd-item-content { - padding: 14rpx 29.33rpx 13.33rpx 0; - display: flex; - flex-direction: column; - justify-content: space-between; -} -.bd-item-title { - font-weight: bold; - font-size: 27rpx; - color: #333333; -} -.bd-item-bottom { - display: flex; - justify-content: space-between; - align-items: baseline; - width: 260rpx; -} -.bd-price { - font-size: 29.33rpx; - color: #F93434; - font-weight: bold; -} -.bd-price:after { - content:'起'; - color: #999999; - font-size: 23rpx; - font-weight: 700; -} -.bd-price::before { - content:'¥'; - font-size: 23rpx; -} -.bd-distance { - font-weight: 500; - font-size: 23rpx; - color: #999999; -} - -.buyMovie { - width: 160rpx; - height: 56rpx; - background: #078565; - color: #fff; - border-radius: 20rpx; - text-align: center; - line-height: 56rpx; -} - -.bg1 { - background: linear-gradient(-8deg, #F4F9FF, #B9E1F0); -} -.bg2 { - background: linear-gradient(-8deg, #F9FFE3, #F3FFC4); -} -.bg3 { - background: linear-gradient(180deg, #E0F7DC, #A0F292); -} -.bg4 { - background: linear-gradient(-8deg, #F6F2FF, #E3D9FF); -} - -.hdrlNavList::-webkit-scrollbar{ - display:none; -} -.hdrlList::-webkit-scrollbar{ - display:none; -} -.bottom-box::-webkit-scrollbar{ - display:none; -} -.slide-box::-webkit-scrollbar{ - display:none; -} -.pbservice::-webkit-scrollbar{ - display:none; -} -.textOver3 { - display: -webkit-box; - -webkit-box-orient: vertical; - -webkit-line-clamp: 3; - overflow: hidden; -} -.public-box { - width: 593.33rpx; - height: 266.67rpx; - background: url("https://static.ticket.sz-trip.com/jundaosuzhou/images/holiday/calendarBg.png"); - background-size: 100% 100%; -} -.one::-webkit-scrollbar{ - display:none; + margin-left: -20rpx; } \ No newline at end of file