Commit 9b151619 authored by 罗超's avatar 罗超

1

parent 702483d7
<template> <template>
<view <view
class="her-scoller" class="her-scoller"
:style="{ :style="{
'background-color': goodsInfo.backgroundColor, 'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl, 'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : '' 'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : '',
}" }"
> >
<view <view
class="good-five" class="good-five"
@click="openGood(item)" @click="openGood(item)"
v-for="(item, gli) in goodList" v-for="(item, gli) in goodList"
:key="gli" :key="gli"
:style="{ :style="{
border: goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '', border: goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '',
background: goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2 ? '#FFF' : '' background:
}" goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2 ? '#FFF' : '',
> }"
<view class="list-box" > >
<view class="img-box"> <view class="list-box">
<image style="width: 100%; height: 100%; border-radius: 50%;" mode="aspectFill" :src="item.picUrl" /> <view class="img-box">
</view> <image
<view class="textone" style="font-size: 14px;font-weight: bold;margin: 5px 0;">{{item.name}}</view> style="width: 100%; height: 100%; border-radius: 50%"
<view style="display: flex;align-items: center;margin-top: 5px;margin-bottom: 14px;"> mode="aspectFill"
<image style="width: 23px; height: 15px;margin-right: 5px;" mode="aspectFill" :src="item.foreignersUrl" /> :src="item.picUrl"
<text >{{item.nationality}}</text> />
</view> </view>
<view class="textone"> <view
<text v-for="(x, y) in item.lableNameList" :key="y" v-if="item.lableNameList!=null && item.lableNameList.length>0"> class="textone"
{{x}}{{item.lableNameList.length==y+1?'':'、'}} style="font-size: 14px; font-weight: bold; margin: 5px 0"
</text> >{{ item.name }}</view
<text v-if="item.lableNameList==null || item.lableNameList.length==0"> >
教育 <view
</text> style="
display: flex;
</view> align-items: center;
margin-top: 5px;
</view> margin-bottom: 14px;
"
>
<image
style="width: 23px; height: 15px; margin-right: 5px"
</view> mode="aspectFill"
<good-sku v-if="showSku" :option-type="2" borderRadius="20" v-model="showSku" :good="sku"></good-sku> :src="item.foreignersUrl"
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth> />
</view> <text>{{ item.nationality }}</text>
</view>
<view class="textone">
<text
v-for="(x, y) in item.lableNameList"
:key="y"
v-if="item.lableNameList != null && item.lableNameList.length > 0"
>
{{ x }}{{ item.lableNameList.length == y + 1 ? "" : "、" }}
</text>
<text
v-if="item.lableNameList == null || item.lableNameList.length == 0"
>
教育
</text>
</view>
</view>
</view>
<good-sku
v-if="showSku"
:option-type="2"
borderRadius="20"
v-model="showSku"
:good="sku"
></good-sku>
<auth
v-if="showAuth"
@changeuserinfo="reloadUserinfo"
@gbAuth="gbAuth"
></auth>
</view>
</template> </template>
<script> <script>
import goodSku from '../goods/goodsku'; import goodSku from "../goods/goodsku";
import auth from '@/components/auth/index.vue'; import auth from "@/components/auth/index.vue";
export default { export default {
components: { components: {
goodSku, goodSku,
auth auth,
}, },
props: ['goodList', 'goodsInfo'], props: ["goodList", "goodsInfo"],
data() { data() {
return { return {
mainColor: '', mainColor: "",
activeKey: 0, activeKey: 0,
showSku: false, showSku: false,
sku: {}, sku: {},
showAuth: false, showAuth: false,
u: {} u: {},
}; };
}, },
created() { created() {
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
}, },
methods: { methods: {
openGood(item) { openGood(item) {
uni.navigateTo({ url: '/pages/school/teacherDetails?ID=' + item.id }); uni.navigateTo({ url: "/pages/school/teacherDetails?ID=" + item.id });
}, },
},
}
}; };
</script> </script>
<style> <style scoped>
.her-scoller { .her-scoller {
overflow-x: auto !important; overflow-x: auto !important;
padding: 12px; padding: 12px;
/* display: flex; */ /* display: flex; */
white-space: nowrap; white-space: nowrap;
} }
/* .her-scoller::after { /* .her-scoller::after {
clear: both; clear: both;
...@@ -90,31 +119,35 @@ export default { ...@@ -90,31 +119,35 @@ export default {
display: block; display: block;
} */ } */
.her-scoller .good-five { .her-scoller .good-five {
position: relative; position: relative;
margin-right: 12px; margin-right: 12px;
width: 120px; width: 120px;
border: 1rpx solid transparent; border: 1rpx solid transparent;
border-radius: 10rpx; border-radius: 10rpx;
padding: 10px; padding: 10px;
display:inline-block; display: inline-block;
box-shadow: 0 5px 10upx rgba(0, 0, 0, 0.1); box-shadow: 0 5px 10upx rgba(0, 0, 0, 0.1);
background: #FFF; background: #fff;
/* float: left; */ /* float: left; */
} }
.her-scoller .good-five .img-box { .her-scoller .good-five .img-box {
width: 40px; width: 40px;
height: 40px; height: 40px;
border-radius: 50%; border-radius: 50%;
} }
.list-box{ .list-box {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
font-size: 12px;color: #333F53; font-size: 12px;
color: #333f53;
} }
.textone{ .textone {
width: 100%;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;text-align: center; width: 100%;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
text-align: center;
} }
</style> </style>
<template> <template>
<view <view
style="padding: 12px; padding-bottom: 0;" style="padding: 12px; padding-bottom: 0"
:style="{ :style="{
'background-color': goodsInfo.backgroundColor, 'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl, 'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : '' 'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : '',
}" }"
> >
<u-row gutter="24"> <u-row gutter="24">
<u-col span="6" v-for="(item, gli) in goodList" :key="gli"> <u-col span="6" v-for="(item, gli) in goodList" :key="gli">
<view <view
class="good-two" class="good-two"
@click="openGood(item)" @click="openGood(item)"
:style="{ :style="{
border: goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '', border:
background: goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2 ? '#FFF' : '' goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '',
}" background:
> goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2
<view class="tips" v-if="goodsInfo.showGoodsTag"><image :src="goodsInfo.goodsTagPicUrl" mode="widthFix" style="width:100%" /></view> ? '#FFF'
<view class="img-box"> : '',
<view class="img-show"> }"
<image >
style=" <view class="tips" v-if="goodsInfo.showGoodsTag"
><image
:src="goodsInfo.goodsTagPicUrl"
mode="widthFix"
style="width: 100%"
/></view>
<view class="img-box">
<view class="img-show">
<image
style="
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 10rpx 10rpx 0 0; border-radius: 10rpx 10rpx 0 0;
" "
:mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'" :mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
:src="item.picUrl" :src="item.picUrl"
/> />
</view> </view>
</view> </view>
<view class="good-info"> <view class="good-info">
<view class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }}</view> <view class="good-name" v-if="goodsInfo.showGoodsName">{{
<!-- <view class="good-sub-name" v-if="item.subname">{{item.subname}}</view> --> item.name
<view class="good-sub-name" style="height:30rpx;"> }}</view>
<template v-if="item.subname">{{item.subname}}</template> <!-- <view class="good-sub-name" v-if="item.subname">{{item.subname}}</view> -->
</view> <view class="good-sub-name" style="height: 30rpx">
<view class="good-price-info"> <template v-if="item.subname">{{ item.subname }}</template>
<view class="price"> </view>
{{ goodsInfo.showGoodsPrice ? getPrice(item.price) : '' }} <view class="good-price-info">
<!-- <span style='text-decoration: line-through;margin-left: 10px;font-size: 10px;color: gray;font-family: aa;'>原价:{{goodsInfo.showGoodsPrice ? getPrice(item.OriginalPrice) : ''}}</span> --> <view class="price">
</view> {{ goodsInfo.showGoodsPrice ? getPrice(item.price) : "" }}
<view class="buy" v-if="goodsInfo.showBuyBtn" @click.stop="showSkuHandler(item)"> <!-- <span style='text-decoration: line-through;margin-left: 10px;font-size: 10px;color: gray;font-family: aa;'>原价:{{goodsInfo.showGoodsPrice ? getPrice(item.OriginalPrice) : ''}}</span> -->
<u-icon name="cart-o" size="40" :color="mainColor" v-if="goodsInfo.buyBtn == 'cart'" /> </view>
<u-icon name="add-o" size="40" :color="mainColor" v-else-if="goodsInfo.buyBtn == 'add'" /> <view
<u-button class="buy"
type="primary" v-if="goodsInfo.showBuyBtn"
size="mini" @click.stop="showSkuHandler(item)"
:ripple="true" >
:color="goodsInfo.buttonColor" <u-icon
:custom-style="{ name="cart-o"
'backgroundColor':goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4 ?'#FFF' : goodsInfo.buttonColor , size="40"
'color':goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4 ? goodsInfo.buttonColor : '#FFF' :color="mainColor"
}" v-if="goodsInfo.buyBtn == 'cart'"
:plain="goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4" />
:shape="goodsInfo.buyBtnStyle == 3 || goodsInfo.buyBtnStyle == 4 ? 'circle' : 'square'" <u-icon
v-else name="add-o"
> size="40"
{{ goodsInfo.buyBtnText }} :color="mainColor"
</u-button> v-else-if="goodsInfo.buyBtn == 'add'"
</view> />
</view> <u-button
</view> type="primary"
</view> size="mini"
</u-col> :ripple="true"
</u-row> :color="goodsInfo.buttonColor"
:custom-style="{
backgroundColor:
goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4
? '#FFF'
: goodsInfo.buttonColor,
color:
goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4
? goodsInfo.buttonColor
: '#FFF',
}"
:plain="
goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4
"
:shape="
goodsInfo.buyBtnStyle == 3 || goodsInfo.buyBtnStyle == 4
? 'circle'
: 'square'
"
v-else
>
{{ goodsInfo.buyBtnText }}
</u-button>
</view>
</view>
</view>
</view>
</u-col>
</u-row>
<good-sku v-if="showSku" borderRadius="20" v-model="showSku" :good="sku" :option-type="2"></good-sku> <good-sku
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth> v-if="showSku"
</view> borderRadius="20"
v-model="showSku"
:good="sku"
:option-type="2"
></good-sku>
<auth
v-if="showAuth"
@changeuserinfo="reloadUserinfo"
@gbAuth="gbAuth"
></auth>
</view>
</template> </template>
<script> <script>
import goodSku from '../goods/goodsku'; import goodSku from "../goods/goodsku";
import auth from '@/components/auth/index.vue'; import auth from "@/components/auth/index.vue";
export default { export default {
components: { components: {
goodSku, goodSku,
auth auth,
}, },
props: ['goodList', 'goodsInfo'], props: ["goodList", "goodsInfo"],
data() { data() {
return { return {
mainColor: '', mainColor: "",
activeKey: 0, activeKey: 0,
showSku: false, showSku: false,
sku: {}, sku: {},
showAuth: false, showAuth: false,
u: {} u: {},
}; };
}, },
created() { created() {
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
}, },
methods: { methods: {
openGood(item) { openGood(item) {
//线路 //线路
if (item.goodType == 4) { if (item.goodType == 4) {
var url="/pages/jiuzhai/jz_LineDetail?tcid=" + item.id + '&configId=' + item.subid; var url =
console.log("url2",url) "/pages/jiuzhai/jz_LineDetail?tcid=" +
uni.navigateTo({ item.id +
url: url "&configId=" +
}); item.subid;
} console.log("url2", url);
//酒店 uni.navigateTo({
else if (item.goodType == 1) { url: url,
uni.navigateTo({ });
url: "/pages/hotel/detail?id=" + item.id }
}); //酒店
} else if (item.goodType == 1) {
//餐食 uni.navigateTo({
else if (item.goodType == 2) { url: "/pages/hotel/detail?id=" + item.id,
uni.navigateTo({ });
url: '/pages/restaurant/detail?id=' + item.id }
}); //餐食
} else if (item.goodType == 2) {
//景点 uni.navigateTo({
else if (item.goodType == 3) { url: "/pages/restaurant/detail?id=" + item.id,
uni.navigateTo({ });
url: '/pages/ticketCoupons/detail?id=' + item.id }
}); //景点
} else if (item.goodType == 3) {
}, uni.navigateTo({
showSkuHandler(g) { url: "/pages/ticketCoupons/detail?id=" + item.id,
this.sku = g; });
this.u = uni.getStorageSync('mall_UserInfo'); }
if (!this.u) { },
this.u = { showSkuHandler(g) {
nickName: '未登录', this.sku = g;
avatarUrl: '' this.u = uni.getStorageSync("mall_UserInfo");
}; if (!this.u) {
this.showAuth = true; this.u = {
} else { nickName: "未登录",
this.showSku = true; avatarUrl: "",
} };
}, this.showAuth = true;
reloadUserinfo() { } else {
this.u = uni.getStorageSync('mall_UserInfo'); this.showSku = true;
// this.showAuth = false; }
}, },
//关闭登录窗口 reloadUserinfo() {
gbAuth() { this.u = uni.getStorageSync("mall_UserInfo");
this.showAuth = false; // this.showAuth = false;
} },
} //关闭登录窗口
gbAuth() {
this.showAuth = false;
},
},
}; };
</script> </script>
<style> <style scoped>
.good-two { .good-two {
position: relative; position: relative;
margin-bottom: 12px; margin-bottom: 12px;
border: 1rpx solid transparent; border: 1rpx solid transparent;
border-radius: 10rpx; border-radius: 10rpx;
overflow: hidden; overflow: hidden;
padding-bottom: 10rpx; padding-bottom: 10rpx;
box-shadow: 0px 10px 30px 0px rgba(36, 36, 36, 0.2); box-shadow: 0px 10px 30px 0px rgba(36, 36, 36, 0.2);
border-radius: 20rpx; border-radius: 20rpx;
} }
.good-two .tips { .good-two .tips {
width: 64rpx; width: 64rpx;
height: 64rpx; height: 64rpx;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
z-index: 4; z-index: 4;
} }
.good-two .img-box { .good-two .img-box {
width: 100%; width: 100%;
height: 330rpx; height: 330rpx;
position: relative; position: relative;
border-radius: 20rpx; border-radius: 20rpx;
overflow: hidden; overflow: hidden;
} }
.good-two .img-box .img-show { .good-two .img-box .img-show {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
bottom: 0; bottom: 0;
right: 0; right: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
} }
.good-two .guding { .good-two .guding {
position: relative; position: relative;
} }
.good-two .guding .img-box { .good-two .guding .img-box {
position: absolute; position: absolute;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
top: 0; top: 0;
} }
.good-two .good-info { .good-two .good-info {
padding: 20rpx; padding: 20rpx;
/* margin-top: -5px; /* margin-top: -5px;
padding-bottom: 0; */ padding-bottom: 0; */
} }
.good-two .good-info .good-name { .good-two .good-info .good-name {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
/* -webkit-line-clamp: 2; /* -webkit-line-clamp: 2;
-webkit-box-orient: vertical; */ -webkit-box-orient: vertical; */
white-space: nowrap; white-space: nowrap;
margin-bottom: 10rpx; margin-bottom: 10rpx;
font-size: 26rpx; font-size: 26rpx;
font-weight: 600; font-weight: 600;
/* height: 37px; */ /* height: 37px; */
} }
.good-two .good-info .good-sub-name { .good-two .good-info .good-sub-name {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
/* -webkit-line-clamp: 2; /* -webkit-line-clamp: 2;
-webkit-box-orient: vertical; */ -webkit-box-orient: vertical; */
white-space: nowrap; white-space: nowrap;
margin-bottom: 10rpx; margin-bottom: 10rpx;
font-size: 22rpx; font-size: 22rpx;
color: #999999; color: #999999;
/* height: 37px; */ /* height: 37px; */
} }
.good-two .good-info .good-price-info { .good-two .good-info .good-price-info {
display: flex; display: flex;
flex-direction: row-reverse; flex-direction: row-reverse;
} }
.good-two .good-info .good-price-info .price { .good-two .good-info .good-price-info .price {
color: #FF3166; color: #ff3166;
/* flex: 1; */ /* flex: 1; */
font-size: 26rpx; font-size: 26rpx;
font-weight: 500; font-weight: 500;
text-align: right; text-align: right;
} }
.good-two .good-info .good-price-info .buy { .good-two .good-info .good-price-info .buy {
/* width: 24px; */ /* width: 24px; */
text-align: right; text-align: right;
} }
</style> </style>
<template> <template>
<view <view
class="her-scoller" class="her-scoller"
:style="{ :style="{
'background-color': goodsInfo.backgroundColor, 'background-color': goodsInfo.backgroundColor,
'background-image': goodsInfo.backgroundPicUrl, 'background-image': goodsInfo.backgroundPicUrl,
'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : '' 'border-color': goodsInfo.goodsStyle == 2 ? 'rgb(226, 226, 226)' : '',
}" }"
> >
<view <view
class="good-five" class="good-five"
@click="openGood(item)" @click="openGood(item)"
v-for="(item, gli) in goodList" v-for="(item, gli) in goodList"
:key="gli" :key="gli"
:style="{ :style="{
border: goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '', border: goodsInfo.goodsStyle == 2 ? '1px solid rgb(226, 226, 226)' : '',
background: goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2 ? '#FFF' : '' background:
}" goodsInfo.goodsStyle == 1 || goodsInfo.goodsStyle == 2 ? '#FFF' : '',
> }"
<view class="tips" v-if="goodsInfo.showGoodsTag"><image :src="goodsInfo.goodsTagPicUrl" mode="widthFix" style="width:100%" /></view> >
<view class="img-box"> <view class="tips" v-if="goodsInfo.showGoodsTag"
<view class="img-show"> ><image
<image style="width: 100%; height: 100%; border-radius: 10rpx 10rpx 0 0;" :mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'" :src="item.picUrl" /> :src="goodsInfo.goodsTagPicUrl"
</view> mode="widthFix"
</view> style="width: 100%"
<view class="good-info"> /></view>
<view class="good-name" v-if="goodsInfo.showGoodsName">{{ item.name }}</view> <view class="img-box">
<view class="good-sub-name" v-if="item.subname">{{item.subname}}</view> <view class="img-show">
<view class="good-price-info"> <image
<view class="price" :style="{ color: mainColor }"> style="width: 100%; height: 100%; border-radius: 10rpx 10rpx 0 0"
<view class="good-sub-name" style="flex:1;">{{item.thirdname}}</view> :mode="goodsInfo.fill == 1 ? 'aspectFill' : 'aspectFit'"
<span style="color: #111;"> :src="item.picUrl"
{{ goodsInfo.showGoodsPrice ? getPrice(item.price) : '' }} />
</span> </view>
<!-- <span style='text-decoration: line-through;font-size: 10px;color: gray;font-family: aa;'>原价:{{goodsInfo.showGoodsPrice ? getPrice(item.OriginalPrice) : ''}}</span> --> </view>
</view> <view class="good-info">
<view class="buy" v-if="goodsInfo.showBuyBtn" @click.stop="showSkuHandler(item)"> <view class="good-name" v-if="goodsInfo.showGoodsName">{{
<u-icon name="cart-o" size="40" :color="mainColor" v-if="goodsInfo.buyBtn == 'cart'" /> item.name
<u-icon name="add-o" size="40" :color="mainColor" v-else-if="goodsInfo.buyBtn == 'add'" /> }}</view>
<u-button <view class="good-sub-name" v-if="item.subname">{{
type="primary" item.subname
size="mini" }}</view>
:ripple="true" <view class="good-price-info">
:color="goodsInfo.buttonColor" <view class="price" :style="{ color: mainColor }">
:custom-style=" <view class="good-sub-name" style="flex: 1">{{
`backgroundColor:${goodsInfo.buttonColor},color:${goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4 ? goodsInfo.buttonColor : '#FFF'}` item.thirdname
" }}</view>
:plain="goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4" <span style="color: #111">
:shape="goodsInfo.buyBtnStyle == 3 || goodsInfo.buyBtnStyle == 4 ? 'circle' : 'square'" {{ goodsInfo.showGoodsPrice ? getPrice(item.price) : "" }}
v-else </span>
> <!-- <span style='text-decoration: line-through;font-size: 10px;color: gray;font-family: aa;'>原价:{{goodsInfo.showGoodsPrice ? getPrice(item.OriginalPrice) : ''}}</span> -->
{{ goodsInfo.buyBtnText }} </view>
</u-button> <view
</view> class="buy"
</view> v-if="goodsInfo.showBuyBtn"
</view> @click.stop="showSkuHandler(item)"
</view> >
<good-sku v-if="showSku" :option-type="2" borderRadius="20" v-model="showSku" :good="sku"></good-sku> <u-icon
<auth v-if="showAuth" @changeuserinfo="reloadUserinfo" @gbAuth="gbAuth"></auth> name="cart-o"
</view> size="40"
:color="mainColor"
v-if="goodsInfo.buyBtn == 'cart'"
/>
<u-icon
name="add-o"
size="40"
:color="mainColor"
v-else-if="goodsInfo.buyBtn == 'add'"
/>
<u-button
type="primary"
size="mini"
:ripple="true"
:color="goodsInfo.buttonColor"
:custom-style="`backgroundColor:${goodsInfo.buttonColor},color:${
goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4
? goodsInfo.buttonColor
: '#FFF'
}`"
:plain="goodsInfo.buyBtnStyle == 2 || goodsInfo.buyBtnStyle == 4"
:shape="
goodsInfo.buyBtnStyle == 3 || goodsInfo.buyBtnStyle == 4
? 'circle'
: 'square'
"
v-else
>
{{ goodsInfo.buyBtnText }}
</u-button>
</view>
</view>
</view>
</view>
<good-sku
v-if="showSku"
:option-type="2"
borderRadius="20"
v-model="showSku"
:good="sku"
></good-sku>
<auth
v-if="showAuth"
@changeuserinfo="reloadUserinfo"
@gbAuth="gbAuth"
></auth>
</view>
</template> </template>
<script> <script>
import goodSku from '../goods/goodsku'; import goodSku from "../goods/goodsku";
import auth from '@/components/auth/index.vue'; import auth from "@/components/auth/index.vue";
export default { export default {
components: { components: {
goodSku, goodSku,
auth auth,
}, },
props: ['goodList', 'goodsInfo'], props: ["goodList", "goodsInfo"],
data() { data() {
return { return {
mainColor: '', mainColor: "",
activeKey: 0, activeKey: 0,
showSku: false, showSku: false,
sku: {}, sku: {},
showAuth: false, showAuth: false,
u: {} u: {},
}; };
}, },
created() { created() {
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
}, },
methods: { methods: {
openGood(item) { openGood(item) {
//线路 //线路
if (item.goodType == 4) { if (item.goodType == 4) {
var url="/pages/jiuzhai/jz_LineDetail?tcid=" + item.id + '&configId=' + item.subid; var url =
console.log("url5",url) "/pages/jiuzhai/jz_LineDetail?tcid=" +
uni.navigateTo({ item.id +
url: url "&configId=" +
}); item.subid;
} console.log("url5", url);
//酒店 uni.navigateTo({
else if (item.goodType == 1) { url: url,
uni.navigateTo({ });
url: "/pages/hotel/detail?id=" + item.id }
}); //酒店
} else if (item.goodType == 1) {
//餐食 uni.navigateTo({
else if (item.goodType == 2) { url: "/pages/hotel/detail?id=" + item.id,
uni.navigateTo({ });
url: '/pages/restaurant/detail?id=' + item.id }
}); //餐食
} else if (item.goodType == 2) {
//景点 uni.navigateTo({
else if (item.goodType == 3) { url: "/pages/restaurant/detail?id=" + item.id,
uni.navigateTo({ });
url: '/pages/ticketCoupons/detail?id=' + item.id }
}); //景点
} else if (item.goodType == 3) {
}, uni.navigateTo({
showSkuHandler(g) { url: "/pages/ticketCoupons/detail?id=" + item.id,
this.sku = g; });
this.u = uni.getStorageSync('mall_UserInfo'); }
if (!this.u) { },
this.u = { showSkuHandler(g) {
nickName: '未登录', this.sku = g;
avatarUrl: '' this.u = uni.getStorageSync("mall_UserInfo");
}; if (!this.u) {
this.showAuth = true; this.u = {
} else { nickName: "未登录",
this.showSku = true; avatarUrl: "",
} };
}, this.showAuth = true;
reloadUserinfo() { } else {
this.u = uni.getStorageSync('mall_UserInfo'); this.showSku = true;
// this.showAuth = false; }
}, },
//关闭登录窗口 reloadUserinfo() {
gbAuth() { this.u = uni.getStorageSync("mall_UserInfo");
this.showAuth = false; // this.showAuth = false;
} },
} //关闭登录窗口
gbAuth() {
this.showAuth = false;
},
},
}; };
</script> </script>
<style> <style scoped>
.her-scoller { .her-scoller {
overflow-x: auto !important; overflow-x: auto !important;
padding: 12px; padding: 12px;
/* display: flex; */ /* display: flex; */
white-space: nowrap; white-space: nowrap;
} }
/* .her-scoller::after { /* .her-scoller::after {
clear: both; clear: both;
...@@ -148,98 +198,93 @@ export default { ...@@ -148,98 +198,93 @@ export default {
display: block; display: block;
} */ } */
.her-scoller .good-five { .her-scoller .good-five {
position: relative; position: relative;
margin-right: 30rpx; margin-right: 30rpx;
/* width: 30%; */ display: inline-block;
/* border: 1rpx solid transparent; width: 560rpx;
border-radius: 10rpx; height: 368rpx;
padding-bottom: 10rpx; */ box-shadow: 0px 10px 30px 0px rgba(36, 36, 36, 0.2);
display:inline-block; border-radius: 20rpx;
width: 560rpx;
box-shadow: 0px 10px 30px 0px rgba(36, 36, 36, 0.2);
border-radius: 20rpx;
/* float: left; */
} }
.her-scoller .good-five .tips { .her-scoller .good-five .tips {
width: 64rpx; width: 64rpx;
height: 64rpx; height: 64rpx;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
z-index: 4; z-index: 4;
} }
.her-scoller .good-five .img-box { .her-scoller .good-five .img-box {
width: 100%; width: 100%;
/* height: 0; /* height: 0;
padding-top: 100%; */ padding-top: 100%; */
position: relative; position: relative;
height: 224rpx; height: 224rpx;
border-radius: 20rpx; border-radius: 20rpx;
overflow: hidden; overflow: hidden;
} }
.her-scoller .good-five .img-box .img-show { .her-scoller .good-five .img-box .img-show {
position: absolute; position: absolute;
left: 0; left: 0;
top: 0; top: 0;
bottom: 0; bottom: 0;
right: 0; right: 0;
width: 100%; width: 100%;
height: 100%; height: 224rpx;
overflow: hidden; overflow: hidden;
z-index: 2; z-index: 2;
} }
.her-scoller .good-five .guding { .her-scoller .good-five .guding {
position: relative; position: relative;
} }
.her-scoller .good-five .guding .img-box { .her-scoller .good-five .guding .img-box {
position: absolute; position: absolute;
left: 0; left: 0;
right: 0; right: 0;
bottom: 0; bottom: 0;
top: 0; top: 0;
} }
.her-scoller .good-five .good-info { .her-scoller .good-five .good-info {
padding: 30rpx; padding: 30rpx;
} }
.her-scoller .good-five .good-info .good-name { .her-scoller .good-five .good-info .good-name {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: block; display: block;
/* -webkit-line-clamp: 2; /* -webkit-line-clamp: 2;
-webkit-box-orient: vertical; */ -webkit-box-orient: vertical; */
white-space: nowrap; white-space: nowrap;
margin-bottom: 10rpx; margin-bottom: 10rpx;
font-size: 26rpx; font-size: 26rpx;
width: 100%; width: 100%;
font-weight: 600; font-weight: 600;
} }
.her-scoller .good-five .good-info .good-sub-name{ .her-scoller .good-five .good-info .good-sub-name {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: block; display: block;
white-space: nowrap; white-space: nowrap;
font-size: 22rpx; font-size: 22rpx;
color: #999999; color: #999999;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.her-scoller .good-five .good-info .good-price-info { .her-scoller .good-five .good-info .good-price-info {
display: flex; display: flex;
justify-items: center; justify-items: center;
align-items: center; align-items: center;
} }
.her-scoller .good-five .good-info .good-price-info .price { .her-scoller .good-five .good-info .good-price-info .price {
color: #ff4544; color: #ff4544;
flex: 1; flex: 1;
font-size: 14px; font-size: 14px;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; overflow: hidden;
display: flex; display: flex;
/* flex-direction: column; */ /* flex-direction: column; */
} }
.her-scoller .good-five .good-info .good-price-info .buy { .her-scoller .good-five .good-info .good-price-info .buy {
width: 24px; width: 24px;
text-align: right; text-align: right;
} }
</style> </style>
...@@ -42,21 +42,20 @@ ...@@ -42,21 +42,20 @@
</view> </view>
</view> </view>
</view> </view>
<!-- #ifdef MP-WEIXIN -->
<view <view
@click="goback" @click="goback"
:style="[titleStyle, { opacity: '100% !important' }]" :style="[titleStyle, { opacity: '100% !important' }]"
style="position: fixed; top: 0; left: 0; padding-left: 6rpx" style="position: fixed; top: 0; left: 0; padding-left: 6rpx"
> >
<!-- #ifdef MP-WEIXIN -->
<u-icon <u-icon
name="arrow-left" name="arrow-left"
size="44" size="44"
color="#FFF" color="#FFF"
style="margin-top: 22rpx" style="margin-top: 22rpx"
></u-icon> ></u-icon>
<!-- #endif -->
</view> </view>
<!-- #endif -->
</view> </view>
<view class="top-title" :style="[titleStyle]"> <view class="top-title" :style="[titleStyle]">
<view @click="goback"> <view @click="goback">
...@@ -99,7 +98,7 @@ ...@@ -99,7 +98,7 @@
>2728人出游</text >2728人出游</text
> >
</view> </view>
<!-- <view class="jz_OrderNow" @click="downloadFile">下载</view> <!-- <view class="jz_OrderNow" @click="downloadFile">下载</view>
<view class="jz_OrderNow" @click="downloadFile2">下载2</view> --> <view class="jz_OrderNow" @click="downloadFile2">下载2</view> -->
<view class="jz_MainTitle"> <view class="jz_MainTitle">
<text v-if="dataList.title">{{ dataList.title }}</text> <text v-if="dataList.title">{{ dataList.title }}</text>
...@@ -892,12 +891,11 @@ ...@@ -892,12 +891,11 @@
<view class="jz_OrderDiv"> <view class="jz_OrderDiv">
<view style="color: #ff3166; font-weight: bold"> <view style="color: #ff3166; font-weight: bold">
<text style="font-size: 22rpx">¥</text> <text style="font-size: 22rpx">¥</text>
<text style="font-size: 40rpx">{{ <text style="font-size: 40rpx"
$utils.getretailer() == true >{{ $utils.getretailer() == true
<!-- b2b --> <!-- b2b -->
? currentPrice.b2CPrice ? currentPrice.b2CPrice : currentPrice.b2CPrice }}</text
: currentPrice.b2CPrice >
}}</text>
<text style="font-size: 22rpx">/起</text> <text style="font-size: 22rpx">/起</text>
</view> </view>
<view style="display: flex; align-items: center"> <view style="display: flex; align-items: center">
...@@ -984,55 +982,75 @@ export default { ...@@ -984,55 +982,75 @@ export default {
that.titleStyle = { that.titleStyle = {
height: "45px", height: "45px",
paddingTop: `${res.statusBarHeight}px`, paddingTop: `${res.statusBarHeight}px`,
opacity: "0", opacity: 0,
}; };
}, },
}); });
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
}, },
methods: { methods: {
downloadFile(){ downloadFile() {
let msg={ let msg = {
"configId":"7274","cityId":"0","tcid":"11409","orderId":"0","FileName":"2021-10-11飞猪平台九寨沟3天2晚3日游","isShowBase":1,"isShowFlight":1,"isShowFeature":1,"isShowFee":1,"isShowShop":1,"isShowTip":1,"isShowB2B":1,"isShowTrip":1,"isShowTitle":0,"isShowGuest":0,"isShowMan":1,"isShowTCNUM":1,"isShowTripImage":1,"isShowVisa":1,"isShowVideoImg":1,"isPc":2,"templateId":3,"UId":615 configId: "7274",
} cityId: "0",
this.apipostDownload( tcid: "11409",
"GetWebHtmlTwo_V2", orderId: "0",
msg, FileName: "2021-10-11飞猪平台九寨沟3天2晚3日游",
(res) => { isShowBase: 1,
console.log(res) isShowFlight: 1,
let url="https://reborn.oytour.com"+res.data isShowFeature: 1,
uni.downloadFile({ isShowFee: 1,
url: url, isShowShop: 1,
success: (res) => { isShowTip: 1,
if (res.statusCode === 200) { isShowB2B: 1,
console.log('下载成功'); isShowTrip: 1,
} isShowTitle: 0,
} isShowGuest: 0,
}); isShowMan: 1,
}) isShowTCNUM: 1,
} , isShowTripImage: 1,
downloadFile2(){ isShowVisa: 1,
let url="https://reborn.oytour.com/Upload/Temporary/C7274_T11409_CTY0_OD0_MMDD637695432017412893_1_1.pdf" isShowVideoImg: 1,
uni.downloadFile({ isPc: 2,
url: url, templateId: 3,
success: (res) => { UId: 615,
console.log('suc',res); };
if (res.statusCode === 200) { this.apipostDownload("GetWebHtmlTwo_V2", msg, (res) => {
console.log('下载成功'); console.log(res);
const tempFilePath = res.tempFilePath//返回的文件临时地址,用于后面打开本地预览所用 let url = "https://reborn.oytour.com" + res.data;
wx.openDocument({ uni.downloadFile({
filePath: tempFilePath, url: url,
showMenu: true, success: (res) => {
fileType: "pdf", if (res.statusCode === 200) {
success: function (res) {} console.log("下载成功");
}) }
} },
}, });
fail(err){ });
console.log('err',err); },
} downloadFile2() {
}); let url =
}, "https://reborn.oytour.com/Upload/Temporary/C7274_T11409_CTY0_OD0_MMDD637695432017412893_1_1.pdf";
uni.downloadFile({
url: url,
success: (res) => {
console.log("suc", res);
if (res.statusCode === 200) {
console.log("下载成功");
const tempFilePath = res.tempFilePath; //返回的文件临时地址,用于后面打开本地预览所用
wx.openDocument({
filePath: tempFilePath,
showMenu: true,
fileType: "pdf",
success: function (res) {},
});
}
},
fail(err) {
console.log("err", err);
},
});
},
openOrderPreview() { openOrderPreview() {
if (this.canCreateOrder && this.finishFirstLoad) { if (this.canCreateOrder && this.finishFirstLoad) {
this.showOrderPreviwe = true; this.showOrderPreviwe = true;
...@@ -1263,7 +1281,7 @@ export default { ...@@ -1263,7 +1281,7 @@ export default {
encodeURIComponent(this.dataList.feature.importantTipText), encodeURIComponent(this.dataList.feature.importantTipText),
}); });
}, },
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
//分享朋友圈 //分享朋友圈
onShareTimeline() { onShareTimeline() {
......
...@@ -869,8 +869,30 @@ export default { ...@@ -869,8 +869,30 @@ export default {
} }
); );
}, },
PayAli(OrderId) { PayAli(tradeNO) {
let that = this; let that = this;
my.tradePay({
tradeNO: tradeNO,
success: function (res) {
console.log("success", res);
uni.showToast({
title: "支付成功",
});
setTimeout(() => {
uni.redirectTo({
url: "/pages/jiuzhai/paysuccess?PreferPrice=" + price,
});
}, 100);
},
fail: function (err) {
console.log("fail:", err);
uni.showToast({
title: "支付失败",
icon: "none",
});
},
});
return;
uni.requestPayment({ uni.requestPayment({
provider: "wxpay", provider: "wxpay",
timeStamp: this.orderInfo.timeStamp, timeStamp: this.orderInfo.timeStamp,
......
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
:class="{ 'last-item': index == TicketList.length - 1 }" :class="{ 'last-item': index == TicketList.length - 1 }"
v-if="TicketList.length > 0" v-if="TicketList.length > 0"
> >
<view class="ticket-key"> <view class="ticket-key" v-if="item.Key">
{{ item.Key }} {{ item.Key }}
</view> </view>
<view class="ticket-list"> <view class="ticket-list">
...@@ -553,7 +553,7 @@ export default { ...@@ -553,7 +553,7 @@ export default {
that.titleStyle = { that.titleStyle = {
height: "45px", height: "45px",
paddingTop: `${res.statusBarHeight}px`, paddingTop: `${res.statusBarHeight}px`,
opacity: "0", opacity: 0,
}; };
}, },
}); });
...@@ -1197,6 +1197,10 @@ export default { ...@@ -1197,6 +1197,10 @@ export default {
position: relative; position: relative;
.TicketName { .TicketName {
max-width: 450rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 28rpx; font-size: 28rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: bold; font-weight: bold;
......
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