jiazhipeng 4 months ago
parent
commit
54bcd98d2a
  1. 85
      components/selectCalendarCom.vue
  2. 155
      pages/cart/cart.vue
  3. 2
      pages/index/index.vue
  4. 17
      subPackages/food/detail.vue
  5. 16
      subPackages/food/order.vue
  6. 252
      subPackages/order/cartOrder.vue
  7. 2
      subPackages/search/index.vue
  8. 40
      subPackages/search/result.vue
  9. 4
      subPackages/techan/detail.vue
  10. 17
      subPackages/ticket/detail.vue
  11. 9
      subPackages/ticket/order.vue

85
components/selectCalendarCom.vue

@ -0,0 +1,85 @@
<template>
<div>
<!--如果需要solt-->
<!--用法二当mode=23的模式下分别为酒店\往返的离开日期-->
<Calendar @click="tip" :is-show="true" :start-date="startDate" :end-date="endDate" mode="2" :title="'日期选择'"
@callback="getDate" :transition="'slide'" :theme-color="'#6A8A27'" />
<div class="btn" @click="determine()">
确定
</div>
</div>
</template>
<script>
import Calendar from 'mobile-calendar-simple'
export default {
name: 'selectCalendarCom',
props: ['startDate', 'endDate'],
data() {
return { //yyyy-mm-ddyyyy/mm/dd
betweenStart: '',
betweenEnd: '',
calendarShow: true,
date: 'init', //
}
},
methods: {
determine() {
if (this.date == 'delete') {
uni.showToast({
title: "请选择日期",
icon: "none"
})
} else if (this.date == 'init') {
//
let data = null
if (this.startDate && this.endDate) {
data = {
startDay: this.startDate,
endDay: this.endDate,
differDays: 1
}
}
uni.$emit('changeHotelDate',data)
} else {
let date = this.date
let data = {
startDay: date.startStr.dateStr,
endDay: date.endStr.dateStr,
differDays: date.dayCount
}
uni.$emit('changeHotelDate',data)
}
},
//
getDate(date) {
this.date = date
},
tip() {
console.log(1);
}
},
components: {
Calendar
}
}
</script>
<style scoped>
.btn {
width: 697rpx;
height: 73rpx;
background: #6A8A2D;
border-radius: 11rpx;
line-height: 73rpx;
font-weight: bold;
font-size: 32rpx;
color: #FFFFFF;
text-align: center;
position: fixed;
bottom: 30rpx;
z-index: 999;
text-align: center;
left: 50%;
transform: translate(-348.5rpx, 0);
}
</style>

155
pages/cart/cart.vue

