Commit 1b604318 authored by Mac's avatar Mac

门店详情修改

parent cd8de034
...@@ -129,6 +129,12 @@ ...@@ -129,6 +129,12 @@
padding-bottom: 15px; padding-bottom: 15px;
} }
.storeDetails .cardbag{
display: flex;width:100%;flex-direction: row;overflow-x: auto;
padding-bottom: 15px;
}
.storeDetails .setmeal-item{ .storeDetails .setmeal-item{
width: 200px; width: 200px;
/* height: 98px; */ /* height: 98px; */
...@@ -217,6 +223,11 @@ ...@@ -217,6 +223,11 @@
} }
.storeDetails .richtext{ .storeDetails .richtext{
padding: 15px; padding: 15px;
}
.storeDetails .richtext2{
padding: 15px;
margin-bottom: 80px; margin-bottom: 80px;
} }
...@@ -384,7 +395,7 @@ ...@@ -384,7 +395,7 @@
</view> </view>
<!-- location-o --> <!-- location-o -->
<view class="store-address"> <view class="store-address">
<view class="store-news-l u-skeleton-rect"> <view class="store-news-l u-skeleton-rect" @click="lookLocation(g.storeAddress)">
<view class="good-rb-box " style="font-size: 11px;color: #111111;"> <view class="good-rb-box " style="font-size: 11px;color: #111111;">
{{g.storeAddress?g.storeAddress:''}} {{g.storeAddress?g.storeAddress:''}}
</view> </view>
...@@ -402,17 +413,17 @@ ...@@ -402,17 +413,17 @@
<!-- tabs的切换 --> <!-- tabs的切换 -->
<view class="store-tabs"> <view class="store-tabs">
<u-tabs :list="list" :is-scroll="false" :current="current" @change="change" :active-color="mc"></u-tabs> <u-tabs :list="list" :is-scroll="list.length>5?true:false" :current="current" @change="change" :active-color="mc"></u-tabs>
</view> </view>
<!-- 吸顶的时候出现 --> <!-- 吸顶的时候出现 -->
<view class="store-sticky u-skeleton-rect" v-if="showSticky==true" :style="{'top':headH+'px'}"> <view class="store-sticky u-skeleton-rect" v-if="showSticky==true" :style="{'top':headH+'px'}">
<u-tabs :list="list" :is-scroll="false" :current="current" @change="change" :active-color="mc"></u-tabs> <u-tabs :list="list" :is-scroll="list.length>5?true:false" :current="current" @change="change" :active-color="mc"></u-tabs>
</view> </view>
<view class="title-c" > <view class="title-c" v-if="allCoupon.length>0">
商家套餐卡 商家套餐卡
</view> </view>
<view class="setmeal-box"> <view class="setmeal-box" v-if="allCoupon.length>0">
<view v-if="allCoupon.length==0" style="width: 100%;height: 50px;line-height: 50px;text-align: center;" > <view v-if="allCoupon.length==0" style="width: 100%;height: 50px;line-height: 50px;text-align: center;" >
暂无任何优惠~ 暂无任何优惠~
</view> </view>
...@@ -433,13 +444,24 @@ ...@@ -433,13 +444,24 @@
</view> </view>
</view> </view>
</view> </view>
<view class="title-c" >
卡包
</view>
<view class="title-c" @click="goPersonal"> <view class="cardbag">
<view v-if="allCoupon.length==0" style="width: 100%;height: 50px;line-height: 50px;text-align: center;" >
暂无任何卡包~
</view>
<!-- TOdo 卡包的列表-->
<view style="width: 100%;height: 200px;"></view>
</view>
<view class="title-c" @click="goPersonal" v-if="personalList.length>0">
<text>设计师</text> <text>设计师</text>
<u-icon name="arrow" :size="30" color="#666666"></u-icon> <u-icon name="arrow" :size="30" color="#666666"></u-icon>
</view> </view>
<view class="designer u-skeleton-rect" > <view class="designer u-skeleton-rect" v-if="personalList.length>0">
<view class="designer-item" v-for="(x, ci2) in personalList" :key="ci2" v-if="personalList.length>0" @click="godesigner(x)"> <view class="designer-item" v-for="(x, ci2) in personalList" :key="ci2" v-if="personalList.length>0" @click="godesigner(x)">
<view class="designer-flex" style="width: calc(100vw - 100px);"> <view class="designer-flex" style="width: calc(100vw - 100px);">
<u-avatar :src="x.ServiceLogo" size="110"></u-avatar> <u-avatar :src="x.ServiceLogo" size="110"></u-avatar>
...@@ -516,6 +538,12 @@ ...@@ -516,6 +538,12 @@
<view class="richtext" > <view class="richtext" >
<h-parse :content="detailContent" @navigate="clickDescription"></h-parse> <h-parse :content="detailContent" @navigate="clickDescription"></h-parse>
</view> </view>
<view class="title-c" >
门店介绍
</view>
<view class="richtext2" >
<h-parse :content="detailContent2" @navigate="clickDescription"></h-parse>
</view>
<view class="btn"> <view class="btn">
<view class="btn-box" :style="{'background':mc}" @click="gosubscribe2()"> <view class="btn-box" :style="{'background':mc}" @click="gosubscribe2()">
预约 预约
...@@ -561,9 +589,11 @@ ...@@ -561,9 +589,11 @@
couponMessage: "", couponMessage: "",
list:[ list:[
{name: '优惠'}, {name: '优惠'},
{name: '卡包'},
{name: '设计师'}, {name: '设计师'},
{name: '评价'}, {name: '评价'},
{name: '价目表'}, {name: '价目表'},
{name: '详情'},
], ],
san: '100px', san: '100px',
...@@ -571,8 +601,10 @@ ...@@ -571,8 +601,10 @@
headH:68, headH:68,
stickyH:0, stickyH:0,
setmealH:0,//套餐卡的高度 setmealH:0,//套餐卡的高度
cardbagH:0,//卡包的高度
designerH:0,//设计师的高度 designerH:0,//设计师的高度
richtextH:0,//富文本的高度 richtextH:0,//富文本的高度
richtextH2:0,//富文本的高度
commentH:0,//评论的高度 commentH:0,//评论的高度
showSticky:false,//是否吸顶 showSticky:false,//是否吸顶
intoscrollTop:0, intoscrollTop:0,
...@@ -580,6 +612,7 @@ ...@@ -580,6 +612,7 @@
g:{}, g:{},
comments:[], comments:[],
detailContent: "", detailContent: "",
detailContent2:'',
personalList:[], personalList:[],
allCoupon:[], allCoupon:[],
count:0, count:0,
...@@ -595,7 +628,6 @@ ...@@ -595,7 +628,6 @@
} }
if (option && option.custom_params) { if (option && option.custom_params) {
let custom_params = JSON.parse(decodeURIComponent(option.custom_params)); let custom_params = JSON.parse(decodeURIComponent(option.custom_params));
console.log(custom_params);
if (custom_params.user_id) { if (custom_params.user_id) {
uni.setStorageSync("pid", { pid: custom_params.user_id }); uni.setStorageSync("pid", { pid: custom_params.user_id });
} }
...@@ -625,7 +657,7 @@ ...@@ -625,7 +657,7 @@
this.u = uni.getStorageSync("mall_UserInfo"); this.u = uni.getStorageSync("mall_UserInfo");
this.init(); this.init();
this.getSPList()//获取服务人员列表
wx.showShareMenu({ wx.showShareMenu({
withShareTicket: true, withShareTicket: true,
...@@ -690,7 +722,7 @@ ...@@ -690,7 +722,7 @@
onPageScroll(e){ onPageScroll(e){
// console.log(e)
this.scrollTop = e.scrollTop; this.scrollTop = e.scrollTop;
if(this.scrollTop>=this.stickyH-this.headH){ if(this.scrollTop>=this.stickyH-this.headH){
this.showSticky=true this.showSticky=true
...@@ -711,12 +743,23 @@ ...@@ -711,12 +743,23 @@
} }
}) })
},
methods:{
getTop(){
setTimeout(()=>{ setTimeout(()=>{
this.$utils.getRect('.setmeal-box').then(res => { this.$utils.getRect('.setmeal-box').then(res => {
if(res && res.top){ if(res && res.top){
this.setmealH = res.top this.setmealH = res.top
} }
}) })
this.$utils.getRect('.cardbag').then(res => {
if(res && res.top){
this.cardbagH = res.top
}
})
this.$utils.getRect('.designer').then(res => { this.$utils.getRect('.designer').then(res => {
if(res && res.top){ if(res && res.top){
this.designerH = res.top this.designerH = res.top
...@@ -733,10 +776,14 @@ ...@@ -733,10 +776,14 @@
this.richtextH = res.top this.richtextH = res.top
} }
}) })
},1000) this.$utils.getRect('.richtext2').then(res => {
if(res && res.top){
this.richtextH2 = res.top
}
})
},1000)
}, },
methods:{
getRect(){ getRect(){
return uni.createSelectorQuery().select(selector).boundingClientRect(data=>{ return uni.createSelectorQuery().select(selector).boundingClientRect(data=>{
if(data && data.top){ if(data && data.top){
...@@ -759,20 +806,24 @@ ...@@ -759,20 +806,24 @@
this.g = res.data.storeInfo; this.g = res.data.storeInfo;
var richtext = this.g.storeProject; var richtext = this.g.storeProject;
this.detailContent = richtext; this.detailContent = richtext;
this.loading = false; this.detailContent2 = this.g.storeIntro
//登录在调用评论接口 //登录在调用评论接口
if (this.u) { if (this.u) {
// this.initComments(); // this.initComments();
this.getGoodsComment() this.getGoodsComment()
this.getAllCPList()//获取门店套餐卡
}else{
this.getSPList()//获取服务人员列表
} }
} else { } else {
this.loading = false;
} }
} }
); );
}, },
getSPList(){ getSPList(){
this.request2({ this.request2({
...@@ -780,14 +831,20 @@ ...@@ -780,14 +831,20 @@
data: {pageIndex:1,pageSize:5,StoreId:this.id} data: {pageIndex:1,pageSize:5,StoreId:this.id}
}, },
res => { res => {
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.personalList = res.data.pageData this.personalList = res.data.pageData;
if(this.personalList.length==0){
for(let i=0;i<this.list.length;i++){
if(this.list[i].name=='设计师'){
this.list.splice(i,1)
} }
}
}
}
this.loading = false;
} }
); );
this.getTop()
}, },
getAllCPList(){ getAllCPList(){
this.request2({ this.request2({
...@@ -798,9 +855,17 @@ ...@@ -798,9 +855,17 @@
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.allCoupon = res.data.pageData this.allCoupon = res.data.pageData
if(this.allCoupon.length==0){
for(let i=0;i<this.list.length;i++){
if(this.list[i].name=='优惠'){
this.list.splice(i,1)
}
}
}
} }
} }
); );
this.getSPList()//获取服务人员列表
}, },
getGoodsComment(){//获取评论 getGoodsComment(){//获取评论
this.request2({ this.request2({
...@@ -815,22 +880,9 @@ ...@@ -815,22 +880,9 @@
} }
} }
); );
this.getAllCPList()//获取门店套餐卡
}, },
scrollHandler(e) {
console.log(e.detail.scrollTop)
this.scrollTop = e.detail.scrollTop;
if(this.scrollTop>=this.stickyH-this.headH){
this.showSticky=true
}
if(this.stickyH-this.headH>this.scrollTop){
this.showSticky=false
}
//this.$forceUpdate();
},
scrollTopHandler() {
this.scrollTop = 0;
},
goback(){ goback(){
uni.navigateBack({}) uni.navigateBack({})
}, },
...@@ -839,25 +891,59 @@ ...@@ -839,25 +891,59 @@
this.current= e; this.current= e;
let scrollTop= 0; let scrollTop= 0;
let that = this let that = this
if(e==0){ if(that.list[e].name=='优惠'){
uni.pageScrollTo({ uni.pageScrollTo({
scrollTop: that.setmealH - that.headH -40-30 scrollTop: that.setmealH - that.headH -40-30
}) })
}else if(e==1){ }else if(that.list[e].name=='卡包'){
uni.pageScrollTo({
scrollTop: that.cardbagH - that.headH -40-30
})
}else if(that.list[e].name=='设计师'){
uni.pageScrollTo({ uni.pageScrollTo({
scrollTop: that.designerH - that.headH -40-30 scrollTop: that.designerH - that.headH -40-30
}) })
}else if(e==2){ }else if(that.list[e].name=='评价'){
uni.pageScrollTo({ uni.pageScrollTo({
scrollTop: that.commentH - that.headH -40 scrollTop: that.commentH - that.headH -40-30
}) })
}else if(e==3){ }else if(that.list[e].name=='价目表'){
uni.pageScrollTo({ uni.pageScrollTo({
scrollTop: that.richtextH - that.headH -40-30 scrollTop: that.richtextH - that.headH -40-30
}) })
}else if(that.list[e].name=='详情'){
uni.pageScrollTo({
scrollTop: that.richtextH2 - that.headH -40-30
})
} }
// if(e==0){
// uni.pageScrollTo({
// scrollTop: that.setmealH - that.headH -40-30
// })
// }else if(e==1){
// uni.pageScrollTo({
// scrollTop: that.cardbagH - that.headH -40-30
// })
// }else if(e==2){
// uni.pageScrollTo({
// scrollTop: that.designerH - that.headH -40-30
// })
// }else if(e==3){
// uni.pageScrollTo({
// scrollTop: that.commentH - that.headH -40
// })
// }else if(e==4){
// uni.pageScrollTo({
// scrollTop: that.richtextH - that.headH -40-30
// })
// }
// else if(e==5){
// uni.pageScrollTo({
// scrollTop: that.richtextH2 - that.headH -40-30
// })
// }
}, },
gophone(){ gophone(){
uni.makePhoneCall({ uni.makePhoneCall({
...@@ -952,6 +1038,16 @@ ...@@ -952,6 +1038,16 @@
uni.navigateTo({ uni.navigateTo({
url: "/pages/reserve/designerDetail?ID="+item.ID+'&storeId='+this.id, url: "/pages/reserve/designerDetail?ID="+item.ID+'&storeId='+this.id,
}) })
},
lookLocation(storeAddress){
uni.openLocation({
latitude: '',
longitude: '',
address:storeAddress,
success: function () {
console.log('success');
}
});
} }
} }
} }
......
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