Commit 75cb9772 authored by Mac's avatar Mac

修改详情 列表

parent 1a5bb0a5
......@@ -9,40 +9,43 @@
}"
@click="goUrl" >
<view class="box" :style="{'border-radius':goods.SearchFilletPX+'px'}" v-if="goods.IsShowStoreImg==true">
<image mode="aspectFill" class="img" :style="{'border-radius':goods.SearchFilletPX+'px'}" :src="storeInfo.storeCoverImg" ></image>
<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>
<view class="switchstore" @click.stop="goStorelist()">
<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 class="switchstore-box">
<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 class="content" >
<view class="c-t">
<view class="c-t-l">
{{storeInfo.storeName?storeInfo.storeName:'暂无数据'}}
{{storeinfo.storeName?storeinfo.storeName:'暂无数据'}}
</view>
<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 class="address">
{{storeInfo.storeAddress?storeInfo.storeAddress:''}}
{{storeinfo.storeAddress?storeinfo.storeAddress:''}}
</view>
<view class="c-t" style="justify-content: space-between;">
<view>
<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 style="font-size: 11px;color: #FFC86D;">
{{storeInfo.consumptionObj?storeInfo.consumptionObj.consumptionStoreName:''}}
{{storeinfo.consumptionObj?storeinfo.consumptionObj.consumptionStoreName:''}}
</view>
</view>
</view>
</view>
<view v-else>
<view v-else @click="gostoreDetails">
<view class="content2" >
<view class="c-t">
<view class="c-t-l">
{{storeInfo.storeName?storeInfo.storeName:'暂无数据'}}
{{storeinfo.storeName?storeinfo.storeName:'暂无数据'}}
</view>
<view class="c-t-r" style="width: 80px;display: flex;flex-direction: row;align-items: center;justify-content: flex-end;">
......@@ -54,18 +57,18 @@
</view>
<view class="address">
<view class="c-t-l" style="font-size: 11px;color: #727272;">
{{storeInfo.storeAddress?storeInfo.storeAddress:''}}
{{storeinfo.storeAddress?storeinfo.storeAddress:''}}
</view>
<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 class="c-t" style="justify-content: space-between;">
<view>
<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 style="font-size: 11px;color: #FFC86D;">
{{storeInfo.consumptionObj?storeInfo.consumptionObj.consumptionStoreName:''}}
{{storeinfo.consumptionObj?storeinfo.consumptionObj.consumptionStoreName:''}}
</view>
</view>
</view>
......@@ -75,25 +78,16 @@
<script>
export default {
props: ['goods'],
props: ['goods','storeinfo'],
data() {
return {
windowWidth: 0,
posiTop: 0,
storeInfo: {},
storeinfo: {},
position:'',
}
},
created() {
this.getCurrentStore()
let that = this
uni.getLocation({
type: 'wgs84',
success: function (res) {
that.position= res.latitude+','+res.longitude;
}
});
},
methods:{
goUrl(){
......@@ -106,17 +100,22 @@
data: {storeId:0,position:this.position},
},
(res) => {
if(res.data && res.data.storeInfo){
this.storeInfo = res.data.storeInfo
if(res.data && res.data.storeinfo){
this.storeinfo = res.data.storeinfo
}
}
);
},
goStorelist(){//门店选择
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>
......@@ -204,8 +203,16 @@
}
.store .switchstore{
position: absolute;
top: 5px;
right: 5px;
top: 0px;
right: 0px;
width: 80px;
height: 25px;
display: flex;
align-items: center;
justify-content: center;
}
.store .switchstore-box{
width: 60px;
height: 15px;
display: flex;
......
......@@ -92,7 +92,9 @@ export default {
},
methods: {
openGood(item) {
uni.navigateTo({ url: '/pages/goods/goods?GoodsId=' + item.id });
uni.navigateTo({
url: "/pages/reserve/storeDetails?id="+item.Id,
});
},
showSkuHandler(g) {
this.sku = g;
......
......@@ -88,7 +88,9 @@ export default {
},
methods: {
openGood(item) {
uni.navigateTo({ url: '/pages/goods/goods?GoodsId=' + item.id });
uni.navigateTo({
url: "/pages/reserve/storeDetails?id="+item.Id,
});
},
showSkuHandler(g) {
this.sku = g;
......
......@@ -73,7 +73,9 @@ export default {
},
methods: {
openGood(item) {
uni.navigateTo({ url: '/pages/goods/goods?GoodsId=' + item.id });
uni.navigateTo({
url: "/pages/reserve/storeDetails?id="+item.Id,
});
},
showSkuHandler(g) {
this.sku = g;
......
......@@ -77,20 +77,20 @@
}
]
},
{
"root": "pages/live",
"plugins": {
"live-player-plugin": {
"version": "1.2.2",
"provider": "wx2b03c6e691cd7370"
}
},
"pages": [{
"path": "index"
}, {
"path": "share"
}]
},
// {
// "root": "pages/live",
// "plugins": {
// "live-player-plugin": {
// "version": "1.2.2",
// "provider": "wx2b03c6e691cd7370"
// }
// },
// "pages": [{
// "path": "index"
// }, {
// "path": "share"
// }]
// },
{
"root": "pages/user-center",
"pages": [{
......@@ -420,6 +420,8 @@
"style": {
"navigationStyle": "custom"
}
},{
"path":"personalList"
}
]
},
......
......@@ -16,7 +16,7 @@
<u-icon name="arrow-left" size="44"></u-icon>
</view>
</view>
<button type="default" open-type="getPhoneNumber" @getphonenumber='getphonenumber'>获取手机号码</button>
<!-- <button type="default" open-type="getPhoneNumber" @getphonenumber='getphonenumber'>获取手机号码</button> -->
<u-tabs
v-if="myPageData.home_pages && myPageData.home_pages.navs.length > 1"
name="name"
......@@ -62,7 +62,7 @@
<argoods v-if="d.id == 'educationArticle'" :goods="d.data"></argoods>
<!-- 最近学习组件 -->
<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>
......@@ -158,6 +158,8 @@ export default {
isNavPosition:0, //设置搜索框位置
IsOpenSchool:0,
OrderId:0,
storePosition:'',//线下服务获取经纬度
storeInfo: {},
};
},
components: {
......@@ -376,6 +378,18 @@ export default {
});
// #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();
let set = uni.getStorageSync("basedata")
......@@ -391,6 +405,8 @@ export default {
this.isShowBack();
uni.showNavigationBarLoading();
},
created(){
},
// #ifdef MP-WEIXIN
onShareTimeline() {
......@@ -647,18 +663,20 @@ export default {
init() {
let mall_IsOpenSchool = uni.getStorageSync("mall_UserInfo")?uni.getStorageSync("mall_UserInfo").IsOpenSchool:0
let open_school=0;
console.log(this.IsOpenSchool,mall_IsOpenSchool)
if(this.IsOpenSchool==1 && mall_IsOpenSchool==1){//this.IsOpenSchool 通过分享进来的 是否是校园 1 是0不是 mall_IsOpenSchool缓存获取校园模式开启没有
open_school=1
}else{
open_school=0
}
let storeId = uni.getStorageSync("storeId") && uni.getStorageSync("storeId").storeId?uni.getStorageSync("storeId").storeId:0;
this.request2(
{
url: "/api/Mall/GetHome",
data: {
page_id: this.pageId,
open_school:open_school,
StoreId:storeId,
},
},
(res) => {
......@@ -727,6 +745,26 @@ export default {
(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() {
let Id = uni.getStorageSync("mall_UserInfo")
? 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>
This diff is collapsed.
......@@ -12,7 +12,7 @@
">
<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='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" >
<image mode="aspectFill" class="img" :src="c.CoverImg" ></image>
<view class="content" >
......@@ -33,10 +33,19 @@
<text class="tel">{{c.Tel}} </text>
</view>
<view style="font-size: 11px;color: #FFC86D;">
上次消费的店铺
{{c.consumptionObj?c.consumptionObj.consumptionStoreName:''}}
</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>
......@@ -71,7 +80,7 @@
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多商品了",
nomore: "没有更多了",
},
list:[
{name: '距离'},
......@@ -84,7 +93,8 @@
old: {
scrollTop: 0,
},
coupon_id: 0,
currentChosen: "",
msg: {
pageIndex: 1,
pageSize: 10,
......@@ -98,9 +108,8 @@
onLoad(option) {
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() {
uni.setNavigationBarTitle({
......@@ -142,6 +151,14 @@
res => {
this.loading = false;
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.page_count = res.data.pageCount;
if (this.page_count == 1) {
......@@ -167,12 +184,26 @@
this.status = "nomore";
}
},
gostoreDetails() {
gostoreDetails(item) {
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>
......@@ -249,5 +280,16 @@
-webkit-line-clamp: 1;
-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>
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