|
|
|
<template>
|
|
|
|
<view class="home">
|
|
|
|
<view class="home-navbar">
|
|
|
|
<u-navbar :is-back="false">
|
|
|
|
<view class="slot-wrap">
|
|
|
|
<view class="address" @click="openPage(2)">
|
|
|
|
<image src="@/static/dingwei.png"></image>软件大道花神庙软件大道花神庙软件大道花神庙
|
|
|
|
</view>
|
|
|
|
<view class="search" @click="openPage(3)">
|
|
|
|
<image src="@/static/icon-search.png"></image>
|
|
|
|
请输入名称搜索
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</u-navbar>
|
|
|
|
</view>
|
|
|
|
<view class="home-tab">
|
|
|
|
<view class="tab">
|
|
|
|
<u-tabs :list="list" bg-color="transparent" :is-scroll="true" active-color="#222222" inactive-color="#666666" font-size="30" :active-item-style="activeStyle" bar-height="10" bar-width="60" v-model="current" @change="changeTabs"></u-tabs>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="home-banner">
|
|
|
|
<image src="@/static/banner1.png"></image>
|
|
|
|
</view>
|
|
|
|
<view class="home-list">
|
|
|
|
<view class="item" v-for="i in 10" :key="i" @click="openPage(1,1)">
|
|
|
|
<view class="pic">
|
|
|
|
<image src="@/static/nv.png"></image>
|
|
|
|
</view>
|
|
|
|
<view class="info">
|
|
|
|
<view class="name">李哈哈<view class="vip">VIP1</view></view>
|
|
|
|
<view class="desc">26岁/178cm</view>
|
|
|
|
</view>
|
|
|
|
<view class="chat">
|
|
|
|
<image src="@/static/xin.png"></image>
|
|
|
|
搭讪
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
current: 0,
|
|
|
|
list:[{'name': '全部'},{'name': 'KTV'},{'name': '看电影'},{'name': '爬山'},{'name': '野餐'},{'name': '郊游'},{'name': '骑行'}],
|
|
|
|
activeStyle:{'fontSize': '35rpx'}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onLoad() {
|
|
|
|
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
openPage(index,id){
|
|
|
|
if(index == 1){
|
|
|
|
uni.navigateTo({
|
|
|
|
url: "/pages/peiwan/detail?id="+id
|
|
|
|
})
|
|
|
|
}else if(index == 2){
|
|
|
|
uni.navigateTo({
|
|
|
|
url: "/pages/index/city"
|
|
|
|
})
|
|
|
|
}else if(index == 3){
|
|
|
|
uni.navigateTo({
|
|
|
|
url: "/pages/index/search"
|
|
|
|
})
|
|
|
|
}
|
|
|
|
},
|
|
|
|
changeTabs(index){
|
|
|
|
this.current = index
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
.home{
|
|
|
|
&-navbar{
|
|
|
|
width: 100%;
|
|
|
|
overflow: hidden;
|
|
|
|
.slot-wrap{
|
|
|
|
width: 100%;
|
|
|
|
padding: 0 25rpx;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
box-sizing: border-box;
|
|
|
|
.address{
|
|
|
|
font-weight: 400;
|
|
|
|
font-size: 30rpx;
|
|
|
|
white-space: nowrap;
|
|
|
|
color: #222222;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
max-width: 250rpx;
|
|
|
|
image{
|
|
|
|
width: 30rpx;
|
|
|
|
height: 30rpx;
|
|
|
|
margin-right: 7rpx;
|
|
|
|
position: relative;
|
|
|
|
top: 5rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.search{
|
|
|
|
width: 436rpx;
|
|
|
|
height: 70rpx;
|
|
|
|
background: #F5F5F5;
|
|
|
|
border-radius: 70rpx;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
font-weight: 500;
|
|
|
|
font-size: 26rpx;
|
|
|
|
color: #999999;
|
|
|
|
image{
|
|
|
|
width: 30rpx;
|
|
|
|
height: 30rpx;
|
|
|
|
margin-right: 7rpx;
|
|
|
|
margin-left: 25rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&-banner{
|
|
|
|
padding: 0 15rpx;
|
|
|
|
overflow: hidden;
|
|
|
|
margin-top: 10rpx;
|
|
|
|
text-align: center;
|
|
|
|
image{
|
|
|
|
width: 720rpx;
|
|
|
|
height: 220rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&-tab{
|
|
|
|
overflow: hidden;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
&-list{
|
|
|
|
padding: 0 25rpx 25rpx;
|
|
|
|
overflow: hidden;
|
|
|
|
.item{
|
|
|
|
width: 100%;
|
|
|
|
height: 200rpx;
|
|
|
|
background: #FFFFFF;
|
|
|
|
box-shadow: 0px 4rpx 10rpx 0px rgba(0,0,0,0.06);
|
|
|
|
border-radius: 20rpx;
|
|
|
|
padding: 30rpx;
|
|
|
|
box-sizing: border-box;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
margin-top: 20rpx;
|
|
|
|
&:first-child{
|
|
|
|
margin-top: 0;
|
|
|
|
}
|
|
|
|
.pic{
|
|
|
|
width: 140rpx;
|
|
|
|
height: 140rpx;
|
|
|
|
border-radius: 10rpx;
|
|
|
|
overflow: hidden;
|
|
|
|
margin-right: 20rpx;
|
|
|
|
image{
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.info{
|
|
|
|
flex: 1;
|
|
|
|
.name{
|
|
|
|
font-weight: 500;
|
|
|
|
font-size: 32rpx;
|
|
|
|
color: #222222;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
.vip{
|
|
|
|
width: 60rpx;
|
|
|
|
line-height: 32rpx;
|
|
|
|
background: url(@/static/vip-bg.png) center top no-repeat;
|
|
|
|
background-size: contain;
|
|
|
|
text-align: center;
|
|
|
|
font-weight: 500;
|
|
|
|
font-size: 20rpx;
|
|
|
|
color: #FFFFFF;
|
|
|
|
overflow: hidden;
|
|
|
|
margin-left: 20rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.desc{
|
|
|
|
width: 180rpx;
|
|
|
|
line-height: 40rpx;
|
|
|
|
background: #F2F2F2;
|
|
|
|
border-radius: 40rpx;
|
|
|
|
font-weight: 500;
|
|
|
|
font-size: 24rpx;
|
|
|
|
color: #000000;
|
|
|
|
text-align: center;
|
|
|
|
margin-top: 20rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.chat{
|
|
|
|
width: 150rpx;
|
|
|
|
height: 90rpx;
|
|
|
|
background: linear-gradient(0deg, #000000, #3D3B38);
|
|
|
|
box-shadow: 0px 4rpx 18rpx 0px rgba(42,41,39,0.34);
|
|
|
|
border-radius: 90rpx;
|
|
|
|
margin-left: 20rpx;
|
|
|
|
text-align: center;
|
|
|
|
font-weight: 500;
|
|
|
|
font-size: 24rpx;
|
|
|
|
color: #FFFFFF;
|
|
|
|
image{
|
|
|
|
width: 65rpx;
|
|
|
|
height: 32rpx;
|
|
|
|
display: block;
|
|
|
|
margin: 15rpx auto 5rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|