diff --git a/app.js b/app.js index ccb16dc..c7f1316 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.isTest155? true : false; + data.isTest = data.isTest156? true : false; data.indexSeason = null this.globalData.configJson = data }).then(() => { diff --git a/app.json b/app.json index e9fa437..2e942eb 100644 --- a/app.json +++ b/app.json @@ -248,7 +248,7 @@ "sitemapLocation": "sitemap.json", "tabBar": { "color": "#000000", - "selectedColor": "#000000", + "selectedColor": "#CE3B2B", "borderStyle": "white", "list": [ { diff --git a/images/ai.png b/images/ai.png index 6f71749..d915543 100644 Binary files a/images/ai.png and b/images/ai.png differ diff --git a/images/ai_seld.png b/images/ai_seld.png index aaefadc..6076a4b 100644 Binary files a/images/ai_seld.png and b/images/ai_seld.png differ diff --git a/images/index.png b/images/index.png index 08d6d28..c8d5d3e 100644 Binary files a/images/index.png and b/images/index.png differ diff --git a/images/index_seld.png b/images/index_seld.png index a039bcb..34a2ff8 100644 Binary files a/images/index_seld.png and b/images/index_seld.png differ diff --git a/images/map.png b/images/map.png index 5c7769e..9638f97 100755 Binary files a/images/map.png and b/images/map.png differ diff --git a/images/map_seld.png b/images/map_seld.png index 93c018b..16acbfe 100644 Binary files a/images/map_seld.png and b/images/map_seld.png differ diff --git a/images/user.png b/images/user.png index be15404..ecdcef5 100755 Binary files a/images/user.png and b/images/user.png differ diff --git a/images/user_seld.png b/images/user_seld.png index b422702..f536a35 100644 Binary files a/images/user_seld.png and b/images/user_seld.png differ diff --git a/pages/index/index.js b/pages/index/index.js index 23652be..933286c 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -542,7 +542,7 @@ Page({ }) } else { // 小程序是3 - commonApi._post("adv/get_home_ui", {type_id: 3}).then(res => { + commonApi._post("adv/get_home_ui", {type_id: 15}).then(res => { let obj = {}; (res.data.content||[]).forEach(item => { obj[item.id] = item.image diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 8feeb80..880e628 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -1,17 +1,17 @@ - + - + - {{weather.max_temp}}° - {{weather.weather}} + {{weather.max_temp}}° + {{weather.weather}} + src="https://static.ticket.sz-trip.com/jundaosuzhou/images/indexWinter2025/kefu.png" mode="aspectFill"> - + 搜索您想要的 @@ -63,8 +63,8 @@ --> - - + + {{aiStr}} @@ -72,6 +72,7 @@ + @@ -207,7 +208,7 @@ - + @@ -219,7 +220,7 @@ - + @@ -262,13 +263,9 @@ - - + + {{item.menu_name}} - + --> + + + + @@ -297,7 +298,7 @@ - + diff --git a/pages/index/index.wxss b/pages/index/index.wxss index 5209040..f51492c 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -5,10 +5,12 @@ min-height: 100vh; overflow-x: hidden; overflow-y: auto; - background-size: 100% 100%; + background-size: 100% auto; background-repeat: no-repeat; - padding-bottom: 220rpx; - /* background-color:#E8F9FA; */ + padding-bottom: 200rpx; + background-color:#F8E0C6; + background-image: url("https://static.ticket.sz-trip.com/jundaosuzhou/images/indexWinter2025/topGifs.gif"); + } .swiper{ @@ -49,13 +51,13 @@ width: 100%; height: 64rpx; border-radius: 36rpx; - color: #666666; + color: #000000; display: flex; align-items: center; font-size: 25rpx; padding: 2rpx 5rpx; box-sizing: border-box; - background: #FFEEAD; + background: rgba(253, 227, 208, 0.6); } .search-box .iconfont { font-size: 30rpx; @@ -99,13 +101,15 @@ display: flex; flex-wrap: wrap; border-radius: 20rpx; - background: #FFEEAD; + /* background: #FFEEAD; */ padding-top: 13rpx; + background-image: url("https://static.ticket.sz-trip.com/uploads/20251127/971ccf61fe5446130501fb26ac7e8ffc.png"); + background-size: 100% 100%; } .top-icon-item { margin-bottom: 37rpx; line-height: 37rpx; - font-size: 25rpx; + font-size: 24rpx; color: #000; text-align: center; flex-shrink: 0; @@ -139,8 +143,17 @@ .content-box { margin: 0 25rpx; } + +.content-margin{ + margin: 0 25rpx; + width: 100%; + box-sizing: border-box; + padding: 0 25rpx; +} + .common-header-img{ - width: 220.67rpx; + width: 100%; + position: relative; } .small-swiper { @@ -168,6 +181,8 @@ margin-top: 48rpx; position: relative; align-items: flex-end; + width: 750rpx; + left: -25rpx; } /* 元旦修改新增样式 */ @@ -503,15 +518,16 @@ .hot-item { background: white; /* box-shadow: -1rpx 1rpx 16rpx 0px rgba(6, 0, 1, 0.1); */ - border-radius: 15rpx; + border-radius: 20rpx; margin-bottom: 20rpx; height: 498rpx; + overflow: hidden; } .hot-item image:nth-child(1) { display: block; width: 100%; height: 327rpx; - border-radius: 15rpx 15rpx 0 0; + /* border-radius: 15rpx 15rpx 0 0; */ } .hot-item .hot-info { padding: 12rpx; @@ -520,6 +536,7 @@ flex-direction: column; justify-content: space-between; box-sizing: border-box; + background: #FFFCEE; } .hot-item .hot-title { font-weight: bold; @@ -894,7 +911,7 @@ /* 春节金刚区字体颜色样式更换 */ .top-icon-text { - color: #111111; + color: #FFFFFF; } .rmtj-right { diff --git a/pages/order/components/coupon/index.js b/pages/order/components/coupon/index.js index 883a94b..07c12e9 100644 --- a/pages/order/components/coupon/index.js +++ b/pages/order/components/coupon/index.js @@ -26,7 +26,11 @@ Component({ }) } } - } + }, + sourceFrom: { + type:String, + value:"" + }, }, /** @@ -63,9 +67,45 @@ Component({ }) this.triggerEvent('getNewCoupon',null); }else{ - commonApi.user_post('coupon/use_max_coupon_list',{ + let postList = app.globalData.postProduct || [] + let ticketList = app.globalData.list || [] + let signleProduct = app.globalData.product || null + + let listData = [] + if (this.properties.sourceFrom == 'cart') { + ticketList.forEach(v=>{ + listData.push({ + sku_id: v.sku.id, + price: v.sku.price, + sell_price: v.sku.price, + num: v.num, + use_date: v.time&&v.time.sale_date?v.time.sale_date:'' + }) + }) + } else { + if (signleProduct) { + listData.push({ + sku_id: signleProduct.sku.id, + price: signleProduct.sku.price, + sell_price: signleProduct.sku.price, + num: signleProduct.productNum, + use_date: signleProduct.date&&signleProduct.date.date?signleProduct.date.date:'' + }) + } + } + postList.forEach(v=>{ + listData.push({ + sku_id: v.sku.id, + price: v.sku.price, + sell_price: v.sku.price, + num: v.productNum, + }) + }) + + commonApi.user_post('coupon/use_max_coupon_listv2',{ money:this.data.money, - sku_ids:this.data.sku + sku_ids:this.data.sku, + cart_data: listData }).then(res=>{ if (app.globalData.couponInfo&&app.globalData.couponInfo.hasOwnProperty('SubCoupon')) { this.setData({ diff --git a/pages/order/components/coupon/index.wxml b/pages/order/components/coupon/index.wxml index 0db1d8a..d93a9e6 100644 --- a/pages/order/components/coupon/index.wxml +++ b/pages/order/components/coupon/index.wxml @@ -1,5 +1,5 @@ - + 优惠券 diff --git a/pages/order/coupon/index.js b/pages/order/coupon/index.js index 5a3d7b1..d52d3f4 100644 --- a/pages/order/coupon/index.js +++ b/pages/order/coupon/index.js @@ -8,8 +8,11 @@ Page({ * 页面的初始数据 */ data: { + noUseList: [], list:[], - moreFlag:true + moreFlag:true, + + productList: [], }, /** @@ -17,28 +20,75 @@ Page({ */ onLoad: function (options) { + console.log(app.globalData.postProduct,app.globalData.list,app.globalData.product) + let sourceFrom = options.sourceFrom + let postList = app.globalData.postProduct || [] + let ticketList = app.globalData.list || [] + let signleProduct = app.globalData.product || null + + let listData = [] + // 门票类 + if (sourceFrom == 'cart') { + ticketList.forEach(v=>{ + listData.push({ + sku_id: v.sku.id, + price: v.sku.price, + sell_price: v.sku.price, + num: v.num, + use_date: v.time&&v.time.sale_date?v.time.sale_date:'' + }) + }) + } else { + if (signleProduct) { + listData.push({ + sku_id: signleProduct.sku.id, + price: signleProduct.sku.price, + sell_price: signleProduct.sku.price, + num: signleProduct.productNum, + use_date: signleProduct.date&&signleProduct.date.date?signleProduct.date.date:'' + }) + } + } + // 特产类 + postList.forEach(v=>{ + listData.push({ + sku_id: v.sku.id, + price: v.sku.price, + sell_price: v.sku.price, + num: v.productNum, + }) + }) + + this.setData({ + productList: listData + }) this.getList(options) }, getList:function(options){ if(!this.data.moreFlag) return - commonApi.user_post('coupon/use_coupon_list',{ + commonApi.user_post('coupon/use_coupon_listv3',{ money:options.money, - sku_ids:options.sku + sku_ids:options.sku, + cart_data: this.data.productList }).then(res=>{ res.data.map(item=>{ item.selected = false; }) + + this.setData({ - list:res.data + list:res.data.filter(x=>x.can_use), + noUseList: res.data.filter(x=>!x.can_use), }) this.getMaxC(options) }) }, //获取最高优惠 getMaxC(options){ - commonApi.user_post('coupon/use_max_coupon_list',{ + commonApi.user_post('coupon/use_max_coupon_listv2',{ money:options.money, - sku_ids:options.sku + sku_ids:options.sku, + cart_data: this.data.productList }).then(res=>{ console.log(app.globalData.couponInfo); diff --git a/pages/order/coupon/index.wxml b/pages/order/coupon/index.wxml index 7bca12b..d164d7a 100644 --- a/pages/order/coupon/index.wxml +++ b/pages/order/coupon/index.wxml @@ -1,20 +1,55 @@ - - - {{item.activity.money/100}} - - {{item.activity.fold}} + +可使用红包 {{list.length}}张 + + + {{item.activity.money/100}} + + {{item.activity.fold}} + + + {{item.activity.name}} + {{item.end_time}}到期 + + + 不可用 + - - {{item.activity.name}} - {{item.end_time}}到期 + + 不可用原因 + {{item.reason}} - - + + +不可使用红包 {{noUseList.length}}张 + + + {{item.activity.money/100}} + + {{item.activity.fold}} + + + {{item.activity.name}} + {{item.end_time}}到期 + + + 不可用 + + + + + 不可用原因 + {{item.reason}} + + + + + + 确定 - + 暂无优惠券 \ No newline at end of file diff --git a/pages/order/coupon/index.wxss b/pages/order/coupon/index.wxss index a8cfad0..e76b95a 100644 --- a/pages/order/coupon/index.wxss +++ b/pages/order/coupon/index.wxss @@ -2,20 +2,27 @@ page { background: #f6f6f6; } +.coupon-item-box{ + width: 700rpx; + margin: 26rpx auto; + background: white; + border-radius: 7rpx; + box-sizing: border-box; + padding:0 26rpx; +} + .coupon-item { + width: 100%; display: flex; align-items: center; justify-content: space-between; - margin: 26rpx; - background: white; - border-radius: 7rpx; + position: relative; height: 136rpx; - padding-right: 27rpx; } .coupon-item .money { color: #D62828; font-size: 67rpx; - width: 187rpx; + width: 147rpx; text-align: center; font-weight: 500; flex-shrink: 0; @@ -68,4 +75,30 @@ page { font-size: 36rpx; font-weight: 500; text-align: center; +} + +.no-reason{ + width: 100%; + border-top: 1px dashed #e0e0e0; + padding: 20rpx 0; + color: #666; + font-size: 24rpx; + box-sizing: border-box; +} + +.cover-no-use{ + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; + width: 100%; + height: 100; + opacity: 0.5; + background: white; +} +.coupon-title{ + padding: 26rpx 26rpx 0; + width: 100%; + box-sizing: border-box; } \ No newline at end of file diff --git a/pages/order/orderList/index.wxml b/pages/order/orderList/index.wxml index 11b92c8..785d25f 100644 --- a/pages/order/orderList/index.wxml +++ b/pages/order/orderList/index.wxml @@ -83,7 +83,7 @@ 订单备注: --> - + diff --git a/pages/order/scene/index.js b/pages/order/scene/index.js index c9b069c..b460fb6 100644 --- a/pages/order/scene/index.js +++ b/pages/order/scene/index.js @@ -377,18 +377,19 @@ Page({ } console.log('singlePrice',this.data.singlePrice); }, - changeDate: function (e) { +changeDate: function (e) { console.log('打印',e); let sku_id = e.detail.sku_id; + app.globalData.product.date = e.detail this.setData({ showDate:true }) // debugger // this.showAllPrice() this.totalPrice(e.detail.price) - if (e.detail.price != this.data.singlePrice && this.data.coupon) { + if (this.data.coupon) { wx.showToast({ - title: '订单价格发生变化,请重新选择优惠券', + title: '订单时间发生变化,请重新选择优惠券', icon: 'none' }) this.setData({ @@ -396,7 +397,12 @@ Page({ singlePrice:e.detail.price }) if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1 && this.data.type!='museum') { - this.couponCom.setNullCoupon() + try { + this.couponCom = this.selectAllComponents("#coupon")[0]; + this.couponCom.setNullCoupon() + } catch (e) { + + } } app.globalData.couponInfo = null; } @@ -425,6 +431,7 @@ Page({ this.setData({ time: e.detail }) + }, changeAllowance: function () { this.setData({ diff --git a/pages/user/cartlist/list.js b/pages/user/cartlist/list.js index 85281cd..4317760 100644 --- a/pages/user/cartlist/list.js +++ b/pages/user/cartlist/list.js @@ -441,7 +441,9 @@ Page({ app.globalData.index = 0 app.globalData.productPrice = 0 app.globalData.ticketPrice = 0 + app.globalData.product = null this.data.productType = '' + console.log(app.globalData) }, /**