Commit 252656b4 authored by 罗超's avatar 罗超

1

parent d4fc2dc3
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<view class="buy-content"></view> <view class="buy-content"></view>
<view class="buy-tips">在线订</view> <view class="buy-tips">在线订</view>
</view> </view>
<view class="buy disabled" v-if="data.RemainingInventory===0"> <view class="buy disabled" v-if="data.RemainingInventory<=0">
<view class="buy-content"></view> <view class="buy-content"></view>
<view class="buy-tips">已售罄</view> <view class="buy-tips">已售罄</view>
</view> </view>
......
...@@ -6,11 +6,11 @@ ...@@ -6,11 +6,11 @@
</div> </div>
<div class="right-slider"> <div class="right-slider">
<scroll-view scroll-y="true" style="height: 30vh;"> <scroll-view scroll-y="true" style="height: 30vh;">
<div class="item" :class="{'active':d[tid].Id==currentObj.Id}" @click="clickHandler(d[tid])"> <div class="item" :class="{'active':d[tid].ID==currentObj.ID}" @click="clickHandler(d[tid])">
<div class="left">不限</div> <div class="left">不限</div>
</div> </div>
<div class="item" :class="{'active':x.Id==currentObj.Id}" v-for="(x, index) in sd" :key="index" @click="clickHandler(x)"> <div class="item" :class="{'active':x.ID==currentObj.ID}" v-for="(x, index) in sd" :key="index" @click="clickHandler(x)">
<div class="left">{{ x.Name }}</div> <div class="left">{{ x.Name}}</div>
</div> </div>
</scroll-view> </scroll-view>
<view style="box-shadow: 0px -10px 30px 0px rgba(36, 36, 36, 0.06);margin-top:40rpx;display: flex;"> <view style="box-shadow: 0px -10px 30px 0px rgba(36, 36, 36, 0.06);margin-top:40rpx;display: flex;">
...@@ -32,56 +32,56 @@ ...@@ -32,56 +32,56 @@
d:{ d:{
type:Array, type:Array,
default:[{ default:[{
Id:1, ID:1,
Name:"川菜", Name:"川菜",
ChildList:[ ChildrenList:[
{ {
Id:2, ID:2,
Name:"中餐" Name:"中餐"
}, },
{ {
Id:3, ID:3,
Name:"汤锅" Name:"汤锅"
}, },
{ {
Id:4, ID:4,
Name:"干锅" Name:"干锅"
}, },
{ {
Id:5, ID:5,
Name:"火锅" Name:"火锅"
}, },
{ {
Id:6, ID:6,
Name:"蓉派川菜" Name:"蓉派川菜"
}, },
{ {
Id:7, ID:7,
Name:"渝派川菜" Name:"渝派川菜"
}, },
{ {
Id:8, ID:8,
Name:"盐帮菜" Name:"盐帮菜"
} }
] ]
},{ },{
Id:9, ID:9,
Name:"火锅", Name:"火锅",
ChildList:[ ChildrenList:[
{ {
Id:10, ID:10,
Name:"成都火锅" Name:"成都火锅"
}, },
{ {
Id:11, ID:11,
Name:"藏式火锅" Name:"藏式火锅"
}, },
{ {
Id:12, ID:12,
Name:"重庆火锅" Name:"重庆火锅"
}, },
{ {
Id:13, ID:13,
Name:"北京火锅" Name:"北京火锅"
} }
] ]
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
current:{ current:{
type:Object, type:Object,
default:{ default:{
Id:-1, ID:-1,
active:0 active:0
} }
} }
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
background:"#111" background:"#111"
}, },
currentObj:{ currentObj:{
Id:-1, ID:-1,
active:0 active:0
} }
}; };
...@@ -139,18 +139,19 @@ ...@@ -139,18 +139,19 @@
}, },
created() { created() {
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
this.sd = this.d[this.tid].ChildList; this.sd = this.d[this.tid].ChildrenList;
}, },
methods: { methods: {
changeHandler(i) { changeHandler(i) {
this.tid = i; this.tid = i;
this.sd = this.d[this.tid].ChildList; this.sd = this.d[this.tid].ChildrenList;
}, },
clickHandler(item) { clickHandler(item) {
this.currentObj=item this.currentObj=item
this.currentObj.active=this.active this.currentObj.active=this.active
// let Id1 = this.d[this.tid].Id; console.log(this.currentObj)
// let Id2 = item.Id; // let Id1 = this.d[this.tid].ID;
// let Id2 = item.ID;
// let CategoryIds = Id2; // let CategoryIds = Id2;
// let IsEducation = uni.getStorageSync('basedata') ? // let IsEducation = uni.getStorageSync('basedata') ?
// (uni.getStorageSync('basedata').mall.setting.mallStyle.IsEducation ? uni.getStorageSync('basedata').mall.setting.mallStyle // (uni.getStorageSync('basedata').mall.setting.mallStyle.IsEducation ? uni.getStorageSync('basedata').mall.setting.mallStyle
...@@ -169,7 +170,7 @@ ...@@ -169,7 +170,7 @@
sendResult(t){ sendResult(t){
if(t==-1){ if(t==-1){
this.currentObj={ this.currentObj={
Id:-1, ID:-1,
active:0 active:0
} }
} }
......
...@@ -277,7 +277,7 @@ ...@@ -277,7 +277,7 @@
}, },
openPicture() { openPicture() {
uni.navigateTo({ uni.navigateTo({
url: "/pages/restaurant/picture" url: "/pages/restaurant/picture?id="+this.ID
}) })
}, },
openDescription() { openDescription() {
......
This diff is collapsed.
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
<view class="form-items"> <view class="form-items">
<view class="label">备注</view> <view class="label">备注</view>
<view class="val"> <view class="val">
<input type="number" v-model="order.BuyerMessage" placeholder="您的特殊要求,我们会尽量安排" /> <input type="text" v-model="order.BuyerMessage" placeholder="您的特殊要求,我们会尽量安排" />
</view> </view>
</view> </view>
</view> </view>
......
<template> <template>
<view> <view class="img-list">
<scroll-view scroll-y="true" class="hotel-pic"> <view class="img-navs">
<view class="content"> <view v-for="(item,index) in navList" :key="index" class="nav-btn" :class="{'check-nav':index===curNavIndex,'last-nav':index===navList.length-1}" @click="changeNav(index)">
<view class="left"> {{item.TagName||'其他'}}
<view v-for="(x,i) in jiList" :key="i" class="image-box" @click="previewImage(x.picUrl)"> </view>
<image :src="x.picUrl" mode="widthFix"></image> </view>
</view> <view class="img-list-box">
</view> <view v-for="(item,index) in dataList.TagPicList" :key="item.ID" class="img-list-item" :style="{'margin-right':index%2 ==0?'20rpx':0}">
<view class="right"> <view class="img-box" @click="previewImage(index,item.Path)" v-if="item.type==='image'">
<view v-for="(x,i) in ouList" :key="i" class="image-box" @click="previewImage(x.picUrl)"> <image :src="item.Path" mode="aspectFill" ></image>
<image :src="x.picUrl" mode="widthFix"></image> </view>
<view class="img-box" style="position: relative" v-if="item.type==='video'">
<video id="myVideo" :src="item.Path"
:controls='controls'
:show-center-play-btn='false'
:show-fullscreen-btn='false'
@fullscreenchange='videoControl'
object-fit ='fill'
></video>
<!-- 播放按钮 -->
<view @click="enlarge"
style="position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);width: 98rpx;height: 98rpx;border-radius: 20rpx;background-color: rgba(255,255,255,.4);display: flex;align-items: center;justify-content: center;">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1616471847000_345.png"
style="width: 37rpx;height: 44rpx;"></image>
</view> </view>
</view> </view>
</view> </view>
</scroll-view> </view>
</view> </view>
</template> </template>
<script> <script>
export default { export default {
data() { data() {
return { return {
imageList:[ ID:0,
{ navList:[],
picUrl:"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg", curNavIndex:0,
type:"酒店" dataList:[],
}, imgBaseUrl:"",
{ controls:false,//显示默认控件
picUrl:"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg", videoContext:""
type:"酒店" }
}, },
{ watch:{
picUrl:"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg", curNavIndex(val){
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png",
type:"酒店"
},
{
picUrl:"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png",
type:"酒店"
},
{
picUrl:"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png",
type:"酒店"
},
{
picUrl:"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg",
type:"酒店"
},{
picUrl:"https://ak-d.tripcdn.com/images/200j13000000v60wjE77D_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/t1/hotel/533000/532930/3fcc6398b3c44c08bb1b57aef579793e_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/20010r000000hmqk32EF2_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"https://ak-d.tripcdn.com/images/200v0f0000007d6wgBCD6_R_1080_808_R5_D.jpg",
type:"酒店"
},
{
picUrl:"http://imgfile.oytour.com/Upload/DMC/202105251114114560000000058.png",
type:"酒店"
},
{
picUrl:"https://dimg07.c-ctrip.com/images/01066120008jk5bcc94AC_C_1600_1200.jpg",
type:"酒店"
}
],
jiList:[],
ouList:[],
allImageSrc:[]
} }
}, },
created() { created() {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "酒店图片", title: "餐厅图片",
}); });
this.imageList.forEach((x,i)=>{
this.allImageSrc.push(x.picUrl)
if(i%2==0){
this.jiList.push(x)
}else{
this.ouList.push(x)
}
})
console.log(this.jiList,this.ouList)
}, },
mounted () { onLoad(options) {
if (options && options.id) {
this.ID = options.id
this.getDetail()
}
}, },
methods: { methods: {
previewImage(src) { //获取详情
getDetail(index=0) {
this.request2({
url: '/api/AppletDining/GetDiningDetails',
data: {
ID: this.ID
}
},
res => {
if (res.resultCode == 1) {
this.navList = res.data.AllPicList;
this.dataList=res.data.AllPicList[index]
this.dataList.TagPicList.forEach(item=>{
if(item.Path.indexOf('jpg')!==-1||item.Path.indexOf('png')!==-1||item.Path.indexOf('jpeg')!==-1){
item.type='image'
}else if(item.Path.indexOf('mp4')!==-1){
item.type='video'
}
})
console.log(this.dataList)
}
}
);
},
changeNav(index){
this.curNavIndex=index
this.dataList=this.navList[index]
this.dataList.TagPicList.forEach(item=>{
if(item.Path.indexOf('jpg')!==-1||item.Path.indexOf('png')!==-1||item.Path.indexOf('jpeg')!==-1){
item.type='image'
}else if(item.Path.indexOf('mp4')!==-1){
item.type='video'
}
})
},
//预览图片
previewImage(i,url) {
uni.previewImage({ uni.previewImage({
urls: this.allImageSrc, urls: [url],
current: src, current: i,
longPressActions: { longPressActions: {
itemList: ["发送给朋友", "保存图片", "收藏"], itemList: ["发送给朋友", "保存图片", "收藏"],
success: function(data) {}, success: function(data) {
console.log(data.errMsg);
},
fail: function(err) { fail: function(err) {
console.log(err.errMsg); console.log(err.errMsg);
}, },
}, },
}); });
} },
}, enlarge(file) {
// 全屏
this.videoContext = uni.createVideoContext('myVideo');
this.videoContext.requestFullScreen({
direction:0
})
},
videoControl(e){
// if(e.detail.fullScreen===false){
// this.videoContext.stop()
// this.controls=false
// }else{
// this.videoContext.play()
// this.controls=true
// }
console.log(e.detail)
},
}
} }
</script> </script>
<style> <style lang="scss" scoped>
.hotel-pic{ .img-list{
height: 100vh; .img-navs{
width: 100vw; display: flex;
} margin: 0 45rpx;
.hotel-pic .content{ padding: 20rpx 0;
display: flex; overflow-x: scroll;
align-items: flex-start; overflow-y: hidden;
padding: 44rpx; .nav-btn{
padding-top: 14rpx; // width: 230rpx;
} height: 60rpx;
.hotel-pic .content .left{ background-color: #FFFFFF;
flex:1; border: 1rpx solid #111111;
margin-right: 15rpx; border-radius: 20rpx;
} font-family: PingFang SC;
.hotel-pic .content .right{ font-weight: 500;
flex:1; text-align: center;
margin-left: 15rpx; line-height: 58rpx;
} padding: 0 20rpx;
.hotel-pic .content .image-box{ margin-right: 30rpx;
width:100%; white-space: nowrap;
margin-top: 30rpx; }
} .check-nav{
.hotel-pic .content .image-box image{ background-color: #111111;
width: 100%; color: #FFFFFF;
border-radius: 20rpx; }
.last-nav{
margin-right: 0 !important;
}
}
.img-list-box{
padding: 0 45rpx;
display: flex;
flex-wrap: wrap;
.img-list-item{
width: 315rpx;
margin-bottom: 20rpx;
.img-box{
width: 315rpx;
height: 315rpx;
background-color: #E7E7E7;
border-radius: 20rpx;
overflow: hidden;
image{
width: 100%;
height: 100%;
}
#myVideo{
width: 100%;
height: 100%;
}
}
}
}
} }
</style> </style>
...@@ -143,9 +143,17 @@ ...@@ -143,9 +143,17 @@
uni.hideLoading(); uni.hideLoading();
if(res.resultCode===1){ if(res.resultCode===1){
let that=this let that=this
console.log(res.data.template_message_list)
uni.requestSubscribeMessage({ uni.requestSubscribeMessage({
tmplIds: res.data.template_message_list, tmplIds: res.data.template_message_list,
success:res=>{
console.log('订阅成功',res)
},
fail:err=>{
console.log('订阅失败',err)
},
complete(_res) { complete(_res) {
console.log(_res)
that.queren(res.data.OrderId) that.queren(res.data.OrderId)
} }
}); });
...@@ -154,6 +162,7 @@ ...@@ -154,6 +162,7 @@
}, },
err=>{ err=>{
console.log(err)
uni.hideLoading(); uni.hideLoading();
} }
); );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="hotel-list"> <view class="hotel-list">
<view class="search-box"> <view class="search-box">
<view style="width: 1px; flex: 1;"> <view style="width: 1px; flex: 1;">
<u-search placeholder="目的地/景点/主题" v-model="msg.Name" input-align="left" :value="searchObj.searchKey" <u-search placeholder="景点" v-model="msg.Name" input-align="left" :value="searchObj.searchKey"
text-color="#111" bg-color="rgba(0,0,0,0)" :show-action="false" @search="searchList" @clear="searchList"></u-search> text-color="#111" bg-color="rgba(0,0,0,0)" :show-action="false" @search="searchList" @clear="searchList"></u-search>
</view> </view>
</view> </view>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment