- 精选酒店
- 特色民宿
+ 精选酒店
+ 特色民宿
@@ -74,8 +74,7 @@
finished: false,
headImg:null,
navList: [],
- activeType: 0,
- type_id: 11,//酒店分类id
+ activeType: 13,
}
},
onShow() {
@@ -113,7 +112,7 @@
// 根据景点标签获取景点列表
getList(){
this.Post({
- scenic_type_id: this.type_id,offset: this.list.length,limit: 10,
+ scenic_type_id: this.activeType,offset: this.list.length,limit: 10,
lon: uni.getStorageSync('location').lon || '120',
lat: uni.getStorageSync('location').lat || '30',
},
diff --git a/subPackages/search/searchList.vue b/subPackages/search/searchList.vue
index c3fa184..c89a131 100644
--- a/subPackages/search/searchList.vue
+++ b/subPackages/search/searchList.vue
@@ -18,21 +18,21 @@
-
+
{{item.title}}
-
-
+
+
- 营业时间{{ item.open_description }}
+ 营业时间:{{ item.search_data.open_description }}
-
+
{{item.search_data.address}}
@@ -42,23 +42,23 @@
-
-
+
+
距您约{{ item.search_data.distance/1000 }}km
- {{item.money/100}}
+ {{item.search_data.money/100}}
-
+
同里文旅
- {{iem.search_data.view||0}}
+ {{item.search_data.view||0}}
@@ -81,28 +81,36 @@
data() {
return {
typeList: [{
- id: 'ALL',
+ id: '',
name: '全部'
},
{
- id: 'WAIT_PAYMENT',
+ id: 'ticket',
name: '景点'
},
{
- id: 'PAYMENT_SUCCESSFULLY',
+ id: 'food',
name: '美食'
},
{
- id: 'PAYMENT_SUCCESSFULLY',
+ id: 'hotel',
name: '酒店'
},
{
- id: 'POST',
- name: '资讯'
+ id: 'pgoods',
+ name: '特产文创'
},
{
- id: 'WAIT_REFUND,REFUND_SUCCESS,REFUND_REFUSAL,REFUND_ERROR,REFUND_PART',
+ id: 'line',
+ name: '特色体验'
+ },
+ {
+ id: 'article',
name: '攻略'
+ },
+ {
+ id: 'activity',
+ name: '活动'
}
],
typeIndex: 0,
@@ -155,7 +163,10 @@
this.Post({
name: this.keywords,
offset: this.list.length,
+ type: this.typeList[this.typeIndex].id,
limit: 30,
+ lon: uni.getStorageSync('location').lon || '120',
+ lat: uni.getStorageSync('location').lat || '36',
}, '/api/search/search').then(res => {
res.data.forEach(v=>{
if (v.type!=='goods') {
@@ -267,6 +278,17 @@
flex: 1;
width: 1rpx;
padding-right: 10rpx;
+
+ image{
+ flex-shrink: 0;
+ }
+ text{
+ flex: 1;
+ width: 1rpx;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
}
.price {
@@ -296,6 +318,7 @@
align-items: center;
justify-content: center;
flex-direction: column;
+ margin: 26rpx 0;
}
.list-common-empty-tip{
diff --git a/subPackages/techan/detail.vue b/subPackages/techan/detail.vue
index d81c846..8458b35 100644
--- a/subPackages/techan/detail.vue
+++ b/subPackages/techan/detail.vue
@@ -107,7 +107,7 @@
-
+
@@ -224,8 +225,9 @@
if (res) {
this.sku = res.data || [];
// todo
- if (this.sku.length>0) {
- this.is_post = this.sku[0].is_post
+ this.is_post = "2"
+ if (this.sku.length>0 && this.sku.some(v=>v.is_post == 1)) {
+ this.is_post = "1"
}
}
@@ -289,8 +291,8 @@
goods.buyNum = this.buyNum
let orderInfo = {
- // is_post: goods.is_post || "1",
- is_post: 2,
+ is_post: goods.is_post || "1",
+ // is_post: 2,
goods: [{goodsInfo: this.info, skuInfo: goods }],
post: 0,
}
@@ -303,6 +305,13 @@
},
addToCart () {
let goods = this.sku[this.productIndex]
+ if(goods.is_post!=1) {
+ uni.showToast({
+ title: '此规格不支持加入购物车',
+ icon: 'none'
+ })
+ return
+ }
goods.buyNum = this.buyNum
let goodsInfo = {goodsInfo:this.info, skuInfo: goods, isSelected: true}
diff --git a/subPackages/techan/order.vue b/subPackages/techan/order.vue
index 696311d..48aa0e0 100644
--- a/subPackages/techan/order.vue
+++ b/subPackages/techan/order.vue
@@ -76,10 +76,11 @@
-
-
-
- 店家名称店家名称店家名称店家名称店家名称店家名称店家名称
+
+
+
+
+ {{sku.goodsInfo.merchant_name}}
@@ -110,19 +111,24 @@
-
+
运费
- {{sku.post==0?'免邮':sku.post/100}}
+ {{!sku.post?'免邮':sku.post/100}}
-
+
+
+
+
+
+
@@ -217,6 +223,9 @@ export default {
contacts: null,
info: null,//规格的信息
detail:null,//商品的信息
+
+ orderGoods: [],
+
post: 0,
flag: true,
addressList: [],
@@ -241,6 +250,7 @@ export default {
this.$store.commit("choseCoupon", "");
this.info = JSON.parse(uni.getStorageSync('teChanOrder'));
+
if (!this.info) {
uni.navigateBack();
return
@@ -252,6 +262,7 @@ export default {
this.isPost = this.info.is_post || "1"
// this.info.is_post = this.isPost==3?1:this.isPost
}
+ this.handleOrderGoods()
console.log(this.isPost)
},
onShow() {
@@ -274,6 +285,27 @@ export default {
},
methods: {
+ handleOrderGoods () {
+ let merchantArray = new Set(this.info.goods.map(v=>v.goodsInfo.merchant_name))
+ this.orderGoods = []
+ merchantArray.forEach(x=>{
+ // let tempArray = this.info.goods.filter(v=>v.goodsInfo.merchant_name==x)
+ // this.orderGoods.push(tempArray)
+
+ // 不用filter 用for循环一个个找 可以用引用对象地址修改this.info的goods 这样下面的代码不用改
+ let tempArray = []
+ this.info.goods.forEach(v=>{
+ if(v.goodsInfo.merchant_name == x) {
+ tempArray.push(v)
+ }
+ })
+ this.orderGoods.push(tempArray)
+
+ })
+ console.log(this.orderGoods)
+ },
+
+
goOrderCoupon () {
let allPrice = 0
let skuIds= []
@@ -354,6 +386,7 @@ export default {
if (this.flag) {
this.getPost();
}
+ this.handleOrderGoods()
});
}
@@ -492,7 +525,6 @@ export default {
let goodsItem = {
specifications_id: v.skuInfo.id,
num: v.skuInfo.buyNum,
- remark: v.skuInfo.remark
// consignee_id: this.info.is_post == 1 ? this.contacts.id : null
};
@@ -1152,7 +1184,7 @@ view {
min-height: 120rpx;
background: #ffffff;
margin: 0 auto;
- border-radius: 0 0 14rpx 14rpx;
+ border-radius: 14rpx;
.remark-title{
font-size: 31rpx;
@@ -1194,7 +1226,7 @@ view {
.new-box{
background: #fff;
width: 698rpx;
- margin: 0 auto;
+ margin: 0 auto 20rpx;
border-radius: 14rpx;
}
diff --git a/subPackages/techan/techanList.vue b/subPackages/techan/techanList.vue
index 57fda5c..ad78484 100644
--- a/subPackages/techan/techanList.vue
+++ b/subPackages/techan/techanList.vue
@@ -5,7 +5,7 @@
-
+
自提专区
@@ -21,18 +21,18 @@
-
-
+
+
- {{item.title}}
+ {{item.goods.title}}
- {{item.money/100}}
+ {{item.goods.money/100}}
立即购买
-
+
@@ -100,6 +100,7 @@
不可购买
+ 不可加购
@@ -144,6 +145,13 @@
type1:0,
type2:0,
+ typeParam: {
+ '00':57, // 自提-特产
+ '01':58, // 自提-文创
+ '10':59, // 邮寄-特产
+ '11':60, // 邮寄-文创
+ },
+
list:[],
finished: false,
@@ -168,18 +176,21 @@
if (this[typeName]!==value) {
this[typeName]=value
- // this.list = []
- // this.getList()
+ this.list = []
+ this.getList()
}
},
// 根据产品分类获取产品列表
getList(){
+ let typeKey = `${this.type1}${this.type2}`
+ let tag_id = this.typeParam[typeKey]
+
this.Post({
- type_id: 19,
+ tag_id: tag_id,
offset: this.list.length,
limit: 10,
- },'/api/goods/getGoodsByType').then(res => {
+ },'/api/tag/getGoodsByTagId').then(res => {
this.list = [...this.list, ...res.data];
if (res.data.length < 10) {
this.finished = true
@@ -217,7 +228,14 @@
this.currentGoods = JSON.parse(JSON.stringify(item))
this.getSpecificationsByGoodsId(item.id)
},
- changeProduct(index) {
+ changeProduct(item,index) {
+ if (item.store==0) {
+ uni.showToast({
+ title:"库存不足!",
+ icon:'none'
+ })
+ return
+ }
this.productIndex = index
},
getSpecificationsByGoodsId(goods_id) {
@@ -254,6 +272,15 @@
},
order() {
let goods = this.sku[this.productIndex]
+
+ if(goods.is_post!=1) {
+ uni.showToast({
+ title: '此规格不支持加入购物车',
+ icon: 'none'
+ })
+ return
+ }
+
goods.buyNum = this.buyNum
let goodsInfo = {goodsInfo:this.currentGoods, skuInfo: goods, isSelected: true}
diff --git a/subPackages/ticketBooking/detail.vue b/subPackages/ticketBooking/detail.vue
index 531448a..2c219b5 100644
--- a/subPackages/ticketBooking/detail.vue
+++ b/subPackages/ticketBooking/detail.vue
@@ -63,14 +63,14 @@
- 语音讲解
-
+ 语音讲解
+
{{info.title}}
{{getTime(Math.round(currentAudio.currentTime.toFixed(0)))}}
-
@@ -222,13 +222,14 @@
stratDate:'',endDate: '', selected: []
},
- currentAudio: {multimedia_url:'https://tlgz.sz-trip.com/uploads/20241023/3a9cb5a1b60daaad9039e985115509c9.mp3', video_length: 0, currentTime: 0},
+ currentAudio: {multimedia_url:'', video_length: 0, currentTime: 0},
curPlay: false,
+ curPlayCopy: false,
}
},
onShow(options) {
- this.headImg = 'https://tongli.sz-trip.com/uploads/20240826/8653c32761e01ee683505eddba1ae22b.png'
+
},
onLoad(options) {
this.id = options.id;
@@ -277,6 +278,12 @@
console.log(e)
info.times_list_info = {start:'',end:''}
}
+
+ if(Array.isArray(info.multimedia)&&info.multimedia.length>0) {
+ this.currentAudio.multimedia_url = this.showImg(info.multimedia[0].multimedia_url)
+ this.currentAudio.video_length = info.multimedia[0].video_length
+ this.currentAudio.currentTime = 0
+ }
this.info = info
console.log(info)
});
@@ -507,15 +514,6 @@
// 播放音频
- setCurrentAudio (data) {
- // this.currentAudio.article_id = data.article_id
- this.currentAudio.multimedia_url = data.multimedia_url
- // this.currentAudio.title = data.title
- this.currentAudio.video_length = data.video_length || 0
- this.currentAudio.currentTime = data.currentTime || 0
- this.currentAudio.qr_code_path = data.qr_code_path || ''
- },
-
initPlayer () {
let that = this;
if (innerAudioContext2) {
@@ -542,7 +540,7 @@
});
innerAudioContext2.onTimeUpdate(() => {
console.log('timeUpdate')
- that.currentAudio.duration = innerAudioContext2.duration;
+ that.currentAudio.video_length = innerAudioContext2.duration;
that.currentAudio.currentTime = innerAudioContext2.currentTime;
})
},
@@ -557,6 +555,24 @@
innerAudioContext2.pause()
this.curPlay = false
},
+ // 拖动结束
+ audioSeek (event) {
+ let value = event.detail.value
+ innerAudioContext2.seek(value)
+ if (this.curPlayCopy) {
+ innerAudioContext2.play()
+ this.curPlay = this.curPlayCopy
+ this.curPlayCopy = false
+ }
+ },
+ // 拖动
+ audioChanging () {
+ // 如果正在播放
+ if (this.curPlay) {
+ this.curPlayCopy = this.curPlay
+ this.pauseVoice()
+ }
+ },
getTime(time) {
let m = parseInt(time / 60);