Commit 6594c46c authored by Mac's avatar Mac

司导提交

parent 43abc5f1
<template>
<u-popup
mode="bottom"
:border-radius="20"
:popup="false"
v-model="value"
:maskCloseAble="true"
length="auto"
:safeAreaInsetBottom="true"
@close="popupClose"
:z-index="9999"
close-icon="close"
>
<view class="share-box" :style="{ paddingBottom: bianyi ? '50rpx' : '0' }">
<view class="title">分享商品</view>
<scroll-view scroll-y class="share_b">
<view class="goodname">{{ goodName }}</view>
<view class="img-box">
<view class="box">
<image
v-for="(x, i) in images"
:key="i"
:src="x.pic_url"
class="img"
mode="aspectFill"
@click="previewImage(i)"
/>
</view>
<view v-if="advertising!=null && advertising !='' " style="margin-top: 10px;line-height: 1.5;font-size: 28rpx;color:#333">
<span>广告词:{{advertising}}</span>
<u-button size="mini" shape="circle" style='margin-left: 10px;' @click="paste(advertising)">复制</u-button>
</view>
</view>
</scroll-view>
<view class="op-box">
<view class="left">
<text @click="copyHandler">复制文本</text>
<text @click="savePicHandler" style="text-align: center;"
>保存图片</text
>
<text @click="genernalHandler" style="text-align: right;"
>生成海报</text
>
</view>
<view class="right">
<text>分享到</text>
<image
src="/static/images/icon/quan.png"
style="width: 24px; height: 24px;"
@click="sendQuanHandler"
/>
<!-- #ifdef MP-WEIXIN -->
<button open-type="share" style="border: none; outline: none;">
<image
src="/static/images/icon/friend.png"
style="width: 24px; height: 24px;"
/>
</button>
<!-- #endif -->
</view>
</view>
</view>
<u-top-tips ref="uTips"></u-top-tips>
</u-popup>
</template>
<script>
export default {
model: {},
props: {
value: {
type: Boolean,
default: true,
},
goodId: {
type: Number,
default: 0,
},
goodName: {
type: String,
default: "",
},
advertising: {
type: String,
default: "",
},
images: {
type: Array,
default: [],
},
},
data() {
return {
bianyi: false,
};
},
mounted() {
this.bianyi = this.$uiConfig.is_bang;
},
methods: {
popupClose(){
this.$emit('close')
},
savePicHandler() {
uni.showLoading({
title: "正在下载图片",
});
let arr = JSON.parse(JSON.stringify(this.images));
this.downLoadImage(arr);
},
genernalHandler() {
//this.goodId
uni.navigateTo({
url: "/pages/goods/draw?id="+this.goodId,
});
},
sendQuanHandler() {
this.copyHandler();
setTimeout(() => {
this.savePicHandler();
}, 1000);
},
downLoadImage(arr) {
let that = this;
uni.downloadFile({
url: arr[0].pic_url,
success: (res) => {
if (res.statusCode === 200) {
uni.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
success: function () {
arr.splice(0, 1);
if (arr.length > 0) {
that.downLoadImage(arr);
} else {
uni.hideLoading();
uni.showToast({
title: "下载成功",
});
}
},
fail: function (e) {
uni.hideLoading();
that.$refs.uTips.show({
title: "下载失败,请稍后重试",
type: "error",
duration: "2300",
});
},
});
} else {
uni.hideLoading();
that.$refs.uTips.show({
title: "下载失败,请稍后重试",
type: "error",
duration: "2300",
});
}
},
});
},
copyHandler() {
uni.setClipboardData({
data: this.goodName,
});
},
paste(value){
uni.setClipboardData({
data: value,
});
},
previewImage(i) {
uni.previewImage({
urls: this.imgs,
current: i,
longPressActions: {
itemList: ["发送给朋友", "保存图片", "收藏"],
success: function (data) {},
fail: function (err) {
console.log(err.errMsg);
},
},
});
},
},
};
</script>
<style>
.share-box {
position: relative;
padding: 20rpx;
padding-bottom: 0;
}
.share-box .title {
font-size: 40rpx;
color: #000;
margin-bottom: 50rpx;
font-weight: 600;
}
.share-box .goodname {
font-size: 28rpx;
line-height: 1.5;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
color: #333;
}
.share-box .img-box {
margin-top: 40rpx;
padding-bottom: 40rpx;
display: block;
border-bottom: 2rpx solid #f1f1f1;
overflow-x: auto;
}
.share-box .img-box .box {
white-space: nowrap;
}
.share-box .img-box .box .img {
display: inline-block;
width: 252rpx;
height: 252rpx;
border-radius: 8rpx;
margin-right: 20rpx;
}
.share-box .op-box {
display: flex;
margin: 20rpx 0;
align-items: center;
font-size: 14px;
color: gray;
}
.share-box .op-box .left {
display: flex;
flex: 1;
width: 1rpx;
align-items: center;
}
.share-box .op-box .left text {
flex: 1;
text-align: left;
width: 1rpx;
}
.share-box .op-box .right {
margin-left: 20rpx;
border-left: 2rpx solid #f1f1f1;
display: flex;
align-items: center;
}
.share-box .op-box .right text,
.share-box .op-box .right image {
margin-left: 20rpx;
}
.share-box .op-box .right button {
border: none;
outline: none;
padding: 0;
width: 68rpx;
height: 48rpx;
margin: 0;
line-height: unset;
}
.share-box .op-box .right button::after {
border: none;
}
.share-box .share_b{
padding: 0;
max-height: 300px;
overflow: hidden;
overflow-y: auto;
display: block;
}
</style>
This diff is collapsed.
......@@ -139,7 +139,7 @@ export default {
},
screenList:[],
contents:[
{'ID':0,Name:'不限'},
{'ID':0,Name:'全部'},
{'ID':1,Name:'综合升序'},
{'ID':2,Name:'综合降序'},
{'ID':3,Name:'价格升序'},
......
<template>
<view class="guidedetails" >
<view class="guide" v-if='type==1'>
<view class="guide-top">
<image :src="g.guide_photo" style="width: 60px; height: 60px;margin-right: 10px" mode="widthFix"></image>
<view class="column" style="height: 36px;justify-content: space-between;">
<view class="row">
<span>{{g.guide_name}}</span>
</view>
<view class="row">
<u-rate
:current="g.guide_score"
active-color="#FF8C10"
inactive-color="#b2b2b2"
active-icon="star"
inactive-icon="star-o"
size="20"
:disabled="true"
></u-rate>
</view>
</view>
</view>
<view class="guide-info">
<view class="guide-info-item">
<span class='info-text'>工龄:</span>
<span>{{g.guide_workyears}}</span>
</view>
<!-- <view class="guide-info-item">
<span class='info-text'>服务人数:</span>
<span>{{g.guide_workyears}}</span>
</view>
<view class="guide-info-item">
<span class='info-text'>出单:</span>
<span>{{g.guide_workyears}}</span>
</view> -->
</view>
<view class="guide-info">
<view class="guide-info-item">
<span class='info-text'>个人简介:</span>
</view>
</view>
<view style='padding: 10px;'>
<h-parse :content="detailContent" @navigate="clickDescription"></h-parse>
</view>
</view>
<view class="guide" v-if='type==2'>
<view class="u-skeleton-rect">
<swiper
indicator-dots
:autoplay="false"
:interval="1000"
style="height:170px;width: 300px;"
>
<block v-for="(item, index) in g.pic_url" :key="index">
<swiper-item>
<video @click="startPlay(item)" style="width:100%;height:100%" id="myVideo" v-if="item.type==1" :src="item.pic_url"
: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>
</swiper-item>
</block>
</swiper>
</view>
<view style="margin-top: 15px ;font-size: 16px;" >
{{g.car_model!=''?g.car_model:'无'}}
</view>
<view style="margin-top: 5px;" >
<u-rate
:current="g.car_score"
active-color="#FF8C10"
inactive-color="#b2b2b2"
active-icon="star"
inactive-icon="star-o"
size="20"
:disabled="true"
></u-rate>
</view>
<view style="width: 98%;height: 1px;background: #E2E2E2;margin-top: 10px;"></view>
<view class="guide-info">
<view class="guide-info-item">
<span class='info-text'>购买年限:</span>
<span>{{g.car_buyyear}}</span>
</view>
<view class="guide-info-item">
<span class='info-text'>颜色:</span>
<span>{{g.carcolor_name}}</span>
</view>
<view class="guide-info-item">
<span class='info-text'>座位数:</span>
<span>{{g.ride_num}}</span>
</view>
<view class="guide-info-item">
<span class='info-text'>分类:</span>
<span>{{g.guide_workyears}}</span>
</view>
</view>
</view>
</view>
</template>
<script>
import hParse from "@/components/u-parse/parse.vue";
export default {
components: {
hParse,
// share
},
data() {
return {
mainColor: "",
activeStyle: "",
pageTitle: "导游详情",
type:1,//1为
g:{},
detailContent:'',
imgs:[]
};
},
onLoad(options) {
if(options && options.g){
this.g = JSON.parse(decodeURIComponent(options.g))
}
if(options && options.type){
this.type = options.type;
if(this.type==1){
uni.setNavigationBarTitle({
title: '导游详情',
});
}else{
uni.setNavigationBarTitle({
title: '车辆详情',
});
}
}
this.g.pic_url.forEach((x) => {
this.imgs.push(x.pic_url);
});
let richtext = this.g.guide_introduction;
setTimeout(()=>{
this.detailContent = richtext;
},10)
},
created() {
this.mainColor = this.$uiConfig.mainColor;
this.activeStyle = `background:${this.mainColor};`;
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
methods: {
clickDescription(e) {
console.log(e);
},
//点击跳转
startPlay(item){
uni.navigateTo({ url: '/pages/video/index?GoodsId='+this.id+'&VideoUrl='+item.pic_url })
},
previewImage(i) {
uni.previewImage({
urls: this.imgs,
current: i,
longPressActions: {
itemList: ["发送给朋友", "保存图片", "收藏"],
success: function (data) {
console.log(
"选中了第" +
(data.tapIndex + 1) +
"个按钮,第" +
(data.index + 1) +
"张图片"
);
},
fail: function (err) {
console.log(err.errMsg);
},
},
});
},
},
};
</script>
<style>
.guidedetails {
height: 100%;
background: #f5f5f5;
padding: 20px 0;
}
.guidedetails .guide{
width: 94%;
margin-left: 3%;
border-radius: 10px;
background: #FFF;
display: flex;
flex-direction: column;
align-items: center;
padding: 15px;
}
.guidedetails .guide-top{
width: 100%;
display: flex;
flex-direction: row;
align-items: center;
}
.guidedetails .row{
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
.guidedetails .column{
display: flex;
flex-direction: column;
}
.guidedetails .guide-info{
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
margin-top: 20px;
width: 100%;
}
.guidedetails .guide-info-item{
width: 50%;
display: flex;
flex-direction: row;
align-items: center;
}
.guidedetails .info-text{
font-size: 14px;
color: #727272;
margin-right: 10px;
padding: 10px 0;
}
</style>
......@@ -24,7 +24,7 @@
<view class="topB" v-if="info.IsShowCity==1" @click="gocity">
<span class='titext'>取车城市</span>
<view style="display: flex;flex-direction: row;align-items: center;">
<span class='ztext'>成都</span><u-icon name="arrow-down" size="28" color="#C8C8C8"></u-icon>
<span class='ztext'>{{Pickcar}}</span><u-icon name="arrow-down" size="28" color="#C8C8C8"></u-icon>
</view>
</view>
<view class="topB" style="width: 150px;align-items: flex-start;" v-if="info.IsShowAddress==1" @click="openmap">
......@@ -179,6 +179,7 @@
value:'',
defaultTime:'',
showStart:false,
Pickcar:'成都',//取车城市
STime:{},//显示的出行时间
ETime:{},//显示的结束时间
intervalDay:'',//间隔天数
......@@ -381,7 +382,7 @@
getDestination(nameList) {
this.request2(
{
url: '/api/AppletUser/GetDestinationListByNames',
url: '/api/AppletGuideCar/GetDestinationListByNames',
data: {
area: nameList
}
......@@ -415,7 +416,7 @@
uni.navigateTo({
url: "/pages/guidecar/guidecarList?item=" + encodeURIComponent(JSON.stringify(that.msg))
+'&STime='+encodeURIComponent(JSON.stringify(that.STime))+'&ETime='+encodeURIComponent(JSON.stringify(that.ETime))
+'&intervalDay='+that.intervalDay+'&tic='+tic
+'&intervalDay='+that.intervalDay+'&tic='+tic+'&address='+that.address
});
}
......
<template>
<view class="place_order" >
</view>
</template>
<script>
export default {
data() {
return {
mainColor: "",
activeStyle: "",
pageTitle: "确认订单",
g:{},
msg:{
DetailList:[
{GoodsId:0,Number:0,},
],
TripSTime:'',
District:0,
City:0,
Province:0,
ShoppingAddress:'',
User_Coupon_Id:0,
Use_Integral:0,
}
};
},
onLoad(options) {
if(options && options.g){
this.g = JSON.parse(decodeURIComponent(options.g))
}
},
created() {
this.mainColor = this.$uiConfig.mainColor;
this.activeStyle = `background:${this.mainColor};`;
uni.setNavigationBarTitle({
title: this.pageTitle,
});
},
methods: {
},
};
</script>
<style>
.place_order {
height: 100%;
background: #f5f5f5;
}
</style>
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