Commit 75cb9772 authored by Mac's avatar Mac

修改详情 列表

parent 1a5bb0a5
...@@ -9,40 +9,43 @@ ...@@ -9,40 +9,43 @@
}" }"
@click="goUrl" > @click="goUrl" >
<view class="box" :style="{'border-radius':goods.SearchFilletPX+'px'}" v-if="goods.IsShowStoreImg==true"> <view class="box" :style="{'border-radius':goods.SearchFilletPX+'px'}" v-if="goods.IsShowStoreImg==true" @click="gostoreDetails">
<image mode="aspectFill" class="img" :style="{'border-radius':goods.SearchFilletPX+'px'}" :src="storeInfo.storeCoverImg" ></image> <image mode="aspectFill" class="img" :style="{'border-radius':goods.SearchFilletPX+'px'}" :src="storeinfo.storeCoverImg" ></image>
<view class="switchstore" @click.stop="goStorelist()"> <view class="switchstore" @click.stop="goStorelist()">
<image style="width: 8px;height: 7px;" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/switchstore.png"/> <view class="switchstore-box">
<text style="font-size: 10px;color: #111111;">切换门店</text> <image style="width: 8px;height: 7px;" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/switchstore.png"/>
<text style="font-size: 10px;color: #111111;">切换门店</text>
</view>
</view> </view>
<view class="content" > <view class="content" >
<view class="c-t"> <view class="c-t">
<view class="c-t-l"> <view class="c-t-l">
{{storeInfo.storeName?storeInfo.storeName:'暂无数据'}} {{storeinfo.storeName?storeinfo.storeName:'暂无数据'}}
</view> </view>
<view class="c-t-r"> <view class="c-t-r">
距离:{{storeInfo.distance?(storeInfo.distance>=1000?(storeInfo.distance/1000).toFixed(2)+'km':storeInfo.distance+'m'):"0"}} 距离:{{storeinfo.distance?(storeinfo.distance>=1000?(storeinfo.distance/1000).toFixed(2)+'km':storeinfo.distance+'m'):"0"}}
</view> </view>
</view> </view>
<view class="address"> <view class="address">
{{storeInfo.storeAddress?storeInfo.storeAddress:''}} {{storeinfo.storeAddress?storeinfo.storeAddress:''}}
</view> </view>
<view class="c-t" style="justify-content: space-between;"> <view class="c-t" style="justify-content: space-between;">
<view> <view>
<image mode="aspectFill" style="width: 11px;height: 11px;" src='https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/osTel.png'/> <image mode="aspectFill" style="width: 11px;height: 11px;" src='https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/osTel.png'/>
<text class="tel">{{storeInfo.storeTel?storeInfo.storeTel:''}} </text> <text class="tel">{{storeinfo.storeTel?storeinfo.storeTel:''}} </text>
</view> </view>
<view style="font-size: 11px;color: #FFC86D;"> <view style="font-size: 11px;color: #FFC86D;">
{{storeInfo.consumptionObj?storeInfo.consumptionObj.consumptionStoreName:''}} {{storeinfo.consumptionObj?storeinfo.consumptionObj.consumptionStoreName:''}}
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view v-else> <view v-else @click="gostoreDetails">
<view class="content2" > <view class="content2" >
<view class="c-t"> <view class="c-t">
<view class="c-t-l"> <view class="c-t-l">
{{storeInfo.storeName?storeInfo.storeName:'暂无数据'}} {{storeinfo.storeName?storeinfo.storeName:'暂无数据'}}
</view> </view>
<view class="c-t-r" style="width: 80px;display: flex;flex-direction: row;align-items: center;justify-content: flex-end;"> <view class="c-t-r" style="width: 80px;display: flex;flex-direction: row;align-items: center;justify-content: flex-end;">
...@@ -54,18 +57,18 @@ ...@@ -54,18 +57,18 @@
</view> </view>
<view class="address"> <view class="address">
<view class="c-t-l" style="font-size: 11px;color: #727272;"> <view class="c-t-l" style="font-size: 11px;color: #727272;">
{{storeInfo.storeAddress?storeInfo.storeAddress:''}} {{storeinfo.storeAddress?storeinfo.storeAddress:''}}
</view> </view>
<view class="c-t-r"> <view class="c-t-r">
距离:{{storeInfo.distance?(storeInfo.distance>=1000?(storeInfo.distance/1000).toFixed(2)+'km':storeInfo.distance+'m'):"0"}} </view> 距离:{{storeinfo.distance?(storeinfo.distance>=1000?(storeinfo.distance/1000).toFixed(2)+'km':storeinfo.distance+'m'):"0"}} </view>
</view> </view>
<view class="c-t" style="justify-content: space-between;"> <view class="c-t" style="justify-content: space-between;">
<view> <view>
<image mode="aspectFill" style="width: 11px;height: 11px;" src='https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/osTel.png'/> <image mode="aspectFill" style="width: 11px;height: 11px;" src='https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/osTel.png'/>
<text class="tel">{{storeInfo.storeTel?storeInfo.storeTel:''}} </text> <text class="tel">{{storeinfo.storeTel?storeinfo.storeTel:''}} </text>
</view> </view>
<view style="font-size: 11px;color: #FFC86D;"> <view style="font-size: 11px;color: #FFC86D;">
{{storeInfo.consumptionObj?storeInfo.consumptionObj.consumptionStoreName:''}} {{storeinfo.consumptionObj?storeinfo.consumptionObj.consumptionStoreName:''}}
</view> </view>
</view> </view>
</view> </view>
...@@ -75,25 +78,16 @@ ...@@ -75,25 +78,16 @@
<script> <script>
export default { export default {
props: ['goods'], props: ['goods','storeinfo'],
data() { data() {
return { return {
windowWidth: 0, windowWidth: 0,
posiTop: 0, posiTop: 0,
storeInfo: {}, storeinfo: {},
position:'', position:'',
} }
}, },
created() { created() {
this.getCurrentStore()
let that = this
uni.getLocation({
type: 'wgs84',
success: function (res) {
that.position= res.latitude+','+res.longitude;
}
});
}, },
methods:{ methods:{
goUrl(){ goUrl(){
...@@ -106,17 +100,22 @@ ...@@ -106,17 +100,22 @@
data: {storeId:0,position:this.position}, data: {storeId:0,position:this.position},
}, },
(res) => { (res) => {
if(res.data && res.data.storeInfo){ if(res.data && res.data.storeinfo){
this.storeInfo = res.data.storeInfo this.storeinfo = res.data.storeinfo
} }
} }
); );
}, },
goStorelist(){//门店选择 goStorelist(){//门店选择
uni.navigateTo({ uni.navigateTo({
url:"/pages/reserve/storeList?position="+this.position url:"/pages/reserve/storeList"
}) })
} },
gostoreDetails() {
uni.navigateTo({
url: "/pages/reserve/storeDetails?id="+this.storeinfo.storeId,
});
},
} }
} }
</script> </script>
...@@ -204,8 +203,16 @@ ...@@ -204,8 +203,16 @@
} }
.store .switchstore{ .store .switchstore{
position: absolute; position: absolute;
top: 5px; top: 0px;
right: 5px; right: 0px;
width: 80px;
height: 25px;
display: flex;
align-items: center;
justify-content: center;
}
.store .switchstore-box{
width: 60px; width: 60px;
height: 15px; height: 15px;
display: flex; display: flex;
......
...@@ -92,7 +92,9 @@ export default { ...@@ -92,7 +92,9 @@ export default {
}, },
methods: { methods: {
openGood(item) { openGood(item) {
uni.navigateTo({ url: '/pages/goods/goods?GoodsId=' + item.id }); uni.navigateTo({
url: "/pages/reserve/storeDetails?id="+item.Id,
});
}, },
showSkuHandler(g) { showSkuHandler(g) {
this.sku = g; this.sku = g;
......
...@@ -88,7 +88,9 @@ export default { ...@@ -88,7 +88,9 @@ export default {
}, },
methods: { methods: {
openGood(item) { openGood(item) {
uni.navigateTo({ url: '/pages/goods/goods?GoodsId=' + item.id }); uni.navigateTo({
url: "/pages/reserve/storeDetails?id="+item.Id,
});
}, },
showSkuHandler(g) { showSkuHandler(g) {
this.sku = g; this.sku = g;
......
...@@ -73,7 +73,9 @@ export default { ...@@ -73,7 +73,9 @@ export default {
}, },
methods: { methods: {
openGood(item) { openGood(item) {
uni.navigateTo({ url: '/pages/goods/goods?GoodsId=' + item.id }); uni.navigateTo({
url: "/pages/reserve/storeDetails?id="+item.Id,
});
}, },
showSkuHandler(g) { showSkuHandler(g) {
this.sku = g; this.sku = g;
......
...@@ -77,20 +77,20 @@ ...@@ -77,20 +77,20 @@
} }
] ]
}, },
{ // {
"root": "pages/live", // "root": "pages/live",
"plugins": { // "plugins": {
"live-player-plugin": { // "live-player-plugin": {
"version": "1.2.2", // "version": "1.2.2",
"provider": "wx2b03c6e691cd7370" // "provider": "wx2b03c6e691cd7370"
} // }
}, // },
"pages": [{ // "pages": [{
"path": "index" // "path": "index"
}, { // }, {
"path": "share" // "path": "share"
}] // }]
}, // },
{ {
"root": "pages/user-center", "root": "pages/user-center",
"pages": [{ "pages": [{
...@@ -420,6 +420,8 @@ ...@@ -420,6 +420,8 @@
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},{
"path":"personalList"
} }
] ]
}, },
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<u-icon name="arrow-left" size="44"></u-icon> <u-icon name="arrow-left" size="44"></u-icon>
</view> </view>
</view> </view>
<button type="default" open-type="getPhoneNumber" @getphonenumber='getphonenumber'>获取手机号码</button> <!-- <button type="default" open-type="getPhoneNumber" @getphonenumber='getphonenumber'>获取手机号码</button> -->
<u-tabs <u-tabs
v-if="myPageData.home_pages && myPageData.home_pages.navs.length > 1" v-if="myPageData.home_pages && myPageData.home_pages.navs.length > 1"
name="name" name="name"
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<argoods v-if="d.id == 'educationArticle'" :goods="d.data"></argoods> <argoods v-if="d.id == 'educationArticle'" :goods="d.data"></argoods>
<!-- 最近学习组件 --> <!-- 最近学习组件 -->
<rstudy v-if="d.id == 'education'" :goods="d.data" ref='study'></rstudy> <rstudy v-if="d.id == 'education'" :goods="d.data" ref='study'></rstudy>
<store v-if="d.id == 'reservestore'" :goods="d.data" ></store> <store v-if="d.id == 'reservestore'" :goods="d.data" :storeinfo='storeInfo'></store>
<!-- 线下服务商品 --> <!-- 线下服务商品 -->
<sindex v-if="d.id == 'storeGoods'" :goods="d.data" :key="di" ></sindex> <sindex v-if="d.id == 'storeGoods'" :goods="d.data" :key="di" ></sindex>
...@@ -158,6 +158,8 @@ export default { ...@@ -158,6 +158,8 @@ export default {
isNavPosition:0, //设置搜索框位置 isNavPosition:0, //设置搜索框位置
IsOpenSchool:0, IsOpenSchool:0,
OrderId:0, OrderId:0,
storePosition:'',//线下服务获取经纬度
storeInfo: {},
}; };
}, },
components: { components: {
...@@ -376,6 +378,18 @@ export default { ...@@ -376,6 +378,18 @@ export default {
}); });
// #endif // #endif
uni.getLocation({
type: 'wgs84',
success: function (res) {
let position= res.latitude+','+res.longitude;
uni.setStorageSync("position", {position:position});
that.getCurrentStore()
},
fail:function(err){
that.getCurrentStore()
}
});
this.init(); this.init();
let set = uni.getStorageSync("basedata") let set = uni.getStorageSync("basedata")
...@@ -391,6 +405,8 @@ export default { ...@@ -391,6 +405,8 @@ export default {
this.isShowBack(); this.isShowBack();
uni.showNavigationBarLoading(); uni.showNavigationBarLoading();
},
created(){
}, },
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
onShareTimeline() { onShareTimeline() {
...@@ -647,18 +663,20 @@ export default { ...@@ -647,18 +663,20 @@ export default {
init() { init() {
let mall_IsOpenSchool = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").IsOpenSchool:0 let mall_IsOpenSchool = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").IsOpenSchool:0
let open_school=0; let open_school=0;
console.log(this.IsOpenSchool,mall_IsOpenSchool)
if(this.IsOpenSchool==1 && mall_IsOpenSchool==1){//this.IsOpenSchool 通过分享进来的 是否是校园 1 是0不是 mall_IsOpenSchool缓存获取校园模式开启没有 if(this.IsOpenSchool==1 && mall_IsOpenSchool==1){//this.IsOpenSchool 通过分享进来的 是否是校园 1 是0不是 mall_IsOpenSchool缓存获取校园模式开启没有
open_school=1 open_school=1
}else{ }else{
open_school=0 open_school=0
} }
let storeId = uni.getStorageSync("storeId") && uni.getStorageSync("storeId").storeId?uni.getStorageSync("storeId").storeId:0;
this.request2( this.request2(
{ {
url: "/api/Mall/GetHome", url: "/api/Mall/GetHome",
data: { data: {
page_id: this.pageId, page_id: this.pageId,
open_school:open_school, open_school:open_school,
StoreId:storeId,
}, },
}, },
(res) => { (res) => {
...@@ -727,6 +745,26 @@ export default { ...@@ -727,6 +745,26 @@ export default {
(error) => {} (error) => {}
); );
}, },
getCurrentStore(){
let storeId = uni.getStorageSync("storeId") && uni.getStorageSync("storeId").storeId?uni.getStorageSync("storeId").storeId:0;
let position = uni.getStorageSync("position") && uni.getStorageSync("position").position?uni.getStorageSync("position").position:'';
this.request2(
{
url: "/api/AppletStores/GetCurrentStore",
data: {storeId:storeId,position:position},
},
(res) => {
if(res.data && res.data.storeInfo){
this.storeInfo = res.data.storeInfo
uni.setStorageSync("storeId", {storeId:res.data.storeInfo.storeId});
if(res.data.storeInfo.storeId && res.data.storeInfo.storeId>0){
this.init()
}
}
}
);
},
getSmallShopById() { getSmallShopById() {
let Id = uni.getStorageSync("mall_UserInfo") let Id = uni.getStorageSync("mall_UserInfo")
? uni.getStorageSync("mall_UserInfo").SmallShopId ? uni.getStorageSync("mall_UserInfo").SmallShopId
......
<template>
<view class="personalList">
<view v-if="g.length > 0" style="
height: calc(100vh);
width: 100%;
overflow: hidden;
margin-top: 7px;
">
<scroll-view :scroll-y="true" @scrolltolower="lower" :enable-back-to-top="true" :enable-flex="true" :scroll-top="scrollTop"
style="height: 100%; padding-bottom: 0px;">
<view class="designer " >
<view class="designer-item" v-for="(x, ci2) in g" :key="ci2" v-if="g.length>0">
<view class="designer-flex" style="width: calc(100vw - 100px);">
<u-avatar :src="x.ServiceLogo" size="110"></u-avatar>
<view class="designer-name">
<view class="designer-flex">
<image v-if="x.Gender==1" style="width: 13px;height: 13px;" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/male.png"></image>
<image v-if="x.Gender==2" style="width: 13px;height: 13px;" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/female.png"></image>
<text style="margin-left: 5px;max-width: 400rpx;">{{x.Name}}</text>
</view>
<view class="designer-flex">
<u-rate
:current="x.storeScore!=null &&x.storeScore>0?x.storeScore:'5'"
active-color="#FEC471" inactive-color="#DDDDDD"
active-icon="star"
inactive-icon="star-o"
size="26"
:disabled="true"
></u-rate>
<text style="font-size: 11px;color: #999999;">{{x.CommentNum}}评价)</text>
</view>
</view>
</view>
<view class="designer-btn" :style="{'background':mainColor}" >
预约
</view>
</view>
</view>
<u-loadmore v-if="showLoading" :status="status" :load-text="loadText" :font-size="24" :margin-top="20"
:margin-bottom="20" bg-color="#FFF" />
</scroll-view>
</view>
<view v-if="!loading && g.length== 0 " style="
height: calc(100vh);
width: calc(100vw - 20px);
padding-top: 10px;
">
<u-empty text="没有找到更多的设计师" font-size="36" mode="list" ></u-empty>
</view>
</view>
</template>
<script>
export default {
data() {
return {
pageTitle: "设计师列表",
status: "loadmore",
mainColor: "",
loading: true,
page_count: 1,
g: [],
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
showLoading: true,
currentChosen: "",
msg: {
pageIndex: 1,
pageSize: 10,
StoreId: 0,
},
};
},
onLoad(option) {
this.mainColor = this.$uiConfig.mainColor;
if(option && option.id){
this.msg.StoreId = option.id
}
},
mounted() {
uni.setNavigationBarTitle({
title: this.pageTitle,
});
this.init();
},
methods: {
init() {
this.loading = true;
uni.showLoading({
title: '加载中'
});
this.request2({
url: '/api/AppletStores/GetServicePersonalList',
data: this.msg
},
res => {
this.loading = false;
if (res.resultCode == 1) {
this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.status = "nomore";
} else {
this.status = "loadmore";
}
}
uni.hideLoading();
}
);
},
lower(e) {
if (this.msg.pageIndex < this.page_count) {
this.status = "loading";
this.msg.pageIndex++;
this.init();
} else {
this.status = "nomore";
}
},
},
};
</script>
<style>
.personalList {
height: 100%;
background: #FFF;
position: relative;
}
.personalList .designer{
padding:0 15px;
}
.personalList .designer-item{
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: 15px 0;
border-bottom: 1px solid #E2E2E2;
}
.personalList .designer-name{
display: flex;
flex-direction: column;
justify-content: space-around;
height: 55px;
margin-left: 10px;
}
.personalList .designer-btn{
width: 69px;
height: 26px;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
color: #FFF;
font-size: 13px;
}
.personalList .designer-flex{
display: flex;
flex-direction: row;
align-items: center;
}
</style>
...@@ -115,7 +115,12 @@ ...@@ -115,7 +115,12 @@
.storeDetails .title-c{ .storeDetails .title-c{
font-size: 14px;color: #1B1D1E;font-weight: bold; font-size: 14px;color: #1B1D1E;font-weight: bold;
height: 40px; height: 40px;
line-height: 40px; width: 100%;
padding: 0 15px;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
} }
.storeDetails .setmeal-box{ .storeDetails .setmeal-box{
display: flex;width:100%;flex-direction: row;overflow-x: auto; display: flex;width:100%;flex-direction: row;overflow-x: auto;
...@@ -130,7 +135,6 @@ ...@@ -130,7 +135,6 @@
border-radius: 6px; border-radius: 6px;
box-shadow:0 6px 10px 1px #F2F2F2; box-shadow:0 6px 10px 1px #F2F2F2;
overflow: hidden; overflow: hidden;
} }
.storeDetails .setmeal-item-top{ .storeDetails .setmeal-item-top{
width: 100%; width: 100%;
...@@ -197,6 +201,9 @@ ...@@ -197,6 +201,9 @@
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
} }
.storeDetails .richtext{
padding: 15px;
}
</style> </style>
<template> <template>
<scroll-view class='storeDetails' <scroll-view class='storeDetails'
...@@ -226,16 +233,11 @@ ...@@ -226,16 +233,11 @@
<view class="arrow"></view> <view class="arrow"></view>
</view> </view>
<view style="width: 100%;height: 210px;position: relative;" class="u-skeleton-rect"> <view style="width: 100%;height: 210px;position: relative;" class="u-skeleton-rect">
<image style="width: 100%;height: 210px;position: relative;" mode="aspectFill" src="https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=3071197752,333614396&fm=26&gp=0.jpg"/> <image style="width: 100%;height: 210px;position: relative;" mode="aspectFill" :src="g.storeCoverImg?g.storeCoverImg:''"/>
<!-- <view class="arrow2" @click="goback">
<u-icon name="arrow-left" size="48" color="#FFF"></u-icon>
</view> -->
<view <view
class="headStatus" class="headStatus"
:style="[ :style="[
headStyle, headStyle,
]" ]"
> >
<view class="arrow" @click="goback"> <view class="arrow" @click="goback">
...@@ -250,18 +252,18 @@ ...@@ -250,18 +252,18 @@
<view class="storeNews"> <view class="storeNews">
<view class="store-name u-skeleton-rect"> <view class="store-name u-skeleton-rect">
<view class="sName"> <view class="sName">
月星环球港门店 {{g.storeName?g.storeName:'无'}}
</view> </view>
<view class="sN-r"> <view class="sN-r">
上次消费的店铺 {{g.consumptionObj?g.consumptionObj.consumptionStoreName:''}}
</view> </view>
</view> </view>
<view class="store-news u-skeleton-rect"> <view class="store-news u-skeleton-rect">
<view class="store-news-l"> <view class="store-news-l">
<view class="good-rb-box" > <view class="good-rb-box" >
<text class="good-rb-text">4.0</text> <text class="good-rb-text">{{g.storeScore?g.storeScore.toFixed(1):'5.0'}}</text>
<u-rate <u-rate
:current="4" :current="g.storeScore!=null &&g.storeScore>0?g.storeScore:'5'"
active-color="#FEC471" inactive-color="#DDDDDD" active-color="#FEC471" inactive-color="#DDDDDD"
active-icon="star" active-icon="star"
inactive-icon="star-o" inactive-icon="star-o"
...@@ -270,7 +272,7 @@ ...@@ -270,7 +272,7 @@
></u-rate> ></u-rate>
</view> </view>
<view style="font-size: 11px;color: #111111;margin-top: 10px;" class="u-skeleton-rect"> <view style="font-size: 11px;color: #111111;margin-top: 10px;" class="u-skeleton-rect">
营业中 周一至周日 10:00-24:00 营业中 {{g.storeServiceTime?g.storeServiceTime:'全天'}}营业
</view> </view>
</view> </view>
<view class="right u-skeleton-rect" @click="openShare"> <view class="right u-skeleton-rect" @click="openShare">
...@@ -282,10 +284,10 @@ ...@@ -282,10 +284,10 @@
<view class="store-address"> <view class="store-address">
<view class="store-news-l u-skeleton-rect"> <view class="store-news-l u-skeleton-rect">
<view class="good-rb-box " style="font-size: 11px;color: #111111;"> <view class="good-rb-box " style="font-size: 11px;color: #111111;">
成都市锦江区阳光新业中心2号楼2302成都市锦江区阳光 {{g.storeAddress?g.storeAddress:''}}
</view> </view>
<view style="font-size: 11px;color: #999999;margin-top: 5px;"> <view style="font-size: 11px;color: #999999;margin-top: 5px;">
距离你当前位置20m 距离你当前位置{{g.distance>=1000?(g.distance/1000).toFixed(2)+'km':g.distance+'m'}}
</view> </view>
</view> </view>
<view class="right u-skeleton-rect" @click="gophone" style="height: 34px;display: flex;flex-direction: column;align-items: center;justify-content: space-between;"> <view class="right u-skeleton-rect" @click="gophone" style="height: 34px;display: flex;flex-direction: column;align-items: center;justify-content: space-between;">
...@@ -303,7 +305,7 @@ ...@@ -303,7 +305,7 @@
<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="false" :current="current" @change="change" :active-color="mc"></u-tabs>
</view> </view>
<view class="title-c" style="margin-left: 15px;"> <view class="title-c" >
商家套餐卡 商家套餐卡
</view> </view>
<view class="setmeal-box"> <view class="setmeal-box">
...@@ -325,47 +327,51 @@ ...@@ -325,47 +327,51 @@
</view> </view>
</view> </view>
<view class="title-c" style="margin-left: 15px;"> <view class="title-c" @click="goPersonal">
设计师 <text>设计师</text>
<u-icon name="arrow" :size="30" color="#666666"></u-icon>
</view> </view>
<view class="designer u-skeleton-rect" > <view class="designer u-skeleton-rect" >
<view class="designer-item" v-for="(cl, ci) in list" :key="ci" > <view class="designer-item" v-for="(x, ci2) in personalList" :key="ci2" v-if="personalList.length>0">
<view class="designer-flex" style="width: calc(100vw - 100px);"> <view class="designer-flex" style="width: calc(100vw - 100px);">
<u-avatar src="https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=4255547098,2077529314&fm=11&gp=0.jpg" size="110"></u-avatar> <u-avatar :src="x.ServiceLogo" size="110"></u-avatar>
<view class="designer-name"> <view class="designer-name">
<view class="designer-flex"> <view class="designer-flex">
<image style="width: 13px;height: 13px;" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/male.png"></image> <image v-if="x.Gender==1" style="width: 13px;height: 13px;" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/male.png"></image>
<!-- <image style="width: 13px;height: 13px;" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/female.png"></image> --> <image v-if="x.Gender==2" style="width: 13px;height: 13px;" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/female.png"></image>
<text style="margin-left: 5px;max-width: 400rpx;">龚老师</text> <text style="margin-left: 5px;max-width: 400rpx;">{{x.Name}}</text>
</view> </view>
<view class="designer-flex"> <view class="designer-flex">
<u-rate <u-rate
:current="4" :current="x.storeScore!=null &&x.storeScore>0?x.storeScore:'5'"
active-color="#FEC471" inactive-color="#DDDDDD" active-color="#FEC471" inactive-color="#DDDDDD"
active-icon="star" active-icon="star"
inactive-icon="star-o" inactive-icon="star-o"
size="26" size="26"
:disabled="true" :disabled="true"
></u-rate> ></u-rate>
<text style="font-size: 11px;color: #999999;">163评价)</text> <text style="font-size: 11px;color: #999999;">{{x.CommentNum}}评价)</text>
</view> </view>
</view> </view>
</view> </view>
<view class="designer-btn" :style="{'background':mc}" > <view class="designer-btn" :style="{'background':mc}" >
预约 预约
</view> </view>
</view>
<view v-if="personalList.length==0" style="width: 100%;height: 50px;line-height: 50px;text-align: center;">
暂无设计师数据~
</view> </view>
</view> </view>
<view class="title-c" style="margin-left: 15px;"> <view class="title-c" >
价目表 价目表
</view> </view>
<view class="richtext" style="height: 1000px;"> <view class="richtext" >
富文本 <h-parse :content="detailContent" @navigate="clickDescription"></h-parse>
</view> </view>
<view class="title-c" style="margin-left: 15px;"> <view class="title-c" >
评价 评价
</view> </view>
<view class="comment u-skeleton-rect" style="height: 1000px;"> <view class="comment u-skeleton-rect" style="height: 1000px;">
...@@ -379,11 +385,23 @@ ...@@ -379,11 +385,23 @@
<u-skeleton :loading="loading" :animation="true" bgColor="#FFF"></u-skeleton> <u-skeleton :loading="loading" :animation="true" bgColor="#FFF"></u-skeleton>
<coupon
v-if="showCoupons"
:coupon-message="couponMessage"
@goLook="goLook"
@closeBtn="closeBtn"
></coupon>
</scroll-view> </scroll-view>
</template> </template>
<script> <script>
import hParse from "@/components/u-parse/parse.vue";
import auth from "@/components/auth/index";
export default{ export default{
components: {
auth,
hParse,
},
data(){ data(){
return{ return{
pageTitle: "门店详情", pageTitle: "门店详情",
...@@ -391,9 +409,13 @@ ...@@ -391,9 +409,13 @@
headStyle:{}, headStyle:{},
nav:0, nav:0,
mc:'', mc:'',
u:{},
pricecolor:'', pricecolor:'',
secondary:'', secondary:'',
loading:true, loading:true,
show:false,
showCoupons: false,
couponMessage: "",
list:[ list:[
{name: '优惠'}, {name: '优惠'},
{name: '设计师'}, {name: '设计师'},
...@@ -409,20 +431,108 @@ ...@@ -409,20 +431,108 @@
commentH:0,//评论的高度 commentH:0,//评论的高度
showSticky:false,//是否吸顶 showSticky:false,//是否吸顶
intoscrollTop:0, intoscrollTop:0,
id:0,
g:{},
comments:[],
detailContent: "",
personalList:[],
} }
}, },
onLoad(option){ onLoad(option){
console.log(option, "option");
if (option && option.id) {
this.id = option.id ? option.id : 2;
} else {
this.id = option.GoodsId ? option.GoodsId : 2;
}
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 });
}
if (custom_params.Up) {//分享进入校园id
uni.setStorageSync("Up", { Up: custom_params.Up });
}
}
if (option && option.user_id) {
uni.setStorageSync("pid", { pid: option.user_id });
}
if (option && option.SmallShopId) {
uni.setStorageSync("SmallShopId", { SmallShopId: option.SmallShopId });
}
if (uni.getStorageSync("AnchorName")) {
//如果有主播名称了先清除
uni.removeStorageSync("AnchorName");
}
if (option && option.Up) {//分享进入校园id
uni.setStorageSync("Up", { Up: option.Up });
}
this.Up = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").UserPageType:0;//用于分享出去的参数
if (option && option.AnchorName) {
//当传过来有主播名称的时候 存入缓存
uni.setStorageSync("AnchorName", { AnchorName: option.AnchorName });
}
this.u = uni.getStorageSync("mall_UserInfo");
this.init();
this.getSPList()//获取服务人员列表
wx.showShareMenu({
withShareTicket: true,
menus: ["shareAppMessage", "shareTimeline"],
});
}, },
onShareTimeline() {
setTimeout(() => {
console.log("分享调用");
this.getReceive();
}, 2500);
let mall_UserInfo = uni.getStorageSync("mall_UserInfo")
let uid = mall_UserInfo ? mall_UserInfo.UserId : 0;
if(uid==0){
uid = uni.getStorageSync("pid")?uni.getStorageSync("pid").pid:0
}
let SmallShopId = mall_UserInfo ? mall_UserInfo.SmallShopId : 0;
if(SmallShopId == 0){//如果微店id为0 去找所属微店id
SmallShopId = mall_UserInfo ? mall_UserInfo.UserSmallShopId : 0;
}
let title =
this.g.app_share_title != null && this.g.app_share_title != "" ? this.g.app_share_title : this.g.name;
let imageUrl =
this.g.app_share_pic != null && this.g.app_share_pic != "" ? this.g.app_share_pic : this.g.cover_pic;
let id = this.id;
return {
title: title,
query: "id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId+ "&Up=" + this.Up,
imageUrl: imageUrl,
};
},
onShareAppMessage(res) {
setTimeout(() => {
console.log("分享朋友圈调用");
this.getReceive();
}, 2500);
let u = uni.getStorageSync("mall_UserInfo");
let uid = u.UserId ? u.UserId : 0;
if(uid==0){
uid = uni.getStorageSync("pid")?uni.getStorageSync("pid").pid:0
}
let SmallShopId = u.SmallShopId ? u.SmallShopId : 0;
if(SmallShopId == 0){//如果微店id为0 去找所属微店id
SmallShopId = u.UserSmallShopId? u.UserSmallShopId:0
}
return {
title: this.g.app_share_title != null && this.g.app_share_title != "" ? this.g.app_share_title : this.g.name,
path: "/pages/index/index?id=" + this.id + "&user_id=" + uid+ "&SmallShopId=" + SmallShopId+ "&Up=" + this.Up+'&JumpType=5',
imageUrl:this.g.app_share_pic != null && this.g.app_share_pic != "" ? this.g.app_share_pic : this.g.cover_pic,
};
},
created() { created() {
this.mc = this.$uiConfig.mainColor; this.mc = this.$uiConfig.mainColor;
this.pricecolor = this.$uiConfig.pricecolor; this.pricecolor = this.$uiConfig.pricecolor;
this.secondary = this.$uiConfig.secondary; this.secondary = this.$uiConfig.secondary;
this.nav = uni.getMenuButtonBoundingClientRect().top; this.nav = uni.getMenuButtonBoundingClientRect().top;
this.headStyle.paddingTop = this.nav +'px'; this.headStyle.paddingTop = this.nav +'px';
setTimeout(() => {
this.loading = false;
}, 100)
uni.createSelectorQuery().select(".headStatus").boundingClientRect(data=>{//目标节点 uni.createSelectorQuery().select(".headStatus").boundingClientRect(data=>{//目标节点
if(data && data.height){ if(data && data.height){
this.headH = data.height this.headH = data.height
...@@ -456,6 +566,48 @@ ...@@ -456,6 +566,48 @@
}).exec(); }).exec();
}, },
methods:{ methods:{
init() {
this.loading = true;
this.request2(
{
url: "/api/AppletStores/GetStoreInfo",
data: {
storeId: this.id,
},
},
(res) => {
if (res.resultCode == 1) {
this.g = res.data.storeInfo;
var richtext = this.g.storeProject;
this.detailContent = richtext;
this.loading = false;
//登录在调用评论接口
if (this.u) {
// this.initComments();
}
} else {
this.loading = false;
}
}
);
},
getSPList(){
this.request2({
url: '/api/AppletStores/GetServicePersonalList',
data: {pageIndex:1,pageSize:5,StoreId:this.id}
},
res => {
if (res.resultCode == 1) {
this.personalList = res.data.pageData
}
}
);
},
scrollHandler(e) { scrollHandler(e) {
console.log(e.detail.scrollTop) console.log(e.detail.scrollTop)
this.scrollTop = e.detail.scrollTop; this.scrollTop = e.detail.scrollTop;
...@@ -496,8 +648,41 @@ ...@@ -496,8 +648,41 @@
}, },
gophone(){ gophone(){
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: '18781360614' //仅为示例 phoneNumber: this.g.storeTel //仅为示例
}); });
},
getReceive() {
//分享进入调取领券接口
// 1-分享,2-购买并付款
this.request2(
{
url: "/api/AppletUser/ShareCoupon",
data: {
TriggerType: 1,
},
},
(res) => {
if (res.couponResultCode == 1) {
this.couponMessage = res.couponMessage;
this.showCoupons = true;
}
}
);
},
goLook() {
this.showCoupons = true;
// TODO套餐卡页面还没建
// uni.navigateTo({
// url: "/pages/coupon/index/index",
// });
},
closeBtn() {
this.showCoupons = false;
},
goPersonal(){//跳转到设计师列表
uni.navigateTo({
url: "/pages/reserve/personalList?id="+this.id,
})
} }
} }
} }
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"> ">
<scroll-view :scroll-y="true" @scrolltolower="lower" :enable-back-to-top="true" :enable-flex="true" :scroll-top="scrollTop" <scroll-view :scroll-y="true" @scrolltolower="lower" :enable-back-to-top="true" :enable-flex="true" :scroll-top="scrollTop"
style="height: 100%; padding-bottom: 0px;"> style="height: 100%; padding-bottom: 0px;">
<view class='store' style="padding: 7.5px 15px;" v-for="(c, i) in g" :key="i" @click="gostoreDetails()"> <view class='store' style="padding: 7.5px 15px;" v-for="(c, i) in g" :key="i" @click="gostoreDetails(c)">
<view class="box" > <view class="box" >
<image mode="aspectFill" class="img" :src="c.CoverImg" ></image> <image mode="aspectFill" class="img" :src="c.CoverImg" ></image>
<view class="content" > <view class="content" >
...@@ -33,10 +33,19 @@ ...@@ -33,10 +33,19 @@
<text class="tel">{{c.Tel}} </text> <text class="tel">{{c.Tel}} </text>
</view> </view>
<view style="font-size: 11px;color: #FFC86D;"> <view style="font-size: 11px;color: #FFC86D;">
上次消费的店铺 {{c.consumptionObj?c.consumptionObj.consumptionStoreName:''}}
</view> </view>
</view> </view>
</view> </view>
<view class="choice" @click.stop="radioChange">
<u-radio-group v-model="currentChosen" @change='radioChange'>
<u-radio
shape="circle"
:name="c.Id"
:icon-size="40"
:active-color="mainColor"> </u-radio>
</u-radio-group>
</view>
</view> </view>
</view> </view>
...@@ -71,7 +80,7 @@ ...@@ -71,7 +80,7 @@
loadText: { loadText: {
loadmore: "轻轻上拉,加载更多", loadmore: "轻轻上拉,加载更多",
loading: "努力加载中", loading: "努力加载中",
nomore: "没有更多商品了", nomore: "没有更多了",
}, },
list:[ list:[
{name: '距离'}, {name: '距离'},
...@@ -84,7 +93,8 @@ ...@@ -84,7 +93,8 @@
old: { old: {
scrollTop: 0, scrollTop: 0,
}, },
coupon_id: 0,
currentChosen: "",
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 10, pageSize: 10,
...@@ -98,9 +108,8 @@ ...@@ -98,9 +108,8 @@
onLoad(option) { onLoad(option) {
this.mainColor = this.$uiConfig.mainColor; this.mainColor = this.$uiConfig.mainColor;
if (option.position) {
this.msg.CurrentPosition = option.position; this.msg.CurrentPosition = uni.getStorageSync("position") && uni.getStorageSync("position").position?uni.getStorageSync("position").position:'';
}
}, },
mounted() { mounted() {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
...@@ -142,6 +151,14 @@ ...@@ -142,6 +151,14 @@
res => { res => {
this.loading = false; this.loading = false;
if (res.resultCode == 1) { if (res.resultCode == 1) {
let storeId = uni.getStorageSync("storeId") && uni.getStorageSync("storeId").storeId?uni.getStorageSync("storeId").storeId:0;
if(storeId>0){
res.data.pageData.forEach(x=>{
if(x.Id == storeId){
this.currentChosen = x.Id
}
})
}
this.g = this.g.concat(res.data.pageData); this.g = this.g.concat(res.data.pageData);
this.page_count = res.data.pageCount; this.page_count = res.data.pageCount;
if (this.page_count == 1) { if (this.page_count == 1) {
...@@ -167,12 +184,26 @@ ...@@ -167,12 +184,26 @@
this.status = "nomore"; this.status = "nomore";
} }
}, },
gostoreDetails() { gostoreDetails(item) {
uni.navigateTo({ uni.navigateTo({
url: "/pages/reserve/storeDetails", url: "/pages/reserve/storeDetails?id="+item.Id,
}); });
}, },
radioChange(e){
uni.setStorageSync("storeId", {storeId:this.currentChosen});
let pages = getCurrentPages(); // 当前页面
let beforePage = pages[pages.length - 2]; // 前一个页面
setTimeout(()=>{
uni.navigateBack({
delta:1,
success: function() {
beforePage.$vm.getCurrentStore(); // 执行前一个页面的方法
}
});
},100)
},
}, },
}; };
</script> </script>
...@@ -249,5 +280,16 @@ ...@@ -249,5 +280,16 @@
-webkit-line-clamp: 1; -webkit-line-clamp: 1;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
.storeList .choice{
position: absolute;
left: 0;
top: 0;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
}
</style> </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