From 66eefcadab1d89070e777db9ea4a3d8a4d2753b8 Mon Sep 17 00:00:00 2001 From: jiazhipeng Date: Fri, 30 May 2025 10:09:33 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B5=E5=BD=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 2 +- pages/index/index.js | 2 +- pages/index/index.wxml | 8 +- pages/list/activitynew/index.js | 2 +- pages/list/activitynew/index.wxml | 6 +- pages/order/pay/index.js | 78 ++-- pages/pbService/aiHelpYou/index.js | 2 +- pages/pbService/index.wxml | 4 +- pages/pbService/sceneComfort/index.js | 13 +- pages/pbService/sceneComfort/index.wxml | 2 +- pages/pbService/sceneComfort/index.wxss | 8 +- project.private.config.json | 7 + subPackages/index/index.js | 363 +++++++--------- subPackages/index/index.wxml | 95 ++-- subPackages/index/index.wxss | 502 ++++++++++------------ subPackages/password/overview/overview.js | 2 +- utils/https.js | 4 +- utils/util.js | 4 +- 18 files changed, 499 insertions(+), 605 deletions(-) diff --git a/app.js b/app.js index 16d71a8..5271762 100644 --- a/app.js +++ b/app.js @@ -38,7 +38,7 @@ App({ // 获取前端配置文件 commonApi._post("pbservice/Other/getClientConfig", {unique_key: "wechatxcx"}).then(res => { let data = JSON.parse(res.data); - data.isTest = data.isTest191? true : false; + data.isTest = data.isTest192? true : false; data.indexSeason = null this.globalData.configJson = data }).then(() => { diff --git a/pages/index/index.js b/pages/index/index.js index 104a24f..940c872 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -274,7 +274,7 @@ Page({ }, // 分类为电影时调这个接口 getMovieList() { - let service = "Cinema/getHotMovieList"; + let service = "Cinema/getHotChannelMovieList"; let data = { page: 1, pageSize: 5 diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 5200043..cd0a010 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -44,7 +44,7 @@ - + {{item.title}} @@ -88,7 +88,7 @@ src="https://static.ticket.sz-trip.com/uploads/20250429/4bb075515851ae9a760e60a736a40b5b.png" mode=""/> - @@ -189,8 +189,8 @@ 电子社保卡 --> - 高峰预警 diff --git a/pages/list/activitynew/index.js b/pages/list/activitynew/index.js index 91e64e3..61a8f2f 100644 --- a/pages/list/activitynew/index.js +++ b/pages/list/activitynew/index.js @@ -260,7 +260,7 @@ Page({ getMovie: function (e) { if (!this.data.moreFlag) return; let service = { - 1: "getHotMovieList", + 1: "getHotChannelMovieList", 2: "getCinemaList", 3: 'getSoonShowsList' }; diff --git a/pages/list/activitynew/index.wxml b/pages/list/activitynew/index.wxml index 440df97..9112822 100644 --- a/pages/list/activitynew/index.wxml +++ b/pages/list/activitynew/index.wxml @@ -24,7 +24,7 @@ 景区活动 演出 展览 - + 电影 文化惠民 其他 @@ -85,8 +85,8 @@ --> - - + + 热映 影院 diff --git a/pages/order/pay/index.js b/pages/order/pay/index.js index 36892b5..68ab854 100644 --- a/pages/order/pay/index.js +++ b/pages/order/pay/index.js @@ -360,11 +360,11 @@ Page({ let _this =this // 请求是否设置密码 commonApi.user_post("pay_password/checkUsedPassword",{}).then(res=>{ - // 设置过密码 - if (res.data && res.data.data) { + + if (res.data && (res.data.data || res.data.data===0)) { let resCode = res.data.data - // 密码过期 - if (resCode == 0) { + // 密码未设置 + if (resCode === 0) { let userinfo = wx.getStorageSync('jstrip_userInfo') let inputData = {phone: '',code: '',password: '',confirmPassword: ''} if (userinfo && userinfo.mobile) { @@ -375,34 +375,41 @@ Page({ inputData: inputData, haveSBPassword: false, }) - } else if (resCode == 1) { - // 密码正常 - this.setData({ - SBMask: true, - haveSBPassword: true, - vcode: '', - isFoucs: true - }) - } else { - wx.showModal({ - title: '您的支付密码已过期', - content: resCode, - cancelText: '修改密码', - confirmText:'忘记密码', - confirmColor:"#0E8790", - success(res){ - if (res.confirm) { - console.log('忘记密码') - _this.goReset() - } else if (res.cancel) { - console.log('修改密码') - wx.navigateTo({ - url: '/subPackages/password/setting/setting?type=edit' + } else { + commonApi.user_post("pay_password/checkLocked",{}).then(res=>{ + if (res.code!=1) { + return + } else { + if (resCode == 1) { + // 密码正常 + this.setData({ + SBMask: true, + haveSBPassword: true, + vcode: '', + isFoucs: true }) - } - }, + } else { + wx.showModal({ + title: '您的支付密码已过期', + content: resCode, + cancelText: '修改密码', + confirmText:'忘记密码', + confirmColor:"#0E8790", + success(res){ + if (res.confirm) { + console.log('忘记密码') + _this.goReset() + } else if (res.cancel) { + console.log('修改密码') + _this.goEdit() + } + }, + }) + } + } }) - } + + } } }) }, @@ -584,6 +591,17 @@ Page({ } }) }, + goEdit: function () { + commonApi.user_post("pay_password/checkLocked",{}).then(res=>{ + if (res.code!=1) { + return + } else { + wx.navigateTo({ + url: '/subPackages/password/setting/setting?type=edit' + }) + } + }) + }, /** * 生命周期函数--监听页面隐藏 diff --git a/pages/pbService/aiHelpYou/index.js b/pages/pbService/aiHelpYou/index.js index cb6c043..cfca763 100644 --- a/pages/pbService/aiHelpYou/index.js +++ b/pages/pbService/aiHelpYou/index.js @@ -18,7 +18,7 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - let weburl = 'https://test.m.cloud.sz-trip.com/aiPlay' + let weburl = 'https://m.cloud.sz-trip.com/aiPlay' let token = wx.getStorageSync('jstrip_token') if (token) { weburl += '?token='+token diff --git a/pages/pbService/index.wxml b/pages/pbService/index.wxml index b8d74ef..d1137ca 100644 --- a/pages/pbService/index.wxml +++ b/pages/pbService/index.wxml @@ -9,8 +9,8 @@ 苏康码 --> - + 高峰预警 diff --git a/pages/pbService/sceneComfort/index.js b/pages/pbService/sceneComfort/index.js index 7415b96..67bd108 100644 --- a/pages/pbService/sceneComfort/index.js +++ b/pages/pbService/sceneComfort/index.js @@ -7,6 +7,7 @@ Page({ * 页面的初始数据 */ data: { + title: 'AI避高峰', radio:radio, comfortLevel:[], comfortIndex:0, @@ -28,6 +29,10 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { + if (options.title) { + this.setData({title: options.title}) + } + commonApi._post("pbservice/Comfort/getComfortLevel").then(res=>{ let comfortObj = {} res.data.map(item=>{ @@ -45,10 +50,12 @@ Page({ }) this.getList(); }) - commonApi._post('pbservice/Other/getSuzhouAreas').then(res=>{ + commonApi._post('pbservice/Comfort/getComfortAreaList').then(res=>{ let areaObj = {} - res.data.map(item=>{ - areaObj[item.area_code] = item.area_name; + res.data.forEach(item=>{ + item.area_code = item.area + item.area_name = item.area + areaObj[item.area_code] = item.area; }) res.data.unshift({ area_name:"不选择" diff --git a/pages/pbService/sceneComfort/index.wxml b/pages/pbService/sceneComfort/index.wxml index 3fb22bf..803068c 100644 --- a/pages/pbService/sceneComfort/index.wxml +++ b/pages/pbService/sceneComfort/index.wxml @@ -1,5 +1,5 @@ - + diff --git a/pages/pbService/sceneComfort/index.wxss b/pages/pbService/sceneComfort/index.wxss index 3939af1..1ba84df 100644 --- a/pages/pbService/sceneComfort/index.wxss +++ b/pages/pbService/sceneComfort/index.wxss @@ -5,12 +5,16 @@ page { .comfort-item { display: flex; width: 100%; - padding-bottom: 24rpx; + padding: 24rpx 0; + border-bottom: 1px solid rgba(0,0,0,0.1); } +.comfort-item:last-child { + border-bottom: none; + } .item-container{ width: 100%; background: white; - padding: 24rpx 10rpx 24rpx 24rpx; + padding: 0rpx 10rpx 24rpx 24rpx; box-sizing: border-box; border-radius: 20rpx; } diff --git a/project.private.config.json b/project.private.config.json index 88e6abb..33ab55d 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -6,6 +6,13 @@ "condition": { "miniprogram": { "list": [ + { + "name": "subPackages/password/setting/setting", + "pathName": "subPackages/password/setting/setting", + "query": "type=edit", + "launchMode": "default", + "scene": null + }, { "name": "pages/pbService/sceneComfort/index", "pathName": "pages/pbService/sceneComfort/index", diff --git a/subPackages/index/index.js b/subPackages/index/index.js index 0acdb32..36fb35e 100644 --- a/subPackages/index/index.js +++ b/subPackages/index/index.js @@ -41,83 +41,85 @@ Page({ // banner上的金刚区 bannerDataList: [ - { - title: "景点门票", - img: "https://static.ticket.sz-trip.com/uploads/20250526/5934b8b77b058ce1de5943adbaf51739.png", - path: "/pages/list/scene/index", - }, - { - title: "活动日历", - img: "https://static.ticket.sz-trip.com/uploads/20250526/d75d7a3924d832912a2633ee29b30b9b.png", - path: "/pages/list/activitynew/index", - }, - { - title: "匠意臻品", - img: "https://static.ticket.sz-trip.com/uploads/20250526/69722050b638954e0b755a4d6c771d48.png", - path: "/subPackages/techanNew/index", - }, - { - title: "领券中心", - img: "https://static.ticket.sz-trip.com/uploads/20250526/4384a93f77d8faba5f504195c77e57c1.png", - path: "/pages/list/scene/index", - }, + // { + // title: "景点门票", + // img: "https://static.ticket.sz-trip.com/uploads/20250526/5934b8b77b058ce1de5943adbaf51739.png", + // path: "/pages/list/scene/index", + // }, + // { + // title: "活动日历", + // img: "https://static.ticket.sz-trip.com/uploads/20250526/d75d7a3924d832912a2633ee29b30b9b.png", + // path: "/pages/list/activitynew/index", + // }, + // { + // title: "匠意臻品", + // img: "https://static.ticket.sz-trip.com/uploads/20250526/69722050b638954e0b755a4d6c771d48.png", + // path: "/subPackages/techanNew/index", + // }, + // { + // title: "领券中心", + // img: "https://static.ticket.sz-trip.com/uploads/20250526/4384a93f77d8faba5f504195c77e57c1.png", + // path: "/pages/list/scene/index", + // }, ], // 金刚区 mainTypeList: [ - { - title: "非遗专卖", - img: "https://static.ticket.sz-trip.com/uploads/20250526/a901ad572bda409e769f92760b812d71.png", - path: "/subPackages/feiyiNew/index", - }, - { - title: "场馆预约", - img: "https://static.ticket.sz-trip.com/uploads/20250526/a901ad572bda409e769f92760b812d71.png", - path: "/pages/list/museum/index", - }, - { - title: "一日游", - img: "https://static.ticket.sz-trip.com/uploads/20250526/a901ad572bda409e769f92760b812d71.png", - weburl:"https://m.cloud.sz-trip.com/OneDayTravelNew", - }, - { - title: "户外游", - img: "https://static.ticket.sz-trip.com/uploads/20250526/a901ad572bda409e769f92760b812d71.png", - weburl:"https://m.cloud.sz-trip.com/LearningTravel", - }, - { - title: "电影购票", - img: "https://static.ticket.sz-trip.com/uploads/20250526/a901ad572bda409e769f92760b812d71.png", - weburl:"https://m.cloud.sz-trip.com/movies", - }, - { - type: 'hotel', // 特殊标识方便查找 更新weburl - title: "酒店住宿", - img: "https://static.ticket.sz-trip.com/uploads/20250526/a901ad572bda409e769f92760b812d71.png", - weburl: '', - path: '/pages/list/hotel/index' - }, - { - title: "水上游", - img: "https://static.ticket.sz-trip.com/uploads/20250526/a901ad572bda409e769f92760b812d71.png", - path: '/pages/list/night/index' - }, - { - title: "剧场演出", - img: "https://static.ticket.sz-trip.com/uploads/20250526/a901ad572bda409e769f92760b812d71.png", - path: '/pages/list/theatre/index' - }, + // { + // title: "非遗专卖", + // img: "https://static.ticket.sz-trip.com/uploads/20250526/a901ad572bda409e769f92760b812d71.png", + // path: "/subPackages/feiyiNew/index", + // }, + // { + // title: "场馆预约", + // img: "https://static.ticket.sz-trip.com/uploads/20250526/a901ad572bda409e769f92760b812d71.png", + // path: "/pages/list/museum/index", + // }, + // { + // title: "一日游", + // img: "https://static.ticket.sz-trip.com/uploads/20250526/a901ad572bda409e769f92760b812d71.png", + // weburl:"https://m.cloud.sz-trip.com/OneDayTravelNew", + // }, + // { + // title: "户外游", + // img: "https://static.ticket.sz-trip.com/uploads/20250526/a901ad572bda409e769f92760b812d71.png", + // weburl:"https://m.cloud.sz-trip.com/LearningTravel", + // }, + // { + // title: "电影购票", + // img: "https://static.ticket.sz-trip.com/uploads/20250526/a901ad572bda409e769f92760b812d71.png", + // weburl:"https://m.cloud.sz-trip.com/movies", + // }, + // { + // type: 'hotel', // 特殊标识方便查找 更新weburl + // title: "酒店住宿", + // img: "https://static.ticket.sz-trip.com/uploads/20250526/a901ad572bda409e769f92760b812d71.png", + // weburl: '', + // path: '/pages/list/hotel/index' + // }, + // { + // title: "水上游", + // img: "https://static.ticket.sz-trip.com/uploads/20250526/a901ad572bda409e769f92760b812d71.png", + // path: '/pages/list/night/index' + // }, + // { + // title: "剧场演出", + // img: "https://static.ticket.sz-trip.com/uploads/20250526/a901ad572bda409e769f92760b812d71.png", + // path: '/pages/list/theatre/index' + // }, ], mainTypeLeft: 0, xpth: {}, // 新品特惠 XPathBannerIndex: 0, xpthIndex: 0, + list: [], // 热门推荐 + // 公共服务 publicSerivce: [ { title: "高峰预警", img: "https://static.ticket.sz-trip.com/uploads/20250526/c7e28d88bde040c386183d69ae9bb228.png", - weburl: "https://wlsjzx.zdhxwl.cn/kt_h5/index.html#/morecopy", + path: "/pages/pbService/sceneComfort/index?title=高峰预警", eventName: "comfort_click", }, { @@ -200,17 +202,17 @@ Page({ }, { title: "云上文博会", - img: 'https://static.ticket.sz-trip.com/uploads/20250312.png', + img: 'https://static.ticket.sz-trip.com/uploads/20250529/f45acb752680d1b4cce7d25da02c96f5.png', weburl: "https://m.cloud.sz-trip.com/CloudExpo", }, { title: "精彩回顾", - img: 'https://static.ticket.sz-trip.com/uploads/20250312/58d0fd32ea7521b0b1ea12bf5b593fe2.png', + img: 'https://static.ticket.sz-trip.com/uploads/20250529/74bd8e6b027797a24fbfccaef5c836ad.png', path: "/pages/pbService/activity/index", }, { title: "文化场馆查询", - img: 'https://static.ticket.sz-trip.com/uploads/20250312/58d0fd32ea7521b0b1ea12bf5b593fe2.png', + img: 'https://static.ticket.sz-trip.com/uploads/20250529/ff56544a00fb1cc78e0b307f16daa821.png', weburl: "https://m.cloud.sz-trip.com/Museum", }, { @@ -237,12 +239,12 @@ Page({ }, { title: "云游苏州", - img: 'https://static.ticket.sz-trip.com/uploads/20250312/58d0fd32ea7521b0b1ea12bf5b593fe2.png', + img: 'https://static.ticket.sz-trip.com/uploads/20250529/f3b1ec60b5f069182faadf263ec9dfee.png', weburl: 'https://speed.web.yunyouyizhan.com/downloadApp/index.html#/', }, { title: "美图鉴赏", - img: 'https://static.ticket.sz-trip.com/uploads/20250312/58d0fd32ea7521b0b1ea12bf5b593fe2.png', + img: 'https://static.ticket.sz-trip.com/uploads/20250529/820de8c4353bde80379f46e474104c04.png', path: "/pages/pbService/appreciate/index", }, @@ -256,57 +258,57 @@ Page({ SQSM: [ { title: "常熟", - img: "https://static.ticket.sz-trip.com/uploads/20250312/3e4b8f20f9468cb4fd3f0c92d604db09.png", + img: "https://static.ticket.sz-trip.com/uploads/20250529/ed641bf31558381e8d1c372e5cbbd155.png", appId: 'wx4df5fd9a6a5ea123', pagePath: 'pages/index' }, { title: "太仓", - img: "https://static.ticket.sz-trip.com/uploads/20250312/24fc48715691714988d5e0cf78e5a657.png", + img: "https://static.ticket.sz-trip.com/uploads/20250529/f359551295197eff9c0966324659f037.png", appId: 'wx8853b0d93cbca75e', pagePath: 'pages/home/home' }, { title: "昆山", - img: "https://static.ticket.sz-trip.com/uploads/20250312/55b86da028a00326994ac8ebf10447b5.png", + img: "https://static.ticket.sz-trip.com/uploads/20250529/35f498dbb43e14cdf3c6bbdf83e613db.png", appId: 'wx8888a3fd0862b4c8', pagePath: 'pages/index/index' }, { title: "吴江", - img: "https://static.ticket.sz-trip.com/uploads/20250312/aa60aec108158b47e0210b8b33c72fe5.png", + img: "https://static.ticket.sz-trip.com/uploads/20250529/2288c75b3797363015bfe633ea9abc0e.png", appId: 'wx8eadea4ee2d42d4b', pagePath: 'pages/index/index' }, { title: "工业园区", - img: "https://static.ticket.sz-trip.com/uploads/20250312/4fdd5f3e9f63421d4394f2c3b3a0c7a4.png", + img: "https://static.ticket.sz-trip.com/uploads/20250529/9e947f0ef8addbe5c52b5bd4de205788.png", appId: 'wxd323e63a10aa6865', pagePath: 'pages/home/index' }, { title: "张家港", - img: "https://static.ticket.sz-trip.com/uploads/20250312/bb32450e448ec520c90241556a68c092.png", + img: "https://static.ticket.sz-trip.com/uploads/20250529/6162e0a86ec7e7b12e568fd5f81b5c9b.png", path: "/pages/list/six/index?area=zhangjiagang" }, { title: "吴中", - img: "https://static.ticket.sz-trip.com/uploads/20250312/cea52b2c0f3c18762d7feea2ba987e63.png", + img: "https://static.ticket.sz-trip.com/uploads/20250529/36fc77bf5d6879e6ce06ae349187c2ad.png", path: "/pages/list/six/index?area=wuzhong" }, { title: "相城", - img: "https://static.ticket.sz-trip.com/uploads/20250312/ef29b1cbdd9b33919891732750f72f2a.png", + img: "https://static.ticket.sz-trip.com/uploads/20250529/ec54fba906166c7512d26ca8a4fa5a9f.png", path: "/pages/list/six/index?area=xiangcheng" }, { title: "姑苏", - img: "https://static.ticket.sz-trip.com/uploads/20250312/8de375c2fc322cb44d7e0cdb84c97cfe.png", + img: "https://static.ticket.sz-trip.com/uploads/20250529/cbb939c4ddfa187489b59adcbe72f7a9.png", path: "/pages/list/six/index?area=gusu" }, { title: "高新", - img: "https://static.ticket.sz-trip.com/uploads/20250312/96a0c3631a0b3a9d5836943663a2f5c5.png", + img: "https://static.ticket.sz-trip.com/uploads/20250529/f2aa7328af4afaa9d1d4ecac1778300a.png", path: "/pages/list/six/index?area=gaoxin" }, @@ -345,17 +347,10 @@ Page({ ], + // 回购榜 + repurchaseList: [], + canGetrepurchase: true, - - saleProduct: null, - roadProduct: null, - - month: "", - months: ['JAN', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'oct', 'nov', 'dec'], - date: "", - list: [], - listMore: true, - urltopage: {}, // ---------------2025-5-26改版没用到的------------------ @@ -386,15 +381,6 @@ Page({ return console.log('options',options) - - - // 获取今天的日期 - let today = new Date(); - this.setData({ - month: (this.data.months[today.getMonth()]).toUpperCase(), - date: today.getDate() - }) - }, onReady: function() { @@ -403,7 +389,6 @@ Page({ this.getBanner() this.getXpthList() // 限时特惠 - this.getTwoProduct() this.getList() // 回购榜 // this.getWeather() // 2025-5-26首页改版不需要天气了 @@ -416,17 +401,26 @@ Page({ lat: res.latitude, lon: res.longitude }) - // this.getList() // 2025不需要经纬度了 }, fail: (err) => { - // this.getList() } }) this.getUrlToPage() - }, + }, + + showImg (img) { + if (!img) { return img } + if (img.indexOf('https://') != -1 || img.indexOf('http://') != -1) { + return img; + } else { + // return "https://test.api.cloud.sz-trip.com"+img + return "https://static.ticket.sz-trip.com" + img; + } + }, + // 获取系统信息 getHeight() { let systemInfo = wx.getSystemInfoSync(), @@ -443,12 +437,8 @@ Page({ }, //获取季节配置 getIndexSeason() { - let mainTypeList = this.data.mainTypeList - let hotelData = mainTypeList.find(v=>v.type == "hotel") - if (app.globalData.configJson&&app.globalData.configJson.indexSeason) { console.log('app', app.globalData.configJson) - hotelData.weburl = app.globalData.configJson.hotelUrl this.setData({ indexHot: app.globalData.configJson.indexHot, isTest: app.globalData.configJson.isTest, @@ -457,24 +447,32 @@ Page({ indexSeason: app.globalData.configJson.indexSeason, // 开发数据 // indexSeason: imageSource.testImgs.indexSeason, - mainTypeList: mainTypeList + bannerDataList: (app.globalData.configJson.nav_menu || []), + mainTypeList: (app.globalData.configJson.menu_button || []), }) } else { commonApi._post("adv/get_home_ui", {type_id: 3}).then(res => { - let obj = {} - res.data.content.forEach(item => { + let obj = {}; + (res.data.content||[]).forEach(item => { obj[item.id] = item.image }); app.globalData.configJson.indexSeason = obj app.globalData.loadIndexSeason = true - hotelData.weburl = app.globalData.configJson.hotelUrl + app.globalData.configJson.nav_menu = (res.data.nav_menu || []).map(v=>{ + return {...v, icon:this.showImg(v.icon)} + }) + app.globalData.configJson.menu_button = (res.data.menu_button || []).map(v=>{ + return {...v, icon:this.showImg(v.icon)} + }) + console.log('webData', app.globalData.configJson) this.setData({ indexHot: app.globalData.configJson.indexHot, isTest: app.globalData.configJson.isTest, // otherPlat: app.globalData.configJson.otherPlats, indexSeason: app.globalData.configJson.indexSeason, - mainTypeList: mainTypeList + bannerDataList: (app.globalData.configJson.nav_menu || []), + mainTypeList: (app.globalData.configJson.menu_button || []), }) }) } @@ -679,7 +677,25 @@ Page({ } }, - // 后台配置数据的跳转 + // 后台配置数据跳转 + mainNavClick:function (e) { + let item = e.currentTarget.dataset.item + console.log(item) + if (item.jump_type == "page") { + wx.navigateTo({ + url: item.page.mini, + }) + return + } + if (item.jump_type == "link") { + wx.navigateTo({ + url: "/pages/pbService/web/index?weburl=" + encodeURIComponent(item.url), + }) + return + } + }, + + // 其他平台配置数据的跳转 gotoOther: function(e) { let item = e.currentTarget.dataset.item; if (item.type == 'h5') { @@ -725,117 +741,42 @@ Page({ let value = e.currentTarget.dataset.value this.setData({xpthIndex:value}) }, - - - - getTwoProduct: function() { - // 获取首页限时特惠 - commonApi._post('act/fast_sale_now', { - offset: 0, - limit: 1 - }).then(res => { - if (res.data[0] && res.data[0].fast_sales_sku[0]) { - if (res.data[0].fast_sales_sku.length > 0) { - let price = res.data[0].fast_sales_sku[0].price - let data = res.data[0].fast_sales_sku[0] - for (let item of res.data[0].fast_sales_sku) { - if (price > item.price) price = item.price - } - data.price = price - this.setData({ - saleProduct: data - }) - } else { - this.setData({ - saleProduct: res.data[0].fast_sales_sku[0] - }) - } - } - }) - commonApi._post("product/get_product_by_tag", { - tag_id: 17, - offset: 0, - limit: 1, - sort: 'price', - order: 'asc' - }).then(res => { - if (res.data.list.length > 0) { - let price = res.data.list[0].price - for (let item of res.data.list) { - if (item.price > price) { - price = item.price - } - } - let data = res.data.list[0] - data.price = price - this.setData({ - roadProduct: data - }) - } else { - this.setData({ - roadProduct: [111] - }) - } - }) - }, - - productGotoDetail: function(e) { let item = e.currentTarget.dataset.item; util.gotoDetail(item) }, - // 热门推荐 去掉经纬度 接口排序方式变更(韩阳) + // 热门推荐 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) - }) - }) - }, + commonApi._post("product/get_product_by_tag_subject", { + tag_id: 85,offset: 0,limit: 5, + }).then(res=>{ + this.setData({ list: res.data.list || []}) + }) + }, + // 回购 + getRepurchaseList:function () { + commonApi._post("repurchase/repurchase/getRepurchaseList", {}).then(res=>{ + (res.data || []).forEach(v=>v.headimg = this.showImg(v.headimg)) + this.setData({ repurchaseList: res.data || []}) + }) + }, onReachBottom: function() { - if (this.data.list.length < 30) { - this.getList() - } + // if (this.data.list.length < 30) { + // this.getList() + // } + if (this.data.canGetrepurchase) { + this.data.canGetrepurchase = false + this.getRepurchaseList() + } }, gotoDetail: function(e) { let item = e.currentTarget.dataset.item; - util.pagePoint({ - event: 'recommend_click', - param: { - id: item.id, - type: item.type - } - }, 1) - if (item.type == 'travels') { - // 游记做特殊处理 其他都按照原来的来 - wx.navigateTo({ - url: '/pages/info/strategyInfo/index?id=' + item.s_id, - }) - } else { - util.gotoDetail(item.ext); - } + commonApi._post("repurchase/repurchase/recordClick", {product_id:item.product_id}) + item.id = item.type=='post'?item.product_id:item.scene_id + util.gotoDetail(item); + }, - - - - pagePoint: function(e, type) { util.pagePoint(e, type) diff --git a/subPackages/index/index.wxml b/subPackages/index/index.wxml index b106949..1ae631c 100644 --- a/subPackages/index/index.wxml +++ b/subPackages/index/index.wxml @@ -24,19 +24,19 @@ - + - + - - + + {{item.title}} @@ -48,9 +48,9 @@ - + - + @@ -77,8 +77,26 @@ - - + + + + + + + + {{item.title}} + + {{item.price/100}} + + + + + + + + + + @@ -108,7 +126,7 @@ - + @@ -204,64 +222,33 @@ - + - - - - - - {{date}} {{month}} - - - {{item.ext.display_tags[0]}} - {{item.title}} - - - + + - - {{item.ext.subtitle}} + {{item.title}} - - - - {{item.ext.like_number}} - - - - {{item.ext.view_number}} - - - - - - - - - - - {{item.title}} - - - {{item.ext.price/100}} + + + {{item.price/100}} + + 已售{{item.sales_number}} + - 查看更多 - 暂无更多推荐 + diff --git a/subPackages/index/index.wxss b/subPackages/index/index.wxss index ec704bd..b8441ef 100644 --- a/subPackages/index/index.wxss +++ b/subPackages/index/index.wxss @@ -104,12 +104,33 @@ page { /* margin: 0 auto; */ /* margin-bottom: 10rpx; */ } -.content { + +.content-box { margin: 0 25rpx; } .common-header-img{ height: 63.33rpx; } + +.small-swiper { + height: 154rpx; +} +.small-swiper image { + display: block; + width: 100%; + height: 154rpx; +} +.small-swiper-box { + margin: 50rpx 0; + width: 100%; + height: 154rpx; + border-radius: 20rpx; + /* border-radius: 77rpx; */ + overflow: hidden; + margin-top: 33rpx; + position: relative; +} + .sale-road-boxes { display: flex; justify-content: space-between; @@ -117,93 +138,194 @@ page { position: relative; align-items: flex-end; } -.sale-box { - flex-shrink: 0; - width: 337rpx; -} -.sale-title { - color: #999999; - font-size: 20rpx; - margin-bottom: 20rpx; -} -.sale-title text { - color: #000000; - font-size: 32rpx; - font-weight: 500; - margin-right: 8rpx; -} -.sale-product { - width: 337rpx; - position: relative; - height: 165rpx; - overflow: hidden; - border-radius: 8rpx; -} -.sale-product-bg { - width: 197rpx; - height: 165rpx; - position: absolute; - left: 0; - top: 0; - background: linear-gradient(90deg, #F78C56, #FB6044); + +/* 元旦修改新增样式 */ +.xpth { + border-radius: 20rpx; + padding: 22.67rpx 0 15.33rpx 0; + position: relative; + flex-direction: column; + align-items: flex-start; + } -} + +/* 热门推荐 限时特惠 */ +.xsth-title { + display: flex; + justify-content: space-between; + width: 100%; + align-items: flex-end; + margin-bottom: 20rpx; + } + .xpth-left { + width: 393rpx; + display: flex; + flex-direction: column; + justify-content: space-between; + } + .season-hot{ + display: flex; + } + .season-hot .season-item{ + width: 266rpx; + height: 332rpx; + margin-right: 14rpx; + flex-shrink: 0; + font-weight: bold; + font-size: 25rpx; + color: #000000; + position: relative; + background: white; + } + + .season-hot .season-item image{ + width: 100%; + height: 200rpx; + } + .season-hot .season-item .hot-cover-img{ + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } + + .xsth-more { + margin-top: 19.33rpx; + font-size: 27rpx; + font-family: HYZhongYuan; + font-weight: normal; + color: #FFE7C0; + } + .xsth-more image { + margin-left: 14.67rpx; + width: 12.67rpx; + height: 22.67rpx; + vertical-align: middle; + } + + /* 元旦修改新增样式 */ + .xpth-product { + width: 700rpx; + height: 373rpx; + border-radius: 27rpx; + padding: 25rpx 13rpx; + box-sizing: border-box; + display: flex; + justify-content: space-between; + } + /* 元旦修改新增样式 */ + .xpth-banner { + flex: 1; + margin-left: 15rpx; + height: 322rpx; + width: 100%; + border-radius: 0rpx; + overflow: hidden; + position: relative; + background-image: url("https://static.ticket.sz-trip.com/uploads/20250526/90645448ce9a82c91916543bc6c4935c.png"); + background-size: 100% 100%; + padding: 3rpx; + } + .xpth-banner-swiper{ + height: 100%; + border-radius: 20rpx; + overflow: hidden; + } + .xpth-banner image { + flex: 1; + height: 100%; + width: 100%; + border-radius: 20rpx; + } + .xpth-banner-dot-list{ + position: absolute; + right: 0; + bottom: 10rpx; + padding: 10rpx; + display: flex; + align-items: center; + justify-content: flex-end; + } + .xpth-banner-dot-list .xpth-dot{ + width: 9rpx; + height: 9rpx; + background: #FFFFFF; + border-radius: 50%; + opacity: 0.6; + margin: 0 4rpx; + } + .xpth-banner-dot-list .xpth-dot.active{ + opacity: 1; + } + /* 元旦修改新增样式 */ + .xpth-item { + border-radius: 20rpx; + height: 153rpx; + display: flex; + margin-bottom: 13rpx; + background-image: url("https://static.ticket.sz-trip.com/uploads/20250526/ed62e372f9c8874f9b50b40f70982202.png"); + background-size: 100% 100%; + padding: 1rpx; + } + .xpth-item:last-child { + margin-bottom: 0; + } + /* 元旦修改新增样式 */ + .xpth-item image { + /* width: 160rpx; + height: 160rpx; + background: #FFE7C0; + border-radius: 15rpx 0 0 15rpx; */ + width: 157rpx; + height: 154rpx; + /* background: #72707D; */ + border-radius: 20rpx; + /* margin-right: 15.33rpx; */ + flex-shrink: 0; + } + /* 元旦修改新增样式 */ + .xpth-item-content { + width: 100%; + display: flex; + flex-direction: column; + justify-content: space-around; + /* background: #FBECDE; */ + padding-left: 15.33rpx; + border-radius: 0 15rpx 15rpx 0; + } + /* 元旦修改新增样式 */ + .xpth-item-title { + width: 210rpx; + font-size: 27rpx; + font-family: PingFang SC; + font-weight: 500; + color: #333333; + margin-right: 18rpx; + /* height: 80rpx; */ + } + + /* 元旦修改新增样式 */ + .xpth-item-bottom { + display: flex; + justify-content: space-between; + align-items: center; + padding-right: 13.33rpx; + } + /* 元旦修改新增样式 */ + .xpth-item-price { + font-size: 31rpx; + font-family: PingFang SC; + font-weight: bold; + color: #ED1C19; + } + /* 元旦修改新增样式 */ + .xpth-item-price::before { + content: "¥"; + font-size: 23rpx; + } + -.sale-img { - position: absolute; - right: 0; - top: 0; - width: 173rpx; - height: 165rpx; -} -.sale-info { - position: absolute; - left: 20rpx; - top: 20rpx; - bottom: 20rpx; - width: 140rpx; -} -.sale-product-title { - font-size: 28rpx; - color: #fff; - font-weight: 500; - line-height: 36rpx; -} -.sale-price { - padding: 0 10rpx; - color: #F44747; - font-size: 25rpx; - line-height: 39rpx; - background: #FFFFFF; - border-radius: 5rpx; - margin-top: 15rpx; - display: inline-block; -} -.sale-tip-img { - position: absolute; - width: 200rpx; - height: 165rpx; - left: 0; - top: 0; -} -.small-swiper { - height: 154rpx; -} -.small-swiper image { - display: block; - width: 100%; - height: 154rpx; -} -.small-swiper-box { - margin: 50rpx 0; - width: 100%; - height: 154rpx; - border-radius: 20rpx; - /* border-radius: 77rpx; */ - overflow: hidden; - margin-top: 33rpx; - position: relative; -} @@ -272,7 +394,7 @@ page { margin-bottom: 40rpx; } .pbservice { - width: calc(190rpx * 7); + width: calc(186rpx * 7); display: flex; flex-wrap: wrap; } @@ -320,9 +442,9 @@ page { } .hot-item { background: white; - box-shadow: -1rpx 1rpx 16rpx 0px rgba(6, 0, 1, 0.1); + /* box-shadow: -1rpx 1rpx 16rpx 0px rgba(6, 0, 1, 0.1); */ border-radius: 15rpx; - margin-bottom: 35rpx; + margin-bottom: 15rpx; } .hot-item image:nth-child(1) { display: block; @@ -330,12 +452,12 @@ page { border-radius: 15rpx 15rpx 0 0; } .hot-item .hot-info { - padding: 20rpx 25rpx; + padding: 12rpx; } .hot-item .hot-title { - font-size: 32rpx; - color: #333; - font-weight: 500; + font-weight: bold; + font-size: 28rpx; + color: #000000; } .hot-info .tags { display: flex; @@ -359,8 +481,6 @@ page { .hot-price { color: #D62828; font-size: 24rpx; - margin-top:28rpx; - } .hot-price text:nth-child(2){ font-size: 33rpx; @@ -580,10 +700,7 @@ page { transition: all 1s; } -.fullsp{ - width: 100%; - height: 100%; -} + .time{ width: 150rpx; height: 60rpx; @@ -598,194 +715,7 @@ page { z-index: 1002; } -/* 元旦修改新增样式 */ -.xpth { - /* width: 697rpx; */ - /* height: 462rpx; */ - /* background: linear-gradient(-90deg, #FF9B6A, #D02E25); */ - border-radius: 20rpx; - padding: 22.67rpx 0 15.33rpx 0; - position: relative; - flex-direction: column; -} - -/* 元旦修改新增样式 */ -.xpth-left { - width: 393rpx; - display: flex; - flex-direction: column; - justify-content: space-between; -} -/* 元旦修改新增样式 */ -.xsth-title { - display: flex; - justify-content: space-between; - width: 100%; - align-items: flex-end; - margin-bottom: 20rpx; -} -/* 元旦修改新增样式 */ -.xsth-more { - margin-top: 19.33rpx; - font-size: 27rpx; - font-family: HYZhongYuan; - font-weight: normal; - color: #FFE7C0; -} -/* 元旦修改新增样式 */ -.xsth-more image { - margin-left: 14.67rpx; - width: 12.67rpx; - height: 22.67rpx; - vertical-align: middle; -} -/* 元旦修改新增样式 */ -.yanhua { - height: 104rpx; - width: 104rpx; - position: absolute; - right: 120rpx; - z-index: 999; -} -/* 元旦修改新增样式 */ -.xpth-product { - width: 700rpx; - height: 373rpx; - border-radius: 27rpx; - padding: 25rpx 13rpx; - box-sizing: border-box; - display: flex; - justify-content: space-between; -} -/* 元旦修改新增样式 */ -.xpth-banner { - flex: 1; - margin-left: 15rpx; - height: 322rpx; - width: 100%; - border-radius: 0rpx; - overflow: hidden; - position: relative; - background-image: url("https://static.ticket.sz-trip.com/uploads/20250526/90645448ce9a82c91916543bc6c4935c.png"); - background-size: 100% 100%; - padding: 3rpx; -} -.xpth-banner-swiper{ - height: 100%; - border-radius: 20rpx; - overflow: hidden; -} -.xpth-banner image { - flex: 1; - height: 100%; - width: 100%; - border-radius: 20rpx; -} -.xpth-banner-dot-list{ - position: absolute; - right: 0; - bottom: 10rpx; - padding: 10rpx; - display: flex; - align-items: center; - justify-content: flex-end; -} -.xpth-banner-dot-list .xpth-dot{ - width: 9rpx; - height: 9rpx; - background: #FFFFFF; - border-radius: 50%; - opacity: 0.6; - margin: 0 4rpx; -} -.xpth-banner-dot-list .xpth-dot.active{ - opacity: 1; -} -/* 元旦修改新增样式 */ -.xpth-item { - border-radius: 20rpx; - height: 153rpx; - display: flex; - margin-bottom: 13rpx; - background-image: url("https://static.ticket.sz-trip.com/uploads/20250526/ed62e372f9c8874f9b50b40f70982202.png"); - background-size: 100% 100%; - padding: 1rpx; -} -.xpth-item:last-child { - margin-bottom: 0; -} -/* 元旦修改新增样式 */ -.xpth-item image { - /* width: 160rpx; - height: 160rpx; - background: #FFE7C0; - border-radius: 15rpx 0 0 15rpx; */ - width: 157rpx; - height: 154rpx; - /* background: #72707D; */ - border-radius: 20rpx; - /* margin-right: 15.33rpx; */ - flex-shrink: 0; -} -/* 元旦修改新增样式 */ -.xpth-item-content { - width: 100%; - display: flex; - flex-direction: column; - justify-content: space-around; - /* background: #FBECDE; */ - padding-left: 15.33rpx; - border-radius: 0 15rpx 15rpx 0; -} -/* 元旦修改新增样式 */ -.xpth-item-title { - width: 210rpx; - font-size: 27rpx; - font-family: PingFang SC; - font-weight: 500; - color: #333333; - margin-right: 18rpx; - /* height: 80rpx; */ -} -.xpth-tag { - font-size: 24rpx; - font-family: PingFang SC; - font-weight: 500; - color: #E5A54A; -} -/* 元旦修改新增样式 */ -.xpth-item-bottom { - display: flex; - justify-content: space-between; - align-items: center; - padding-right: 13.33rpx; -} -/* 元旦修改新增样式 */ -.xpth-item-price { - font-size: 31rpx; - font-family: PingFang SC; - font-weight: bold; - color: #ED1C19; -} -/* 元旦修改新增样式 */ -.xpth-item-price::before { - content: "¥"; - font-size: 23rpx; -} -/* 元旦修改新增样式 */ -.xpth-item-buy { - width: 111rpx; - height: 36rpx; - background: linear-gradient(180deg, #FF9B6A, #E63100); - border-radius: 18rpx; - font-size: 21rpx; - font-family: PingFang SC; - font-weight: 500; - color: #FFE7C0; - text-align: center; - line-height: 36rpx; -} .ggfw-list { diff --git a/subPackages/password/overview/overview.js b/subPackages/password/overview/overview.js index 7b4667e..8ad8f50 100644 --- a/subPackages/password/overview/overview.js +++ b/subPackages/password/overview/overview.js @@ -67,7 +67,7 @@ Page({ onShow: function () { commonApi.user_post("pay_password/checkUsedPassword",{}).then(res=>{ this.setData({ - havePassword:res.data, + havePassword:res.data.data, }) if (res.data) { diff --git a/utils/https.js b/utils/https.js index 1a81b17..67031b4 100644 --- a/utils/https.js +++ b/utils/https.js @@ -1,8 +1,8 @@ var app = getApp(); import util from "../utils/util" // import userApi from "../utils/https/user.js"; -const baseUrl = "https://test.api.cloud.sz-trip.com/api/"; -// let baseUrl = "https://api.cloud.sz-trip.com/api/"; +// const baseUrl = "https://test.api.cloud.sz-trip.com/api/"; +let baseUrl = "https://api.cloud.sz-trip.com/api/"; const env = wx.getAccountInfoSync().miniProgram.envVersion if (env == 'develop1') { baseUrl = "https://test.api.cloud.sz-trip.com/api/" diff --git a/utils/util.js b/utils/util.js index 54e4387..f81ff7e 100644 --- a/utils/util.js +++ b/utils/util.js @@ -480,7 +480,7 @@ const pagePoint = function(data,type) { } const goMovieDetail= function(id, title, needReturn) { - let tempUrl = 'https://test.m.cloud.sz-trip.com'+`/MovieInfo?id=${id}` + let tempUrl = 'https://m.cloud.sz-trip.com'+`/MovieInfo?id=${id}` if (title) { tempUrl += +'&title='+item.title } @@ -495,7 +495,7 @@ const goMovieDetail= function(id, title, needReturn) { } const goMovieList= function(needReturn) { - let tempUrl = 'https://test.m.cloud.sz-trip.com/movies' + let tempUrl = 'https://m.cloud.sz-trip.com/movies' let url = '/pages/pbService/web/index?weburl=' + encodeURIComponent(tempUrl) if (needReturn) { return url