Browse Source

Merge branch 'master' of http://47.114.134.244:3000/chenkainan/yandu_WeChat

# Conflicts:
#	pages/index/index.vue
master
chenkainan 1 year ago
parent
commit
5fb17300c6
  1. 5
      pages/index/index.vue
  2. 4
      pages/mall/mall.vue
  3. 3
      subPackages/food/foodList.vue
  4. 8
      subPackages/ticketBooking/detail.vue
  5. 39
      subPackages/ticketBooking/order.vue

5
pages/index/index.vue

@ -105,7 +105,7 @@
<view v-for="(item,index) in foodList" :key="index" class="food-item" :style="{backgroundImage: 'url('+showImg(item.goods.image)+')',backgroundSize: 'cover'}" @click="gotoFood(item.goods)"> <view v-for="(item,index) in foodList" :key="index" class="food-item" :style="{backgroundImage: 'url('+showImg(item.goods.image)+')',backgroundSize: 'cover'}" @click="gotoFood(item.goods)">
<view class="recommend" v-if="item.goods.image_tag">{{item.goods.image_tag}}</view> <view class="recommend" v-if="item.goods.image_tag">{{item.goods.image_tag}}</view>
<view class="food-content"> <view class="food-content">
<view class="food-price">{{item.goods.low_money / 100}}</view> <view class="food-price">{{item.goods.money / 100}}</view>
<view class="text-overflow">{{item.goods.title}}</view> <view class="text-overflow">{{item.goods.title}}</view>
</view> </view>
</view> </view>
@ -176,7 +176,8 @@
{ {
img: 'https://static.ticket.sz-trip.com/yandu/images/index/xltj.png', img: 'https://static.ticket.sz-trip.com/yandu/images/index/xltj.png',
text: '线路推荐', text: '线路推荐',
path: '/subPackages/line/lineList' // path: '/subPackages/line/lineList'
path: '/subPackages/webPage/webPage?url='+ encodeURIComponent('https://yandumap.sz-trip.com/lineList'),
}, },
{ {
img: 'https://static.ticket.sz-trip.com/yandu/images/index/zhdt.png', img: 'https://static.ticket.sz-trip.com/yandu/images/index/zhdt.png',

4
pages/mall/mall.vue

@ -1,7 +1,7 @@
<template> <template>
<view class="bg"> <view class="bg">
<!-- <span class="iconfont topLeft" @click="goBack">&#xe660;</span> --> <span class="iconfont topLeft" @click="goBack">&#xe660;</span>
<img :src="showImg('/uploads/20240826/53bbad9d231e7e0eb2404efb0c0903f4.png')" class="topImg" /> <img :src="showImg('/uploads/20240924/4a580d7089dbdb07f830909c25f0f751.jpg')" class="topImg" />
<view class="box"> <view class="box">
<view class="item" v-for="item in list" :key="item.id" @click="viewDetail(item)"> <view class="item" v-for="item in list" :key="item.id" @click="viewDetail(item)">
<image class="item-img" :src="showImg(item.image)" mode=""></image> <image class="item-img" :src="showImg(item.image)" mode=""></image>

3
subPackages/food/foodList.vue

@ -16,7 +16,8 @@
<text v-if="item.distance">距您约{{ item.distance/1000 }}km</text> <text v-if="item.distance">距您约{{ item.distance/1000 }}km</text>
</view> </view>
<view class="price"> <view class="price">
{{item.low_money/100}} <!-- {{item.low_money/100}} -->
{{item.money/100}}
</view> </view>
</view> </view>
</view> </view>

8
subPackages/ticketBooking/detail.vue

@ -22,7 +22,7 @@
</view> </view>
<view class="flex-between time-container"> <view class="flex-between time-container">
<view class="flex flex-1 flex-shrink-0 flex-items-center"> <view class="flex flex-1 flex-shrink-0 flex-items-center">
<image class="address-icon flex-shrink-0" :src="showImg('/uploads/20240827/3d357e6e562de9395f373dc380a790a7.png')" mode=""></image> <image class="address-icon flex-shrink-0" :src="showImg('/uploads/20240924/7fe2f8f89aec55a4009b66032b7a3f7e.png')" mode=""></image>
<view class="title text-overflowRows"> <view class="title text-overflowRows">
<text style="margin-right: 28rpx;">营业时间</text> <text style="margin-right: 28rpx;">营业时间</text>
{{info.open_description}} {{info.open_description}}
@ -300,8 +300,11 @@
specifications_id: this.skuInfo.id, specifications_id: this.skuInfo.id,
date: date, date: date,
}, '/api/goods/getTimeStock').then(res => { }, '/api/goods/getTimeStock').then(res => {
if (res.data.length > 0) { if (Array.isArray(res.data)) {
this.timesArr = res.data || [] this.timesArr = res.data || []
this.seldTimeIndex = -1
}
if (res.data.length > 0) {
this.seldTimeIndex = this.timesArr.findIndex(item => item.stock_number > 0) this.seldTimeIndex = this.timesArr.findIndex(item => item.stock_number > 0)
} }
}) })
@ -333,6 +336,7 @@
addBuyCard() { addBuyCard() {
let that = this; let that = this;
// //
console.log(this.skuInfo)
if(that.skuInfo.is_time_stock && that.seldTimeIndex < 0) { if(that.skuInfo.is_time_stock && that.seldTimeIndex < 0) {
uni.showToast({title:'请选择分时',icon:'none'}) uni.showToast({title:'请选择分时',icon:'none'})
return; return;

39
subPackages/ticketBooking/order.vue

@ -5,7 +5,7 @@
<view class="title text-overflow">{{ pInfo.title }}</view> <view class="title text-overflow">{{ pInfo.title }}</view>
<view> <view>
<view style="padding: 20rpx 0 10rpx;" v-if="allSeldDate.length > 0">{{showDate.date}} {{ShowDateDay(new Date(showDate.date).getDay())}}</view> <view style="padding: 20rpx 0 10rpx;" v-if="allSeldDate.length > 0">{{showDate.date}} {{ShowDateDay(new Date(showDate.date).getDay())}}</view>
<view v-if="timesArr.length > 0">{{ showDate.startTime }}-{{ showDate.endTime }} 入园</view> <view v-if="showDate.startTime">{{ showDate.startTime }}-{{ showDate.endTime }} 入园</view>
</view> </view>
</view> </view>
<view class="top-edit" @click="changeSku">修改 ></view> <view class="top-edit" @click="changeSku">修改 ></view>
@ -403,8 +403,8 @@
let res = await this.Post({ let res = await this.Post({
specifications_id: skuId, specifications_id: skuId,
date: this.showDate.date, date: this.showDate.date,
start_time:this.showDate.startTime, start_time:this.showDate.startTime||'',
end_time:this.showDate.endTime end_time:this.showDate.endTime||''
}, '/api/goods/getSpecificationsPriceCalendarAndTime') }, '/api/goods/getSpecificationsPriceCalendarAndTime')
if (res.code == 1) { if (res.code == 1) {
return {code:1,...res.data} return {code:1,...res.data}
@ -581,21 +581,21 @@
}) })
// //
if (!this.setDefault && this.addressList.length>0) { if (!this.setDefault ) {
// //
let currentData = this.pInfo.specifications[0] let currentData = this.pInfo.specifications[0]
let person0 = currentData.selPeople[0] let person0 = currentData.selPeople[0]
let person = currentData.selPerson let person = currentData.selPerson
let currentPerson = {} let currentPerson = {}
if (this.addressList.some(v=>v.is_default=='1')) {
currentPerson = this.addressList.find(v=>v.is_default=='1')
} else {
currentPerson = this.addressList[0]
}
if (!currentData.is_card) { if (!currentData.is_card) {
person.tel = JSON.parse(uni.getStorageSync('userInfo')).mobile person.tel = JSON.parse(uni.getStorageSync('userInfo')).mobile
} else { } else if(this.addressList.length>0) {
if (this.addressList.some(v=>v.is_default=='1')) {
currentPerson = this.addressList.find(v=>v.is_default=='1')
} else {
currentPerson = this.addressList[0]
}
person.id = currentPerson.id person.id = currentPerson.id
person.id_number = currentPerson.id_number person.id_number = currentPerson.id_number
person.name = currentPerson.name person.name = currentPerson.name
@ -847,10 +847,17 @@
specifications_id: this.sInfo.id, specifications_id: this.sInfo.id,
date: date, date: date,
}, '/api/goods/getTimeStock').then(res => { }, '/api/goods/getTimeStock').then(res => {
if (res.data.length > 0) { if (Array.isArray(res.data)) {
this.timesArr = res.data || [] this.timesArr = res.data || []
this.seldTimeIndex = -1
}
if (res.data.length > 0) {
this.seldTimeIndex = this.timesArr.findIndex(item => item.stock_number > 0) this.seldTimeIndex = this.timesArr.findIndex(item => item.stock_number > 0)
} }
// if (res.data.length > 0) {
// this.timesArr = res.data || []
// this.seldTimeIndex = this.timesArr.findIndex(item => item.stock_number > 0)
// }
}) })
}, },
// //
@ -923,8 +930,8 @@
/*---------------------------价格日历-----------------------------------*/ /*---------------------------价格日历-----------------------------------*/
order() { order() {
let use_date = this.allSeldDate[this.seldDateIndex].date let use_date = this.allSeldDate[this.seldDateIndex].date
let start_time =this.timesArr[this.seldTimeIndex].start_time let start_time =(this.timesArr[this.seldTimeIndex]||{}).start_time
let end_time = this.timesArr[this.seldTimeIndex].end_time let end_time = (this.timesArr[this.seldTimeIndex]||{}).end_time
let goods = [] let goods = []
@ -944,8 +951,8 @@
num: sku.buyNum, num: sku.buyNum,
// contact_id: sku.selPeople.filter(v=>v.id).map(v=>v.id), // contact_id: sku.selPeople.filter(v=>v.id).map(v=>v.id),
date: use_date, date: use_date,
start_time: start_time, start_time: start_time||'',
end_time: end_time, end_time: end_time||'',
reserve_mobile: sku.selPerson.tel, reserve_mobile: sku.selPerson.tel,
} }
goods.push(param) goods.push(param)

Loading…
Cancel
Save