Commit 53ad1e95 by songbingqi

修改 店铺选择 页面

parent 181d417f
<template> <template>
<view ew class="product-list"> <view ew class="product-list">
<view class="provice_city">
<view class="text">
<text>{{areaName.proviceName}}-</text>
<text v-show="areaName.proviceName!=areaName.cityName">{{areaName.cityName}}-</text>
<text>{{areaName.disName}}</text>
</view>
<view class="icon">
<image :style="{'height':'100%','width':'100%'}" :src="'../../../static/imgs/jiantouhei.png'" />
</view>
</view>
<div v-for="item in list" :key="item.id" @click="selectedShop(item)" class="shop_item"> <div v-for="item in list" :key="item.id" @click="selectedShop(item)" class="shop_item">
<div class="header"> <div class="header">
<h3>{{ item.name }}</h3> <h3>{{ item.name }}</h3>
<span v-if="item.distance && item.distance!=-1">距离 {{ item.distance }}</span> <view class="adressBox">
<view>
<u-icon class="map" name="map" color="#999999" size="14"></u-icon>
</view>
<view class="address">{{ item.address }}</view>
</view>
<view class="timeBox">
<view>
<u-icon name="clock" color="#999999" size="14"></u-icon>
</view>
<view class="time">{{ item.startTime }} - {{ item.endTime }}</view>
</view>
</div> </div>
<view class="line"></view>
<div class="dec"> <div class="dec">
<div class="address">{{ item.address }}</div> <view :style="{'height':'34rpx'}" v-show="item.distance && item.distance!=-1"></view>
<a class="xaidan">去下单</a> <view class="goshop"></view>
</div> <view :style="{'height':'34rpx'}" class="distance" v-show="item.distance && item.distance!=-1">距离 {{ item.distance }}</view>
<div class="time">
<u-icon name="clock" color="#2979ff" size="16"></u-icon>
<div>营业时间:{{ item.startTime }} - {{ item.endTime }}</div>
</div> </div>
</div> </div>
</view> </view>
...@@ -25,11 +44,13 @@ export default { ...@@ -25,11 +44,13 @@ export default {
return { return {
show: true, show: true,
columns: [], columns: [],
list: [] list: [],
areaName:{}
} }
}, },
onShow() { onShow() {
this.list = uni.getStorageSync('shops'); this.list = uni.getStorageSync('shops');
this.areaName = uni.getStorageSync('areaName')
}, },
methods: { methods: {
selectedShop(item) { selectedShop(item) {
...@@ -42,72 +63,108 @@ export default { ...@@ -42,72 +63,108 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.product-list{
background: #F2F2F2;
height:100vh ;
overflow: auto;
}
.provice_city{
height: 62rpx;
background: #FFFFFF;
display: flex;
justify-content: flex-start;
padding: 12rpx 32rpx;
align-items: center;
.text{
font-size: 26rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #000000;
line-height: 36rpx;
}
.icon {
width: 22rpx;
margin-left: 16rpx;
height: 24rpx;
display: flex;
align-items: center;
}
}
.shop_item { .shop_item {
width: 90%; width: 90%;
height: 264rpx; min-height: 264rpx;
background: #FFFFFF; background: #FFFFFF;
border-radius: 10rpx; border: 1px solid #003AE9;
border: 2rpx solid #006ECF; padding: 25rpx 32rpx;
padding: 32rpx;
box-sizing: border-box; box-sizing: border-box;
margin: 30rpx auto; margin: 30rpx auto;
display: flex;
justify-content: flex-start;
align-items: center;
.header { .header {
display: flex; margin-right: 30rpx;
align-items: center;
justify-content: space-between;
h3 { h3 {
font-size: 28rpx; font-size: 28rpx;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500; font-weight: 500;
color: #000000; color: #333333;
} }
.adressBox{
span { width: 348rpx;
font-size: 24rpx; margin-top: 14rpx;
font-family: PingFangSC-Regular, PingFang SC; display: flex;
font-weight: 400; justify-content: flex-start;
color: #666666; .address{
margin-left: 12rpx;
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
}
}
.timeBox{
margin-top: 11rpx;
display: flex;
align-items: center;
justify-content: flex-start;
.time{
margin-left: 12rpx;
font-size: 24rpx;
font-family: ArialMT;
color: #999999;
}
} }
} }
.line {
height: 146rpx;
border: 1rpx solid #979797;
}
.dec { .dec {
margin-left: 43rpx;
display: flex; display: flex;
justify-content: space-between; flex-direction: column;
margin-top: 22rpx; height: 146rpx;
justify-content: space-around;
.address { view{
font-size: 24rpx; vertical-align: baseline;
font-family: PingFangSC-Regular, }
.goshop {
width: 167rpx;
height: 64rpx;
background: url('@/static/imgs/qupinchang.png') center center no-repeat;
} }
.xaidan { .distance {
font-size: 24rpx; font-size: 24rpx;
font-family: PingFangSC-Medium, PingFang SC; font-family: PingFangSC-Regular, PingFang SC;
font-weight: 500; font-weight: 400;
color: #FFFFFF; color: #999999;
width: 150rpx;
min-width: 150rpx;
text-align: center; text-align: center;
height: 40rpx; line-height: 50rpx;
line-height: 40rpx;
background: #006ECF;
border-radius: 6px;
display: block;
margin-left: 20rpx;
} }
}
.time {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 20rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
margin-top: 30rpx;
} }
} }
</style> </style>
\ No newline at end of file
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
{ {
"path": "pages/areaSelect/areaSelect", "path": "pages/areaSelect/areaSelect",
"style": { "style": {
"navigationBarTitleText": "", "navigationBarTitleText": "选择门店",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }
......
...@@ -188,10 +188,17 @@ export default { ...@@ -188,10 +188,17 @@ export default {
changeHandler() { }, changeHandler() { },
confirm(res) { confirm(res) {
const { value } = res; const { value } = res;
console.log(value)
const areaName = {
proviceName:value[0]&&value[0].name,
cityName:value[1]&&value[1].name,
disName:value[2]&&value[2].name
}
const shops = value[2].shops; const shops = value[2].shops;
this.show = false; this.show = false;
// console.log(shops); // console.log(shops);
uni.setStorageSync('shops', shops); uni.setStorageSync('shops', shops);
uni.setStorageSync('areaName', areaName);
uni.navigateTo({ url: '/menuSubPackage/pages/areaSelect/areaSelect' }) uni.navigateTo({ url: '/menuSubPackage/pages/areaSelect/areaSelect' })
}, },
// 手机号授权登录 // 手机号授权登录
......
...@@ -167,6 +167,7 @@ button::after { ...@@ -167,6 +167,7 @@ button::after {
} }
.mod11 { .mod11 {
border-radius: 0rpx;
box-sizing: border-box; box-sizing: border-box;
padding: 32rpx; padding: 32rpx;
width: 686rpx; width: 686rpx;
...@@ -195,6 +196,9 @@ button::after { ...@@ -195,6 +196,9 @@ button::after {
border-radius: 50%; border-radius: 50%;
} }
} }
.mod11::after{
border-radius: 0rpx;
}
.contents { .contents {
display: flex; display: flex;
......
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