|
@@ -1,11 +1,11 @@
|
|
<template>
|
|
<template>
|
|
<view class="box">
|
|
<view class="box">
|
|
-
|
|
|
|
|
|
+<homenav :iStatusBarHeight="iStatusBarHeight" :title="'商品详情'"></homenav>
|
|
<view class="spwBox">
|
|
<view class="spwBox">
|
|
<swiper class="swiper" circular :autoplay="false" :indicator-dots="true" indicator-color="#CCCCCC" indicator-active-color="#EC0F0A">
|
|
<swiper class="swiper" circular :autoplay="false" :indicator-dots="true" indicator-color="#CCCCCC" indicator-active-color="#EC0F0A">
|
|
<swiper-item v-for="(item,index) in detail.openMaintainImgUrls">
|
|
<swiper-item v-for="(item,index) in detail.openMaintainImgUrls">
|
|
<view class="swiper-item">
|
|
<view class="swiper-item">
|
|
- <img mode="aspectFit" :src="item.url" alt="" class="swiper-itemImg" >
|
|
|
|
|
|
+ <img mode="aspectFit" :src="item" alt="" class="swiper-itemImg" >
|
|
|
|
|
|
</view>
|
|
</view>
|
|
</swiper-item>
|
|
</swiper-item>
|
|
@@ -19,13 +19,17 @@
|
|
<view class="goodsPrice3" >{{itemDefault.money}}</view>
|
|
<view class="goodsPrice3" >{{itemDefault.money}}</view>
|
|
<view class="goodsPrice4" v-if="itemDefault.showCrossedPrice==1">原价:¥{{itemDefault.crossedPrice}}</view>
|
|
<view class="goodsPrice4" v-if="itemDefault.showCrossedPrice==1">原价:¥{{itemDefault.crossedPrice}}</view>
|
|
</view>
|
|
</view>
|
|
- <view class="shareBox" >
|
|
|
|
|
|
+ <button open-type="share" class="shareBox" >
|
|
<view class="shareTxt">分享</view>
|
|
<view class="shareTxt">分享</view>
|
|
<image class="shareIcon" src="../../static/timg/share.png" mode=""></image>
|
|
<image class="shareIcon" src="../../static/timg/share.png" mode=""></image>
|
|
- </view>
|
|
|
|
|
|
+ </button>
|
|
|
|
+ <!-- <view class="shareBox" >
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </view> -->
|
|
</view>
|
|
</view>
|
|
<view class="goodsName">{{detail.title}}</view>
|
|
<view class="goodsName">{{detail.title}}</view>
|
|
- <view class="goodsMSBox" >
|
|
|
|
|
|
+ <view class="goodsMSBox" v-if="detail.content">
|
|
<!-- <view class="goodsMs" v-if="detail.showOilType">机油类型|{{detail.showOilType}}</view>
|
|
<!-- <view class="goodsMs" v-if="detail.showOilType">机油类型|{{detail.showOilType}}</view>
|
|
<view class="goodsMs" v-if="detail.showOilLevel">机油等级|{{detail.showOilLevel}}</view>
|
|
<view class="goodsMs" v-if="detail.showOilLevel">机油等级|{{detail.showOilLevel}}</view>
|
|
<view class="goodsMs" v-if="detail.showFit">适配粘度|{{detail.showFit}}</view> -->
|
|
<view class="goodsMs" v-if="detail.showFit">适配粘度|{{detail.showFit}}</view> -->
|
|
@@ -132,7 +136,7 @@
|
|
<view class="bottomTianc"></view>
|
|
<view class="bottomTianc"></view>
|
|
|
|
|
|
<view class="bottom">
|
|
<view class="bottom">
|
|
- <view class="bleft">
|
|
|
|
|
|
+ <view class="bleft" @click="makePhoneCall(showSetting.tel)">
|
|
<image class="kefuIcon" src="../../static/img2/kefu.png" mode=""></image>
|
|
<image class="kefuIcon" src="../../static/img2/kefu.png" mode=""></image>
|
|
<view style="text-align: center;font-size: 20rpx;color: #110B01;">客服</view>
|
|
<view style="text-align: center;font-size: 20rpx;color: #110B01;">客服</view>
|
|
</view>
|
|
</view>
|
|
@@ -145,7 +149,7 @@
|
|
<view class="tkBox" v-if="tkShow" @click="closeTk">
|
|
<view class="tkBox" v-if="tkShow" @click="closeTk">
|
|
<view class="tkCont" @click.stop="">
|
|
<view class="tkCont" @click.stop="">
|
|
<view class="tkTop">
|
|
<view class="tkTop">
|
|
- <image class="tkImg" v-if="detail.mainImgUrl" :src="detail.mainImgUrl" mode="" ></image>
|
|
|
|
|
|
+ <image class="tkImg" v-if="itemDefault.mainImgUrl" :src="itemDefault.mainImgUrl" mode="" ></image>
|
|
<image class="tkImg" v-else src="../../static/timg/noimg.png" mode="" ></image>
|
|
<image class="tkImg" v-else src="../../static/timg/noimg.png" mode="" ></image>
|
|
<view class="tkNameBox">
|
|
<view class="tkNameBox">
|
|
<view class="tkName">{{detail.title}}</view>
|
|
<view class="tkName">{{detail.title}}</view>
|
|
@@ -209,9 +213,10 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+ import homenav from "../../components/homenav/nav.vue"
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
-
|
|
|
|
|
|
+ homenav
|
|
},
|
|
},
|
|
|
|
|
|
data() {
|
|
data() {
|
|
@@ -229,9 +234,12 @@
|
|
isRecommend:'',
|
|
isRecommend:'',
|
|
tkShow:false,
|
|
tkShow:false,
|
|
keyongShow:false,
|
|
keyongShow:false,
|
|
|
|
+ showSetting:'',
|
|
|
|
+ iStatusBarHeight:'',
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onLoad(opt) {
|
|
onLoad(opt) {
|
|
|
|
+ this.iStatusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
|
this.ext = this.$common.getExtStoreId();
|
|
this.ext = this.$common.getExtStoreId();
|
|
this.themeColor = uni.getStorageSync("themeColor");
|
|
this.themeColor = uni.getStorageSync("themeColor");
|
|
this.maintainId=opt.maintainId
|
|
this.maintainId=opt.maintainId
|
|
@@ -241,10 +249,12 @@
|
|
//console.log("this.isRecommend=="+this.isRecommend)
|
|
//console.log("this.isRecommend=="+this.isRecommend)
|
|
if(this.userInfo){
|
|
if(this.userInfo){
|
|
this.getdetail()
|
|
this.getdetail()
|
|
|
|
+ this.getInfo()
|
|
}else{
|
|
}else{
|
|
this.$common.automaticlogin().then(val => {
|
|
this.$common.automaticlogin().then(val => {
|
|
this.userInfo=this.$store.state.userInfo;
|
|
this.userInfo=this.$store.state.userInfo;
|
|
this.getdetail()
|
|
this.getdetail()
|
|
|
|
+ this.getInfo()
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
@@ -259,6 +269,20 @@
|
|
|
|
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ makePhoneCall(tel){
|
|
|
|
+ uni.makePhoneCall({
|
|
|
|
+ phoneNumber: tel,
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ getInfo(){
|
|
|
|
+ this.$http('openreservation/getInfo', {
|
|
|
|
+ lat: '',
|
|
|
|
+ lng: '',
|
|
|
|
+
|
|
|
|
+ }, 'GET').then(res => {
|
|
|
|
+ this.showSetting=res.data.showSetting
|
|
|
|
+ })
|
|
|
|
+ },
|
|
ckCar(){
|
|
ckCar(){
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url:'../user/addCar/cailist?type=5'
|
|
url:'../user/addCar/cailist?type=5'
|
|
@@ -266,12 +290,13 @@
|
|
},
|
|
},
|
|
goodsGuige(item){
|
|
goodsGuige(item){
|
|
this.itemDefault=item
|
|
this.itemDefault=item
|
|
|
|
+ this.itemDefault.mainImgUrl=this.detail.openMaintainImgUrls[0]
|
|
},
|
|
},
|
|
goSubmit(){
|
|
goSubmit(){
|
|
this.itemDefault.goodsnum=this.goodsnum
|
|
this.itemDefault.goodsnum=this.goodsnum
|
|
this.itemDefault.goodsname=this.detail.title
|
|
this.itemDefault.goodsname=this.detail.title
|
|
this.itemDefault.itemId=this.detail.id
|
|
this.itemDefault.itemId=this.detail.id
|
|
- this.itemDefault.mainImgUrl=this.detail.mainImgUrl
|
|
|
|
|
|
+ this.itemDefault.mainImgUrl=this.detail.openMaintainImgUrls[0]
|
|
uni.setStorage({
|
|
uni.setStorage({
|
|
key: 'itemDefault',
|
|
key: 'itemDefault',
|
|
data: this.itemDefault,
|
|
data: this.itemDefault,
|
|
@@ -334,6 +359,7 @@
|
|
this.detail.packageItems.forEach(item=>{
|
|
this.detail.packageItems.forEach(item=>{
|
|
if(item.isDefault==1){
|
|
if(item.isDefault==1){
|
|
this.itemDefault=item
|
|
this.itemDefault=item
|
|
|
|
+ this.itemDefault.mainImgUrl=this.detail.openMaintainImgUrls[0]
|
|
}
|
|
}
|
|
if(item.content){
|
|
if(item.content){
|
|
item.content=item.content.replace(/\<img/gi, '<img style="max-width:100% !important;height:auto" ');
|
|
item.content=item.content.replace(/\<img/gi, '<img style="max-width:100% !important;height:auto" ');
|
|
@@ -350,7 +376,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ onShareAppMessage(res) {
|
|
|
|
+ var img='';
|
|
|
|
+ if(this.detail.openMaintainImgUrls.length>0){
|
|
|
|
+ img=this.detail.openMaintainImgUrls[0]
|
|
|
|
+ }
|
|
|
|
+ return {
|
|
|
|
+ title: this.detail.title,
|
|
|
|
+ imageUrl:img,
|
|
|
|
+ path: 'pages/subPack/maintainItem?maintainId=' + this.maintainId+'&isRecommend='+this.isRecommend+'&shareId='+this.userInfo.openId,
|
|
|
|
+ success(res){
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title:'分享成功'
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ fail(res){
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title:'分享失败',
|
|
|
|
+ icon:'none',
|
|
|
|
+ duration: 3000
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
|
|
|
|
@@ -488,7 +537,7 @@ color: #666E80;
|
|
display: inline-block;
|
|
display: inline-block;
|
|
}
|
|
}
|
|
.activeGuige{
|
|
.activeGuige{
|
|
- width: 146rpx;
|
|
|
|
|
|
+/* width: 146rpx; */
|
|
height: 46rpx;line-height: 46rpx;
|
|
height: 46rpx;line-height: 46rpx;
|
|
border: 2rpx solid #FF0035;
|
|
border: 2rpx solid #FF0035;
|
|
border-radius: 5rpx;
|
|
border-radius: 5rpx;
|
|
@@ -757,7 +806,7 @@ color: #666E80;
|
|
}
|
|
}
|
|
|
|
|
|
.activeGuige{
|
|
.activeGuige{
|
|
- width: 146rpx;
|
|
|
|
|
|
+ /* width: 146rpx; */
|
|
height: 46rpx;line-height: 46rpx;
|
|
height: 46rpx;line-height: 46rpx;
|
|
border: 2rpx solid #FF0035;
|
|
border: 2rpx solid #FF0035;
|
|
border-radius: 5rpx;
|
|
border-radius: 5rpx;
|
|
@@ -827,4 +876,29 @@ color: #666E80;
|
|
width: 12rpx;height: 24rpx;
|
|
width: 12rpx;height: 24rpx;
|
|
margin-top: 6rpx;margin-left: 10rpx;
|
|
margin-top: 6rpx;margin-left: 10rpx;
|
|
}
|
|
}
|
|
|
|
+button::after{
|
|
|
|
+ border: none;
|
|
|
|
+}
|
|
|
|
+button{
|
|
|
|
+ position: relative;
|
|
|
|
+ display: block;
|
|
|
|
+ margin-left: 0;
|
|
|
|
+ margin-right: 0;
|
|
|
|
+ padding-left: 0px;
|
|
|
|
+ padding-right: 0px;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ // font-size: 18px;
|
|
|
|
+ text-align: center;
|
|
|
|
+ text-decoration: none;
|
|
|
|
+ // line-height: 1;
|
|
|
|
+ line-height: 1.35;
|
|
|
|
+ // border-radius: 5px;
|
|
|
|
+ -webkit-tap-highlight-color: transparent;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ color: #000000;
|
|
|
|
+ background-color: #fff;
|
|
|
|
+
|
|
|
|
+ height: 100%;
|
|
|
|
+ }
|
|
|
|
+
|
|
</style>
|
|
</style>
|