Commit 35cd5e0e authored by Mac's avatar Mac

司导分享

parent ba522e62
......@@ -331,6 +331,8 @@
"path":"order-commit"
},{
"path":"order-commit-detail"
},{
"path":"components/guidecarDraw"
}]
},
{
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -78,6 +78,22 @@ export default {
type: Number,
default: 0,
},
address: {
type: String,
default: "",
},
pickcar: {
type: String,
default: "",
},
startTime: {
type: String,
default: "",
},
endTime: {
type: String,
default: "",
},
goodName: {
type: String,
default: "",
......@@ -112,8 +128,12 @@ export default {
},
genernalHandler() {
//this.goodId
console.log(this.address,this.pickcar,this.startTime,this.endTime)
uni.navigateTo({
url: "/pages/goods/draw?id="+this.goodId,
url: "/pages/guidecar/components/guidecarDraw?id="+this.goodId
+'&StartTime='+this.startTime
+'&EndTime='+this.endTime
});
},
sendQuanHandler() {
......
......@@ -219,6 +219,10 @@
</view>
<share
:good-id="GoodsId"
:address='address'
:pickcar='Pickcar'
:startTime='StartTime'
:endTime='EndTime'
v-if="showShare"
:good-name="g.name"
:images="g.pic_url"
......
......@@ -59,17 +59,18 @@
:interval="1000"
style="height:170px;width: 300px;"
>
<block v-for="(item, index) in g.pic_url" :key="index">
<block v-for="(item, index) in guidecar.PicList" :key="index">
<swiper-item>
<video @click="startPlay(item)" style="width:100%;height:100%" id="myVideo" v-if="item.type==1" :src="item.pic_url"
<video @click="startPlay(item)" style="width:100%;height:100%" id="myVideo" v-if="item.type==1" :src="item"
:autoplay="false" loop muted show-play-btn :enable-progress-gesture="true"
:controls="true" :show-progress="true" :show-mute-btn="true" objectFit="cover"></video>
<image @click="previewImage(index)" style="width:100%;height:100%;" v-else :src="item.pic_url" mode=""></image>
<image @click="previewImage(index)" style="width:100%;height:100%;" v-else :src="item" mode=""></image>
</swiper-item>
</block>
</swiper>
</view>
<view style="margin-top: 15px ;font-size: 16px;" >
<view style="margin-top: 15px ;font-size: 16px;display: flex;flex-direction: row;align-items: center" >
<image :src="carModel.CarLogo" mode="aspectFill" style="width: 25px;height: 25px;margin-right: 10px;"></image>
{{carModel.CarBrand!=''?carModel.CarBrand:'无'}}
</view>
<view style="margin-top: 5px;" >
......@@ -87,11 +88,11 @@
<view class="guide-info">
<view class="guide-info-item">
<span class='info-text'>购买年限:</span>
<span>{{carModel.car_buyyear}}</span>
<span>{{g.car_buyyear}}</span>
</view>
<view class="guide-info-item">
<span class='info-text'>颜色:</span>
<span>{{carModel.carcolor_name}}</span>
<span>{{guidecar.ColorName}}</span>
</view>
<view class="guide-info-item">
<span class='info-text'>座位数:</span>
......@@ -101,10 +102,12 @@
<span class='info-text'>分类:</span>
<span>{{carModel.CarClassStr}}</span>
</view>
<view class="guide-info-item">
<span class='info-text'>型号:</span>
<span>{{carModel.CarType}}</span>
</view>
</view>
</view>
</view>
</template>
......@@ -127,6 +130,7 @@ export default {
imgs:[],
carModel:{},
guideModel:{},
guidecar:{},
};
},
......@@ -152,6 +156,10 @@ export default {
this.g.pic_url.forEach((x) => {
this.imgs.push(x.pic_url);
});
let richtext = this.g.guide_introduction;
setTimeout(()=>{
this.detailContent = richtext;
},10)
......@@ -180,10 +188,8 @@ getGuideCarGuideModel(){//根据导游id获取导游信息
},
(res) => {
this.guideModel = res.data;
let richtext = this.guideModel.Introduction;
setTimeout(()=>{
this.detailContent = richtext;
},10)
}
);
......@@ -199,7 +205,11 @@ getGuideCarModel(){
},
(res) => {
this.carModel = res.data;
console.log(this.guideModel)
this.carModel.ColorList.forEach(x=>{
if(x.ID==this.g.carcolor_id){
this.guidecar = x
}
})
}
);
},
......
......@@ -225,13 +225,32 @@
obj.day = myDate.getDate(); //日
obj.hour = myDate.getHours(); //时
obj.minute = myDate.getMinutes(); //分
let days = myDate.getDay();
obj.week = this.getweek(days)//星期几
let day = myDate.getDay();
obj.week = this.getweek(day)//星期几
this.STime = obj;
this.ETime = obj;
this.msg.StartTime = obj.year+'-'+obj.month+'-'+obj.day+' '+obj.hour+':'+obj.minute+':00';
this.msg.EndTime = obj.year+'-'+obj.month+'-'+obj.day+' '+obj.hour+':'+obj.minute+':10';
let startTime = new Date(this.msg.StartTime); // 开始时间
let endTime = new Date(this.msg.EndTime); // 结束时间
let usedTime = endTime - startTime; // 相差的毫秒数
let days = Math.floor(usedTime / (24 * 3600 * 1000)); // 计算出天数
let leavel = usedTime % (24 * 3600 * 1000); // 计算天数后剩余的时间
let hours = Math.floor(leavel / (3600 * 1000)); // 计算剩余的小时数
if(days>0){
if(leavel>0){
this.intervalDay=days+1+'天'
}else{
this.intervalDay=days+'天'
}
}else{
if(hours>=6){
this.intervalDay='1天'
}else{
this.intervalDay='半天'
}
}
},
onLoad(options){
this.init()//获取司导首页配置
......
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