@ -10,17 +10,25 @@
<uni-swipe-action>
<view class="cart-container" v-for="(item,i) in cartList" :key="i">
<view class="flex" style="align-items: center;padding: 20rpx;">
<view class="no-select" v-show="!item.is_seld" @click="changeShopSelect(item,true)"></view>
<image class="select-img" v-show="item.is_seld" @click="changeShopSelect(item,false)" src="https://static.ticket.sz-trip.com/uploads/20250617/c87afc2e461a01af35c71fb46ef0859d.png"></image>
<view class="no-select" v-show="!item.is_seld" @click.stop="changeShopSelect(item,true)"></view>
<image class="select-img" v-show="item.is_seld" @click.stop="changeShopSelect(item,false)" src="https://static.ticket.sz-trip.com/uploads/20250617/c87afc2e461a01af35c71fb46ef0859d.png"></image>
<view class="shop-name">{{item.shop_name}} <uni-icons type="right" size="12"></uni-icons></view>
<view style="font-size: 27rpx;color: #7C7C7C;" @click="delCartByShop(item,index)">删除</view>
<view style="font-size: 27rpx;color: #7C7C7C;" @click.stop="delCartByShop(item,index)">删除</view>
</view>
<uni-swipe-action-item v-for="(goods,goodsIndex) in item.goods" :key="goodsIndex" >
<view class="cart-item" :style="{'padding-bottom':goods.product.type=='hotel'?'60rpx':'20rpx'}">
<view class="cart-item" :style="{'padding-bottom':goods.product.type=='hotel'?'60rpx':'20rpx'}"
@click.stop="gotoDetailByType(goods.product)">
<view class="flex-between">
<view class="no-select" v-show="!goods.is_seld" @click="changeGoodsSelect(goods,true)"></view>
<image class="select-img" v-show="goods.is_seld" @click="changeGoodsSelect(goods,false)" src="https://static.ticket.sz-trip.com/uploads/20250617/c87afc2e461a01af35c71fb46ef0859d.png"></image>
<image class="cart-img" :src="goods.sku.headimg"></image>
<view class="no-select" v-show="!goods.is_seld" @click.stop="changeGoodsSelect(goods,true)"></view>
<image class="select-img" v-show="goods.is_seld" @click.stop="changeGoodsSelect(goods,false)" src="https://static.ticket.sz-trip.com/uploads/20250617/c87afc2e461a01af35c71fb46ef0859d.png"></image>
<view class="cart-img" style="position: relative;">
<image class="cart-img" :src="goods.sku.headimg" mode="aspectFill"></image>
<view class="use-type">
{{goods.sku.use_type==1?"自提":goods.sku.use_type==2?"核销":
goods.sku.use_type==3?"邮寄或自提":"邮寄"}}
</view>
</view>
</view>
<view class="cart-content">
@ -31,27 +39,29 @@
<view class="flex-between">
<view class="price">{{goods.sku.price/100}}</view>
<view class="flex-between">
<view :class="['ctrl',goods.num<=1?'disabled':'']" @click="addBuyNum(goods,-1)">-</view>
<view :class="['ctrl',goods.num<=1?'disabled':'']" @click.stop="addBuyNum(goods,-1)">-</view>
<view style="padding: 0 20rpx;">{{goods.num}}</view>
<view class="ctrl" @click="addBuyNum(goods,1)">+</view>
<view class="ctrl" @click.stop="addBuyNum(goods,1)">+</view>
</view>
</view>
</view>
<view class="time-select" v-if="goods.product.type=='hotel'">
<view v-if="goods.start_time&&goods.end_time"></view>
<view class="time-select" v-if="goods.product.type=='hotel'" @click.stop="changeSelectTime(goods)">
<view v-if="goods.startDay&&goods.endDay">
{{goods.startDay}} - {{goods.endDay}}
</view>
<view v-else>请选择时间</view>
>>
</view>
<view class="off-cover" v-if="goods.sku.flag == 'off'" @click="delItem(goods)">
<view class="off-cover" v-if="goods.sku.flag == 'off'" @click.stop="delItem(goods)">
<view>商品已失效</view>
<view class="off-btn">删除</view>
</view>
</view>
<template v-if="goods.sku.flag != 'off'" v-slot:right>
<view class="cart-item-del" @click="delItem(goods)">
<view class="cart-item-del" @click.stop="delItem(goods)">
<uni-icons type="trash" size="16" color="#fff"></uni-icons>
<view>删除</view>
</view>
@ -64,37 +74,62 @@
<view class="bottom-btn">
<view class="flex" style="align-items: center;">
<view @click="selectAllData(true)" class="no-select" v-show="!selectAll" style="margin-right: 12rpx;"></view>
<image @click="selectAllData(false)" class="select-img" v-show="selectAll" style="margin-right: 12rpx;" src="https://static.ticket.sz-trip.com/uploads/20250617/c87afc2e461a01af35c71fb46ef0859d.png"></image>
<view @click.stop="selectAllData(true)" class="no-select" v-show="!selectAll" style="margin-right: 12rpx;"></view>
<image @click.stop="selectAllData(false)" class="select-img" v-show="selectAll" style="margin-right: 12rpx;" src="https://static.ticket.sz-trip.com/uploads/20250617/c87afc2e461a01af35c71fb46ef0859d.png"></image>
<text>全选</text>
<text style="padding-left: 20rpx;">合计</text>
<text class="price">{{total()}}</text>
</view>
<view class="btn" @click="goOrder()">去下单</view>
<view class="btn" @click.stop="goOrder()">去下单</view>
</view>
</template>
<CustomTabBar :currentTab="3" />
<uni-popup ref="calendarPopup" type="bottom">
<view style="width: 100vw;height: 60vh;" v-if="selectDate.show">
<SelectCalendar :startDate="selectDate.startDay" :endDate="selectDate.endDay"></SelectCalendar>
</view>
</uni-popup>
</view>
</template>
<script>
import SelectCalendar from '@/components/selectCalendarCom.vue';
import CustomTabBar from '@/components/CustomTabBar.vue';
export default {
components: {
CustomTabBar
CustomTabBar,SelectCalendar
},
data() {
return {
cartList: [],
allPrice: 0,
selectAll: false,
selectHotel:null, //
selectDate: {
startDay:new Date().Format('yyyy-MM-dd'),
endDay:new Date((new Date()).getFullYear(), (new Date()).getMonth(), new Date().getDate()+1).Format('yyyy-MM-dd'),
show: false
},
}
},
onLoad() {
uni.$on('changeHotelDate', data => {
if(data) {
this.judgeHotelTime(data)
console.log(data)
} else {
this.$refs.calendarPopup.close();
}
})
},
onUnload() {
uni.$off('changeHotelDate')
},
onShow() {
this.getList()
@ -102,14 +137,14 @@
methods: {
getList () {
this.Post({},"/api/cart/get_list").then(res=>{
// let resData = (res.data ||[])
let resData = (res.data ||[]).map(v=>{
return {
id: 1,
name: '1',
goods: [v]
}
})
let resData = (res.data ||[])
// let resData = (res.data ||[]).map(v=>{
// return {
// id: 1,
// name: '1',
// goods: [v]
// }
// })
let shopSelectIds = []
let skuSelectIds = []
@ -266,6 +301,46 @@
},
//
changeSelectTime (item) {
this.selectDate.show = false
this.selectHotel = item
if (item.startDay && item.endDay) {
this.selectDate.startDay = item.startDay
this.selectDate.endDay = item.endDay
} else {
this.selectDate.startDay = new Date().Format('yyyy-MM-dd')
this.selectDate.endDay = new Date((new Date()).getFullYear(), (new Date()).getMonth(), new Date().getDate()+1).Format('yyyy-MM-dd')
}
setTimeout(()=>{
this.selectDate.show = true
this.$refs.calendarPopup.open();
},200)
},
judgeHotelTime (data) {
this.$set(this.selectHotel, "startDay", data.startDay)
this.$set(this.selectHotel, "endDay", data.endDay)
this.$refs.calendarPopup.close();
return
this.Post({
sku_id: this.selectHotel.sku_id,
start_date: data.startDay,
end_date: data.endDay
}, "/api/product/product_date_buy").then(res=>{
if (res && res.code && res.data) {
this.$set(this.selectHotel, "startDay", data.startDay)
this.$set(this.selectHotel, "endDay", data.endDay)
this.$refs.calendarPopup.close();
} else {
uni.showToast({
title:'当前时间不可预定',
icon:"none"
})
}
})
},
//
goOrder () {
@ -282,6 +357,7 @@
title: '请选择要购买的产品',
icon: 'none'
})
return
}
let ticketOrderList = [] //
@ -303,7 +379,7 @@
} else if (v.product.type == "post") {
techanOrderList.push({
pInfo: v.product,
sInfo: {...v.sku, buyNum: v.num, use_type: 3}
sInfo: {...v.sku, buyNum: v.num}
})
} else if (v.product.type == "hotel") {
hotelOrderList.push(v)
@ -321,7 +397,16 @@
},
total () {
return 0
let price = 0
this.cartList.forEach(v=>{
v.goods.forEach(x=>{
if (x.is_seld) {
price+= x.sku.price * x.num
}
})
})
return price /100
},
},
onReachBottom() {
@ -376,6 +461,20 @@
height: 173rpx;
border-radius: 13rpx;
flex-shrink: 0;
.use-type{
position: absolute;
left: 0;
bottom: 0;
width: 100%;
border-radius: 0rpx 0rpx 13rpx 13rpx;
height: 33rpx;
background: rgba(0,0,0,0.3);
font-weight: 400;
font-size: 24rpx;
color: #FFFFFF;
text-align: center;
line-height: 33rpx;
}
}
.cart-content{
flex: 1;

2
pages/index/index.vue

@ -5,7 +5,7 @@
<image :src="homeUi.dbtp" mode="heightFix" class="topImg"></image>
<!-- 搜索框 -->
<view class="search-box">
<view class="search-box" @click="gotoPath('/subPackages/search/index')">
<image src="https://static.ticket.sz-trip.com/shiweisuzhou/images/index/search.png" mode=""></image>
搜一搜您想要的
</view>

17
subPackages/food/detail.vue

@ -75,12 +75,14 @@
</view>
<!-- 底部按钮 -->
<view class="btn-box flex-center">
<button id="contact" open-type="contact" bindcontact="handleContact" session-from="sessionFrom">
<view class="icon-container">
<view class="icon-item">
<image src="https://static.ticket.sz-trip.com/uploads/20250611/627d67e48ac41903c40c31f1613f2444.png"></image>
<text>客服</text>
</view>
</view>
</button>
<view class="flex">
<view class="btn" @click="openPop(true)">加入购物车</view>
<view class="btn" @click="openPop(false)">立即购买</view>
@ -255,8 +257,8 @@
},
getCartList () {
this.Post({},'/api/cart/get_list').then(res=>{
this.cartNum = (res.data || []).length
this.Post({},'/api/cart/get_cart_count').then(res=>{
this.cartNum = res.data || 0
})
},
@ -830,5 +832,16 @@
}
button {
margin: 0;
padding: 0;
outline: none;
border-radius: 0;
background-color: transparent;
line-height: inherit;
}
button::after {
border: none;
}
</style>

16
subPackages/food/order.vue

@ -102,6 +102,7 @@
// this.getList();
this.$store.commit("choseCoupon", "");
this.initPageData()
this.getUserInfo()
},
onShow() {
@ -217,7 +218,9 @@
let goods = []
//
let canSubmit = true
this.orderList.filter(v=>v.sInfo.buyNum>0).forEach(item=>{
this.orderList.forEach(item=>{
item.phone = this.phone
let sku = item.sInfo
let param = {
type: item.pInfo.type,
@ -234,6 +237,7 @@
//
if (this.isShoppingCart) {
this.$store.commit("changeFoodOrderList", this.orderList);
uni.setStorageSync("foodOrderList", this.orderList)
this.goCartNextPage(3)
return
}
@ -278,8 +282,16 @@
})
}
})
}
},
//
getUserInfo () {
this.Post({},'/api/uservice/user/getMyInfo').then(res=>{
if (res.code==1 && res.data &&res.data.mobile) {
this.phone = res.data.mobile
}
})
},
}
}
</script>

