完善首页内容
This commit is contained in:
parent
5e413a021f
commit
2999d37de6
131
packages/community/list/index.css
Normal file
131
packages/community/list/index.css
Normal file
@ -0,0 +1,131 @@
|
||||
page {
|
||||
background-color: #f6f7fb;
|
||||
}
|
||||
|
||||
.community-list-container {
|
||||
padding: 20rpx;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.search-bar {
|
||||
background-color: #fff;
|
||||
padding: 20rpx;
|
||||
border-radius: 10rpx;
|
||||
margin-bottom: 20rpx;
|
||||
box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
|
||||
.search-input {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 50rpx;
|
||||
padding: 15rpx 20rpx;
|
||||
}
|
||||
|
||||
.search-icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
font-family: 'iconfont';
|
||||
color: #999;
|
||||
margin-right: 15rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.search-input input {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.community-list {
|
||||
border-radius: 10rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.community-item {
|
||||
padding: 20rpx;
|
||||
display: flex;
|
||||
margin-bottom: 15rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.community-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.community-image {
|
||||
width: 160rpx;
|
||||
height: 160rpx;
|
||||
border-radius: 10rpx;
|
||||
overflow: hidden;
|
||||
margin-right: 20rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.community-image image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.community-info {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.community-name {
|
||||
font-size: 32rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.community-address {
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
margin-top: 10rpx;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.community-distance {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
margin-top: 10rpx;
|
||||
}
|
||||
|
||||
/* 适配不同屏幕尺寸 */
|
||||
@media screen and (min-width: 768px) {
|
||||
.community-list-container {
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.community-item {
|
||||
padding: 30rpx;
|
||||
}
|
||||
|
||||
.community-image {
|
||||
width: 200rpx;
|
||||
height: 200rpx;
|
||||
}
|
||||
|
||||
.community-name {
|
||||
font-size: 36rpx;
|
||||
}
|
||||
|
||||
.community-address {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.community-distance {
|
||||
font-size: 26rpx;
|
||||
}
|
||||
}
|
||||
85
packages/community/list/index.vue
Normal file
85
packages/community/list/index.vue
Normal file
@ -0,0 +1,85 @@
|
||||
<template>
|
||||
<view class="community-list-container">
|
||||
<!-- <view class="search-bar">
|
||||
<view class="search-input">
|
||||
<image
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
|
||||
mode="aspectFill" class="search-icon"></image>
|
||||
<input type="text" placeholder="搜索社区" />
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="community-list">
|
||||
<view class="community-item" v-for="(item, index) in communityList" :key="index">
|
||||
<view class="community-image">
|
||||
<image :src="item.image" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="community-info">
|
||||
<view class="community-name">{{ item.name }}</view>
|
||||
<view class="community-address">{{ item.address }}</view>
|
||||
<view class="community-distance">{{ item.distance }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'CommunityList',
|
||||
data() {
|
||||
return {
|
||||
communityList: [
|
||||
{
|
||||
id: 1,
|
||||
name: '凯旋城东区',
|
||||
address: '衡水市,桃城-衡水市人民路与育才街交叉口西行100米路南',
|
||||
distance: '0 m',
|
||||
image: 'http://localhost:8080/test_community.png'
|
||||
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: '岸芷庭蓝(一区)',
|
||||
address: '衡水市,河阳西路与中华南大街交叉口东220米',
|
||||
distance: '1000 m',
|
||||
image: 'http://localhost:8080/test_community.png'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: '滏阳锦苑',
|
||||
address: '衡水市,滏阳苑',
|
||||
distance: '2 km',
|
||||
image: 'http://localhost:8080/test_community.png'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
name: '隆兴小区',
|
||||
address: '衡水市,河北省衡水市高新区隆兴西路隆兴小区',
|
||||
distance: '5 km',
|
||||
image: 'http://localhost:8080/test_community.png'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: '紫金广场',
|
||||
address: '衡水市,衡水市桃城区人民西路与庆丰南街交叉口',
|
||||
distance: '894 km',
|
||||
image: 'http://localhost:8080/test_community.png'
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: '万和瑞景',
|
||||
address: '衡水市,政通街46号',
|
||||
distance: '12249 km',
|
||||
image: 'http://localhost:8080/test_community.png'
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("./index.css");
|
||||
</style>
|
||||
@ -1,5 +1,4 @@
|
||||
.container {
|
||||
margin-top: 87rpx;
|
||||
padding: 0 15rpx;
|
||||
background-color: whte;
|
||||
}
|
||||
|
||||
@ -1,9 +1,9 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- 头部标题 -->
|
||||
<view class="header">
|
||||
<!-- <view class="header">
|
||||
<text class="title">榴园到家 服务至上</text>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 位置和搜索 -->
|
||||
<view class="location-search">
|
||||
|
||||
339
packages/localLife/classify/index.css
Normal file
339
packages/localLife/classify/index.css
Normal file
@ -0,0 +1,339 @@
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.container {
|
||||
/* padding-top: 100rpx; */
|
||||
}
|
||||
|
||||
.local {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 26rpx;
|
||||
color: #222222;
|
||||
box-sizing: border-box;
|
||||
padding: 20rpx;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
#local {
|
||||
height: 30rpx;
|
||||
width: 28.08rpx;
|
||||
margin-right: 17rpx;
|
||||
}
|
||||
|
||||
.u-icon {
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.search {
|
||||
background-color: #f6f7fb;
|
||||
padding: 20rpx 0;
|
||||
}
|
||||
|
||||
.searchBox {
|
||||
width: 710rpx;
|
||||
height: 70rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 100rpx 100rpx 100rpx 100rpx;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
align-items: center;
|
||||
padding-left: 30rpx;
|
||||
padding-right: 30rpx;
|
||||
}
|
||||
|
||||
.searchBox image {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
|
||||
.swiperBox {
|
||||
height: 350rpx;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.swiper {
|
||||
height: 350rpx;
|
||||
width: 100%;
|
||||
/* position: relative; */
|
||||
}
|
||||
|
||||
.navList {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
box-sizing: border-box;
|
||||
height: 350rpx;
|
||||
width: 100%;
|
||||
padding: 30rpx 20rpx;
|
||||
background-color: #fff;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.navItem {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 116rpx;
|
||||
height: 105rpx;
|
||||
margin-right: 34rpx;
|
||||
margin-bottom: 43rpx;
|
||||
}
|
||||
|
||||
.navItemImg {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.navItem image {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
|
||||
.navItem:nth-child(5n) {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.dot {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-top: 20rpx;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 25rpx;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.dotItem {
|
||||
width: 8rpx;
|
||||
height: 8rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #E6E6E6;
|
||||
margin-right: 5rpx;
|
||||
}
|
||||
|
||||
.actives {
|
||||
width: 20rpx;
|
||||
height: 8rpx;
|
||||
background: #FF370B;
|
||||
border-radius: 10rpx 10rpx 10rpx 10rpx;
|
||||
}
|
||||
|
||||
.scrollBox {
|
||||
background-color: #f6f7fb;
|
||||
padding-bottom: 25rpx;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.scrollView {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
padding: 0 14rpx;
|
||||
}
|
||||
|
||||
|
||||
.scroll-viewItem {
|
||||
display: flex;
|
||||
white-space: nowrap;
|
||||
height: 54rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 10rpx 10rpx 10rpx 10rpx;
|
||||
border: 1rpx solid #FFFFFF;
|
||||
padding: 10rpx 18rpx;
|
||||
margin-right: 10rpx;
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.scroll-viewItem image {
|
||||
width: 22rpx;
|
||||
height: 22rpx;
|
||||
position: absolute;
|
||||
left: 7rpx;
|
||||
top: 5rpx;
|
||||
}
|
||||
|
||||
.btnList {
|
||||
width: 389rpx;
|
||||
height: 119rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 100rpx 100rpx 100rpx 100rpx;
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
bottom: 200rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.btnList_after {
|
||||
width: 389rpx;
|
||||
height: 119rpx;
|
||||
filter: blur(8.600000381469727rpx);
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
border-radius: 100rpx 100rpx 100rpx 100rpx;
|
||||
position: fixed;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
bottom: 200rpx;
|
||||
border-radius: 100rpx 100rpx 100rpx 100rpx;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.btn_left {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 22rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.btn_left image {
|
||||
width: 47.97rpx;
|
||||
height: 44.79rpx;
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
|
||||
.btn_right {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 22rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.btn_right image {
|
||||
height: 47rpx;
|
||||
width: 47rpx;
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
|
||||
.line {
|
||||
width: 1rpx;
|
||||
height: 82rpx;
|
||||
border-image: linear-gradient(90deg, rgba(255, 255, 255, 1), rgba(215, 215, 215, 1), rgba(255, 255, 255, 1)) 1 1;
|
||||
}
|
||||
|
||||
.lines {
|
||||
background-color: #f5f7f9;
|
||||
height: 40rpx;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.merchantList {
|
||||
padding: 0 20rpx;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.merchantItem {
|
||||
display: flex;
|
||||
padding-top: 30px;
|
||||
padding-bottom: 30rpx;
|
||||
border-bottom: 1rpx solid #EBEBEB;
|
||||
;
|
||||
}
|
||||
|
||||
.merchantItem_left {
|
||||
width: 180rpx;
|
||||
height: 180rpx;
|
||||
border-radius: 20rpx 20rpx 20rpx 20rpx;
|
||||
overflow: hidden;
|
||||
margin-right: 24rpx;
|
||||
}
|
||||
|
||||
.merchantItem_left image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.merchantItem_right {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.merchantItem_right_tit {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.merchantItem_right_tit_left {
|
||||
font-size: 30rpx;
|
||||
color: #222222;
|
||||
}
|
||||
|
||||
.merchantItem_right_tit_right {
|
||||
font-size: 24rpx;
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
.merchantItem_right_con {
|
||||
margin-top: 14rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.merchangtItem_tag {
|
||||
font-size: 22rpx;
|
||||
color: #555555;
|
||||
padding: 5rpx 12rpx;
|
||||
white-space: nowrap;
|
||||
background: rgba(255, 81, 42, 0.1);
|
||||
border-radius: 100rpx 100rpx 100rpx 100rpx;
|
||||
display: inline-block;
|
||||
margin-top: 20rpx;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.startList {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.startList image {
|
||||
width: 22rpx;
|
||||
height: 22rpx;
|
||||
margin-right: 3rpx;
|
||||
}
|
||||
|
||||
.merchantItem_right_con_right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 26rpx;
|
||||
color: #000000;
|
||||
|
||||
}
|
||||
|
||||
.merchantItem_right_con_right image {
|
||||
width: 32rpx;
|
||||
height: 28.59rpx;
|
||||
margin-bottom: 6rpx;
|
||||
}
|
||||
|
||||
.merchantItem_right_add {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
margin-top: 14rpx;
|
||||
}
|
||||
214
packages/localLife/classify/index.vue
Normal file
214
packages/localLife/classify/index.vue
Normal file
@ -0,0 +1,214 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<view class="local">
|
||||
<image id="local" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_localIcon.png"
|
||||
mode="aspectFill"></image>
|
||||
{{ address }}
|
||||
<u-icon name="arrow-down" color="#999999" size="28"></u-icon>
|
||||
</view>
|
||||
|
||||
<view class="search">
|
||||
<view class="searchBox">
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
|
||||
mode="aspectFill"></image>
|
||||
<input type="text" placeholder="请输入您想搜索的内容" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="merchantList">
|
||||
<view class="merchantItem" v-for="item in merchatList" :key="item.id" @click="Info(item)">
|
||||
<view class="merchantItem_left">
|
||||
<image :src="picUrl + item.bigImg[0]" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="merchantItem_right">
|
||||
<view class="merchantItem_right_tit">
|
||||
<view class="merchantItem_right_tit_left">
|
||||
{{ item.merchant_name }}
|
||||
</view>
|
||||
<view class="merchantItem_right_tit_right">
|
||||
{{ item.distances }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="merchantItem_right_con">
|
||||
<view class="merchantItem_right_con_left">
|
||||
<view class="startList">
|
||||
<image v-for="index in 5" :key="index" :src="index < item.rating
|
||||
? 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_start1.png'
|
||||
: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_start2.png'
|
||||
" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="merchangtItem_tag" v-if="item.refund_property_fee_ratio">
|
||||
买单返物业费
|
||||
</view>
|
||||
<view class="merchangtItem_tag" v-if="item.refund_user_points_ratio">
|
||||
买单返积分
|
||||
</view>
|
||||
</view>
|
||||
<view class="merchantItem_right_con_right" @click="toJump(item)">
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_review.png"
|
||||
mode="aspectFill"></image>
|
||||
点评
|
||||
</view>
|
||||
</view>
|
||||
<view class="merchantItem_right_add">
|
||||
{{ item.comAddress }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="btnList">
|
||||
<view class="btn_left">
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_serverIcon.png"
|
||||
mode="aspectFill"></image>
|
||||
到店服务券
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="btn_right">
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/lcoal_payIcon.png"
|
||||
mode="aspectFill"></image>
|
||||
快捷支付记录
|
||||
</view>
|
||||
</view>
|
||||
<view class="btnList_after"></view>
|
||||
|
||||
<!-- <nav-footer :current="2" /> -->
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
request,
|
||||
picUrl,
|
||||
uniqueByField,
|
||||
menuButtonInfo,
|
||||
calculateDistance,
|
||||
NavgateTo,
|
||||
} from "../../../utils";
|
||||
|
||||
import { apiArr } from "../../../api/v2local";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
picUrl,
|
||||
top: "",
|
||||
localHeight: "",
|
||||
swiperList: [],
|
||||
currentIndex: 0,
|
||||
checkedItems: [false, false, false, false],
|
||||
address: "",
|
||||
page_size: "10",
|
||||
page_num: "1",
|
||||
flag: false,
|
||||
merchatList: [],
|
||||
|
||||
changeId: "",
|
||||
|
||||
};
|
||||
},
|
||||
onLoad(options) {
|
||||
this.changeId = JSON.parse(options.item).id;
|
||||
const meun = menuButtonInfo();
|
||||
this.top = meun.top;
|
||||
// this.top = meun.height + meun.top;
|
||||
this.localHeight = meun.height;
|
||||
this.getCateList();
|
||||
this.getMechantList();
|
||||
this.address = uni.getStorageSync("location").address;
|
||||
console.log(this.address);
|
||||
},
|
||||
|
||||
onReachBottom() {
|
||||
if (this.flag) {
|
||||
this.getMechantList();
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
swiperChange(e) {
|
||||
this.currentIndex = e.detail.current;
|
||||
},
|
||||
|
||||
checkItem(index) {
|
||||
this.$set(this.checkedItems, index, !this.checkedItems[index]);
|
||||
},
|
||||
//查询商家分类
|
||||
async getCateList() {
|
||||
let that = this;
|
||||
await request(apiArr.getMerChantCateList, "POST").then((res) => {
|
||||
res.rows = res.rows.filter((item) => item.is_visible == 1)
|
||||
console.log(res);
|
||||
// 将数据分成每10个一组
|
||||
const chunkSize = 10;
|
||||
that.swiperList = [];
|
||||
for (let i = 0; i < res.rows.length; i += chunkSize) {
|
||||
that.swiperList.push(res.rows.slice(i, i + chunkSize));
|
||||
}
|
||||
});
|
||||
},
|
||||
//查询商家列表
|
||||
async getMechantList() {
|
||||
let that = this;
|
||||
const params = {
|
||||
merchant_cate_id: this.changeId,
|
||||
page_num: that.page_num,
|
||||
page_size: that.page_size,
|
||||
}
|
||||
await request(apiArr.getMerchantList, "POST", params).then((res) => {
|
||||
let latitude = uni.getStorageSync("location").lat;
|
||||
let longitude = uni.getStorageSync("location").lng;
|
||||
res.rows.forEach((item) => {
|
||||
item.bigImg = item.album_images.split(",");
|
||||
const distanceInKm = calculateDistance(
|
||||
latitude,
|
||||
longitude,
|
||||
item.latitude,
|
||||
item.longitude
|
||||
);
|
||||
item.distances =
|
||||
distanceInKm >= 1
|
||||
? `${distanceInKm.toFixed(1)}km`
|
||||
: `${(distanceInKm * 1000).toFixed(1)}m`;
|
||||
|
||||
if (item.ad) {
|
||||
item.comAddress = item.ad.ad_name.replace(/,/g, "") + item.address;
|
||||
} else {
|
||||
item.comAddress = item.address;
|
||||
}
|
||||
});
|
||||
res.rows.sort((a, b) => {
|
||||
const valueA =
|
||||
parseFloat(a.distances.replace("km", "").replace("m", "")) *
|
||||
(a.distances.includes("km") ? 1000 : 1);
|
||||
const valueB =
|
||||
parseFloat(b.distances.replace("km", "").replace("m", "")) *
|
||||
(b.distances.includes("km") ? 1000 : 1);
|
||||
return valueA - valueB;
|
||||
});
|
||||
|
||||
if (res.rows.length == this.page_size) {
|
||||
this.page_num = this.page_num + 1;
|
||||
this.flag = true;
|
||||
} else {
|
||||
this.flag = false;
|
||||
}
|
||||
this.merchatList = this.merchatList.concat(res.rows);
|
||||
});
|
||||
},
|
||||
//跳转商家详情
|
||||
Info(e) {
|
||||
uni.setStorageSync("merchantInfo", e);
|
||||
NavgateTo("../detail/index");
|
||||
},
|
||||
//跳转点评
|
||||
toJump(e) {
|
||||
NavgateTo('../comment/index');
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
@import url("./index.css");
|
||||
</style>
|
||||
@ -86,9 +86,17 @@ page {
|
||||
margin-bottom: 43rpx;
|
||||
}
|
||||
|
||||
.navItemImg {
|
||||
width: 70rpx;
|
||||
height: 70rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.navItem image {
|
||||
width: 70rpx;
|
||||
height: auto;
|
||||
height: 70rpx;
|
||||
}
|
||||
|
||||
.navItem:nth-child(5n) {
|
||||
@ -126,6 +134,7 @@ page {
|
||||
padding-bottom: 25rpx;
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
|
||||
.scrollView {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -223,11 +232,13 @@ page {
|
||||
height: 82rpx;
|
||||
border-image: linear-gradient(90deg, rgba(255, 255, 255, 1), rgba(215, 215, 215, 1), rgba(255, 255, 255, 1)) 1 1;
|
||||
}
|
||||
|
||||
.lines {
|
||||
background-color: #f5f7f9;
|
||||
height: 40rpx;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.merchantList {
|
||||
padding: 0 20rpx;
|
||||
width: 100%;
|
||||
@ -238,7 +249,8 @@ page {
|
||||
display: flex;
|
||||
padding-top: 30px;
|
||||
padding-bottom: 30rpx;
|
||||
border-bottom: 1rpx solid #EBEBEB;;
|
||||
border-bottom: 1rpx solid #EBEBEB;
|
||||
;
|
||||
}
|
||||
|
||||
.merchantItem_left {
|
||||
|
||||
@ -1,145 +1,112 @@
|
||||
<template>
|
||||
<div class="container">
|
||||
<div class="local">
|
||||
<image
|
||||
id="local"
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_localIcon.png"
|
||||
mode="aspectFill"
|
||||
></image>
|
||||
<view class="container">
|
||||
<view class="local">
|
||||
<image id="local" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_localIcon.png"
|
||||
mode="aspectFill"></image>
|
||||
{{ address }}
|
||||
<u-icon name="arrow-down" color="#999999" size="28"></u-icon>
|
||||
</div>
|
||||
</view>
|
||||
|
||||
<div class="search">
|
||||
<div class="searchBox">
|
||||
<image
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
|
||||
mode="aspectFill"
|
||||
></image>
|
||||
<view class="search">
|
||||
<view class="searchBox">
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/com_communitySearchIcon.png"
|
||||
mode="aspectFill"></image>
|
||||
<input type="text" placeholder="请输入您想搜索的内容" />
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<div class="swiperBox">
|
||||
<view class="swiperBox">
|
||||
<swiper class="swiper" @change="swiperChange" :current="currentIndex">
|
||||
<swiper-item v-for="(page, pageIndex) in swiperList" :key="pageIndex">
|
||||
<div class="navList">
|
||||
<div
|
||||
class="navItem"
|
||||
v-for="(item, itemIndex) in page"
|
||||
:key="itemIndex"
|
||||
>
|
||||
<view class="navList">
|
||||
<view class="navItem" v-for="(item, itemIndex) in page" :key="itemIndex" @click="changeNav(item)">
|
||||
<view class="navItemImg">
|
||||
<image :src="picUrl + item.cate_image" mode="widthFix"></image>
|
||||
<div class="navName">{{ item.cate_name }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
<view class="navName">{{ item.cate_name }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
<div class="dot">
|
||||
<div
|
||||
class="dotItem"
|
||||
v-for="(page, index) in swiperList" :key="index"
|
||||
:class="currentIndex == index ? 'actives' : ''"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
<view class="dot">
|
||||
<view class="dotItem" v-for="(page, index) in swiperList" :key="index"
|
||||
:class="currentIndex == index ? 'actives' : ''"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<div class="lines"></div>
|
||||
<view class="lines"></view>
|
||||
<!-- <scroll-view scroll-x="true" enhanced enable-flex class="scrollBox">
|
||||
<div class="scrollView">
|
||||
<div class="scroll-viewItem" v-for="(item, index) in 4" @click="checkItem(index)">
|
||||
<view class="scrollView">
|
||||
<view class="scroll-viewItem" v-for="(item, index) in 4" @click="checkItem(index)">
|
||||
<image v-show="!checkedItems[index]" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_uncheck.png"
|
||||
mode="aspectFill"></image>
|
||||
<image v-show="checkedItems[index]" src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local-check.png"
|
||||
mode="aspectFill"></image>
|
||||
买单返物业费
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view> -->
|
||||
|
||||
<div class="merchantList">
|
||||
<div
|
||||
class="merchantItem"
|
||||
v-for="item in merchatList"
|
||||
:key="item.id"
|
||||
@click="Info(item)"
|
||||
>
|
||||
<div class="merchantItem_left">
|
||||
<view class="merchantList">
|
||||
<view class="merchantItem" v-for="item in merchatList" :key="item.id" @click="Info(item)">
|
||||
<view class="merchantItem_left">
|
||||
<image :src="picUrl + item.bigImg[0]" mode="aspectFill"></image>
|
||||
</div>
|
||||
<div class="merchantItem_right">
|
||||
<div class="merchantItem_right_tit">
|
||||
<div class="merchantItem_right_tit_left">
|
||||
</view>
|
||||
<view class="merchantItem_right">
|
||||
<view class="merchantItem_right_tit">
|
||||
<view class="merchantItem_right_tit_left">
|
||||
{{ item.merchant_name }}
|
||||
</div>
|
||||
<div class="merchantItem_right_tit_right">
|
||||
</view>
|
||||
<view class="merchantItem_right_tit_right">
|
||||
{{ item.distances }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="merchantItem_right_con">
|
||||
<div class="merchantItem_right_con_left">
|
||||
<div class="startList">
|
||||
<image
|
||||
v-for="index in 5"
|
||||
:key="index"
|
||||
:src="
|
||||
index < item.rating
|
||||
</view>
|
||||
</view>
|
||||
<view class="merchantItem_right_con">
|
||||
<view class="merchantItem_right_con_left">
|
||||
<view class="startList">
|
||||
<image v-for="index in 5" :key="index" :src="index < item.rating
|
||||
? 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_start1.png'
|
||||
: 'https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_start2.png'
|
||||
"
|
||||
mode="aspectFill"
|
||||
></image>
|
||||
</div>
|
||||
<div
|
||||
class="merchangtItem_tag"
|
||||
v-if="item.refund_property_fee_ratio"
|
||||
>
|
||||
" mode="aspectFill"></image>
|
||||
</view>
|
||||
<view class="merchangtItem_tag" v-if="item.refund_property_fee_ratio">
|
||||
买单返物业费
|
||||
</div>
|
||||
<div
|
||||
class="merchangtItem_tag"
|
||||
v-if="item.refund_user_points_ratio"
|
||||
>
|
||||
</view>
|
||||
<view class="merchangtItem_tag" v-if="item.refund_user_points_ratio">
|
||||
买单返积分
|
||||
</div>
|
||||
</div>
|
||||
<div class="merchantItem_right_con_right" @click="toJump(item)">
|
||||
<image
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_review.png"
|
||||
mode="aspectFill"
|
||||
></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="merchantItem_right_con_right" @click="toJump(item)">
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_review.png"
|
||||
mode="aspectFill"></image>
|
||||
点评
|
||||
</div>
|
||||
</div>
|
||||
<div class="merchantItem_right_add">
|
||||
</view>
|
||||
</view>
|
||||
<view class="merchantItem_right_add">
|
||||
{{ item.comAddress }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<div class="btnList">
|
||||
<div class="btn_left">
|
||||
<image
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_serverIcon.png"
|
||||
mode="aspectFill"
|
||||
></image>
|
||||
<view class="btnList">
|
||||
<view class="btn_left">
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/local_serverIcon.png"
|
||||
mode="aspectFill"></image>
|
||||
到店服务券
|
||||
</div>
|
||||
<div class="line"></div>
|
||||
<div class="btn_right">
|
||||
<image
|
||||
src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/lcoal_payIcon.png"
|
||||
mode="aspectFill"
|
||||
></image>
|
||||
</view>
|
||||
<view class="line"></view>
|
||||
<view class="btn_right">
|
||||
<image src="https://wechat-img-file.oss-cn-beijing.aliyuncs.com/property-img-file/lcoal_payIcon.png"
|
||||
mode="aspectFill"></image>
|
||||
快捷支付记录
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnList_after"></div>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btnList_after"></view>
|
||||
|
||||
<!-- <nav-footer :current="2" /> -->
|
||||
</div>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -192,6 +159,13 @@ export default {
|
||||
this.currentIndex = e.detail.current;
|
||||
},
|
||||
|
||||
changeNav(item) {
|
||||
console.log("🚀 ~ changeNav ~ item:", item)
|
||||
NavgateTo(`/packages/localLife/classify/index?item=${JSON.stringify(item)}`)
|
||||
|
||||
},
|
||||
|
||||
|
||||
checkItem(index) {
|
||||
this.$set(this.checkedItems, index, !this.checkedItems[index]);
|
||||
},
|
||||
|
||||
72
pages.json
72
pages.json
@ -279,6 +279,13 @@
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "list/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "湖畔社区",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -490,6 +497,13 @@
|
||||
"pages": [
|
||||
{
|
||||
"path": "index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "本地生活",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "classify/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
@ -648,6 +662,13 @@
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationBarTitleText": "添加收货地址"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "creditsExchange/index",
|
||||
"style": {
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationBarTitleText": "积分商城"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -657,11 +678,8 @@
|
||||
{
|
||||
"path": "index/index",
|
||||
"style": {
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"nav-footer": "/components/nav/nav"
|
||||
}
|
||||
"navigationBarTitleText": "榴园到家 服务至上",
|
||||
"navigationBarBackgroundColor": "#fff"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -774,7 +792,8 @@
|
||||
{
|
||||
"path": "orderDetails/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "我的订单"
|
||||
"navigationBarTitleText": "我的订单",
|
||||
"navigationBarBackgroundColor": "#ff5601"
|
||||
}
|
||||
},
|
||||
{
|
||||
@ -806,6 +825,47 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "评价"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pending/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商家处理"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "sendBack/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "自行寄回"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "returnLogistics/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "填写退货物流"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "refundOver/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "退款结束"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "apply/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "申请退货退款"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "packages/payTheFees",
|
||||
"pages": [
|
||||
{
|
||||
"path": "index/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": ""
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user