|
|
@ -1,112 +1,6 @@ |
|
|
|
<template> |
|
|
|
<view class="page"> |
|
|
|
|
|
|
|
<navbar/> |
|
|
|
|
|
|
|
<view class="search"> |
|
|
|
|
|
|
|
<view @click="showSelectArea" class="left-area"> |
|
|
|
<image src="@/static/image/home/address-icon.png"></image> |
|
|
|
<view class="area">{{ area }}</view> |
|
|
|
<image src="@/static/image/home/arrow-icon.png" mode="aspectFit"></image> |
|
|
|
<view class="parting-line">|</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="center-area"> |
|
|
|
<image |
|
|
|
style="margin-right: 20rpx;" |
|
|
|
src="@/static/image/home/search-icon.png"></image> |
|
|
|
<input v-model="queryParams.title" |
|
|
|
placeholder="桌布租赁" /> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- <view class="right-area"> |
|
|
|
<view @click="searchAddress" class="search-button"> |
|
|
|
搜索 |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="swipe"> |
|
|
|
<uv-swiper |
|
|
|
:list="bannerList" |
|
|
|
indicator |
|
|
|
height="320rpx" |
|
|
|
keyName="url"></uv-swiper> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 水洗店 --> |
|
|
|
<view class="userShop" |
|
|
|
v-if="userShop"> |
|
|
|
<view class="list"> |
|
|
|
<view class="item" |
|
|
|
v-for="(item, index) in 4" |
|
|
|
:key="index"> |
|
|
|
<view class=""> |
|
|
|
<view class=""> |
|
|
|
我的客户 |
|
|
|
</view> |
|
|
|
<view class="num"> |
|
|
|
{{ 30 }} |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class=""> |
|
|
|
<image :src="`/static/image/home/${index}.png`" mode=""></image> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- 酒店 --> |
|
|
|
<view class="user" |
|
|
|
v-else> |
|
|
|
<uv-notice-bar |
|
|
|
fontSize="28rpx" |
|
|
|
:text="text"></uv-notice-bar> |
|
|
|
|
|
|
|
<view class="shop"> |
|
|
|
<image |
|
|
|
class="image" |
|
|
|
src="https://img95.699pic.com/photo/50058/1378.jpg_wh860.jpg" |
|
|
|
mode=""></image> |
|
|
|
<view class="shopInfo"> |
|
|
|
<view class="title"> |
|
|
|
HOUS水洗店 |
|
|
|
</view> |
|
|
|
<view class="tags"> |
|
|
|
<view class="tag"> |
|
|
|
桌布水洗 |
|
|
|
</view> |
|
|
|
<view class="tag"> |
|
|
|
桌布租赁 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="time"> |
|
|
|
9:00-18:00 |
|
|
|
</view> |
|
|
|
<view class="address"> |
|
|
|
长沙市天心区桂花坪街道231号 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="btns"> |
|
|
|
<view class="btn" |
|
|
|
@click="$utils.navigateTo('/pages_order/auth/wxUserInfo')"> |
|
|
|
我要水洗 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="tips"> |
|
|
|
关联门店:主信门店 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="productList"> |
|
|
|
<productList/> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<!-- <selectArea ref="selectArea" @close="closeAreaPro" @select="selectArea"></selectArea> --> |
|
|
|
|
|
|
|
<PrivacyAgreementPoup/> |
|
|
|
|
|
|
@ -116,83 +10,19 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import PrivacyAgreementPoup from '@/components/config/PrivacyAgreementPoup.vue' |
|
|
|
import Position from '@/utils/position.js' |
|
|
|
import tabber from '@/components/base/tabbar.vue' |
|
|
|
import productList from '@/components/user/productList.vue' |
|
|
|
import { mapGetters } from 'vuex' |
|
|
|
// import selectArea from '../../components/selectArea.vue'; |
|
|
|
export default { |
|
|
|
components : { |
|
|
|
tabber, |
|
|
|
productList, |
|
|
|
PrivacyAgreementPoup, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
area: '长沙', |
|
|
|
text : '长沙市刘师傅在服务过程中客户投诉“服务过程中有不文明的行为”.....', |
|
|
|
queryParams: { |
|
|
|
pageNo: 1, |
|
|
|
pageSize: 10, |
|
|
|
title: '' |
|
|
|
}, |
|
|
|
bannerList: [ |
|
|
|
{ |
|
|
|
url: 'https://cdn.uviewui.com/uview/swiper/swiper3.png', |
|
|
|
}, |
|
|
|
{ |
|
|
|
url: 'https://cdn.uviewui.com/uview/swiper/swiper2.png', |
|
|
|
}, |
|
|
|
{ |
|
|
|
url: 'https://cdn.uviewui.com/uview/swiper/swiper3.png', |
|
|
|
}, |
|
|
|
], |
|
|
|
productList: [], |
|
|
|
} |
|
|
|
}, |
|
|
|
computed : { |
|
|
|
...mapGetters(['userShop']), |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
//显示选择地区 |
|
|
|
showSelectArea() { |
|
|
|
// this.$refs.selectArea.open() |
|
|
|
}, |
|
|
|
//搜索地址 |
|
|
|
searchAddress() { |
|
|
|
Position.getLocation(res => { |
|
|
|
Position.selectAddress(res.longitude, res.latitude, success => { |
|
|
|
let address = this.extractProvinceAndCity(success) |
|
|
|
this.queryParams.title = address.city |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
//提取用户选择的地址信息(省市县信息) |
|
|
|
extractProvinceAndCity(res) { //提取用户选择的地址信息(省市) |
|
|
|
if (!res.address && res.name) { //用户直接选择城市的逻辑 |
|
|
|
return { |
|
|
|
province: '', |
|
|
|
city: res.name |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
if (res.address) { //用户选择了详细地址,要从详细地址中提取出省市县信息 |
|
|
|
// 使用正则表达式匹配省市县 |
|
|
|
const regex = /(?<province>[\u4e00-\u9fa5]+?省)(?<city>[\u4e00-\u9fa5]+?(?:市|自治州|盟|地区))/; |
|
|
|
const match = res.address.match(regex); |
|
|
|
if (match) { // 如果匹配成功,则返回省和市的信息 |
|
|
|
return { |
|
|
|
province: match.groups.province, |
|
|
|
city: match.groups.city |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return { //用户没选择地址就点了确定按钮 |
|
|
|
province: '', |
|
|
|
city: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|