diff --git a/app.js b/app.js index 7f6a07b..c569179 100644 --- a/app.js +++ b/app.js @@ -39,7 +39,7 @@ App({ // 获取前端配置文件 commonApi._post("pbservice/Other/getClientConfig", {unique_key: "wechatxcx"}).then(res => { let data = JSON.parse(res.data); - data.isTest = data.isTest167? true : false; + data.isTest = data.isTest168? true : false; data.indexSeason = null this.globalData.configJson = data }).then(() => { diff --git a/pages/component/kefu/index.wxss b/pages/component/kefu/index.wxss index 493b418..35768ba 100644 --- a/pages/component/kefu/index.wxss +++ b/pages/component/kefu/index.wxss @@ -9,6 +9,7 @@ display: flex; align-items: center; justify-content: center; + z-index: 1000; } .modal-mask { width: 100%; diff --git a/pages/index/index.js b/pages/index/index.js index c6ca3f9..6555e0e 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -47,9 +47,9 @@ Page({ smBannerIndex: 0, ztBannerIndex: 0, bannerDataListFake: [{ - 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/20260131/7d8082943bfbaca55676a371c9378bc5.png", + path: "/subPackages/foodListNew/index", }, ], // banner上的金刚区 diff --git a/pages/user/user.js b/pages/user/user.js index 48a5a40..4d9227b 100644 --- a/pages/user/user.js +++ b/pages/user/user.js @@ -1,140 +1,131 @@ -import common from "../../utils/https/common"; // pages/user/user.js +import common from "../../utils/https/common"; import userApi from "../../utils/https/user" import util from '../../utils/util' import commonApi from "../../utils/https/common" let app = getApp() -Page({ - /** - * 页面的初始数据 - */ +Page({ data: { height: 0, info: null, - list: [], //待付款列表 - orderList: [],//订单列表 - timeList: [],//倒计时 - timerOut: null,//定时器 - formatTime:[], - showModel:false + list: [], // 待付款列表 + orderList: [], // 订单列表 + timeList: [], // 倒计时 + timerOut: null, // 定时器 + formatTime: [], + showModel: false, + dfkTotal: 0, // 待付款总数 + isShowGroup: false // 是否显示团购 }, - /** - * 生命周期函数--监听页面加载 - */ onLoad: function (options) { let rect = wx.getMenuButtonBoundingClientRect(); this.setData({ height: rect.top + rect.height }) - }, - supplier:function(){ - let url = "https://m.cloud.sz-trip.com/ShoppingUnit" - app.globalData.weburl = "https://m.cloud.sz-trip.com/ShoppingUnit" - wx.navigateTo({ - url: '/pages/pbService/web/index?weburl='+ encodeURIComponent(url) - }) - }, - retail: function () { - common.user_post('commission/getCommissionUser', {}).then(res => { - if (res.code == 0) { - wx.navigateTo({ - url: 'retail/apply/index', - }) - } - else if (res.data.status == 0) { - wx.showToast({ - title: '正在审核中,请联系管理员', - icon: 'none' - }) - } - else if (res.data.status == 2) { - wx.showToast({ - title: '审核拒绝,请联系管理员', - icon: 'none' + + // 获取是否显示团购入口 + common.user_post('multimedia/detail', { id: 2579 }).then(res => { + if (res && res.data) { + this.setData({ + isShowGroup: res.data.company_name == 1 }) } - else if (res.data.status == 1) { - wx.navigateTo({ - url: 'retail/index', + }) + }, + + onShow: function () { + userApi.user_post("user/getMyInfo").then(res => { + if (res && res.data) { + this.setData({ + info: res.data }) + } else { + this.setData({ info: null }) } }) + util.pagePoint({ event: 'mine_view' }, 1) + this.getList() + app.globalData.isCartBuy = false }, - closeModel(){ + + pagePoint: function (e) { + let event = e.currentTarget ? e.currentTarget.dataset.event : e; + util.pagePoint({ event: event }) + }, + + // 人工客服 + phoneCall: function () { this.setData({ - showModel:false + showModel: true }) }, - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady: function () { + closeModel() { + this.setData({ + showModel: false + }) }, + + // 防止冒泡 + stopBubble: function() {}, - /** - * 生命周期函数--监听页面显示 - */ - onShow: function () { - userApi.user_post("user/getMyInfo").then(res => { - if (res && res.data) { - this.setData({ - info: res.data - }) - } else{ - this.setData({info: null}) - } + // 商户入驻 + supplier: function () { + let url = "https://m.cloud.sz-trip.com/ShoppingUnit" + app.globalData.weburl = url + wx.navigateTo({ + url: '/pages/pbService/web/index?weburl=' + encodeURIComponent(url) }) - util.pagePoint({ - event:'mine_view' - },1) - this.getList() - app.globalData.isCartBuy = false - }, - pagePoint: function(e){ - util.pagePoint(e) }, - phoneCall:function(){ - this.setData({ - showModel:true - }) - }, - getList:function(){ - commonApi.user_post("order/list",{ - state:'WAIT_PAYMENT', - offset:0, - limit:10, - keywords:'' - }).then(res=>{ - console.log(res); - - if (res && res.data && res.data.length>0){ - let arr = [] - let trr = [] - let yrr = [] - let reslist = res.data.list - this.setData({}) + + // 获取待付款列表 + getList: function () { + commonApi.user_post("order/list", { + state: 'WAIT_PAYMENT', + offset: 0, + limit: 10, + keywords: '' + }).then(res => { + if (res && res.data) { + let arr = [] + let trr = [] + let yrr = [] + let reslist = res.data.list || [] + + // 设置总数 + this.setData({ dfkTotal: res.data.total || 0 }) + + if (reslist.length > 0) { let nowDateTime = parseInt(new Date().getTime() / 1000) for (let i = 0; i < reslist.length; i++) { let del = nowDateTime - this.strtotime(reslist[i].create_time) if (del < reslist[i].auto_close_time) { - trr.push(reslist[i].auto_close_time - del) - yrr.push(this.formatSeconds(reslist[i].auto_close_time - del)) - arr.push(reslist[i].order_product_list[0]) + trr.push(reslist[i].auto_close_time - del) + yrr.push(this.formatSeconds(reslist[i].auto_close_time - del)) + arr.push(reslist[i].order_product_list[0]) } } this.setData({ list: arr, orderList: reslist, timeList: trr, - formatTime:yrr + formatTime: yrr }) this.timer(this.data.timeList) + } else { + this.setData({ + list: [], + orderList: [], + timeList: [], + formatTime: [] + }) } + } }) }, + strtotime(str) { var _arr = str.split(' '); var _day = _arr[0].split('-'); @@ -149,6 +140,7 @@ Page({ let _temp = new Date(_day[0], _day[1] - 1, _day[2], _time[0], _time[1], _time[2]); return _temp.getTime() / 1000; }, + formatSeconds(value) { let secondTime = parseInt(value); let minuteTime = 0; @@ -161,89 +153,76 @@ Page({ minuteTime = parseInt(minuteTime % 60); } } - // 补0 hourTime = hourTime < 10 ? "0" + hourTime : hourTime; minuteTime = minuteTime < 10 ? "0" + minuteTime : minuteTime; secondTime = secondTime < 10 ? "0" + secondTime : secondTime; - let res = hourTime + ":" + minuteTime + ":" + secondTime; - return res; + return hourTime + ":" + minuteTime + ":" + secondTime; }, + timer(arr) { + clearInterval(this.data.timerOut); let trr = [] let list = this.data.list this.data.timerOut = setInterval(() => { for (let i = 0; i < arr.length; i++) { arr[i]-- trr[i] = this.formatSeconds(arr[i]) - if (arr[i] == 0) { + if (arr[i] <= 0) { arr.splice(i, 1) list.splice(i, 1) trr.splice(i, 1) + i-- } } this.setData({ timeList: arr, - formatTime:trr, - list:list + formatTime: trr, + list: list }) + if (arr.length === 0) { + clearInterval(this.data.timerOut); + } }, 1000) }, - gotoDetail:function(e){ + + gotoDetail: function (e) { let item = e.currentTarget.dataset.item; - console.log(item); item = this.getChild(item) util.gotoOrder(item) }, - getChild(list){ - console.log(list); - let arr = {order_product_list:[]} + + getChild(list) { + let arr = { order_product_list: [] } for (let i = 0; i < list.order_product_list.length; i++) { - if (list.order_product_list[i].product_model=="ticket") { - arr.order_product_list.push(list.order_product_list[i]) - break - } + if (list.order_product_list[i].product_model == "ticket") { + arr.order_product_list.push(list.order_product_list[i]) + break + } } - if (arr.order_product_list.length>0) { - list.order_product_list = [] - list.order_product_list.push(arr.order_product_list[0]) - console.log(list); - return list - }else{ - return list + if (arr.order_product_list.length > 0) { + list.order_product_list = [] + list.order_product_list.push(arr.order_product_list[0]) + return list + } else { + return list } -}, - /** - * 生命周期函数--监听页面隐藏 - */ + }, + onHide: function () { let that = this clearInterval(that.data.timerOut); this.setData({ - list: [], //待付款列表 - orderList: [],//订单列表 - timeList: [],//倒计时 - formatTime:[] + list: [], + orderList: [], + timeList: [], + formatTime: [] }) }, - /** - * 生命周期函数--监听页面卸载 - */ - onUnload: function () { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ onPullDownRefresh: function () { - + this.onShow(); + wx.stopPullDownRefresh(); }, - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom: function () { - - } -}) \ No newline at end of file + onReachBottom: function () { } +}) diff --git a/pages/user/user.wxml b/pages/user/user.wxml index ff469f3..20efb5b 100644 --- a/pages/user/user.wxml +++ b/pages/user/user.wxml @@ -1,167 +1,199 @@ - - - - - - - {{info.nickname}} + + + + + + + + + - id:{{info.id}} - - - - - 我的订单 - 全部订单 + + + {{info.nickname}} + + + id:{{info.id}} + + - - - - 待付款 - - - - 待发货 - - - - 待出行 - - - - 待收货 - - - - 待评价 - - - - 退货/退款 - - - - - - - - - 等待付款 - 剩余时间: {{formatTime[index]}} - 去支付 - - - - - - - - 团购订单 - - - - 更多 - - - + + + + + + + 我的订单 + + 全部订单 + + + + + + + + 待付款 + {{dfkTotal}} + + + + + 待发货 + + + + + 待出行 + + + + + 待收货 + + + + + 退货/退款 + + - - - 购物车 - + + + + + + + + 等待付款 + 剩余时间: {{formatTime[index]}} + 去支付 + + + + + + - - - 中奖记录 + + + + 团购订单 + + + + 全部订单 + - - - - 人工客服 + + + + 常用功能 + + + + + + + + + + + + + - - 我的卡券 - - - 我的收藏 - - 商户入驻 - - - - 实名认证 - - - - - 出游人信息 - - - 收货地址 - - - - - 用户协议 - - - 投诉建议 - - - 隐私政策 - - - 个人信息收集清单 - - - 第三方共享信息清单 - - - 商户核销 - - + + + 更多服务 + + + + + + 出游人信息 + - - 主办方:苏州市文化广电和旅游局 - 承办方:苏州市文旅融合发展中心 - 备案号:苏ICP备19064944号-3X@君到苏州 - - - + + + 收货地址 + + + + + + 商户入驻 + - - 即将跳转人工客服 - 客服服务时间:09:00-12:00, - 13:00-18:00 + + + + 商户核销 + + + + + + 我的收藏 + + + + + + 投诉建议 + + + + + + 用户协议 + + + + + + 隐私政策 + + + + + + 个人信息\n收集清单 + + + + + + 第三方共享\n信息清单 + + + + + + 实名认证 + + + - - - + + + + 主办方:苏州市文化广电和旅游局 + 承办方:苏州市文旅融合发展中心 + 备案号:苏ICP备19064944号-3X@君到苏州 + - --> + + + + + - \ No newline at end of file diff --git a/pages/user/user.wxss b/pages/user/user.wxss index a9aec25..a0e4025 100644 --- a/pages/user/user.wxss +++ b/pages/user/user.wxss @@ -1,236 +1,327 @@ /* pages/user/user.wxss */ page { - background: #EDEDED; + background: #F7F7F7; + padding-bottom: 20rpx; } -.top-box { - padding: 0 30rpx; - display: flex; - align-items: center; - justify-content: space-between; - color: #fff; - height: 180rpx; + +.bg { + min-height: 100vh; +} + +/* 顶部背景区域 */ +.top-background { + width: 100%; + height: 480rpx; /* 对应 H5 的 6.5rem 左右 */ position: relative; + overflow: hidden; +} + +.bg-img { + width: 100%; + height: 100%; + position: absolute; + top: 0; + left: 0; + z-index: 1; +} + +/* 顶部遮罩 */ +.top-background::after { + content: ''; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: rgba(0,0,0,0.25); + z-index: 2; } -.topbg { + +/* 用户信息 */ +.user-top-new { position: absolute; + top: 150rpx; /* 根据导航栏高度调整 */ + left: 0; width: 100%; - z-index: -1; + z-index: 3; + padding: 0 40rpx; + box-sizing: border-box; + display: flex; + align-items: center; } -.top-box .headimg { - width: 100rpx; - height: 100rpx; + +.avatar-box { + width: 135rpx; + height: 135rpx; border-radius: 50%; + border: 4rpx solid rgba(255,255,255,0.9); + overflow: hidden; + margin-right: 30rpx; flex-shrink: 0; - margin-right: 20rpx; } -.userinfo { + +.headimg { + width: 100%; + height: 100%; +} + +.info-text { flex: 1; - font-size: 24rpx; + color: #fff; } -.username { + +.name-row { display: flex; align-items: center; - font-size: 36rpx; - font-weight: bold; margin-bottom: 15rpx; } -.username image { - width: 31rpx; - margin-left: 20rpx; + +.nickname { + font-size: 37rpx; + font-weight: bold; + margin-right: 15rpx; + max-width: 350rpx; + display: inline-block; +} + +.gender-icon { + width: 34rpx; + height: 34rpx; +} + +.id-row { + font-size: 28rpx; + opacity: 0.9; } -.user-box { - margin: 0 30rpx; - margin-bottom: 20rpx; - background: white; - border-radius: 20rpx; - padding: 0rpx 20rpx; - font-size: 29rpx; - color: #333; +.arrow-right { + padding: 15rpx; } -.user-box-top { + +/* 主容器 */ +.main-container { + position: relative; + margin-top: -80rpx; + z-index: 10; + padding: 20rpx 30rpx; + background: #f7f7f7; + border-radius: 33rpx 33rpx 0 0; +} + +/* 卡片通用样式 */ +.card-box { + background: #FFFFFF; + border-radius: 20rpx; + padding: 30rpx 20rpx; + margin-bottom: 20rpx; + box-shadow: 0 2rpx 10rpx rgba(0,0,0,0.02); +} + +/* 标题 */ +.title { display: flex; - align-items: center; justify-content: space-between; - padding: 30rpx 0; - height: 28rpx; + align-items: center; + margin-bottom: 30rpx; + padding: 0 10rpx; } -.all-text { + +.main-title { + font-size: 34rpx; + font-weight: bold; + color: #333; +} + +.sub-title { + font-size: 26rpx; + color: #999; display: flex; align-items: center; - font-size: 27rpx; - color: #888; } -.all-text .iconfont { - font-size: 24rpx; + +/* 订单部分 */ +.order-list { + display: flex; + justify-content: space-between; + margin-bottom: 30rpx; + padding: 0 10rpx; } -.user-order-types { + +.order-item { display: flex; + flex-direction: column; align-items: center; - flex-wrap: wrap; + position: relative; + width: 20%; } -.user-order-type { - width: 25%; + +.order-item image { + width: 80rpx; + height: 80rpx; + margin-bottom: 10rpx; +} + +.order-item text { + font-size: 26rpx; + color: #333; +} + +.total { + position: absolute; + min-width: 36rpx; + height: 36rpx; + line-height: 36rpx; text-align: center; - font-size: 27rpx; - margin-bottom: 30rpx; + background: linear-gradient(0deg, #FF8826, #FF2726); + border-radius: 18rpx; + font-size: 22rpx; + color: #FFFFFF; + right: 10rpx; + top: -10rpx; + padding: 0 6rpx; } -.user-order-type image { - width: 60rpx; - height: 60rpx; - display: block; - margin: 0 auto; - margin-bottom: 20rpx; + +/* 待付款轮播 */ +.pay-swiper-box { + width: 100%; + height: 200rpx; +} + +.swiper { + height: 100%; +} + +.dfkBox { + width: 100%; + height: 100%; + box-sizing: border-box; + background: #F9F9F9; + padding: 20rpx; + display: flex; + border-radius: 10rpx; +} + +.prod-img { + width: 220rpx; + height: 160rpx; + margin-right: 20rpx; + border-radius: 8rpx; + flex-shrink: 0; } -.user-box-line { - line-height: 120rpx; - border-bottom: 1rpx solid #d8d8d8; + +.contentBox { + flex: 1; + display: flex; + flex-direction: column; + justify-content: space-between; } -.user-box .user-box-line:last-child { - border-bottom: none; + +.status-text { + font-size: 32rpx; + color: #333; } +.time-text { + font-size: 26rpx; + color: #666; +} -.pay { - width: 648rpx; - height: 204rpx; - margin: 0 auto; - background: #F6F6F6; - padding: 18rpx; +.orderBtn { + width: 150rpx; + height: 52rpx; + background: #FB6E4D; + border-radius: 26rpx; + text-align: center; + line-height: 52rpx; + font-size: 26rpx; + color: #FFFFFF; + align-self: flex-end; +} + +/* 团购订单行 */ +.group-order-row { + display: flex; + justify-content: space-between; + align-items: center; + padding: 30rpx 30rpx; +} + +.group-order-row .left { + display: flex; + align-items: center; +} + +.group-icon { + width: 40rpx; + height: 40rpx; + margin-left: 15rpx; +} + +/* 常用功能 */ +.section-box { + padding: 20rpx 20rpx 0; box-sizing: border-box; + background: #FFFFFF; + border-radius: 20rpx; + margin-bottom: 20rpx; +} +.section-title { + font-size: 34rpx; + font-weight: bold; + color: #333; + margin: 10rpx 0 20rpx 10rpx; } -.s-box { +.common-func-grid { display: flex; + justify-content: space-between; + flex-wrap: wrap; + padding-bottom: 20rpx; +} + +.func-item { + width: 315rpx; + height: 110rpx; + margin-bottom: 20rpx; + background-size: 100% 100%; + background-repeat: no-repeat; +} + +/* 更多服务 */ +.more-service-grid { + display: flex; + flex-wrap: wrap; + padding-bottom: 20rpx; +} + +.service-item { + width: 25%; + display: flex; + flex-direction: column; align-items: center; + margin: 20rpx 0; +} + +.service-icon { + width: 50rpx; + height: 50rpx; + margin-bottom: 15rpx; +} + +.service-name { + font-size: 26rpx; + color: #333; + text-align: center; width: 100%; - height: 100%; - overflow: hidden; + line-height: 1.3; } -.btn { - width: 162rpx; - height: 56rpx; - background: #FB6E4D; - border-radius: 28rpx; - font-size: 32rpx; - font-family: PingFang SC; - font-weight: 400; - color: #FFFFFF; - line-height: 56rpx; +/* 底部文字 */ +.bottom-intro { + padding: 40rpx 0; text-align: center; - margin-top: 10rpx; - float:right; -} -.swiper{ - height: 100% !important; -} -.box-r{ - margin-left: 30rpx; - width: 388rpx; -} -.wpay{ - -font-size: 32rpx; -font-family: PingFang SC; -font-weight: 400; -color: #333333; - -} -.time{ -font-size: 28rpx; -font-family: PingFang SC; -font-weight: 400; -color: #666666; -margin-top: 10rpx; -} -.mask { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - background-color: rgba(0, 0, 0, 0.5); - z-index: 999; - } - .model{ - width: 561rpx; - min-height: 449rpx; - background: #FFFFFF; - border-radius: 13rpx; - position: absolute; - box-sizing: border-box; - - } - .model-title{ - text-align: center; - font-size: 34rpx; - font-family: PingFang SC; - font-weight: bold; - color: #333333; - margin-top: 32rpx; - box-sizing: border-box; - - } - .model-content{ - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - flex-wrap: wrap; - margin-top: 100rpx; - font-size: 34rpx; - font-family: PingFang SC; - font-weight: 500; - color: #333333; - } - .btn-list{ - height: 106rpx; - width: 100%; - position: absolute; - bottom: 0; - border-top: 1rpx solid rgba(216, 216, 216, .99); - padding: 10rpx; - box-sizing: border-box; - display: flex; - justify-content: space-between; - align-items: center; - - } - .model-btn{ - width: 50%; - text-align: center; - height: 86rpx; - line-height: 86rpx; - - font-size: 34rpx; - font-family: PingFang SC; - font-weight: 500; - color: #333333; - } - - button{ - margin:0; - padding:0; - border-radius:0; - border:none; - background-color:transparent; - } - - button::after{ - border: none; - } - - .bottom-intro{ - width: 100%; - padding: 75rpx; - font-family: PingFang-SC, PingFang-SC; - font-weight: 500; - font-size: 25rpx; - color: #999999; - line-height: 40rpx; - text-align: center; - box-sizing: border-box; - } - \ No newline at end of file + font-size: 24rpx; + color: #999; + line-height: 36rpx; +}