252
subPackages/order/cartOrder.vue

@ -1,12 +1,14 @@
<template>
<view class="bg" >
<view class="goods-container">
<view class="goods-container" v-if="hotelOrderList.length>0">
<view class="goods-type-tag">酒店</view>
<view class="cal-price">
小计: <text class="price">{{priceParam.hotelPrice/100}}</text>
</view>
</view>
<view class="goods-container">
<view class="goods-container" v-if="postOrderList.length>0">
<view class="goods-type-tag">自提</view>
<view class="post-item" v-for="(item,i) in pickupOrderList" :key="i">
<view class="sku-item">
@ -21,7 +23,7 @@
<view class="flex-shrink-0">x{{item.sInfo.buyNum}}</view>
</view>
<view class="flex text-overflow" v-if="item.sInfo.display_tags">
<view class="tag" v-for="(tag,tagIndex) in info.display_tags.split(',')" :key="tagIndex">{{tag}}</view>
<view class="tag" v-for="(tag,tagIndex) in item.sInfo.display_tags.split(',')" :key="tagIndex">{{tag}}</view>
</view>
</view>
</view>
@ -33,11 +35,11 @@
</view>
</view>
<view class="cal-price">
小计: <text class="price">205</text>
小计: <text class="price">{{priceParam.pickupPrice/100}}</text>
</view>
</view>
<view class="goods-container">
<view class="goods-container" v-if="pickupOrderList.length>0">
<view class="goods-type-tag">邮寄</view>
<view class="post-item" v-for="(item,i) in postOrderList" :key="i">
<view class="sku-item">
@ -52,7 +54,7 @@
<view class="flex-shrink-0">x{{item.sInfo.buyNum}}</view>
</view>
<view class="flex text-overflow" v-if="item.sInfo.display_tags">
<view class="tag" v-for="(tag,tagIndex) in info.display_tags.split(',')" :key="tagIndex">{{tag}}</view>
<view class="tag" v-for="(tag,tagIndex) in item.sInfo.display_tags.split(',')" :key="tagIndex">{{tag}}</view>
</view>
</view>
</view>
@ -72,18 +74,48 @@
</view>
</view>
<view class="cal-price">
小计: <text class="price">205</text>
小计: <text class="price">{{priceParam.postPrice/100}}</text>
</view>
</view>
<view class="goods-container">
<view class="goods-container" v-if="playOrderList.length>0">
<view class="goods-type-tag">游玩</view>
<view class="ticket-item" v-for="(item,i) in playOrderList" :key="i">
<view class="sku-item">
<image class="sku-img" :src="item.sInfo.headimg"></image>
<view class="sku-content">
<view class="sku-title flex-between" style="align-items: flex-start;">
<view class="title flex-1 w-1rpx text-overflowRows">{{item.pInfo.title}}</view>
<view class="flex-shrink-0 price">{{item.sInfo.price/100}}</view>
</view>
<view class="flex-between subtitle" >
<view class=" flex-1 w-1rpx text-overflow">{{item.sInfo.sku_name}}</view>
<view class="flex-shrink-0">x{{item.sInfo.buyNum}}</view>
</view>
</view>
</view>
<view class="other-info">
<view class="flex" v-if="item.showDate">
<view class="flex-shrink-0">使用日期:</view>
<view style="padding-left: 20rpx;">
{{item.showDate.date}}
<text style="padding-left: 10rpx;" v-if="item.showDate.startTime && item.showDate.endTime">
{{item.showDate.startTime}} {{item.showDate.endTime}}
</text>
</view>
</view>
<view class="flex" v-if="item.phone">
<view class="flex-shrink-0">出行人信息:</view>
<view style="padding-left: 20rpx;">{{item.phone}}</view>
</view>
</view>
</view>
<view class="cal-price">
小计: <text class="price">{{priceParam.playPrice/100}}</text>
</view>
<view style="width: 1rpx;height: 200rpx;"></view>
</view>
<!-- 优惠券 -->
<view @click="goOrderCoupon" class="tickets-container flex-between">
@ -100,13 +132,13 @@
</view>
<view style="width: 1rpx;height: 200rpx;"></view>
<view class="btn-list">
<view class="price-box">
<view class="text">合计:</view>
<view class="price">{{ total() }}</view>
<view class="price">{{ calAllPrice() }}</view>
<!-- <view class="post-text" v-if="info.is_user_post==1&&post">含邮费:¥{{ post / 100 }}</view> -->
</view>
<view class="btn" @click="order()">提交订单</view>
@ -121,23 +153,30 @@ export default {
data() {
return {
orderList: [],
hotelOrderList: [], //
postOrderList: [], //
pickupOrderList: [], //
playOrderList: [], //
coupon: "",
allprice: 0,
allprice: 0, //
skuIds: [],
priceParam: {
hotelPrice: 0,
postPrice: 0,
pickupPrice: 0,
playPrice: 0,
},
};
},
onLoad(options) {
this.$store.commit("choseCoupon", "");
this.handleOrderGoods()
},
onShow() {
if (!this.isShoppingCart) {
this.coupon = this.$store.state.user.coupon
}
//
console.log(this.coupon, this.$store.state.user.coupon)
},
onReady () {
@ -148,39 +187,149 @@ export default {
//
// let techanOrderList = this.$store.state.user.techanOrderList;
let techanOrderList = JSON.parse(uni.getStorageSync("techanOrderList"))
console.log(techanOrderList)
// console.log(techanOrderList)
//
this.postOrderList = techanOrderList.filter(v=>v.is_user_post == 1)
//
this.pickupOrderList = techanOrderList.filter(v=>v.is_user_post == 2)
let ticketOrderList = this.$store.state.user.ticketOrderList;
let foodOrderList = this.$store.state.user.foodOrderList;
let hotelOrderList = this.$store.state.user.hotelOrderList;
//
// let ticketOrderList = this.$store.state.user.ticketOrderList;
// let foodOrderList = this.$store.state.user.foodOrderList;
let ticketOrderList = (uni.getStorageSync("ticketOrderList")) || []
let foodOrderList = (uni.getStorageSync("foodOrderList")) || []
console.log(ticketOrderList, foodOrderList)
this.playOrderList = ticketOrderList.concat(foodOrderList)
//
// let hotelOrderList = this.$store.state.user.hotelOrderList;
this.calPrice()
},
goOrderCoupon () {
let allPrice = 0
calPrice () {
let price1 = 0, price2 = 0, price3 =0 , price4 = 0;
let skuIds = []
this.orderList.forEach(v=>{
allPrice+= v.sInfo.price*v.sInfo.buyNum
if (v.sInfo.buyNum>0) {
this.postOrderList.forEach(v=>{
price1+= v.sInfo.price * v.sInfo.buyNum + v.post
skuIds.push(v.sInfo.id)
}
})
uni.navigateTo({
url: `/subPackages/order/orderCoupon?allprice=${allPrice}&sku_ids=${skuIds.join(',')}`
this.pickupOrderList.forEach(v=>{
price2+= v.sInfo.price * v.sInfo.buyNum
skuIds.push(v.sInfo.id)
})
this.playOrderList.forEach(v=>{
price3+= v.sInfo.price * v.sInfo.buyNum
skuIds.push(v.sInfo.id)
})
this.hotelOrderList.forEach(v=>{
// price4+= v.sInfo.price * v.sInfo.buyNum
})
this.skuIds = skuIds
this.priceParam = {
hotelPrice: price4,
postPrice: price1,
pickupPrice: price2,
playPrice: price3,
}
this.allprice = price1+price2+price3+price4
// this.calAllPrice()
this.getMaxCouponData()
},
calAllPrice () {
let price = 0
let allPrice = this.allprice
if (this.coupon) {
if (this.coupon.activity.fold == 0) {
if (this.coupon.activity.money>allPrice) {
price =0
}else{
price = allPrice - (this.coupon.activity.money)
}
} else{
price = allPrice - allPrice * (this.coupon.activity.fold*10/100)
}
} else {
price = allPrice
}
return price < 0 ? 0 : (price/100).toFixed(2)
},
//
total() {
goOrderCoupon () {
uni.navigateTo({
url: `/subPackages/order/orderCoupon?allprice=${this.allPrice}&sku_ids=${this.skuIds.join(',')}`
})
},
//
//
order() {
let goods = []
//
this.postOrderList.forEach(item=>{
let param = {
type: item.pInfo.type,
product_id: item.pInfo.id,
sku_id: item.sInfo.id,
product_num: item.sInfo.buyNum,
remark: item.remark,
use_type:1,
post: item.contacts.id
}
goods.push(param)
})
//
this.pickupOrderList.forEach(item=>{
let param = {
type: item.pInfo.type,
product_id: item.pInfo.id,
sku_id: item.sInfo.id,
product_num: item.sInfo.buyNum,
remark: item.remark,
use_type:2,
pickup_shop_id : item.pickupAddress.id,
pickup_shop_info : item.pickupAddress,
}
goods.push(param)
})
//
this.playOrderList.forEach(item=>{
let param = {
type: item.pInfo.type,
product_id: item.pInfo.id,
sku_id: item.sInfo.id,
product_num: item.sInfo.buyNum,
phone: item.phone,
remark: item.remark,
}
if (item.showDate) {
param.use_date= item.showDate.date ||'';
param.start_time = item.showDate.start_time || '';
param.end_time = item.showDate.end_time || '';
}
goods.push(param)
})
let data = {
product_list: goods,
coupon_id: this.coupon ? this.coupon.id : null,
}
this.Post({
method: 'POST',
data: JSON.stringify(data)
}, '/api/order/create').then(res => {
if (res.code == 1) {
console.log(res.data.order_id);
let order_id = res.data.order_id
this.$store.commit("choseCoupon", "");
this.$store.commit("changeTechanOrderList", []);
this.$store.commit("changeTicketOrderList", []);
this.$store.commit("changeFoodOrderList", []);
this.$store.commit("changeHotelOrderList", []);
}
})
},
@ -188,16 +337,7 @@ export default {
//
async getMaxCouponData () {
let allPrice =0
let skuIds = []
if (this.info && Array.isArray(this.info.goods)) {
this.info.goods.forEach(v=>{
allPrice += v.skuInfo.money*v.skuInfo.buyNum
if (v.skuInfo.buyNum>0) {
skuIds.push(v.skuInfo.id)
}
})
}
let param = {money:allPrice,sku_ids:skuIds.join(',')}
let param = {money:this.allprice,sku_ids:this.skuIds.join(',')}
let res = await this.getMaxCoupon(param)
if (res.id) {
this.coupon = res
@ -305,6 +445,24 @@ view {
}
}
.ticket-item{
margin-bottom: 26rpx;
border-bottom: 1px solid #D8D8D8;
.other-info{
font-weight: 500;
font-size: 28rpx;
color: #333333;
&>view{
padding: 20rpx 0 0;
&:last-child{
padding-bottom: 20rpx;
}
}
}
}
.cal-price{
font-weight: 500;
font-size: 28rpx;

2
subPackages/search/index.vue

@ -74,7 +74,7 @@
let url = '/subPackages/search/result'
if (this.type == 'techan') { url = '/subPackages/search/techanResult' }
uni.navigateTo({
url: url+`?keywords=${this.keywords}`
url: url+`?keywords=${name}`
})
this.pushHis(name)
},

40
subPackages/search/result.vue

@ -17,23 +17,24 @@
</view>
<div class="search-list">
<view @click="gotoDetailByType(item)" v-for="(item, key) in list" :key="item.id" class="search-item">
<image class="img" :src="showImg(item.ext.headimg)" mode=""></image>
<image class="img" :src="showImg(item.ext.headimg)" mode="aspectFill"></image>
<view class="content">
<view class="title text-overflowRows">
{{item.ext.title}}
</view>
<view class="flex-between">
<view class="distance text-overflow" >
<!-- <image v-if="item.ext.address||item.ext.scene_address" :src="showImg('/uploads/20241024/b7d33bf405526f09212ff3d9485e6d06.png')" class="icon-tip"></image> -->
<image v-if="item.ext.address||item.ext.scene_address" :src="showImg('https://static.ticket.sz-trip.com/uploads/20250619/0e16bffb0cd3648faa47879d0d532842.png')" class="icon-tip"></image>
<text v-if="item.ext.address">{{item.ext.address}}</text>
<text v-else-if="item.ext.scene_address">{{item.ext.scene_address}}</text>
</view>
<view class="bottom">
<view class="price ticlet-price" v-if="item.ext.price">
<view class="price ticlet-price">
{{item.ext.price/100}}
</view>
</view>
</view>
</view>
@ -55,11 +56,10 @@
return {
typeList: [
{name: '全部', type: ''},
{name: '门票', type: 'ticket'},
{name: '酒店', type: 'hotel'},
{name: '特产', type: 'post'},
{name: '游玩', type: 'ticket'},
{name: '民宿', type: 'hotel'},
{name: '线路', type: 'line'},
{name: '美食', type: 'food'},
{name: '农产品', type: 'post'},
],
typeIndex: 0,
showMore: true,
@ -170,8 +170,8 @@
}
.search-list {
padding: 0 30rpx;
padding-bottom: 30rpx;
padding: 26rpx 30rpx;
background: #F7F7F7;
}
.search-item {
@ -180,7 +180,7 @@
background: #FFFFFF;
border-radius: 13rpx;
display: flex;
margin: 26rpx 0rpx;
margin-bottom: 26rpx;
.img {
width: 200rpx;
height: 200rpx;
@ -206,7 +206,7 @@
.distance {
font-family: PingFang SC;
font-weight: 500;
font-size: 27rpx;
font-size: 24rpx;
color: #666666;
display: flex;
align-items: center;
@ -215,6 +215,8 @@
padding-right: 10rpx;
image{
width: 26rpx;
height: 26rpx;
flex-shrink: 0;
}
text{
@ -223,6 +225,8 @@
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 26rpx;
line-height: 26rpx;
}
}
@ -230,7 +234,7 @@
font-family: PingFang SC;
font-weight: 500;
font-size: 33.33rpx;
color: #D90F00;
color: #C3282E;
display: flex;
align-items: baseline;
}
@ -241,10 +245,7 @@
.ticlet-price::after{
content: '起';
font-size: 24rpx;
}
.food-price::after{
content: '/人';
font-size: 24rpx;
color: #999999;
}
}
@ -273,6 +274,7 @@
overflow-y: hidden;
padding: 0;
display: flex;
justify-content: space-between;
}
.common-types::-webkit-scrollbar {
@ -282,12 +284,12 @@
}
.common-type {
flex-shrink: 0;
margin: 0 26rpx;
line-height: 90rpx;
height: 90rpx;
position: relative;
color: #000000;
flex-shrink: 0;
}
.common-type.active {

4
subPackages/techan/detail.vue

@ -275,8 +275,8 @@
},
//
getCartList () {
this.Post({},'/api/cart/get_list').then(res=>{
this.cartNum = (res.data || []).length
this.Post({},'/api/cart/get_cart_count').then(res=>{
this.cartNum = res.data || 0
})
},

17
subPackages/ticket/detail.vue

@ -97,12 +97,14 @@
</view>
<!-- 底部按钮 -->
<view class="btn-box flex-center">
<button id="contact" open-type="contact" bindcontact="handleContact" session-from="sessionFrom">
<view class="icon-container">
<view class="icon-item">
<image src="https://static.ticket.sz-trip.com/uploads/20250611/627d67e48ac41903c40c31f1613f2444.png"></image>
<text>客服</text>
</view>
</view>
</button>
<view class="btn" @click="showCartPopup">加入购物车</view>
</view>
<!-- 购物车图标 -->
@ -515,8 +517,8 @@
//
getCartList () {
this.Post({},'/api/cart/get_list').then(res=>{
this.cartNum = (res.data || []).length
this.Post({},'/api/cart/get_cart_count').then(res=>{
this.cartNum = res.data || 0
})
},
@ -1294,5 +1296,16 @@
}
}
button {
margin: 0;
padding: 0;
outline: none;
border-radius: 0;
background-color: transparent;
line-height: inherit;
}
button::after {
border: none;
}
</style>

9
subPackages/ticket/order.vue

@ -324,9 +324,10 @@
if (this.singleOrder.seldDateIndex<0) {
this.singleOrder.seldDateIndex = this.singleOrder.allSeldDate.findIndex(item => item.stock > 0)
}
if (this.singleOrder.seldDateIndex) {
if (this.singleOrder.seldDateIndex<0) {
uni.showToast({
title: '暂无库存'
title: '暂无库存',
icon: 'none',
})
return
}
@ -424,7 +425,9 @@
}
//
this.orderList.filter(v=>v.sInfo.buyNum>0).forEach(item=>{
this.orderList.forEach(item=>{
item.phone = this.phone
let sku = item.sInfo
let use_date = item.allSeldDate[item.seldDateIndex].date
let start_time =(item.timesArr[item.seldTimeIndex]||{}).start_time

Loading…
Cancel
Save