Browse Source

Merge branch 'master' into dev_video_fix

master
jiazhipeng 4 months ago
parent
commit
aad5c94aca
  1. 2
      app.js
  2. 2
      app.json
  3. BIN
      images/ai.png
  4. BIN
      images/ai_seld.png
  5. BIN
      images/index.png
  6. BIN
      images/index_seld.png
  7. BIN
      images/map.png
  8. BIN
      images/map_seld.png
  9. BIN
      images/user.png
  10. BIN
      images/user_seld.png
  11. 2
      pages/index/index.js
  12. 37
      pages/index/index.wxml
  13. 39
      pages/index/index.wxss
  14. 46
      pages/order/components/coupon/index.js
  15. 2
      pages/order/components/coupon/index.wxml
  16. 62
      pages/order/coupon/index.js
  17. 57
      pages/order/coupon/index.wxml
  18. 43
      pages/order/coupon/index.wxss
  19. 2
      pages/order/orderList/index.wxml
  20. 15
      pages/order/scene/index.js
  21. 2
      pages/user/cartlist/list.js

2
app.js

@ -38,7 +38,7 @@ App({
// 获取前端配置文件 // 获取前端配置文件
commonApi._post("pbservice/Other/getClientConfig", {unique_key: "wechatxcx"}).then(res => { commonApi._post("pbservice/Other/getClientConfig", {unique_key: "wechatxcx"}).then(res => {
let data = JSON.parse(res.data); let data = JSON.parse(res.data);
data.isTest = data.isTest155? true : false; data.isTest = data.isTest156? true : false;
data.indexSeason = null data.indexSeason = null
this.globalData.configJson = data this.globalData.configJson = data
}).then(() => { }).then(() => {

2
app.json

@ -248,7 +248,7 @@
"sitemapLocation": "sitemap.json", "sitemapLocation": "sitemap.json",
"tabBar": { "tabBar": {
"color": "#000000", "color": "#000000",
"selectedColor": "#000000", "selectedColor": "#CE3B2B",
"borderStyle": "white", "borderStyle": "white",
"list": [ "list": [
{ {

BIN
images/ai.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

BIN
images/ai_seld.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
images/index.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
images/index_seld.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

BIN
images/map.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

BIN
images/map_seld.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
images/user.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

BIN
images/user_seld.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

2
pages/index/index.js

@ -542,7 +542,7 @@ Page({
}) })
} else { } else {
// 小程序是3 // 小程序是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 = {}; let obj = {};
(res.data.content||[]).forEach(item => { (res.data.content||[]).forEach(item => {
obj[item.id] = item.image obj[item.id] = item.image

37
pages/index/index.wxml

@ -1,17 +1,17 @@
<!--index.wxml--> <!--index.wxml-->
<view class="bg" wx:if="{{!isTest}}" style="background-image: url({{indexSeason.background}});background: linear-gradient(165deg, #FF8623 213px, #FFE68A 213px); "> <view class="bg" wx:if="{{!isTest}}">
<!-- 顶部banner --> <!-- 顶部banner -->
<view style="position:relative;z-index: 1;padding-top: 200rpx;"> <view style="position:relative;z-index: 1;padding-top: 200rpx;">
<view class="top-box" style="top: {{systemStyle.padHeight}}px;right:{{systemStyle.right+10}}px"> <view class="top-box" style="top: {{systemStyle.padHeight}}px;right:{{systemStyle.right+10}}px">
<view wx:if="{{weather}}" style="display: flex;flex-shrink: 0;"> <view wx:if="{{weather}}" style="display: flex;flex-shrink: 0;color: white;">
<image lazy-load src="{{weather.icon2}}" style="margin-left:0" mode="aspectFill"></image> <image lazy-load src="{{weather.icon2}}" style="margin-left:0" mode="aspectFill"></image>
<view class="weather-num">{{weather.max_temp}}°</view> <view class="weather-num" style="color: white;">{{weather.max_temp}}°</view>
<view class="weather">{{weather.weather}}</view> <view class="weather" style="color: white;">{{weather.weather}}</view>
<image lazy-load style="margin: 0 30rpx;" bindtap="gotoPath" data-path="/pages/user/service/index" <image lazy-load style="margin: 0 30rpx;" bindtap="gotoPath" data-path="/pages/user/service/index"
src="https://static.ticket.sz-trip.com/uploads/20250714/1f3ac6a7144c6e6849edad89289061cc.png" mode="aspectFill"></image> src="https://static.ticket.sz-trip.com/jundaosuzhou/images/indexWinter2025/kefu.png" mode="aspectFill"></image>
</view> </view>
<navigator url="/pages/search/index" catchtap="pagePoint" data-event="search_click" class="search-box textOver"> <navigator url="/pages/search/index" catchtap="pagePoint" data-event="search_click" class="search-box textOver">
<image lazy-load src="https://static.ticket.sz-trip.com/uploads/20250916/7d6a5865ffc145ba762fb5a977e4bb37.png" class="iconfont" style="width: 26rpx;height: 26rpx;"></image> <image lazy-load src="https://static.ticket.sz-trip.com/uploads/20251127/c274a7019d42aaf969a6a51422951bb9.png" class="iconfont" style="width: 26rpx;height: 26rpx;"></image>
<view class="textOver" style="color:#000000">搜索您想要的</view> <view class="textOver" style="color:#000000">搜索您想要的</view>
</navigator> </navigator>
</view> </view>
@ -63,8 +63,8 @@
</view> --> </view> -->
</view> </view>
<view class="ai-box"> <view class="ai-box" style="padding: 0 25rpx;box-sizing: border-box;" wx:if="{{mainTypeList.length>0}}">
<image class="ai-fix" bind:tap="goAIUrl" mode="widthFix" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/aiPlay/banniyou.gif"></image> <image class="ai-fix" bind:tap="goAIUrl" mode="widthFix" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/indexWinter2025/banniyou.gif"></image>
<view class="ai-text">{{aiStr}}</view> <view class="ai-text">{{aiStr}}</view>
</view> </view>
@ -72,6 +72,7 @@
<view class="content-box"> <view class="content-box">
<!-- 苏城环游记 todo--> <!-- 苏城环游记 todo-->
<view class="small-swiper-box" wx:if="{{ztbanner.length>0 && func_data.tour_guide}}"> <view class="small-swiper-box" wx:if="{{ztbanner.length>0 && func_data.tour_guide}}">
<swiper class="small-swiper" autoplay="{{true}}" interval="{{3000}}" duration="{{300}}" <swiper class="small-swiper" autoplay="{{true}}" interval="{{3000}}" duration="{{300}}"
bindchange="changeBannerIndex" data-keyname="ztBannerIndex" circular> bindchange="changeBannerIndex" data-keyname="ztBannerIndex" circular>
@ -207,7 +208,7 @@
</navigator> </navigator>
</view> </view>
<view wx:if="{{func_data.service_public}}"> <view wx:if="{{func_data.service_public}}">
<view class="ggfw-list" style="width:100%;margin-top: -40rpx;position: relative;z-index: 1;"> <view class="ggfw-list" style="width:100%;margin-top: 16rpx;position: relative;z-index: 1;">
<view class="ggfw" wx:for="{{publicSerivce}}" wx:key="index" data-item="{{item}}" bindtap="mainNavClick"> <view class="ggfw" wx:for="{{publicSerivce}}" wx:key="index" data-item="{{item}}" bindtap="mainNavClick">
<image lazy-load src="{{item.icon}}" mode="aspectFill"></image> <image lazy-load src="{{item.icon}}" mode="aspectFill"></image>
</view> </view>
@ -219,7 +220,7 @@
<image lazy-load mode="widthFix" class="common-header-img" src="{{indexSeason.lyzs}}"></image> <image lazy-load mode="widthFix" class="common-header-img" src="{{indexSeason.lyzs}}"></image>
<!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[1]}}" mode="" style="width: 276rpx;height: 100rpx;"/> --> <!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[1]}}" mode="" style="width: 276rpx;height: 100rpx;"/> -->
</view> </view>
<view class="pic-list" style="margin-top:-40rpx;position: relative;z-index: 1;" wx:if="{{func_data.helper_travel}}"> <view class="pic-list" style="margin-top:5rpx;position: relative;z-index: 1;" wx:if="{{func_data.helper_travel}}">
<image lazy-load class="new-pic" wx:for="{{travelData}}" wx:key="index" data-item="{{item}}" bindtap="mainNavClick" <image lazy-load class="new-pic" wx:for="{{travelData}}" wx:key="index" data-item="{{item}}" bindtap="mainNavClick"
src="{{item.icon}}" mode="aspectFill"></image> src="{{item.icon}}" mode="aspectFill"></image>
</view> </view>
@ -262,13 +263,9 @@
<image lazy-load mode="widthFix" class="common-header-img" src="{{indexSeason.sqj}}"></image> <image lazy-load mode="widthFix" class="common-header-img" src="{{indexSeason.sqj}}"></image>
<!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[2]}}" mode="" /> --> <!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[2]}}" mode="" /> -->
</view> </view>
<view class="six-box-new" wx:if="{{func_data.scenery_ten}}" > <view class="six-box-new" style="margin-top: 18rpx;" wx:if="{{func_data.scenery_ten}}" >
<view class="big-image-box"> <!-- <view class="big-image-box">
<image lazy-load src="{{SQSM[cityIndex].icon}}" mode="aspectFill" bindtap="mainNavClick" data-item="{{SQSM[cityIndex]}}"></image> <image lazy-load src="{{SQSM[cityIndex].icon}}" mode="aspectFill" bindtap="mainNavClick" data-item="{{SQSM[cityIndex]}}"></image>
<!-- <view class="text-container">
<view style="font-weight: bold;font-size: 32rpx;">昆山市</view>
<view>小昆山势卧麒麟,独角撑空甓塔新</view>
</view> -->
</view> </view>
<scroll-view scroll-x enable-flex scroll-with-animation class="small-image-box" scroll-into-view="{{scrollItem}}"> <scroll-view scroll-x enable-flex scroll-with-animation class="small-image-box" scroll-into-view="{{scrollItem}}">
<view id="scrollItem-{{index}}" class="small-image-item {{cityIndex==index?'active':''}}" wx:for="{{SQSM}}" bind:tap="changeSimpleVal" <view id="scrollItem-{{index}}" class="small-image-item {{cityIndex==index?'active':''}}" wx:for="{{SQSM}}" bind:tap="changeSimpleVal"
@ -276,7 +273,11 @@
<image lazy-load src="{{item.icon}}" mode="aspectFill"></image> <image lazy-load src="{{item.icon}}" mode="aspectFill"></image>
<view class="text-box">{{item.menu_name}}</view> <view class="text-box">{{item.menu_name}}</view>
</view> </view>
</scroll-view> </scroll-view> -->
<view class="big-image-box" style="height: 333rpx;">
<image style="border-radius: 0;" lazy-load src="{{SQSM[cityIndex].icon}}" mode="aspectFill" bindtap="mainNavClick" data-item="{{SQSM[cityIndex]}}"></image>
</view>
</view> </view>
@ -297,7 +298,7 @@
<image lazy-load mode="widthFix" class="common-header-img" src="{{indexSeason.rmtj}}"></image> <image lazy-load mode="widthFix" class="common-header-img" src="{{indexSeason.rmtj}}"></image>
<!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[4]}}" mode="" style="width: 276rpx;height: 100rpx;"/> --> <!-- <image lazy-load class="rmtj-right" src="{{imageSourceList.CBTP[4]}}" mode="" style="width: 276rpx;height: 100rpx;"/> -->
</view> </view>
<view class="hot-list" style="margin-top: -40rpx;position: relative;z-index: 1;" wx:if="{{func_data.repurchase}}"> <view class="hot-list" style="margin-top: 7rpx;position: relative;z-index: 1;" wx:if="{{func_data.repurchase}}">
<view class="hot-list-item" wx:for="{{2}}" wx:for-index="number" wx:key="number"> <view class="hot-list-item" wx:for="{{2}}" wx:for-index="number" wx:key="number">
<view wx:for="{{repurchaseList}}" wx:if="{{index%2==number}}" bindtap="gotoDetail" data-item="{{item}}" data-source="回购榜" wx:key="id"> <view wx:for="{{repurchaseList}}" wx:if="{{index%2==number}}" bindtap="gotoDetail" data-item="{{item}}" data-source="回购榜" wx:key="id">
<view class="hot-item"> <view class="hot-item">

39
pages/index/index.wxss

@ -5,10 +5,12 @@
min-height: 100vh; min-height: 100vh;
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
background-size: 100% 100%; background-size: 100% auto;
background-repeat: no-repeat; background-repeat: no-repeat;
padding-bottom: 220rpx; padding-bottom: 200rpx;
/* background-color:#E8F9FA; */ background-color:#F8E0C6;
background-image: url("https://static.ticket.sz-trip.com/jundaosuzhou/images/indexWinter2025/topGifs.gif");
} }
.swiper{ .swiper{
@ -49,13 +51,13 @@
width: 100%; width: 100%;
height: 64rpx; height: 64rpx;
border-radius: 36rpx; border-radius: 36rpx;
color: #666666; color: #000000;
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 25rpx; font-size: 25rpx;
padding: 2rpx 5rpx; padding: 2rpx 5rpx;
box-sizing: border-box; box-sizing: border-box;
background: #FFEEAD; background: rgba(253, 227, 208, 0.6);
} }
.search-box .iconfont { .search-box .iconfont {
font-size: 30rpx; font-size: 30rpx;
@ -99,13 +101,15 @@
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
border-radius: 20rpx; border-radius: 20rpx;
background: #FFEEAD; /* background: #FFEEAD; */
padding-top: 13rpx; padding-top: 13rpx;
background-image: url("https://static.ticket.sz-trip.com/uploads/20251127/971ccf61fe5446130501fb26ac7e8ffc.png");
background-size: 100% 100%;
} }
.top-icon-item { .top-icon-item {
margin-bottom: 37rpx; margin-bottom: 37rpx;
line-height: 37rpx; line-height: 37rpx;
font-size: 25rpx; font-size: 24rpx;
color: #000; color: #000;
text-align: center; text-align: center;
flex-shrink: 0; flex-shrink: 0;
@ -139,8 +143,17 @@
.content-box { .content-box {
margin: 0 25rpx; margin: 0 25rpx;
} }
.content-margin{
margin: 0 25rpx;
width: 100%;
box-sizing: border-box;
padding: 0 25rpx;
}
.common-header-img{ .common-header-img{
width: 220.67rpx; width: 100%;
position: relative;
} }
.small-swiper { .small-swiper {
@ -168,6 +181,8 @@
margin-top: 48rpx; margin-top: 48rpx;
position: relative; position: relative;
align-items: flex-end; align-items: flex-end;
width: 750rpx;
left: -25rpx;
} }
/* 元旦修改新增样式 */ /* 元旦修改新增样式 */
@ -503,15 +518,16 @@
.hot-item { .hot-item {
background: white; 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; border-radius: 20rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
height: 498rpx; height: 498rpx;
overflow: hidden;
} }
.hot-item image:nth-child(1) { .hot-item image:nth-child(1) {
display: block; display: block;
width: 100%; width: 100%;
height: 327rpx; height: 327rpx;
border-radius: 15rpx 15rpx 0 0; /* border-radius: 15rpx 15rpx 0 0; */
} }
.hot-item .hot-info { .hot-item .hot-info {
padding: 12rpx; padding: 12rpx;
@ -520,6 +536,7 @@
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
box-sizing: border-box; box-sizing: border-box;
background: #FFFCEE;
} }
.hot-item .hot-title { .hot-item .hot-title {
font-weight: bold; font-weight: bold;
@ -894,7 +911,7 @@
/* 春节金刚区字体颜色样式更换 */ /* 春节金刚区字体颜色样式更换 */
.top-icon-text { .top-icon-text {
color: #111111; color: #FFFFFF;
} }
.rmtj-right { .rmtj-right {

46
pages/order/components/coupon/index.js

@ -26,7 +26,11 @@ Component({
}) })
} }
} }
} },
sourceFrom: {
type:String,
value:""
},
}, },
/** /**
@ -63,9 +67,45 @@ Component({
}) })
this.triggerEvent('getNewCoupon',null); this.triggerEvent('getNewCoupon',null);
}else{ }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, money:this.data.money,
sku_ids:this.data.sku sku_ids:this.data.sku,
cart_data: listData
}).then(res=>{ }).then(res=>{
if (app.globalData.couponInfo&&app.globalData.couponInfo.hasOwnProperty('SubCoupon')) { if (app.globalData.couponInfo&&app.globalData.couponInfo.hasOwnProperty('SubCoupon')) {
this.setData({ this.setData({

2
pages/order/components/coupon/index.wxml

@ -1,5 +1,5 @@
<!--pages/order/components/coupon/index.wxml--> <!--pages/order/components/coupon/index.wxml-->
<navigator url="/pages/order/coupon/index?money={{money}}&sku={{sku}}" class="box"> <navigator url="/pages/order/coupon/index?money={{money}}&sku={{sku}}&sourceFrom={{sourceFrom}}" class="box">
<view class="box-title"> <view class="box-title">
<view style="flex:1">优惠券</view> <view style="flex:1">优惠券</view>
<view wx:if="{{coupon}}"> <view wx:if="{{coupon}}">

62
pages/order/coupon/index.js

@ -8,8 +8,11 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
noUseList: [],
list:[], list:[],
moreFlag:true moreFlag:true,
productList: [],
}, },
/** /**
@ -17,28 +20,75 @@ Page({
*/ */
onLoad: function (options) { 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) this.getList(options)
}, },
getList:function(options){ getList:function(options){
if(!this.data.moreFlag) return if(!this.data.moreFlag) return
commonApi.user_post('coupon/use_coupon_list',{ commonApi.user_post('coupon/use_coupon_listv3',{
money:options.money, money:options.money,
sku_ids:options.sku sku_ids:options.sku,
cart_data: this.data.productList
}).then(res=>{ }).then(res=>{
res.data.map(item=>{ res.data.map(item=>{
item.selected = false; item.selected = false;
}) })
this.setData({ this.setData({
list:res.data list:res.data.filter(x=>x.can_use),
noUseList: res.data.filter(x=>!x.can_use),
}) })
this.getMaxC(options) this.getMaxC(options)
}) })
}, },
//获取最高优惠 //获取最高优惠
getMaxC(options){ getMaxC(options){
commonApi.user_post('coupon/use_max_coupon_list',{ commonApi.user_post('coupon/use_max_coupon_listv2',{
money:options.money, money:options.money,
sku_ids:options.sku sku_ids:options.sku,
cart_data: this.data.productList
}).then(res=>{ }).then(res=>{
console.log(app.globalData.couponInfo); console.log(app.globalData.couponInfo);

57
pages/order/coupon/index.wxml

@ -1,20 +1,55 @@
<!--pages/order/coupon/index.wxml--> <!--pages/order/coupon/index.wxml-->
<title title="优惠券"></title> <title title="优惠券"></title>
<view wx:if="{{list.length>0}}"> <view >
<view class="coupon-item" wx:for="{{list}}"> <view wx:if="{{list.length>0}}" class="coupon-title">可使用红包 <text class="couon-date">{{list.length}}张</text></view>
<view class="money" wx:if="{{item.activity.discount_type == 'pricebreak'}}">{{item.activity.money/100}}</view> <view class="coupon-item-box" wx:for="{{list}}">
<view class="money1" wx:else> <view class="coupon-item" >
{{item.activity.fold}} <view class="money" wx:if="{{item.activity.discount_type == 'pricebreak'}}">{{item.activity.money/100}}</view>
<view class="money1" wx:else>
{{item.activity.fold}}
</view>
<view class="coupon-info">
<view>{{item.activity.name}}</view>
<view class="couon-date" wx:if="{{item.end_time}}">{{item.end_time}}到期</view>
</view>
<view wx:if="{{item.can_use}}" class="iconfont icon-{{item.selected?'gou':'quan'}}" bindtap="selectIt" data-index="{{index}}"></view>
<view class="couon-date" wx:else>不可用</view>
</view> </view>
<view class="coupon-info"> <view class="no-reason" wx:if="{{!item.can_use}}">
<view>{{item.activity.name}}</view> <view style="color: #D62828;margin-bottom: 8rpx;">不可用原因</view>
<view class="couon-date" wx:if="{{item.end_time}}">{{item.end_time}}到期</view> <view>{{item.reason}}</view>
</view> </view>
<view class="iconfont icon-{{item.selected?'gou':'quan'}}" bindtap="selectIt" data-index="{{index}}"></view> </view>
</view>
<view wx:if="{{noUseList.length>0}}" class="coupon-title">不可使用红包 <text class="couon-date">{{noUseList.length}}张</text></view>
<view class="coupon-item-box" wx:for="{{noUseList}}">
<view class="coupon-item" >
<view class="money" wx:if="{{item.activity.discount_type == 'pricebreak'}}">{{item.activity.money/100}}</view>
<view class="money1" wx:else>
{{item.activity.fold}}
</view>
<view class="coupon-info">
<view>{{item.activity.name}}</view>
<view class="couon-date" wx:if="{{item.end_time}}">{{item.end_time}}到期</view>
</view>
<view wx:if="{{item.can_use}}" class="iconfont icon-{{item.selected?'gou':'quan'}}" bindtap="selectIt" data-index="{{index}}"></view>
<view class="couon-date" wx:else>不可用</view>
<view class="cover-no-use" wx:if="{{!item.can_use}}"></view>
</view>
<view class="no-reason" wx:if="{{!item.can_use}}">
<view style="color: #D62828;margin-bottom: 8rpx;">不可用原因</view>
<view>{{item.reason}}</view>
</view>
</view>
<view class="btn" bindtap="submit">确定</view> <view class="btn" bindtap="submit">确定</view>
</view> </view>
<view class="common-empty" wx:if="{{list.length==0}}" style="z-index:-1;top:0"> <view class="common-empty" wx:if="{{list.length==0&&noUseList.length==0}}" style="z-index:-1;top:0">
<image lazy-load mode="widthFix" src="https://static.ticket.sz-trip.com/xcxImages/other/nodata.png"></image> <image lazy-load mode="widthFix" src="https://static.ticket.sz-trip.com/xcxImages/other/nodata.png"></image>
<view>暂无优惠券</view> <view>暂无优惠券</view>
</view> </view>

43
pages/order/coupon/index.wxss

@ -2,20 +2,27 @@
page { page {
background: #f6f6f6; background: #f6f6f6;
} }
.coupon-item-box{
width: 700rpx;
margin: 26rpx auto;
background: white;
border-radius: 7rpx;
box-sizing: border-box;
padding:0 26rpx;
}
.coupon-item { .coupon-item {
width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin: 26rpx; position: relative;
background: white;
border-radius: 7rpx;
height: 136rpx; height: 136rpx;
padding-right: 27rpx;
} }
.coupon-item .money { .coupon-item .money {
color: #D62828; color: #D62828;
font-size: 67rpx; font-size: 67rpx;
width: 187rpx; width: 147rpx;
text-align: center; text-align: center;
font-weight: 500; font-weight: 500;
flex-shrink: 0; flex-shrink: 0;
@ -69,3 +76,29 @@ page {
font-weight: 500; font-weight: 500;
text-align: center; 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;
}

2
pages/order/orderList/index.wxml

@ -83,7 +83,7 @@
<view style="flex-shrink:0">订单备注:</view> <view style="flex-shrink:0">订单备注:</view>
<input type="text" bindinput="inputRemark" data-index="{{index}}" placeholder="选填"></input> <input type="text" bindinput="inputRemark" data-index="{{index}}" placeholder="选填"></input>
</view> --> </view> -->
<coupon bind:getNewCoupon = 'getNewCoupon' id="coupon" wx:if="{{showCoupon && !kjId && !gp_id}}" money="{{showPrice + postFee}}" sku="{{sku_id}}"></coupon> <coupon bind:getNewCoupon = 'getNewCoupon' id="coupon" wx:if="{{showCoupon && !kjId && !gp_id}}" money="{{showPrice + postFee}}" sku="{{sku_id}}" sourceFrom="cart"></coupon>
<view class="explain-box" wx:if="{{explainDataList.length>0}}"> <view class="explain-box" wx:if="{{explainDataList.length>0}}">

15
pages/order/scene/index.js

@ -377,18 +377,19 @@ Page({
} }
console.log('singlePrice',this.data.singlePrice); console.log('singlePrice',this.data.singlePrice);
}, },
changeDate: function (e) { changeDate: function (e) {
console.log('打印',e); console.log('打印',e);
let sku_id = e.detail.sku_id; let sku_id = e.detail.sku_id;
app.globalData.product.date = e.detail
this.setData({ this.setData({
showDate:true showDate:true
}) })
// debugger // debugger
// this.showAllPrice() // this.showAllPrice()
this.totalPrice(e.detail.price) this.totalPrice(e.detail.price)
if (e.detail.price != this.data.singlePrice && this.data.coupon) { if (this.data.coupon) {
wx.showToast({ wx.showToast({
title: '订单价格发生变化,请重新选择优惠券', title: '订单时间发生变化,请重新选择优惠券',
icon: 'none' icon: 'none'
}) })
this.setData({ this.setData({
@ -396,7 +397,12 @@ Page({
singlePrice:e.detail.price singlePrice:e.detail.price
}) })
if (!this.data.kjId && !this.data.gp_id && this.data.product.isGroup != 1 && this.data.type!='museum') { 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; app.globalData.couponInfo = null;
} }
@ -425,6 +431,7 @@ Page({
this.setData({ this.setData({
time: e.detail time: e.detail
}) })
}, },
changeAllowance: function () { changeAllowance: function () {
this.setData({ this.setData({

2
pages/user/cartlist/list.js

@ -441,7 +441,9 @@ Page({
app.globalData.index = 0 app.globalData.index = 0
app.globalData.productPrice = 0 app.globalData.productPrice = 0
app.globalData.ticketPrice = 0 app.globalData.ticketPrice = 0
app.globalData.product = null
this.data.productType = '' this.data.productType = ''
console.log(app.globalData)
}, },
/** /**

Loading…
Cancel
Save