Commit 1b604318 authored by Mac's avatar Mac

门店详情修改

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